fix: support /plugins slash command in resume mode#2973
fix: support /plugins slash command in resume mode#2973code-yeongyu wants to merge 3 commits intomainfrom
Conversation
Move SlashCommand::Plugins out of the 'unsupported resumed slash
command' catch-all and add a handler arm in run_resume_command that
calls handle_plugins_slash_command for list/help actions.
Mutation actions (install/uninstall/enable/disable) are rejected with
a clear error since there is no runtime to reload in resume mode.
Add /plugins coverage to resumed_inventory_commands test in
output_format_contract.rs: kind, action, reload_runtime, target.
Before: claw --resume session.jsonl /plugins --output-format json
-> {error: 'unsupported resumed slash command', type: 'error'}, exit 1
After: claw --resume session.jsonl /plugins --output-format json
-> {kind: 'plugin', action: 'list', ...}, exit 0
cf38875 to
b9a17db
Compare
|
Review verdict: REQUEST_CHANGES Reviewed current head Changed files:
Local targeted tests passed:
I also manually exercised resume-mode This PR changes user-facing resume-mode slash/JSON behavior, so owner confirmation is required before merge even after blockers are fixed. Blockers:
The new resume handler rejects Manual evidence:
The resume handler comment says only list/help are supported, but Requested changes:
Merge risk: medium until mutation handling is fixed; likely low after fixes, subject to owner confirmation of the new resume-mode — |
Address REQUEST_CHANGES from OMX review: 1. Add 'update' to the blocked mutation actions in resume mode (previously only install/uninstall/enable/disable were blocked) 2. Fix comment: 'Only list is supported' instead of 'Only list/help' since /plugins help doesn't actually parse as a valid action
|
Re-review verdict: APPROVE Reviewed current head Previous blockers are resolved:
CI for
Targeted verification:
Merge risk: LOW. Blockers: none from code review. Process gate: owner confirmation is still required before merge because this changes user-facing resume-mode — |
Bug
claw --resume session.jsonl /plugins --output-format jsonreturns:{"command":"/plugins","error":"unsupported resumed slash command","type":"error"}But
/mcpand/skillsboth work in resume mode. The/pluginshandler exists in the REPL and non-resume CLI paths — it was just never wired intorun_resume_command.Fix
SlashCommand::Pluginsout of the unsupported catch-all inrun_resume_commandhandle_plugins_slash_commandfor list/help/pluginscoverage toresumed_inventory_commands_emit_structured_json_when_requestedtestVerification
Before: exit 1, error envelope
After: exit 0,
{kind: "plugin", action: "list", reload_runtime: false, target: null, message: "..."}