feat: Plan-mode plugin tools with planSafeActions + summonWindow shortcut (ADR 0207, issue #167) - #185
Conversation
|
@yexisu is attempting to deploy a commit to the vastsa's projects Team on Vercel. A member of the Team first needs to authorize it. |
Resolve the decisions-log collision by keeping D377–D383 from main and recording the plan-safe plugin / summonWindow change as D384 (ADR 0211).
Renumber the new ADR/decision off the taken 0207/D380 slots, fix the i18n shortcutAction type, wire summonWindow, and keep host-core durable session mode as the plugin execute authority.
|
Reviewed and merged. Principle: sound. Issue #167 is real: Plan/Goal currently hard-deny every plugin tool (ADR 0052 / ADR 0053 / ADR 0170), so the planner cannot inspect a live URL through Merged: PR #185 as merge commit
Follow-up still open (not a merge rewrite):
Thank you for the three-layer design and the Browser opt-in. |
Resolves #167.
Problem
Plan (and Goal) mode could not invoke any plugin tool, even for read-only
actions like fetching a URL through the bundled pi.browser plugin. The
keyboard shortcut catalog only exposed closeWindow (Mod+W) with no
symmetric way to bring a tray-hidden window back into focus.
Solution
Part 1 - Plan-mode plugin tools (ADR 0207)
A plugin tool may now declare a planSafeActions array naming the exact
actions it considers safe in Plan and Goal modes. The opt-in is enforced in
three places so a misdeclaration cannot turn a Plan call into a mutation:
tools without a non-empty planSafeActions list from the model in
Plan/Goal modes and annotates the description with the allowed action
list so the model knows which calls are valid.
listed plugin tool in ools.execute; without the list the contract-
mode hard deny from ADR 0052 / ADR 0053 stays in force.
the desktop runner now carries the session mode in the plugin's
execute ctx and rejects any action outside the declared list with
PERMISSION_DENIED, even if a bug earlier in the chain let an unsafe
call through.
The bundled pi.browser plugin (ADR 0170) opts in with
planSafeActions: ["navigate", "snapshot", "screenshot", "console"].
Mutating actions (click, ill, evaluate, cdp) stay Agent-only.
Part 2 - summonWindow shortcut (D380)
Adds summonWindow (Mod+Shift+W) to the window shortcut group,
paired with closeWindow (Mod+W). The desktop main process registers
it through globalShortcut, and the native File menu gains a "Summon
Window" item next to the existing settings and close entries. The action
calls the existing
estoreMainWindow helper so a hidden or
minimized-to-tray window is brought back to focus.
Commits
Docs
es, fr, ko, tr
Validation
the Browser plugin declares exactly the four read-only actions in
PLAN_SAFE_ACTIONS.
planSafeActions field shape and absence as plan-denied.
tool filtering (hidden without list, exposed with list, description
suffix).
assertions for the new wording.
summonWindow id, group, default binding, and non-collision with
closeWindow.
cargo on PATH); manual review of the permission gate and RPC
payload followed the existing mcp_* / plugin_* patterns.