mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-11 02:19:56 -06:00
Plug-ins: tests cover each route that cannot approve an install
Add tests that an action step running plugin.install with grant is refused, that ui.key, ui.click and ui.pointer sent through the control path at the open approval dialog approve nothing, with OK focused too, that MCP answer_dialog reports the app's refusal, that ui.installPlugin given grant or allowHeavy approves nothing, and that a module recorded in grants.json installs from a session with that store and no flag while other bytes under its id are refused. The batch assertion now checks the refusal's message. The docs and comments state that Enter confirms the dialog only when OK has the keyboard focus.
This commit is contained in:
+2
-1
@@ -164,7 +164,8 @@ capability model proposed for PhotoCraft plug-ins
|
||||
SHA-256 shown; Cancel installs nothing. The
|
||||
names shown have control and bidirectional characters escaped (`\u{202E}`) and are cut to 64 characters.
|
||||
Only a person can press its OK: `ui.dialog.confirm`, MCP's `answer_dialog` and injected input (`ui.key`, `ui.click`)
|
||||
are refused and the dialog stays open, and Enter does not confirm it. `ui.dialog.set` can't change what it installs.
|
||||
are refused and the dialog stays open. Enter confirms it only when OK has the keyboard focus. `ui.dialog.set` can't
|
||||
change what it installs.
|
||||
- `plugin.install` refuses the module, naming the permissions it needs, unless a person already granted this module
|
||||
(`plugin.inspect`'s `needsApproval` tells it beforehand). A request's `grant` is refused too: `plugin.install` takes
|
||||
it only with the approval the dialog gives. A `vectorcraft-cli mcp` or `run` started with `--allow-plugin-grants`
|
||||
|
||||
Reference in New Issue
Block a user