Minor Changes
-
#336
ff07689Thanks @tyrel! - New approval mode for MCP clients that cannot show an elicitation prompt:approvalPolicy = "client-tool". Under theask-*modes such a client never gets to answer, so every destructive and privileged command fails withAPPROVAL_UNAVAILABLE, and the only way through wasauto. Underclient-toolthe client's own tool-call consent prompt is the approval. A destructive or privileged command onrun-commandis refused withAPPROVAL_VIA_TOOLand pointed at the newdestructive-commandtool. That tool,privileged-command, an interactiveopen-sessionand thesftp-upload,sftp-upload-fileandsftp-download-filetools run gated commands without elicitation, audited asapprover: "client-tool-consent". Role bindings, host groups, the denylist, OPA and quotas apply as before; on such a profile OPA sees a gated shell command asaction.tool = "destructive-command", so a Rego rule matched oninput.action.tool == "run-command"needs the new name too. Opt-in and weaker than elicitation: "Always allow" ondestructive-commandin the client makes the profile behave likeauto.Upgrade note:
destructive-commandis listed to every client of every installation. On a profile whoseapprovalPolicyis notclient-toolit runs nothing, not even a safe command: it is refused withCLIENT_TOOL_ONLY, before OPA is asked, and pointed atrun-command. Nothing else changes for a profile that does not chooseclient-tool.