fix(mcp): require confirm_name for delete_workspace and send X-Confirm-Name header #10
Reference in New Issue
Block a user
Delete Branch "fix/mcp7-delete-workspace-confirm-name"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #7.
The tenant's destructive-action gate refuses workspace deletion unless the caller echoes the workspace's exact name in the
X-Confirm-Nameheader. The previousdelete_workspacetool only sent?confirm=true, so agents could not complete deletion even after human approval.Changes
apiCallnow accepts an optionalheadersmap and merges it withContent-Type.handleDeleteWorkspacerequiresconfirm_nameand sends it asX-Confirm-Name, while preserving?confirm=true.deprovision_workspaceas an alias fordelete_workspace.CLAUDE.md, and tests updated; refusal and alias are tested.Test plan
npm testpasses (144 passed, 1 skipped).npm run buildpasses.SOP-Checklist
confirmboolean was already insufficient and is replaced by the explicit name check.🤖 Generated with Claude Code
Pull request closed