/acp-status, /acp-enforce and per-tool rule commands via UserPromptExpansion (0.18.0) - #35
Open
davidcrowe wants to merge 1 commit into
Open
davidcrowe wants to merge 1 commit into
davidcrowe wants to merge 1 commit into
Conversation
…ask|deny, /acp-apply A command the human types reaches the hook on UserPromptExpansion before it expands; the hook files it with the gateway (POST /plugin/intents), prints the signed confirm link the gateway hands back, and blocks the expansion so the model never sees the command or the link as a prompt. The human's tap on that link is what changes the workspace — the key on this machine never writes policy. /acp-status is read-only. Also: the no-credential and local-mode early exits no longer swallow UserPromptExpansion (the handler owns its own not-connected message); SessionStart prints the gateway's once-a-day offer on the human channel; the session receipt names /acp-status after a shadow notice. 0.18.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
/acp-status,/acp-enforce,/acp-audit,/acp-allow <tool>,/acp-ask <tool>,/acp-deny <tool>,/acp-apply <proposal>— the workspace policy from the terminal. Version 0.18.0. Pairs with gatewaystack-connectfeat/terminal-intents(rollout keyterminal_intents, internal).A command the human types reaches the hook on
UserPromptExpansionbefore it expands. The hook files it with the gateway (POST /plugin/intents), prints the signed confirm link the gateway hands back, and blocks the expansion — the model never sees the command, its body, or the link as a prompt. The human's tap on that link is what changes the workspace; the key on this machine never writes policy. Nothing fires inside subagents (agent_id).Probe (Claude Code 2.1.270, recorded in the gateway PR):
UserPromptExpansionfires only for a human‑typed slash command and can be blocked; hooksystemMessageis written to the transcript, which is why no secret rides on it — the link executes only the intent the human already typed, as that human, once.Also
UserPromptExpansion— the handler owns its own "Not connected — run /acp-connect first" line (found while testing; the generic floor was intercepting the event).SessionStartprints the gateway's once‑a‑dayofferon the human channel./acp-status shows what enforcement would have heldafter a shadow notice.skills/acp/SKILL.mdtells the model to offer the commands instead of only the console.Tests
node --test test/*.test.mjs→ 200 passed. Newtest/terminal-intents.test.mjs(8): POST body for enforce/allow, GET for status with a proposal line, non‑ACP command passthrough, subagent passthrough, no‑credentials block,not-rolled-out404, unreachable gateway — exit 0 in every case. Manifest validation green; all three version sites at 0.18.0.Order
Gateway PR first, promote, then this. Against an old gateway
/acp-*prints "Terminal commands aren't on for this workspace yet" and points at the console.