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.
|
Updated - new head 1. 2. User input is inserted verbatim. The template substitution used Also raised the step cap from Verified: a rewrite completes under the default permission policy; the typed text was captured from |
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.Changes in this revision
--permission offis no longer passed by default. The command now carries no--permissionflag, so the CLI applies its own
smartpolicy. The page has an "免确认执行" switch that adds--permission offwhen it is turned on; it starts unchecked on every launch and is notremembered between launches. The README documents the flag, the switch and what each one means.
String.replacewith a stringreplacement, so
$&,$1,$'and$$inside the typed text were treated as replacementpatterns and the input was rewritten on its way to the model. It now uses a function
replacement, and
tests/prompts.test.mjscovers it.--max-steps 2: with the default permission policy the agent may take oneexploratory step before answering, and a cap of 1 turned that into a
limit_exceedederror.Tested environment
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; the permission switch is off on launch and adds--permission offonly when turned on.--permissionflag) and completed.$&and$1.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, one switch. 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 command is:
--permission offis only present when the page's switch is on. The child runs with--cwdpointingat a scratch directory inside the Host-provided data directory, so it never starts in your project,
and it is killed on timeout and when the board is disposed. The temporary file it writes stays in
that data directory and 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.