{
"$defs": {
"ApprovalAmendment": {
"description": "The policy rule a decision created, in display form; the full rule is not\nincluded.",
"properties": {
"durability": {
"$ref": "#/$defs/ApprovalAmendmentDurability",
"description": "How long the rule lasts: `session` or `localPersistent`."
},
"rulePreview": {
"description": "A human-readable preview of the rule, for display.",
"type": "string"
}
},
"required": [
"durability",
"rulePreview"
],
"type": "object"
},
"ApprovalAmendmentDurability": {
"description": "How long a rule created by an approval decision lasts. The set is open, so\nnewer hosts may send other values.",
"enum": [
"session",
"localPersistent"
],
"type": "string",
"x-msp-openness": "open"
},
"ApprovalChange": {
"description": "The change an `approval/updated` event reports. `kind` says what happened,\nand only the fields for that kind are present.",
"properties": {
"choiceId": {
"description": "The `choiceId` that satisfied the stage. Present only when `kind` is\n`stageResolved`.",
"type": "string"
},
"decision": {
"$ref": "#/$defs/ApprovalDecision",
"description": "The decision the chosen option applied to the stage. Present only when\n`kind` is `stageResolved`."
},
"executable": {
"description": "A recovery detail: whether the action could run without a new decision.\nPresent only when `kind` is `restartRecovered`.",
"type": "boolean"
},
"kind": {
"description": "What happened: for example `stageResolved` (a shell stage was\nsatisfied), `policyPersistence` (saving a rule succeeded or failed),\n`reviewStarted` or `reviewCompleted` (the automated LLM judge started or\nfinished reviewing), `restartRecovered` (a host restart recovered this\napproval: either the host first resolves it `abort` and a re-ask comes\nas a new approval with a new `approvalId`, or it stays pending under\nthe same `approvalId` with refreshed choices), `alreadyTerminal`\n(recovery found it already decided) or `resolving` (a\n`computerUseTakeover` approval was marked resolving and waits for the\nlock broker; a decide now answers -32059). The set is open, so newer\nhosts may add kinds.",
"type": "string"
},
"reason": {
"description": "Why saving the policy rule failed, as human-readable text. Present only\nwhen `kind` is `policyPersistence` and `status` is `failed`.",
"type": "string"
},
"reparsed": {
"description": "A recovery detail: whether the command was re-parsed during recovery.\nPresent only when `kind` is `restartRecovered`.",
"type": "boolean"
},
"requirementId": {
"$ref": "#/$defs/ApprovalRequirementRef",
"description": "The stage requirement that was satisfied. Present only when `kind` is\n`stageResolved`."
},
"status": {
"$ref": "#/$defs/ApprovalPersistenceStatus",
"description": "Whether saving the policy rule succeeded or failed; present only when\n`kind` is `policyPersistence`. A failure does not undo the decision;\nonly the saved rule is missing."
}
},
"required": [
"kind"
],
"type": "object"
},
"ApprovalChoice": {
"description": "One option the server offers for deciding an approval. Clients pick one and\nsend its `choiceId` in `approval/decide`; they never build their own.",
"properties": {
"acceptsFeedback": {
"description": "`true` when this choice takes optional `feedback` text in\n`approval/decide`, which reaches the model as guidance. Omitted when\n`false`.",
"type": "boolean"
},
"choiceId": {
"description": "The id to send as `choiceId` in `approval/decide`. The set of ids is\nopen, so show `label` and do not base behavior on specific ids.",
"type": "string"
},
"decision": {
"$ref": "#/$defs/ApprovalDecision",
"description": "The decision this choice applies, so a client can act on approve or\nreject without knowing choice ids."
},
"label": {
"description": "The human-readable label to show for this choice.",
"type": "string"
},
"rulePreview": {
"description": "A human-readable preview of what this choice grants, such as the policy\nrule it would create; show it exactly as given.",
"type": "string"
},
"scope": {
"$ref": "#/$defs/ApprovalChoiceScope",
"description": "The grant duration this choice declares: `once` (this request only),\n`session` (the rest of the session) or `localPersistent` (saved in the\nlocal policy store)."
}
},
"required": [
"choiceId",
"decision",
"label",
"scope"
],
"type": "object"
},
"ApprovalChoiceScope": {
"description": "How long a grant made by a choice lasts. The set is open, so newer hosts may\nsend other values.",
"enum": [
"once",
"session",
"localPersistent"
],
"type": "string",
"x-msp-openness": "open"
},
"ApprovalCuaCardFacts": {
"description": "One Computer Use card's facts. Empty collections and absent rows are\nomitted, never `null`.",
"properties": {
"data": {
"description": "The data the call would send that the card must name; a card with any\noffers only one-shot choices.",
"items": {
"$ref": "#/$defs/ApprovalCuaDataFact"
},
"type": "array"
},
"page": {
"$ref": "#/$defs/ApprovalCuaPage",
"description": "For a browser, the host of the window's current page."
},
"steps": {
"description": "Only the consequential steps, in call order.",
"items": {
"$ref": "#/$defs/ApprovalCuaStep"
},
"type": "array"
},
"windowTitle": {
"description": "The target window's title: the app's own text, which a page can set;\na client shows it quoted and as plain text, never as markup or a\nchoice, and may cap it.",
"type": "string"
}
},
"type": "object"
},
"ApprovalCuaDataFact": {
"description": "One piece of data the call would send. An open union on `kind`\n(`secret`, or `other` for a row the host can't word); a client shows\n`other` and any kind it doesn't know as a generic data row.",
"properties": {
"kind": {
"description": "Open discriminator: `secret` or `other`.",
"type": "string"
},
"mask": {
"$ref": "#/$defs/ApprovalCuaMask",
"description": "For `secret`, the parts of it the card may show, never the value."
},
"secretKind": {
"description": "For `secret`, the scanner's open tag (`github_token`,\n`secret_named_value` and so on); a client words the tags it knows and\nshows any other as \"a secret\".",
"type": "string"
}
},
"required": [
"kind"
],
"type": "object"
},
"ApprovalCuaMask": {
"description": "A secret's mask: a vendor token's prefix and last 4 characters\n(`ghp_…3f9a`), a named value's name and length (`password=… (12 chars)`),\nor the length alone; all absent names the kind only.",
"properties": {
"chars": {
"description": "The secret's length in characters.",
"type": "integer"
},
"last4": {
"description": "A vendor token's last 4 characters.",
"type": "string"
},
"prefix": {
"description": "A vendor token's fixed prefix (`ghp_`), or a named value's name and\nits `=` (`password=`).",
"type": "string"
}
},
"type": "object"
},
"ApprovalCuaPage": {
"description": "The page's full host, no path or query.",
"properties": {
"host": {
"description": "The host in Unicode.",
"type": "string"
},
"hostAscii": {
"description": "The host's `xn--` form; equal to `host` when they don't differ.",
"type": "string"
}
},
"required": [
"host",
"hostAscii"
],
"type": "object"
},
"ApprovalCuaPoint": {
"description": "A point in the model's 0–1000 coordinates.",
"properties": {
"x": {
"type": "integer"
},
"y": {
"type": "integer"
}
},
"required": [
"x",
"y"
],
"type": "object"
},
"ApprovalCuaStep": {
"description": "One consequential step. A client renders \"Step N: <action> <roleWord>\n\"<label>\" — <effect>\"; a key step names its `chord`, and only a step with\na `point` (and no label or chord) reads \"at x,y\".",
"properties": {
"action": {
"description": "The host's verb phrase, such as `click` or `type into`.",
"type": "string"
},
"chord": {
"description": "The chord, for a key step.",
"type": "string"
},
"effect": {
"description": "The host's trusted sentence for what the step may do.",
"type": "string"
},
"kind": {
"description": "An open tag for styling and tests only (`verb:<class>`, `unresolved`,\n`unlabeled`); a client that doesn't know a value renders the step from\n`effect` and its label as usual.",
"type": "string"
},
"label": {
"description": "The control's label: the app's own text, shown quoted and as plain\ntext; a client may cap it.",
"type": "string"
},
"point": {
"$ref": "#/$defs/ApprovalCuaPoint",
"description": "The step's own 0–1000 model coordinates, only for a point step."
},
"roleWord": {
"description": "`button`, `link`, `menu item` or `key`; absent for a point step.",
"type": "string"
},
"step": {
"description": "1-based, as the batch numbers its steps.",
"type": "integer"
}
},
"required": [
"action",
"effect",
"kind",
"step"
],
"type": "object"
},
"ApprovalDecideParams": {
"description": "`approval/decide` params (tdd SS5.4): the decision. A standard SS3\ncommand — requires the session loaded on this host, requires `commandId`,\ndurable intake before ack, value-identical replay.",
"properties": {
"approvalId": {
"description": "The approval being decided.",
"type": "string"
},
"choiceId": {
"description": "One of the current `availableChoices`; else -32052.",
"type": "string"
},
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"feedback": {
"description": "Free-text guidance delivered to the model with the denial. Only valid\non choices with `acceptsFeedback`. Never persisted in the durable\naudit record (live steer only), so it is absent from\n`approval/resolved` (tdd SS5.4). Omitted and explicit `null` both\nmean \"no feedback\" (#23468).",
"type": [
"string",
"null"
]
},
"requirementId": {
"$ref": "#/$defs/ApprovalRequirementRef",
"description": "Must equal the approval's `currentRequirementId`. The multi-stage race\nguard: a decision aimed at stage 1 can never accidentally satisfy\nstage 2, and a stale value is -32053 (tdd SS5.4)."
},
"sessionId": {
"description": "The target session.",
"type": "string"
}
},
"required": [
"approvalId",
"choiceId",
"commandId",
"requirementId",
"sessionId"
],
"type": "object"
},
"ApprovalDecideResult": {
"description": "`approval/decide` result (tdd SS5.4). Admission-ack rules still apply: the\nauthoritative outcome is `approval/resolved` / `approval/updated` on the\nview stream.",
"properties": {
"approvalId": {
"description": "The approval this decision was applied to.",
"type": "string"
},
"commandId": {
"description": "Echoes the client's id.",
"type": "string"
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "Admission status."
},
"terminal": {
"description": "`false` when the choice satisfied a stage but further requirements\nremain (the approval stays pending and an updated `approval/request`\nfollows); `true` when this decision produced the terminal\n`DecisionApplied` (tdd SS5.4).",
"type": "boolean"
}
},
"required": [
"approvalId",
"commandId",
"status",
"terminal"
],
"type": "object"
},
"ApprovalDecision": {
"description": "The kind of decision a choice applies or an approval received. The set is\nopen, so newer hosts may send values this version does not list.",
"enum": [
"approved",
"approvedForSession",
"approvedPolicyAmendment",
"denied",
"deniedPolicyAmendment",
"timedOut",
"abort"
],
"type": "string",
"x-msp-openness": "open"
},
"ApprovalListPendingParams": {
"description": "`approval/listPending` params (tdd SS5.7): the pull dual of the re-issued\nrequests. A log-fold read — no lease, works on loaded and unloaded\nsessions, never subscribes.",
"properties": {
"sessionId": {
"description": "The session to read.",
"type": "string"
}
},
"required": [
"sessionId"
],
"type": "object"
},
"ApprovalListPendingResult": {
"description": "`approval/listPending` result (tdd SS5.7). Ordering is by opening\n`viewCursor`; empty arrays when nothing is pending. The result is\npoint-in-time — to act on it race-safely, `approval/decide` carries the\n`requirementId` guard regardless of how the client learned the state.",
"properties": {
"approvals": {
"description": "Exactly the `approval/request` params, one per pending approval.",
"items": {
"$ref": "#/$defs/ApprovalRequestParams"
},
"type": "array"
},
"userInputs": {
"description": "Exactly the `userInput/request` params, one per pending prompt.",
"items": {
"$ref": "#/$defs/UserInputRequestParams"
},
"type": "array"
}
},
"required": [
"approvals",
"userInputs"
],
"type": "object"
},
"ApprovalMode": {
"description": "The approval enforcement modes (tdd SS5.12, camelCased\n`ApprovalBackendMode`). **Closed** by design (D-006, select-never-create):\na client selects a preconfigured mode and can never construct one;\nwidening this enum is a deliberate, gate-visible protocol change.",
"enum": [
"allowAll",
"promptUnmatched",
"onRequest",
"denyUnmatched"
],
"type": "string",
"x-msp-openness": "closed"
},
"ApprovalModeApplyOutcome": {
"description": "Whether a mode change did anything (tdd SS5.12), mirroring\n`ApprovalReconfigureApplyOutcome`. Apply failures are `commandRejected`.",
"enum": [
"completed",
"noop"
],
"type": "string",
"x-msp-openness": "open"
},
"ApprovalModeSource": {
"description": "How an approval mode took effect (tdd SS5.12, the effective-mode\nprojection's `source` vocabulary). Open.",
"enum": [
"startup",
"replay",
"approvalReconfigure"
],
"type": "string",
"x-msp-openness": "open"
},
"ApprovalOrigin": {
"description": "What triggered a tool action, shown so the user can judge it. It is\ndisplay-only and untrusted, and policy rules never match on it.",
"properties": {
"command": {
"description": "The shell command whose process asked for the action. Present when\n`kind` is `shellCommand`.",
"type": "string"
},
"kind": {
"description": "Which kind of origin this is: `shellCommand` or `url`.",
"type": "string"
},
"url": {
"description": "The full URL a fetch tool is requesting. Present when `kind` is `url`.",
"type": "string"
}
},
"required": [
"kind"
],
"type": "object"
},
"ApprovalPersistenceStatus": {
"description": "The result of saving a granted rule to the local policy store. The set is\nopen, so newer hosts may send other values.",
"enum": [
"succeeded",
"failed"
],
"type": "string",
"x-msp-openness": "open"
},
"ApprovalPolicyResult": {
"description": "Whether an approval's final decision lets the action run. The set is open,\nso newer hosts may send other values.",
"enum": [
"allow",
"deny"
],
"type": "string",
"x-msp-openness": "open"
},
"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"
},
"ApprovalRequirementRef": {
"description": "Identifies one requirement of an approval: for a `shell` approval, one\nstage. A client sends it back as `requirementId` in `approval/decide`, and a\nstale-requirement error names the current one.",
"properties": {
"approvalId": {
"description": "The approval this requirement belongs to.",
"type": "string"
},
"sourceIndex": {
"description": "The requirement's index within the approval, counting from 0; an\napproval with a single requirement uses 0.",
"type": "integer"
}
},
"required": [
"approvalId",
"sourceIndex"
],
"type": "object"
},
"ApprovalResolutionSummary": {
"description": "Winning terminal returned to a losing `approval/decide` command.",
"properties": {
"decision": {
"description": "The winning decision, as an `approval/resolved` decision value such as\n`approved` or `abort`.",
"type": "string"
},
"resolvedBy": {
"description": "Who made the winning decision, such as `user`, `policy` or `llmJudge`.",
"type": "string"
},
"viewCursor": {
"description": "The view cursor of the winning `approval/resolved` event.",
"type": "string"
}
},
"required": [
"decision",
"resolvedBy",
"viewCursor"
],
"type": "object"
},
"ApprovalResolvedBy": {
"description": "Who or what made an approval's final decision. The set is open, so newer\nhosts may send other values.",
"enum": [
"user",
"policy",
"llmJudge"
],
"type": "string",
"x-msp-openness": "open"
},
"ApprovalResolvedParams": {
"description": "`approval/resolved` params: the first durable terminal decision.",
"properties": {
"abortReason": {
"description": "Why an `abort` was not a cancel, when the host knows: `lockEpochEnded |\nbrokerUnavailable`, an open vocabulary (tdd SS5.5). Clients render an\nunknown value like an absent one.",
"type": "string"
},
"amendment": {
"$ref": "#/$defs/ApprovalAmendment",
"description": "The policy rule the decision created. Present only when the decision\ncreated one."
},
"approvalId": {
"description": "The approval that was decided.",
"type": "string"
},
"decidedAt": {
"description": "The decision time as RFC3339, projected from the durable\n`DecisionApplied` record's own stamp (ADR 45450 D3): optional on the\nwire so decoders tolerate its absence, always populated by current\nhosts.",
"type": "string"
},
"decidedByCommandId": {
"description": "The `commandId` of the `approval/decide` command that won. Absent when\nno such command made the decision, for example a policy or LLM judge\ndecision.",
"type": "string"
},
"decision": {
"$ref": "#/$defs/ApprovalDecision",
"description": "The final decision."
},
"itemId": {
"description": "The `toolCall` view item this approval was holding.",
"type": "string"
},
"policyResult": {
"$ref": "#/$defs/ApprovalPolicyResult",
"description": "Whether the final decision lets the action run (`allow`) or blocks it\n(`deny`)."
},
"resolvedBy": {
"$ref": "#/$defs/ApprovalResolvedBy",
"description": "Who or what made the decision: `user`, `policy` or `llmJudge`."
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The stored records this event was folded from: an opaque token clients\nmust not interpret."
},
"stageEvidence": {
"description": "For a `shell` approval, how each stage was resolved when the decision\nbecame final. Empty for other subject kinds, and it can be empty for\n`shell` too.",
"items": {
"$ref": "#/$defs/ApprovalStageEvidence"
},
"type": "array"
},
"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."
},
"turnId": {
"description": "The turn whose tool call this approval was holding.",
"type": "string"
},
"viewCursor": {
"description": "This event's view cursor: opaque, and strictly increasing within the\nsession.",
"type": "string"
}
},
"required": [
"approvalId",
"decision",
"itemId",
"policyResult",
"resolvedBy",
"sessionId",
"sourceRange",
"stageEvidence",
"turnId",
"viewCursor"
],
"type": "object"
},
"ApprovalStage": {
"description": "One stage of a `shell` approval: a single command from the pipeline or\ncommand list, approved separately from the others.",
"properties": {
"argv": {
"description": "The stage's command words as parsed. When `argvComplete` is `false`,\nthis can be a single unparsed piece of the command.",
"items": {
"type": "string"
},
"type": "array"
},
"argvComplete": {
"description": "`true` when `argv` is the stage's complete command, known before it\nruns; `false` when part of it cannot be resolved ahead of time (for\nexample a command substitution). A stage with `false` never has a\n`suggestedPrefix`.",
"type": "boolean"
},
"position": {
"description": "This stage's 1-based position in the command; it equals\n`requirementId.sourceIndex + 1`.",
"type": "integer"
},
"requirementId": {
"$ref": "#/$defs/ApprovalRequirementRef",
"description": "This stage's requirement id. When it equals the approval's\n`currentRequirementId`, send it as `requirementId` in `approval/decide`."
},
"resolution": {
"$ref": "#/$defs/ApprovalStageResolution",
"description": "Whether this stage still needs a decision or, if not, how it was\nsatisfied."
},
"suggestedPrefix": {
"$ref": "#/$defs/ApprovalSuggestedPrefix",
"description": "A command prefix the host suggests always allowing in this workspace,\npresent only when one can be taken from a fully parsed stage.\n`availableChoices` shows whether that grant is offered."
},
"totalStages": {
"description": "The total number of stages in the command.",
"type": "integer"
}
},
"required": [
"argv",
"argvComplete",
"position",
"requirementId",
"resolution",
"totalStages"
],
"type": "object"
},
"ApprovalStageEvidence": {
"description": "How one stage of a `shell` approval was resolved when the decision became\nfinal.",
"properties": {
"argv": {
"description": "The stage's command words as parsed.",
"items": {
"type": "string"
},
"type": "array"
},
"position": {
"description": "The stage's 1-based position in the command.",
"type": "integer"
},
"requirementId": {
"$ref": "#/$defs/ApprovalRequirementRef",
"description": "The stage's requirement id."
},
"resolution": {
"$ref": "#/$defs/ApprovalStageResolution",
"description": "How the stage was resolved at the final decision."
},
"totalStages": {
"description": "The total number of stages in the command.",
"type": "integer"
}
},
"required": [
"argv",
"position",
"requirementId",
"resolution",
"totalStages"
],
"type": "object"
},
"ApprovalStageResolution": {
"description": "Whether a shell stage still needs a decision, or how it was satisfied.\nSatisfied stages are included so a client can show progress.",
"properties": {
"argvPrefix": {
"description": "The command prefix saved as an always-allow rule when this stage was\napproved. Present only when `kind` is `policyAmendment`.",
"items": {
"type": "string"
},
"type": "array"
},
"diagnostic": {
"description": "Free-form text naming the rule or mode that allowed the stage, for\ndisplay or troubleshooting. Present only when `kind` is `policyAllow`.",
"type": "string"
},
"kind": {
"description": "One of `unresolved`, `knownSafe`, `policyAllow`, `allowOnce` or\n`policyAmendment`. The set is open, so newer hosts may add values.",
"type": "string"
}
},
"required": [
"kind"
],
"type": "object"
},
"ApprovalSubagentOrigin": {
"description": "Child (native subagent) provenance for an approval projected onto the\nPARENT session's approval plane (#36182 / ADR 36182): identifies the\noriginating child run/agent so a client can attribute the prompt. Omitted\n(`skip_serializing_if`) on the parent's own approvals, so pre-existing\nparent frames stay byte-identical.",
"properties": {
"childRunId": {
"description": "The child run that parked on this approval.",
"type": "string"
},
"childSessionId": {
"description": "The child session stream id whose records carry this approval.",
"type": "string"
},
"subagentId": {
"description": "The originating child's subagent id, from the parent session's\ndurable subagent control records.",
"type": "string"
}
},
"required": [
"childRunId",
"childSessionId",
"subagentId"
],
"type": "object"
},
"ApprovalSubject": {
"description": "Open approval subject union. Unknown kinds are rendered generically and\nnever auto-approved by clients (tdd SS5.2).",
"properties": {
"access": {
"description": "The access asked for: `read` or `write` for `fileAccess`, `control` for\n`process`. Absent for other kinds.",
"type": "string"
},
"command": {
"description": "The full raw shell command. Present when `kind` is `shell`.",
"type": "string"
},
"holder": {
"$ref": "#/$defs/ComputerUseLockHolder",
"description": "The session that holds the Computer Use lock now, by label and times\nonly. Present when `kind` is `computerUseTakeover` (tdd SS5.2.8)."
},
"host": {
"description": "The network host the tool wants to reach. Present when `kind` is\n`network`.",
"type": "string"
},
"kind": {
"description": "Open discriminator: `shell | fileAccess | network | unixSocket | process | tool | computerUseTakeover`.",
"type": "string"
},
"origin": {
"$ref": "#/$defs/ApprovalOrigin",
"description": "What triggered the action (a shell command or a URL), for display only\nand untrusted. It is not sent on `shell` subjects, and policy rules\nnever match on it."
},
"path": {
"description": "For `fileAccess`, the path the tool asked to access, normalized by the\nhost (workspace-relative inside the workspace); for\n`unixSocket`, the exact resolved socket path, sent unescaped, so escape\nit before display.",
"type": "string"
},
"port": {
"description": "The network port, present only on `network` subjects that name one. A\nsession grant made from a subject without a port covers every port.",
"type": "integer"
},
"protocol": {
"description": "The network protocol, for example `https`. Present only on `network`\nsubjects that name one.",
"type": "string"
},
"stages": {
"description": "The shell command split into stages that are approved separately (the\ncommands of a pipeline or command list), in order. Present on `shell`\nsubjects; it may be empty.",
"items": {
"$ref": "#/$defs/ApprovalStage"
},
"type": "array"
},
"target": {
"description": "Display text naming the process the tool wants to control. Present when\n`kind` is `process`.",
"type": "string"
},
"toolName": {
"description": "The tool asking for the action. Present for every kind except `shell`.",
"type": "string"
},
"workspaceRoot": {
"description": "The canonical workspace root the shell command runs in, present on\n`shell` subjects when the host knows it. Saved command-prefix rules\napply only within this root.",
"type": "string"
}
},
"required": [
"kind"
],
"type": "object"
},
"ApprovalSuggestedPrefix": {
"description": "A suggested always-allow rule for a shell stage: commands starting with\n`argvPrefix` would run in this workspace without asking.",
"properties": {
"argvPrefix": {
"description": "The leading command words the rule would allow, for example `[\"cargo\",\n\"test\"]`.",
"items": {
"type": "string"
},
"type": "array"
},
"label": {
"description": "A human-readable label for the suggestion, ready to show as is.",
"type": "string"
}
},
"required": [
"argvPrefix",
"label"
],
"type": "object"
},
"ApprovalUpdatedParams": {
"description": "`approval/updated` params: the refreshed pending view plus one change.",
"properties": {
"approvalId": {
"description": "The approval that changed.",
"type": "string"
},
"availableChoices": {
"description": "The refreshed choices for the current requirement.",
"items": {
"$ref": "#/$defs/ApprovalChoice"
},
"type": "array"
},
"change": {
"$ref": "#/$defs/ApprovalChange",
"description": "What changed; `change.kind` names the kind of change."
},
"currentRequirementId": {
"$ref": "#/$defs/ApprovalRequirementRef",
"description": "The requirement the next decision must target after this change; send it\nas `requirementId` in `approval/decide`."
},
"sessionId": {
"description": "The owning 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": "The approval's subject, with `stages` refreshed for this change."
},
"viewCursor": {
"description": "This event's view cursor: opaque, and strictly increasing within the\nsession.",
"type": "string"
}
},
"required": [
"approvalId",
"availableChoices",
"change",
"currentRequirementId",
"sessionId",
"sourceRange",
"subject",
"viewCursor"
],
"type": "object"
},
"AttentionFlag": {
"description": "One attention flag (tdd SS2.4, ADR 31983 D3): a pending server-initiated\nrequest class parked on the session. Open on the wire — clients MUST\nignore unknown values; future attention kinds are additive.",
"enum": [
"approvalPending",
"inputPending"
],
"type": "string",
"x-msp-openness": "open"
},
"BackgroundInitiator": {
"description": "Who durably backgrounded a task (tdd SS4.5.5,\n`TaskBackgroundedInitiator`). Open — runtime vocabulary.",
"enum": [
"user",
"timeout"
],
"type": "string",
"x-msp-openness": "open"
},
"BackgroundTarget": {
"description": "One call's live background-target record (tdd SS4.5.5; ADR\n63254-background-target-on-tool-call D2): exactly the runtime\nsnapshot's four facts, no new nouns.",
"properties": {
"backgroundRequested": {
"description": "Whether the background was already requested for this call.",
"type": "boolean"
},
"foregroundWaitActive": {
"description": "Whether the call sits in its foreground wait right now.",
"type": "boolean"
},
"manualReleaseAdmissible": {
"description": "Point-in-time Ctrl+B chooser hint; the runtime re-checks\nadmission on the action.",
"type": "boolean"
},
"toolCallId": {
"description": "The tool call this record describes (the provider call id).",
"type": "string"
}
},
"required": [
"backgroundRequested",
"foregroundWaitActive",
"manualReleaseAdmissible",
"toolCallId"
],
"type": "object"
},
"BackgroundTerminalCompletion": {
"description": "`backgroundTerminalCompletion`: the facts the Finished cell\nrenders (ADR 50041 D3/D4, plus the optional exit code from D28 and\nthe optional reason from D29).\nThe fold reads them from the inbox terminal record and the\nbackgrounded call it names; every member is required (empty\noutput serializes as `\"\"`, never absent) except `exit_code` and\n`reason`, each absent when the terminal carries none.",
"properties": {
"command": {
"description": "The title text gate-off shows for the backgrounded command.",
"type": "string"
},
"exitCode": {
"description": "The process exit code from the terminal record's `exit_code: `\nline (ADR 50041 D28); absent when the terminal carries none.\n`i32`, the gate-off frozen-header twin's width\n(`BackgroundTerminalTailTerminal.exit_code`). Old clients\nignore the unknown member (tdd evolution rule).",
"type": "integer"
},
"output": {
"description": "The completion text; empty when the terminal carries none.",
"type": "string"
},
"outputTruncated": {
"description": "True when `output` is a prefix of the terminal text.",
"type": "boolean"
},
"reason": {
"description": "The terminal's reason from the terminal record's `reason: `\nline, trimmed like gate-off's parse (ADR 50041 D29); absent when\nthe terminal carries none or an empty one. Old clients ignore\nthe unknown member (tdd evolution rule).",
"type": "string"
},
"terminalStatus": {
"description": "One of `completed`, `failed`, `cancelled`, `timedOut`,\n`rejected` (the ItemStatus wire vocabulary, tdd SS4.4.1).",
"type": "string"
},
"toolCallId": {
"description": "The backgrounded call's call id: the live/history correlation\nkey behind the skip-when-minted rule (ADR 50041 D6).",
"type": "string"
}
},
"required": [
"command",
"output",
"outputTruncated",
"terminalStatus",
"toolCallId"
],
"type": "object"
},
"BlockedPrompt": {
"description": "The cold recall seed on `session/resume` and `session/read` results\n(ADR 50074 D2): at most one, the latest blocked Main prompt — exactly\nthe host's mirror of `prompt_recovery::replay::ReplayInput`'s choice.",
"properties": {
"text": {
"description": "The exact submitted prompt, verbatim — no truncation, no\nnormalization; recall fidelity requires exactness.",
"type": "string"
}
},
"required": [
"text"
],
"type": "object"
},
"BodyCompletionCorrelation": {
"description": "Whether the origin call join held at delivery.",
"enum": [
"resolved",
"unresolved"
],
"type": "string",
"x-msp-openness": "open"
},
"BodyCompletionMembers": {
"description": "`bodyCompletion`: the facts one receipt row renders (ADR 87062\nD2). The fold reads them from the inbox terminal record and the\nbackgrounded call it names. `status`, `result_summary`, and\n`correlation` are required; `origin_call_id` is absent exactly\nwhen the join is unresolved.",
"properties": {
"correlation": {
"$ref": "#/$defs/BodyCompletionCorrelation",
"description": "Whether the origin call join held at delivery."
},
"originCallId": {
"description": "The originating call's provider call id, opaque — the join\nkey back to the original row. Absent when the join is\nunresolved (compaction).",
"type": "string"
},
"receipt": {
"description": "True for the Manual semantic receipt (`◆`); false for the\nordinary completion row.",
"type": "boolean"
},
"resultSummary": {
"description": "Bounded transcript-visible result text; empty when the\nterminal carries none. Full bytes stay behind outputRef.",
"type": "string"
},
"status": {
"description": "One fixed wire word per Task terminal (`completed`,\n`failed`, `cancelled`, `timedOut`, `rejected`) — never\ndisplay text; gate-off display words derive client-side.",
"type": "string"
}
},
"required": [
"correlation",
"receipt",
"resultSummary",
"status"
],
"type": "object"
},
"BranchState": {
"description": "The latest branch observation in the snapshot (tdd SS4.6.4, SS4.9.1).",
"properties": {
"branch": {
"description": "The observed branch; `null` on a detached-HEAD observation.",
"type": [
"string",
"null"
]
},
"vcs": {
"$ref": "#/$defs/Vcs",
"description": "The detected version-control system; absent when none was detected."
},
"workspaceRoot": {
"description": "The observed workspace root.",
"type": "string"
}
},
"required": [
"branch",
"workspaceRoot"
],
"type": "object"
},
"CapabilityName": {
"description": "A grantable capability name. Open: the experimental-only `rawLog` entry\njoins the stable domain as an additive open-enum extension when it graduates\n— closed would make that a retype.",
"enum": [
"userShell",
"sessionMcp",
"sessionListStream",
"feedback",
"computerUseSetup",
"computerUseHostSetup",
"sessionRename"
],
"type": "string",
"x-msp-openness": "open"
},
"CheckpointBoundary": {
"description": "A served checkpoint-prune boundary (spec 13929 amendment\nFR-50042-1; ADR 50042 D3): `through_item_id` names the last\nfirst-opened item that opened strictly before the boundary\ncheckpoint event.",
"properties": {
"throughItemId": {
"description": "The last pre-boundary item's id, in served (first-opened) order.",
"type": "string"
}
},
"required": [
"throughItemId"
],
"type": "object"
},
"ClientCapabilities": {
"description": "The client's requested capability posture (SS1.4.1). Every member\ndefaults; an absent `capabilities` object means all defaults.",
"properties": {
"experimentalApi": {
"description": "Opt into experimental methods, fields, and variants (default `false`).",
"type": "boolean"
},
"optOutNotificationMethods": {
"description": "Exact notification method names the client declines; no wildcards;\nunknown names accepted and ignored; the protected set (SS1.7) cannot\nbe opted out.",
"items": {
"type": "string"
},
"type": "array"
},
"requestedCapabilities": {
"description": "Names from the capability registry. Unknown entries are not an error\nand simply do not appear in `grantedCapabilities` — which is why this\nis a list of free strings rather than of registry names.",
"items": {
"type": "string"
},
"type": "array"
},
"userInputDialogs": {
"description": "Whether this client can render a `userInput/request` dialog and answer\nit (SS5.10). **Absent means capable** (D-047): a client that predates\nthe member keeps today's contract, so no existing client changes its\nhandshake. `false` makes the host withhold `userInput/request` toward\nthis client — the D-027 additive-optional-field + withheld-method\nconvention.\n\nDeliberately NOT a `requestedCapabilities` name: that registry records\noperations a host GRANTS (SS1.4.4), and whether a client can draw a\ndialog is a fact about the client, never a privilege the host hands\nout.",
"type": "boolean"
}
},
"type": "object"
},
"ClientInfo": {
"description": "Client identification inside `initialize` params (SS1.4.1). Diagnostics\nand telemetry attribution only; never an authority claim (SS1.10).",
"properties": {
"name": {
"description": "Machine identifier, `[a-z0-9_]+` (SS1.4.1).",
"pattern": "^[a-z0-9_]+$",
"type": "string"
},
"title": {
"description": "Human display name.",
"type": "string"
},
"version": {
"description": "Client version string.",
"type": "string"
}
},
"required": [
"name",
"version"
],
"type": "object"
},
"CodeModeLanguage": {
"description": "The language a Code Mode cell ran in (ADR 42727 D2). Open: values are\nlowercase VS Code language identifiers, and only `javascript` (the V8\nengine) is minted today.",
"enum": [
"javascript"
],
"type": "string",
"x-msp-openness": "open"
},
"CodeModeOutputSpan": {
"description": "One public-output span inside the item's `visibleOutput` (ADR 42727 D3).\n\nOffsets index the UTF-8 encoding of the **decoded** `visibleOutput`\nstring, never the JSON-escaped wire text; both ends fall on code-point\nboundaries; named and measured like `item/readOutput`'s byte range.",
"properties": {
"lengthBytes": {
"description": "Length of the span, in bytes.",
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"offsetBytes": {
"description": "Start of the span, in bytes.",
"maximum": 9007199254740991,
"minimum": 0,
"type": "integer"
},
"stream": {
"$ref": "#/$defs/CodeModeOutputStream",
"description": "What the bytes are."
}
},
"required": [
"lengthBytes",
"offsetBytes",
"stream"
],
"type": "object"
},
"CodeModeOutputStream": {
"description": "What a Code Mode output span's bytes are (ADR 42727 D3). Open: each\nengine mints its own values.",
"enum": [
"transcript"
],
"type": "string",
"x-msp-openness": "open"
},
"CodeModeReceipt": {
"description": "Code Mode's `details` payload (ADR 42727 D2/D3).\n\nEvery member is absent when it does not apply, never `null`; an empty\n`outputSpans` list is never served.",
"properties": {
"cellItemId": {
"description": "`wait` only, when the producer resolved it: the `itemId` of the\n`execute` item that started the cell.",
"type": "string"
},
"language": {
"$ref": "#/$defs/CodeModeLanguage",
"description": "`execute`, and `wait` when the producer resolved the originating\nexecute: the language the cell ran in."
},
"outputSpans": {
"description": "The public cell-output spans, ascending and non-overlapping; absent\nwhen there is no cell body or a hook rewrote the served body.",
"items": {
"$ref": "#/$defs/CodeModeOutputSpan"
},
"type": "array"
},
"sourceArg": {
"description": "`execute` only: the top-level key of the item's `args` object whose\nvalue is the cell source. A pointer, never source bytes.",
"type": "string"
}
},
"type": "object"
},
"CommandAcceptedResult": {
"description": "The uniform SS3.1.2 command acknowledgement: admission only, never an\noutcome. `session/compact` alone may answer `\"noop\"`; every other command\nanswers `\"accepted\"`.",
"properties": {
"commandId": {
"description": "Echo of the client-minted UUIDv7 `commandId` (SS3.1.1).",
"type": "string"
},
"status": {
"$ref": "#/$defs/CommandAckStatus",
"description": "`\"accepted\"` for every admitted command (SS3.1.2; closed vocabulary)."
}
},
"required": [
"commandId",
"status"
],
"type": "object"
},
"CommandAckStatus": {
"description": "The ack-status vocabulary: `\"accepted\"` for every admitted command;\n`session/compact` alone may answer `\"noop\"`. Closed: the protocol defines\nexactly these two values, so SDK clients get a discriminated type and\nvalidation catches a wrong status — and a client that received a third value\nwould have been told nothing it can act on, unlike [`TurnStartDisposition`],\nwhere \"acked, not otherwise classified\" is a usable reading.",
"enum": [
"accepted",
"noop"
],
"type": "string",
"x-msp-openness": "closed"
},
"CommandStatus": {
"description": "The SS3.1.2 ack `status`: `accepted` for every admitted command.\n`session/compact` is the one method that may additionally answer `noop`\n([`crate::method::runtime::CompactStatus`]); no other command uses another\nstatus (tdd SS3.1.2).",
"enum": [
"accepted"
],
"type": "string",
"x-msp-openness": "open"
},
"CompactStatus": {
"description": "`session/compact`'s ack status (tdd SS3.7): the one method that may answer\n`noop` in addition to the SS3.1.2 `accepted`. A noop is a success, not an\nerror, and it is durably settled like any other outcome.",
"enum": [
"accepted",
"noop"
],
"type": "string",
"x-msp-openness": "open"
},
"CompactionOutcome": {
"description": "Compaction outcome (tdd SS4.5.10, the SS3.7 vocabulary). Open.",
"enum": [
"compacted",
"noop",
"failed",
"cancelled"
],
"type": "string",
"x-msp-openness": "open"
},
"CompactionTrigger": {
"description": "What initiated a compaction (tdd SS4.5.10). Open.",
"enum": [
"manual",
"auto"
],
"type": "string",
"x-msp-openness": "open"
},
"ComputerUseApp": {
"description": "One row of the Settings apps list.",
"properties": {
"bundleId": {
"description": "The app's bundle ID: the stored key.",
"type": "string"
},
"choice": {
"$ref": "#/$defs/ComputerUseAppChoice",
"description": "The choice as it applies: a block wins over a grant."
},
"lastAskedAt": {
"description": "When Computer Use last showed an approval card for the app, RFC3339\nUTC; absent when it never has.",
"type": "string"
},
"locked": {
"description": "Settings can't change this row; its choice is `blocked`. Omitted\nmeans false.",
"type": "boolean"
},
"lockedBy": {
"$ref": "#/$defs/ComputerUseAppLock",
"description": "Why the row is locked, when it is."
},
"name": {
"description": "The name the approval card shows for it, else the name stored with\nits grant or its last card; absent when there is none.",
"type": "string"
}
},
"required": [
"bundleId",
"choice"
],
"type": "object"
},
"ComputerUseAppChoice": {
"description": "A per-app choice. **Open**, like `ComputerUseChoice`.",
"enum": [
"ask",
"alwaysAllow",
"blocked"
],
"type": "string",
"x-msp-openness": "open"
},
"ComputerUseAppLock": {
"description": "Why Settings can't change a row. **Open**.",
"enum": [
"builtIn",
"file"
],
"type": "string",
"x-msp-openness": "open"
},
"ComputerUseAppPatch": {
"description": "One per-app choice to set in `computerUseSettings/update`.",
"properties": {
"bundleId": {
"description": "The app's bundle ID.",
"type": "string"
},
"choice": {
"$ref": "#/$defs/ComputerUseAppChoice",
"description": "`ask` removes the app's grant and the user's block; `alwaysAllow`\nsaves a grant and removes the user's block; `blocked` adds the\nuser's block and removes the grant."
}
},
"required": [
"bundleId",
"choice"
],
"type": "object"
},
"ComputerUseBlockedApp": {
"description": "One row of the Settings blocked-apps list.",
"properties": {
"bundleId": {
"description": "The app's bundle ID, or the family prefix when `prefix` is true.",
"type": "string"
},
"locked": {
"description": "A built-in block, which Settings cannot remove (ADR 630 D18.8).",
"type": "boolean"
},
"prefix": {
"description": "A built-in family row: it blocks every bundle ID that starts with\n`bundleId`. Omitted means false; only locked rows are prefixes.",
"type": "boolean"
}
},
"required": [
"bundleId",
"locked"
],
"type": "object"
},
"ComputerUseChoice": {
"description": "A capability dropdown's value (ADR 630 D18.4). **Open**: the read result\ncarries it, so an older client tolerates a value it does not know.",
"enum": [
"ask",
"alwaysAllow"
],
"type": "string",
"x-msp-openness": "open"
},
"ComputerUseInstalledApp": {
"description": "One installed or running app, for Settings' app picker.",
"properties": {
"bundleId": {
"description": "The app's bundle ID.",
"type": "string"
},
"name": {
"description": "The name the approval card shows for it.",
"type": "string"
}
},
"required": [
"bundleId",
"name"
],
"type": "object"
},
"ComputerUseLockHolder": {
"description": "The Computer Use lock's holder as a `computerUseTakeover` approval shows\nit: never its app, window, target or current action (ADR 73131 D2).",
"properties": {
"acquiredAt": {
"description": "When the holder took the lock (RFC 3339).",
"type": "string"
},
"lastActivityAt": {
"description": "When the holder last acted under the lock (RFC 3339).",
"type": "string"
},
"sessionLabel": {
"description": "The holding session's label.",
"type": "string"
}
},
"required": [
"acquiredAt",
"lastActivityAt",
"sessionLabel"
],
"type": "object"
},
"ComputerUsePermission": {
"description": "One macOS permission as setup last saw it. **Open**, like the phase.",
"enum": [
"granted",
"missing",
"unknown"
],
"type": "string",
"x-msp-openness": "open"
},
"ComputerUseSettings": {
"description": "`computerUseSettings/read` result, also answered by\n`computerUseSettings/update`.",
"properties": {
"apps": {
"description": "The apps list: apps Computer Use has asked about, most recent first;\nthen the other saved grants, then the user's other blocks; then the\nlocked rows. Each app once. A host that serves the list always\nanswers it, so its absence means an older host.",
"items": {
"$ref": "#/$defs/ComputerUseApp"
},
"type": "array"
},
"blockedApps": {
"description": "The user's blocks in the order they were added, then the built-in\nblocks when `showBuiltIns` asked for them.",
"items": {
"$ref": "#/$defs/ComputerUseBlockedApp"
},
"type": "array"
},
"computerControl": {
"$ref": "#/$defs/ComputerUseChoice",
"description": "The computer-control dropdown, as it applies: `ask` while the stored\nblocked-apps list can't be read (ADR 630 D18.4)."
},
"installedApps": {
"description": "The installed and running apps, sorted by name, when the read asked\nfor `installed`.",
"items": {
"$ref": "#/$defs/ComputerUseInstalledApp"
},
"type": "array"
},
"screenshots": {
"$ref": "#/$defs/ComputerUseChoice",
"description": "The screenshots dropdown, under the same rule."
}
},
"required": [
"blockedApps",
"computerControl",
"screenshots"
],
"type": "object"
},
"ComputerUseSettingsReadParams": {
"description": "`computerUseSettings/read` params.",
"properties": {
"installed": {
"description": "Also answer `installedApps`, for an app picker. Omitted means false.",
"type": "boolean"
},
"showBuiltIns": {
"description": "Also list the built-in blocks as locked rows (the D18.8 toggle).\nOmitted means false.",
"type": "boolean"
}
},
"type": "object"
},
"ComputerUseSettingsUpdateParams": {
"description": "`computerUseSettings/update` params: a patch. Omitted members are left\nalone; the whole patch applies or none of it does.",
"properties": {
"apps": {
"description": "Per-app choices to set. A locked app is refused; so is a bundle ID\nnamed twice, or also in `blockApps` or `unblockApps`.",
"items": {
"$ref": "#/$defs/ComputerUseAppPatch"
},
"type": "array"
},
"blockApps": {
"description": "Bundle IDs to add to the user's blocked apps. A built-in block is\nrefused: it is already blocked.",
"items": {
"type": "string"
},
"type": "array"
},
"computerControl": {
"$ref": "#/$defs/ComputerUseChoice",
"description": "The new computer-control dropdown value."
},
"screenshots": {
"$ref": "#/$defs/ComputerUseChoice",
"description": "The new screenshots dropdown value."
},
"unblockApps": {
"description": "Bundle IDs to remove from the user's blocked apps. Only the user's own\nentries can be removed; a built-in block stays.",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"ComputerUseSetupChanged": {
"description": "`computerUseSetup/changed` params.",
"properties": {
"sessionId": {
"description": "The session whose setup state changed; absent for the host's own\nsetup, which only `computerUseHostSetup` holders receive.",
"type": "string"
},
"state": {
"$ref": "#/$defs/ComputerUseSetupState",
"description": "Its new state."
}
},
"required": [
"state"
],
"type": "object"
},
"ComputerUseSetupPhase": {
"description": "Where the session's setup stands: `cua_setup`'s state codes, camelCase.\n**Open**: a result vocabulary, so an older client tolerates a new state.",
"enum": [
"dormant",
"inProgress",
"restartRequired",
"readyForTarget",
"stopped"
],
"type": "string",
"x-msp-openness": "open"
},
"ComputerUseSetupReadParams": {
"description": "`computerUseSetup/read` params.",
"properties": {
"sessionId": {
"description": "The session whose setup to read. Omitted reads the host's own setup,\nwhich needs the `computerUseHostSetup` grant.",
"type": "string"
}
},
"type": "object"
},
"ComputerUseSetupStartParams": {
"description": "`computerUseSetup/start` params: a human command.",
"properties": {
"commandId": {
"description": "The client's id for this command.",
"type": "string"
},
"sessionId": {
"description": "The session whose setup to start. Omitted starts the host's own\nsetup, which needs the `computerUseHostSetup` grant.",
"type": "string"
}
},
"required": [
"commandId"
],
"type": "object"
},
"ComputerUseSetupState": {
"description": "The session's setup state: the result of both methods and the\n`computerUseSetup/changed` payload's `state`.",
"properties": {
"accessibility": {
"$ref": "#/$defs/ComputerUsePermission",
"description": "Accessibility."
},
"inputMonitoring": {
"$ref": "#/$defs/ComputerUsePermission",
"description": "Input Monitoring: computer use is ready without it; some actions need it."
},
"message": {
"description": "The sentence `cua_setup` gives the user for this answer.",
"type": "string"
},
"refused": {
"description": "The `cua_setup` refusal code when the call was refused, verbatim.",
"type": "string"
},
"screenRecording": {
"$ref": "#/$defs/ComputerUsePermission",
"description": "Screen Recording."
},
"setup": {
"$ref": "#/$defs/ComputerUseSetupPhase",
"description": "Where setup stands."
}
},
"required": [
"accessibility",
"inputMonitoring",
"screenRecording",
"setup"
],
"type": "object"
},
"ContextPressureLevel": {
"description": "Context pressure level (tdd SS4.6.6): hard threshold first, both\ninclusive `>=`. Open.",
"enum": [
"normal",
"warning",
"blocked"
],
"type": "string",
"x-msp-openness": "open"
},
"ContextUsage": {
"description": "The SS4.9.1 snapshot `contextUsage` block: the latest\n`(windowTokens, usedTokens, pressure)` triple; the snapshot member is\n`null` until the fold's generation chain holds a tracked anchor AND the\ncurrent basis is present (absent is never fabricated).",
"properties": {
"pressure": {
"$ref": "#/$defs/ContextPressureLevel",
"description": "Server-computed pressure level."
},
"usedTokens": {
"description": "Counted-once occupancy at the latest provider-reported fact.",
"type": "integer"
},
"windowTokens": {
"description": "The effective context-window size; absent when the basis has no limit.",
"type": "integer"
}
},
"required": [
"pressure",
"usedTokens"
],
"type": "object"
},
"CronReceipt": {
"description": "Cron's `details` payload (ADR 42728 D2, thirteenth directive).\n\nEvery field a family owns lives here, under the container's one `details`\nkey, rather than flat beside the discriminators. Each is a **bounded machine\nfact**: scalars, short identifiers and a small fixed-shape array of those.",
"properties": {
"jobId": {
"description": "Cron `create` and `delete`: the job id. On `delete`'s `missing` arm this\nis the caller's own id echoed back — that arm has no server-side subject\nto name.\n\nOn the `created` + `cancelled` pairing, this field also conveys the\nhidden fact: a job row was committed and will fire.",
"type": "string"
},
"jobs": {
"description": "Cron `list`: the served jobs in server order, `active` and `firing`\nrows only.",
"items": {
"$ref": "#/$defs/CronReceiptJob"
},
"type": "array"
},
"nextFireAtMs": {
"description": "Cron `create` (`created`, `duplicate`): absolute epoch-milliseconds of\nthe job's next scheduled fire (the existing job's on `duplicate`,\nADR 42728 D2).",
"type": "integer"
}
},
"type": "object"
},
"CronReceiptJob": {
"description": "One row of the Cron `list` receipt's `jobs` array (ADR 42728 D2).\n\nServer order, and **`active` + `firing` rows only**. A small fixed-shape\narray of scalars, which is what keeps it a bounded machine fact.",
"properties": {
"jobId": {
"description": "The job's server-owned id.",
"type": "string"
},
"nextFireAtMs": {
"description": "Absolute epoch-milliseconds of the job's next scheduled fire.",
"type": "integer"
}
},
"required": [
"jobId",
"nextFireAtMs"
],
"type": "object"
},
"CumulativeCost": {
"description": "Server-computed session cost member of [`CumulativeTokenUsage`]\n(tdd SS4.6.5, Amendment #41610 FR-41610-2/3).",
"properties": {
"partial": {
"description": "True when at least one leg lacked price data — clients render\n`(partial)`.",
"type": "boolean"
},
"usd": {
"description": "Estimated USD total, finite and non-negative.",
"type": "number"
}
},
"required": [
"partial",
"usd"
],
"type": "object"
},
"CumulativeTokenUsage": {
"description": "Session running totals of counted-once usage (tdd SS4.6.5).\n\nThe cache splits and server-computed `cost` join the counters. The counters\nstay accumulate-only; `cost` is the documented exception — it may move\neither way on price re-adoption and is labeled estimate. `Copy` was dropped\nfor the `cost` member.",
"properties": {
"cacheReadTokens": {
"description": "Cache-read tokens, session total (FR-41610-1): saturating sum of\nthe per-completion splits; an absent split contributes 0.\nAdditive-optional: absent on the wire reads as 0 and zero totals\nare omitted, so pre-feature bytes decode and re-encode identically.",
"type": "integer"
},
"cacheWriteTokens": {
"description": "Cache-write tokens, session total (FR-41610-1). Additive-optional\nlike the read split.",
"type": "integer"
},
"cost": {
"$ref": "#/$defs/CumulativeCost",
"description": "Server-computed session cost (FR-41610-2): `None` (wire-absent)\nwhen no leg is priced — clients omit the row. Additive-optional:\nabsent reads as unpriced."
},
"outputTokens": {
"description": "Output tokens, session total.",
"type": "integer"
},
"promptTokens": {
"description": "Counted-once prompt tokens, session total.",
"type": "integer"
},
"totalTokens": {
"description": "Counted-once totals, session total.",
"type": "integer"
}
},
"required": [
"outputTokens",
"promptTokens",
"totalTokens"
],
"type": "object"
},
"DamagedRange": {
"description": "`damagedRange`: what one damaged range of the session log cost (ADR\n60914 D1/D2). The reader finds the range in the log bytes; no log record\nis written for it, so every member is derived from the readable records\naround it.",
"properties": {
"lastGoodTurnId": {
"description": "The last finished turn before the first damaged range, when one\nexists: the safe `session/fork` cut (ADR 60914 D1 \"Fork cuts\", D4).",
"type": "string"
},
"missingRecords": {
"description": "Records the log proves missing (session-stream sequence numbers no\nreadable record or unreadable line accounts for).",
"type": "integer"
},
"readableAfterAt": {
"description": "RFC3339 `recordedAt` of the first readable record after the range;\nalways present, since a range is read past only when readable\nrecords follow it (ADR 60914 D1).",
"type": "string"
},
"readableBeforeAt": {
"description": "RFC3339 `recordedAt` of the last readable record before the range;\nabsent when the range starts the log.",
"type": "string"
},
"unreadableLines": {
"description": "Physical log lines in the range that are not a readable record.",
"type": "integer"
}
},
"required": [
"missingRecords",
"readableAfterAt",
"unreadableLines"
],
"type": "object"
},
"DeliveredInput": {
"description": "One input the read session's log delivered to a subagent (tdd\nSS2.5.5, ADR 72596-delivered-inputs-on-read D2): the queue-note\nsummary (never the body) plus the queue and drain record sequences,\nthe order and re-read dedupe keys, plus the join ids clients adopt\nalready-rendered rows by.",
"properties": {
"deliveredSequence": {
"description": "The matching drain record's log sequence: the Delivered row's\nposition key.",
"type": "integer"
},
"sequence": {
"description": "The queued record's log sequence: entry order, and half of the\nsequence-pair join key.",
"type": "integer"
},
"sourceCommandId": {
"description": "The `SubagentInput` record's command id: the key wire-twin rows\njoin by in either order. Absent when the record carries none.",
"type": "string"
},
"sourceRunRecordId": {
"description": "The queue record's run-log id: the record-row join key. Absent\nwhen the host's record carries no mirror metadata (a pre-feature\nhost), which falls back to the command id, then the\nsequence-pair join.",
"type": "string"
},
"subagentId": {
"description": "The subagent the input was delivered to (parent-scope id).",
"type": "string"
},
"summary": {
"description": "The stored queue-note summary (never the body).",
"type": "string"
}
},
"required": [
"deliveredSequence",
"sequence",
"subagentId",
"summary"
],
"type": "object"
},
"EarlierHistory": {
"description": "`earlierHistory`: the boundary checkpoint's transcript tail, served in\nplace of every item that opened in its pruned prefix (ADR 71910 D1/D3).\nNo log record carries it; the host derives it from the checkpoint.",
"properties": {
"messages": {
"description": "The tail entries whose source record is in the pruned prefix, in\ntail order (at most 50, spec 6127 INV-002). May be empty.",
"items": {
"$ref": "#/$defs/EarlierHistoryMessage"
},
"type": "array"
}
},
"required": [
"messages"
],
"type": "object"
},
"EarlierHistoryMessage": {
"description": "One transcript-tail message of an [`EarlierHistory`] item.",
"properties": {
"role": {
"description": "Open string enum: `\"user\"` or `\"assistant\"`, the only roles a host\nserves; a client skips any other value (spec 6127 FM-004).",
"type": "string"
},
"text": {
"description": "The stored tail text verbatim (at most 1,000 characters); clients\napply their own assistant display rules.",
"type": "string"
}
},
"required": [
"role",
"text"
],
"type": "object"
},
"EffectiveApprovalModeState": {
"description": "The effective approval-mode projection (`EffectiveApprovalModeState`,\ntdd SS5.12): the same object `session/setApprovalMode` returns as\n`effectiveMode` and the `Session` object carries as `approvalMode`.",
"properties": {
"lastCommandId": {
"description": "The command that last set it; `null` when no command did.",
"type": [
"string",
"null"
]
},
"mode": {
"$ref": "#/$defs/ApprovalMode",
"description": "The mode in effect."
},
"source": {
"$ref": "#/$defs/ApprovalModeSource",
"description": "How the mode took effect."
}
},
"required": [
"lastCommandId",
"mode",
"source"
],
"type": "object"
},
"EffectiveModel": {
"description": "The latest effective-model fact in the snapshot (tdd SS4.9.1).",
"properties": {
"modelId": {
"description": "The selected model.",
"type": "string"
},
"providerId": {
"description": "The selected provider; `null` when the selection names none.",
"type": [
"string",
"null"
]
},
"source": {
"$ref": "#/$defs/ModelChangeSource",
"description": "What drove the selection."
}
},
"required": [
"modelId",
"providerId",
"source"
],
"type": "object"
},
"ErrorData": {
"description": "The optional `error.data` object (SS1.6). All members additive-optional;\n`kind` is always present when `data` is.",
"properties": {
"alignedNextOffset": {
"description": "The next provable UTF-8 boundary on a misaligned text-media\n`item/readOutput` read (`-32602` `invalidParams`, FR-016b/D-17214-2):\nabsent when no boundary is provable from the stored bytes ahead.",
"type": "integer"
},
"anchor": {
"description": "The rejected anchor value on `notFound`/`missingAnchor` and the\n`-32042` boundary arms (SS4.7.3, SS4.11); on `-32042` it is served\nas an explicit `null` when the request named no concrete anchor\n(spec 208 FM-005).",
"type": [
"string",
"null"
]
},
"approvalId": {
"description": "Approval id on approval errors.",
"type": "string"
},
"availability": {
"description": "The stored output's availability on `outputUnavailable` — the durable\n`ToolOutputAvailability` value, read-time-derived when the durable\nrecord still says `available` (SS4.5.5; spec 208 FM-008).",
"type": "string"
},
"capability": {
"$ref": "#/$defs/CapabilityName",
"description": "The missing capability, on `capabilityRequired` errors. Typed on the\ngrantable registry, so the experimental-only `rawLog` joins the stable\ndomain as an additive open-enum extension when it graduates."
},
"capacity": {
"description": "The configured command-admission bound, on `backpressured` errors.",
"type": "integer"
},
"choiceId": {
"description": "Rejected server-minted choice on `approvalChoiceInvalid`.",
"type": "string"
},
"commandId": {
"description": "The rejected command's identifier, on `commandRejected` errors. The\nratified v1 contract pairs it with `reason`\n(specs/13929-msp-activation/tdd.md SS3.6 admission-failure table and\nits `-32030` example), so a client can settle the exact command it\nsent without parsing the message string.",
"type": "string"
},
"currentRequirementId": {
"$ref": "#/$defs/ApprovalRequirementRef",
"description": "Current stage token on `approvalRequirementStale`."
},
"descriptor": {
"description": "On `experimentalRequired` errors, the name of the experimental method,\nfield or variant the request used, for example\n`turn/start.providerRequestOptions`.",
"type": "string"
},
"details": {
"description": "Free-form additive detail.",
"properties": {},
"type": "object"
},
"earliestCursor": {
"description": "The oldest servable view position on `viewTruncated` (`-32040`,\nSS4.11); served as an explicit `null` when nothing before the head\nis servable — the null is present on the wire, never a dropped key\n(spec 208 FM-005 / Scenario 6.2).",
"type": [
"string",
"null"
]
},
"itemId": {
"description": "The item whose stored output was requested, on the `item/readOutput`\narms (`notFound`, `outputUnavailable`, and the misaligned-offset\n`invalidParams`).",
"type": "string"
},
"kind": {
"$ref": "#/$defs/ErrorKind",
"description": "The stable camelCase category clients branch on."
},
"lastTurnId": {
"description": "Rejected inclusive fork boundary on `forkBoundaryInvalid`.",
"type": "string"
},
"latestBoundaryCursor": {
"description": "The latest installed boundary's view cursor on the `-32042` arms —\nalways present in the `-32042` JSON and explicitly `null` when no\nboundary exists (SS4.11, FM-004).",
"type": [
"string",
"null"
]
},
"limitBytes": {
"description": "The exceeded byte limit, on `inputTooLarge` errors.",
"type": "integer"
},
"marketplace": {
"description": "The store on `pluginNotFound` (`-32035`, SS3.29.1).",
"type": "string"
},
"name": {
"description": "The rejected marketplace name on `marketplaceNotFound` (`-32034`,\nSS3.29.7) and `marketplaceAlreadyExists` (`-32036`, SS3.29.2); the\nrejected plugin name on `pluginNotFound` (`-32035`, SS3.29.1).",
"type": "string"
},
"outputRef": {
"description": "The requested `outputRef.id`, on the same `item/readOutput` arms.",
"type": "string"
},
"paths": {
"description": "Candidate retained paths on `sessionAmbiguous`.",
"items": {
"type": "string"
},
"type": "array"
},
"reason": {
"description": "Failure detail vocabulary (e.g. `\"missingAnchor\"` on `notFound` for a\nmissing view-cursor anchor).",
"type": "string"
},
"recoveryObservation": {
"$ref": "#/$defs/RecoveryObservation",
"description": "The original recovery-dependent construction's coherent observation.\nAn absent or unusable observation establishes no supported recovery."
},
"resolution": {
"$ref": "#/$defs/ApprovalResolutionSummary",
"description": "Winning resolution on `approvalAlreadyResolved`."
},
"retryable": {
"description": "Whether retrying can succeed (e.g. `overloaded`). When present,\noverrides the error table row's `retryable` default for this code.",
"type": "boolean"
},
"seedFallbackReason": {
"description": "Why the branch seed did not use a checkpoint, on the same arms:\none of `no_usable_checkpoint`, `unsupported_checkpoint_shape`,\n`checkpoint_has_model_visible_tail`, `checkpoint_missing_suffix`;\nabsent when the seed used a checkpoint or no fallback was recorded.",
"type": "string"
},
"seedPath": {
"description": "The branch-seed path the host read before rejecting, on\nbranch-validation rejections (`session/fork`, `session/sideChat`:\nthe `forkBoundaryInvalid`, `commandRejected` and `sessionNotFound`\narms; SS2.5.3, SS2.5.7; #51365): one of `runtime_checkpoint_tail`,\n`runtime_full_replay`, `legacy_session_data` — the durable\nbranch-seed vocabulary, so the client cites the real seed decision\ninstead of guessing at a stale binary.",
"type": "string"
},
"selector": {
"description": "The rejected skill selector on `skillNotFound` (`-32032`, SS3.22.4).",
"type": "string"
},
"sessionId": {
"description": "Session identity on errors whose lookup is session-scoped.",
"type": "string"
},
"settlement": {
"$ref": "#/$defs/UserInputSettlementSummary",
"description": "Winning settlement on `userInputAlreadySettled`."
},
"stopRefusal": {
"description": "The stop's refusal kind on a `workflow/cancel` `commandRejected`\nwhose stop was refused or whose settlement read failed (SS3.19, spec\n14410 FR-92884-1): `stale_revision`, `policy_rejected`,\n`actor_authority_mismatch`, `authority_index_conflict`,\n`admission_failed`, `persistence_failed`, `control_not_signalled`,\n`post_marker_not_cancellable`, `control_outcome_uncertain`,\n`adapter_contract_violation`, `transport_lost` or `reply_lost`.",
"type": "string"
},
"uploadId": {
"description": "The rejected upload id on `uploadNotFound` (`-32038`, SS3.33).",
"type": "string"
},
"userInputId": {
"description": "Prompt identity on user-input errors.",
"type": "string"
},
"viewCursor": {
"description": "The blocked view position on `pageEventTooLarge` errors.",
"type": "string"
}
},
"required": [
"kind"
],
"type": "object"
},
"ErrorKind": {
"description": "A stable `error.data.kind` category: camelCase, the value clients branch on.\nOpen: new kinds are added as their methods land, and a new `kind` is\nadditive only because this domain is declared open.",
"enum": [
"parseError",
"invalidRequest",
"notInitialized",
"alreadyInitialized",
"methodNotFound",
"invalidParams",
"experimentalRequired",
"internal",
"pageEventTooLarge",
"outputResultTooLarge",
"overloaded",
"inputTooLarge",
"capabilityRequired",
"notFound",
"interrupted",
"cancelled",
"sessionNotFound",
"sessionInUse",
"sessionAmbiguous",
"forkBoundaryInvalid",
"sessionNotLoaded",
"sessionStreamMismatch",
"commandRejected",
"backpressured",
"skillNotFound",
"computerUseUnavailable",
"marketplaceNotFound",
"pluginNotFound",
"marketplaceAlreadyExists",
"pluginMutationsDisabled",
"uploadNotFound",
"viewTruncated",
"outputUnavailable",
"boundaryPruned",
"boundaryUnusable",
"noBoundary",
"approvalNotFound",
"approvalAlreadyResolved",
"approvalChoiceInvalid",
"approvalRequirementStale",
"approvalReviewerUnavailable",
"userInputNotFound",
"userInputAlreadySettled",
"userInputAnswerInvalid",
"approvalBrokerUnavailable",
"approvalResolving"
],
"type": "string",
"x-msp-openness": "open"
},
"ErrorObject": {
"description": "The `error` member of an error response (SS1.2 §2.4).",
"properties": {
"code": {
"description": "Registry code (Appendix B). Typed as a plain integer on the wire; the\nvalue domain is the registry below (INV-018).",
"type": "integer"
},
"data": {
"$ref": "#/$defs/ErrorData",
"description": "Structured detail; carries `kind` when present."
},
"message": {
"description": "Human-readable message. Never a branch point (SS1.6).",
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"ErrorResponse": {
"description": "An error response frame (SS1.2 §2.4). Exactly one of `result` or `error`\nappears on a response; this type is the `error` half.",
"properties": {
"error": {
"$ref": "#/$defs/ErrorObject",
"description": "The error payload (Appendix B registry)."
},
"id": {
"anyOf": [
{
"$ref": "#/$defs/RequestId"
},
{
"type": "null"
}
],
"description": "Echo of the request id; `null` **only** for an unrecoverable parse\nerror whose offending id could not be recovered (SS1.3). Always\nserialized, so `None` renders as `null` rather than being omitted —\nrequired-but-nullable (see [`require_nullable_id`])."
},
"jsonrpc": {
"$ref": "#/$defs/JsonRpcVersion",
"description": "The literal `\"2.0\"`."
}
},
"required": [
"error",
"id",
"jsonrpc"
],
"type": "object"
},
"ExternalWaitView": {
"description": "The live host-declared external wait as served on a `Session` object\n(`Session.externalWait`): present exactly while a declaration is\nlive for the loaded session, absent otherwise. Absence is never\nfabricated — an unloaded row carries no member.",
"properties": {
"reason": {
"description": "The host's label for what the session waits on. Omitted when\nthe host declared without one.",
"type": "string"
}
},
"type": "object"
},
"FeedbackClassification": {
"description": "`feedback/submit` classification (tdd SS3.25): the four TUI classes in\ncamelCase wire spelling. **Closed**: a client-selected param\nvocabulary (#22785 E2).",
"enum": [
"bug",
"badResult",
"goodResult",
"other"
],
"type": "string",
"x-msp-openness": "closed"
},
"FeedbackSubmitOutcome": {
"description": "`feedback/submit` result `outcome` (tdd SS3.25): how one confirmed\nsubmit resolved, mirroring the TUI `FeedbackSubmitOutcome` taxonomy.\n**Open**: a server-produced result vocabulary (#22785 E2) — an older\nclient reading a newer value it does not know follows the open-enum\ntolerance rule instead of rejecting it.",
"enum": [
"uploaded",
"recorded",
"acceptedWithoutReceipt",
"trackingFailed",
"trackingUncertain",
"dark",
"disabled",
"noCredential",
"authRejected",
"rateLimited",
"failed"
],
"type": "string",
"x-msp-openness": "open"
},
"FeedbackSubmitParams": {
"description": "`feedback/submit` params (tdd SS3.25): mirrors the TUI confirm-time\n`FeedbackRequest`. The call itself is the explicit confirm.",
"properties": {
"attachSessionRecord": {
"description": "Consent to attach the session record; honored only for\n`bug`/`badResult` with `session_id` present. `true` with\n`with_files: false`, with a non-`bug`/`badResult` classification,\nor without `session_id` is `invalidParams` (F4, F8).\nDefaults to `false`.",
"type": "boolean"
},
"classification": {
"$ref": "#/$defs/FeedbackClassification",
"description": "The report class (required)."
},
"clientArtifactsPath": {
"description": "An absolute same-host path to a client-packed bundle, admitted\nonly as a regular file under a size cap.",
"type": "string"
},
"note": {
"description": "The user report text (required; non-empty for `bug`).",
"type": "string"
},
"sessionId": {
"description": "Names the session this call is about when present (F8,\nsuperseding F3): the bundle lands in that session's dir. Names a\nsession this host owns. When absent, the bundle lands in the\nhost-level feedback folder and the `session_id` tag is omitted.",
"type": "string"
},
"withFiles": {
"description": "The files-consent decision (required).",
"type": "boolean"
}
},
"required": [
"classification",
"note",
"withFiles"
],
"type": "object"
},
"FeedbackSubmitResult": {
"description": "`feedback/submit` result (tdd SS3.25): the upload receipt.",
"properties": {
"bundlePath": {
"description": "The host-local absolute path of the always-written local bundle.",
"type": "string"
},
"cause": {
"description": "The failure cause on the `failed`, `acceptedWithoutReceipt`,\n`trackingFailed`, and `trackingUncertain` arms.",
"type": "string"
},
"localTracingNote": {
"description": "The consent-vs-reality local-tracing note, kept for display.",
"type": "string"
},
"outcome": {
"$ref": "#/$defs/FeedbackSubmitOutcome",
"description": "How the submit resolved."
},
"retryAfterMs": {
"description": "The effective retry delay in milliseconds, on `rateLimited`.",
"type": "integer"
},
"sessionNote": {
"description": "The consent-vs-reality session note, kept for display.",
"type": "string"
},
"sessionRecordAttached": {
"description": "Whether the consented session record rode at all.",
"type": "boolean"
},
"sessionRecordTruncated": {
"description": "Whether the consented session record rode shortened to fit.",
"type": "boolean"
},
"taskId": {
"description": "The internal receipt-Task id once that Task succeeds.",
"type": "string"
},
"uploadId": {
"description": "The intake's accept id — always present on the `uploaded` arm,\noptional on `trackingFailed`/`trackingUncertain`; never fabricated\non `recorded`.",
"type": "string"
}
},
"required": [
"bundlePath",
"outcome",
"sessionRecordAttached",
"sessionRecordTruncated"
],
"type": "object"
},
"ForkCutPoint": {
"description": "Where a fork cuts the source history (tdd SS2.5.3). Turn ids are used\ninstead of counts because ids stay stable across compaction and concurrent\nappends while indices do not.",
"properties": {
"lastTurnId": {
"description": "The last completed turn to copy, inclusive. Naming an in-progress or\nunknown turn fails `forkBoundaryInvalid`.",
"type": "string"
}
},
"required": [
"lastTurnId"
],
"type": "object"
},
"ForkProvenance": {
"description": "Fork provenance folded from the durable `session.fork.created` record\n(`ForkProvenance`, tdd SS2.4).",
"properties": {
"commandId": {
"description": "The `commandId` of the `session/fork` that created it.",
"type": "string"
},
"cutCursor": {
"description": "An **opaque provenance string** preserved verbatim from the durable\nrecord. Display-only — not one of the SS6.2 cursor families: clients\nMUST NOT parse it and no method accepts it (tdd SS2.4).",
"type": "string"
},
"cutExplicit": {
"description": "Whether the fork named an explicit cut point.",
"type": "boolean"
},
"isRewind": {
"description": "`true` when validated full provenance records a conversation rewind,\n`false` for a proved ordinary fork (ADR 50280 D8). **Additive-optional**:\nomitted when the serving face holds no full provenance, which means\nunknown, never a guessed ordinary fork; never `null`.",
"type": "boolean"
},
"sessionId": {
"description": "The source session this fork was cut from.",
"type": "string"
}
},
"required": [
"commandId",
"cutCursor",
"cutExplicit",
"sessionId"
],
"type": "object"
},
"Goal": {
"description": "The session goal block (tdd SS4.6.2, mirrors the runtime's goal state,\ncamelCased). `status` and `percentComplete` are carried **verbatim** —\nout-of-contract status strings and >100 percents pass through; display\nclamping is the renderer's job.",
"properties": {
"createdAtMs": {
"description": "Goal creation time, epoch milliseconds, verbatim from the durable row.\nAbsent on blocks whose producer never carried it (tool-result adoptions,\nolder logs); absence must never render as a fabricated zero.",
"type": "integer"
},
"currentWork": {
"description": "Current work description, when present.",
"type": "string"
},
"nextWork": {
"description": "Next work description, when present.",
"type": "string"
},
"objective": {
"description": "The goal objective text.",
"type": "string"
},
"percentComplete": {
"description": "Percent complete, verbatim (>100 passes through).",
"type": "integer"
},
"status": {
"description": "Goal status, verbatim from the durable goal state (free string by\ndesign: out-of-contract values pass through).",
"type": "string"
},
"updatedAtMs": {
"description": "Last goal mutation time, epoch milliseconds, verbatim from the durable\nrow. Same absence rule as `createdAtMs`.",
"type": "integer"
}
},
"required": [
"objective",
"percentComplete",
"status"
],
"type": "object"
},
"GoalClearParams": {
"description": "`goal/clear` params (tdd SS3.18). An `objective` here is an unknown field\nand rejects `-32602 invalidParams` — the bare verbs carry exactly this\npair.",
"properties": {
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"sessionId": {
"description": "The target session.",
"type": "string"
}
},
"required": [
"commandId",
"sessionId"
],
"type": "object"
},
"GoalCommandResult": {
"description": "The shared SS3.18 goal ack, admission-only: all five verbs answer this\none shape (the tdd's \"Shared contract\"), differing only in when `turnId`\nis present.",
"properties": {
"commandId": {
"description": "Echoes the client's id.",
"type": "string"
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "Admission status."
},
"turnId": {
"description": "Present by exactly the four SS3.18 result cases: an idle wake carries\nthe fresh goal turn's id; a busy `set`/`edit`/`resume` carries the\nadmission-time active turn's id (a routing fact, not a delivery\npromise); `pause`/`clear` never carry it; an idle admission whose\nresulting goal is not unfinished parks the notification and carries\nnone. **Additive-optional**: absent means \"no turn named\", never\nfabricated.",
"type": "string"
}
},
"required": [
"commandId",
"status"
],
"type": "object"
},
"GoalEditParams": {
"description": "`goal/edit` params (tdd SS3.18): replace the current goal's objective.\nSame shape as `goal/set`; the verbs differ in their `missing_goal`\nprecondition, not their payload.",
"properties": {
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"objective": {
"description": "The replacement objective; same trim/non-empty rule as `goal/set`.",
"type": "string"
},
"sessionId": {
"description": "The target session.",
"type": "string"
}
},
"required": [
"commandId",
"objective",
"sessionId"
],
"type": "object"
},
"GoalPauseParams": {
"description": "`goal/pause` params (tdd SS3.18); shape as `goal/clear`.",
"properties": {
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"sessionId": {
"description": "The target session.",
"type": "string"
}
},
"required": [
"commandId",
"sessionId"
],
"type": "object"
},
"GoalResumeParams": {
"description": "`goal/resume` params (tdd SS3.18); shape as `goal/clear`.",
"properties": {
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"sessionId": {
"description": "The target session.",
"type": "string"
}
},
"required": [
"commandId",
"sessionId"
],
"type": "object"
},
"GoalSetParams": {
"description": "`goal/set` params (tdd SS3.18): set the session's goal objective.",
"properties": {
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"objective": {
"description": "The objective text; required, non-empty after Unicode-whitespace trim\n(the trimmed text is the payload). Empty-after-trim is\n`-32602 invalidParams` (tdd SS3.18).",
"type": "string"
},
"sessionId": {
"description": "The target session.",
"type": "string"
}
},
"required": [
"commandId",
"objective",
"sessionId"
],
"type": "object"
},
"HeldFor": {
"description": "What holds a tool call before it is admitted to execute (ADR 50063 D6).\nOpen: a client reads an unknown value as held by something it does not\nknow, never as released.",
"enum": [
"approval",
"hook"
],
"type": "string",
"x-msp-openness": "open"
},
"HistoryMode": {
"description": "What history a lifecycle result actually served (tdd SS2.5.2). Open on the\nclient side: report-what-was-served means a client treats an unknown mode\nas \"page it yourself\".",
"enum": [
"anchoredSnapshot",
"inline",
"snapshot",
"none"
],
"type": "string",
"x-msp-openness": "open"
},
"HistoryNoneReason": {
"description": "Why a result served `history.mode: \"none\"` — the server's typed reason for\nserving no history, with one push-only exception: `projectionRebuildFailed`\nrides only a `session/viewHealthChanged` notification; no resume or read\nresult carries it (see its variant doc). Open on the client side: an\nabsent (older server) or unknown (newer server) value decodes\nconservatively as an unknown reason, and `viewCursor` text never\nsubstitutes for it.",
"enum": [
"excluded",
"cursorSuffix",
"historyBudget",
"projectionUnavailable",
"projectionReadLimit",
"projectionRebuildFailed"
],
"type": "string",
"x-msp-openness": "open"
},
"HistoryPreference": {
"description": "The `history` request preference of `session/resume` (tdd SS2.5.2). The\nforced values downgrade `anchored` → `inline` → `snapshot` → `none`; under\n`auto` the full rung order is anchoredSnapshot → anchored pending cut →\ninline → snapshot → pending cut → elided snapshot → elided pending cut →\nnone, a pending cut being the snapshot with its `monitorInbox` cut to the\nentries still awaiting delivery.",
"enum": [
"auto",
"inline",
"snapshot",
"anchored"
],
"type": "string",
"x-msp-openness": "closed"
},
"HookCatalogEntry": {
"description": "One installed handler (tdd SS3.26.1).",
"properties": {
"enabled": {
"description": "The row's own switch (tdd SS3.26.1). Non-enabled rows are\nincluded as `false`, never dropped.",
"type": "boolean"
},
"event": {
"$ref": "#/$defs/HookEventName",
"description": "The event the handler runs on (ADR 33398 D7 item 2)."
},
"handlerKind": {
"$ref": "#/$defs/HookHandlerKind",
"description": "Where the handler comes from (ADR 33398 D7 item 1)."
},
"key": {
"description": "The handler key (config key or plugin hook id).",
"type": "string"
}
},
"required": [
"enabled",
"event",
"handlerKind",
"key"
],
"type": "object"
},
"HookEventName": {
"description": "Hook event names (tdd SS3.26.1, ADR 33398 D7 item 2): the\nlowercase-first-letter spelling of every `HookEventKind::all()`\nvariant. Open (server-produced result vocabulary, the #22785\nenum-openness rule): a future event value is additive.",
"enum": [
"sessionStart",
"userPromptSubmit",
"preToolUse",
"permissionRequest",
"postToolUse",
"preLLMCall",
"postLLMCall",
"preCompact",
"postCompact",
"subagentStart",
"subagentStop",
"stop",
"sessionEnd",
"notification",
"postToolUseFailure",
"stopFailure",
"postToolBatch",
"interrupt",
"sessionFork",
"toolUseStart"
],
"type": "string",
"x-msp-openness": "open"
},
"HookHandlerKind": {
"description": "A hook row's origin (tdd SS3.26.1, ADR 33398 D7 item 1): the config\n`HookSourceKind` values plus plugin-contributed. Open (server-produced\nresult vocabulary, the #22785 enum-openness rule): a future origin is\nadditive.",
"enum": [
"managed",
"user",
"project",
"plugin"
],
"type": "string",
"x-msp-openness": "open"
},
"HookListParams": {
"description": "`hook/list` params (tdd SS3.26.1). Per-session because hook scope\nfollows the session's workspace and plugin state.",
"properties": {
"sessionId": {
"description": "The target session.",
"type": "string"
}
},
"required": [
"sessionId"
],
"type": "object"
},
"HookListResult": {
"description": "`hook/list` result (tdd SS3.26.1): one row per installed handler per\nevent — a `ResolvedHookHandler` carries one event, and grouping would\nlose matcher/command identity (ADR 33398 D7 item 1).",
"properties": {
"hooks": {
"description": "The session's installed hook rows (tdd SS3.26.1 promises the\nset, not an order).",
"items": {
"$ref": "#/$defs/HookCatalogEntry"
},
"type": "array"
}
},
"required": [
"hooks"
],
"type": "object"
},
"HookRunStatus": {
"description": "`hookRun` durable outcome (tdd SS4.5.11). Open: new outcomes are\nadditive, and clients MUST render unknown values generically.",
"enum": [
"completed",
"blocked",
"failed",
"timedOut",
"cancelled"
],
"type": "string",
"x-msp-openness": "open"
},
"IfBusy": {
"description": "Disposition when a turn is already running (tdd SS3.2). The wire default\nis `queue`: an SDK caller who has not looked at session state should not\nsilently mutate an in-flight turn.",
"enum": [
"queue",
"steer",
"replace"
],
"type": "string",
"x-msp-openness": "closed"
},
"InitializeParams": {
"description": "`initialize` request params (SS1.4.1).",
"properties": {
"capabilities": {
"$ref": "#/$defs/ClientCapabilities",
"description": "Capability posture; absent means all defaults."
},
"clientInfo": {
"$ref": "#/$defs/ClientInfo",
"description": "Client identification."
}
},
"required": [
"clientInfo"
],
"type": "object"
},
"InitializeResult": {
"description": "The `initialize` result (SS1.4.1).",
"properties": {
"experimentalApi": {
"description": "Echo of the effective negotiated experimental setting.",
"type": "boolean"
},
"grantedCapabilities": {
"description": "Subset of the requested capabilities, plus policy-implicit grants.\nFixed for the connection lifetime (INV-009).",
"items": {
"$ref": "#/$defs/CapabilityName"
},
"type": "array"
},
"museHome": {
"description": "Absolute path of the muse home directory.",
"type": "string"
},
"platformFamily": {
"$ref": "#/$defs/PlatformFamily",
"description": "Server runtime platform family."
},
"platformOs": {
"$ref": "#/$defs/PlatformOs",
"description": "Server operating system."
},
"sandboxAvailability": {
"$ref": "#/$defs/SandboxAvailability",
"description": "Whether this host can enforce the sandbox. Optional so adding it stays\nbackward compatible; a v1 host always sends it, and a client reads\nabsent as unknown — the host predates the field, so the client falls\nback to its own probe rather than inventing an answer."
},
"sandboxUnavailableReason": {
"$ref": "#/$defs/SandboxUnavailableReason",
"description": "Why enforcement is impossible. Sent only when `sandbox_availability`\nis `unavailable`; a client MUST NOT infer a reason when none is\nsent."
},
"schema": {
"$ref": "#/$defs/SchemaInfo",
"description": "Envelope schema version and stable-surface fingerprint."
},
"serverInfo": {
"$ref": "#/$defs/ServerInfo",
"description": "Server identification."
},
"sessionDurability": {
"$ref": "#/$defs/SessionDurability",
"description": "Whether this host persists its sessions. Optional so adding it stays\nbackward compatible; a v1 host always sends it, and a client reads\nabsent as `durable` because no server that omits it has the ephemeral\nprofile."
},
"userAgent": {
"description": "Exact user-agent string presented to upstream model providers.",
"type": "string"
}
},
"required": [
"experimentalApi",
"grantedCapabilities",
"museHome",
"platformFamily",
"platformOs",
"schema",
"serverInfo",
"userAgent"
],
"type": "object"
},
"Item": {
"description": "One transcript item at one revision (tdd SS4.4.1 common fields plus the\nper-kind fields of SS4.5.2–4.5.11, all optional and owned by the kind\ntheir doc names). `item/started`, `item/updated`, and `item/completed`\ncarry the full object; `item/delta` appends to it by field path.",
"properties": {
"agentPath": {
"description": "`subagent`: agent definition path.",
"type": "string"
},
"approvalId": {
"description": "`toolCall`: the approval that gated this call (tdd SS5); join key for\nthe approval view events.",
"type": "string"
},
"args": {
"description": "`toolCall`: the model-authored argument JSON, **verbatim**; clients\nparse. Verbatim keeps the fold byte-deterministic and survives\nmodel-emitted almost-JSON (tdd SS4.5.5).",
"type": "string"
},
"attachments": {
"description": "`userMessage`: image attachment metadata only — base64 payloads are\nnot echoed back on the view (tdd SS4.5.2).",
"items": {
"$ref": "#/$defs/MessageAttachment"
},
"type": "array"
},
"background": {
"description": "`toolCall`: `true` once the task was durably backgrounded; delivered\nvia `item/updated`.",
"type": "boolean"
},
"backgroundInitiator": {
"$ref": "#/$defs/BackgroundInitiator",
"description": "`toolCall`: who backgrounded the task; absent on pre-split records —\nnever inferred (tdd SS4.5.5)."
},
"backgroundTarget": {
"$ref": "#/$defs/BackgroundTarget",
"description": "`toolCall`: this call's live background-target record\n(tdd SS4.5.5; ADR 63254-background-target-on-tool-call D1–D2).\nSet when the foreground tool starts, refreshed by whole-item\n`item/updated` when the facts change, omitted once the call\nsettles or unregisters — present means a live candidate.\nAbsent (pre-feature hosts, unregistered calls) keeps the\nclient's derived behavior, never an error. Old clients\nignore it."
},
"backgroundTerminalCompletion": {
"$ref": "#/$defs/BackgroundTerminalCompletion",
"description": "`backgroundTerminalCompletion`: the five facts the Finished\ncell renders (ADR 50041 D4)."
},
"bashTitle": {
"description": "`toolCall`: the call's Bash Title — its `description` argument\nthrough the shared Bash Title normalizer, for a managed Bash call,\nserved only while the host's `bash_titles` gate is on. The host adds\nit when it serves the item and never stores it; absent for any other\ncall (tdd SS4.5.5; ADR 31406 D26). Old clients ignore it.",
"type": "string"
},
"blocking": {
"description": "`reminderChild`: `true` when this child is a blocking reminder (it holds\nthe turn open until it settles); absent otherwise, never `false` (ADR\n41191 D4). The status word stays off the wire; clients name the\nreminder from `reminderAgentId`.",
"type": "boolean"
},
"bodyCompletion": {
"$ref": "#/$defs/BodyCompletionMembers",
"description": "`bodyCompletion`: the facts one receipt row renders (ADR\n87062 D2, accepted names)."
},
"callId": {
"description": "`toolCall`: the provider call id (`call_...`), opaque.",
"type": "string"
},
"childPromptRefs": {
"description": "`workflow`: one `outputRef`-shaped link per recorded child spawn\nwith an objective (`kind: \"workflow_child_prompt\"`), fetched via\n`item/readOutput` (tdd SS4.5.8/SS4.7.4, #45449).",
"items": {
"$ref": "#/$defs/OutputRef"
},
"type": "array"
},
"childSessionId": {
"description": "`subagent`/`reminderChild`: the child's own session id, readable via\n`session/read`/`view/page` — child transcript drill-down without a\nsecond protocol (tdd SS4.5.7).",
"type": "string"
},
"childSessionLogPath": {
"description": "`reminderChild`: parent-session-dir-relative child log path; absent\nwhen no filesystem log.",
"type": "string"
},
"children": {
"description": "`workflow`: folded per-child state, keyed by `(childId, attempt)`,\nre-emitted whole on every change — the item `revision` is the\nordering guard (tdd SS4.5.8).",
"items": {
"$ref": "#/$defs/WorkflowChild"
},
"type": "array"
},
"commandId": {
"description": "`userMessage`/`userShell`: the submitting command — multi-client UIs\nde-duplicate their local echo on it.",
"type": "string"
},
"commandText": {
"description": "`userShell`: the command text as submitted.",
"type": "string"
},
"controlStatus": {
"$ref": "#/$defs/SubagentControlStatus",
"description": "`subagent`: camelCased `SubagentControlStatus` (open enum); `status`\nstays the generic item vocabulary."
},
"cutOff": {
"description": "`agentMessage`: `true` when the provider stream died mid-reply and\nthe run failed with this partial text committed (ADR 50063 D2) —\nthe wire mark for the gate-off \"incomplete response\" rule\n(#13328). Absent otherwise; never cleared once set.",
"type": "boolean"
},
"damagedRange": {
"$ref": "#/$defs/DamagedRange",
"description": "`damagedRange`: what the damaged range cost (ADR 60914 D2)."
},
"declaredPhase": {
"description": "`workflow`: the run-level declared-phase label — the last `Phase`\ndetail-row label of the reconciled projection; terminal-only, absent\nwhile live (tdd SS4.5.8, #45449).",
"type": "string"
},
"deliveredBeforeTurnEnd": {
"description": "`subagentInput` (`delivered`): `true` when the drain landed on its\nturn before that turn's terminal, which ends the turn's final answer\nas gate-off's drain record does; absent otherwise (ADR 70249 D4).",
"type": "boolean"
},
"deliveryNumber": {
"description": "`scheduledFire`: the occurrence number within the job's\nhistory, present with occurrence metadata (tdd SS4.5.17;\nADR 45446 D2).",
"type": "integer"
},
"depth": {
"description": "`subagent`: nesting depth.",
"type": "integer"
},
"displayLabel": {
"$ref": "#/$defs/ToolDisplayLabel",
"description": "`toolCall`: the tool's own words for this call; absent = none (tdd SS4.5.5)."
},
"displayText": {
"description": "`userMessage`: presentation form (tdd SS3.2); absent when the client\nsent none.",
"type": "string"
},
"durationMs": {
"description": "`userShell`/`subagent`: observed wall-clock duration. `workflow`: the\nrun's wall time from launch to reconciliation, set only on the\nsettling `item/completed` — never a sum of child durations.\n`toolCall`: the Backgrounded row's duration (ADR 50041 D11) — the\nopen→update record delta in whole ms, served on the\n`backgroundStatus` re-emission and frozen there; absent otherwise.",
"type": "integer"
},
"earlierHistory": {
"$ref": "#/$defs/EarlierHistory",
"description": "`earlierHistory`: the boundary checkpoint's transcript tail (ADR\n71910 D3, tdd SS4.5.22)."
},
"entryId": {
"description": "`workflow`: launched entry identity.",
"type": "string"
},
"event": {
"$ref": "#/$defs/HookEventName",
"description": "`hookRun`: the hook event in Q2 camelCase vocabulary (tdd SS4.5.11)."
},
"exitCode": {
"description": "`userShell`: the process exit code, when it exited by code.",
"type": "integer"
},
"exitSignal": {
"description": "`userShell`: the terminating signal NUMBER, when signalled (e.g. 9) —\nthe durable payload verbatim; nothing maps numbers to names, and the\nfold never invents one.",
"type": "integer"
},
"failureKind": {
"description": "`toolCall`: machine-readable failure class (`TaskFailureKind`,\nsnake_case verbatim — durable runtime vocabulary, the SS1.6 casing\nexemption).",
"type": "string"
},
"failureReason": {
"description": "`toolCall`/`subagent`: `Failed`/`Rejected`/`Cancelled` reason text,\nverbatim.",
"type": "string"
},
"fallbackText": {
"description": "Server-provided one-line human summary any kind MAY carry, for\ngeneric rendering of kinds a client does not recognize; new kinds\nSHOULD carry it during their first release cycle (tdd SS4.10).",
"type": "string"
},
"finalSummary": {
"description": "`workflow`: the human terminal summary projected from the reconciled\nLaunch envelope, bounded at the 64 KiB surface budget; terminal-only\n(tdd SS4.5.8, #45449).",
"type": "string"
},
"generationId": {
"description": "`reminderChild`: the reminder generation.",
"type": "integer"
},
"held": {
"description": "`toolCall` (ADR 50063 D4/D6): `true` while the call is held before it\nis admitted to execute. Present on an item started at hold time,\ncleared by the release `item/updated`, absent on calls never held.",
"type": "boolean"
},
"heldFor": {
"$ref": "#/$defs/HeldFor",
"description": "`toolCall` (ADR 50063 D6): what holds the call; present exactly when\n`held` is."
},
"hookKey": {
"description": "`hookRun`: the durable `hook_key` (tdd SS4.5.11).",
"type": "string"
},
"inputPhase": {
"$ref": "#/$defs/SubagentInputPhase",
"description": "`subagentInput`: the record the item stands for; see\n[`SubagentInputPhase`] (#70249)."
},
"itemId": {
"description": "Bare UUIDv7; the item's identity across its whole lifecycle. Identity\nrule (tdd SS4.4.1): the task id for task-backed kinds\n(`toolCall`, `subagent`), the pre-minted commit `message_id` for\ndelta-streamed kinds (`agentMessage`, `reasoning`), `EventId::derive`\nover the session id and the range's starting sequence number for\n`damagedRange` (no record carries it, SS4.5.16), the same over the\nboundary checkpoint's sequence number for `earlierHistory` (SS4.5.22),\nand the opening durable record's event id for everything else.\nOpaque to clients.",
"type": "string"
},
"jobId": {
"description": "`scheduledFire`: the cron job id that fired (tdd SS4.5.17;\nADR 45446 D2, spec 13929 amendment #62595 FR-62595-1).",
"type": "string"
},
"kind": {
"$ref": "#/$defs/ItemKind",
"description": "The item kind (open enum): clients MUST render unknown kinds\ngenerically — kind name plus `status` plus `fallbackText` (tdd\nSS4.10)."
},
"label": {
"description": "`hookRun`: capped display label (tdd SS4.5.11).",
"type": "string"
},
"message": {
"description": "`workflow`: the reconciled terminal message, set on completion.",
"type": "string"
},
"messagePhase": {
"$ref": "#/$defs/MessagePhase",
"description": "`agentMessage`: the phase the model declared; see [`MessagePhase`]."
},
"modelVisibleContent": {
"description": "`toolCall`: rich content the model saw beyond text; base64 is not\ninlined on the view (tdd SS4.5.5).",
"items": {
"$ref": "#/$defs/ModelVisibleContent"
},
"type": "array"
},
"monitorDescription": {
"description": "`monitorFeed`: the monitor's arm-time description with the\ndurable `\"Monitor event: \"` summary prefix stripped; model-\ncontrolled tool input under the 64 KiB per-surface budget —\nsanitize before render (ADR 50058-monitor-feed-wire D1/D3).",
"type": "string"
},
"monitorId": {
"description": "`monitorFeed`: the monitor task id — the same value as that\nmonitor's `toolCall` `itemId` (ADR 50058-monitor-feed-wire D1).",
"type": "string"
},
"nextFireAtMs": {
"description": "`scheduledFire`: the next scheduled epoch in milliseconds;\nabsent on a final delivery (tdd SS4.5.17; ADR 45446 D2).",
"type": "integer"
},
"noticeKind": {
"description": "`systemNotice`: an optional open machine code for what happened, minted\nper origin by the slice that adds its producer; omitted for `monitor`\nand for `hook` (tdd SS4.5.23).",
"type": "string"
},
"noticeOrigin": {
"$ref": "#/$defs/NoticeOrigin",
"description": "`systemNotice`: the producing family, so a client routes a notice\nwithout parsing its text (tdd SS4.5.23). Absent means the server named\nno origin: render generically, never infer one."
},
"noticeSeverity": {
"$ref": "#/$defs/NoticeSeverity",
"description": "`systemNotice`: the notice's level — `info` | `warning` | `error`,\nopen (tdd SS4.5.23; ADR 42729 D1). Absent means the server classified\nno level."
},
"noticeSubject": {
"$ref": "#/$defs/NoticeSubject",
"description": "`systemNotice`: the durable thing the notice is about — for `hook`,\nthe hook run's item id and its bounded label (tdd SS4.5.23; ADR 75121\nD2)."
},
"objective": {
"description": "`subagent`: objective as spawned, bounded on the wire at the 64 KiB\nretained-text budget (tdd SS4.5.4, ADR 35691 D9); a cut sets\n`truncated`. The durable record stays verbatim.",
"type": "string"
},
"outcome": {
"$ref": "#/$defs/CompactionOutcome",
"description": "`compaction`: terminal only — folds installed/fallback status."
},
"outputRef": {
"$ref": "#/$defs/OutputRef",
"description": "`toolCall`/`userShell`: stored-output reference; fetch the full bytes\nvia `item/readOutput` (served by #208)."
},
"parentSubagentId": {
"description": "`subagent`: the `subagentId` of the subagent whose own session spawned this child, by\n`subagent/list`'s `parentSubagentId` rule. **Additive-optional**: absent for a child of the\nview's own session, or when no open `subagent` item in this view owns the spawning session;\nnever guessed, never derived from `agentPath` (tdd SS4.5.7, #88542).",
"type": "string"
},
"patchRef": {
"$ref": "#/$defs/OutputRef",
"description": "`toolCall`: stored structured-patch reference (`kind: \"tool_patch\"`,\n`mediaType: \"application/json\"`); the body is fetched via\n`item/readOutput` with `patchRef.id`, and the ref survives the\nSS2.5.2 elided-snapshot rung exactly like `outputRef` without ever\nbeing an elision trigger (tdd SS2.5.2, SS4.5.5; #33025)."
},
"patchSummary": {
"$ref": "#/$defs/PatchSummary",
"description": "`toolCall`: server-authored edit-family diff summary (#33025)\n— always beside `patchRef`; absent = no diff available (tdd SS4.5.5)."
},
"paused": {
"description": "`workflow`: `true` only while a durable pause fact is in force for\nthe run's generation; absent otherwise, never `false` (tdd SS4.5.8,\nADR 45437 D2; the fold sets it on pause commit and clears it on\nresume-commit supersession or the generation's terminal).",
"type": "boolean"
},
"peerMessage": {
"$ref": "#/$defs/PeerMessage",
"description": "`peerMessage`: the four facts the consumed card renders (ADR\n72708 D2, tdd SS4.5.24)."
},
"providerItemId": {
"description": "`reasoning`: provider reasoning item id (e.g. `rs_...`), for\nprovider-side correlation.",
"type": "string"
},
"reason": {
"description": "`compaction`: noop/failure reason, verbatim (snake_case durable\nvocabulary, e.g. `\"no_compactable_history\"`). `hookRun`: terminal-only\ncapped terminal reason (tdd SS4.5.11).",
"type": "string"
},
"recordedAt": {
"description": "RFC3339 timestamp of the item's driving durable record. Absent on\nephemeral-opened items until first durable re-emission (tdd SS4.4.1).",
"type": "string"
},
"reminderAgentId": {
"description": "`reminderChild`: the reminder agent's id.",
"type": "string"
},
"replayHint": {
"$ref": "#/$defs/ReplayHint",
"description": "Monitor `toolCall`: the D26 hint verdict plus anchor\n(`ReplayHint`); absent means no hint."
},
"result": {
"$ref": "#/$defs/SubagentResult",
"description": "`subagent`: the result envelope from `ResultReady` (tdd SS4.5.7)."
},
"resultStatus": {
"$ref": "#/$defs/SubagentResultStatus",
"description": "`subagentResult`: the consumed attempt's outcome; absent if unseen at the drain (#88809)."
},
"resumeFromRunId": {
"description": "`workflow`: set on resumed launches.",
"type": "string"
},
"retracted": {
"description": "`userMessage`: `true` after an accepted retract (tdd SS4.5.1);\nre-emitted via `item/updated`.",
"type": "boolean"
},
"revision": {
"description": "Integer >= 1, strictly monotonic per item; apply rule is\nreplace-iff-higher. `item/delta` never bumps it (tdd SS4.4.1).",
"type": "integer"
},
"role": {
"description": "`subagent`: role as spawned.",
"type": "string"
},
"runStatus": {
"$ref": "#/$defs/HookRunStatus",
"description": "`hookRun`: terminal-only durable outcome; stays `blocked` when the\nitem settles `rejected` (tdd SS4.5.11)."
},
"scheduledFireAtMs": {
"description": "`scheduledFire`: the fire's scheduled epoch in milliseconds\n(tdd SS4.5.17; ADR 45446 D2).",
"type": "integer"
},
"scriptId": {
"description": "`workflow`: launched script identity.",
"type": "string"
},
"sideSessionId": {
"description": "`sideChat`: the side's own session id, readable via\n`session/read`/`view/page` — drill-down without a second protocol\n(tdd SS4.5.13; ADR 45435 D3).",
"type": "string"
},
"status": {
"$ref": "#/$defs/ItemStatus",
"description": "Open enum; terminal = anything other than `\"inProgress\"`. Unknown\nvalues MUST be treated as terminal-unknown and rendered generically\n(tdd SS4.4.1)."
},
"statusAttempt": {
"$ref": "#/$defs/StatusAttempt",
"description": "`toolCall`: the latest external-attempt facet, field-for-field —\ncountdown inputs the client renders the tick from; absent when the\nlatest detail carries none (tdd SS4.5.5, #45448)."
},
"statusChildren": {
"$ref": "#/$defs/StatusChildren",
"description": "`toolCall`: the latest child-summary facet, field-for-field; absent\nwhen the latest detail carries none (tdd SS4.5.5, #45448)."
},
"statusHealth": {
"$ref": "#/$defs/StatusHealth",
"description": "`toolCall`: the latest health facet, field-for-field; absent when\nthe latest detail carries none (tdd SS4.5.5, #45448)."
},
"statusLine": {
"description": "`toolCall`: the task's visible latest-status line — the latest\n`Status` message through the shared detail normalization; absent\nwhen no status folded or nothing displayable remains (tdd SS4.5.5,\n#45448).",
"type": "string"
},
"statusPhase": {
"description": "`toolCall`: the latest detail's phase row, verbatim; absent when the\nlatest detail carries none (tdd SS4.5.5, #45448).",
"type": "string"
},
"statusProgress": {
"$ref": "#/$defs/StatusProgress",
"description": "`toolCall`: the latest progress facet, field-for-field; absent when\nthe latest detail carries none (tdd SS4.5.5, #45448)."
},
"statusStep": {
"$ref": "#/$defs/StatusStep",
"description": "`toolCall`: the latest active-step facet, field-for-field; absent\nwhen the latest detail carries none (tdd SS4.5.5, #45448)."
},
"steered": {
"description": "`userMessage`: `true` when injected mid-turn via `turn/steer` or\n`ifBusy: \"steer\"`; absent otherwise.",
"type": "boolean"
},
"stopAvailable": {
"description": "`workflow`: display-only stop affordance — `true` while the run is\nopen, `false` once settled; stopping rides `workflow/cancel`\n(tdd SS4.5.8, #45449). Authorizes nothing.",
"type": "boolean"
},
"strategyId": {
"description": "`compaction`: summarizer strategy (installed only).",
"type": "string"
},
"subagentId": {
"description": "`subagent`: durable child identity (`subagent_id`).",
"type": "string"
},
"summarizedThrough": {
"description": "`compaction`: opaque provenance string naming the compaction boundary.\nAlso a compaction-anchored read anchor, accepted by `session/resume` and\n`view/page`. Still opaque — clients relay it, never parse it.",
"type": "string"
},
"summary": {
"description": "`reasoning`: one entry per summary part; part *n* streams via\n`item/delta` field `\"summary.n\"` (part boundary = index change).",
"items": {
"type": "string"
},
"type": "array"
},
"taskId": {
"description": "`reminderChild`: the linked task id. Unresolved\n`bodyCompletion` items also set it (FR-87062-1: the\ndiagnostic names the task whose join did not hold).",
"type": "string"
},
"terminalRowAfterItemId": {
"description": "Terminal `toolCall`, or a `subagent` whose result drained\n(#70249): the item after whose rows the terminal row renders\n(tdd SS4.5.21, ADR 56496 D2/D3).",
"type": "string"
},
"text": {
"description": "`userMessage`: the prompt text as submitted. `agentMessage`: the\naccumulated reply, streamed via `item/delta` field `\"text\"`.\n`reasoning`: raw committed reasoning text where the provider exposes\nit (never streamed in v1, tdd SS4.5.4).",
"type": "string"
},
"tokenBudget": {
"$ref": "#/$defs/WorkflowTokenBudget",
"description": "`workflow`: the run's launch token budget, set from the launch fact\n(tdd SS4.5.8, #45449); absent when the launch carried none."
},
"tokensAfter": {
"description": "`compaction`: token budget snapshot after, when measured.",
"type": "integer"
},
"tokensBefore": {
"description": "`compaction`: token budget snapshot before, when measured.",
"type": "integer"
},
"tool": {
"description": "`toolCall`: tool name.",
"type": "string"
},
"toolReceipt": {
"$ref": "#/$defs/ToolReceipt",
"description": "`toolCall`: the shared semantic receipt — what the operation did, as\nmachine-readable fact (ADR 43399 D1, tdd SS4.5.5). Optional and\nadditive: absence is always valid and is never an error (D3). When\npresent, a server serves the **same** receipt on every item path —\n`item/completed`, `view/page`, seeded snapshots and resume (D3).\nObservation only; carries no control authority (D4), and no field in\nit enters model-visible content (D7)."
},
"trigger": {
"$ref": "#/$defs/CompactionTrigger",
"description": "`compaction`: what initiated the compaction."
},
"triggerSource": {
"description": "`workflow`: camelCased `WorkflowLaunchTriggerSource`, verbatim\n(durable runtime vocabulary, e.g. `\"modelProposal\"`).",
"type": "string"
},
"truncated": {
"description": "`true` when the server's per-surface text budget saturated a streamed surface\n(`agentMessage.text`, `reasoning.summary[*]`, `toolCall.visibleOutput`,\n`userShell.visibleOutput`), cut a `subagent` surface (`objective`, `fallbackText`,\n`result.summary`, `result.text`), or cut a `monitorFeed` surface (`text`, `fallbackText`,\n`monitorDescription`) (ADR 50058-monitor-feed-wire D3), or cut a `systemNotice` surface\n(`text`, `fallbackText`; the committed-surface budget, ADR 42729 D1, tdd SS4.5.23). On a\n`subagent` item the flag is item-level and never cleared: once any of those four is cut,\nevery later update keeps it, even when `result.text` arrives whole (ADR 35691 D9). The\ndurable full text remains in the log (tdd SS4.5.4).",
"type": "boolean"
},
"turnId": {
"description": "The owning turn (== the submitting `commandId` for fresh turns, tdd\nSS3.1.4). `null` for the kinds outside a turn: `userShell` always\n(tdd SS4.5.6), `hookRun` for session-boundary runs, `monitorFeed`\nalways (ADR 50058-monitor-feed-wire D1), `sideChat` always (SS4.5.13),\n`damagedRange` always (ADR 60914 D2), `earlierHistory` always (ADR\n71910 D3), `systemNotice` when produced outside a turn (tdd SS4.5.23).",
"type": [
"string",
"null"
]
},
"usage": {
"$ref": "#/$defs/TokenUsage",
"description": "`subagent`: **transitive** observed usage — the child and its own\ndescendants; updated in place, absent until first observation; never\nfolded into `session/tokenUsage.cumulative` (tdd SS4.6.5)."
},
"visibleOutput": {
"description": "`toolCall`/`userShell`: bounded transcript-visible result text\n(budget per tdd SS4.5.4); streams via `item/delta` field `\"output\"`.",
"type": "string"
},
"wakeSourceDescriptions": {
"description": "`agentMessage`: the Monitor source descriptions for the wake\nturn's first answer (ADR 62265 D1, #62265) — stripped,\nbounded, one entry per arming drain in drain order. Absent\n(or empty) means untagged: the row renders the ordinary\nuntagged shape. The client scrubs per part before joining.",
"items": {
"type": "string"
},
"type": "array"
},
"workId": {
"description": "`toolCall`: the task's registered Work ID, verbatim\n(`work.v2.managed_bash.sha256.…`); present only when the task\nregistered a ManagedBash id, absent otherwise (tdd SS4.5.5,\nADR 50041 D20). Stable from day one: no `x-msp-stability`\nmarker. The host serves it at the later of the task terminal\nand the inbox admission (D21); absence keeps the client's v1\nderivation.",
"type": "string"
},
"workflowRunId": {
"description": "`subagent`/`workflow`: the owning durable workflow run id (opaque\nstring — not a UUID family).",
"type": "string"
}
},
"required": [
"itemId",
"kind",
"revision",
"status"
],
"type": "object"
},
"ItemCompletedParams": {
"description": "`item/completed` params (tdd SS4.3): the item reached its terminal state\n— the authoritative final object. Always cites a durable `sourceRange`\n(tdd SS4.2). Clients MUST accept `item/completed` for an `itemId` they\nnever saw `item/started` for (single-shot kinds; after a gap fill; tdd\nSS4.4.1).",
"properties": {
"item": {
"$ref": "#/$defs/Item",
"description": "The full item at its terminal revision."
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The durable records this event folded from."
},
"viewCursor": {
"description": "Opaque, strictly monotonic view cursor (tdd SS4.1).",
"type": "string"
}
},
"required": [
"item",
"sessionId",
"sourceRange",
"viewCursor"
],
"type": "object"
},
"ItemDeltaParams": {
"description": "`item/delta` params (tdd SS4.3.1): a UTF-8-safe streaming append to an\nopen item's field. Ephemeral-sourced by definition: this params object\nhas **no** `sourceRange` member at all (spec 14653 INV-009 — the schema\nenforces the exemption). Deltas never bump `revision`.",
"properties": {
"delta": {
"description": "The appended text; concatenation of a field path's deltas in cursor\norder equals that field's value on `item/completed` unless the\nsurface saturated (spec 14653 INV-005).",
"type": "string"
},
"field": {
"description": "Dotted field path the append targets (`\"summary.0\"`, `\"output\"`,\n...); absent means `\"text\"` (tdd SS4.3.1).",
"type": "string"
},
"itemId": {
"description": "The open item being appended to.",
"type": "string"
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"viewCursor": {
"description": "Opaque, strictly monotonic view cursor (tdd SS4.1).",
"type": "string"
}
},
"required": [
"delta",
"itemId",
"sessionId",
"viewCursor"
],
"type": "object"
},
"ItemKind": {
"description": "The eleven v1 item kinds (tdd SS4.5.2–4.5.13) plus post-v1 kinds\n(tdd SS4.5.14+). Open: a new kind is additive evolution, and clients\nMUST render unknown kinds generically (tdd SS4.10).",
"enum": [
"userMessage",
"agentMessage",
"reasoning",
"toolCall",
"userShell",
"subagent",
"workflow",
"reminderChild",
"compaction",
"hookRun",
"sideChat",
"webSearch",
"monitorFeed",
"damagedRange",
"scheduledFire",
"backgroundTerminalCompletion",
"overdueNotice",
"earlierHistory",
"peerMessage",
"subagentInput",
"subagentResult",
"systemNotice",
"bodyCompletion"
],
"type": "string",
"x-msp-openness": "open"
},
"ItemReadOutputEncoding": {
"description": "The `item/readOutput` content encoding (tdd SS4.7.4). Closed: text media\nis ALWAYS `utf8` and binary media `base64`; a third value would change\nthe client's decode contract.",
"enum": [
"utf8",
"base64"
],
"type": "string",
"x-msp-openness": "closed"
},
"ItemReadOutputParams": {
"description": "`item/readOutput` params: byte-ranged fetch of stored full output that the\nview truncated, via the item's `outputRef`. Read-only; works on loaded and\nunloaded sessions; no lease.",
"properties": {
"itemId": {
"description": "The item whose stored output is fetched.",
"type": "string"
},
"lengthBytes": {
"description": "STORED bytes requested; default and max 6 MiB (tdd SS4.7.4). A value\nabove the max is served at the max.",
"type": "integer"
},
"offsetBytes": {
"description": "STORED-byte offset to start from; 0 when omitted. STORED bytes are a\nproperty of the output, not of a transport (tdd SS4.7.4).",
"type": "integer"
},
"outputRef": {
"description": "The `outputRef.id` from the item (never the `uri`; the uri is\ndisplay/provenance).",
"type": "string"
},
"sessionId": {
"description": "The session the item belongs to.",
"type": "string"
}
},
"required": [
"itemId",
"outputRef",
"sessionId"
],
"type": "object"
},
"ItemReadOutputResult": {
"description": "`item/readOutput` result (tdd SS4.7.4): one stored-byte page.",
"properties": {
"byteLen": {
"description": "STORED bytes served in THIS response (not the output's total; that is\n`outputRef.byteLen` on the item). The next page's `offsetBytes` is\n`offsetBytes + byteLen` — short-serving and advancing are separate,\nso paging never skips or double-reads a byte (tdd SS4.7.4).",
"type": "integer"
},
"content": {
"description": "The served range, decoded per `encoding`.",
"type": "string"
},
"encoding": {
"$ref": "#/$defs/ItemReadOutputEncoding",
"description": "How `content` encodes the stored bytes."
},
"eof": {
"description": "`true` when this range reached the end of the stored output.",
"type": "boolean"
},
"mediaType": {
"description": "The stored output's media type (e.g. `text/plain`).",
"type": "string"
},
"offsetBytes": {
"description": "The STORED-byte offset this response actually served from.",
"type": "integer"
}
},
"required": [
"byteLen",
"content",
"encoding",
"eof",
"mediaType",
"offsetBytes"
],
"type": "object"
},
"ItemStartedParams": {
"description": "`item/started` params (tdd SS4.3): a new item opened on the transcript.\n`sourceRange` is absent when the item opens on an ephemeral record (the\ndelta-streamed kinds); the item's authoritative open is re-stated by its\ndurable-sourced `item/completed` (tdd SS4.2).",
"properties": {
"item": {
"$ref": "#/$defs/Item",
"description": "The full item at revision 1."
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The durable records this event folded from; absent on an\nephemeral-sourced open (spec 14653 INV-009)."
},
"viewCursor": {
"description": "Opaque, strictly monotonic view cursor (tdd SS4.1).",
"type": "string"
}
},
"required": [
"item",
"sessionId",
"viewCursor"
],
"type": "object"
},
"ItemStatus": {
"description": "Item status (tdd SS4.4.1). Open; terminal = anything other than\n`\"inProgress\"`, and unknown values are terminal-unknown, rendered\ngenerically.",
"enum": [
"inProgress",
"completed",
"failed",
"cancelled",
"rejected",
"timedOut"
],
"type": "string",
"x-msp-openness": "open"
},
"ItemUpdatedParams": {
"description": "`item/updated` params (tdd SS4.4.2): an open item changed non-terminally\nin a way deltas cannot express — the full item re-emitted at a higher\nrevision (apply rule: replace iff higher).",
"properties": {
"item": {
"$ref": "#/$defs/Item",
"description": "The full item at a higher revision."
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The durable records this event folded from."
},
"viewCursor": {
"description": "Opaque, strictly monotonic view cursor (tdd SS4.1).",
"type": "string"
}
},
"required": [
"item",
"sessionId",
"sourceRange",
"viewCursor"
],
"type": "object"
},
"JsonRpcVersion": {
"description": "The literal `\"2.0\"` every frame carries (SS1.2).",
"enum": [
"2.0"
],
"type": "string",
"x-msp-openness": "closed"
},
"LastTurn": {
"description": "The last `turn/completed` the session-view fold applied, restated on\n`session/resume` and `session/read` so a reopened session can report a\nfailed last turn (tdd SS2.5.2, ADR 36635 D2/D3).",
"properties": {
"error": {
"$ref": "#/$defs/TurnError",
"description": "Copied when the `turn/completed` carried it: runtime `failed`\nterminals do, host-death `failed` terminals do not (ADR 36635 D2)."
},
"reason": {
"description": "Copied when the `turn/completed` carried it; a synthesized host-death\n`failed` terminal carries only this (`crash`, `crash_inferred`, or\n`incomplete`). Free display text: clients never branch on it.",
"type": "string"
},
"terminal": {
"$ref": "#/$defs/TurnTerminal",
"description": "The turn's terminal (tdd SS4.5.1; open enum)."
},
"turnId": {
"description": "The turn's id, as on its `turn/completed`; clients deduplicate a\nlive `turn/completed` against this member by it (ADR 36635 D2).",
"type": "string"
}
},
"required": [
"terminal",
"turnId"
],
"type": "object"
},
"LimitKind": {
"description": "Quota limit kinds (tdd SS4.5.1, ADR 50047 D2): open for evolution.",
"enum": [
"tierLimit"
],
"type": "string",
"x-msp-openness": "open"
},
"MediaUploadParams": {
"description": "`media/upload` params (tdd SS3.33, ADR 45443 D5): one chunk of a\nclient-minted upload. All members required.",
"properties": {
"chunkBase64": {
"description": "This chunk's bytes; each call's frame stays in the SS1.1 budget.",
"type": "string"
},
"chunkCount": {
"description": "The upload's chunk total; positive.",
"type": "integer"
},
"chunkIndex": {
"description": "This chunk's 0-based position.",
"type": "integer"
},
"commandId": {
"description": "One per call. While the host runs, replaying it with the same params\nreturns the recorded receipt, and reusing it with different params is\nrefused. After a host restart, start over under a new `uploadId`.",
"type": "string"
},
"mediaType": {
"description": "`video/mp4` or `video/quicktime`, matching `VideoInput`.",
"type": "string"
},
"sessionId": {
"description": "The session owning the video store.",
"type": "string"
},
"totalBytes": {
"description": "The assembled byte count; must equal the bytes the chunks deliver.",
"type": "integer"
},
"uploadId": {
"description": "The client-minted upload id (UUIDv7), sent on every chunk.",
"type": "string"
}
},
"required": [
"chunkBase64",
"chunkCount",
"chunkIndex",
"commandId",
"mediaType",
"sessionId",
"totalBytes",
"uploadId"
],
"type": "object"
},
"MediaUploadResult": {
"description": "`media/upload` result (tdd SS3.33): echoes the client-minted id, on\nevery chunk and replay.",
"properties": {
"uploadId": {
"description": "The receipt the turn part references.",
"type": "string"
}
},
"required": [
"uploadId"
],
"type": "object"
},
"MessageAttachment": {
"description": "`userMessage` image attachment metadata (tdd SS4.5.2): metadata only —\nthe durable bytes live in the log and are reachable on the raw altitude.",
"properties": {
"attachmentId": {
"description": "This attachment's name, `<itemId>/<n>` — the item's id plus this\nentry's 1-based position in its `attachments` array (tdd SS4.5.2,\nD-071, ADR 42850; #42850). Name only: no link form and no byte read\nby id (#42648).\n\nSet by the server on every attachment entry it emits, and identical\non live, paging, snapshot and rebuild paths (tdd SS4.5.2). Optional\nin the schema so older servers stay valid; clients compare and store\nthe whole string and MUST NOT parse it (ADR 42850).",
"type": "string"
},
"height": {
"description": "Pixel height, when known.",
"type": "integer"
},
"mediaType": {
"description": "The image media type (e.g. `\"image/png\"`).",
"type": "string"
},
"type": {
"description": "Attachment type, `\"image\"` in v1 (free string: attachment vocabulary\ngrows additively with the runtime's intake surface).",
"type": "string"
},
"width": {
"description": "Pixel width, when known.",
"type": "integer"
}
},
"required": [
"mediaType",
"type"
],
"type": "object"
},
"MessagePhase": {
"description": "`agentMessage.messagePhase` (tdd SS4.5.3, #50254): the phase the model\ndeclared, never inferred from position. Set on every completed item, and\non `item/started` when the host knows the phase (#77396): absent or\nunknown there means not yet known, and the completed value wins. A failed\nitem carries none, and its missing value does not read as `\"finalAnswer\"`.\nOpen: a client reads an absent or unknown value on a completed item as\n`\"finalAnswer\"` and still decodes the item. Not a turn-done signal;\n`turn/completed` is.",
"enum": [
"commentary",
"finalAnswer"
],
"type": "string",
"x-msp-openness": "open"
},
"ModelCancelParams": {
"description": "`model/cancel` params (tdd SS3.40, FR-90352-4): the `commandId` of the\ncall to cancel, not a retry id of its own.",
"properties": {
"commandId": {
"description": "The call to cancel.",
"type": "string"
}
},
"required": [
"commandId"
],
"type": "object"
},
"ModelCancelResult": {
"description": "`model/cancel` result (ADR 90352 D6): always empty, for a call in flight\nand for an id no call holds alike; `model/completed` reports the outcome.",
"properties": {},
"type": "object"
},
"ModelCatalogEntry": {
"description": "One visible catalog row (tdd SS3.10). Catalog rows marked hidden never\nreach the wire, so a client cannot select one.",
"properties": {
"contextLimit": {
"description": "Context limit; `null` when the catalog source declared nothing.",
"type": [
"integer",
"null"
]
},
"cost": {
"anyOf": [
{
"$ref": "#/$defs/ModelCost"
},
{
"type": "null"
}
],
"description": "Cost block; `null` when the catalog source declared nothing."
},
"defaultReasoningEffort": {
"$ref": "#/$defs/ReasoningEffort",
"description": "The row's catalog default. Optional only for decoding older hosts; a\npresent value is never null and is always a member of `variants`.\nAbsent under `\"unknown\"` (ADR 33400 D2)."
},
"description": {
"description": "Description; `null` when the catalog source declared nothing.",
"type": [
"string",
"null"
]
},
"displayLabel": {
"description": "Presentation label.",
"type": "string"
},
"isActive": {
"description": "Marks the session's effective model when `sessionId` was supplied. May\nbe false for every row — a client MUST NOT assume exactly one.",
"type": "boolean"
},
"isDefault": {
"description": "Marks the catalog's default row. May be false for every row.",
"type": "boolean"
},
"modelId": {
"description": "The selectable model id.",
"type": "string"
},
"outputLimit": {
"description": "Output limit; `null` when the catalog source declared nothing.",
"type": [
"integer",
"null"
]
},
"profileId": {
"description": "Provider profile; `null` when the catalog source declared nothing.",
"type": [
"string",
"null"
]
},
"providerId": {
"description": "Provider routing.",
"type": "string"
},
"reasoningEffortVariants": {
"description": "Described selectable tiers, a same-order subset of `variants`.\nOptional only for decoding older hosts; a present value is never\nnull. Absent under `\"unknown\"` (ADR 33400 D2).",
"items": {
"$ref": "#/$defs/ModelDescribedReasoningEffort"
},
"type": "array"
},
"releaseDate": {
"description": "Release date; `null` when the catalog source declared nothing.",
"type": [
"string",
"null"
]
},
"variants": {
"$ref": "#/$defs/ModelReasoningEffortVariants",
"description": "Complete ordered selectable efforts. Optional only for decoding older\nhosts; a present value is never null. Current hosts always send it."
}
},
"required": [
"contextLimit",
"cost",
"description",
"displayLabel",
"isActive",
"isDefault",
"modelId",
"outputLimit",
"profileId",
"providerId",
"releaseDate"
],
"type": "object"
},
"ModelCatalogSource": {
"description": "Where a model catalog came from (tdd SS3.10). **Open**: an unrecognized\nvalue is an unknown source, not an error.",
"enum": [
"providerCatalog",
"fakeCatalog",
"unresolvedCatalog",
"bundledCatalog",
"configCatalog"
],
"type": "string",
"x-msp-openness": "open"
},
"ModelChangeSource": {
"description": "What drove a model selection (tdd SS4.6.1). Open.",
"enum": [
"user",
"default",
"policy"
],
"type": "string",
"x-msp-openness": "open"
},
"ModelCompleteMessage": {
"description": "One `model/complete` message (tdd SS3.40).",
"properties": {
"role": {
"$ref": "#/$defs/ModelCompleteRole",
"description": "Who said it."
},
"text": {
"description": "What was said.",
"type": "string"
}
},
"required": [
"role",
"text"
],
"type": "object"
},
"ModelCompleteOutcome": {
"description": "How a `model/complete` call settled. **Open**: a server-produced result\nvocabulary, so a word a newer host adds decodes to `Unknown` (tdd SS1.9).",
"enum": [
"completed",
"failed",
"cancelled",
"timedOut"
],
"type": "string",
"x-msp-openness": "open"
},
"ModelCompleteParams": {
"description": "`model/complete` params (tdd SS3.40, FR-90352-1): the retry id, 1 to 32\nmessages (the first and the last `user`), an optional system text and\nthe output bound. No session and no model: the host picks the model\n(ADR 90352 D3). The host answers an unknown field with `invalidParams`;\nthe type itself accepts it.",
"properties": {
"commandId": {
"description": "The client-minted UUIDv7 retry id (required, SS3.1.1).",
"type": "string"
},
"maxTokens": {
"description": "The most tokens the model may write.",
"maximum": 1024,
"minimum": 1,
"type": "integer"
},
"messages": {
"description": "What the model answers, oldest first.",
"items": {
"$ref": "#/$defs/ModelCompleteMessage"
},
"maxItems": 32,
"type": "array"
},
"system": {
"description": "The system text, when the caller sends one.",
"type": "string"
}
},
"required": [
"commandId",
"maxTokens",
"messages"
],
"type": "object"
},
"ModelCompleteResult": {
"description": "`model/complete` result (tdd SS3.40): admission only — the ack is never\nthe completion.",
"properties": {
"commandId": {
"description": "The request's id, echoed.",
"type": "string"
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "Always `accepted` on this path."
}
},
"required": [
"commandId",
"status"
],
"type": "object"
},
"ModelCompleteRole": {
"description": "Who said one `model/complete` message. **Closed**: a client-produced\ninput the host validates, so an unknown role is `invalidParams`.",
"enum": [
"user",
"assistant"
],
"type": "string",
"x-msp-openness": "closed"
},
"ModelCompleteStopReason": {
"description": "Why the model stopped on a `completed` call (FR-90352-2). **Open**: a\nserver-produced word, so a word a newer host adds decodes to `Unknown`\n(tdd SS1.9).",
"enum": [
"end",
"maxTokens"
],
"type": "string",
"x-msp-openness": "open"
},
"ModelCompleteUsage": {
"description": "The provider's token counts for one completed call (ADR 90352 D5): real\ncounts only, never an estimate.",
"properties": {
"inputTokens": {
"description": "Input tokens, as the provider counted them.",
"type": "integer"
},
"outputTokens": {
"description": "Output tokens, as the provider counted them.",
"type": "integer"
}
},
"required": [
"inputTokens",
"outputTokens"
],
"type": "object"
},
"ModelCompletedParams": {
"description": "`model/completed` params (tdd SS3.40, FR-90352-2). `text`, `stopReason`, `modelId` and\n`usage` ride `completed` (`usage` only when the provider reported counts);\n`message` rides `failed`; `cancelled` and `timedOut` carry neither. The\nstruct marks the conditional members optional; the SS prose pins the\nper-outcome rule. `text` is untrusted model output.",
"properties": {
"commandId": {
"description": "The request's id — the correlation key.",
"type": "string"
},
"message": {
"description": "Why the call failed, in words (on `failed`).",
"type": "string"
},
"modelId": {
"description": "The `model/list` id of the model that ran (on `completed`).",
"type": "string"
},
"outcome": {
"$ref": "#/$defs/ModelCompleteOutcome",
"description": "How the call settled."
},
"stopReason": {
"$ref": "#/$defs/ModelCompleteStopReason",
"description": "Why the model stopped (on `completed`)."
},
"text": {
"description": "The model's answer, verbatim (on `completed`).",
"type": "string"
},
"usage": {
"$ref": "#/$defs/ModelCompleteUsage",
"description": "The provider's counts (on `completed`, when it reported them)."
}
},
"required": [
"commandId",
"outcome"
],
"type": "object"
},
"ModelCost": {
"description": "Per-1M-token catalog cost, carried **verbatim** for display and never\nrounded or re-formatted by the host (tdd SS3.10). Cost arithmetic stays\nclient-local view math.",
"properties": {
"cached": {
"description": "Cached-input cost, a decimal string.",
"type": "string"
},
"currency": {
"description": "Currency; nullable — today's catalogs are USD.",
"type": [
"string",
"null"
]
},
"input": {
"description": "Input cost, a decimal string.",
"type": "string"
},
"output": {
"description": "Output cost, a decimal string.",
"type": "string"
}
},
"required": [
"cached",
"currency",
"input",
"output"
],
"type": "object"
},
"ModelDescribedReasoningEffort": {
"description": "One described reasoning-effort tier of a `model/list` row (tdd SS3.10,\nADR 33400 D2): a selectable tier plus the catalog's display string for\nit when declared.",
"properties": {
"description": {
"description": "The catalog's per-tier display string; absent when the catalog\ndeclared none. Optional only for decoding; a present value is never\nnull.",
"type": "string"
},
"tier": {
"$ref": "#/$defs/ReasoningEffort",
"description": "The tier, in the closed D-024 vocabulary."
}
},
"required": [
"tier"
],
"type": "object"
},
"ModelListParams": {
"description": "`model/list` params (tdd SS3.10): the discovery half of the model-picker\ngesture. **A query, not a command** — no `commandId`, no durable intake\nrecord, no view event.",
"properties": {
"sessionId": {
"description": "When present, the row matching that session's effective model is\nflagged `isActive`. When absent, no row is active — a client may list\nbefore it has a session (tdd SS3.10).",
"type": "string"
}
},
"type": "object"
},
"ModelListResult": {
"description": "`model/list` result (tdd SS3.10). A snapshot at call time: v1 has no\ncatalog subscription. `models` MAY be empty — a build shipped with no\nbundled models is a supported configuration.",
"properties": {
"models": {
"description": "Visible rows only, newest `releaseDate` first.",
"items": {
"$ref": "#/$defs/ModelCatalogEntry"
},
"type": "array"
},
"profileId": {
"description": "The catalog's profile; `null` when none.",
"type": [
"string",
"null"
]
},
"providerId": {
"description": "The catalog's provider.",
"type": "string"
},
"source": {
"$ref": "#/$defs/ModelCatalogSource",
"description": "Where the catalog came from — how a client tells a live provider\ncatalog from a test fake and labels it honestly."
}
},
"required": [
"models",
"profileId",
"providerId",
"source"
],
"type": "object"
},
"ModelReasoningEffortVariants": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ReasoningEffort"
},
"type": "array"
},
{
"$ref": "#/$defs/UnknownModelReasoningEffortVariants"
}
],
"description": "A complete ordered effort set, or an explicit unknown capability."
},
"ModelSelection": {
"description": "A model selection (tdd SS3.8). Empty strings are normalized to absent.",
"properties": {
"displayLabel": {
"description": "Presentation label.",
"type": "string"
},
"modelId": {
"description": "Catalog model id. Required.",
"type": "string"
},
"profileId": {
"description": "Provider profile. Omitted and explicit `null` both mean \"no profile\"\n(#23468).",
"type": [
"string",
"null"
]
},
"providerId": {
"description": "Provider routing.",
"type": "string"
}
},
"required": [
"modelId"
],
"type": "object"
},
"ModelVisibleContent": {
"description": "Rich content the model saw beyond text (tdd SS4.5.5,\n`ModelVisibleToolContent`): metadata only — fetch bytes via\n`item/readOutput` when an `outputRef` exists.",
"properties": {
"height": {
"description": "Pixel height, when known.",
"type": "integer"
},
"mediaType": {
"description": "The content media type.",
"type": "string"
},
"path": {
"description": "The recorded content path.",
"type": "string"
},
"sourceToolName": {
"description": "The tool that produced the content.",
"type": "string"
},
"type": {
"description": "Content type, `\"image\"` in v1 (free string, grows with the durable\nvocabulary).",
"type": "string"
},
"width": {
"description": "Pixel width, when known.",
"type": "integer"
}
},
"required": [
"mediaType",
"path",
"sourceToolName",
"type"
],
"type": "object"
},
"MonitorInboxItemAdmittedParams": {
"description": "`monitor/inboxItemAdmitted` params (tdd SS4.5.18): one monitor\ninbox admission — the fold keys gate-off consumes.",
"properties": {
"body": {
"description": "The model-facing delivery text.",
"type": "string"
},
"displayBody": {
"description": "The producer-recorded pre-augmentation content; absent on\npre-#24686 records.",
"type": "string"
},
"eventIndex": {
"description": "Per-task event order key (with `line_index`).",
"type": "integer"
},
"eventKind": {
"description": "Monitor event kind, snake_case, open vocabulary — clients\nignore unknown kinds.",
"type": "string"
},
"itemId": {
"description": "The inbox item id (dedupe key).",
"type": "string"
},
"lineIndex": {
"description": "Line order key; absent when the event has no line.",
"type": "integer"
},
"queuedAt": {
"description": "Admission stamp (RFC3339); consumed by the pending sort.",
"type": "string"
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"showLines": {
"description": "Whether the event carries displayable lines.",
"type": "boolean"
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The durable records this event folded from."
},
"summary": {
"description": "The notice-text summary.",
"type": "string"
},
"taskId": {
"description": "The owning monitor task id (per-task set key).",
"type": "string"
},
"viewCursor": {
"description": "Opaque, strictly monotonic view cursor (tdd SS4.1).",
"type": "string"
}
},
"required": [
"body",
"eventIndex",
"eventKind",
"itemId",
"queuedAt",
"sessionId",
"showLines",
"sourceRange",
"summary",
"taskId",
"viewCursor"
],
"type": "object"
},
"MonitorInboxItemDrainedParams": {
"description": "`monitor/inboxItemDrained` params (tdd SS4.5.18): one monitor inbox\ndrain — a consumption marker with its recorded stamp.",
"properties": {
"deliveryVisible": {
"description": "False is a local claim-only recall: no delivery row or recovery\nconsequence, but the drain still stamps the awaiting verdict.",
"type": "boolean"
},
"drainTargetRunStream": {
"$ref": "#/$defs/StreamRef",
"description": "The draining run stream (`StreamRef`), absent means the current\ndraining run."
},
"drainedAt": {
"description": "The drain record's recorded stamp (RFC3339), the drain-side\noperand of drain-vs-void latest-wins.",
"type": "string"
},
"itemId": {
"description": "The drained inbox item id.",
"type": "string"
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The durable records this event folded from."
},
"viewCursor": {
"description": "Opaque, strictly monotonic view cursor (tdd SS4.1).",
"type": "string"
}
},
"required": [
"deliveryVisible",
"drainedAt",
"itemId",
"sessionId",
"sourceRange",
"viewCursor"
],
"type": "object"
},
"MonitorInboxItemVoidedParams": {
"description": "`monitor/inboxItemVoided` params (tdd SS4.5.18): one wake-missed\nvoid — count-only, no transcript row (spec 9627 D15).",
"properties": {
"itemId": {
"description": "The voided inbox item id.",
"type": "string"
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The durable records this event folded from."
},
"viewCursor": {
"description": "Opaque, strictly monotonic view cursor (tdd SS4.1).",
"type": "string"
},
"voidedAt": {
"description": "The anomaly's recorded stamp (RFC3339), the void-side operand\nof drain-vs-void latest-wins.",
"type": "string"
}
},
"required": [
"itemId",
"sessionId",
"sourceRange",
"viewCursor",
"voidedAt"
],
"type": "object"
},
"MonitorInboxSnapshotEntry": {
"description": "One snapshot `monitorInbox` entry (tdd SS4.9.1, FR-56492-7 as amended by\n#76729): a retained admission in the `monitor/inboxItemAdmitted` shape,\nenvelope-stripped, plus the newest drain and void stamps folded for it.\nThe entry is still awaiting delivery when `drainedAt` is absent, or when\n`voidedAt` is strictly newer than it (FR-56492-3).",
"properties": {
"body": {
"description": "The model-facing delivery text.",
"type": "string"
},
"displayBody": {
"description": "The producer-recorded pre-augmentation content; absent on\npre-#24686 records.",
"type": "string"
},
"drainedAt": {
"description": "The newest drain stamp (RFC3339); absent while never drained.",
"type": "string"
},
"eventIndex": {
"description": "Per-task event order key (with `line_index`).",
"type": "integer"
},
"eventKind": {
"description": "Monitor event kind, snake_case, open vocabulary.",
"type": "string"
},
"itemId": {
"description": "The inbox item id (dedupe key).",
"type": "string"
},
"lineIndex": {
"description": "Line order key; absent when the event has no line.",
"type": "integer"
},
"queuedAt": {
"description": "Admission stamp (RFC3339).",
"type": "string"
},
"showLines": {
"description": "Whether the event carries displayable lines.",
"type": "boolean"
},
"summary": {
"description": "The notice-text summary.",
"type": "string"
},
"taskId": {
"description": "The owning monitor task id (per-task set key).",
"type": "string"
},
"voidedAt": {
"description": "The newest wake-missed void stamp (RFC3339); absent while never voided.",
"type": "string"
}
},
"required": [
"body",
"eventIndex",
"eventKind",
"itemId",
"queuedAt",
"showLines",
"summary",
"taskId"
],
"type": "object"
},
"NoticeOrigin": {
"description": "`systemNotice`: the producing family, so a client routes a notice without\nparsing its text (tdd SS4.5.23). Open. The v1 vocabulary is the Monitor\nnotice and the three system-chrome producers (ADR 42729 D1) plus the\nhook-run producer (ADR 75121 D2), the paused-Workflow checkpoint\nproducer (ADR 39490 D5) and the continued-child tools producer\n(ADR 42729 D5); absent means the server named no\norigin, and a client never infers one.",
"enum": [
"monitor",
"skillsStartup",
"scheduledFire",
"incompleteGeneration",
"hook",
"workflowCheckpoint",
"continuedChildTools"
],
"type": "string",
"x-msp-openness": "open"
},
"NoticeSeverity": {
"description": "`systemNotice`: the notice's level (tdd SS4.5.23). Open; an unknown value\nis an unknown-but-present level, rendered generically (SS4.10).",
"enum": [
"info",
"warning",
"error"
],
"type": "string",
"x-msp-openness": "open"
},
"NoticeSubject": {
"description": "`systemNotice`: the durable thing the notice is about (tdd SS4.5.23).\n`id` is required whenever the object is present; `label` is the\nproducer's sanitized, already-capped display value, omitted when it is\nempty, never `\"\"`.",
"properties": {
"id": {
"description": "The subject's durable identity: for `monitor`, the monitor's task id\n(its `toolCall` `itemId`); for `hook`, the hook run's item id (the\nopening `HookRunStarted` record's event id, SS4.5.11).",
"type": "string"
},
"label": {
"description": "The subject's bounded display label (the `hookRun.label` shape).",
"type": "string"
}
},
"required": [
"id"
],
"type": "object"
},
"Notification": {
"description": "A notification frame, either direction (SS1.2 §2.2). No `id`; a\nnotification is never answered.",
"properties": {
"emittedAtMs": {
"description": "Emission time in Unix milliseconds, recorded once at emission;\nserver→client notifications only (SS1.2.5). Optional on the wire so\ndecoders tolerate older servers.",
"type": "integer"
},
"jsonrpc": {
"$ref": "#/$defs/JsonRpcVersion",
"description": "The literal `\"2.0\"`."
},
"method": {
"description": "Notification method name.",
"type": "string"
},
"params": {
"description": "Method-specific parameters; omitted entirely when empty.",
"properties": {},
"type": "object"
}
},
"required": [
"jsonrpc",
"method"
],
"type": "object"
},
"OutputRef": {
"description": "Stored-output reference (tdd SS4.5.5): the camelCased fold of the durable\n`ToolOutputRef`. The fetch path is `item/readOutput` (#208).",
"properties": {
"availability": {
"$ref": "#/$defs/OutputRefAvailability",
"description": "Whether the bytes are servable (tdd SS4.5.5)."
},
"byteLen": {
"description": "Stored byte length.",
"type": "integer"
},
"digest": {
"description": "Content digest (e.g. `\"sha256:...\"`), when recorded.",
"type": "string"
},
"id": {
"description": "The stored output's durable id.",
"type": "string"
},
"kind": {
"description": "The stored output's kind, verbatim durable vocabulary (e.g.\n`\"tool_output\"`; snake_case per the SS1.6 casing exemption).",
"type": "string"
},
"mediaType": {
"description": "Media type, when recorded.",
"type": "string"
},
"path": {
"description": "Stored path, when recorded.",
"type": "string"
},
"uri": {
"description": "The stored output's URI.",
"type": "string"
}
},
"required": [
"availability",
"byteLen",
"id",
"kind",
"uri"
],
"type": "object"
},
"OutputRefAvailability": {
"description": "Whether a stored output's bytes are servable (tdd SS4.5.5). Open —\ndurable runtime vocabulary may grow additively.",
"enum": [
"available",
"missing",
"unsupported",
"accessFailed"
],
"type": "string",
"x-msp-openness": "open"
},
"PatchSummary": {
"description": "Server-authored edit-family diff summary (tdd SS4.5.5, #33025):\n`files` counts the stored patch document's file entries; `added` and\n`removed` are the total `+`/`-` prefixed LINE counts summed over the\nstored patch's hunks across all files — line counts, never hunk or byte\ncounts. Rides the `toolCall` item beside `patchRef`; the body is fetched\nvia `item/readOutput` with `patchRef.id`.",
"properties": {
"added": {
"description": "Total `+`-prefixed line count across all files' hunks.",
"type": "integer"
},
"files": {
"description": "File entries in the stored patch document.",
"type": "integer"
},
"removed": {
"description": "Total `-`-prefixed line count across all files' hunks.",
"type": "integer"
}
},
"required": [
"added",
"files",
"removed"
],
"type": "object"
},
"PeerMessage": {
"description": "`peerMessage`: the four facts the consumed card renders (ADR 72708\nD2, tdd SS4.5.24). The fold reads them from the drained inbox\nrecord's delivery snapshot; `senderLabel` already ran the\ngate-off label rule host-side, so the client renders it verbatim.\nStable from day one (the `scheduledFire` precedent): no\n`x-msp-stability` marker.",
"properties": {
"body": {
"description": "The message text verbatim — never cut (an over-budget event\nanswers the typed `pageEventTooLarge` arm).",
"type": "string"
},
"remote": {
"description": "True for mailbox/remote senders, false for local session\nsenders.",
"type": "boolean"
},
"senderLabel": {
"description": "The peer label gate-off shows: the sender name when the\ndurable record names one, else the sender id shortened as\ngate-off shortens it, else `unknown session` — and `remote\nsession` verbatim for a remote sender.",
"type": "string"
},
"senderSessionId": {
"description": "The local sender's session id; absent for remote senders and\nwhen the record names none.",
"type": "string"
}
},
"required": [
"body",
"remote",
"senderLabel"
],
"type": "object"
},
"PendingApprovalPointer": {
"description": "A pending approval in the snapshot: the SS2.5.2 pointer shape plus the\ngated `itemId` when one exists (tdd SS4.9.1).",
"properties": {
"approvalId": {
"description": "The pending approval's id.",
"type": "string"
},
"itemId": {
"description": "The parked item, when one exists.",
"type": "string"
},
"viewCursor": {
"description": "The cursor the approval opened at.",
"type": "string"
}
},
"required": [
"approvalId",
"viewCursor"
],
"type": "object"
},
"PendingRequestKind": {
"description": "The `pendingRequests` discriminator (tdd SS2.5.2). Open enum, v1 values\n`approval` and `userInput`.",
"enum": [
"approval",
"userInput"
],
"type": "string",
"x-msp-openness": "open"
},
"PendingRequestPointer": {
"description": "A late-joiner pointer at an unsettled server-initiated request\n(tdd SS2.5.2, SS2.2.1). The full payloads arrive as re-issued\nserver-to-client requests right after a `session/resume` response\n(tdd SS5.6); `session/read` never re-issues them (tdd SS2.5.5).\n\nThe protocol defines two kind-discriminated entry shapes (`{kind:\n\"approval\", approvalId, viewCursor}` / `{kind: \"userInput\", userInputId,\nviewCursor}`). This type is one flat object with both ids optional, as for\n`ApprovalSubject` and `TurnInputPart`, because the v1 model names no\nobject-variant union; the serialized JSON is the same, but the published\nschema also accepts `{\"kind\":\"approval\",\"userInputId\":…}` and an entry\ncarrying no id at all. Unlike `TurnInputPart.type`, `kind` here is an OPEN\nenum.",
"properties": {
"approvalId": {
"description": "Present on an `approval` entry.",
"type": "string"
},
"kind": {
"$ref": "#/$defs/PendingRequestKind",
"description": "The discriminator; v1 values `approval` and `userInput`."
},
"userInputId": {
"description": "Present on a `userInput` entry.",
"type": "string"
},
"viewCursor": {
"description": "The cursor the request opened at.",
"type": "string"
}
},
"required": [
"kind",
"viewCursor"
],
"type": "object"
},
"PendingUserInputPointer": {
"description": "A pending user-input prompt in the snapshot (tdd SS4.9.1, SS5.10).",
"properties": {
"itemId": {
"description": "The parked item, when one exists.",
"type": "string"
},
"userInputId": {
"description": "The pending prompt's id.",
"type": "string"
},
"viewCursor": {
"description": "The cursor the prompt opened at.",
"type": "string"
}
},
"required": [
"userInputId",
"viewCursor"
],
"type": "object"
},
"PlatformFamily": {
"description": "The server runtime's platform family; may differ from the client's. Closed:\nthe protocol fixes the value set, so widening it is a deliberate,\ngate-visible protocol change rather than a silent addition (a later\n`Closed`→`Open` flip is itself additive).",
"enum": [
"unix",
"windows"
],
"type": "string",
"x-msp-openness": "closed"
},
"PlatformOs": {
"description": "The server's operating system (SS1.4.1). Closed, for the same reason as\n[`PlatformFamily`].",
"enum": [
"macos",
"linux",
"windows"
],
"type": "string",
"x-msp-openness": "closed"
},
"PluginCatalogEntry": {
"description": "One installed plugin record (tdd SS3.26.2).",
"properties": {
"enabled": {
"description": "The record's own install switch; non-enabled rows are included\nas `false`, never dropped.",
"type": "boolean"
},
"id": {
"description": "The installed plugin's identifier.",
"type": "string"
},
"source": {
"$ref": "#/$defs/PluginSource",
"description": "The installed record's source provenance (ADR 33398 D7 item 3)."
},
"version": {
"description": "The installed version.",
"type": "string"
}
},
"required": [
"enabled",
"id",
"source",
"version"
],
"type": "object"
},
"PluginChangedParams": {
"description": "`plugin/changed` params (tdd SS3.29.5): an install landed; clients\nre-issue `plugin/list` (plus `hook/list` and `skill/list`).",
"properties": {
"enabled": {
"description": "The installed record's own switch.",
"type": "boolean"
},
"id": {
"description": "The installed record's identifier.",
"type": "string"
},
"sessionId": {
"description": "The acting session.",
"type": "string"
},
"source": {
"$ref": "#/$defs/PluginSource",
"description": "The installed-list provenance vocabulary (tdd SS3.26.2)."
},
"version": {
"description": "The installed record's version.",
"type": "string"
}
},
"required": [
"enabled",
"id",
"sessionId",
"source",
"version"
],
"type": "object"
},
"PluginInstallLocalPathTarget": {
"description": "The `plugin/install` local-path arm (tdd SS3.29.1).",
"properties": {
"path": {
"description": "The host folder to install from; absolute recommended, relative\nresolves against the host working directory.",
"type": "string"
},
"scope": {
"$ref": "#/$defs/PluginInstallScope",
"description": "The install lane; omitted means `default`."
}
},
"required": [
"path"
],
"type": "object"
},
"PluginInstallMarketplaceTarget": {
"description": "The `plugin/install` marketplace arm (tdd SS3.29.1).",
"properties": {
"marketplace": {
"description": "The configured marketplace name.",
"type": "string"
},
"name": {
"description": "The plugin name within the store.",
"type": "string"
}
},
"required": [
"marketplace",
"name"
],
"type": "object"
},
"PluginInstallParams": {
"description": "`plugin/install` params (tdd SS3.29.1). Per-session params plus a\nclient-generated `commandId` (UUIDv7) with the uniform SS3.1.1\nidempotency contract.",
"properties": {
"commandId": {
"description": "The client-generated idempotency key (UUIDv7).",
"type": "string"
},
"sessionId": {
"description": "The target session; its workspace resolves project scope.",
"type": "string"
},
"target": {
"$ref": "#/$defs/PluginInstallTarget",
"description": "Exactly one install target arm."
}
},
"required": [
"commandId",
"sessionId",
"target"
],
"type": "object"
},
"PluginInstallResult": {
"description": "`plugin/install` result (tdd SS3.29.1): the SS3.1.2 ack envelope plus\nthe installed receipt.",
"properties": {
"commandId": {
"description": "The echoed idempotency key.",
"type": "string"
},
"enabled": {
"description": "The installed record's own switch.",
"type": "boolean"
},
"id": {
"description": "The installed record's identifier.",
"type": "string"
},
"source": {
"$ref": "#/$defs/PluginSource",
"description": "The installed-list provenance vocabulary (tdd SS3.26.2)."
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "The ack status."
},
"version": {
"description": "The installed record's version.",
"type": "string"
},
"warning": {
"description": "The installer's advisory text when the install succeeded with a\ncaveat; absent otherwise.",
"type": "string"
}
},
"required": [
"commandId",
"enabled",
"id",
"source",
"status",
"version"
],
"type": "object"
},
"PluginInstallScope": {
"description": "The `plugin/install` local-path scope (tdd SS3.29.1). Closed: an\nunknown scope is `-32602 invalidParams`.",
"enum": [
"default",
"user",
"project"
],
"type": "string",
"x-msp-openness": "closed"
},
"PluginInstallTarget": {
"description": "The one structured install target (tdd SS3.29.1): a flat object with\ntwo optional arms, exactly one present — the `TurnInputPart`\nconvention, since the v1 schema model names no object-variant union.\nBoth arms or neither is `-32602 invalidParams`.",
"properties": {
"localPath": {
"$ref": "#/$defs/PluginInstallLocalPathTarget",
"description": "The local-path arm: install from a host folder."
},
"marketplace": {
"$ref": "#/$defs/PluginInstallMarketplaceTarget",
"description": "The marketplace arm: install a named plugin from a store."
}
},
"type": "object"
},
"PluginListParams": {
"description": "`plugin/list` params (tdd SS3.26.2). Per-session params; rows are the\ninstalled plugin records.",
"properties": {
"sessionId": {
"description": "The target session.",
"type": "string"
}
},
"required": [
"sessionId"
],
"type": "object"
},
"PluginListResult": {
"description": "`plugin/list` result (tdd SS3.26.2): one row per installed plugin\nrecord; the spec promises the set, not an order.",
"properties": {
"plugins": {
"description": "The installed plugin rows.",
"items": {
"$ref": "#/$defs/PluginCatalogEntry"
},
"type": "array"
}
},
"required": [
"plugins"
],
"type": "object"
},
"PluginMarketplaceAddParams": {
"description": "`plugin/marketplaceAdd` params (tdd SS3.29.2). Per-session params plus\na client-generated `commandId` (UUIDv7).",
"properties": {
"commandId": {
"description": "The client-generated idempotency key (UUIDv7).",
"type": "string"
},
"name": {
"description": "The marketplace name to configure.",
"type": "string"
},
"sessionId": {
"description": "The target session.",
"type": "string"
},
"source": {
"description": "The app's source vocabulary: `owner/repo`, a git URL, a `file://`\nURL, or a local path.",
"type": "string"
}
},
"required": [
"commandId",
"name",
"sessionId",
"source"
],
"type": "object"
},
"PluginMarketplaceChange": {
"description": "What happened to a marketplace (tdd SS3.29.6). Closed: an unknown\nchange is a contract violation, never tolerated.",
"enum": [
"added",
"updated",
"removed"
],
"type": "string",
"x-msp-openness": "closed"
},
"PluginMarketplaceChangedParams": {
"description": "`plugin/marketplaceChanged` params (tdd SS3.29.6): a marketplace was\nadded, updated, or removed.",
"properties": {
"change": {
"$ref": "#/$defs/PluginMarketplaceChange",
"description": "What happened."
},
"name": {
"description": "The marketplace name.",
"type": "string"
},
"pluginCount": {
"description": "The stored record's plugin count; omitted on `removed`, never\nfabricated.",
"type": "integer"
},
"sessionId": {
"description": "The acting session.",
"type": "string"
},
"skippedCount": {
"description": "The stored record's skipped count; omitted on `removed`, never\nfabricated.",
"type": "integer"
}
},
"required": [
"change",
"name",
"sessionId"
],
"type": "object"
},
"PluginMarketplaceRecordResult": {
"description": "The stored marketplace record both add and update answer (tdd\nSS3.29.2, SS3.29.3): the SS3.1.2 ack envelope plus the record.",
"properties": {
"commandId": {
"description": "The echoed idempotency key.",
"type": "string"
},
"name": {
"description": "The configured marketplace name.",
"type": "string"
},
"pluginCount": {
"description": "The plugins the store now offers.",
"type": "integer"
},
"skipped": {
"description": "Entries the store could not offer, with the reason each was\nskipped; empty when nothing was skipped.",
"items": {
"$ref": "#/$defs/PluginMarketplaceSkippedEntry"
},
"type": "array"
},
"source": {
"$ref": "#/$defs/PluginMarketplaceSourceShape",
"description": "The normalized stored source."
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "The ack status."
}
},
"required": [
"commandId",
"name",
"pluginCount",
"skipped",
"source",
"status"
],
"type": "object"
},
"PluginMarketplaceRemoveParams": {
"description": "`plugin/marketplaceRemove` params (tdd SS3.29.4). Per-session params\nplus a client-generated `commandId` (UUIDv7).",
"properties": {
"commandId": {
"description": "The client-generated idempotency key (UUIDv7).",
"type": "string"
},
"name": {
"description": "The marketplace name to remove.",
"type": "string"
},
"sessionId": {
"description": "The target session.",
"type": "string"
}
},
"required": [
"commandId",
"name",
"sessionId"
],
"type": "object"
},
"PluginMarketplaceRemoveResult": {
"description": "`plugin/marketplaceRemove` result (tdd SS3.29.4): the SS3.1.2 ack\nenvelope plus the removed name.",
"properties": {
"commandId": {
"description": "The echoed idempotency key.",
"type": "string"
},
"name": {
"description": "The removed marketplace name.",
"type": "string"
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "The ack status."
}
},
"required": [
"commandId",
"name",
"status"
],
"type": "object"
},
"PluginMarketplaceSkippedEntry": {
"description": "One skipped marketplace entry (tdd SS3.29.2).",
"properties": {
"plugin": {
"description": "The skipped plugin.",
"type": "string"
},
"reason": {
"description": "Why it was skipped.",
"type": "string"
}
},
"required": [
"plugin",
"reason"
],
"type": "object"
},
"PluginMarketplaceSourceShape": {
"description": "The normalized stored marketplace source (tdd SS3.29.2).",
"properties": {
"kind": {
"description": "The stored source kind.",
"type": "string"
},
"path": {
"description": "The stored source path.",
"type": "string"
}
},
"required": [
"kind",
"path"
],
"type": "object"
},
"PluginMarketplaceUpdateParams": {
"description": "`plugin/marketplaceUpdate` params (tdd SS3.29.3). Per-session params\nplus a client-generated `commandId` (UUIDv7).",
"properties": {
"commandId": {
"description": "The client-generated idempotency key (UUIDv7).",
"type": "string"
},
"name": {
"description": "The marketplace name to refresh.",
"type": "string"
},
"sessionId": {
"description": "The target session.",
"type": "string"
}
},
"required": [
"commandId",
"name",
"sessionId"
],
"type": "object"
},
"PluginSource": {
"description": "A plugin row's source provenance (tdd SS3.26.2, ADR 33398 D7 item 3):\ncamelCase of `PluginSourceProvenance`. Open (server-produced result\nvocabulary, the #22785 enum-openness rule): a future provenance is\nadditive.",
"enum": [
"curated",
"marketplaceUserAdded",
"foreignImport",
"nativeLocal"
],
"type": "string",
"x-msp-openness": "open"
},
"ProbeDegradedReason": {
"description": "Why a workspace status probe produced no fresh reading (#35065 item 2).\n\n**Open**: a new reason is additive evolution, and a client MUST render an\nunknown value as an unknown-but-present reason rather than rejecting the\nrow.",
"enum": [
"skippedUntrusted",
"skippedSandboxUnavailable",
"probeFailed"
],
"type": "string",
"x-msp-openness": "open"
},
"PrunedSubagent": {
"description": "One child session pruned below a checkpoint boundary (tdd SS2.5.5,\nADR 71910 D8): the restored row's key, text, and stoppability —\nnever pruned transcript.",
"properties": {
"label": {
"description": "The served display label (the spawn's role, agent path as\nfallback); absent when the spawn records carry neither.",
"type": "string"
},
"sessionId": {
"description": "The child session id — the trace key for `session/read` on the\nchild, exactly as for a live child row.",
"type": "string"
},
"status": {
"description": "`running`, `completed`, or `failed`; absent reads as `running`.",
"type": "string"
}
},
"required": [
"sessionId"
],
"type": "object"
},
"QueuedInput": {
"description": "One input still queued for delivery to a session (tdd SS2.5.5,\nADR 63254-queued-inputs-on-read D2): the full message body plus its\nlog record sequence, the delivery-order and re-read dedupe key, plus\nthe run-log record id clients join served entries against\nrecord-seeded rows by.",
"properties": {
"sequence": {
"description": "The queued record's log sequence: delivery order, and the key\nclients deduplicate re-reads by.",
"type": "integer"
},
"sourceCommandId": {
"description": "The `SubagentInput` record's model-authored command id: the key\nwire-twin rows join by in either order (the twin reads the same\nstring from the verbatim wire args). Absent for root own-queue\nmembers, which are never `SubagentInput`.",
"type": "string"
},
"sourceRunRecordId": {
"description": "The run-log record id the served mirror was taken from: the key\nclients join served entries against record-seeded rows by, so an\nalready-rendered input never mints a second row under diverged\nsequences. Absent when the host's record carries no mirror\nmetadata (a pre-feature host), which falls back to sequence-key\ndedup only.",
"type": "string"
},
"text": {
"description": "The full message body, verbatim (never truncated, never a summary).",
"type": "string"
}
},
"required": [
"sequence",
"text"
],
"type": "object"
},
"QuotaDetail": {
"description": "Typed quota-exhaustion detail (tdd SS4.5.1, ADR 50047 D2): the limit\nkind plus the provider's reset instant.",
"properties": {
"limitKind": {
"$ref": "#/$defs/LimitKind",
"description": "Which quota was exhausted (open enum; unknown values fall back)."
},
"resetsAtMs": {
"description": "Epoch milliseconds at which the provider says usage resets.",
"type": "integer"
}
},
"required": [
"limitKind",
"resetsAtMs"
],
"type": "object"
},
"ReasoningEffort": {
"description": "The reasoning-effort tier sampled at submission (tdd SS3.2, SS3.3). The\n**same closed tier vocabulary** on both the fresh-turn and steer lanes,\nspelled identically; invalid tiers are invalid params. `none` is a tier of\nthe vocabulary (ask for no reasoning), not a way to say \"unset\".",
"enum": [
"none",
"minimal",
"low",
"medium",
"high",
"xhigh",
"max",
"ultra"
],
"type": "string",
"x-msp-openness": "closed"
},
"ReasoningEffortChangeSource": {
"description": "What drove a reasoning-effort default change (tdd SS4.6.9). Open; v1's\nonly producer is `user` (an accepted `session/setReasoningEffort`).",
"enum": [
"user",
"default",
"policy"
],
"type": "string",
"x-msp-openness": "open"
},
"ReasoningEffortState": {
"description": "The snapshot's standing session-default reasoning effort (tdd SS4.9.1,\nADR 31255 D1): the fold of the latest completed\n`runtime.reasoning_effort_reconfigure` fact — the same pair\n`session/reasoningEffortChanged` carries.",
"properties": {
"reasoningEffort": {
"$ref": "#/$defs/ReasoningEffort",
"description": "The standing default tier — the closed SS3.2 vocabulary, spelled\nidentically to `turn/start.reasoningEffort`."
},
"source": {
"$ref": "#/$defs/ReasoningEffortChangeSource",
"description": "Which actor class set the default."
}
},
"required": [
"reasoningEffort",
"source"
],
"type": "object"
},
"RecapCancelParams": {
"description": "`recap/cancel` params (tdd SS3.28.5): the session plus the cancel's\nown retry id. No target — one in-flight slot per session makes the\ntarget unambiguous.",
"properties": {
"commandId": {
"description": "The cancel's own retry id (required, SS3.1.1).",
"type": "string"
},
"sessionId": {
"description": "The session whose in-flight recap to cancel (required).",
"type": "string"
}
},
"required": [
"commandId",
"sessionId"
],
"type": "object"
},
"RecapCancelResult": {
"description": "`recap/cancel` result (tdd SS3.28.5): admission only. In flight →\nthe recap settles `cancelled`; idle → accepted no-op.",
"properties": {
"commandId": {
"description": "The cancel's id, echoed.",
"type": "string"
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "Always `accepted` on this path."
}
},
"required": [
"commandId",
"status"
],
"type": "object"
},
"RecapCompletedParams": {
"description": "`recap/completed` params (tdd SS3.28.2): the settlement, delivered\nto the requesting connection outside the view stream — no\n`viewCursor`, no `sourceRange`. `text` is required on `completed`\n(plus optional `title`, untrusted model output — clients MUST\nsanitize per spec 442 INV-015); `reason` is required on `failed`;\nneither rides `cancelled`/`timedOut`. The struct marks the\nconditional members optional; the SS prose pins the per-outcome\nrule, the `turn/completed` usage/error convention.",
"properties": {
"commandId": {
"description": "The request's id — the correlation key.",
"type": "string"
},
"outcome": {
"$ref": "#/$defs/RecapOutcome",
"description": "How the request settled."
},
"reason": {
"$ref": "#/$defs/RecapFailureReason",
"description": "Why the side-call failed (on `failed`)."
},
"sessionId": {
"description": "The recapped session.",
"type": "string"
},
"text": {
"description": "The recap text verbatim (on `completed`).",
"type": "string"
},
"title": {
"description": "The model-produced short title (on `completed`, when produced).",
"type": "string"
}
},
"required": [
"commandId",
"outcome",
"sessionId"
],
"type": "object"
},
"RecapFailureReason": {
"description": "`recap/completed` failure reason (tdd SS3.28.2/SS3.28.8): post-ack\nfailures fold to the single initial value. **Open**: later splits\nstay additive (#22785 E2).",
"enum": [
"providerFailed"
],
"type": "string",
"x-msp-openness": "open"
},
"RecapOutcome": {
"description": "`recap/completed` outcome: the terminal vocabulary, in camelCase. **Open**:\na server-produced result vocabulary.",
"enum": [
"completed",
"failed",
"cancelled",
"timedOut"
],
"type": "string",
"x-msp-openness": "open"
},
"RecapRequestParams": {
"description": "`recap/request` params (tdd SS3.28.1): the session plus the\nclient-minted UUIDv7 retry id. No other param; unknown fields are\n`invalidParams`.",
"properties": {
"commandId": {
"description": "The client-minted retry id (required, SS3.1.1).",
"type": "string"
},
"sessionId": {
"description": "The session to recap (required).",
"type": "string"
}
},
"required": [
"commandId",
"sessionId"
],
"type": "object"
},
"RecapRequestResult": {
"description": "`recap/request` result (tdd SS3.28.1): admission only — the ack is\nnever the recap.",
"properties": {
"commandId": {
"description": "The request's id, echoed.",
"type": "string"
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "Always `accepted` on this path."
}
},
"required": [
"commandId",
"status"
],
"type": "object"
},
"RecordPosition": {
"description": "One end of a [`SourceRange`]: a record's event id and its sequence number\nwithin the stream (tdd SS4.2).",
"properties": {
"id": {
"description": "The record's event id.",
"type": "string"
},
"sequence": {
"description": "The record's sequence number within its stream.",
"type": "integer"
}
},
"required": [
"id",
"sequence"
],
"type": "object"
},
"RecoveryEffectiveSource": {
"description": "Proven effective-choice provenance, independently of input presence.",
"enum": [
"request",
"retained",
"legacyOmission",
"hostPolicy",
"unknown"
],
"type": "string",
"x-msp-openness": "open"
},
"RecoveryMode": {
"description": "A requested construction choice; omission is distinct from explicit OFF.",
"enum": [
"on",
"off"
],
"type": "string",
"x-msp-openness": "closed"
},
"RecoveryObservation": {
"description": "One coherent producer snapshot; all members are required and non-null.",
"properties": {
"constructionId": {
"type": "string"
},
"effectiveMode": {
"$ref": "#/$defs/RecoveryObservedMode"
},
"effectiveSource": {
"$ref": "#/$defs/RecoveryEffectiveSource"
},
"qualification": {
"$ref": "#/$defs/RecoveryQualification"
},
"requestedMode": {
"$ref": "#/$defs/RecoveryObservedMode"
},
"sessionId": {
"type": "string"
}
},
"required": [
"constructionId",
"effectiveMode",
"effectiveSource",
"qualification",
"requestedMode",
"sessionId"
],
"type": "object"
},
"RecoveryObservedMode": {
"description": "A proven mode or unknown; future strings cannot establish OFF.",
"enum": [
"on",
"off",
"unknown"
],
"type": "string",
"x-msp-openness": "open"
},
"RecoveryQualification": {
"description": "This construction's assessment, never an operation acceptance receipt.",
"enum": [
"qualified",
"unavailable",
"notRequired",
"unknown"
],
"type": "string",
"x-msp-openness": "open"
},
"ReplayHint": {
"description": "The D26 first-tree-transition hint verdict plus anchor (tdd\nSS4.5.21, ADR 56496 D3): `rowKinds` is the open lowercase row-kind\nvocabulary the client formats through its shared kind-noun\nconstructor; `afterItemId` is the item id after whose rows the\nhint renders. Both members always ride when the object does.",
"properties": {
"afterItemId": {
"type": "string"
},
"rowKinds": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"afterItemId",
"rowKinds"
],
"type": "object"
},
"Request": {
"description": "A request frame, either direction (SS1.2 §2.1).",
"properties": {
"id": {
"$ref": "#/$defs/RequestId",
"description": "Client-chosen id, unique among that client's in-flight requests."
},
"jsonrpc": {
"$ref": "#/$defs/JsonRpcVersion",
"description": "The literal `\"2.0\"`."
},
"method": {
"description": "Slash-namespaced camelCase method name.",
"type": "string"
},
"params": {
"description": "Method-specific parameters; omitted entirely when empty, never `null`.",
"properties": {},
"type": "object"
},
"trace": {
"$ref": "#/$defs/TraceContext",
"description": "W3C trace passthrough (SS1.8); requests only."
}
},
"required": [
"id",
"jsonrpc",
"method"
],
"type": "object"
},
"RequestId": {
"description": "A request id (SS1.3): client-chosen string or integer. `1` and `\"1\"` do\nnot compare equal; each direction owns its own id space.",
"type": [
"integer",
"string"
]
},
"RequestReceipt": {
"description": "The SS5.3.3 presentation receipt — the client's response to a\nserver-initiated request (`approval/request`, `userInput/request`).\n\nThe response acknowledges presentation only (\"a surface showed or will\nshow this\"): it changes no state, the server uses it for diagnostics\nalone, and the decision/answer travels as a command (`approval/decide`,\n`userInput/answer`). An error response or a dropped connection means this\nconnection could not present the request; the approval or prompt stays\npending and the request is re-issued on the next subscribe (SS5.6).\nThere is no dismiss-without-deciding on the wire.",
"properties": {},
"type": "object"
},
"RetractOutcome": {
"description": "A `turn/retracted` settlement outcome (tdd SS4.5.1, ADR 50074 D1).\nOpen enum (D-033): decode is tolerant — a value outside the list reads\nas `Accepted` (the event's historical meaning — pre-feature hosts emit\nit only for accepted retracts), never fails. The bundle keeps\nenumerating the known values for codegen and docs.",
"enum": [
"accepted",
"declined"
],
"type": "string",
"x-msp-openness": "open"
},
"RuntimeWorktree": {
"description": "The runtime-owned git worktree a child session runs in, mirrored from the\n`subagent.worktree.*` records on its parent's log (tdd SS2.5.5, ADR\n50042-child-worktree-on-read D2). The four enums are open: clients\ntreat an unknown value as unknown.",
"properties": {
"baseCommit": {
"description": "The commit the worktree was created from.",
"type": "string"
},
"cleanupDiagnostic": {
"description": "The cleanup outcome's recorded diagnostic, verbatim (#70088); absent\nwhen the outcome records none.",
"type": "string"
},
"cleanupPolicy": {
"$ref": "#/$defs/RuntimeWorktreeCleanupPolicy",
"description": "How the worktree is cleaned up."
},
"cleanupReason": {
"$ref": "#/$defs/RuntimeWorktreeCleanupReason",
"description": "Why cleanup kept the worktree or failed, as the cleanup outcome\nrecorded it (#70088); absent when the outcome records no reason."
},
"cleanupState": {
"$ref": "#/$defs/RuntimeWorktreeCleanupState",
"description": "Where the worktree's cleanup stands."
},
"headCommit": {
"description": "The head commit the active lease recorded.",
"type": "string"
},
"ownership": {
"$ref": "#/$defs/RuntimeWorktreeOwnership",
"description": "Who owns the worktree."
},
"parentDirtyExcluded": {
"description": "True exactly when the parent's uncommitted changes were recorded as\nexcluded from the checkout.",
"type": "boolean"
},
"worktreeRoot": {
"description": "The recorded worktree root, verbatim (recorded history; serving it\nnever probes the path).",
"type": "string"
}
},
"required": [
"baseCommit",
"cleanupPolicy",
"cleanupState",
"headCommit",
"ownership",
"parentDirtyExcluded",
"worktreeRoot"
],
"type": "object"
},
"RuntimeWorktreeCleanupPolicy": {
"description": "How a session's worktree is cleaned up. The set is open, so newer hosts\nmay send other values.",
"enum": [
"removeIfClean"
],
"type": "string",
"x-msp-openness": "open"
},
"RuntimeWorktreeCleanupReason": {
"description": "Why a session's worktree cleanup kept the worktree or failed. The set is\nopen, so newer hosts may send other values.",
"enum": [
"dirtyWorktree",
"headChanged",
"pathEscape",
"cleanupFailed",
"uncertainLeaseState"
],
"type": "string",
"x-msp-openness": "open"
},
"RuntimeWorktreeCleanupState": {
"description": "Where a session's worktree cleanup stands. The set is open, so newer\nhosts may send other values.",
"enum": [
"active",
"cleaned",
"retained",
"cleanupFailed"
],
"type": "string",
"x-msp-openness": "open"
},
"RuntimeWorktreeOwnership": {
"description": "Who owns a session's worktree. The set is open, so newer hosts may send\nother values.",
"enum": [
"runtimeOwned"
],
"type": "string",
"x-msp-openness": "open"
},
"SandboxAvailability": {
"description": "Whether this host can enforce the sandbox (ADR\n50064-startup-report-sandbox-availability D2/D4). A property of the host\nprocess, probed once at construction and identical for every session and\nevery connection it serves — never requested, granted, or negotiated,\nwhich is why it is not a capability. Open: a future enforcement posture\narrives as a new value, read by older clients as unknown.",
"enum": [
"available",
"unavailable"
],
"type": "string",
"x-msp-openness": "open"
},
"SandboxUnavailableReason": {
"description": "Why sandbox enforcement is impossible on this host. Sent only when\n[`SandboxAvailability`] is `unavailable`; a client MUST NOT infer a\nreason when none is sent. Open: a future reason arrives as a new\nvalue, read by older clients as unknown.",
"enum": [
"userNamespacesDenied",
"bubblewrapUnavailable"
],
"type": "string",
"x-msp-openness": "open"
},
"SchemaInfo": {
"description": "The `schema` pair in [`InitializeResult`] (SS1.4.1, SS1.5.3). `version`\nis the wire **envelope** schema version — distinct from the session-view\n`schemaVersion`, the raw-log `schema_version`, and the 0.x/1.0 stability\nposture, which is not on the wire at all (INV-006a).",
"properties": {
"experimentalFingerprint": {
"description": "`sha256:<64 lower hex>` content hash of this server binary's\nexperimental-surface bundle (ADR 97527 D5). Additive-optional: a\nhost that predates the member omits it, and the reader treats\nabsence as unknown — never a guessed value (SS1.5.4).",
"pattern": "^sha256:[0-9a-f]{64}$",
"type": "string"
},
"fingerprint": {
"description": "`sha256:<64 lower hex>` content hash of this server binary's\nstable-surface bundle (INV-003). A mismatch is a warning condition,\nnot an error (SS1.4.1).",
"pattern": "^sha256:[0-9a-f]{64}$",
"type": "string"
},
"version": {
"description": "Envelope schema version; `1` in v1, expected to stay `1` for a long\ntime (SS1.4.1).",
"type": "integer"
}
},
"required": [
"fingerprint",
"version"
],
"type": "object"
},
"ServerInfo": {
"description": "Server identification inside [`InitializeResult`].",
"properties": {
"name": {
"description": "Server name.",
"type": "string"
},
"version": {
"description": "Server version string.",
"type": "string"
}
},
"required": [
"name",
"version"
],
"type": "object"
},
"Session": {
"description": "The session object every lifecycle method returns or lists (tdd SS2.4).\n\nAdditive-optional evolution applies: clients must ignore unknown fields.",
"properties": {
"activeTurnId": {
"description": "The `turnId` of the current foreground turn when a turn is in\nflight (parked under `needsInput` included), and `null` otherwise\n(tdd SS2.4, ADR 95605 D1).\n\n**Required-nullable.** Every served `Session` carries the member: `null`\nwhen no turn is in flight or the session is not loaded, the turn id\nwhen one is. An optional-absent shape would publish it as plain\n`string` and reject every idle `Session` frame the host sends.",
"type": [
"string",
"null"
]
},
"approvalMode": {
"$ref": "#/$defs/EffectiveApprovalModeState",
"description": "The folded effective approval mode. **Additive-optional**: a Session\nobject that omits it means the host has not folded a mode, which is\nwhy the index-derived `session/list` entry may legitimately omit it\n(tdd SS2.4, SS5.12)."
},
"attention": {
"description": "Attention flags (tdd SS2.4, ADR 31983 D3). **Additive-optional**,\npresent only when at least one flag is set; absence is a\nNON-assertion (nothing pending, or the loaded session's pending\nsource declined to answer). Loaded sessions only: a `notLoaded` row\nomits it even while its durable pending set is non-empty.",
"items": {
"$ref": "#/$defs/AttentionFlag"
},
"type": "array"
},
"branch": {
"description": "Derived workspace branch (tdd SS2.14.1, #27598) — the index's last\nderived value; the live-change signal stays `session/branchChanged`\n(SS4.6.4). **Additive-optional**, omitted when underivable.",
"type": "string"
},
"createdAt": {
"description": "RFC3339. For a fork this is the fork session id's UUIDv7 mint instant\n(tdd SS2.4).",
"type": "string"
},
"createdByClient": {
"$ref": "#/$defs/ClientInfo",
"description": "The handshake `ClientInfo` recorded when the session was opened\n(FR-003), echoed verbatim — provenance, never an interpretation, and\nnever a visibility gate (INV-005). **Additive-optional**; absence has\nfour indistinguishable causes (INV-004): an in-process open; a\npre-#23124 record; a half stamp where only one of name/version was\nrecorded (FM-005) and `ClientInfo` requires both; and a session with\nno admitting handshake of its own — a fork child or a subagent —\nwhich never carries a stamp to begin with."
},
"driveHolder": {
"$ref": "#/$defs/ClientInfo",
"description": "The handshake `ClientInfo` of the connection that currently holds\nthis session's drive grant (spec 39851 INV-001; spec 42713\nFR-58706-1, ADR 58706 D2), served on `session/read` only, as `name`\nand `version` (the handshake's\ndisplay `title` is never served, the `createdByClient` rule).\n**Additive-optional, loaded-only, live**:\npresent exactly when a live connection holds the grant and its\nhandshake is known; absent on `notLoaded` rows, once the holder's\nconnection drops (its orphaned turn included), and for a holder with\nno handshake stamp. Provenance only\n(INV-005): whether a client may drive is answered by\n`session/resume` / `turn/start` (`sessionInUse`), never by this\nmember (FR-58706-4)."
},
"externalWait": {
"$ref": "#/$defs/ExternalWaitView",
"description": "The live host-declared external wait for this session, served on\n`session/read` only.\n**Additive-optional, loaded-only, live**: present exactly while\na declaration is live for the loaded session; absent on\n`notLoaded` rows, once the declaration is cleared, once the next\nuser input clears it, and after a restart or resume, which lose\nit. Presence is the declaration — a client must never infer one\nfrom any other member."
},
"firstUserPrompt": {
"description": "Derived first-user-prompt preview (tdd SS2.14.1, #27598).\n**Additive-optional**, omitted when underivable.",
"type": "string"
},
"forkedFrom": {
"anyOf": [
{
"$ref": "#/$defs/ForkProvenance"
},
{
"type": "null"
}
],
"description": "`null` for root sessions; fork provenance otherwise (tdd SS2.4)."
},
"generatedName": {
"description": "The served generated short title (tdd SS2.4/SS2.14.1, #50048; ADR\n50048-generated-name D1). **Additive-optional**, **fold-only**: the\nsnapshot fold derives the latest retained generated pair's short\ntitle from the log; `session/list` rows never carry it. Omitted when\nno pair was ever published — absent reads as unpublished, never\nfabricated, never inferred from the name text. `name` stays the\ncanonical name it always was.",
"type": "string"
},
"itemCount": {
"description": "The published head's ordinal (kt-dvw5): the head reference's own\nordinal — the count of head slots in its sequence, including any\nreserved ones — as of the probe that served this row. A sizing\nhint for a first `view/page`, so the Console can size its page\nwithout folding the log. **Additive-optional**, present only on\nmetadata reads (`session/read` with `excludeItems`), where the\nclient has no items to count; full reads carry the items\nthemselves and omit it. Absent when no head is published (unknown),\nnever fabricated. May lag a live log: the head is a snapshot, and\nappends after its publication are not counted.",
"type": "integer"
},
"kind": {
"$ref": "#/$defs/SessionKind",
"description": "What kind of session this is (spec 42713 FR-001, ADR 42713 D1/D4).\n**Open enum**, v1 values `\"root\"` and `\"subagent\"`; a client treats an\nunknown value as an unknown-but-present kind and renders it, never\nrejecting the row. **Additive-optional**: absence asserts nothing —\nthe host could not determine the home shape (FM-001), or the value is\nnot yet available to serve (FM-003)."
},
"lastActivityAt": {
"description": "Content-activity recency, RFC3339 (tdd SS2.4, ADR 31983 D5).\n**Additive-optional**: omitted when no content record exists. Never\nadvanced by lifecycle bookkeeping (the resume marker, re-stamps) or\na fork's copied seed-replay records, and never precedes `createdAt`.",
"type": "string"
},
"logBytes": {
"description": "The durable log's byte length at read time (kt-dvw5): the size hint\npaired with `itemCount`, so the Console can size its first page\nwithout folding the log. **Additive-optional**, present only on\nmetadata reads (`session/read` with `excludeItems`); full reads omit\nit. Absent when the log's length is not known (unknown), never\nfabricated. A live log grows after the read; the value is a snapshot.",
"type": "integer"
},
"modelId": {
"description": "The winning metadata fold's model; `null` when that record omits it.",
"type": [
"string",
"null"
]
},
"name": {
"description": "The durable allocated session name (tdd SS2.4/SS2.14.1, #27598;\nADR 27598 D2/D4). **Additive-optional**: present when the serving path\nholds an allocated name, omitted otherwise — absent is never\nfabricated. Authoritative and renameable via `session/rename`.",
"type": "string"
},
"nameOrigin": {
"$ref": "#/$defs/SessionNameOrigin",
"description": "How the served `name` was set (tdd SS2.4/SS2.14.1, #50048; ADR 50048\nD1/D2). **Additive-optional**, **fold-only**: the snapshot fold\n(`session/read`, the resume/start/fork-ack snapshot) derives and\ncarries it from the log; `session/list` rows never carry it. Absent —\nand any value the client does not recognize — reads as unknown,\nnever fabricated."
},
"parentSessionId": {
"description": "The containing session's id when `kind` is `\"subagent\"` (FR-002,\nINV-002) — the id of the TOP-LEVEL session whose home holds this\nchild, which is **not necessarily the session that spawned it**:\nnative-child homes are physical siblings under the outer session's\n`subagent/` directory, so a subagent spawned by another subagent\nresolves to the outer session, not to its spawner. A client building\na tree from this field gets one level, not a chain.\nFlat rather than nested: there is exactly one fact to\ncarry, unlike `forkedFrom`'s structured `ForkProvenance`.\n**Additive-optional**; a root carries none.",
"type": "string"
},
"path": {
"description": "Absolute path of the session's durable log; non-nullable. Under the\nephemeral session profile it is the **empty string**, meaning \"no\ndurable log exists\" (tdd SS2.13.2) — the one value a client must not\nhand to a filesystem call.",
"type": "string"
},
"probeDegradedReason": {
"$ref": "#/$defs/ProbeDegradedReason",
"description": "Why the workspace status probe produced no fresh reading (#35065\nitem 2) — the index's last derived value, like `branch`, so the TUI\ncan show WHY status is unavailable instead of a generic unavailable.\n**Additive-optional**, omitted when the latest probed observation\ncarries no reason or none exists. **Open enum**: a client treats an\nunknown-but-present reason and renders it, never rejecting the row."
},
"providerId": {
"description": "The winning metadata fold's provider; `null` when that record omits it.",
"type": [
"string",
"null"
]
},
"resumedByClient": {
"$ref": "#/$defs/ClientInfo",
"description": "The handshake `ClientInfo` of the connection whose wire\n`session/resume` most recently loaded this session (spec 42713\nFR-58706-2, ADR 58706 D2): stamped on the durable `session.resumed`\nmarker, folded into the session index, and served from that column by\nevery carrier; while the session is loaded, the stamp the loading\nresume wrote replaces the column on every carrier (the ack,\n`session/read`, `session/list`, `session/listChanged`), and after the\nnext fold the column serves it. **Additive-optional** and\n**provenance only** (INV-005); a resume with no admitting handshake\n(TUI, exec) stamps nothing, a warm attach to an already-loaded session\nwrites no marker, and a half stamp serves nothing (FR-003a), so\nabsence asserts nothing. `createdByClient` never follows a resume\n(FR-58706-3)."
},
"sessionId": {
"description": "The session identity.",
"type": "string"
},
"sideFrom": {
"anyOf": [
{
"$ref": "#/$defs/SideProvenance"
},
{
"type": "null"
}
],
"description": "`null` for root sessions and forks; side provenance otherwise (tdd\nSS2.4/SS2.5.7; ADR 45435 D2). A session carries at most one of\n`forkedFrom` and `sideFrom`."
},
"spawnedBy": {
"$ref": "#/$defs/SessionSpawnedBy",
"description": "The session that opened this one (spec 42713 FR-69621-6, ADR 69621\nD4), recorded once in this session's creation record and served from\nthe session index. Unlike the containing session `parentSessionId`\nnames above, its `parentSessionId` is the exact spawner, except that\nany `muse` started in a later pane of the worker's tmux session or\nHerdr workspace names the worker's manager and carries the worker's\n`project`/`thread` labels (ADR 69621 D8); `project` and `thread` are\nopaque labels the spawner may name beside it.\n**Additive-optional** and **provenance only** (INV-005): never a\nvisibility or authority gate. Absence asserts nothing — no recorded\nspawner, a later session of the spawned process, a row folded before\nthe member existed, or a session the index has not folded yet."
},
"status": {
"$ref": "#/$defs/SessionStatus",
"description": "Load state as this host knows it; `session/list` reports `notLoaded`\nfor sessions loaded by *other* hosts (tdd SS2.4)."
},
"title": {
"description": "Derived display title (tdd SS2.14.1, #27598): a heuristic that may\nevolve — its carriage, not its derivation, is the contract.\n**Additive-optional**, omitted when underivable.",
"type": "string"
},
"turnCount": {
"description": "Completed-turn count from the session view fold (tdd SS2.4).",
"type": "integer"
},
"updatedAt": {
"description": "RFC3339; never precedes `createdAt` (tdd SS2.4).",
"type": "string"
},
"workspaceRoot": {
"description": "The winning metadata fold's workspace root; `null` when that record\nomits it — absent is never fabricated (tdd SS2.4).",
"type": [
"string",
"null"
]
}
},
"required": [
"activeTurnId",
"createdAt",
"forkedFrom",
"modelId",
"path",
"providerId",
"sessionId",
"status",
"turnCount",
"updatedAt",
"workspaceRoot"
],
"type": "object"
},
"SessionApprovalModeChangedParams": {
"description": "`session/approvalModeChanged` params (tdd SS5.12): the fold of the\ndurable approval-mode reconfigure audit fact — every accepted change\nwrites one; a mode flip without an audit fact is a runtime bug by design.",
"properties": {
"clientName": {
"description": "The requesting client's `clientInfo.name` (tdd SS1.4.1), recorded on\nthe audit fact.",
"type": "string"
},
"commandId": {
"description": "The command that changed it.",
"type": "string"
},
"mode": {
"$ref": "#/$defs/ApprovalMode",
"description": "The mode now in effect."
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"source": {
"$ref": "#/$defs/ApprovalModeSource",
"description": "How the mode took effect."
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The durable records this event folded from."
},
"viewCursor": {
"description": "Opaque, strictly monotonic view cursor (tdd SS4.1).",
"type": "string"
}
},
"required": [
"clientName",
"commandId",
"mode",
"sessionId",
"source",
"sourceRange",
"viewCursor"
],
"type": "object"
},
"SessionBranchChangedParams": {
"description": "`session/branchChanged` params (tdd SS4.6.4): a durable workspace-branch\nobservation landed.",
"properties": {
"branch": {
"description": "The observed branch; `null` on a detached-HEAD observation — a fact,\nnot \"unchanged\" (tdd SS4.6.4).",
"type": [
"string",
"null"
]
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The durable records this event folded from."
},
"vcs": {
"$ref": "#/$defs/Vcs",
"description": "The detected version-control system; absent when no repository was\ndetected."
},
"viewCursor": {
"description": "Opaque, strictly monotonic view cursor (tdd SS4.1).",
"type": "string"
},
"workspaceRoot": {
"description": "The observed workspace root.",
"type": "string"
}
},
"required": [
"branch",
"sessionId",
"sourceRange",
"viewCursor",
"workspaceRoot"
],
"type": "object"
},
"SessionClearExternalWaitParams": {
"description": "`session/clearExternalWait` params.",
"properties": {
"sessionId": {
"description": "The loaded session the declaration is cleared for.",
"type": "string"
}
},
"required": [
"sessionId"
],
"type": "object"
},
"SessionClearExternalWaitResult": {
"description": "`session/clearExternalWait` result: no declaration is live.",
"properties": {
"declared": {
"description": "Always `false` on a successful clear: no declaration is live.",
"type": "boolean"
}
},
"required": [
"declared"
],
"type": "object"
},
"SessionClosedParams": {
"description": "`session/closed` params (tdd SS2.6.2; enrolled by #33065): a loaded\nsession was unloaded from this host, broadcast to every initialized\nconnection. After it, the session is `notLoaded`; the log remains on disk\nand `session/resume` reloads it. A crash emits nothing — only the\norderly unload paths do (idle unload, host shutdown and a released\n`session/leave`), and each writes the durable `SessionEnd` record first.",
"properties": {
"reason": {
"$ref": "#/$defs/SessionClosedReason",
"description": "Which orderly unload path fired."
},
"sessionId": {
"description": "The unloaded session.",
"type": "string"
},
"viewCursor": {
"description": "The final view head; a client that stores it can later\n`session/resume {cursor}` and receive exactly the (empty) suffix. An\n**opaque** view cursor: clients relay it, never parse it (tdd SS4.1).\n\n**Required-nullable**: the producers always write the member and\nwrite `null` when the final fold failed at unload (`session/idle.rs`,\n`serve/shutdown.rs`; PR #16779 review) — the host defines no cursor\nvalues of its own and never invents one, and the subscriber still\nlearns the session closed.",
"type": [
"string",
"null"
]
}
},
"required": [
"reason",
"sessionId",
"viewCursor"
],
"type": "object"
},
"SessionClosedReason": {
"description": "The SS2.6.2 closed-reason vocabulary. Server-produced and published\nOPEN by owner ruling — the #33065 menu-B pick (PR #33201 comment\n5638727249, recorded in the enrollment decision record), which settles\nthat this notification reason enum publishes open rather than resting on\nE2's result-vocabulary rule by analogy. A crash is deliberately not a\nreason, because a crash emits no notification at all.",
"enum": [
"idle",
"hostShutdown",
"leave"
],
"type": "string",
"x-msp-openness": "open"
},
"SessionCompactParams": {
"description": "`session/compact` params (tdd SS3.7): manually compact the session's\nconversation context — the `/compact` gesture. Compaction runs\nasynchronously; the ack is admission only.",
"properties": {
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"sessionId": {
"description": "The target session.",
"type": "string"
},
"turnId": {
"description": "The run whose context to compact. Omit and the server resolves the\nsession's current/latest run; a session with no resolvable run rejects\nwith `commandRejected` reason `missing_run` (tdd SS3.7). Any\nsyntactically valid UUID: a turn from an older session may carry a v4\nor v5 id. A malformed id is `invalidParams`.",
"type": "string"
}
},
"required": [
"commandId",
"sessionId"
],
"type": "object"
},
"SessionCompactResult": {
"description": "`session/compact` result (tdd SS3.7). Failures *after* admission\n(`summarizer_failed`, `install_rejected`, `cancelled`) are not wire errors\n— they arrive as the compaction's terminal view event.",
"properties": {
"commandId": {
"description": "Echoes the client's id.",
"type": "string"
},
"reason": {
"description": "Why the command was a noop, e.g. `no_compactable_history`. Present on\na `noop` status (tdd SS3.7).",
"type": "string"
},
"status": {
"$ref": "#/$defs/CompactStatus",
"description": "Admission status, or `noop`."
}
},
"required": [
"commandId",
"status"
],
"type": "object"
},
"SessionConfig": {
"description": "The open configuration extension object shared by `session/start` and\n`session/resume` (ADR 32760 D1).\n\nUnknown keys are ignored on the wire, never rejected: the live decoder\ntolerates them, and no exported bundle carries `additionalProperties:\nfalse`. The Rust typed model's `deny_unknown_fields` is internal and never\nexported — the closedness export applies nowhere, and the `x-msp-closed`\nopt-in mechanism stays inert. Recognized `mcpServers` values are typed and\nvalidated before they leave the wire boundary.",
"properties": {
"developerPrompt": {
"description": "Developer instructions for this session only (ADR 32029 D38, stable\nfrom switch piece F2), on `session/start` and `session/resume`. The\ntext is trimmed. A nonblank value replaces the settings-derived\ndeveloper instructions; an omitted member is no override and keeps\nthe full developer context. Explicit `null` and blank text are the\nexplicit clear (the Rust value is an empty string): no override, and\non a host that serves developer instructions they also turn off the\nsession's suppressible developer context (the agent catalog and the\nmemory snapshot). Any other type fails the decode. A host that does\nnot serve developer instructions ignores a valid member.",
"type": [
"string",
"null"
]
},
"mcpServers": {
"additionalProperties": {
"$ref": "#/$defs/SessionMcpServerConfig"
},
"description": "Native MCP servers added only to this session runtime.",
"type": "object"
}
},
"type": "object"
},
"SessionContextUsageParams": {
"description": "`session/contextUsage` params (tdd SS4.6.6, #14405): context-window\npressure — the counted-once occupancy at the latest provider-reported\ndurable fact, joined with the host's pressure basis. Replace wholesale;\nemitted only when the `(windowTokens, usedTokens, pressure)` triple\nchanges value (identical adoptions emit nothing).",
"properties": {
"pressure": {
"$ref": "#/$defs/ContextPressureLevel",
"description": "Server-computed pressure level over the basis thresholds."
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The durable records this event folded from."
},
"usedTokens": {
"description": "Counted-once prompt tokens (#8803) plus output tokens of the driving\nrecord, saturating — the honest occupancy floor.",
"type": "integer"
},
"viewCursor": {
"description": "Opaque, strictly monotonic view cursor (tdd SS4.1).",
"type": "string"
},
"windowTokens": {
"description": "The effective context-window size from the host's pressure basis;\nabsent when the basis has no limit — the limit part is omitted,\nnever invented (tdd SS4.6.6).",
"type": "integer"
}
},
"required": [
"pressure",
"sessionId",
"sourceRange",
"usedTokens",
"viewCursor"
],
"type": "object"
},
"SessionDeclareExternalWaitParams": {
"description": "`session/declareExternalWait` params.",
"properties": {
"reason": {
"description": "The host's label for what the session waits on, shown in the\nsession view while the declaration is live. Omitted when the\nhost has no label to show.",
"type": "string"
},
"sessionId": {
"description": "The loaded session the declaration is for.",
"type": "string"
}
},
"required": [
"sessionId"
],
"type": "object"
},
"SessionDeclareExternalWaitResult": {
"description": "`session/declareExternalWait` result: the declaration is live.",
"properties": {
"declared": {
"description": "Always `true` on a successful declare: a declaration is live.",
"type": "boolean"
},
"reason": {
"description": "The live declaration's reason, as declared (truncated by the\nhost runtime). Omitted when the host declared without one.",
"type": "string"
}
},
"required": [
"declared"
],
"type": "object"
},
"SessionDurability": {
"description": "Whether this host writes its sessions to disk (SS1.4.1, SS2.13). A\nproperty of the host process, fixed at construction and identical for\nevery session and every connection it serves — never requested, granted,\nor negotiated, which is why it is not a capability. Open: the\nunrepresented degraded state (#14401) has candidate resolutions that add a\nthird value here, so closed would make that a breaking change.",
"enum": [
"durable",
"ephemeral"
],
"type": "string",
"x-msp-openness": "open"
},
"SessionForkParams": {
"description": "`session/fork` params (tdd SS2.5.3).",
"properties": {
"commandId": {
"description": "The SS2.5 idempotency handle (UUIDv7).",
"type": "string"
},
"cutPoint": {
"$ref": "#/$defs/ForkCutPoint",
"description": "Copy history through a completed turn, inclusive. Omitted means \"all\ncompleted turns\" (tdd SS2.5.3)."
},
"excludeItems": {
"description": "Skip inline history in the result and page it later — same as\n`session/resume` (tdd SS2.5.3).",
"type": "boolean"
},
"sessionId": {
"description": "The source session.",
"type": "string"
}
},
"required": [
"commandId",
"sessionId"
],
"type": "object"
},
"SessionForkResult": {
"description": "`session/fork` result (tdd SS2.5.3): the `session/resume` envelope for the\n**new** session, whose `session.forkedFrom` carries the provenance.",
"properties": {
"history": {
"$ref": "#/$defs/SessionHistory",
"description": "The served history."
},
"pendingRequests": {
"description": "The late-joiner pointer set.",
"items": {
"$ref": "#/$defs/PendingRequestPointer"
},
"type": "array"
},
"session": {
"$ref": "#/$defs/Session",
"description": "The new fork session, carrying `forkedFrom` provenance."
},
"viewCursor": {
"description": "The new session's view head.",
"type": "string"
}
},
"required": [
"history",
"pendingRequests",
"session",
"viewCursor"
],
"type": "object"
},
"SessionGoalChangedParams": {
"description": "`session/goalChanged` params (tdd SS4.6.2): the projected goal block's\nvalue changed — identical adoptions emit nothing (the change gate), and\nan explicit `null` clears. Replace wholesale; `null` never means\nunchanged.",
"properties": {
"goal": {
"anyOf": [
{
"$ref": "#/$defs/Goal"
},
{
"type": "null"
}
],
"description": "The full current goal block, or `null` to clear."
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The durable records this event folded from."
},
"viewCursor": {
"description": "Opaque, strictly monotonic view cursor (tdd SS4.1).",
"type": "string"
}
},
"required": [
"goal",
"sessionId",
"sourceRange",
"viewCursor"
],
"type": "object"
},
"SessionHistory": {
"description": "The `history` envelope shared by `session/resume`, `session/fork`, and\n`session/read` (tdd SS2.5.2).",
"properties": {
"checkpointBoundary": {
"$ref": "#/$defs/CheckpointBoundary",
"description": "The checkpoint-prune boundary (spec 13929 amendment FR-50042-1):\nrows for served items at-or-before `through_item_id` in served\norder predate the selected checkpoint. Additive-optional;\nabsence is a non-assertion (ADR 50042 D6)."
},
"items": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Item"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "The full folded item array when `mode` is `inline`; `null` otherwise."
},
"mode": {
"$ref": "#/$defs/HistoryMode",
"description": "What was actually served — never what was asked for (tdd SS2.5.2)."
},
"noneReason": {
"$ref": "#/$defs/HistoryNoneReason",
"description": "Why no history was served — sent exactly when `mode` is `\"none\"`\n(tdd SS2.5.2; D-050, spec 208 INV-19734-1)."
},
"snapshot": {
"anyOf": [
{
"$ref": "#/$defs/ViewSnapshot"
},
{
"type": "null"
}
],
"description": "The folded view state when `mode` is `snapshot` or `anchoredSnapshot`;\n`null` otherwise."
}
},
"required": [
"items",
"mode",
"snapshot"
],
"type": "object"
},
"SessionKind": {
"description": "What kind of session this is (spec 42713 FR-001/FR-005, ADR 42713 D1/D4).\n\n**Open**: a new kind is additive evolution, and a client MUST render an\nunknown value as an unknown-but-present kind rather than rejecting the\nrow. Both v1 values are terms the tree already uses — the child log\ndirectory is `subagent` and `ItemKind` already carries a `subagent`\nvariant — so no new vocabulary is minted.",
"enum": [
"root",
"subagent"
],
"type": "string",
"x-msp-openness": "open"
},
"SessionLeaveCompletedParams": {
"description": "Params of the protected, non-view leave terminal notification.",
"properties": {
"commandId": {
"description": "The leave command's id, matching the `session/leave` request.",
"type": "string"
},
"outcome": {
"$ref": "#/$defs/SessionLeaveOutcome",
"description": "How the leave ended: `released` or `failed`. The set is open, so newer\nhosts may add outcomes."
},
"reason": {
"$ref": "#/$defs/SessionLeaveFailureReason",
"description": "Why the leave failed. Present when `outcome` is `failed`."
},
"sessionId": {
"description": "The session the leave was for.",
"type": "string"
},
"viewCursor": {
"description": "The session's view cursor at release: everything up to it was folded\nbefore the host let go. Present when `outcome` is `released`.",
"type": "string"
}
},
"required": [
"commandId",
"outcome",
"sessionId"
],
"type": "object"
},
"SessionLeaveFailureReason": {
"description": "Current producer failure reasons for `session/leaveCompleted`;\nreceiver-open for additive future reasons.",
"enum": [
"timeout",
"responseUndelivered",
"persistenceFailed",
"runtimeFailed",
"abandoned"
],
"type": "string",
"x-msp-openness": "open"
},
"SessionLeaveOutcome": {
"description": "Current producer outcomes for `session/leaveCompleted`; receiver-open.",
"enum": [
"released",
"failed"
],
"type": "string",
"x-msp-openness": "open"
},
"SessionLeaveParams": {
"description": "`session/leave` params (tdd SS2.15, ADR 31741 D2/D8).",
"properties": {
"commandId": {
"description": "Client-minted UUIDv7 command identity.",
"type": "string"
},
"sessionId": {
"description": "The exact loaded session whose ownership is to be released.",
"type": "string"
},
"stop": {
"description": "Explicitly cancel unfinished work before leaving. Omitted is `false`.",
"type": "boolean"
}
},
"required": [
"commandId",
"sessionId"
],
"type": "object"
},
"SessionLeaveResult": {
"description": "The admission-only `session/leave` result.",
"properties": {
"commandId": {
"description": "The leave command's id.",
"type": "string"
},
"status": {
"$ref": "#/$defs/CommandAckStatus",
"description": "The admission status, `accepted` once the leave is admitted. The final\nresult arrives later as `session/leaveCompleted`. Sending the same leave\ncommand again returns `accepted` and re-pushes the recorded result if\nthere is one, from the host that ran the leave (for as long as it runs,\neven after the release) or from a host that has the session loaded\n(after a host crash, `abandoned` among them). Any other host treats it\nas a fresh leave: a durable host that has not loaded the session refuses\nit with `sessionNotLoaded` until it is resumed there."
}
},
"required": [
"commandId",
"status"
],
"type": "object"
},
"SessionListBranchFilter": {
"description": "Exact branch selection (#42035 FR-42035-2).",
"properties": {
"anyOf": {
"description": "1–32 nonempty branch names, each 1–256 UTF-8 bytes, counted before\ndeduplication; `null` selects sessions with no branch.",
"items": {
"type": [
"string",
"null"
]
},
"type": "array"
}
},
"required": [
"anyOf"
],
"type": "object"
},
"SessionListChangedParams": {
"description": "`session/listChanged` params (#33084, ADR 33084 D3): one changed row of\nthe `session/list` shape — the full SS2.4 Session object as the answering\nhost's list face serves it at emission (the ADR 29243 live-overlaid row),\na replace, never a delta. Emitted only on connections that negotiated the\n`sessionListStream` capability at `initialize` (ADR 33084 D2); row birth\nstays on `session/started`, unload pairs with `session/closed`.",
"properties": {
"session": {
"$ref": "#/$defs/Session",
"description": "The served list row for the changed session."
}
},
"required": [
"session"
],
"type": "object"
},
"SessionListFilter": {
"description": "The `session/list` filter (#42035, spec 207 FR-42035-2..5). Members are\nANDed with each other and with the top-level `workspaceRoot` and\n`updatedAfter`; values inside each `anyOf` are ORed. The canonical form\nthe server echoes deduplicates and sorts every set, spells session IDs as\ncanonical UUIDs, lowercases text terms, and orders `text.fields` `name`\nthen `title`.",
"properties": {
"branch": {
"$ref": "#/$defs/SessionListBranchFilter",
"description": "Only sessions whose branch is one of these."
},
"sessionId": {
"$ref": "#/$defs/SessionListSessionIdFilter",
"description": "Only sessions whose ID is one of these."
},
"text": {
"$ref": "#/$defs/SessionListTextFilter",
"description": "Only sessions whose served name or title matches these token prefixes."
}
},
"type": "object"
},
"SessionListParams": {
"description": "`session/list` params (tdd SS2.5.4). Read-only; never touches leases.",
"properties": {
"cursor": {
"description": "Opaque page cursor from a prior result. Page cursors are a distinct\nopaque-string family from view cursors and stream cursors, valid only\nfor re-issuing the same listing (tdd SS2.5.4). Omitted and explicit\n`null` both mean \"first page\" (#23468).",
"type": [
"string",
"null"
]
},
"filter": {
"$ref": "#/$defs/SessionListFilter",
"description": "Optional structured selection applied inside the bounded index query\nbefore paging (#42035, spec 207 FR-42035-1). Present — including\n`{}` — makes a supporting server echo its canonical form as\n`appliedFilter`; omitted keeps the pre-#42035 behavior."
},
"limit": {
"description": "Page size; default 50, max 200 — the schema publishes the cap.",
"maximum": 200,
"type": "integer"
},
"updatedAfter": {
"description": "Only sessions with log activity after this RFC3339 instant.",
"type": "string"
},
"workspaceRoot": {
"description": "Only sessions whose metadata workspace root equals this path.",
"type": "string"
}
},
"type": "object"
},
"SessionListResult": {
"description": "`session/list` result (tdd SS2.5.4). The default order is content\nactivity: `lastActivityAt` descending, then `sessionId` ascending. The\norder is the session index's key, so a row's displayed timestamps do not\nalways show its position: a row the index has not yet derived keeps its\n`updatedAt` position, a derived row with no content orders by\n`createdAt`, and a loaded row can show newer values. Do not re-sort or\nvalidate a page from them. `updatedAfter` still filters on `updatedAt`.",
"properties": {
"appliedFilter": {
"$ref": "#/$defs/SessionListFilter",
"description": "The canonical filter the server applied, present exactly when the\nrequest carried `filter` (#42035, spec 207 FR-42035-1). The probe is\nper-predicate PRESENCE (ADR 42035 D6): a client that requires\nfiltering checks that every predicate it sent comes back as a member\nhere, and treats a missing member as unsupported. Value equality is\nthe wrong test — canonicalization trims, lowercases, NFC-normalizes,\ndedupes and sorts, so the echoed values often differ from the sent\nones on a correctly filtered page."
},
"nextCursor": {
"description": "The next page's cursor; `null` on the last page.",
"type": [
"string",
"null"
]
},
"sessions": {
"description": "The page of stored sessions.",
"items": {
"$ref": "#/$defs/Session"
},
"type": "array"
}
},
"required": [
"nextCursor",
"sessions"
],
"type": "object"
},
"SessionListSessionIdFilter": {
"description": "Exact session-ID selection (#42035 FR-42035-2).",
"properties": {
"anyOf": {
"description": "1–200 session UUIDs, counted before deduplication.",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"anyOf"
],
"type": "object"
},
"SessionListTextField": {
"description": "A served session field `session/list` text search reads (#42035\nFR-42035-3). The client selects it, so the set is closed.",
"enum": [
"name",
"title"
],
"type": "string",
"x-msp-openness": "closed"
},
"SessionListTextFilter": {
"description": "Name/title token-prefix search (#42035 FR-42035-3/FR-42035-4). Each term\nis trimmed, lowercased with ordinary Unicode lowercase, then NFC-\nnormalized, and matches the beginning of an alphanumeric token,\naccent-sensitively (`check` matches `Checkout`; `eck` does not). NFC\nmeans a decomposed and a precomposed spelling of one term are the same\nterm, and the echo returns the composed form. Matching never reorders\nrows.",
"properties": {
"allOf": {
"description": "Every term must match at least one selected field.",
"items": {
"type": "string"
},
"type": "array"
},
"anyOf": {
"description": "At least one term must match a selected field. `allOf` plus `anyOf`\ncarry 1–16 terms in total, each 1–128 UTF-8 bytes in its canonical\nform (trimmed, lowercased, NFC) — the bytes `appliedFilter` echoes.\nLowercasing and NFC can both lengthen a term, so a term inside the\nbound raw may still exceed it canonically.",
"items": {
"type": "string"
},
"type": "array"
},
"fields": {
"description": "The 1–2 unique served fields searched.",
"items": {
"$ref": "#/$defs/SessionListTextField"
},
"type": "array"
}
},
"required": [
"fields"
],
"type": "object"
},
"SessionMcpServerConfig": {
"description": "One native MCP server supplied at session construction (ADR 32760 D1).\n\n**Closed union** (#33295 owner ruling A1, extending D-033/D-050 to\n`oneOf`): a validator MUST reject an undeclared `transport` arm — the\nserver fails `session/start` decode on an unknown transport, and a future\ntransport arrives as an explicit schema addition.",
"oneOf": [
{
"properties": {
"args": {
"description": "Ordered child arguments.",
"items": {
"type": "string"
},
"type": "array"
},
"command": {
"description": "Executable name or path. Configuration diagnostics never echo it.",
"type": "string"
},
"env": {
"additionalProperties": {
"type": "string"
},
"description": "Explicit child environment additions.",
"type": "object"
},
"framing": {
"$ref": "#/$defs/SessionMcpStdioFraming",
"description": "Stdio framing mode; defaults to automatic detection."
},
"mode": {
"$ref": "#/$defs/SessionMcpServerMode",
"description": "Required/optional startup posture; defaults to required."
},
"transport": {
"const": "stdio",
"type": "string"
}
},
"required": [
"command",
"transport"
],
"type": "object"
},
{
"properties": {
"headers": {
"additionalProperties": {
"type": "string"
},
"description": "Explicit request headers.",
"type": "object"
},
"mode": {
"$ref": "#/$defs/SessionMcpServerMode",
"description": "Required/optional startup posture; defaults to required."
},
"transport": {
"const": "streamableHttp",
"type": "string"
},
"url": {
"description": "HTTP(S) endpoint. Configuration diagnostics never echo it.",
"type": "string"
}
},
"required": [
"transport",
"url"
],
"type": "object"
}
],
"x-msp-openness": "closed"
},
"SessionMcpServerMode": {
"description": "Startup failure posture for a session MCP server.",
"enum": [
"required",
"optional"
],
"type": "string",
"x-msp-openness": "closed"
},
"SessionMcpStdioFraming": {
"description": "Stdio framing choices exposed by session MCP configuration.",
"enum": [
"auto",
"contentLength",
"lineDelimitedJson"
],
"type": "string",
"x-msp-openness": "closed"
},
"SessionModelChangedParams": {
"description": "`session/modelChanged` params (tdd SS4.6.1): a durable model-selection\nrecord landed (tdd SS3.8).",
"properties": {
"modelId": {
"description": "The selected model.",
"type": "string"
},
"providerId": {
"description": "The selected provider; `null` when the selection names none.",
"type": [
"string",
"null"
]
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"source": {
"$ref": "#/$defs/ModelChangeSource",
"description": "What drove the selection."
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The durable records this event folded from."
},
"viewCursor": {
"description": "Opaque, strictly monotonic view cursor (tdd SS4.1).",
"type": "string"
}
},
"required": [
"modelId",
"providerId",
"sessionId",
"source",
"sourceRange",
"viewCursor"
],
"type": "object"
},
"SessionModelRouteUnservedParams": {
"description": "`session/modelRouteUnserved` params (#25603, ADR 25603 D1, spec 5469\nAmendment 16): an accepted `login.credential_update` installed a provider\nthat cannot serve the session's STANDING model route. Disclosure only —\nthe standing selection is unchanged (no `session/modelChanged` fires) and\nthe repair path is a routable `session/setModel`. Folded from the durable\n`runtime.provider_reconfigure.standing_route_unserved` record; additive —\nclients that predate it skip the unknown method.",
"properties": {
"commandId": {
"description": "The command whose accepted swap installed the provider.",
"type": "string"
},
"installedProviderId": {
"description": "The provider id the swap installed.",
"type": "string"
},
"modelId": {
"description": "The standing (still bound, now unroutable) model.",
"type": "string"
},
"providerId": {
"description": "The standing model's provider; `null` when the selection names none.",
"type": [
"string",
"null"
]
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The durable records this event folded from."
},
"viewCursor": {
"description": "Opaque, strictly monotonic view cursor (tdd SS4.1).",
"type": "string"
}
},
"required": [
"commandId",
"installedProviderId",
"modelId",
"providerId",
"sessionId",
"sourceRange",
"viewCursor"
],
"type": "object"
},
"SessionNameChangedParams": {
"description": "`session/nameChanged` params (tdd SS4.6.7, #27598): the fold of ANY\ndurable session-name record — the FIRST-NAMING automatic allocate as well\nas an accepted `session/rename` (or the same in-process runtime command).\nReplace-wholesale like every SS4.6 sibling.",
"properties": {
"generatedName": {
"description": "The latest retained generated short title (tdd SS2.4/SS4.6.7,\n#50048; ADR 50048-generated-name D1). **Additive-optional**: carried\nat generated-pair publication and at settlement when a pair is\nalready published; omitted when no pair was ever published — absent\nreads as unpublished, never fabricated. `name` stays canonical.",
"type": "string"
},
"name": {
"description": "The new canonical name now in effect.",
"type": "string"
},
"nameOrigin": {
"$ref": "#/$defs/SessionNameOrigin",
"description": "How the new name was set (tdd SS2.4/SS4.6.7, #50048; ADR 50048\nD1/D2). **Additive-optional**: omitted when the emitting fold cannot\nprove an origin — absent reads as unknown, never fabricated."
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The durable records this event folded from."
},
"viewCursor": {
"description": "Opaque, strictly monotonic view cursor (tdd SS4.1).",
"type": "string"
}
},
"required": [
"name",
"sessionId",
"sourceRange",
"viewCursor"
],
"type": "object"
},
"SessionNameOrigin": {
"description": "How the served session name was set (tdd SS2.4/SS4.6.7, #50048; ADR\n50048 D1). **Open enum** (`x-msp-openness: open`): v1 serves\n`automatic` and `custom`; a client MUST read absent — and any value it\ndoes not recognize — as unknown, never fabricated. Open: a future source\nsuch as conversation-generated names (#35260) adds a value here, so\nclosed would make that a breaking change.",
"enum": [
"automatic",
"custom"
],
"type": "string",
"x-msp-openness": "open"
},
"SessionReadParams": {
"description": "`session/read` params (tdd SS2.5.5): read one stored session **without\nattaching** — no writer lease, no load, no subscription, no\n`SessionResumed` record.",
"properties": {
"excludeItems": {
"description": "Metadata-only unless you ask: `false` carries the folded item history.\nSame name and polarity as `session/resume`/`session/fork`; only the\ndefault differs — here it is `true` (tdd SS2.5.5).",
"type": "boolean"
},
"sessionId": {
"description": "The session to read.",
"type": "string"
}
},
"required": [
"sessionId"
],
"type": "object"
},
"SessionReadResult": {
"description": "`session/read` result (tdd SS2.5.5). The `viewCursor` is the fold head at\nread time — a point-in-time read, immediately stale if a foreign host is\nappending.",
"properties": {
"blockedPrompt": {
"$ref": "#/$defs/BlockedPrompt",
"description": "Same member as `session/resume` (tdd SS2.5.5, ADR 50074 D2)."
},
"deliveredInputs": {
"description": "The inputs the read session's log delivered to its subagents\n(tdd SS2.5.5, ADR 72596-delivered-inputs-on-read D2).\nAbsent-when-empty: a missing member means nothing delivered,\nnever an error.",
"items": {
"$ref": "#/$defs/DeliveredInput"
},
"type": "array"
},
"history": {
"$ref": "#/$defs/SessionHistory",
"description": "The served history."
},
"lastTurn": {
"$ref": "#/$defs/LastTurn",
"description": "Same member as `session/resume` (tdd SS2.5.5, ADR 36635 D2)."
},
"modelTurnRunning": {
"description": "Whether a native child read session's model turn runs (tdd SS2.5.5,\nADR 89202 D1): served on a read of a `subagent` session whose\ncontaining session this host holds loaded, from that session's\nruntime at serve time. Absent for every other read and when the\nruntime cannot answer; absence asserts nothing.",
"type": "boolean"
},
"pendingRequests": {
"description": "The same pointer shape as `session/resume`. Because `session/read`\nnever subscribes this is a point-in-time log read only: no requests\nare re-issued after it (tdd SS2.5.5).",
"items": {
"$ref": "#/$defs/PendingRequestPointer"
},
"type": "array"
},
"prunedSubagents": {
"description": "One short record per child session the checkpoint boundary pruned\n(tdd SS2.5.5, ADR 71910 D8). Absent-when-empty: a missing member\nmeans the view is uncompacted or nothing pruned, never an error.",
"items": {
"$ref": "#/$defs/PrunedSubagent"
},
"type": "array"
},
"queuedInputs": {
"description": "The inputs still queued for delivery to the read session (tdd\nSS2.5.5, ADR 63254-queued-inputs-on-read D2). Absent-when-empty:\na missing member means nothing queued, never an error.",
"items": {
"$ref": "#/$defs/QueuedInput"
},
"type": "array"
},
"recoveryObservation": {
"$ref": "#/$defs/RecoveryObservation",
"description": "Current local construction only; never inferred from retained history.\nAbsence establishes neither a choice nor supported recovery."
},
"session": {
"$ref": "#/$defs/Session",
"description": "The session as folded point-in-time."
},
"viewCursor": {
"description": "The fold head at read time.",
"type": "string"
},
"worktree": {
"$ref": "#/$defs/RuntimeWorktree",
"description": "The facts of the runtime-owned worktree a child read session's\nsubagent runs in (tdd SS2.5.5, ADR 50042-child-worktree-on-read D2).\nA root read serves it absent; absent means no worktree facts, never\nan error."
}
},
"required": [
"history",
"pendingRequests",
"session",
"viewCursor"
],
"type": "object"
},
"SessionReasoningEffortChangedParams": {
"description": "`session/reasoningEffortChanged` params (tdd SS4.6.9, ADR 31255 D1): a\ndurable reasoning-effort reconfigure record landed (tdd SS3.21). Replace\nwholesale, latest wins; the snapshot carries the latest value (SS4.9.1).",
"properties": {
"reasoningEffort": {
"$ref": "#/$defs/ReasoningEffort",
"description": "The new session default: the same closed eight-string tier vocabulary as\n`turn/start`."
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"source": {
"$ref": "#/$defs/ReasoningEffortChangeSource",
"description": "What drove the change."
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The durable records this event folded from."
},
"viewCursor": {
"description": "Opaque, strictly monotonic view cursor (tdd SS4.1).",
"type": "string"
}
},
"required": [
"reasoningEffort",
"sessionId",
"source",
"sourceRange",
"viewCursor"
],
"type": "object"
},
"SessionRenameParams": {
"description": "`session/rename` params (tdd SS2.14.2, #27598): set or change the durable\nallocated session name through the runtime `session_name` command. One\nwriter; withheld under the ephemeral profile.",
"properties": {
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"name": {
"description": "The requested name; the runtime's normalization and validation apply.",
"type": "string"
},
"sessionId": {
"description": "The target session.",
"type": "string"
}
},
"required": [
"commandId",
"name",
"sessionId"
],
"type": "object"
},
"SessionRenameResult": {
"description": "`session/rename` result (tdd SS2.14.2, #27598): `name` is the canonical\n(normalized) name the durable record settled.",
"properties": {
"commandId": {
"description": "Echoes the client's id.",
"type": "string"
},
"name": {
"description": "The settled canonical name. Omitted on the `RecoveryPending` arm, which\nanswers `{commandId, status: \"accepted\"}` and delivers the name via\n`session/nameChanged` / `Session.name` (tdd SS2.14.2).",
"type": "string"
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "Admission status."
}
},
"required": [
"commandId",
"status"
],
"type": "object"
},
"SessionResumeParams": {
"description": "`session/resume` params (tdd SS2.5.2).",
"properties": {
"commandId": {
"description": "The SS2.5 idempotency handle (UUIDv7). A resume that loads a session\nwrites a durable `SessionResumed` record.",
"type": "string"
},
"config": {
"$ref": "#/$defs/SessionConfig",
"description": "The same open construction-time extension object as `session/start`."
},
"cursor": {
"description": "A view cursor previously observed by this client — or an observed\n`summarizedThrough` compaction anchor. When it names an event the server\nstill holds, the server returns only the suffix and `history.mode` is\n`none`. A cursor the server minted that names no event yet, such as the\nempty start cursor of a session that had no events, is treated as no\ncursor: the server serves what a resume without a cursor would. A cursor\nolder than the earliest event the server still holds gets a snapshot, or\n`-32040` `viewTruncated` when none fits. A cursor this session's view\nnever minted is refused with `-32011` `notFound`, reason\n`missingAnchor`, and a compaction anchor naming a boundary the server\nhas pruned is refused with `-32042` `boundaryPruned`. Omitted and\nexplicit `null` both mean \"no cursor\".",
"type": [
"string",
"null"
]
},
"excludeItems": {
"description": "Return only session metadata and live resume state; page history\nseparately with `view/page`. Default `false` (tdd SS2.5.2).",
"type": "boolean"
},
"history": {
"$ref": "#/$defs/HistoryPreference",
"description": "History mode preference, default `auto`. A PREFERENCE, not a budget\noverride: when the requested mode does not fit the history budget the\nserver downgrades it and `history.mode` reports what was actually\nserved (tdd SS2.5.2). Ignored when `cursor` or `excludeItems` makes it\nmoot."
},
"modelId": {
"description": "The explicit MSP model override (T-51858-304; INV-51858-11 rank 1):\na model string the caller supplies at resume time. When present it\nwins over the retained binding's recorded origin — over a stamped\nlabel and over a stamped pin — and it recovers an\notherwise-unresolved label binding by sending the override as the\nwire model instead of the unresolved refusal. Omitted preserves\narm (2): the retained binding resolves by recorded origin exactly\nas without this member. Explicit `null` is invalid params (the\nsame closed null-tolerant set as at start). The override changes\nthe model within the retained provider; it never names a provider.\nA resume that loads the session records it as a resume `--model`\nrecords (ADR 24046 D7): nothing when it already is the session's\nmodel, else one durable selection with the provider's profile for\nthat model. A resume that attaches to a loaded session switches\nthe model live. A model the host refuses, a blank one included,\nleaves the session on its recorded model, which `session.modelId`\nreports; a connection that opted into `experimentalApi` also gets\nthe reason in `modelIdRefusal`.",
"type": "string"
},
"permissionProfile": {
"description": "The launch permission-profile pick (amendment 42624 FR-42624-1,\n#50054): a profile id the host catalog already admits. Select, never\ncreate. Omitted restores retained authority only, with no override.\nThe host restores first, then applies the pick in the same pre-marker\nstep; over a declared lost record the restore is the never-wider reset,\ncommitted before the pick, and where the reset cannot commit the pick\nis committed alone as that reset (spec 11237 FR-57059-4). A pick that\nfails admission refuses the\nresume `commandRejected` (-32030; `permission_profile_unknown` /\n`permission_profile_unavailable`) before any durable byte. Explicit\n`null` is invalid params (the same closed null-tolerant set as at\nstart).",
"type": "string"
},
"recoveryMode": {
"$ref": "#/$defs/RecoveryMode",
"description": "Cold-resume replacement choice; omission preserves the retained choice.\nA warm attach rejects a different or unestablished choice as invalidParams.\nExplicit null is invalid."
},
"sessionId": {
"description": "The session to load.",
"type": "string"
}
},
"required": [
"commandId",
"sessionId"
],
"type": "object"
},
"SessionResumeResult": {
"description": "`session/resume` result (tdd SS2.5.2).",
"properties": {
"blockedPrompt": {
"$ref": "#/$defs/BlockedPrompt",
"description": "The recallable blocked prompt's refill text (ADR 50074 D2).\n**Additive-optional**; absence means no blocked prompt to recall\n(an unblocked session, or a pre-feature host). Data only, never\na rendered row: clients seed cold recall from it (C-p refills\n`text`) and MUST NOT display it as history."
},
"history": {
"$ref": "#/$defs/SessionHistory",
"description": "The served history."
},
"lastTurn": {
"$ref": "#/$defs/LastTurn",
"description": "How the last folded turn ended (tdd SS2.5.2, ADR 36635 D2).\n**Additive-optional**; absence is a non-assertion."
},
"pendingRequests": {
"description": "The late-joiner pointer set; empty when nothing is pending.",
"items": {
"$ref": "#/$defs/PendingRequestPointer"
},
"type": "array"
},
"prunedSubagents": {
"description": "One short record per child session the checkpoint boundary pruned\n(tdd SS2.5.2, ADR 71910 D8). **Additive-optional**, like\n`queuedInputs` on the read: absent-when-empty, never stripped.",
"items": {
"$ref": "#/$defs/PrunedSubagent"
},
"type": "array"
},
"session": {
"$ref": "#/$defs/Session",
"description": "The loaded session."
},
"viewCursor": {
"description": "The session view head; the connection is subscribed after it. A\nstill-loaded session a prior `view/unsubscribe` detached is\nRE-ATTACHED by this resume (spec 208 FR-002a, #28920): live delivery\nresumes from this head. Explicit-cursor re-attach with `(after, head]`\nengine replay stays `view/subscribe` (SS4.7.1).",
"type": "string"
}
},
"required": [
"history",
"pendingRequests",
"session",
"viewCursor"
],
"type": "object"
},
"SessionSetApprovalModeParams": {
"description": "`session/setApprovalMode` params (tdd SS5.12): switch the session's\napproval enforcement mode mid-session. A standard SS3 command.\n\n**Select, never create.** A client may *select* a mode the host's\nconfiguration already defines; it may not construct one, supply inline\nrules, or otherwise describe a policy on the wire — which is why\n[`ApprovalMode`] is closed.",
"properties": {
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"mode": {
"$ref": "#/$defs/ApprovalMode",
"description": "The preconfigured mode to select. The requesting actor is recorded\nfrom the connection's `clientInfo.name` (tdd SS1.4.1)."
},
"sessionId": {
"description": "The target session.",
"type": "string"
}
},
"required": [
"commandId",
"mode",
"sessionId"
],
"type": "object"
},
"SessionSetApprovalModeResult": {
"description": "`session/setApprovalMode` result (tdd SS5.12). Applies next-action — an\nin-flight tool action's pending approval is not retroactively decided by a\nmode change.",
"properties": {
"applyOutcome": {
"$ref": "#/$defs/ApprovalModeApplyOutcome",
"description": "Whether the change did anything."
},
"commandId": {
"description": "Echoes the client's id.",
"type": "string"
},
"effectiveMode": {
"$ref": "#/$defs/EffectiveApprovalModeState",
"description": "The folded effective-mode projection — the same object the `Session`\ncarries as `approvalMode` (tdd SS2.4, SS5.12)."
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "Admission status."
}
},
"required": [
"applyOutcome",
"commandId",
"effectiveMode",
"status"
],
"type": "object"
},
"SessionSetModelParams": {
"description": "`session/setModel` params (tdd SS3.8): the model-picker gesture. The\nselection is durable and applies to subsequent model calls.",
"properties": {
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"model": {
"$ref": "#/$defs/ModelSelection",
"description": "The selection."
},
"sessionId": {
"description": "The target session.",
"type": "string"
}
},
"required": [
"commandId",
"model",
"sessionId"
],
"type": "object"
},
"SessionSetModelResult": {
"description": "`session/setModel` result (tdd SS3.8). If a turn is running the selection\nis admitted now and applied at the next model-call boundary; the ack does\nnot wait for that boundary.",
"properties": {
"commandId": {
"description": "Echoes the client's id.",
"type": "string"
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "Admission status."
}
},
"required": [
"commandId",
"status"
],
"type": "object"
},
"SessionSetReasoningEffortParams": {
"description": "`session/setReasoningEffort` params (tdd SS3.21, ADR 31255 D1): set the\nsession's standing reasoning-effort default. A turn carrying its own\n`reasoningEffort` overrides it for that turn only; the default overrides\nthe host's configured default. Same accept/reject and `commandId`\nidempotency shape as `session/setModel` (SS3.8).",
"properties": {
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"reasoningEffort": {
"$ref": "#/$defs/ReasoningEffort",
"description": "The new session default: the closed eight-string tier vocabulary\n`turn/start` carries (SS3.2), spelled identically. Invalid tiers are\ninvalid params. A default of `max` rides provider requests verbatim,\nnever clamped (ADR 28621 D8, ADR 31131 D1)."
},
"sessionId": {
"description": "The target session.",
"type": "string"
}
},
"required": [
"commandId",
"reasoningEffort",
"sessionId"
],
"type": "object"
},
"SessionSetReasoningEffortResult": {
"description": "`session/setReasoningEffort` result (tdd SS3.21). The default is durable\non ack and applies to turns launched after admission; a running turn keeps\nthe request options it already resolved.",
"properties": {
"commandId": {
"description": "Echoes the client's id.",
"type": "string"
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "Admission status."
}
},
"required": [
"commandId",
"status"
],
"type": "object"
},
"SessionSideChatParams": {
"description": "`session/sideChat` params (tdd SS2.5.7; ADR 45435 D2).",
"properties": {
"commandId": {
"description": "The SS2.5 idempotency handle (UUIDv7).",
"type": "string"
},
"sessionId": {
"description": "The source main session.",
"type": "string"
}
},
"required": [
"commandId",
"sessionId"
],
"type": "object"
},
"SessionSideChatResult": {
"description": "`session/sideChat` result (tdd SS2.5.7; ADR 45435 D2): the\n`session/resume` envelope for the **new** side session, whose\n`session.sideFrom` carries the provenance. The side opens empty.",
"properties": {
"history": {
"$ref": "#/$defs/SessionHistory",
"description": "The served history (inline; SS2.5.7's empty-items half is #49416 —\ninherited turns surface until the boundary-aware fold lands)."
},
"pendingRequests": {
"description": "The late-joiner pointer set.",
"items": {
"$ref": "#/$defs/PendingRequestPointer"
},
"type": "array"
},
"session": {
"$ref": "#/$defs/Session",
"description": "The new side session, carrying `sideFrom` provenance."
},
"viewCursor": {
"description": "The new side session's view head.",
"type": "string"
}
},
"required": [
"history",
"pendingRequests",
"session",
"viewCursor"
],
"type": "object"
},
"SessionSpawnedBy": {
"description": "Who opened a session (`Session.spawnedBy`, spec 42713 FR-69621-6, ADR\n69621 D4).",
"properties": {
"parentSessionId": {
"description": "The exact session that opened this one (ADR 69621 D2), except that any\n`muse` started in a later pane of the worker's tmux session or Herdr\nworkspace names the worker's manager and carries the worker's\n`project`/`thread` labels (ADR 69621 D8).",
"type": "string"
},
"project": {
"description": "An opaque project label the spawner named, when it named one.",
"type": "string"
},
"thread": {
"description": "An opaque thread label the spawner named, when it named one.",
"type": "string"
}
},
"required": [
"parentSessionId"
],
"type": "object"
},
"SessionStartParams": {
"description": "`session/start` params (tdd SS2.5.1).",
"properties": {
"approvalMode": {
"anyOf": [
{
"$ref": "#/$defs/ApprovalMode"
},
{
"type": "null"
}
],
"description": "The session's starting approval mode; server default when omitted or\nexplicit `null` — both spellings select the default (#23468).\nSelect, never create — the value names a mode the host's configuration\nalready defines (tdd SS2.5.1, SS5.12). This is the only surface that\ndeclares a non-interactive run's policy (tdd SS5.11, D-008)."
},
"clear": {
"description": "Marks this start as a `/clear` (spec 207 amendment 93195, FR-93195-1,\nADR 93195 D1): `true` starts the new session as a clear, so its\n`SessionStart` hooks get source `clear` instead of `startup`. `false`\nand omitted are the same plain start (source `startup`). It neither\nneeds nor implies `previousSessionId`. Explicit `null` is invalid params.",
"type": "boolean"
},
"commandId": {
"description": "The SS2.5 idempotency handle (UUIDv7). Required; the server never\nmints one.",
"type": "string"
},
"config": {
"$ref": "#/$defs/SessionConfig",
"description": "Reserved for future per-session overrides; only its `mcpServers` member\nis admitted."
},
"modelId": {
"description": "Initial model; server default when omitted.",
"type": "string"
},
"permissionProfile": {
"description": "The new session's initial permission profile (amendment 42624\nFR-42624-1, ADR 42197 D2): a profile id the host catalog already\nadmits — the rows `permissionProfile/list` serves without\n`sessionId`. Select, never create. Omitted means today's behavior: the\nhost's configured default under native admission, unchanged. An id\nthe catalog does not carry, or one it serves unavailable, refuses the\nstart `commandRejected` (-32030; `permission_profile_unknown` /\n`permission_profile_unavailable`) before any durable byte, and an\nephemeral host refuses any id (`permission_profile_ephemeral_fixed`).\n`session/fork` does not admit the member; `session/resume` admits it\nas the launch pick (FR-42624-1, #50054). Explicit `null` is invalid\nparams: the set of members that tolerate `null` is\nclosed and excludes this one, exactly as it excludes `workspaceRoots`.",
"type": "string"
},
"previousSessionId": {
"description": "The `/new` predecessor link (spec 207 amendment 50054, FR-50054-1):\nthe outgoing session this start succeeds. Any syntactically valid\nsession UUID; there is no existence check, so a link to a session that\nis gone still commits. Omitted means a true root. Explicit `null` is\ninvalid params.",
"type": "string"
},
"providerId": {
"description": "Initial provider routing; server default when omitted or explicit\n`null` — both spellings select the default (#23468).",
"type": [
"string",
"null"
]
},
"recoveryMode": {
"$ref": "#/$defs/RecoveryMode",
"description": "Recovery choice for this construction; omission keeps legacy behavior.\nExplicit null is invalid."
},
"sessionId": {
"description": "Exact identity for this new root session. When omitted the server\nmints a UUIDv7. This field never selects an existing session: a\nretained or reserved id is rejected `commandRejected` with reason\n`session_id_conflict` (tdd SS2.5.1).",
"type": "string"
},
"spawnedBy": {
"$ref": "#/$defs/SessionSpawnedBy",
"description": "The session that opens this one (spec 42713 FR-69621-8, ADR 69621 D7),\nin the `Session.spawnedBy` shape: a spawner that starts a worker\nsession over MSP names its own session here. The host writes it once\ninto the new session's creation record, as a worker process records\nits environment hand-over, and `session/list` / `session/read` serve it\nback as `Session.spawnedBy`; `session/resume` never takes it.\n**Additive-optional** and **provenance only** (INV-005). A value the\nhost cannot use (a `parentSessionId` that is not a session id, a\nmalformed member) records nothing and never refuses the start; an\nunusable `project` or `thread` is dropped on its own. Hosts that\npredate the member ignore it."
},
"workspaceRoot": {
"description": "Absolute path, folded into the first metadata record.",
"type": "string"
},
"workspaceRoots": {
"description": "The session's initial runtime workspace-root set: ordered absolute\ncanonical existing directory paths; the first root is the CWD and\nplays the primary-root role; every root receives the ADR 11237\n`:workspace_roots` rules; extra roots grant no Project Trust. When\n`workspaceRoot` is also present the two must name the same folder,\ncompared on canonical forms (the raw `workspaceRoot` is\ncanonicalized first; ADR 37313 D9), or the request is invalid\nparams, and so is explicit `null` (the D-049 null-tolerant set is\nclosed and excludes this member). Omitted preserves single-root\nbehavior (tdd SS2.5.1, ADR 37313, #37313).",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"commandId"
],
"type": "object"
},
"SessionStartResult": {
"description": "`session/start` result (tdd SS2.5.1).",
"properties": {
"session": {
"$ref": "#/$defs/Session",
"description": "The new session."
},
"viewCursor": {
"description": "The session view head after the start fold; the connection is\nsubscribed and receives every view event after this cursor. A\ndeduplicated retry returns this same result (tdd SS2.5.1).",
"type": "string"
}
},
"required": [
"session",
"viewCursor"
],
"type": "object"
},
"SessionStartedParams": {
"description": "`session/started` params (tdd SS2.6.1; enrolled by #33065): a session\nbecame newly loaded on this host via `session/start`, `session/fork`, or\n`session/sideChat` (never `session/resume` — Appendix C, OQ-F),\nbroadcast to every initialized connection.\n\nThe one member is the same `$defs/Session` object the\n`session/start`/`session/fork` results carry, so the broadcast and the\nresult describe one fact through one type — the host builds the broadcast\npayload as a `$defs/Session` — the fresh-start arm reuses the result's\n`session` member, the start-replay arm builds the live attach snapshot —\nand the emission is\nparity-gated against this type at the producer\n(`session-server` prod-assembly capture) and over the committed\ntranscript corpus (conformance `session_lifecycle_enrollment`).",
"properties": {
"session": {
"$ref": "#/$defs/Session",
"description": "The newly loaded session, as of the start/fork fold."
}
},
"required": [
"session"
],
"type": "object"
},
"SessionStatus": {
"description": "A session's load state (tdd SS2.4).",
"enum": [
"notLoaded",
"idle",
"running"
],
"type": "string",
"x-msp-openness": "open"
},
"SessionStatusChangedParams": {
"description": "`session/statusChanged` params (tdd SS4.6.10, ADR 31983 D2): a loaded\nsession's projected `(status, attention, needsInputReasons)` value flipped. A command-plane\nbroadcast — delivered to every connection regardless of its view\nsubscription set, never gated, no `sourceRange`; the same facts live on\nthe Session object, which is how a client seeds its table (no initial\nburst on connect).",
"properties": {
"attention": {
"description": "Attention flags after the transition; present only when at least one\nflag is set (tdd SS2.4, ADR 31983 D3).",
"items": {
"$ref": "#/$defs/AttentionFlag"
},
"type": "array"
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"status": {
"$ref": "#/$defs/SessionStatus",
"description": "Load state after the transition (the open SS2.4 enum, including\n`needsInput` since ADR 95605 D1/D4)."
},
"viewCursor": {
"description": "The causing record's view cursor (ADR 31983 D4). Required-nullable:\n`null` exactly when the paired `session/closed`'s cursor is `null`\n(the unload fold-failure arm); a definite cursor everywhere else.",
"type": [
"string",
"null"
]
}
},
"required": [
"sessionId",
"status",
"viewCursor"
],
"type": "object"
},
"SessionTodoListChangedParams": {
"description": "`session/todoListChanged` params (tdd SS4.6.3): a `TodoSnapshotUpdated`\nrecord landed. Replace the whole list on every event; an empty `items`\narray is a cleared list, not a no-op.",
"properties": {
"items": {
"description": "The full todo list, replaced wholesale.",
"items": {
"$ref": "#/$defs/TodoItem"
},
"type": "array"
},
"revision": {
"description": "The snapshot revision. Diagnostics only, never an ordering guard —\n`viewCursor` orders (tdd SS4.6.3).",
"type": "integer"
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The durable records this event folded from."
},
"sourceTool": {
"description": "The tool that produced the snapshot, verbatim.",
"type": "string"
},
"viewCursor": {
"description": "Opaque, strictly monotonic view cursor (tdd SS4.1).",
"type": "string"
}
},
"required": [
"items",
"revision",
"sessionId",
"sourceRange",
"sourceTool",
"viewCursor"
],
"type": "object"
},
"SessionTokenUsageParams": {
"description": "`session/tokenUsage` params (tdd SS4.6.5): one per model completion that\nreports usage. Carries the raw counters verbatim plus the server-derived\ncounted-once `promptTokens`/`totalTokens` (#8803: clients display and sum\nthese and never re-derive the provider's cache convention) and the\nsession `cumulative` block. Accumulate-only: `cumulative` never goes\nbackward.",
"properties": {
"cumulative": {
"$ref": "#/$defs/CumulativeTokenUsage",
"description": "Session running totals at this cursor; the fold owns the\naccumulation. Subagent/workflow-child usage is never folded in — it\nrides the owning items (tdd SS4.6.5)."
},
"durationMs": {
"description": "Model-call wall time, when measured.",
"type": "integer"
},
"finishReason": {
"description": "Provider finish reason when reported (open vocabulary, verbatim).",
"type": "string"
},
"modelId": {
"description": "The effective model that produced this usage; `null` on pre-schema\nrecords — never back-filled, an unpriced leg (tdd SS4.6.5).",
"type": [
"string",
"null"
]
},
"promptTokens": {
"description": "Prompt tokens counted exactly once under the provider's cache\nconvention (#8803). Server-derived; deterministic — the provider is\nin the log.",
"type": "integer"
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The durable records this event folded from."
},
"totalTokens": {
"description": "`promptTokens + outputTokens` — the honest per-completion total.",
"type": "integer"
},
"turnId": {
"description": "The turn whose model call completed.",
"type": "string"
},
"usage": {
"$ref": "#/$defs/TokenUsage",
"description": "Raw counters verbatim from the durable record."
},
"viewCursor": {
"description": "Opaque, strictly monotonic view cursor (tdd SS4.1).",
"type": "string"
}
},
"required": [
"cumulative",
"modelId",
"promptTokens",
"sessionId",
"sourceRange",
"totalTokens",
"turnId",
"usage",
"viewCursor"
],
"type": "object"
},
"SessionUserShellParams": {
"description": "`session/userShell` params (tdd SS3.9): run a user-initiated shell command\nin the session's workspace — the TUI's `!` escape hatch.\n**Capability-gated**: the connection must negotiate `userShell` at\n`initialize`, and the whole justification is the SS1.10 spawn boundary.",
"properties": {
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"commandText": {
"description": "The shell command to run.",
"type": "string"
},
"sessionId": {
"description": "The target session.",
"type": "string"
}
},
"required": [
"commandId",
"commandText",
"sessionId"
],
"type": "object"
},
"SessionUserShellResult": {
"description": "`session/userShell` result (tdd SS3.9): immediate. The shell runs off the\ncommand worker so a long command cannot stall the command plane; the\noutput arrives as the `userShell` item's terminal view event.",
"properties": {
"commandId": {
"description": "Echoes the client's id.",
"type": "string"
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "Admission status."
}
},
"required": [
"commandId",
"status"
],
"type": "object"
},
"SessionViewHealth": {
"description": "The view-health state (tdd SS2.5.2 companion). Open enum (`x-msp-openness:\nopen`): a client MUST ignore an unrecognized value. `Healthy` is the\nre-arm value reserved by ADR 32557 D1, emitted after a host re-load\n(ADR 32557 D5, #60870);\nopenness still reserves additive room for the #14401 durable-degraded axis.",
"enum": [
"unavailable",
"healthy"
],
"type": "string",
"x-msp-openness": "open"
},
"SessionViewHealthChangedParams": {
"description": "`session/viewHealthChanged` params (ADR 32557; #32557): the named\nsession's live view stream became unavailable, and why, or (ADR 32557 D5)\nit is back after the host re-loaded the view, so the client re-reads and\nre-subscribes.\n\nBest-effort: ordered after already-queued view frames and may be dropped\n(for example when the connection is closing), so a client MUST NOT assume a\nguaranteed push and still reads `history.noneReason` on its next\nresume/read (FM-005).",
"properties": {
"health": {
"$ref": "#/$defs/SessionViewHealth",
"description": "The new view-health state: `Unavailable`, or `Healthy` once the host\nre-loaded a failed view (#60870)."
},
"noneReason": {
"$ref": "#/$defs/HistoryNoneReason",
"description": "Why the view is unavailable — the SAME typed `HistoryNoneReason`\nvocabulary the pull path stamps on `history.noneReason` (tdd SS2.5.2,\nD-050), so a client reuses one handler for push and pull.\n`projectionUnavailable` when the view fails, then\n`projectionRebuildFailed`, which the pull path never stamps: it rides\nonly a `session/viewHealthChanged` notification, after the host's one\nre-load of a failed live view fails or right after a fork child's live\nfail-close; present only when `health` is\n`Unavailable`. Open on the client side: an unknown reason decodes\nconservatively and renders generically."
},
"sessionId": {
"description": "The session whose live view health changed.",
"type": "string"
}
},
"required": [
"health",
"sessionId"
],
"type": "object"
},
"SideProvenance": {
"description": "Side provenance folded from the durable side provenance\n(`SideChatProvenance`, tdd SS2.4/SS2.5.7; ADR 45435 D2).",
"properties": {
"commandId": {
"description": "The `commandId` of the `session/sideChat` that created it.",
"type": "string"
},
"cutCursor": {
"description": "An **opaque provenance string** preserved verbatim from the durable\nside provenance (`source_cut_cursor`). Display-only — not one of the\ncursor families: clients MUST NOT parse it and no method accepts it\n(tdd SS2.4).",
"type": "string"
},
"sessionId": {
"description": "The source main session this side was opened from.",
"type": "string"
}
},
"required": [
"commandId",
"cutCursor",
"sessionId"
],
"type": "object"
},
"SkillActivationScope": {
"description": "`skill/setActivation` activation target (tdd SS3.30.1). **Closed**: a\nclient-selected write vocabulary (ADR 45433 D2) — a write must fail a\nscope the host does not implement rather than record activation against\nan unknown target. Contrast the open read-side [`SkillSource`].",
"enum": [
"user",
"project",
"bundled",
"plugin"
],
"type": "string",
"x-msp-openness": "closed"
},
"SkillActivationState": {
"description": "The three-state skill activation (tdd SS3.30.1, ADR 10512 — no new\nstate). **Closed**: a client-selected write vocabulary (ADR 45433 D2).",
"enum": [
"on",
"userInvocableOnly",
"off"
],
"type": "string",
"x-msp-openness": "closed"
},
"SkillCatalogEntry": {
"description": "One typed-invocable shortcut spelling (tdd SS3.22.1). A plugin skill may\ncontribute two rows: its bare-name winner and its qualified\n`<pluginId>:<skillId>` form.",
"properties": {
"argumentHint": {
"description": "Present when the skill declares an argument hint.",
"type": "string"
},
"description": {
"description": "The skill's palette summary.",
"type": "string"
},
"displayName": {
"description": "The skill display name the first-party palette shows.",
"type": "string"
},
"pluginId": {
"description": "The owning plugin's identifier; present when `source` is `plugin`.",
"type": "string"
},
"selector": {
"description": "The shortcut token without the leading slash — bare (`fix-bug`) or\nplugin-qualified (`acme:deploy`) — the exact value a `skill` input\npart submits. Unique within one response.",
"type": "string"
},
"source": {
"$ref": "#/$defs/SkillSource",
"description": "Where the skill comes from."
},
"title": {
"description": "The skill's declared human-readable name (`SKILL.md`\n`metadata.display-name`), for clients to show where people read the\nskill's name; absent when the skill declares none (ADR 56597 D2). The\npalette keeps showing `displayName`.",
"type": "string"
}
},
"required": [
"description",
"displayName",
"selector",
"source"
],
"type": "object"
},
"SkillChangedParams": {
"description": "`skill/changed` params (tdd SS3.22.2): the session's user-invocable set\nchanged; clients re-issue `skill/list`. Advisory — the host may coalesce\nbursts and guarantees no ordering relative to view events (ADR 32471 D3).",
"properties": {
"sessionId": {
"description": "The session whose set changed.",
"type": "string"
}
},
"required": [
"sessionId"
],
"type": "object"
},
"SkillImportCounts": {
"description": "The four receipt-list lengths (tdd SS3.30.2): a client renders counts\nwithout walking lists.",
"properties": {
"failed": {
"description": "`failed.len()`.",
"type": "integer"
},
"installed": {
"description": "`installed.len()`.",
"type": "integer"
},
"quarantined": {
"description": "`quarantined.len()`.",
"type": "integer"
},
"skipped": {
"description": "`skipped.len()`.",
"type": "integer"
}
},
"required": [
"failed",
"installed",
"quarantined",
"skipped"
],
"type": "object"
},
"SkillImportFailure": {
"description": "One import candidate that could neither install nor quarantine (tdd\nSS3.30.2): recorded so the run continues past it. `id` is null when\nthe candidate never yielded one — present-but-null, never omitted.",
"properties": {
"id": {
"description": "The candidate's id, or null when it never yielded one.",
"type": [
"string",
"null"
]
},
"reason": {
"description": "Why the candidate failed.",
"type": "string"
}
},
"required": [
"id",
"reason"
],
"type": "object"
},
"SkillImportParams": {
"description": "`skill/import` params (tdd SS3.30.2, #45433): import foreign skills\nthrough the single `SkillsService::import_skills` seam.",
"properties": {
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7) — required even for\n`dryRun` previews.",
"type": "string"
},
"dryRun": {
"description": "Preview for the consent UI; writes nothing. Additive-optional,\ndefault false.",
"type": "boolean"
},
"force": {
"description": "Re-import over already-imported ids (the CLI `--force` twin).\nAdditive-optional, default false.",
"type": "boolean"
},
"sessionId": {
"description": "The target session.",
"type": "string"
},
"source": {
"$ref": "#/$defs/SkillImportSource",
"description": "The foreign ecosystem to import from."
}
},
"required": [
"commandId",
"sessionId",
"source"
],
"type": "object"
},
"SkillImportQuarantine": {
"description": "One quarantined import candidate (tdd SS3.30.2): kept, not loaded.",
"properties": {
"id": {
"description": "The candidate's id.",
"type": "string"
},
"reasons": {
"description": "The quarantine reasons.",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"id",
"reasons"
],
"type": "object"
},
"SkillImportResult": {
"description": "`skill/import` result (tdd SS3.30.2, #45433): the ack envelope plus\nthe service receipt projection.",
"properties": {
"commandId": {
"description": "Echoes the client's id.",
"type": "string"
},
"counts": {
"$ref": "#/$defs/SkillImportCounts",
"description": "The four list lengths."
},
"dryRun": {
"description": "Echoes the call's preview flag.",
"type": "boolean"
},
"failed": {
"description": "Candidates that could neither install nor quarantine. Import never\naborts the whole run on one bad candidate.",
"items": {
"$ref": "#/$defs/SkillImportFailure"
},
"type": "array"
},
"installed": {
"description": "The ids the run installed, in pipeline order.",
"items": {
"type": "string"
},
"type": "array"
},
"quarantined": {
"description": "Kept, not loaded, with reasons.",
"items": {
"$ref": "#/$defs/SkillImportQuarantine"
},
"type": "array"
},
"skipped": {
"description": "Ids the run did not install: already-imported ids and in-run\nduplicates, verbatim from the seam's `skipped` vec.",
"items": {
"type": "string"
},
"type": "array"
},
"source": {
"$ref": "#/$defs/SkillImportSource",
"description": "Echoes the call's ecosystem."
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "Admission status."
}
},
"required": [
"commandId",
"counts",
"dryRun",
"failed",
"installed",
"quarantined",
"skipped",
"source",
"status"
],
"type": "object"
},
"SkillImportSource": {
"description": "`skill/import` foreign ecosystem (tdd SS3.30.2). **Closed**: a\nclient-selected write vocabulary (ADR 45433 D2) — a write must fail an\necosystem the host does not implement rather than import from an\nunknown dir. The host resolves its own foreign dir (the\n`foreign_skills_sources` derivation); no client paths cross the wire.",
"enum": [
"claude",
"codex"
],
"type": "string",
"x-msp-openness": "closed"
},
"SkillInvocationSource": {
"description": "A `skill` input part's picked-copy source (tdd SS3.22.3; ADR 32471\nD12): the D2 catalog-row `source` enum values, sent by the TUI on every\nskill submit so the host resolves the exact `(selector, source)` row.\n**Closed**: a client-selected write vocabulary (ADR 45433 D2) — an\nunknown value is `invalidParams`, never a fall-through to the bare row.\nContrast the open read-side [`SkillSource`].",
"enum": [
"bundled",
"user",
"project",
"plugin"
],
"type": "string",
"x-msp-openness": "closed"
},
"SkillListParams": {
"description": "`skill/list` params (tdd SS3.22.1, SS3.30.3). Per-session because skill\nscope follows the session's workspace and plugin state.",
"properties": {
"sessionId": {
"description": "The target session.",
"type": "string"
}
},
"required": [
"sessionId"
],
"type": "object"
},
"SkillListResult": {
"description": "`skill/list` result (tdd SS3.22.1): one row per typed-invocable shortcut\nspelling — exactly the invocations the first-party typed dispatch accepts\n(spec 11352 INV-007 predicate and the shared shortcut layer's name\nresolution, both by call-through; ADR 32471 D2).",
"properties": {
"skills": {
"description": "The session's user-invocable skill rows.",
"items": {
"$ref": "#/$defs/SkillCatalogEntry"
},
"type": "array"
}
},
"required": [
"skills"
],
"type": "object"
},
"SkillSetActivationParams": {
"description": "`skill/setActivation` params (tdd SS3.30.1, #45433): turn one skill on\nor off in any scope through the single\n`SkillsService::set_activation` seam.",
"properties": {
"activation": {
"$ref": "#/$defs/SkillActivationState",
"description": "The activation to apply."
},
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"scope": {
"$ref": "#/$defs/SkillActivationScope",
"description": "The activation target."
},
"selector": {
"description": "Names one skill: a bare or plugin-qualified token from the session's\nfull catalog (tdd SS3.30.3), the SS3.22.1 row vocabulary.",
"type": "string"
},
"sessionId": {
"description": "The target session.",
"type": "string"
}
},
"required": [
"activation",
"commandId",
"scope",
"selector",
"sessionId"
],
"type": "object"
},
"SkillSetActivationResult": {
"description": "`skill/setActivation` result (tdd SS3.30.1, #45433): the ack envelope\nplus the applied state.",
"properties": {
"activation": {
"$ref": "#/$defs/SkillActivationState",
"description": "The applied activation."
},
"commandId": {
"description": "Echoes the client's id.",
"type": "string"
},
"previous": {
"$ref": "#/$defs/SkillActivationState",
"description": "The activation value in force for that `(selector, scope)`\nimmediately before the write: the same value a full-catalog\n`skill/list` row would have carried in `activation` for it."
},
"scope": {
"$ref": "#/$defs/SkillActivationScope",
"description": "Echoes the applied write's scope."
},
"selector": {
"description": "Echoes the applied write's selector.",
"type": "string"
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "Admission status."
}
},
"required": [
"activation",
"commandId",
"previous",
"scope",
"selector",
"status"
],
"type": "object"
},
"SkillSource": {
"description": "A skill row's source scope (tdd SS3.22.1): the projection of the skills\ncrate's `SkillsSourceScope`. Open (server-produced result vocabulary,\nthe #22785 enum-openness rule): a future scope value is additive.",
"enum": [
"bundled",
"user",
"project",
"plugin"
],
"type": "string",
"x-msp-openness": "open"
},
"SnapshotAnchor": {
"description": "The compaction boundary an anchored snapshot is anchored at (tdd SS2.5.2).",
"properties": {
"boundaryCursor": {
"description": "The view cursor of the boundary's `compaction` event.",
"type": "string"
},
"summarizedThrough": {
"description": "The boundary's opaque compaction anchor (tdd SS4.5.10).",
"type": "string"
}
},
"required": [
"boundaryCursor",
"summarizedThrough"
],
"type": "object"
},
"SnapshotState": {
"description": "The complete folded view at the snapshot cursor (tdd SS4.9.1).\n\nAdditive-optional evolution applies exactly as everywhere else; unknown\nmembers MUST be ignored, and preserved if re-serialized.",
"properties": {
"activeTurn": {
"anyOf": [
{
"$ref": "#/$defs/TurnRef"
},
{
"type": "null"
}
],
"description": "The running foreground turn; `null` when none is running."
},
"approvalMode": {
"$ref": "#/$defs/EffectiveApprovalModeState",
"description": "The effective approval mode at this cursor — the same object the\n`Session` carries (tdd SS2.4, SS5.12)."
},
"branch": {
"anyOf": [
{
"$ref": "#/$defs/BranchState"
},
{
"type": "null"
}
],
"description": "Latest branch observation; `null` when no fact has landed."
},
"contextUsage": {
"$ref": "#/$defs/ContextUsage",
"description": "The latest `(windowTokens, usedTokens, pressure)` triple. The protocol\nallows \"`null`/absent\" and its worked example OMITS the member; the\nbinary omits it too, so this is the absent arm — the four siblings above\nare present-null in the same frame. A member is published as one or the\nother, never both."
},
"effectiveModel": {
"anyOf": [
{
"$ref": "#/$defs/EffectiveModel"
},
{
"type": "null"
}
],
"description": "Latest effective model; `null` when no fact has landed."
},
"goal": {
"anyOf": [
{
"$ref": "#/$defs/Goal"
},
{
"type": "null"
}
],
"description": "Latest goal block; `null` when no fact has landed."
},
"items": {
"description": "Every item, in first-opened order, each at its latest revision at the\nsnapshot cursor. One schema per kind, shared with the notification\nitem object — which is what makes snapshot+suffix a pure splice\n(tdd SS4.9.1).",
"items": {
"$ref": "#/$defs/Item"
},
"type": "array"
},
"monitorInbox": {
"description": "The retained Monitor admissions at this cursor (tdd SS4.9.1,\nFR-56492-7 as amended by #76729): every admission still awaiting\ndelivery, plus per task the newest 200 non-blank stdout lines and the\nnewest other admission, delivered or not, each with its drain and void\nstamps; a pending cut of the history ladder (tdd SS2.5.2, ADR 56492 D4)\ncarries only the entries still awaiting delivery. A current host always\nsends it (empty when no monitor admitted anything); absent means an\nolder host.",
"items": {
"$ref": "#/$defs/MonitorInboxSnapshotEntry"
},
"type": "array"
},
"name": {
"description": "The settled canonical session name; `null` when the session was never\nnamed (#27598, tdd SS4.9.1 / SS2.14). Folds the same durable\n`session/nameChanged` record `Session.name` reports.",
"type": [
"string",
"null"
]
},
"pendingApprovals": {
"description": "The pending-approval half of the pending set.",
"items": {
"$ref": "#/$defs/PendingApprovalPointer"
},
"type": "array"
},
"pendingUserInputs": {
"description": "The pending-user-input half of the pending set.",
"items": {
"$ref": "#/$defs/PendingUserInputPointer"
},
"type": "array"
},
"queuedTurns": {
"description": "Admitted-but-not-launched submits, in launch order (tdd SS3.1.4).",
"items": {
"$ref": "#/$defs/TurnRef"
},
"type": "array"
},
"reasoningEffort": {
"$ref": "#/$defs/ReasoningEffortState",
"description": "The latest session-default reasoning effort with its source; ABSENT\nuntil a set lands (tdd SS4.9.1 `reasoningEffort`, ADR 31255 D1 — the\n`contextUsage` absent arm, never present-null)."
},
"todoList": {
"anyOf": [
{
"$ref": "#/$defs/TodoListState"
},
{
"type": "null"
}
],
"description": "Latest todo list; `null` when no fact has landed."
},
"tokenUsage": {
"$ref": "#/$defs/CumulativeTokenUsage",
"description": "The `cumulative` block of the last `session/tokenUsage` event; zeroes\nwhen none (tdd SS4.9.1)."
},
"turnCount": {
"description": "Completed-turn count at this cursor.",
"type": "integer"
}
},
"required": [
"activeTurn",
"approvalMode",
"branch",
"effectiveModel",
"goal",
"items",
"pendingApprovals",
"pendingUserInputs",
"queuedTurns",
"todoList",
"tokenUsage",
"turnCount"
],
"type": "object"
},
"SourceRange": {
"description": "The inclusive raw-record range a durable-sourced view event folded from\n(tdd SS4.2) — the reconciliation token: re-folding the cited records from\nthe canonical fold state immediately before `first` — appended host-death\nterminals seed from the end-of-records state — reproduces the event\n(tdd SS7.5; spec 14653 T041/INV-009). In v1 it is an **opaque provenance\ntoken**: no wire method reads what it points at (the SS6 raw-log altitude\nis deferred, #13929).\n\nEphemeral-sourced events (`item/delta`, and an `item/started` that opens\non an ephemeral record) carry no `sourceRange` — ephemeral records may be\nevicted by retention (tdd SS4.2; spec 14653 INV-009).",
"properties": {
"first": {
"$ref": "#/$defs/RecordPosition",
"description": "The first record of the inclusive range."
},
"last": {
"$ref": "#/$defs/RecordPosition",
"description": "The last record of the inclusive range; equal to `first` for an event\nfolded from one record."
},
"stream": {
"$ref": "#/$defs/StreamRef",
"description": "The stream the folded records live on (run stream, or the session\nstream's mirror of task/approval/subagent-control records — whichever\nthe fold actually consumed, tdd SS4.2)."
}
},
"required": [
"first",
"last",
"stream"
],
"type": "object"
},
"StatusAttempt": {
"description": "`toolCall.statusAttempt` (tdd SS4.5.5, #45448): the latest\n`TaskExternalAttemptDetail`, field-for-field — countdown inputs the\nclient renders the tick from, so no event spam.",
"properties": {
"attempt": {
"description": "The attempt number.",
"type": "integer"
},
"errorKind": {
"description": "The error kind (durable vocabulary, verbatim), when recorded.",
"type": "string"
},
"httpStatus": {
"description": "The HTTP status, when recorded.",
"type": "integer"
},
"maxAttempts": {
"description": "The maximum attempts, when known.",
"type": "integer"
},
"nextAttempt": {
"description": "The scheduled next attempt, when known.",
"type": "integer"
},
"operation": {
"description": "The operation (durable vocabulary, verbatim).",
"type": "string"
},
"retryDelayMs": {
"description": "The retry delay in ms, when known.",
"type": "integer"
},
"system": {
"description": "The external system (durable vocabulary, verbatim).",
"type": "string"
}
},
"required": [
"attempt",
"operation",
"system"
],
"type": "object"
},
"StatusChildren": {
"description": "`toolCall.statusChildren` (tdd SS4.5.5, #45448): the latest\n`TaskChildSummaryDetail`, field-for-field.",
"properties": {
"active": {
"description": "Active children.",
"type": "integer"
},
"cancelled": {
"description": "Cancelled children.",
"type": "integer"
},
"completed": {
"description": "Completed children.",
"type": "integer"
},
"failed": {
"description": "Failed children.",
"type": "integer"
},
"total": {
"description": "Total children, when known.",
"type": "integer"
}
},
"required": [
"active",
"cancelled",
"completed",
"failed"
],
"type": "object"
},
"StatusHealth": {
"description": "`toolCall.statusHealth` (tdd SS4.5.5, #45448): the latest\n`TaskHealthDetail`, field-for-field.",
"properties": {
"level": {
"$ref": "#/$defs/StatusHealthLevel",
"description": "The health level (the durable `TaskHealthLevel` vocabulary verbatim)."
},
"reason": {
"description": "The reason, when recorded.",
"type": "string"
}
},
"required": [
"level"
],
"type": "object"
},
"StatusHealthLevel": {
"description": "`toolCall.statusHealth.level` (tdd SS4.5.5, #45448): the durable\n`TaskHealthLevel` vocabulary verbatim. Open — runtime vocabulary may\ngrow additively, and clients MUST render unknown levels generically.",
"enum": [
"ok",
"waiting",
"degraded",
"retrying",
"blocked",
"failed"
],
"type": "string",
"x-msp-openness": "open"
},
"StatusProgress": {
"description": "`toolCall.statusProgress` (tdd SS4.5.5, #45448): the latest\n`TaskProgressDetail`, field-for-field.",
"properties": {
"current": {
"description": "Completed units.",
"type": "integer"
},
"total": {
"description": "Total units, when known.",
"type": "integer"
},
"unit": {
"description": "Unit label, when recorded.",
"type": "string"
}
},
"required": [
"current"
],
"type": "object"
},
"StatusStep": {
"description": "`toolCall.statusStep` (tdd SS4.5.5, #45448): the latest\n`TaskActiveStepDetail`, field-for-field.",
"properties": {
"index": {
"description": "The step index, when known.",
"type": "integer"
},
"label": {
"description": "The active step's label.",
"type": "string"
},
"total": {
"description": "The step count, when known.",
"type": "integer"
}
},
"required": [
"label"
],
"type": "object"
},
"StreamRef": {
"description": "One raw stream named by a [`SourceRange`] (tdd SS4.2).",
"properties": {
"id": {
"description": "The stream id.",
"type": "string"
},
"kind": {
"description": "The stream kind, verbatim raw-log vocabulary (e.g. `\"run\"`,\n`\"session\"`). A free string, not an enum: `sourceRange` is an opaque\nprovenance token in v1 and the raw stream vocabulary is the deferred\nSS6 altitude's to freeze (#13929).",
"type": "string"
}
},
"required": [
"id",
"kind"
],
"type": "object"
},
"SubagentControlStatus": {
"description": "Subagent control status (tdd SS4.5.7, camelCased\n`SubagentControlStatus`). Open; the generic item `status` is the terminal\nauthority.",
"enum": [
"accepted",
"starting",
"running",
"resultReady",
"closing",
"closed",
"recoveryPending",
"manualReconciliation"
],
"type": "string",
"x-msp-openness": "open"
},
"SubagentInputParams": {
"description": "Params for `subagent/sendMessage` and `subagent/followupTask` (SS3.16):\na child target plus the input body.",
"properties": {
"body": {
"description": "The note/task text: trimmed with Unicode-whitespace semantics,\nrejected when empty after trimming, delivered trimmed with multibyte\ncontent byte-for-byte intact (SS3.16).",
"type": "string"
},
"commandId": {
"description": "Client-minted UUIDv7 command id (SS3.1.1).",
"type": "string"
},
"sessionId": {
"description": "Target session (UUIDv7 string; SS3 preamble).",
"type": "string"
},
"subagentId": {
"description": "Durable child id (the SS4.5.7 item's `subagentId`; opaque string).",
"type": "string"
}
},
"required": [
"body",
"commandId",
"sessionId",
"subagentId"
],
"type": "object"
},
"SubagentInputPhase": {
"description": "`subagentInput.inputPhase` (#70249): the record the item stands for.\nOpen: a client ignores an item whose phase it does not know.",
"enum": [
"queued",
"delivered"
],
"type": "string",
"x-msp-openness": "open"
},
"SubagentListParams": {
"description": "`subagent/list` params: the session whose subagent roster to read. A\nread-only query in the `skill/list` mold: no `commandId`, no durable\nrecord, no view event. Served by the loaded parent's runtime control\nrecords, so its refusals (`-32020`/`-32021`/`-32022`/`-32024`, plus a retryable\n`-32603` when the runtime source declines) are the `task/list` split.",
"properties": {
"sessionId": {
"description": "The target session (the parent whose children to list).",
"type": "string"
}
},
"required": [
"sessionId"
],
"type": "object"
},
"SubagentListResult": {
"description": "`subagent/list` result: the session's roster rows. Empty only when the\nparent's control records name no durable child; a declined source\nrefuses typed instead of answering empty.",
"properties": {
"subagents": {
"description": "The session's roster rows, ordered by `(agentPath, subagentId)`.",
"items": {
"$ref": "#/$defs/SubagentRosterEntry"
},
"type": "array"
}
},
"required": [
"subagents"
],
"type": "object"
},
"SubagentOwnerReasonParams": {
"description": "Params for `subagent/interrupt`, `subagent/stop`, and `subagent/close`\n(SS3.16): a child target plus an optional human-readable reason that is\npreserved on the durable effect record.",
"properties": {
"commandId": {
"description": "Client-minted UUIDv7 command id (SS3.1.1).",
"type": "string"
},
"reason": {
"description": "Optional reason, preserved on the durable owner-command record.",
"type": "string"
},
"sessionId": {
"description": "Target session (UUIDv7 string; SS3 preamble).",
"type": "string"
},
"subagentId": {
"description": "Durable child id (the SS4.5.7 item's `subagentId`; opaque string).",
"type": "string"
}
},
"required": [
"commandId",
"sessionId",
"subagentId"
],
"type": "object"
},
"SubagentResult": {
"description": "A subagent's result envelope (tdd SS4.5.7, `SubagentResultEnvelope`).",
"properties": {
"artifactRefs": {
"description": "Artifact references, verbatim.",
"items": {
"type": "string"
},
"type": "array"
},
"drained": {
"description": "`true` once the parent consumed the result (the inbox join fact the\ngate-off drain arm folds into the `Finished` marker — tdd SS4.5.7).\nAbsent otherwise; never cleared once set. Clients mint the\n`Finished` marker off this flag instead of re-deriving the join; a\nclient that knows `subagentResult` (tdd SS4.5.26) draws one\n`Finished` member per consumed result instead, and keeps drawing from\nthis flag for a child with no such item, as on a host before the kind\n(#88809).",
"type": "boolean"
},
"errorKind": {
"description": "Error kind, verbatim durable vocabulary, when the child failed.",
"type": "string"
},
"evidenceRefs": {
"description": "Evidence references, verbatim.",
"items": {
"type": "string"
},
"type": "array"
},
"structuredData": {
"description": "Structured result data, verbatim, when present.",
"properties": {},
"type": "object"
},
"summary": {
"description": "Result summary, bounded on the wire at the 64 KiB retained-text budget\n(tdd SS4.5.4 and SS4.5.7, ADR 35691 D9); a cut sets the item's\n`truncated`. The durable record stays verbatim.",
"type": "string"
},
"superseded": {
"description": "`true` once a newer attempt of the child started after this result\n(ADR 92325 D1): the result stays, and a client takes the child's\nstatus from `controlStatus`. Absent, it asserts nothing (a host\nbefore this member, or a fold state saved before it, never sets it);\na newer result replaces the whole result, so it carries no mark.",
"type": "boolean"
},
"text": {
"description": "Result text, when present, bounded on the wire at the same 64 KiB\nbudget (ADR 35691 D9); a cut sets the item's `truncated`.",
"type": "string"
}
},
"required": [
"artifactRefs",
"evidenceRefs",
"summary"
],
"type": "object"
},
"SubagentResultStatus": {
"description": "`subagentResult.resultStatus` (#88809): the consumed attempt's outcome.\nAbsent when the host had not seen that attempt's result envelope at the\ndrain; a client then shows the child's current outcome (ADR 88809 D2).\nOpen: a client treats a value it does not know as an absent member.",
"enum": [
"completed",
"failed",
"cancelled"
],
"type": "string",
"x-msp-openness": "open"
},
"SubagentRosterEntry": {
"description": "One roster row: a durable child's identity, place, and state, projected\nfrom its control records. Rows carry no result content — the transcript\nstays on the child session / `subagent/readResult`.",
"properties": {
"agentPath": {
"description": "The agent definition path (`agent_path`), verbatim from the spawn.",
"type": "string"
},
"childSessionId": {
"description": "The child's own session id, readable via `session/read`/`view/page`.\n**Additive-optional**: absent until the child's start is attested.",
"type": "string"
},
"controlStatus": {
"$ref": "#/$defs/SubagentControlStatus",
"description": "The child's control status: `Accepted` at spawn, then the latest\n`StatusUpdated` / `Closed` / `ResultReady` / `RecoveryAvailable` /\n`RecoveryDecision` (`Accepted | Starting | Running | ResultReady |\nClosing | Closed | RecoveryPending | ManualReconciliation`)."
},
"definitionName": {
"description": "The granted definition's name (`definition_grant_audit`\n`definition_name`). **Additive-optional**: absent on spawns without\na grant audit (historical records). The resolved definition id is\nnot persisted on the spawn record, so the name is what the roster\ncan truthfully carry.",
"type": "string"
},
"depth": {
"description": "The spawn depth (1 = a root-session child).",
"type": "integer"
},
"durationMs": {
"description": "The child's observed wall-clock duration in ms, when the runtime\nobserved one. **Additive-optional**: absent until first observation.",
"type": "integer"
},
"name": {
"description": "The child's display name: the spawn `description`, falling back to\nthe spawn `role`. **Additive-optional**: absent when neither carries\none; never parsed from `agentPath`.",
"type": "string"
},
"objective": {
"description": "The spawn objective. **Additive-optional**: absent when the spawn\ncarried none.",
"type": "string"
},
"parentPath": {
"description": "The parent row's `agentPath`. **Additive-optional**: absent whenever\n`parentSubagentId` is.",
"type": "string"
},
"parentSubagentId": {
"description": "The parent's `subagentId`: the roster row whose child session issued\nthis child's spawn. **Additive-optional**: absent when the parent is\nthe root session, or when the parent row is not in the roster or not\nyet attested — never guessed, never derived from `agentPath`.",
"type": "string"
},
"resultReady": {
"description": "Whether the child's latest attempt's result is ready (a\n`ResultReady` for the latest admitted attempt seen).",
"type": "boolean"
},
"role": {
"description": "The spawn role. **Additive-optional**: absent when the spawn\ncarried none.",
"type": "string"
},
"subagentId": {
"description": "The durable child identity (`subagent_id`). Rows without one are not\nroster rows: a rejected spawn names no child.",
"type": "string"
},
"terminalReason": {
"description": "The terminal reason: the result envelope's `errorKind` when present,\nelse the cancel outcome's `reason`. **Additive-optional**: absent on\nlive rows and on terminals that carry no reason — never fabricated\nfrom the close outcome's status word.",
"type": "string"
},
"workflowRunId": {
"description": "The owning dynamic workflow run id, when the child was\nworkflow-admitted. **Additive-optional**: absent for native spawns.",
"type": "string"
}
},
"required": [
"agentPath",
"controlStatus",
"depth",
"resultReady",
"subagentId"
],
"type": "object"
},
"SubagentTargetParams": {
"description": "Params for `subagent/resume`, `subagent/reopen`, and\n`subagent/readResult` (SS3.16): the bare child target.",
"properties": {
"commandId": {
"description": "Client-minted UUIDv7 command id (SS3.1.1).",
"type": "string"
},
"sessionId": {
"description": "Target session (UUIDv7 string; SS3 preamble).",
"type": "string"
},
"subagentId": {
"description": "Durable child id (the SS4.5.7 item's `subagentId`; opaque string).",
"type": "string"
}
},
"required": [
"commandId",
"sessionId",
"subagentId"
],
"type": "object"
},
"SubscriptionUsage": {
"description": "The one usage payload shape: the `usage/read` result's `usage` member and\nthe `usage/changed` params (ADR 32563 D2/D3). The numbers are\npoint-in-time — `observedAtMs` is the host's arrival stamp, so a client\nrenders \"as of\", never implies live data (spec 18742 US-FR-004).",
"properties": {
"observedAtMs": {
"description": "When the host RECEIVED this observation (frame arrival or mint\nrequest-send), epoch milliseconds.",
"type": "integer"
},
"tier": {
"description": "The provider's subscription tier id, verbatim.",
"type": "string"
},
"weekly": {
"$ref": "#/$defs/SubscriptionUsageWeekly",
"description": "The rolling weekly block."
},
"window": {
"$ref": "#/$defs/SubscriptionUsageWindow",
"description": "The current window."
}
},
"required": [
"observedAtMs",
"tier",
"weekly",
"window"
],
"type": "object"
},
"SubscriptionUsageWeekly": {
"description": "The rolling weekly block: same semantics as\n[`SubscriptionUsageWindow`] without a duration (ADR 32563 D2).",
"properties": {
"resetsAtMs": {
"description": "When the weekly window resets, epoch milliseconds.",
"type": "integer"
},
"usedPercent": {
"description": "Percent of the weekly budget used (integer ≥ 0, may exceed 100).",
"type": "integer"
}
},
"required": [
"resetsAtMs",
"usedPercent"
],
"type": "object"
},
"SubscriptionUsageWindow": {
"description": "The current usage window (the provider's 5-hour-class block): verbatim\nprovider percentages with the reset stamp normalized to epoch\nmilliseconds (ADR 32563 D2).",
"properties": {
"resetsAtMs": {
"description": "When the window resets, epoch milliseconds.",
"type": "integer"
},
"usedPercent": {
"description": "Percent of the window's budget used: an integer ≥ 0, verbatim from\nthe provider — over-quota values above 100 are valid.",
"type": "integer"
},
"windowDurationMins": {
"description": "The window's length in minutes (> 0).",
"type": "integer"
}
},
"required": [
"resetsAtMs",
"usedPercent",
"windowDurationMins"
],
"type": "object"
},
"SuccessResponse": {
"description": "A success response frame (SS1.2 §2.3).",
"properties": {
"id": {
"$ref": "#/$defs/RequestId",
"description": "Echo of the request id."
},
"jsonrpc": {
"$ref": "#/$defs/JsonRpcVersion",
"description": "The literal `\"2.0\"`."
},
"result": {
"description": "Always a JSON object, possibly `{}`, never a bare scalar — so every\nresult can grow additive-optional members (SS1.2).",
"properties": {},
"type": "object"
}
},
"required": [
"id",
"jsonrpc",
"result"
],
"type": "object"
},
"TaskBackgroundParams": {
"description": "`task/background` params (tdd §3.13): durably send a running foreground\ntool task to the background.",
"properties": {
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"sessionId": {
"description": "The target session.",
"type": "string"
},
"taskId": {
"description": "The task to background, exactly as the view names it: the `toolCall`\nitem's `itemId` IS the task id (SS4.5.5).",
"type": "string"
}
},
"required": [
"commandId",
"sessionId",
"taskId"
],
"type": "object"
},
"TaskCommandResult": {
"description": "The `task/background` / `task/stop` ack (tdd §3.13/§3.14): admission-only,\nechoing the targeted task.",
"properties": {
"commandId": {
"description": "Echoes the client's id.",
"type": "string"
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "Admission status."
},
"taskId": {
"description": "Echoes the targeted task id.",
"type": "string"
}
},
"required": [
"commandId",
"status",
"taskId"
],
"type": "object"
},
"TaskExecutionMode": {
"description": "A task row's execution mode (tdd SS3.31, ADR 62268 D2). Open\n(server-produced result vocabulary, the #22785 enum-openness rule):\nclients MUST ignore unknown modes.",
"enum": [
"foreground",
"background"
],
"type": "string",
"x-msp-openness": "open"
},
"TaskListEntry": {
"description": "One task inventory row (tdd SS3.31). The row is the stable\ncontract: `kind` and `status` stay open so a future state extends them\nwithout breaking clients.",
"properties": {
"backgroundInitiator": {
"$ref": "#/$defs/BackgroundInitiator",
"description": "Who backgrounded the task, mirroring the item field.\n**Additive-optional**: absent on pre-split records and\nregistry-only rows, never inferred."
},
"command": {
"description": "The raw command text: the joined `toolCall` item's `command`\nargument verbatim (ADR 62268 D2). **Additive-optional**:\nomitted when the row has no item or the item carries no\ncommand. Monitors join raw — clients redact (INV-17544-6).",
"type": "string"
},
"executionMode": {
"$ref": "#/$defs/TaskExecutionMode",
"description": "`\"foreground\" | \"background\"` (ADR 62268 D2).\n**Additive-optional**: absent means `\"background\"` (only\npre-change hosts omit it, and those list background rows only);\nnever guessed."
},
"kind": {
"description": "What the workload is: `\"tool\"` or `\"tool.*\"` for item rows (the\nrecorded kind when the registry records one, else `\"tool\"`); the\nrecorded registry kind string verbatim for registry-only rows.\nOpen vocabulary — clients MUST ignore unknown kinds. A `String`,\nnot an enum: registry kind strings are unbounded.",
"type": "string"
},
"startedAt": {
"description": "The host-known task start, RFC3339. **Additive-optional**: omitted,\nnever guessed, when the host does not know it.",
"type": "string"
},
"status": {
"$ref": "#/$defs/TaskListStatus",
"description": "`\"inProgress\"` — the only value at this increment, since every\nlisted row is non-terminal by construction."
},
"taskId": {
"description": "The `toolCall` item's `itemId` for item rows; the runtime registry\nid for registry-only rows.",
"type": "string"
},
"tool": {
"description": "The short tool name on item-visible tool rows only; never a label,\nnever arguments. **Additive-optional**: absent elsewhere.",
"type": "string"
}
},
"required": [
"kind",
"status",
"taskId"
],
"type": "object"
},
"TaskListParams": {
"description": "`task/list` params (tdd SS3.31): the session whose background-task\ninventory to read. A read-only query in the `skill/list` mold: no\n`commandId`, no durable record, no view event.",
"properties": {
"sessionId": {
"description": "The target session.",
"type": "string"
}
},
"required": [
"sessionId"
],
"type": "object"
},
"TaskListResult": {
"description": "`task/list` result (tdd SS3.31): one row per live workload,\nbackground and foreground (ADR 62268 D1), oldest first; empty when\nnothing is running.",
"properties": {
"tasks": {
"description": "The session's live task rows.",
"items": {
"$ref": "#/$defs/TaskListEntry"
},
"type": "array"
}
},
"required": [
"tasks"
],
"type": "object"
},
"TaskListStatus": {
"description": "A task row's status (tdd SS3.31). Open (server-produced result\nvocabulary, the #22785 enum-openness rule): a future state is\nadditive, and clients MUST ignore unknown statuses.",
"enum": [
"inProgress"
],
"type": "string",
"x-msp-openness": "open"
},
"TaskStopAllParams": {
"description": "`task/stopAll` params (tdd §3.15): stop every stoppable background\nworkload live at admission.",
"properties": {
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"sessionId": {
"description": "The target session.",
"type": "string"
}
},
"required": [
"commandId",
"sessionId"
],
"type": "object"
},
"TaskStopAllResult": {
"description": "The `task/stopAll` ack (tdd §3.15): always `accepted`, including over an\nempty set — a blanket stop over nothing is a satisfied gesture. The ack\ndeliberately carries no stopped-task list; count the kills from the view.",
"properties": {
"commandId": {
"description": "Echoes the client's id.",
"type": "string"
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "Admission status."
}
},
"required": [
"commandId",
"status"
],
"type": "object"
},
"TaskStopParams": {
"description": "`task/stop` params (tdd §3.14): stop one named background task. Required\ntarget, never \"whichever is loudest\" — §3.15 is the blanket verb.",
"properties": {
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"sessionId": {
"description": "The target session.",
"type": "string"
},
"taskId": {
"description": "The task to stop, the `toolCall` item's `itemId` (SS4.5.5).",
"type": "string"
}
},
"required": [
"commandId",
"sessionId",
"taskId"
],
"type": "object"
},
"TodoItem": {
"description": "One todo entry (tdd SS4.6.3).",
"properties": {
"activeForm": {
"description": "Present-tense active form, when the tool supplied one.",
"type": "string"
},
"status": {
"$ref": "#/$defs/TodoStatus",
"description": "The todo status (camelCased runtime `TodoStatus`)."
},
"text": {
"description": "The todo text.",
"type": "string"
}
},
"required": [
"status",
"text"
],
"type": "object"
},
"TodoListState": {
"description": "The latest todo-list fact in the snapshot (tdd SS4.6.3, SS4.9.1).",
"properties": {
"items": {
"description": "The full todo list.",
"items": {
"$ref": "#/$defs/TodoItem"
},
"type": "array"
},
"revision": {
"description": "The snapshot revision. Diagnostics only, never an ordering guard.",
"type": "integer"
},
"sourceTool": {
"description": "The tool that produced the snapshot, verbatim.",
"type": "string"
}
},
"required": [
"items",
"revision",
"sourceTool"
],
"type": "object"
},
"TodoStatus": {
"description": "Todo status (tdd SS4.6.3): closed in the runtime, wire-open.",
"enum": [
"pending",
"inProgress",
"completed",
"cancelled"
],
"type": "string",
"x-msp-openness": "open"
},
"TokenUsage": {
"description": "Raw token counters, verbatim from the durable record (tdd SS4.6.5, the\nruntime's `Usage`, camelCased). Not directly summable across providers —\nsum the counted-once derivations instead (#8803).",
"properties": {
"cacheReadTokens": {
"description": "Cache read tokens, only when the provider distinguishes writes/reads.",
"type": "integer"
},
"cacheWriteTokens": {
"description": "Cache write tokens, only when the provider distinguishes\nwrites/reads.",
"type": "integer"
},
"cachedTokens": {
"description": "Provider-reported cache tokens (inside or beside `inputTokens`,\nprovider-convention-dependent — the reason `promptTokens` exists).",
"type": "integer"
},
"inputTokens": {
"description": "Provider-reported input tokens.",
"type": "integer"
},
"outputTokens": {
"description": "Provider-reported output tokens.",
"type": "integer"
},
"reasoningTokens": {
"description": "Output tokens spent on reasoning, when the provider reports it.",
"type": "integer"
}
},
"required": [
"cachedTokens",
"inputTokens",
"outputTokens",
"reasoningTokens"
],
"type": "object"
},
"ToolDisplayLabel": {
"description": "`toolCall.displayLabel`: the call's words in three forms, each one line of\nplain text, always present together. The item's `status` picks the form.",
"properties": {
"active": {
"description": "Shown while the call runs (`inProgress`), e.g. \"Setting up Computer Use\".",
"type": "string"
},
"done": {
"description": "Shown after the call succeeds (`completed`), e.g. \"Set up Computer Use\".",
"type": "string"
},
"neutral": {
"description": "Shown for every other status (failed, rejected, timed out, cancelled),\nbeside that status; never implies success.",
"type": "string"
}
},
"required": [
"active",
"done",
"neutral"
],
"type": "object"
},
"ToolReceipt": {
"oneOf": [
{
"properties": {
"details": {
"$ref": "#/$defs/CronReceipt"
},
"family": {
"const": "cron",
"type": "string"
},
"operation": {
"$ref": "#/$defs/ToolReceiptOperation"
},
"outcome": {
"$ref": "#/$defs/ToolReceiptOutcome"
}
},
"required": [
"family",
"operation",
"outcome"
],
"type": "object"
},
{
"properties": {
"details": {
"$ref": "#/$defs/CodeModeReceipt"
},
"family": {
"const": "codeMode",
"type": "string"
},
"operation": {
"$ref": "#/$defs/ToolReceiptOperation"
},
"outcome": {
"$ref": "#/$defs/ToolReceiptOutcome"
}
},
"required": [
"family",
"operation",
"outcome"
],
"type": "object"
},
{
"properties": {
"details": {
"properties": {},
"type": "object"
},
"family": {
"not": {
"enum": [
"cron",
"codeMode"
]
},
"type": "string"
},
"operation": {
"type": "string"
},
"outcome": {
"type": "string"
}
},
"required": [
"family",
"operation",
"outcome"
],
"type": "object"
}
],
"x-msp-openness": "open"
},
"ToolReceiptOperation": {
"description": "Which operation within the family the receipt describes (ADR 43399\nD1/D2). Open — registered per family, never derived from the tool name.",
"enum": [
"create",
"delete",
"list",
"execute",
"wait"
],
"type": "string",
"x-msp-openness": "open"
},
"ToolReceiptOutcome": {
"description": "What the operation did (ADR 43399 D1/D2). Open, and a **single shared\nvocabulary**: a value appearing in two families means the same thing in\nboth, which is why the permitted `status` values are bound to the value\nhere rather than per family.",
"enum": [
"created",
"duplicate",
"deleted",
"missing",
"listed",
"rejected",
"completed",
"pending",
"failed",
"timedOut",
"cancelled"
],
"type": "string",
"x-msp-openness": "open"
},
"TraceContext": {
"description": "Optional W3C trace context, on requests in both directions only — never on\nresponses or notifications (SS1.8).",
"properties": {
"traceparent": {
"description": "W3C `traceparent` string; receivers that do not trace ignore it.",
"type": "string"
},
"tracestate": {
"description": "W3C `tracestate` string.",
"type": "string"
}
},
"type": "object"
},
"TurnCancelParams": {
"description": "`turn/cancel` params (tdd SS3.5): plain cancellation on the normal command\nlane. Same shape as `turn/interrupt`, **without** `retract` — pairing a\nretract with a plain cancel is durably rejected `not_paired_interrupt`.",
"properties": {
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"sessionId": {
"description": "The target session.",
"type": "string"
},
"turnId": {
"description": "The exact turn to cancel; omit to target the current foreground turn.\nAny syntactically valid UUID: a turn from an older session may carry a\nv4 or v5 id. A malformed id is `invalidParams`.",
"type": "string"
}
},
"required": [
"commandId",
"sessionId"
],
"type": "object"
},
"TurnCancelResult": {
"description": "`turn/cancel` result (tdd SS3.5): identical envelope to\n`turn/interrupt`.",
"properties": {
"commandId": {
"description": "Echoes the client's id.",
"type": "string"
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "Admission status."
},
"turnId": {
"description": "The cancelled turn.",
"type": "string"
}
},
"required": [
"commandId",
"status",
"turnId"
],
"type": "object"
},
"TurnCompletedParams": {
"description": "`turn/completed` params (tdd SS4.5.1): the run's durable terminal record\nlanded.",
"properties": {
"durationMs": {
"description": "Turn duration; absent means unmeasured, never fabricated.",
"type": "integer"
},
"error": {
"$ref": "#/$defs/TurnError",
"description": "Present when `terminal` is `\"failed\"`, except on a synthesized\nhost-death terminal, which carries `reason` instead (tdd SS4.5.1,\nADR 36635 D2): mid-turn failures reach the client here — never as a\nJSON-RPC error."
},
"reason": {
"description": "The runtime's free-text terminal reason, verbatim. Display and\ndiagnostics only; never branch on it.",
"type": "string"
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The durable records this event folded from."
},
"terminal": {
"$ref": "#/$defs/TurnTerminal",
"description": "The turn terminal (open enum)."
},
"timeToFirstTokenMs": {
"description": "Time to first token, when measured.",
"type": "integer"
},
"turnId": {
"description": "The terminated turn.",
"type": "string"
},
"usage": {
"$ref": "#/$defs/TokenUsage",
"description": "The turn's aggregate token usage, summed across the turn's model\ncompletions (same shape as `session/tokenUsage.usage`)."
},
"viewCursor": {
"description": "Opaque, strictly monotonic view cursor (tdd SS4.1).",
"type": "string"
}
},
"required": [
"sessionId",
"sourceRange",
"terminal",
"turnId",
"viewCursor"
],
"type": "object"
},
"TurnError": {
"description": "The settled turn-failure object (tdd SS4.5.1): `{kind, message,\nretryable}`.",
"properties": {
"kind": {
"$ref": "#/$defs/TurnErrorKind",
"description": "The failure class (open camelCase enum grounded in the runtime's\nterminal failure classification)."
},
"message": {
"description": "Human-readable failure text.",
"type": "string"
},
"quota": {
"$ref": "#/$defs/QuotaDetail",
"description": "Typed quota-exhaustion detail (ADR 50047 D2/D3): present iff the\nstopping failure was the quota class. Clients branch on presence,\nnever by parsing `message`."
},
"requestDenied": {
"description": "`true` when the provider refused this request. Present only on the\nlive `turn/completed`: replayed, snapshot-served and `workflow/resume`\nterminals omit it, so absence does not mean the request was not\ndenied. Never `false`. (ADR 39289 D2/D3)",
"type": "boolean"
},
"retryable": {
"description": "The server's judgment that resubmitting the same input may succeed.",
"type": "boolean"
}
},
"required": [
"kind",
"message",
"retryable"
],
"type": "object"
},
"TurnErrorKind": {
"description": "Turn failure classes (tdd SS4.5.1, `TerminalErrorKind` plus the\nmodel-task failure class). Open.",
"enum": [
"stepLimit",
"configError",
"projectionError",
"logError",
"workflowLaunchError",
"environmentError",
"modelError",
"launchError",
"authRequired",
"mcpLinkError",
"reasoningReplayRefused",
"contextOverflow"
],
"type": "string",
"x-msp-openness": "open"
},
"TurnForegroundCompletedParams": {
"description": "`turn/foregroundCompleted` params (tdd SS4.5.12): the turn's foreground\nwork is done and named background reminder checks hold the turn open.\nExplicitly non-terminal: the turn ends only at `turn/completed` /\n`turn/unqueued`.",
"properties": {
"blockingAgents": {
"description": "`reminderAgentId`s of the firing's blocking set, never empty; agent\nids, never display names. Live-best-effort: reads, resume, and\nreplay may narrow it to the linked subset.",
"items": {
"type": "string"
},
"type": "array"
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The durable records this event folded from, anchored at the first\nblocking link of the firing window."
},
"turnId": {
"description": "The turn whose foreground completed.",
"type": "string"
},
"viewCursor": {
"description": "Opaque, strictly monotonic view cursor (tdd SS4.1).",
"type": "string"
}
},
"required": [
"blockingAgents",
"sessionId",
"sourceRange",
"turnId",
"viewCursor"
],
"type": "object"
},
"TurnInputPart": {
"dependentRequired": {
"height": [
"width"
],
"width": [
"height"
]
},
"description": "One ordered content part of a turn submission (tdd SS3.2). File mentions\nare text, not a part type: write `@relative/path` in a text part. A\nstructured `mention` part is reserved and currently rejected, and an\nunknown part type is `invalidParams` (tdd SS3.1.2, SS3.2) — which is what\ncloses [`TurnInputPartType`].\n\nModelled as a discriminated flat object rather than a Rust `enum`, the\nconvention [`crate::view::approval::ApprovalSubject`] already established\nfor a wire union in this crate: the v1 schema model names no\nobject-variant union shape and fails closed on one. The serialized JSON is\nthe same either way; what a flat object cannot express is \"`mediaType` is\nrequired exactly when `type` is `image`\".",
"properties": {
"arguments": {
"description": "Free-text skill arguments, optional on a `skill` part — the wire twin\nof what the TUI accepts after the shortcut token (tdd SS3.22.3).",
"type": "string"
},
"base64Data": {
"description": "Base64 payload, required on an `image` part. Invalid base64 or an\nempty payload is rejected with invalid params.",
"type": "string"
},
"height": {
"description": "Pixel height; must be provided together with `width` or not at all\n(tdd SS3.2, #22785 E6c).",
"type": "integer"
},
"mediaType": {
"description": "Media type, required on an `image` part.",
"type": "string"
},
"selector": {
"description": "The skill to invoke, required on a `skill` part (tdd SS3.2, SS3.22.3;\nADR 32471 D4): a bare or plugin-qualified shortcut token from\n`skill/list`. The HOST resolves and expands; an unknown selector is\nthe typed `-32032 skillNotFound` request error.",
"type": "string"
},
"source": {
"$ref": "#/$defs/SkillInvocationSource",
"description": "The picked copy's source, optional on a `skill` part: one of the catalog\nrows' `source` values. When present the host resolves the exact\n`(selector, source)` row; when absent it resolves the selector, bare or\nplugin-qualified, against the session's skill catalog, as the TUI\nshortcut does. Closed: an unknown value is `invalidParams`, never a\nfall-through."
},
"text": {
"description": "User prompt text, on a `text` part. Multiple text parts are joined in\norder into the turn's prompt.",
"type": "string"
},
"type": {
"$ref": "#/$defs/TurnInputPartType",
"description": "The part type."
},
"uploadId": {
"description": "The upload receipt, required on a `video` part (tdd SS3.2, SS3.33;\nADR 45443 D5): the client-minted id `media/upload` echoed.",
"type": "string"
},
"width": {
"description": "Pixel width; must be provided together with `height` or not at all.\nPublished as a `dependentRequired` pair.",
"type": "integer"
}
},
"required": [
"type"
],
"type": "object"
},
"TurnInputPartType": {
"description": "The `type` discriminator of a turn input part (tdd SS3.2). Closed: an\nunknown part type is `invalidParams` (tdd SS3.1.2).",
"enum": [
"text",
"image",
"skill",
"video"
],
"type": "string",
"x-msp-openness": "closed"
},
"TurnInterruptParams": {
"description": "`turn/interrupt` params (tdd SS3.4): the \"user pressed stop\" gesture, on\nthe runtime's priority lane.",
"properties": {
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"retract": {
"description": "Pair a retract intent with the interrupt: if the turn is cancelled\nbefore any assistant output committed, the submission is durably\nretracted (view event `turn/retracted`) so the client may restore the\nprompt text. A rejected retract does not undo the interrupt. Default\n`false` (tdd SS3.4).",
"type": "boolean"
},
"sessionId": {
"description": "The target session.",
"type": "string"
},
"turnId": {
"description": "The exact turn to interrupt. Omit to target the session's current\nforeground turn, resolved at admission; prefer passing the explicit id\nwhen you have one (tdd SS3.4). Any syntactically valid UUID: a turn\nfrom an older session may carry a v4 or v5 id. A malformed id is\n`invalidParams`.",
"type": "string"
}
},
"required": [
"commandId",
"sessionId"
],
"type": "object"
},
"TurnInterruptResult": {
"description": "`turn/interrupt` result (tdd SS3.4). Acceptance means the interrupt was\nadmitted, **not** that the turn is already stopped: the turn is over when\nyou fold its `turn/completed` with terminal `cancelled`.",
"properties": {
"commandId": {
"description": "Echoes the client's id.",
"type": "string"
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "Admission status."
},
"turnId": {
"description": "The interrupted turn.",
"type": "string"
}
},
"required": [
"commandId",
"status",
"turnId"
],
"type": "object"
},
"TurnModelAttemptStartedParams": {
"description": "`turn/modelAttemptStarted` params (tdd SS4.5.1; ADR\n`68644-model-attempt-started` D1): a turn's model provider task recorded\nits opening status — one model attempt is starting (before the provider\ndials), retries and later model steps included. Clients raise their\nthinking state here, the point a switch-off TUI flips on model-task\nactivity. Non-terminal: it never resolves a turn-wait. `sourceRange`\ncites the session stream's mirror of the task-lifecycle record (tdd\nSS4.2).",
"properties": {
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The durable record this event folded from (the session stream's\nmirror of the model task's opening status; `first == last`)."
},
"turnId": {
"description": "The running turn whose model attempt is starting.",
"type": "string"
},
"viewCursor": {
"description": "Opaque, strictly monotonic view cursor (tdd SS4.1).",
"type": "string"
}
},
"required": [
"sessionId",
"sourceRange",
"turnId",
"viewCursor"
],
"type": "object"
},
"TurnModelRetryScheduledParams": {
"description": "`turn/modelRetryScheduled` params (tdd SS4.5.1; ADR\n`50047-model-retry-scheduled-members` D1): a durable model-stream\nretry-scheduled fact folded — the provider backoff behind one model\nattempt is observable BEFORE the turn terminates, so a streaming\nclient can render \"system words · retrying in Ss · attempt N/M\"\ninstead of dead air. Non-terminal: it never resolves a turn-wait.\nThe sibling `turn/retryScheduled` shape at the model layer: same\nmember names and semantics (attempt/nextAttempt/maxAttempts/\nretryDelayMs/system/errorKind/httpStatus), minus `reason` — the\nrow's words derive from `errorKind` through the shared gate-off\nmapping, and the recorded machine message is not user text. The\ndelay is the recorded scheduled backoff, never an absolute fire\ntime — clients derive any countdown locally. `sourceRange` cites\nthe session stream's mirror of the task-lifecycle record (tdd SS4.2).",
"properties": {
"attempt": {
"description": "The failed model attempt (producer-normalized, >= 1).",
"type": "integer"
},
"errorKind": {
"description": "The failing model attempt's durable kind, verbatim (ADR 50047\nD2) — a plain string: the durable vocabulary is open-ended.",
"type": "string"
},
"httpStatus": {
"description": "The failing model attempt's HTTP status (ADR 50047 D2).",
"type": "integer"
},
"maxAttempts": {
"description": "The model-retry chain bound.",
"type": "integer"
},
"nextAttempt": {
"description": "The scheduled model attempt (producer contract: attempt <\nnextAttempt <= maxAttempts; not a schema constraint).",
"type": "integer"
},
"retryDelayMs": {
"description": "The scheduled backoff delay in milliseconds, verbatim from the\ndurable fact.",
"type": "integer"
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The durable record this event folded from (the session stream's\nmirror of the scheduled model task status; `first == last`)."
},
"system": {
"description": "The failing model attempt's provider system, verbatim\n(ADR 50047 D2) — e.g. `\"meta\"`. Always present from this producer\n(the durable `system` is a required `String`); optional on the wire\nso a future omission folds absent instead of failing the frame.",
"type": "string"
},
"turnId": {
"description": "The running turn whose model attempt is being retried.",
"type": "string"
},
"viewCursor": {
"description": "Opaque, strictly monotonic view cursor (tdd SS4.1).",
"type": "string"
}
},
"required": [
"attempt",
"maxAttempts",
"nextAttempt",
"retryDelayMs",
"sessionId",
"sourceRange",
"turnId",
"viewCursor"
],
"type": "object"
},
"TurnRef": {
"description": "A turn named by the snapshot's active/queued lists (tdd SS4.9.1).",
"properties": {
"commandId": {
"description": "The `commandId` of the submit that minted it.",
"type": "string"
},
"displayText": {
"description": "`queuedTurns[]` only (#45455; ADR 45443 D7): the queued submit's\npresentation text, so a late joiner can render it without waiting for\nlaunch. A current host sets it on every entry it admits; absent means\nan older host (or a pre-feature restored entry). Never set on\n`activeTurn`: the running turn's text is its `userMessage` item.",
"type": "string"
},
"truncated": {
"description": "`queuedTurns[]` only: set when `displayText` was cut to the\ncommitted-surface budget, mirroring `userMessage.truncated`\n(tdd SS4.5.2). Absent unless `true`.",
"type": "boolean"
},
"turnId": {
"description": "The turn's id, minted at admission.",
"type": "string"
}
},
"required": [
"commandId",
"turnId"
],
"type": "object"
},
"TurnRetractedParams": {
"description": "`turn/retracted` params (tdd SS4.5.1): an interrupt-paired retract\ndurably settled, accepted or declined (ADR 50074 D1). On `\"accepted\"`\nthe retracted user-message item is re-emitted via `item/updated` with\n`retracted: true`; on `\"declined\"` the client folds the legacy declined\nrollback instead and no item is re-emitted.",
"properties": {
"commandId": {
"description": "The retracted submission's command id.",
"type": "string"
},
"outcome": {
"$ref": "#/$defs/RetractOutcome",
"description": "The retract settlement outcome (tdd SS4.5.1, ADR 50074 D1).\nAdditive-optional: absent reads as `\"accepted\"` — pre-feature hosts\nemit the event only for accepted retracts — and so does an\nunrecognized value (open enum, D-033)."
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The durable records this event folded from."
},
"turnId": {
"description": "The turn whose submission was retracted.",
"type": "string"
},
"viewCursor": {
"description": "Opaque, strictly monotonic view cursor (tdd SS4.1).",
"type": "string"
}
},
"required": [
"commandId",
"sessionId",
"sourceRange",
"turnId",
"viewCursor"
],
"type": "object"
},
"TurnRetryScheduledParams": {
"description": "`turn/retryScheduled` params (tdd SS4.5.1, spec 14412; D-026): a durable\nturn retry-scheduled fact folded — the failing model attempt's scheduled\nretry is observable BEFORE the turn terminates, so a streaming client can\nrender \"attempt N/M · retrying in Ss · reason\" instead of dead air.\nNon-terminal: it never resolves a turn-wait (tdd SS3.1.4). The delay is\nthe recorded scheduled backoff, never an absolute fire time — clients\nderive any countdown locally. `sourceRange` cites the session stream's\nmirror of the task-lifecycle record (tdd SS4.2).",
"properties": {
"attempt": {
"description": "The attempt that failed (producer-normalized, >= 1).",
"type": "integer"
},
"errorKind": {
"description": "The failing model attempt's durable kind, verbatim (ADR 50047\nD2/D3) — a plain string: the durable vocabulary is open-ended.",
"type": "string"
},
"httpStatus": {
"description": "The failing model attempt's HTTP status (ADR 50047 D2/D3).",
"type": "integer"
},
"maxAttempts": {
"description": "The turn's model-retry chain bound.",
"type": "integer"
},
"nextAttempt": {
"description": "The attempt about to run (producer contract: attempt < nextAttempt\n<= maxAttempts; not a schema constraint).",
"type": "integer"
},
"reason": {
"description": "The recorded stopping reason through the shared task-detail\nnormalization (non-empty; capped at 160 characters).",
"type": "string"
},
"retryDelayMs": {
"description": "The scheduled backoff delay in milliseconds, verbatim from the\ndurable fact.",
"type": "integer"
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The durable record this event folded from (the session stream's\nmirror of the retry-scheduled task status; `first == last`)."
},
"system": {
"description": "The failing model attempt's provider system, verbatim\n(ADR 50047 D2/D3) — e.g. `\"meta\"`. Absent when no model-attempt\nfacet precedes the retry status on the task (old logs).",
"type": "string"
},
"turnId": {
"description": "The running turn whose model attempt is being retried.",
"type": "string"
},
"viewCursor": {
"description": "Opaque, strictly monotonic view cursor (tdd SS4.1).",
"type": "string"
}
},
"required": [
"attempt",
"maxAttempts",
"nextAttempt",
"reason",
"retryDelayMs",
"sessionId",
"sourceRange",
"turnId",
"viewCursor"
],
"type": "object"
},
"TurnStartDisposition": {
"description": "What `turn/start` did with the input (tdd SS3.2). Resolves OQ-H in v1:\nsince `queue` is the default `ifBusy`, clients need to distinguish these\nwithout folding history.",
"enum": [
"started",
"queued",
"steered"
],
"type": "string",
"x-msp-openness": "open"
},
"TurnStartParams": {
"description": "`turn/start` params (tdd SS3.2).\n\n`turn/start.providerRequestOptions` is deliberately absent: **RULED\n(#22785 E3, owner, 2026-08-26) to stay off the published schema.** The\nschema is the contract, and a free-form-object node kind is revisited only\nif the experimental field graduates.",
"properties": {
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7). The fresh turn's `turnId`\nderives from it (tdd SS3.1.4).",
"type": "string"
},
"displayText": {
"description": "Presentation form of the prompt for transcripts. Durable; carried on\nthe resulting user-message view item. Never model-visible (tdd SS3.2).",
"type": "string"
},
"ifBusy": {
"$ref": "#/$defs/IfBusy",
"description": "Disposition when a turn is already running; default `queue`."
},
"input": {
"description": "Ordered content parts; required and non-empty.",
"items": {
"$ref": "#/$defs/TurnInputPart"
},
"type": "array"
},
"reasoningEffort": {
"$ref": "#/$defs/ReasoningEffort",
"description": "Reasoning tier sampled at submission for this turn."
},
"sessionId": {
"description": "The target session.",
"type": "string"
},
"userShell": {
"$ref": "#/$defs/TurnUserShell",
"description": "A queued `!` shell action riding this turn (tdd SS3.2, ADR 50034):\nthe `!cmd` typed while a turn runs, executed at the next\nmodel-call boundary before any later steer. Exclusive with `text`\nand `skill` input; `input` may be empty only when this member is\npresent. Capability-gated on `userShell`: a carrying turn on a\nconnection without the grant fails `-32010 capabilityRequired`.\nExplicit `null` is invalid params (the null-tolerant set is\nclosed). A v1 stable member."
},
"workspaceRoots": {
"description": "A sticky REPLACEMENT of the session's runtime workspace-root set,\nbinding at this turn's launch and persisting for subsequent turns\nuntil replaced again — unlike `reasoningEffort`, which is\nthis-turn-only. Same shape and validation as\n`session/start.workspaceRoots`; invalid params on an explicit\n`ifBusy: \"steer\"` submit and so is explicit `null` (the D-049\nnull-tolerant set is closed); omitted means \"unchanged\", never\n\"reset\" (tdd SS3.2, ADR 37313 D3, #37313).",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"commandId",
"input",
"sessionId"
],
"type": "object"
},
"TurnStartResult": {
"description": "`turn/start` result (tdd SS3.2).",
"properties": {
"commandId": {
"description": "Echoes the client's id.",
"type": "string"
},
"disposition": {
"$ref": "#/$defs/TurnStartDisposition",
"description": "What happened to the input."
},
"startedNewTurn": {
"description": "`true` iff `disposition` is `started`; retained as the boolean\nshorthand — `disposition` is authoritative (tdd SS3.2).",
"type": "boolean"
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "Admission status."
},
"turnId": {
"description": "The turn that will carry (or absorbed) this input. Authoritative:\nalways take it from the ack rather than deriving it (tdd SS3.2).",
"type": "string"
}
},
"required": [
"commandId",
"disposition",
"startedNewTurn",
"status",
"turnId"
],
"type": "object"
},
"TurnStartedParams": {
"description": "`turn/started` params (tdd SS4.5.1): a foreground turn began running —\nfresh submits immediately, queued submits at their launch boundary, never\nsteered submits.",
"properties": {
"commandId": {
"description": "The submitting command; `turnId == commandId` for fresh turns (tdd\nSS3.1.4).",
"type": "string"
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The durable records this event folded from."
},
"turnId": {
"description": "The started turn.",
"type": "string"
},
"viewCursor": {
"description": "Opaque, strictly monotonic view cursor (tdd SS4.1).",
"type": "string"
}
},
"required": [
"commandId",
"sessionId",
"sourceRange",
"turnId",
"viewCursor"
],
"type": "object"
},
"TurnSteerParams": {
"description": "`turn/steer` params (tdd SS3.3): exact-target steering into the currently\nrunning turn.",
"properties": {
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"expectedTurnId": {
"description": "The turn you believe is running. Closes the race where the turn\ncompletes or is replaced between your read and your steer: input meant\nfor turn A can never leak into turn B (tdd SS3.3). Any syntactically\nvalid UUID: a turn from an older session may carry a v4 or v5 id. A\nmalformed id is `invalidParams`; an id that is not the running turn is\nrefused.",
"type": "string"
},
"input": {
"description": "Same content parts as `turn/start`.",
"items": {
"$ref": "#/$defs/TurnInputPart"
},
"type": "array"
},
"reasoningEffort": {
"$ref": "#/$defs/ReasoningEffort",
"description": "Reasoning tier for the model calls this steer's input reaches. Applies\nforward, never backward; absent means unspecified, not \"reset\"\n(tdd SS3.3, D-024)."
},
"sessionId": {
"description": "The target session.",
"type": "string"
}
},
"required": [
"commandId",
"expectedTurnId",
"input",
"sessionId"
],
"type": "object"
},
"TurnSteerResult": {
"description": "`turn/steer` result (tdd SS3.3).",
"properties": {
"commandId": {
"description": "Echoes the client's id.",
"type": "string"
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "Admission status."
},
"turnId": {
"description": "The running turn that absorbed the input.",
"type": "string"
}
},
"required": [
"commandId",
"status",
"turnId"
],
"type": "object"
},
"TurnTerminal": {
"description": "Turn terminal vocabulary (tdd SS4.5.1): exactly the runtime's\n`RunTerminalKind` — closed in the runtime, wire-open for evolution.",
"enum": [
"completed",
"failed",
"cancelled"
],
"type": "string",
"x-msp-openness": "open"
},
"TurnUnqueueParams": {
"description": "`turn/unqueue` params (tdd SS3.6): reclaim a queued submit before it\nlaunches. It is **not** a stop — a reclaim that arrives after its target\nlaunched is durably rejected, never silently upgraded into a cancel.",
"properties": {
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"sessionId": {
"description": "The target session.",
"type": "string"
},
"turnId": {
"description": "The queued turn to reclaim, exactly as the queueing `turn/start`'s ack\nminted it and as snapshot `queuedTurns` lists it. Required, and never\n\"whichever is newest\" (tdd SS3.6). Any syntactically valid UUID: a\nturn from an older session may carry a v4 or v5 id. A malformed id is\n`invalidParams`.",
"type": "string"
}
},
"required": [
"commandId",
"sessionId",
"turnId"
],
"type": "object"
},
"TurnUnqueueResult": {
"description": "`turn/unqueue` result (tdd SS3.6). Admission only — but for this command\nadmission *is* the race: an admitted reclaim implies the turn will not\nlaunch. The authoritative removal is the `turn/unqueued` view event.",
"properties": {
"commandId": {
"description": "Echoes the client's id.",
"type": "string"
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "Admission status."
},
"turnId": {
"description": "The reclaimed turn.",
"type": "string"
}
},
"required": [
"commandId",
"status",
"turnId"
],
"type": "object"
},
"TurnUnqueuedParams": {
"description": "`turn/unqueued` params (tdd SS3.6, SS4.5.1): a queued submit's reclaim\ndurably won; its pre-minted turn never runs. Carries the reclaimed\n`turnId` and the `commandId` of the `turn/start` that queued it, so a\nclient can restore the submission's text exactly as for\n`turn/retracted`. No `turn/started`/`turn/completed` is ever emitted for\nthis `turnId` (SDK turn-waits settle on this event too, tdd SS3.1.4).\n`sourceRange` cites the SESSION stream's reclaim record — a reclaimed\nturn never had a run stream.",
"properties": {
"commandId": {
"description": "The `commandId` of the `turn/start` that queued the reclaimed turn.",
"type": "string"
},
"sessionId": {
"description": "The owning session.",
"type": "string"
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The durable records this event folded from (the session stream's\nreclaim record)."
},
"turnId": {
"description": "The reclaimed turn: pre-minted at admission, never launched.",
"type": "string"
},
"viewCursor": {
"description": "Opaque, strictly monotonic view cursor (tdd SS4.1).",
"type": "string"
}
},
"required": [
"commandId",
"sessionId",
"sourceRange",
"turnId",
"viewCursor"
],
"type": "object"
},
"TurnUserShell": {
"description": "The queued `!` shell action a `turn/start` carries (tdd SS3.2,\nADR 50034): the `!cmd` typed while a turn runs. The shell's command id\nderives from the carrying turn's `commandId`, exactly as the app's own\nqueued submit does; the params' sibling `displayText` carries the `!…`\npresentation form.",
"properties": {
"commandText": {
"description": "The shell command text, without the leading `!`.",
"type": "string"
}
},
"required": [
"commandText"
],
"type": "object"
},
"UnframedViewNotification": {
"description": "One element of a `view/page` result's `events` array: an **unframed view\nnotification** — the nested pair `{\"method\", \"params\"}`, which is the live\nnotification minus `jsonrpc` and `emittedAtMs`, with nothing lifted out of\n`params` and nothing spliced into it. `view/page` and `muse exec --json`\nshare this one definition, so the two surfaces cannot drift.",
"properties": {
"method": {
"description": "The event type — the live notification's method name, retained because\nthe type lives only in the notification name and would otherwise be\nlost (tdd SS4.2.1).",
"type": "string"
},
"params": {
"$ref": "#/$defs/UnframedViewNotificationParams",
"description": "The notification's params object, verbatim."
}
},
"required": [
"method",
"params"
],
"type": "object"
},
"UnframedViewNotificationParams": {
"description": "The `params` of an unframed view notification (tdd SS4.2.1, SS4.2).\n\nDeclares the base members every view notification carries, and stays\n**open** for the event-specific fields each event type adds. The v1 schema\nmodel names no method-correlated union (the `events` element's `params` arm\nis selected by its sibling `method`), so the per-event arms cannot be\nexpressed here without one, and an uncorrelated union of them could reject a\nreal page element, which a published schema must not do.\n\n`sourceRange` is required here and not optional: `view/page` serves\ndurable-sourced events only (tdd SS4.7.3), and durable-sourced is *defined*\nas carrying a `sourceRange` — the SS4.2 ephemeral-sourced exemption applies\nto `item/delta`, which `view/page` never replays.",
"properties": {
"sessionId": {
"description": "The owning session (tdd SS4.2).",
"type": "string"
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The durable records this event folded from (tdd SS4.2, SS6.8)."
},
"viewCursor": {
"description": "The event's opaque, strictly monotonic view cursor. It stays **inside**\n`params`, where every live notification already carries it (tdd\nSS4.2.1) — nothing is spliced beside `method`.",
"type": "string"
}
},
"required": [
"sessionId",
"sourceRange",
"viewCursor"
],
"type": "object"
},
"UnknownModelReasoningEffortVariants": {
"description": "The only scalar alternative to a known effort array. Kept as a closed\nsingleton so arbitrary strings and uppercase spellings fail decoding.",
"enum": [
"unknown"
],
"type": "string",
"x-msp-openness": "closed"
},
"UsageReadResult": {
"description": "`usage/read` result: `{usage?}` — omitted, never `null`, when the host\nhas observed nothing (ADR 32563 D2: truthful absence, no\n\"nothing observed\" error).",
"properties": {
"usage": {
"$ref": "#/$defs/SubscriptionUsage",
"description": "The last-observed subscription usage window, when one exists."
}
},
"type": "object"
},
"UserInputAnswer": {
"description": "One question's answer, as sent in `userInput/answer` or\n`userInput/interrupt` and as recorded in `userInput/settled`.",
"properties": {
"freeText": {
"description": "A free-form answer, at most 500 characters.",
"type": "string"
},
"note": {
"description": "An optional comment the user adds to the answer, at most 500 characters.",
"type": "string"
},
"questionId": {
"description": "The `id` of the question this answers.",
"type": "string"
},
"selectedLabel": {
"description": "The label of the chosen option, for a `single` question.",
"type": "string"
},
"selectedLabels": {
"description": "The labels of the chosen options for a `multiple` question, within its\nselection bounds; omitted when empty.",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"questionId"
],
"type": "object"
},
"UserInputAnswerParams": {
"description": "`userInput/answer` params (tdd SS5.10.2): answer every question.\n\nEach answer carries `questionId` then exactly one of `selectedLabel`\n(single mode), `selectedLabels` (multiple mode, within min/max bounds), or\n`freeText` (<=500 chars); plus an optional `note` (<=500). Answers that do\nnot match the prompt fail -32057 `userInputAnswerInvalid`. Image\n`attachments` are a **reserved** field in v1, rejected if sent, because\nthe blob-upload path they reference is also reserved.",
"properties": {
"answers": {
"description": "One entry per question.",
"items": {
"$ref": "#/$defs/UserInputAnswer"
},
"type": "array"
},
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"sessionId": {
"description": "The target session.",
"type": "string"
},
"userInputId": {
"description": "The prompt being answered.",
"type": "string"
}
},
"required": [
"answers",
"commandId",
"sessionId",
"userInputId"
],
"type": "object"
},
"UserInputAnswerResult": {
"description": "`userInput/answer` result (tdd SS5.10.2).",
"properties": {
"commandId": {
"description": "Echoes the client's id.",
"type": "string"
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "Admission status."
},
"userInputId": {
"description": "The prompt this answer settled.",
"type": "string"
}
},
"required": [
"commandId",
"status",
"userInputId"
],
"type": "object"
},
"UserInputCancelParams": {
"description": "`userInput/cancel` params (tdd SS5.10.2): decline to answer; the tool call\nresolves with a cancelled result the model sees.",
"properties": {
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"reason": {
"description": "Why the prompt was declined.",
"type": "string"
},
"sessionId": {
"description": "The target session.",
"type": "string"
},
"userInputId": {
"description": "The prompt being declined.",
"type": "string"
}
},
"required": [
"commandId",
"sessionId",
"userInputId"
],
"type": "object"
},
"UserInputCancelResult": {
"description": "`userInput/cancel` result (tdd SS5.10.2).",
"properties": {
"commandId": {
"description": "Echoes the client's id.",
"type": "string"
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "Admission status."
},
"userInputId": {
"description": "The prompt this cancellation settled.",
"type": "string"
}
},
"required": [
"commandId",
"status",
"userInputId"
],
"type": "object"
},
"UserInputClarification": {
"description": "A free-form reply the user gives instead of choosing from the options; the\nmodel reads it and decides again.",
"properties": {
"content": {
"description": "The clarification text, at most 500 characters.",
"type": "string"
},
"format": {
"description": "The content format. `text` is the only value today, and more may be\nadded.",
"type": "string"
}
},
"required": [
"content",
"format"
],
"type": "object"
},
"UserInputClarifyParams": {
"description": "`userInput/clarify` params (tdd SS5.10.2): answer with a free-form\nclarification instead of the structured options — the \"let me explain\"\npath; the model receives the clarification text and re-decides.",
"properties": {
"clarification": {
"$ref": "#/$defs/UserInputClarification",
"description": "`format` is `\"text\"` in v1 (open); `content` is <=500 chars."
},
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"sessionId": {
"description": "The target session.",
"type": "string"
},
"userInputId": {
"description": "The prompt being clarified.",
"type": "string"
}
},
"required": [
"clarification",
"commandId",
"sessionId",
"userInputId"
],
"type": "object"
},
"UserInputClarifyResult": {
"description": "`userInput/clarify` result (tdd SS5.10.2).",
"properties": {
"commandId": {
"description": "Echoes the client's id.",
"type": "string"
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "Admission status."
},
"userInputId": {
"description": "The prompt this clarification settled.",
"type": "string"
}
},
"required": [
"commandId",
"status",
"userInputId"
],
"type": "object"
},
"UserInputEngagedParams": {
"description": "`userInput/engaged` params (tdd SS5.10.4, ADR 45450 D2): a fire-and-forget\nengagement note — the user started interacting with a timed prompt, so\nthe host disarms that prompt's auto-resolution countdown. No result, no\nerrors, no `commandId`, no ledger row.",
"properties": {
"sessionId": {
"description": "The target session.",
"type": "string"
},
"userInputId": {
"description": "The prompt being engaged.",
"type": "string"
}
},
"required": [
"sessionId",
"userInputId"
],
"type": "object"
},
"UserInputInterruptParams": {
"description": "`userInput/interrupt` params (tdd SS5.10.2, ADR 45450 D1): interrupt the\nnamed prompt carrying confirmed partial answers, then stop the turn.\n\n`answers` is optional and, when present, follows exactly the\n`userInput/answer` shape and limits (same `questionId` + one-of + `note`\nrules, same -32057 `userInputAnswerInvalid` on mismatch); absent or\nempty means interrupt with no confirmed answers.",
"properties": {
"answers": {
"description": "Confirmed partial answers the named settlement carries.",
"items": {
"$ref": "#/$defs/UserInputAnswer"
},
"type": "array"
},
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"sessionId": {
"description": "The target session.",
"type": "string"
},
"userInputId": {
"description": "The prompt being interrupted.",
"type": "string"
}
},
"required": [
"commandId",
"sessionId",
"userInputId"
],
"type": "object"
},
"UserInputInterruptResult": {
"description": "`userInput/interrupt` result (tdd SS5.10.2).",
"properties": {
"commandId": {
"description": "Echoes the client's id.",
"type": "string"
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "Admission status."
},
"userInputId": {
"description": "The prompt this interruption settled.",
"type": "string"
}
},
"required": [
"commandId",
"status",
"userInputId"
],
"type": "object"
},
"UserInputOption": {
"description": "One option offered for a question.",
"properties": {
"description": {
"description": "An optional longer explanation of the option, at most 240 characters.",
"type": "string"
},
"label": {
"description": "The option's text, at most 80 characters and unique within its question;\nan answer selects the option by this exact label.",
"type": "string"
},
"preview": {
"$ref": "#/$defs/UserInputOptionPreview",
"description": "An optional rich preview of the option, present only on single-select\nquestions."
}
},
"required": [
"label"
],
"type": "object"
},
"UserInputOptionPreview": {
"description": "Rich content a client can show for an option. Only single-select questions\ncarry previews.",
"properties": {
"content": {
"description": "The preview content in that format, at most 2000 characters.",
"type": "string"
},
"format": {
"description": "The content format, for example `markdown`.",
"type": "string"
}
},
"required": [
"content",
"format"
],
"type": "object"
},
"UserInputOutcome": {
"description": "How a user-input prompt settled. More values may be added, so handle values\nyou do not recognize.",
"enum": [
"answered",
"cancelled",
"interrupted",
"clarified",
"timedOut",
"aborted"
],
"type": "string",
"x-msp-openness": "open"
},
"UserInputQuestion": {
"description": "One question in a user-input prompt.",
"properties": {
"header": {
"description": "A short title for the question, at most 12 characters.",
"type": "string"
},
"id": {
"description": "The question's id, unique within the prompt and at most 64 characters.\nAn answer names it in `questionId`.",
"type": "string"
},
"options": {
"description": "The options offered, two or three, in order.",
"items": {
"$ref": "#/$defs/UserInputOption"
},
"type": "array"
},
"question": {
"description": "The full question text to show the user.",
"type": "string"
},
"selection": {
"$ref": "#/$defs/UserInputSelection",
"description": "Whether the user picks one option or several."
}
},
"required": [
"header",
"id",
"options",
"question",
"selection"
],
"type": "object"
},
"UserInputRequestParams": {
"description": "Full params shared by `userInput/request` and `userInput/requested`.",
"properties": {
"autoResolutionMs": {
"description": "The auto-resolution time per question, in milliseconds: a prompt nobody\nengages with settles as `timedOut` after this value times the number of\nquestions.",
"type": "integer"
},
"itemId": {
"description": "The `toolCall` view item of the tool call waiting on this prompt.",
"type": "string"
},
"questions": {
"description": "The questions to ask, one to three, in order.",
"items": {
"$ref": "#/$defs/UserInputQuestion"
},
"type": "array"
},
"sessionId": {
"description": "The session that owns the prompt.",
"type": "string"
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The stored records this prompt was folded from, when sent: an opaque\ntoken clients must not interpret."
},
"toolCallId": {
"description": "The provider's id for the tool call that opened the prompt.",
"type": "string"
},
"toolName": {
"description": "The name of the tool that opened the prompt.",
"type": "string"
},
"turnId": {
"description": "The turn whose tool call is waiting on this prompt.",
"type": "string"
},
"userInputId": {
"description": "The prompt's stable id. Pass it to `userInput/answer`,\n`userInput/cancel`, `userInput/clarify` and `userInput/interrupt`, and\nuse it to match the later `userInput/settled`.",
"type": "string"
},
"viewCursor": {
"description": "The cursor of the `userInput/requested` event for this prompt. A client\nthat missed the request can read the same payload at this cursor with\n`view/page`.",
"type": "string"
}
},
"required": [
"itemId",
"questions",
"sessionId",
"toolCallId",
"toolName",
"turnId",
"userInputId",
"viewCursor"
],
"type": "object"
},
"UserInputSelection": {
"description": "How many options the user may pick for a question.",
"properties": {
"maxSelections": {
"description": "The most options the user may pick. Sent only in `multiple` mode; when\nabsent the maximum is the number of options.",
"type": "integer"
},
"minSelections": {
"description": "The minimum selection count for a `multiple` answer. Sent only in\n`multiple` mode; when absent the minimum is 1.",
"type": "integer"
},
"mode": {
"$ref": "#/$defs/UserInputSelectionMode",
"description": "`single` or `multiple`: whether an answer selects one option or several."
}
},
"required": [
"mode"
],
"type": "object"
},
"UserInputSelectionMode": {
"description": "Whether a question takes one option or several.",
"enum": [
"single",
"multiple"
],
"type": "string",
"x-msp-openness": "closed"
},
"UserInputSettledParams": {
"description": "`userInput/settled` params: the first durable prompt settlement.",
"properties": {
"answers": {
"description": "The recorded answers: one per question for `answered`, any confirmed\npartial answers for `interrupted`, and empty for every other outcome.",
"items": {
"$ref": "#/$defs/UserInputAnswer"
},
"type": "array"
},
"clarification": {
"anyOf": [
{
"$ref": "#/$defs/UserInputClarification"
},
{
"type": "null"
}
],
"description": "The user's free-form clarification when the outcome is `clarified`;\n`null` otherwise."
},
"decidedAt": {
"description": "The decision time as RFC3339, projected from the durable settlement\nrecord's own stamp (ADR 45450 D3, ruling 2026-10-01): always present\non the wire (schema-required, `null`-able); decoders still tolerate\nits absence (`default`, never skipped — SS5.10.3 keeps every member\npresent), and current hosts always populate it.",
"type": [
"string",
"null"
]
},
"decidedByCommandId": {
"description": "The `commandId` of the client command that settled the prompt; `null`\nwhen no command did, for example after a timeout or an abort.",
"type": [
"string",
"null"
]
},
"outcome": {
"$ref": "#/$defs/UserInputOutcome",
"description": "How the prompt ended."
},
"reason": {
"description": "The reason, when one applies: the optional reason given with a cancel,\nor why an `aborted` prompt was closed; `null` otherwise.",
"type": [
"string",
"null"
]
},
"sessionId": {
"description": "The session that owns the prompt.",
"type": "string"
},
"sourceRange": {
"$ref": "#/$defs/SourceRange",
"description": "The stored records this event was folded from: an opaque token clients\nmust not interpret."
},
"userInputId": {
"description": "The prompt that settled. Accept a settlement even for a prompt whose\nrequest you never saw.",
"type": "string"
},
"viewCursor": {
"description": "This event's view cursor: opaque, and strictly increasing within the\nsession.",
"type": "string"
}
},
"required": [
"answers",
"clarification",
"decidedAt",
"decidedByCommandId",
"outcome",
"reason",
"sessionId",
"sourceRange",
"userInputId",
"viewCursor"
],
"type": "object"
},
"UserInputSettlementSummary": {
"description": "Winning terminal returned to a late user-input command.",
"properties": {
"outcome": {
"description": "How the prompt settled, as a `userInput/settled` outcome value such as\n`answered` or `timedOut`.",
"type": "string"
},
"viewCursor": {
"description": "The view cursor of the `userInput/settled` event that recorded the\nsettlement.",
"type": "string"
}
},
"required": [
"outcome",
"viewCursor"
],
"type": "object"
},
"Vcs": {
"description": "Version-control system of a branch observation (tdd SS4.6.4). Open.",
"enum": [
"git",
"sapling"
],
"type": "string",
"x-msp-openness": "open"
},
"ViewGapParams": {
"description": "`view/gap` params (spec 208 SS4.8, FM-001): push delivery dropped events,\nand this names the hole.\n\nThe bracket is deferred (D-16487-2): it flushes at the subscription's next\nACCEPTED delivery, never at enqueue time, so `next` always names an event\nwhose own delivery is proven. A run of consecutive undelivered events\ncoalesces into one bracket keeping the FIRST range's `after` (D-16487-1).\nThe gap rides the protected reserved queue, so no wire-interleaving order\nagainst neighbouring deliveries is promised — the cursors carry the\nsemantics (INV-002, D-16487-3).\n\nOn receipt a client may take either sanctioned recovery (D-030, FR-013):\nsplice-fill — buffer live events at cursors >= `next`, page `(after,\nnext)` forward, discard the overlap, splice — or re-anchor through the\nanchored read surface. The server requires neither, cannot distinguish\nclients by their choice, and holds no partial-fill state.",
"properties": {
"after": {
"description": "The last cursor delivered before the hole — the exclusive lower bound\nof the undelivered range. An **opaque** view cursor: clients relay it,\nnever parse it (tdd SS4.1).",
"type": "string"
},
"next": {
"description": "The first cursor delivered after the hole — the exclusive upper bound\nof the undelivered range, and the position delivery continues from. An\n**opaque** view cursor: clients relay it, never parse it (tdd SS4.1).",
"type": "string"
},
"sessionId": {
"description": "The session whose subscription dropped events.",
"type": "string"
}
},
"required": [
"after",
"next",
"sessionId"
],
"type": "object"
},
"ViewPageAnchor": {
"description": "The `view/page` request-mode anchor. Declared **open**: the protocol spells\nit \"open string enum, v1 value `latestCompaction`\".",
"enum": [
"latestCompaction"
],
"type": "string",
"x-msp-openness": "open"
},
"ViewPageDirection": {
"description": "The `view/page` paging direction. Closed: the protocol spells exactly two\nvalues and a third would change the paging contract.",
"enum": [
"forward",
"backward"
],
"type": "string",
"x-msp-openness": "closed"
},
"ViewPageParams": {
"description": "`view/page` params (tdd SS4.7.3): cursor-paged reads of the session view.",
"properties": {
"anchor": {
"$ref": "#/$defs/ViewPageAnchor",
"description": "The cold-client request mode (D-029; spec 208 FR-008), resolved at\ncall time to the latest installed compaction boundary. The one named\nexception to the SS4.1 observed-only rule."
},
"cursor": {
"description": "The exclusive anchor. Forward: the page starts strictly after it;\nomitted means from the beginning of the view. Backward: the page ends\nstrictly before it; omitted means from the head. Mutually exclusive\nwith `anchor` (tdd SS4.7.3; spec 208 FR-008a).",
"type": "string"
},
"direction": {
"$ref": "#/$defs/ViewPageDirection",
"description": "Paging direction; `forward` when omitted."
},
"limit": {
"description": "Maximum events to return, 1–1000. The server MAY return fewer.\n\nThe 1–1000 range is ratified and **published**: the model carries the\nbound and the bundle renders `minimum`/`maximum` instead of a bare\n`integer`.",
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"maxBytes": {
"description": "The caller's page byte cap (kt-dvw5, additive-optional). The page\nserves under `min(server budget, maxBytes)`, so a Console page stays\nunder its own budget without the server's frame cap alone deciding.\nAbsent means the server budget governs. `0` is refused typed\n(`invalid_params`): a 0 cap admits no progress. A single event over\nthe cap is truncated (marked) instead of erroring, except verbatim\nand fetch-key content (`item.args`, `structuredData`, `outputRef`/\n`patchRef`), which is never cut and still answers typed\n`PageEventTooLarge`.",
"type": "integer"
},
"sessionId": {
"description": "The session to page.",
"type": "string"
}
},
"required": [
"limit",
"sessionId"
],
"type": "object"
},
"ViewPageResolvedAnchor": {
"description": "The `resolvedAnchor` echo (tdd SS4.7.3): subsequent pages pass ordinary\ncursors, so the anchor never needs re-resolving.",
"properties": {
"boundaryCursor": {
"description": "The view cursor of the resolved boundary's `compaction` event.",
"type": "string"
}
},
"required": [
"boundaryCursor"
],
"type": "object"
},
"ViewPageResult": {
"description": "`view/page` result (tdd SS4.7.3).",
"properties": {
"events": {
"description": "The page's events, always ascending by `viewCursor` in both\ndirections. Durable-sourced only; pages are contiguous and can never\nskip a cursor.",
"items": {
"$ref": "#/$defs/UnframedViewNotification"
},
"type": "array"
},
"nextCursor": {
"description": "The anchor for the next page in the same direction: forward, the last\nevent's cursor; backward, the first's. `null` at the end of the view\nin that direction — never omitted.",
"type": [
"string",
"null"
]
},
"resolvedAnchor": {
"$ref": "#/$defs/ViewPageResolvedAnchor",
"description": "The resolution echo, present exactly when the request used `anchor`\n(tdd SS4.7.3; spec 208 FR-008)."
}
},
"required": [
"events",
"nextCursor"
],
"type": "object"
},
"ViewSnapshot": {
"description": "The `snapshot` object returned by `session/resume` / `session/read`\n(tdd SS4.9).",
"properties": {
"anchor": {
"$ref": "#/$defs/SnapshotAnchor",
"description": "Present exactly when `history.mode` is `anchoredSnapshot`\n(tdd SS2.5.2)."
},
"schemaVersion": {
"description": "Snapshot schema version. A client whose generated types are older than\nthis must fall back to inline/paged history (tdd SS4.9.2, SS2.5.2).",
"type": "integer"
},
"state": {
"$ref": "#/$defs/SnapshotState",
"description": "The complete folded view at `viewCursor` (tdd SS4.9.1)."
},
"viewCursor": {
"description": "The cursor the state is folded at; every event after it streams as the\nsuffix (tdd SS4.9).",
"type": "string"
}
},
"required": [
"schemaVersion",
"state",
"viewCursor"
],
"type": "object"
},
"ViewSubscribeParams": {
"description": "`view/subscribe` params (tdd SS4.7.1): attach this connection's live view\nsubscription for a session at an explicit cursor — the fine-grained\ncounterpart of the SS2 auto-subscribe, and the gap-free re-attachment\npath after `view/unsubscribe`. It never loads a session, takes no lease,\nwrites nothing.",
"properties": {
"after": {
"description": "Resume cursor. When present, the server replays `(after, head]` as\nordinary view notifications before any live event — one gapless\ncursor sequence. Omitted means \"from now\": no historical replay\n(tdd SS4.7.1).",
"type": "string"
},
"sessionId": {
"description": "The session to follow.",
"type": "string"
}
},
"required": [
"sessionId"
],
"type": "object"
},
"ViewSubscribeResult": {
"description": "`view/subscribe` result (tdd SS4.7.1).",
"properties": {
"viewCursor": {
"description": "The view head at subscribe time; the client knows it is live once\ncursors pass it.",
"type": "string"
}
},
"required": [
"viewCursor"
],
"type": "object"
},
"ViewUnsubscribeParams": {
"description": "`view/unsubscribe` params (tdd SS4.7.2): remove this connection from the\nsession's view subscription set — the protocol's single unsubscribe\noperation, at the altitude that owns subscriptions (tdd SS2.5.6 points\nhere). It does not unload the session; unloading is the idle policy\n(tdd SS2.8).",
"properties": {
"sessionId": {
"description": "The session to stop following.",
"type": "string"
}
},
"required": [
"sessionId"
],
"type": "object"
},
"ViewUnsubscribeResult": {
"description": "`view/unsubscribe` result (tdd SS4.7.2): the empty object. Idempotent —\nunsubscribing while not subscribed returns `{}`.",
"properties": {},
"type": "object"
},
"WorkflowCancelParams": {
"description": "`workflow/cancel` params (tdd SS3.19): cancel a live workflow run.",
"properties": {
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"sessionId": {
"description": "The target session.",
"type": "string"
},
"workflowRunId": {
"description": "The run to cancel, exactly as the `workflow` item names it (SS4.5.8);\nrequired, non-empty.",
"type": "string"
}
},
"required": [
"commandId",
"sessionId",
"workflowRunId"
],
"type": "object"
},
"WorkflowChild": {
"description": "One workflow child's folded state (tdd SS4.5.8,\n`WorkflowChildLifecycleFact`), keyed by `(childId, attempt)`.",
"properties": {
"attempt": {
"description": "The attempt number.",
"type": "integer"
},
"childId": {
"description": "The child's id within the run.",
"type": "string"
},
"durationMs": {
"description": "The child's observed duration, when recorded.",
"type": "integer"
},
"failureKind": {
"description": "The attempt's machine failure class, verbatim when recorded (open,\nsnake_case durable runtime vocabulary — the SS1.6 casing exemption).\nThe attempt's outcome (`terminal`, else `status`) stays authoritative,\nexcept that `\"completed\"` with `failureKind` present means it failed\n(#17769).",
"type": "string"
},
"failureReason": {
"description": "The attempt's failure reason text, verbatim when recorded except cut\nto at most 2,048 UTF-8 bytes ending in U+2026 when longer.",
"type": "string"
},
"label": {
"description": "The child's display label, when recorded.",
"type": "string"
},
"phase": {
"description": "The child's phase, when recorded.",
"type": "string"
},
"resultRef": {
"description": "The child's recorded result reference, verbatim, when present — an\nopaque string, matching the durable owner.",
"type": "string"
},
"status": {
"description": "camelCased `WorkflowChildLifecycleStatus`, verbatim (durable runtime\nvocabulary).",
"type": "string"
},
"terminal": {
"$ref": "#/$defs/TurnTerminal",
"description": "The child's terminal, turn vocabulary (tdd SS4.5.8)."
},
"usage": {
"$ref": "#/$defs/TokenUsage",
"description": "The child's observed usage, when recorded."
}
},
"required": [
"attempt",
"childId",
"status"
],
"type": "object"
},
"WorkflowChildAction": {
"description": "Which control to apply to the child's current attempt (tdd SS3.20).\nClosed on the wire: an unknown value is `-32602 invalidParams`.",
"enum": [
"skip",
"retry"
],
"type": "string",
"x-msp-openness": "closed"
},
"WorkflowChildControlParams": {
"description": "`workflow/childControl` params (tdd SS3.20): skip or retry one workflow\nchild, keyed by the `(childId, attempt)` pair the `workflow` item's\n`children[]` carries.",
"properties": {
"action": {
"$ref": "#/$defs/WorkflowChildAction",
"description": "The control to apply."
},
"attempt": {
"description": "The child's CURRENT attempt (integer >= 1). A stale value rejects\n`\"stale_attempt\"`; re-read the item and re-key — never guess.",
"minimum": 1,
"type": "integer"
},
"childId": {
"description": "The child, from the item's `children[]`; required, non-empty.",
"type": "string"
},
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"sessionId": {
"description": "The target session.",
"type": "string"
},
"workflowRunId": {
"description": "The run owning the child (SS4.5.8); required, non-empty.",
"type": "string"
}
},
"required": [
"action",
"attempt",
"childId",
"commandId",
"sessionId",
"workflowRunId"
],
"type": "object"
},
"WorkflowControlResult": {
"description": "The shared SS3.19/SS3.20/SS3.32 admission-only ack: deliberately bare\n`{commandId, status}` — settlement arrives as the workflow item's view\nevents, never through the ack.",
"properties": {
"commandId": {
"description": "Echoes the client's id.",
"type": "string"
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "Admission status."
}
},
"required": [
"commandId",
"status"
],
"type": "object"
},
"WorkflowPauseParams": {
"description": "`workflow/pause` params (tdd SS3.32, ADR 45437 D2): pause a live\nworkflow run, shaped exactly like `workflow/cancel`.",
"properties": {
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"sessionId": {
"description": "The target session.",
"type": "string"
},
"workflowRunId": {
"description": "The run to pause, exactly as the `workflow` item names it (SS4.5.8);\nrequired, non-empty.",
"type": "string"
}
},
"required": [
"commandId",
"sessionId",
"workflowRunId"
],
"type": "object"
},
"WorkflowResumeParams": {
"description": "`workflow/resume` params (tdd SS3.34, ADR 45437 D3): resume a paused\nworkflow run, host-driven.",
"properties": {
"commandId": {
"description": "The SS3.1.1 idempotency handle (UUIDv7).",
"type": "string"
},
"sessionId": {
"description": "The target session.",
"type": "string"
},
"workflowRunId": {
"description": "The paused run to resume, exactly as the `workflow` item names it\n(SS4.5.8); required, non-empty.",
"type": "string"
}
},
"required": [
"commandId",
"sessionId",
"workflowRunId"
],
"type": "object"
},
"WorkflowResumeResult": {
"description": "`workflow/resume` result (tdd SS3.34): admission-only plus the driven\nturn — always present, since resume always drives (idle fresh turn or\nbusy steer).",
"properties": {
"commandId": {
"description": "Echoes the client's id.",
"type": "string"
},
"status": {
"$ref": "#/$defs/CommandStatus",
"description": "Admission status."
},
"turnId": {
"description": "The turn the host drove: the fresh resume turn on an idle session,\nthe admission-time active turn on a busy session (a routing fact\nlike the SS3.18 wake-gate's, not settlement).",
"type": "string"
}
},
"required": [
"commandId",
"status",
"turnId"
],
"type": "object"
},
"WorkflowTokenBudget": {
"description": "`workflow`: the run's launch token budget (tdd SS4.5.8, #45449).",
"properties": {
"total": {
"description": "The effective launch budget in tokens, verbatim from the launch fact.",
"type": "integer"
}
},
"required": [
"total"
],
"type": "object"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"capabilities": {
"grantable": [
"userShell",
"sessionMcp",
"sessionListStream",
"feedback",
"computerUseSetup",
"computerUseHostSetup",
"sessionRename"
],
"reserved": [
{
"name": "rawLog",
"reference": "#13929"
},
{
"name": "mxp",
"reference": "#38644"
}
]
},
"description": "Muse Session Protocol (MSP) v1 wire schema bundle, rendered from the tbh-protocol schema model (spec 206). Generated; do not edit.",
"errors": [
{
"code": -32700,
"kind": "parseError",
"retryable": false
},
{
"code": -32600,
"kind": "invalidRequest",
"overrideKinds": [
"notInitialized",
"alreadyInitialized"
],
"retryable": false
},
{
"code": -32601,
"kind": "methodNotFound",
"overrideKinds": [
"experimentalRequired"
],
"retryable": false
},
{
"code": -32602,
"kind": "invalidParams",
"overrideKinds": [
"experimentalRequired"
],
"retryable": false
},
{
"code": -32603,
"kind": "internal",
"overrideKinds": [
"pageEventTooLarge",
"outputResultTooLarge"
],
"retryable": false
},
{
"code": -32001,
"kind": "overloaded",
"retryable": true
},
{
"code": -32002,
"kind": "inputTooLarge",
"retryable": false
},
{
"code": -32010,
"kind": "capabilityRequired",
"retryable": false
},
{
"code": -32011,
"kind": "notFound",
"retryable": false
},
{
"code": -32013,
"kind": "interrupted"
},
{
"code": -32014,
"kind": "cancelled"
},
{
"code": -32020,
"kind": "sessionNotFound",
"retryable": false
},
{
"code": -32021,
"kind": "sessionInUse",
"retryable": false
},
{
"code": -32022,
"kind": "sessionAmbiguous",
"retryable": false
},
{
"code": -32023,
"kind": "forkBoundaryInvalid",
"retryable": false
},
{
"code": -32024,
"kind": "sessionNotLoaded",
"retryable": false
},
{
"code": -32025,
"kind": "sessionStreamMismatch",
"retryable": false
},
{
"code": -32030,
"kind": "commandRejected",
"retryable": false
},
{
"code": -32031,
"kind": "backpressured",
"retryable": true
},
{
"code": -32032,
"kind": "skillNotFound",
"retryable": false
},
{
"code": -32033,
"kind": "computerUseUnavailable",
"retryable": false
},
{
"code": -32034,
"kind": "marketplaceNotFound",
"retryable": false
},
{
"code": -32035,
"kind": "pluginNotFound",
"retryable": false
},
{
"code": -32036,
"kind": "marketplaceAlreadyExists",
"retryable": false
},
{
"code": -32037,
"kind": "pluginMutationsDisabled",
"retryable": false
},
{
"code": -32038,
"kind": "uploadNotFound",
"retryable": false
},
{
"code": -32040,
"kind": "viewTruncated",
"retryable": false
},
{
"code": -32041,
"kind": "outputUnavailable",
"retryable": false
},
{
"code": -32042,
"kind": "boundaryPruned",
"overrideKinds": [
"boundaryUnusable",
"noBoundary"
],
"retryable": false
},
{
"code": -32050,
"kind": "approvalNotFound",
"retryable": false
},
{
"code": -32051,
"kind": "approvalAlreadyResolved",
"retryable": false
},
{
"code": -32052,
"kind": "approvalChoiceInvalid",
"retryable": false
},
{
"code": -32053,
"kind": "approvalRequirementStale",
"retryable": false
},
{
"code": -32054,
"kind": "approvalReviewerUnavailable",
"retryable": false
},
{
"code": -32055,
"kind": "userInputNotFound",
"retryable": false
},
{
"code": -32056,
"kind": "userInputAlreadySettled",
"retryable": false
},
{
"code": -32057,
"kind": "userInputAnswerInvalid",
"retryable": false
},
{
"code": -32058,
"kind": "approvalBrokerUnavailable",
"retryable": true
},
{
"code": -32059,
"kind": "approvalResolving",
"retryable": false
}
],
"methods": {
"approval/decide": {
"description": "Decides a pending approval, guarded by the current requirement id against the multi-stage race (SS5.4).",
"params": {
"$ref": "#/$defs/ApprovalDecideParams"
},
"result": {
"$ref": "#/$defs/ApprovalDecideResult"
}
},
"approval/listPending": {
"description": "Reads the full pending approval and user-input payloads for a session; a lease-free fold read (SS5.7).",
"params": {
"$ref": "#/$defs/ApprovalListPendingParams"
},
"result": {
"$ref": "#/$defs/ApprovalListPendingResult"
}
},
"computerUseSettings/read": {
"description": "Reads the computer-use Settings: each capability's Always allow switch and the user's blocked apps from the approval policy store, plus the built-in blocks as locked rows when asked; computerUseUnavailable while the CUA gate is off (ADR 630 D18.17).",
"params": {
"$ref": "#/$defs/ComputerUseSettingsReadParams"
},
"result": {
"$ref": "#/$defs/ComputerUseSettings"
}
},
"computerUseSettings/update": {
"description": "Applies one Settings patch (capability dropdowns, blocked apps to add or remove) all-or-nothing and answers the user's Settings after it; a built-in block is refused in either list; computerUseUnavailable while the CUA gate is off (ADR 630 D18.17).",
"params": {
"$ref": "#/$defs/ComputerUseSettingsUpdateParams"
},
"result": {
"$ref": "#/$defs/ComputerUseSettings"
}
},
"computerUseSetup/check": {
"description": "Reads the host's three macOS grants with no prompt: starts the computer-use helper only long enough to check them, reports each as granted or missing, and ends it; never requests a grant or opens System Settings. Needs computerUseHostSetup; commandRejected runtime_busy while a setup attempt holds the host.",
"result": {
"$ref": "#/$defs/ComputerUseSetupState"
}
},
"computerUseSetup/read": {
"description": "Reads one session's computer-use setup state and permissions by running cua_setup status for it as a host command: no model turn, no prompt, no spawn; computerUseUnavailable while the CUA gate is off (#52381). Without sessionId it reads the host's own setup, with computerUseHostSetup.",
"params": {
"$ref": "#/$defs/ComputerUseSetupReadParams"
},
"result": {
"$ref": "#/$defs/ComputerUseSetupState"
}
},
"computerUseSetup/start": {
"description": "A human command: runs cua_setup start for one session, between turns, exactly as the TUI's /cua on does, and answers the state it settles in, with the refusal code when setup refused; computerUseUnavailable while the CUA gate is off (#52381). Without sessionId it starts the host's own setup under one host owner, with computerUseHostSetup.",
"params": {
"$ref": "#/$defs/ComputerUseSetupStartParams"
},
"result": {
"$ref": "#/$defs/ComputerUseSetupState"
}
},
"feedback/submit": {
"description": "Submits a first-party feedback report through the host, reusing the TUI submitter seam (consent, bundle-first persistence, redaction), and answers the upload receipt (ADR 42691 D2).",
"params": {
"$ref": "#/$defs/FeedbackSubmitParams"
},
"result": {
"$ref": "#/$defs/FeedbackSubmitResult"
}
},
"goal/clear": {
"description": "Clears the session goal; never wakes and its ack never names a turn (tdd SS3.18, spec 14408; enrolled by #33066).",
"params": {
"$ref": "#/$defs/GoalClearParams"
},
"result": {
"$ref": "#/$defs/GoalCommandResult"
}
},
"goal/edit": {
"description": "Replaces the current goal's objective under the same wake gate as goal/set (tdd SS3.18, spec 14408; enrolled by #33066).",
"params": {
"$ref": "#/$defs/GoalEditParams"
},
"result": {
"$ref": "#/$defs/GoalCommandResult"
}
},
"goal/pause": {
"description": "Pauses the session goal; never wakes and its ack never names a turn (tdd SS3.18, spec 14408; enrolled by #33066).",
"params": {
"$ref": "#/$defs/GoalPauseParams"
},
"result": {
"$ref": "#/$defs/GoalCommandResult"
}
},
"goal/resume": {
"description": "Resumes a paused goal under the same wake gate as goal/set (tdd SS3.18, spec 14408; enrolled by #33066).",
"params": {
"$ref": "#/$defs/GoalResumeParams"
},
"result": {
"$ref": "#/$defs/GoalCommandResult"
}
},
"goal/set": {
"description": "Sets the session goal objective; wakes a goal-driving turn iff idle and the resulting goal is unfinished (tdd SS3.18, spec 14408; enrolled by #33066).",
"params": {
"$ref": "#/$defs/GoalSetParams"
},
"result": {
"$ref": "#/$defs/GoalCommandResult"
}
},
"hook/list": {
"description": "Reads the session's installed hook rows — one per installed handler per event, config-file handlers plus plugin-contributed hooks; a query, not a command (SS3.26.1).",
"params": {
"$ref": "#/$defs/HookListParams"
},
"result": {
"$ref": "#/$defs/HookListResult"
}
},
"initialize": {
"description": "Opens the connection: client identification, capability requests, and the experimental opt-in; the reply carries the envelope schema version and the stable-surface fingerprint (SS1.4.1).",
"params": {
"$ref": "#/$defs/InitializeParams"
},
"result": {
"$ref": "#/$defs/InitializeResult"
}
},
"item/readOutput": {
"description": "Byte-ranged read of stored full output the view truncated; works on loaded and unloaded sessions and takes no lease (SS4.7.4).",
"params": {
"$ref": "#/$defs/ItemReadOutputParams"
},
"result": {
"$ref": "#/$defs/ItemReadOutputResult"
}
},
"media/upload": {
"description": "Moves one video chunk into the session's video store; answers the `uploadId` receipt on every chunk (tdd SS3.33, ADR 45443 D5).",
"params": {
"$ref": "#/$defs/MediaUploadParams"
},
"result": {
"$ref": "#/$defs/MediaUploadResult"
}
},
"model/cancel": {
"description": "Cancels the sending connection's `model/complete` call, which settles `cancelled`; any other id answers `{}` and changes nothing (ADR 90352 D4/D6, tdd SS3.40).",
"params": {
"$ref": "#/$defs/ModelCancelParams"
},
"result": {
"$ref": "#/$defs/ModelCancelResult"
}
},
"model/complete": {
"description": "Runs one model completion with no session on the host's model; acks `accepted` and settles exactly once on `model/completed` — 4 in flight per connection, host-enforced 45s timeout (ADR 90352 D1-D4, tdd SS3.40).",
"params": {
"$ref": "#/$defs/ModelCompleteParams"
},
"result": {
"$ref": "#/$defs/ModelCompleteResult"
}
},
"model/list": {
"description": "Reads the catalog of models the host will accept in `session/setModel`; a query, not a command (SS3.10).",
"params": {
"$ref": "#/$defs/ModelListParams"
},
"result": {
"$ref": "#/$defs/ModelListResult"
}
},
"plugin/install": {
"description": "Install one plugin from a marketplace pair or a host local path with scope (per-session, `commandId`-idempotent, hold-open; answers the installed receipt) (SS3.29.1).",
"params": {
"$ref": "#/$defs/PluginInstallParams"
},
"result": {
"$ref": "#/$defs/PluginInstallResult"
}
},
"plugin/list": {
"description": "Reads the installed plugin records — one row per installed plugin; a query, not a command (SS3.26.2).",
"params": {
"$ref": "#/$defs/PluginListParams"
},
"result": {
"$ref": "#/$defs/PluginListResult"
}
},
"plugin/marketplaceAdd": {
"description": "Add a marketplace from `owner/repo`, git URL, `file://` URL, or local path (per-session, `commandId`-idempotent; answers the stored record) (SS3.29.2).",
"params": {
"$ref": "#/$defs/PluginMarketplaceAddParams"
},
"result": {
"$ref": "#/$defs/PluginMarketplaceRecordResult"
}
},
"plugin/marketplaceRemove": {
"description": "Remove a marketplace (per-session, `commandId`-idempotent; answers the removed name) (SS3.29.4).",
"params": {
"$ref": "#/$defs/PluginMarketplaceRemoveParams"
},
"result": {
"$ref": "#/$defs/PluginMarketplaceRemoveResult"
}
},
"plugin/marketplaceUpdate": {
"description": "Refresh a marketplace in place (per-session, `commandId`-idempotent; answers the stored record) (SS3.29.3).",
"params": {
"$ref": "#/$defs/PluginMarketplaceUpdateParams"
},
"result": {
"$ref": "#/$defs/PluginMarketplaceRecordResult"
}
},
"recap/cancel": {
"description": "Cancels the session's in-flight recap, which settles `cancelled`; idle is an accepted no-op (ADR 45447 D5, tdd SS3.28.5).",
"params": {
"$ref": "#/$defs/RecapCancelParams"
},
"result": {
"$ref": "#/$defs/RecapCancelResult"
}
},
"recap/request": {
"description": "Requests a \"while you were away\" recap for a loaded session; acks `accepted` and settles exactly once on `recap/completed` — one in flight per session, host-enforced 45s timeout (ADR 45447 D1/D5, tdd SS3.28.1).",
"params": {
"$ref": "#/$defs/RecapRequestParams"
},
"result": {
"$ref": "#/$defs/RecapRequestResult"
}
},
"session/clearExternalWait": {
"description": "Clears a live host-declared external wait: no declaration is live afterwards, and the end-of-turn reminder boundary returns to today's behaviour at once. Clearing a session with no declaration is a no-op that still answers `declared: false`.",
"params": {
"$ref": "#/$defs/SessionClearExternalWaitParams"
},
"result": {
"$ref": "#/$defs/SessionClearExternalWaitResult"
}
},
"session/compact": {
"description": "Compacts the session's conversation context; runs asynchronously, so the ack is admission only (SS3.7).",
"params": {
"$ref": "#/$defs/SessionCompactParams"
},
"result": {
"$ref": "#/$defs/SessionCompactResult"
}
},
"session/declareExternalWait": {
"description": "Declares that a loaded session is waiting on an external event: the end-of-turn reminder boundary parks a blocking reminder instead of re-verifying until the next input arrives (ADR 66573 amendment). Live-only: a serve restart, unload, or resume loses the declaration; the next user input or an explicit clear ends it.",
"params": {
"$ref": "#/$defs/SessionDeclareExternalWaitParams"
},
"result": {
"$ref": "#/$defs/SessionDeclareExternalWaitResult"
}
},
"session/fork": {
"description": "Branches a session into a new id whose log copies the source through a cut point, with durable provenance (SS2.5.3).",
"params": {
"$ref": "#/$defs/SessionForkParams"
},
"result": {
"$ref": "#/$defs/SessionForkResult"
}
},
"session/leave": {
"description": "Admits release of one loaded session; final release or failure is pushed through session/leaveCompleted (SS2.15).",
"params": {
"$ref": "#/$defs/SessionLeaveParams"
},
"result": {
"$ref": "#/$defs/SessionLeaveResult"
}
},
"session/list": {
"description": "Pages through stored sessions under the sessions root for history and picker UIs; read-only, never touches leases (SS2.5.4).",
"params": {
"$ref": "#/$defs/SessionListParams"
},
"result": {
"$ref": "#/$defs/SessionListResult"
}
},
"session/read": {
"description": "Reads one stored session without attaching: no lease, no load, no subscription, no resume record (SS2.5.5).",
"params": {
"$ref": "#/$defs/SessionReadParams"
},
"result": {
"$ref": "#/$defs/SessionReadResult"
}
},
"session/rename": {
"description": "Sets or changes the durable allocated session name through the runtime session_name command; withheld under the ephemeral profile (SS2.14.2, #27598).",
"params": {
"$ref": "#/$defs/SessionRenameParams"
},
"result": {
"$ref": "#/$defs/SessionRenameResult"
}
},
"session/resume": {
"description": "Loads a stored session on this host, auto-subscribes this connection, and returns the history needed to render it (SS2.5.2).",
"params": {
"$ref": "#/$defs/SessionResumeParams"
},
"result": {
"$ref": "#/$defs/SessionResumeResult"
}
},
"session/setApprovalMode": {
"description": "Selects a preconfigured approval enforcement mode mid-session; select, never create (SS5.12).",
"params": {
"$ref": "#/$defs/SessionSetApprovalModeParams"
},
"result": {
"$ref": "#/$defs/SessionSetApprovalModeResult"
}
},
"session/setModel": {
"description": "Reconfigures the session's model; the selection is durable and applies to subsequent model calls (SS3.8).",
"params": {
"$ref": "#/$defs/SessionSetModelParams"
},
"result": {
"$ref": "#/$defs/SessionSetModelResult"
}
},
"session/setReasoningEffort": {
"description": "Sets the session's standing reasoning-effort default; a turn carrying its own tier overrides it for that turn only (SS3.21, ADR 31255 D1).",
"params": {
"$ref": "#/$defs/SessionSetReasoningEffortParams"
},
"result": {
"$ref": "#/$defs/SessionSetReasoningEffortResult"
}
},
"session/sideChat": {
"description": "Opens a side chat from a loaded main session, with durable provenance (SS2.5.7; ADR 45435 D2).",
"params": {
"$ref": "#/$defs/SessionSideChatParams"
},
"result": {
"$ref": "#/$defs/SessionSideChatResult"
}
},
"session/start": {
"description": "Creates a brand-new session, loads it on this host, durably records the start, and auto-subscribes this connection (SS2.5.1).",
"params": {
"$ref": "#/$defs/SessionStartParams"
},
"result": {
"$ref": "#/$defs/SessionStartResult"
}
},
"session/userShell": {
"description": "Runs a user-initiated shell command in the session's workspace; capability-gated on `userShell` (SS3.9).",
"params": {
"$ref": "#/$defs/SessionUserShellParams"
},
"result": {
"$ref": "#/$defs/SessionUserShellResult"
}
},
"skill/import": {
"description": "Imports foreign skills from the host's own `claude | codex` dirs through the single `SkillsService::import_skills` seam; answers per-skill installed/quarantined/skipped/failed plus counts. `commandId`-idempotent (including `dryRun` previews); each successful write is a `skill/changed` detection point (tdd SS3.30.2, ADR 45433 D2/D4/D5, #45433).",
"params": {
"$ref": "#/$defs/SkillImportParams"
},
"result": {
"$ref": "#/$defs/SkillImportResult"
}
},
"skill/list": {
"description": "Reads the session's user-invocable skill rows — one per typed-invocable shortcut spelling, the INV-007 predicate and shared name resolution by call-through; a query, not a command (SS3.22.1).",
"params": {
"$ref": "#/$defs/SkillListParams"
},
"result": {
"$ref": "#/$defs/SkillListResult"
}
},
"skill/setActivation": {
"description": "Writes one skill's activation in any scope through the single `SkillsService::set_activation` seam; answers the applied state plus `previous`. `commandId`-idempotent; each successful write is a `skill/changed` detection point (tdd SS3.30.1, ADR 45433 D2/D4/D5, #45433).",
"params": {
"$ref": "#/$defs/SkillSetActivationParams"
},
"result": {
"$ref": "#/$defs/SkillSetActivationResult"
}
},
"subagent/close": {
"description": "Owner-close a child; the terminal mapping folds per SS4.5.7 (SS3.16).",
"params": {
"$ref": "#/$defs/SubagentOwnerReasonParams"
},
"result": {
"$ref": "#/$defs/CommandAcceptedResult"
}
},
"subagent/followupTask": {
"description": "Queue a follow-up task for a child; admission-only ack, the task settles on the child session's view stream (SS3.16).",
"params": {
"$ref": "#/$defs/SubagentInputParams"
},
"result": {
"$ref": "#/$defs/CommandAcceptedResult"
}
},
"subagent/interrupt": {
"description": "Ask a child to yield at its next boundary; outcome folds to the parent's subagent item (SS3.16, SS4.5.7).",
"params": {
"$ref": "#/$defs/SubagentOwnerReasonParams"
},
"result": {
"$ref": "#/$defs/CommandAcceptedResult"
}
},
"subagent/list": {
"description": "Lists the session's subagent roster: one row per durable child, running and finished, projected from the loaded parent's runtime subagent control records (kt-o155).",
"params": {
"$ref": "#/$defs/SubagentListParams"
},
"result": {
"$ref": "#/$defs/SubagentListResult"
}
},
"subagent/readResult": {
"description": "Consume a ready child result (state-changing; the content is already the subagent item's result field) (SS3.16).",
"params": {
"$ref": "#/$defs/SubagentTargetParams"
},
"result": {
"$ref": "#/$defs/CommandAcceptedResult"
}
},
"subagent/reopen": {
"description": "Reopen a stopped/closed child as a durable later attempt (SS3.16).",
"params": {
"$ref": "#/$defs/SubagentTargetParams"
},
"result": {
"$ref": "#/$defs/CommandAcceptedResult"
}
},
"subagent/resume": {
"description": "Resume a paused/recoverable child as a durable later attempt (SS3.16).",
"params": {
"$ref": "#/$defs/SubagentTargetParams"
},
"result": {
"$ref": "#/$defs/CommandAcceptedResult"
}
},
"subagent/sendMessage": {
"description": "Queue a user note into a running child; admission-only ack, the note settles on the child session's view stream (SS3.16).",
"params": {
"$ref": "#/$defs/SubagentInputParams"
},
"result": {
"$ref": "#/$defs/CommandAcceptedResult"
}
},
"subagent/stop": {
"description": "Stop a running child; outcome folds to the parent's subagent item (SS3.16, SS4.5.7).",
"params": {
"$ref": "#/$defs/SubagentOwnerReasonParams"
},
"result": {
"$ref": "#/$defs/CommandAcceptedResult"
}
},
"task/background": {
"description": "Durably sends a running foreground tool task to the background; the `TaskBackgrounded` record lands before the ack and the `toolCall` item's `item/updated` folds the flip (tdd §3.13, #14411; enrolled under the #33065 T1 ruling).",
"params": {
"$ref": "#/$defs/TaskBackgroundParams"
},
"result": {
"$ref": "#/$defs/TaskCommandResult"
}
},
"task/list": {
"description": "Lists the loaded session's background-task inventory: one row per stoppable workload at admission, ordered oldest-start first (tdd §3.31, #45144; enrolled under the #33065 T1 ruling).",
"params": {
"$ref": "#/$defs/TaskListParams"
},
"result": {
"$ref": "#/$defs/TaskListResult"
}
},
"task/stop": {
"description": "Stops one named background task; the kill settles durably and the item folds a terminal (tdd §3.14, #14411; enrolled under the #33065 T1 ruling).",
"params": {
"$ref": "#/$defs/TaskStopParams"
},
"result": {
"$ref": "#/$defs/TaskCommandResult"
}
},
"task/stopAll": {
"description": "Stops every stoppable background workload live at admission; always accepted, one item terminal folds per stopped item-visible task (tdd §3.15, #14411; enrolled under the #33065 T1 ruling).",
"params": {
"$ref": "#/$defs/TaskStopAllParams"
},
"result": {
"$ref": "#/$defs/TaskStopAllResult"
}
},
"turn/cancel": {
"description": "Cancels a turn on the normal command lane, recording no priority interrupt intent (SS3.5).",
"params": {
"$ref": "#/$defs/TurnCancelParams"
},
"result": {
"$ref": "#/$defs/TurnCancelResult"
}
},
"turn/interrupt": {
"description": "Stops the running turn on the runtime's priority lane, optionally pairing a durable retract intent (SS3.4).",
"params": {
"$ref": "#/$defs/TurnInterruptParams"
},
"result": {
"$ref": "#/$defs/TurnInterruptResult"
}
},
"turn/start": {
"description": "Submits user input to a session; the optional disposition controls queue, steer, or replace when a turn is already running (SS3.2).",
"params": {
"$ref": "#/$defs/TurnStartParams"
},
"result": {
"$ref": "#/$defs/TurnStartResult"
}
},
"turn/steer": {
"description": "Injects input into the turn the caller names, failing if that turn is no longer active (SS3.3).",
"params": {
"$ref": "#/$defs/TurnSteerParams"
},
"result": {
"$ref": "#/$defs/TurnSteerResult"
}
},
"turn/unqueue": {
"description": "Reclaims a queued submit before it launches; never upgrades into a cancel once the target is running (SS3.6).",
"params": {
"$ref": "#/$defs/TurnUnqueueParams"
},
"result": {
"$ref": "#/$defs/TurnUnqueueResult"
}
},
"usage/read": {
"description": "Reads the host's last-observed subscription usage window (5h-class and weekly percent blocks, tier, arrival stamp) without a model call; the usage member is omitted when nothing has been observed (ADR 32563 D2).",
"result": {
"$ref": "#/$defs/UsageReadResult"
}
},
"userInput/answer": {
"description": "Answers every question of an open user-input prompt (SS5.10.2).",
"params": {
"$ref": "#/$defs/UserInputAnswerParams"
},
"result": {
"$ref": "#/$defs/UserInputAnswerResult"
}
},
"userInput/cancel": {
"description": "Declines an open user-input prompt; the tool call resolves with a cancelled result the model sees (SS5.10.2).",
"params": {
"$ref": "#/$defs/UserInputCancelParams"
},
"result": {
"$ref": "#/$defs/UserInputCancelResult"
}
},
"userInput/clarify": {
"description": "Answers an open user-input prompt with a free-form clarification the model re-decides against (SS5.10.2).",
"params": {
"$ref": "#/$defs/UserInputClarifyParams"
},
"result": {
"$ref": "#/$defs/UserInputClarifyResult"
}
},
"userInput/interrupt": {
"description": "Interrupts an open user-input prompt carrying confirmed partial answers, then stops the turn (SS5.10.2, ADR 45450 D1).",
"params": {
"$ref": "#/$defs/UserInputInterruptParams"
},
"result": {
"$ref": "#/$defs/UserInputInterruptResult"
}
},
"view/page": {
"description": "Cursor-paged reads of the session view, forward or backward; each result element is an unframed view notification, the nested {method, params} pair of SS4.2.1 (SS4.7.3).",
"params": {
"$ref": "#/$defs/ViewPageParams"
},
"result": {
"$ref": "#/$defs/ViewPageResult"
}
},
"view/subscribe": {
"description": "Attaches this connection's live view subscription for a session at an explicit cursor, replaying `(after, head]` before any live event; the re-attach path after `view/unsubscribe` (SS4.7.1).",
"params": {
"$ref": "#/$defs/ViewSubscribeParams"
},
"result": {
"$ref": "#/$defs/ViewSubscribeResult"
}
},
"view/unsubscribe": {
"description": "Removes this connection from the session's view subscription set; does not unload the session (SS4.7.2).",
"params": {
"$ref": "#/$defs/ViewUnsubscribeParams"
},
"result": {
"$ref": "#/$defs/ViewUnsubscribeResult"
}
},
"workflow/cancel": {
"description": "Cancels a live workflow run; admission-only bare ack, the cancellation's truth arrives as the workflow item's view events (tdd SS3.19, spec 14410; enrolled by the #33065 sweep).",
"params": {
"$ref": "#/$defs/WorkflowCancelParams"
},
"result": {
"$ref": "#/$defs/WorkflowControlResult"
}
},
"workflow/childControl": {
"description": "Skips or retries one workflow child keyed by the item's (childId, attempt) pair; admission-only bare ack (tdd SS3.20, spec 14410; enrolled by the #33065 sweep).",
"params": {
"$ref": "#/$defs/WorkflowChildControlParams"
},
"result": {
"$ref": "#/$defs/WorkflowControlResult"
}
},
"workflow/pause": {
"description": "Pauses a live workflow run; admission-only bare ack, the pause folds as the workflow item's `paused` member (tdd SS3.32, ADR 45437 D2).",
"params": {
"$ref": "#/$defs/WorkflowPauseParams"
},
"result": {
"$ref": "#/$defs/WorkflowControlResult"
}
},
"workflow/resume": {
"description": "Resumes a paused workflow run, host-driven; the reply names the driven turn, the resumed launch folds as a new workflow item whose `resumeFromRunId` names the paused run (tdd SS3.34, ADR 45437 D3).",
"params": {
"$ref": "#/$defs/WorkflowResumeParams"
},
"result": {
"$ref": "#/$defs/WorkflowResumeResult"
}
}
},
"notifications": {
"approval/requested": {
"description": "An approval opened: the fold of its durable Requested record (SS5.5.1).",
"params": {
"$ref": "#/$defs/ApprovalRequestParams"
}
},
"approval/resolved": {
"description": "The first durable approval terminal landed; protected delivery (SS5.5).",
"params": {
"$ref": "#/$defs/ApprovalResolvedParams"
}
},
"approval/reviewing": {
"description": "The native reviewer holds an approval: the fold of a Requested whose phase is automated_reviewing; typed activity, not a request (SS5.5.1, spec 209 FR-52080-1).",
"params": {
"$ref": "#/$defs/ApprovalRequestParams"
}
},
"approval/updated": {
"description": "A non-terminal approval record changed the pending view (SS5.5.1).",
"params": {
"$ref": "#/$defs/ApprovalUpdatedParams"
}
},
"computerUseSetup/changed": {
"description": "A computerUseSetup/read or /start observed a session's setup state differ from the last one sent for it, including inProgress when a start begins and the state it settles in (#52381). Without sessionId it carries the host's own setup state, delivered only with computerUseHostSetup.",
"params": {
"$ref": "#/$defs/ComputerUseSetupChanged"
}
},
"initialized": {
"description": "Client-to-server notification closing the handshake; no params (SS1.4.2)."
},
"item/completed": {
"description": "An item reached its terminal state: the authoritative final object (SS4.3).",
"params": {
"$ref": "#/$defs/ItemCompletedParams"
}
},
"item/delta": {
"description": "Streaming append to an open item's field path (ephemeral-sourced, no sourceRange; opt-out-able) (SS4.3.1).",
"params": {
"$ref": "#/$defs/ItemDeltaParams"
}
},
"item/started": {
"description": "An item opened on the transcript (SS4.3).",
"params": {
"$ref": "#/$defs/ItemStartedParams"
}
},
"item/updated": {
"description": "An open item changed non-terminally: full re-emission at a higher revision (SS4.4.2).",
"params": {
"$ref": "#/$defs/ItemUpdatedParams"
}
},
"model/completed": {
"description": "A model/complete call settled exactly once: `completed`, `failed`, `cancelled` or `timedOut`, to the requesting connection only (ADR 90352 D2, tdd SS3.40).",
"params": {
"$ref": "#/$defs/ModelCompletedParams"
}
},
"monitor/inboxItemAdmitted": {
"description": "One monitor inbox admission: the fold keys gate-off consumes (SS4.5.18).",
"params": {
"$ref": "#/$defs/MonitorInboxItemAdmittedParams"
}
},
"monitor/inboxItemDrained": {
"description": "One monitor inbox drain with its recorded stamp, the drain-side operand of latest-wins (SS4.5.18).",
"params": {
"$ref": "#/$defs/MonitorInboxItemDrainedParams"
}
},
"monitor/inboxItemVoided": {
"description": "One wake-missed void with its recorded stamp; count-only, no transcript row (SS4.5.18).",
"params": {
"$ref": "#/$defs/MonitorInboxItemVoidedParams"
}
},
"plugin/changed": {
"description": "An install landed; carries the installed-row summary and clients re-issue `plugin/list` (ADR 45434 D5).",
"params": {
"$ref": "#/$defs/PluginChangedParams"
}
},
"plugin/marketplaceChanged": {
"description": "A marketplace was added, updated, or removed; carries the change summary (ADR 45434 D5).",
"params": {
"$ref": "#/$defs/PluginMarketplaceChangedParams"
}
},
"recap/completed": {
"description": "A recap request settled exactly once — `completed` (with `text` plus optional `title`), `failed` (`providerFailed`), `cancelled`, or `timedOut` — delivered to the requesting connection outside the view stream (ADR 45447 D2, tdd SS3.28.2).",
"params": {
"$ref": "#/$defs/RecapCompletedParams"
}
},
"session/approvalModeChanged": {
"description": "The approval enforcement mode changed: the fold of the durable reconfigure audit fact (SS5.12).",
"params": {
"$ref": "#/$defs/SessionApprovalModeChangedParams"
}
},
"session/branchChanged": {
"description": "A durable workspace-branch observation landed; null branch is a detached-HEAD fact (SS4.6.4).",
"params": {
"$ref": "#/$defs/SessionBranchChangedParams"
}
},
"session/closed": {
"description": "A loaded session was unloaded (idle | hostShutdown | leave) with the final view cursor; broadcast to every initialized connection (SS2.6.2).",
"params": {
"$ref": "#/$defs/SessionClosedParams"
}
},
"session/contextUsage": {
"description": "A provider-reported context-occupancy fact folded to a changed (windowTokens, usedTokens, pressure) triple (SS4.6.6).",
"params": {
"$ref": "#/$defs/SessionContextUsageParams"
}
},
"session/goalChanged": {
"description": "The session's goal block changed value; replace wholesale, an explicit null clears (SS4.6.2).",
"params": {
"$ref": "#/$defs/SessionGoalChangedParams"
}
},
"session/leaveCompleted": {
"description": "Protected correlated terminal for an admitted session/leave (SS2.15).",
"params": {
"$ref": "#/$defs/SessionLeaveCompletedParams"
}
},
"session/listChanged": {
"description": "The changed session/list row, full-row replace; opt-in per connection via the sessionListStream capability, never subscription-gated (#33084, ADR 33084 D2/D3).",
"params": {
"$ref": "#/$defs/SessionListChangedParams"
}
},
"session/modelChanged": {
"description": "A durable model selection took effect (SS4.6.1).",
"params": {
"$ref": "#/$defs/SessionModelChangedParams"
}
},
"session/modelRouteUnserved": {
"description": "An accepted login credential update installed a provider that cannot serve the session's standing model route; the standing selection is unchanged and a routable session/setModel repairs it (#25603, spec 5469 Amendment 16).",
"params": {
"$ref": "#/$defs/SessionModelRouteUnservedParams"
}
},
"session/nameChanged": {
"description": "A durable session-name record landed (rename or first naming): the fold of the session_name record (SS4.6.7, #27598).",
"params": {
"$ref": "#/$defs/SessionNameChangedParams"
}
},
"session/reasoningEffortChanged": {
"description": "A durable session-default reasoning-effort change took effect (SS4.6.9, ADR 31255 D1).",
"params": {
"$ref": "#/$defs/SessionReasoningEffortChangedParams"
}
},
"session/started": {
"description": "A session became newly loaded on this host via session/start or session/fork; broadcast to every initialized connection (SS2.6.1).",
"params": {
"$ref": "#/$defs/SessionStartedParams"
}
},
"session/statusChanged": {
"description": "A loaded session's (status, attention) flipped; command-plane broadcast, cursor-stamped, not subscription-gated (SS4.6.10, ADR 31983 D2).",
"params": {
"$ref": "#/$defs/SessionStatusChangedParams"
}
},
"session/todoListChanged": {
"description": "The todo list was replaced wholesale; empty items is a cleared list (SS4.6.3).",
"params": {
"$ref": "#/$defs/SessionTodoListChangedParams"
}
},
"session/tokenUsage": {
"description": "A model call completed with usage: raw counters plus counted-once derivations plus session cumulative (SS4.6.5).",
"params": {
"$ref": "#/$defs/SessionTokenUsageParams"
}
},
"session/viewHealthChanged": {
"description": "A loaded session's live view stream became unavailable, and why: a command-plane push delivered independent of the view subscription set when the materialized projection fails closed (ADR 32557; #32557).",
"params": {
"$ref": "#/$defs/SessionViewHealthChangedParams"
}
},
"skill/changed": {
"description": "The session's user-invocable skill set changed; clients re-issue skill/list. A live host-state projection, not a view event (SS3.22.2).",
"params": {
"$ref": "#/$defs/SkillChangedParams"
}
},
"turn/completed": {
"description": "Turn terminal: completed | failed | cancelled, with usage and the settled error object (SS4.5.1).",
"params": {
"$ref": "#/$defs/TurnCompletedParams"
}
},
"turn/foregroundCompleted": {
"description": "The turn's foreground work is done while named background reminder checks hold the turn open; explicitly non-terminal (SS4.5.12).",
"params": {
"$ref": "#/$defs/TurnForegroundCompletedParams"
}
},
"turn/modelAttemptStarted": {
"description": "A turn's model attempt is starting: its model provider task recorded its opening status; observable mid-turn, non-terminal (SS4.5.1; ADR 68644-model-attempt-started D1).",
"params": {
"$ref": "#/$defs/TurnModelAttemptStartedParams"
}
},
"turn/modelRetryScheduled": {
"description": "A provider backoff behind one model attempt is scheduled and waiting out its delay; observable mid-turn, non-terminal (SS4.5.1; ADR 50047-model-retry-scheduled-members D1).",
"params": {
"$ref": "#/$defs/TurnModelRetryScheduledParams"
}
},
"turn/retracted": {
"description": "An accepted interrupt's paired retract durably settled, accepted or declined (SS4.5.1; ADR 50074 D1).",
"params": {
"$ref": "#/$defs/TurnRetractedParams"
}
},
"turn/retryScheduled": {
"description": "A failing model attempt's retry is scheduled and waiting out its backoff; observable mid-turn, non-terminal (SS4.5.1, D-026).",
"params": {
"$ref": "#/$defs/TurnRetryScheduledParams"
}
},
"turn/started": {
"description": "A foreground turn began running (SS4.5.1).",
"params": {
"$ref": "#/$defs/TurnStartedParams"
}
},
"turn/unqueued": {
"description": "A queued submit's reclaim durably won: its pre-minted turn never runs, and no turn/started or turn/completed will follow for that turnId (SS3.6, SS4.5.1).",
"params": {
"$ref": "#/$defs/TurnUnqueuedParams"
}
},
"usage/changed": {
"description": "The host's last-observed subscription usage DATA changed (window, weekly, or tier — not a stamp-only refresh), with the same payload shape as usage/read's usage member; the absent-to-present first observation emits (ADR 32563 D3).",
"params": {
"$ref": "#/$defs/SubscriptionUsage"
}
},
"userInput/engaged": {
"description": "Client-to-server engagement note: the user started interacting with a timed prompt, so the host disarms its countdown; no result, no errors, no ledger row (SS5.10.4, ADR 45450 D2).",
"params": {
"$ref": "#/$defs/UserInputEngagedParams"
}
},
"userInput/requested": {
"description": "A user-input prompt opened: the fold of its durable Requested record (SS5.10.1).",
"params": {
"$ref": "#/$defs/UserInputRequestParams"
}
},
"userInput/settled": {
"description": "The first durable user-input settlement landed; protected delivery (SS5.10.3).",
"params": {
"$ref": "#/$defs/UserInputSettledParams"
}
},
"view/gap": {
"description": "Push delivery dropped events: `(after, next)` brackets the undelivered range and delivery continues from `next` (SS4.8; spec 208 FM-001).",
"params": {
"$ref": "#/$defs/ViewGapParams"
}
}
},
"requests": {
"approval/request": {
"description": "Server-initiated must-answer request presenting a pending approval to every subscribed connection; the response is the SS5.3.3 presentation receipt — the decision travels as approval/decide (SS5.3; indexed by #23840).",
"params": {
"$ref": "#/$defs/ApprovalRequestParams"
},
"result": {
"$ref": "#/$defs/RequestReceipt"
}
},
"userInput/request": {
"description": "Server-initiated must-answer request presenting a pending user-input prompt; the response is the SS5.3.3 presentation receipt — the answer travels as userInput/answer (SS5.10.1; indexed by #23840).",
"params": {
"$ref": "#/$defs/UserInputRequestParams"
},
"result": {
"$ref": "#/$defs/RequestReceipt"
}
}
},
"reserved": [
{
"identifier": "-32060..-32069",
"reference": "#13929 — SS6 raw log & projections error block, deferred whole; a v1 host never emits it"
},
{
"identifier": "-32070..-32079",
"reference": "#13929 — peer messaging & admission (#45445) error block, deferred whole; a v1 host never emits it"
},
{
"identifier": "-32012",
"reference": "SS1.6: deliberately never assigned; command_id_conflict is commandRejected"
},
{
"identifier": "deprecationNotice",
"reference": "#13929 — reserved notification, no producer before 1.0"
}
]
}