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:
dotCooCoo
2026-11-08 17:47:02 -08:00
parent 2d7bfa8b60
commit 0f002e7625
7 changed files with 229 additions and 6 deletions
+2 -1
View File
@@ -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`