ApprovalRequestParams
Full params shared by approval/request and approval/requested.
Fields and variants
Section titled “Fields and variants”approvalIdavailableChoicescuaCardFactscurrentRequirementIditemIdjudgeEscalatedprotectedWriterawArgsreviewerReasonsessionIdsourceRangesubagentOriginsubjecttaskIdtoolCallIdtoolNameturnIdviewCursor
Source
schema/msp/experimental/msp.schema.json#/types/ApprovalRequestParams
{ "description": "Full params shared by `approval/request` and `approval/requested`.", "properties": { "approvalId": { "description": "The approval's stable id. Match `approval/decide`, `approval/updated`\nand `approval/resolved` by it, never by the JSON-RPC request id, which\nbelongs to one connection.", "type": "string" }, "availableChoices": { "description": "The choices the server offers for the current requirement. Send the\nchosen one's `choiceId` in `approval/decide`; clients never build their\nown.", "items": { "$ref": "#/$defs/ApprovalChoice" }, "type": "array" }, "cuaCardFacts": { "$ref": "#/$defs/ApprovalCuaCardFacts", "description": "A Computer Use card's facts: the page, the window and each step that\nmay have an effect, in the host's words; absent on every other\napproval." }, "currentRequirementId": { "$ref": "#/$defs/ApprovalRequirementRef", "description": "The requirement the next decision must target; send it unchanged as\n`requirementId` in `approval/decide`. For `shell` it names the first\nstage still needing a decision; for other kinds its `sourceIndex` is 0." }, "itemId": { "description": "The `toolCall` view item waiting on this approval.", "type": "string" }, "judgeEscalated": { "description": "`true` when the automated LLM judge saw this request first and handed it\nto a person without deciding. A display hint only. The host sends it\nas `false` when it re-issues the request after a restart or on\n`session/resume`; a re-send for a later stage keeps it.", "type": "boolean" }, "protectedWrite": { "description": "`true` when this approval guards a write to a protected file. Only\nallow-once and reject choices are offered, and a decision is accepted\nonly while at least one client is subscribed to the session.", "type": "boolean" }, "rawArgs": { "description": "The tool call's arguments as a string, usually JSON. With `toolName`, it\nlets a client show a subject whose `kind` it does not recognize.", "type": "string" }, "reviewerReason": { "description": "The judge's escalation reason as one bounded display line (ADR 8609\nD3: first sentence, whitespace controls folded, other control and\nformat scalars stripped, 100 extended grapheme clusters max).\nPresent only on a request released by a valid structured `escalate`\nwith a non-blank judge rationale; absent on every other approval. A\ndisplay hint only, like `judge_escalated`: it never authorizes\nanything.", "type": "string" }, "sessionId": { "description": "The owning session. For a subagent's approval shown on the parent, this\nis the parent session.", "type": "string" }, "sourceRange": { "$ref": "#/$defs/SourceRange", "description": "The stored records this event was folded from: an opaque token clients\nmust not interpret." }, "subagentOrigin": { "$ref": "#/$defs/ApprovalSubagentOrigin", "description": "Present only for a child (native subagent) approval projected onto\nthe parent session's plane (ADR 36182); parent-own approvals omit it." }, "subject": { "$ref": "#/$defs/ApprovalSubject", "description": "What the approval is for. Show a `kind` you do not recognize\ngenerically, and never auto-approve it." }, "taskId": { "description": "The id of the task running the tool call.", "type": "string" }, "toolCallId": { "description": "The model provider's id for this tool call.", "type": "string" }, "toolName": { "description": "The name of the tool being called.", "type": "string" }, "turnId": { "description": "The turn whose tool call is waiting on this approval.", "type": "string" }, "viewCursor": { "description": "The cursor of the `approval/requested` event that opened this request.\nA re-send for a later stage keeps this cursor, so `view/page` at it\nreturns the opening stage, which may be older than this payload.", "type": "string" } }, "required": [ "approvalId", "availableChoices", "currentRequirementId", "itemId", "judgeEscalated", "protectedWrite", "rawArgs", "sessionId", "sourceRange", "subject", "taskId", "toolCallId", "toolName", "turnId", "viewCursor" ], "type": "object"}