Repository navigation
Conversation
MyPrototypeWhat
left a comment
There was a problem hiding this comment.
Thanks for adding the prompt-enhancer Mini App. The current head 280e0a9a is not ready to merge.
Every time the user clicks send, the rewrite spawns mcode exec with --permission off. Official docs list off and full as options that should only be used in an isolated workspace. The README says the app launches mcode exec and uses the signed-in account, but it does not mention --permission off. There is also no switch to keep this off by default, or to ask for confirmation first. Please document --permission off in the README, and keep this off by default or require confirmation before it runs.
userTemplate.replace('{input}', text) also follows JavaScript's replace rules for sequences such as $&. I reproduced this locally, and user input can be rewritten. Please fix the substitution so user input is inserted unchanged.
Please update the branch, and we will look at the new head.
Adds Prompt Enhancer, a Mini App that rewrites a one-line request into a complete prompt for a
coding assistant. The rewrite template is fixed and bundled with the package; the model list and
the reasoning levels come from MiniMax Code's own runtime configuration, and each rewrite runs
through the local
mcodeCLI so it uses the account the user is already signed in to.Tested environment
the Agent.
picker opened and drilled from models into reasoning levels; a rewrite round-tripped - original
sentence in, rewritten prompt out, undo restored the original sentence; the selected reasoning
level reached the CLI as
--effort.mcodeCLI is not onPATH.
npm run check
plugins/skypata/prompt-enhancer: OK- 0 errors, 0 warnings for this package.test/files.test.mjs("files: two paths thatdiffer only in letter case collide" and "files: a directory and a file that differ only in letter
case collide"). They fail identically on the untouched HEAD: on a case-insensitive filesystem the
test cannot create both spellings, so the expected diagnostics never appear. They are unrelated to
this package and are not addressed here.
Access this Mini App declares
None. The package declares no
agentAccess,toolAccess,deviceAccessorhostAccess. Itreads the runtime configuration file to build the model list, spawns the
mcodeCLI once perrewrite, and keeps the typed text in the page's local storage as view state.
Written by MiniMax-M3.1-Flash
What the Mini App does
One text box, one model picker, one send button. The picker is a two-level drill-down: it lists
the models first, and picking a model that declares reasoning levels opens that model's level list.
After a rewrite the text box holds the rewritten prompt and an undo button appears in its corner;
one click puts the original sentence back.
The rewrite itself uses a fixed two-part prompt template bundled in
miniapp/node/prompts/. Itkeeps the user's language, refuses to answer the request, and expands it into scope, deliverable,
format and acceptance criteria.
How it reaches a model
The Node service spawns
mcode execonce per rewrite with the bundled system prompt, the usertemplate filled with the typed text, and the selected model. It waits for the final message, strips
the wrapping quotes the model sometimes adds, and returns the rewritten prompt to the page. The
child process is killed on timeout and when the board is disposed, and the temporary file it writes
is deleted right after it is read.
The model list is read from the MiniMax Code runtime configuration file
config.yaml, locatedthrough
MAVIS_DATA_DIR,MINIMAX_DATA_DIR,__MAVIS_PARENT_DATA_DIRorMCODE_CONFIG_DIR, otherwise~/.minimax/config.yaml. That layout is not a supported API andmay change between releases; the package README says so.
Files
Sensitive information
Scanned the package for credentials, private keys, local paths, e-mail addresses, private IP
ranges and leftovers from the machine it was built on: none found. The package contains no API key
and no token; it never handles one.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.