Fix refusals of read-only approval-runs verbs and keep the lists in sync
The read-only MCP tool refused three verbs that only query: approval-runs search, pick and bridge. #117's changelog claimed pick had 'moved into read-only', which was true of the tool registry but not of the CLI allow-list — the two are hand-maintained in different files and had drifted. Adds the missing entries, and a test that derives the pairing mechanically: every 'action === "x"' in src/cli/commands/* that dispatches to a runTool("seal_...") must be read-only when the tool it reaches is read-only. It asserts a minimum number of pairs so a change in dispatch shape cannot make it silently vacuous, and names its exceptions explicitly — the deploy <action> short forms (rejected at runtime, so unreachable) and approval-runs search (an accepted alias of list with no registry row). Half of these were found by that check rather than by reading the code.
This commit is contained in:
1 parent
76eb4575f8
commit
1a80a0fb4c
4 files changed
+52
-1
No files matched your search
@@ -37,6 +37,10 @@ const READ_ONLY_COMMANDS: Record<string, string[]> = {
|
||||
"export",
|
||||
"flow",
|
||||
"list",
|
||||
// `search` is an accepted alias of `list` in the dispatcher but has no help-registry entry.
|
||||
"search",
|
||||
"pick",
|
||||
"bridge",
|
||||
"get",
|
||||
"cited-rules",
|
||||
"document-summary",
|
||||
|
||||
Reference in new issue
Block a user