@muse-code/sdk 1.4.14 → 1.4.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/src/msp.d.ts CHANGED
@@ -29,7 +29,7 @@ export interface ApprovalChange {
29
29
  decision?: ApprovalDecision;
30
30
  /** A recovery detail: whether the action could run without a new decision. Present only when `kind` is `restartRecovered`. */
31
31
  executable?: boolean;
32
- /** What happened: for example `stageResolved` (a shell stage was satisfied), `policyPersistence` (saving a rule succeeded or failed), `reviewStarted` or `reviewCompleted` (the automated LLM judge started or finished reviewing), `restartRecovered` (a host restart recovered this approval: either the host first resolves it `abort` and a re-ask comes as a new approval with a new `approvalId`, or it stays pending under the same `approvalId` with refreshed choices) or `alreadyTerminal` (recovery found it already decided). The set is open, so newer hosts may add kinds. */
32
+ /** What happened: for example `stageResolved` (a shell stage was satisfied), `policyPersistence` (saving a rule succeeded or failed), `reviewStarted` or `reviewCompleted` (the automated LLM judge started or finished reviewing), `restartRecovered` (a host restart recovered this approval: either the host first resolves it `abort` and a re-ask comes as a new approval with a new `approvalId`, or it stays pending under the same `approvalId` with refreshed choices), `alreadyTerminal` (recovery found it already decided) or `resolving` (a `computerUseTakeover` approval was marked resolving and waits for the lock broker; a decide now answers -32059). The set is open, so newer hosts may add kinds. */
33
33
  kind: string;
34
34
  /** Why saving the policy rule failed, as human-readable text. Present only when `kind` is `policyPersistence` and `status` is `failed`. */
35
35
  reason?: string;
@@ -259,6 +259,8 @@ export type ApprovalResolvedBy = "user" | "policy" | "llmJudge" | (string & {});
259
259
 
260
260
  /** `approval/resolved` params: the first durable terminal decision. */
261
261
  export interface ApprovalResolvedParams {
262
+ /** Why an `abort` was not a cancel, when the host knows: `lockEpochEnded | brokerUnavailable`, an open vocabulary (tdd SS5.5). Clients render an unknown value like an absent one. */
263
+ abortReason?: string;
262
264
  /** The policy rule the decision created. Present only when the decision created one. */
263
265
  amendment?: ApprovalAmendment;
264
266
  /** The approval that was decided. */
@@ -347,9 +349,11 @@ export interface ApprovalSubject {
347
349
  access?: string;
348
350
  /** The full raw shell command. Present when `kind` is `shell`. */
349
351
  command?: string;
352
+ /** The session that holds the Computer Use lock now, by label and times only. Present when `kind` is `computerUseTakeover` (tdd SS5.2.8). */
353
+ holder?: ComputerUseLockHolder;
350
354
  /** The network host the tool wants to reach. Present when `kind` is `network`. */
351
355
  host?: string;
352
- /** Open discriminator: `shell | fileAccess | network | unixSocket | process | tool`. */
356
+ /** Open discriminator: `shell | fileAccess | network | unixSocket | process | tool | computerUseTakeover`. */
353
357
  kind: string;
354
358
  /** What triggered the action (a shell command or a URL), for display only and untrusted. It is not sent on `shell` subjects, and policy rules never match on it. */
355
359
  origin?: ApprovalOrigin;
@@ -405,14 +409,30 @@ export type AttentionFlag = "approvalPending" | "inputPending" | (string & {});
405
409
  /** Who durably backgrounded a task (tdd SS4.5.5, `TaskBackgroundedInitiator`). Open — runtime vocabulary. */
406
410
  export type BackgroundInitiator = "user" | "timeout" | (string & {});
407
411
 
408
- /** `backgroundTerminalCompletion`: the five facts the Finished cell renders (ADR 50041 D3/D4). The fold reads them from the inbox terminal record and the backgrounded call it names; every member is required (empty output serializes as `""`, never absent). */
412
+ /** One call's live background-target record (tdd SS4.5.5; ADR 63254-background-target-on-tool-call D2): exactly the runtime snapshot's four facts, no new nouns. */
413
+ export interface BackgroundTarget {
414
+ /** Whether the background was already requested for this call. */
415
+ backgroundRequested: boolean;
416
+ /** Whether the call sits in its foreground wait right now. */
417
+ foregroundWaitActive: boolean;
418
+ /** Point-in-time Ctrl+B chooser hint; the runtime re-checks admission on the action. */
419
+ manualReleaseAdmissible: boolean;
420
+ /** The tool call this record describes (the provider call id). */
421
+ toolCallId: string;
422
+ }
423
+
424
+ /** `backgroundTerminalCompletion`: the facts the Finished cell renders (ADR 50041 D3/D4, plus the optional exit code from D28 and the optional reason from D29). The fold reads them from the inbox terminal record and the backgrounded call it names; every member is required (empty output serializes as `""`, never absent) except `exit_code` and `reason`, each absent when the terminal carries none. */
409
425
  export interface BackgroundTerminalCompletion {
410
426
  /** The title text gate-off shows for the backgrounded command. */
411
427
  command: string;
428
+ /** The process exit code from the terminal record's `exit_code: ` line (ADR 50041 D28); absent when the terminal carries none. `i32`, the gate-off frozen-header twin's width (`BackgroundTerminalTailTerminal.exit_code`). Old clients ignore the unknown member (tdd evolution rule). */
429
+ exitCode?: number;
412
430
  /** The completion text; empty when the terminal carries none. */
413
431
  output: string;
414
432
  /** True when `output` is a prefix of the terminal text. */
415
433
  outputTruncated: boolean;
434
+ /** The terminal's reason from the terminal record's `reason: ` line, trimmed like gate-off's parse (ADR 50041 D29); absent when the terminal carries none or an empty one. Old clients ignore the unknown member (tdd evolution rule). */
435
+ reason?: string;
416
436
  /** One of `completed`, `failed`, `cancelled`, `timedOut`, `rejected` (the ItemStatus wire vocabulary, tdd SS4.4.1). */
417
437
  terminalStatus: string;
418
438
  /** The backgrounded call's call id: the live/history correlation key behind the skip-when-minted rule (ADR 50041 D6). */
@@ -568,6 +588,16 @@ export interface ComputerUseInstalledApp {
568
588
  name: string;
569
589
  }
570
590
 
591
+ /** The Computer Use lock's holder as a `computerUseTakeover` approval shows it: never its app, window, target or current action (ADR 73131 D2). */
592
+ export interface ComputerUseLockHolder {
593
+ /** When the holder took the lock (RFC 3339). */
594
+ acquiredAt: string;
595
+ /** When the holder last acted under the lock (RFC 3339). */
596
+ lastActivityAt: string;
597
+ /** The holding session's label. */
598
+ sessionLabel: string;
599
+ }
600
+
571
601
  /** One macOS permission as setup last saw it. **Open**, like the phase. */
572
602
  export type ComputerUsePermission = "granted" | "missing" | "unknown" | (string & {});
573
603
 
@@ -717,6 +747,22 @@ export interface DamagedRange {
717
747
  unreadableLines: number;
718
748
  }
719
749
 
750
+ /** One input the read session's log delivered to a subagent (tdd SS2.5.5, ADR 72596-delivered-inputs-on-read D2): the queue-note summary (never the body) plus the queue and drain record sequences, the order and re-read dedupe keys, plus the join ids clients adopt already-rendered rows by. */
751
+ export interface DeliveredInput {
752
+ /** The matching drain record's log sequence: the Delivered row's position key. */
753
+ deliveredSequence: number;
754
+ /** The queued record's log sequence: entry order, and half of the sequence-pair join key. */
755
+ sequence: number;
756
+ /** The `SubagentInput` record's command id: the key wire-twin rows join by in either order. Absent when the record carries none. */
757
+ sourceCommandId?: string;
758
+ /** The queue record's run-log id: the record-row join key. Absent when the host's record carries no mirror metadata (a pre-feature host), which falls back to the command id, then the sequence-pair join. */
759
+ sourceRunRecordId?: string;
760
+ /** The subagent the input was delivered to (parent-scope id). */
761
+ subagentId: string;
762
+ /** The stored queue-note summary (never the body). */
763
+ summary: string;
764
+ }
765
+
720
766
  /** `earlierHistory`: the boundary checkpoint's transcript tail, served in place of every item that opened in its pruned prefix (ADR 71910 D1/D3). No log record carries it; the host derives it from the checkpoint. */
721
767
  export interface EarlierHistory {
722
768
  /** The tail entries whose source record is in the pruned prefix, in tail order (at most 50, spec 6127 INV-002). May be empty. */
@@ -822,7 +868,7 @@ export interface ErrorData {
822
868
  }
823
869
 
824
870
  /** A stable `error.data.kind` category: camelCase, the value clients branch on. Open: new kinds are added as their methods land, and a new `kind` is additive only because this domain is declared open. */
825
- export type ErrorKind = "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" | (string & {});
871
+ export type ErrorKind = "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" | (string & {});
826
872
 
827
873
  /** The `error` member of an error response (SS1.2 §2.4). */
828
874
  export interface ErrorObject {
@@ -844,6 +890,12 @@ export interface ErrorResponse {
844
890
  jsonrpc: JsonRpcVersion;
845
891
  }
846
892
 
893
+ /** The live host-declared external wait as served on a `Session` object (`Session.externalWait`): present exactly while a declaration is live for the loaded session, absent otherwise. Absence is never fabricated — an unloaded row carries no member. */
894
+ export interface ExternalWaitView {
895
+ /** The host's label for what the session waits on. Omitted when the host declared without one. */
896
+ reason?: string;
897
+ }
898
+
847
899
  /** `feedback/submit` classification (tdd SS3.25): the four TUI classes in camelCase wire spelling. **Closed**: a client-selected param vocabulary (#22785 E2). */
848
900
  export type FeedbackClassification = "bug" | "badResult" | "goodResult" | "other";
849
901
 
@@ -904,6 +956,8 @@ export interface ForkProvenance {
904
956
  cutCursor: string;
905
957
  /** Whether the fork named an explicit cut point. */
906
958
  cutExplicit: boolean;
959
+ /** `true` when validated full provenance records a conversation rewind, `false` for a proved ordinary fork (ADR 50280 D8). **Additive-optional**: omitted when the serving face holds no full provenance, which means unknown, never a guessed ordinary fork; never `null`. */
960
+ isRewind?: boolean;
907
961
  /** The source session this fork was cut from. */
908
962
  sessionId: string;
909
963
  }
@@ -986,10 +1040,10 @@ export type HeldFor = "approval" | "hook" | (string & {});
986
1040
  /** What history a lifecycle result actually served (tdd SS2.5.2). Open on the client side: report-what-was-served means a client treats an unknown mode as "page it yourself". */
987
1041
  export type HistoryMode = "anchoredSnapshot" | "inline" | "snapshot" | "none" | (string & {});
988
1042
 
989
- /** Why a result served `history.mode: "none"`: the server's typed reason for serving no history. Open on the client side: an absent (older server) or unknown (newer server) value decodes conservatively as an unknown reason, and `viewCursor` text never substitutes for it. */
990
- export type HistoryNoneReason = "excluded" | "cursorSuffix" | "historyBudget" | "projectionUnavailable" | "projectionReadLimit" | (string & {});
1043
+ /** Why a result served `history.mode: "none"` — the server's typed reason for serving no history, with one push-only exception: `projectionRebuildFailed` rides only a `session/viewHealthChanged` notification; no resume or read result carries it (see its variant doc). Open on the client side: an absent (older server) or unknown (newer server) value decodes conservatively as an unknown reason, and `viewCursor` text never substitutes for it. */
1044
+ export type HistoryNoneReason = "excluded" | "cursorSuffix" | "historyBudget" | "projectionUnavailable" | "projectionReadLimit" | "projectionRebuildFailed" | (string & {});
991
1045
 
992
- /** The `history` request preference of `session/resume` (tdd SS2.5.2). The forced values downgrade `anchored` → `inline` → `snapshot` → `none`; under `auto` the full rung order is anchoredSnapshot → inline → snapshot → elided snapshot → none. */
1046
+ /** The `history` request preference of `session/resume` (tdd SS2.5.2). The forced values downgrade `anchored` → `inline` → `snapshot` → `none`; under `auto` the full rung order is anchoredSnapshot → anchored pending cut → inline → snapshot → pending cut → elided snapshot → elided pending cut → none, a pending cut being the snapshot with its `monitorInbox` cut to the entries still awaiting delivery. */
993
1047
  export type HistoryPreference = "auto" | "inline" | "snapshot" | "anchored";
994
1048
 
995
1049
  /** One installed handler (tdd SS3.26.1). */
@@ -1076,6 +1130,8 @@ export interface Item {
1076
1130
  background?: boolean;
1077
1131
  /** `toolCall`: who backgrounded the task; absent on pre-split records — never inferred (tdd SS4.5.5). */
1078
1132
  backgroundInitiator?: BackgroundInitiator;
1133
+ /** `toolCall`: this call's live background-target record (tdd SS4.5.5; ADR 63254-background-target-on-tool-call D1–D2). Set when the foreground tool starts, refreshed by whole-item `item/updated` when the facts change, omitted once the call settles or unregisters — present means a live candidate. Absent (pre-feature hosts, unregistered calls) keeps the client's derived behavior, never an error. Old clients ignore it. */
1134
+ backgroundTarget?: BackgroundTarget;
1079
1135
  /** `backgroundTerminalCompletion`: the five facts the Finished cell renders (ADR 50041 D4). */
1080
1136
  backgroundTerminalCompletion?: BackgroundTerminalCompletion;
1081
1137
  /** `reminderChild`: `true` when this child is a blocking reminder (it holds the turn open until it settles); absent otherwise, never `false` (ADR 41191 D4). The status word stays off the wire; clients name the reminder from `reminderAgentId`. */
@@ -1102,6 +1158,8 @@ export interface Item {
1102
1158
  damagedRange?: DamagedRange;
1103
1159
  /** `workflow`: the run-level declared-phase label — the last `Phase` detail-row label of the reconciled projection; terminal-only, absent while live (tdd SS4.5.8, #45449). */
1104
1160
  declaredPhase?: string;
1161
+ /** `subagentInput` (`delivered`): `true` when the drain landed on its turn before that turn's terminal, which ends the turn's final answer as gate-off's drain record does; absent otherwise (ADR 70249 D4). */
1162
+ deliveredBeforeTurnEnd?: boolean;
1105
1163
  /** `scheduledFire`: the occurrence number within the job's history, present with occurrence metadata (tdd SS4.5.17; ADR 45446 D2). */
1106
1164
  deliveryNumber?: number;
1107
1165
  /** `subagent`: nesting depth. */
@@ -1138,6 +1196,8 @@ export interface Item {
1138
1196
  heldFor?: HeldFor;
1139
1197
  /** `hookRun`: the durable `hook_key` (tdd SS4.5.11). */
1140
1198
  hookKey?: string;
1199
+ /** `subagentInput`: the record the item stands for; see [`SubagentInputPhase`] (#70249). */
1200
+ inputPhase?: SubagentInputPhase;
1141
1201
  /** Bare UUIDv7; the item's identity across its whole lifecycle. Identity rule (tdd SS4.4.1): the task id for task-backed kinds (`toolCall`, `subagent`), the pre-minted commit `message_id` for delta-streamed kinds (`agentMessage`, `reasoning`), `EventId::derive` over the session id and the range's starting sequence number for `damagedRange` (no record carries it, SS4.5.16), the same over the boundary checkpoint's sequence number for `earlierHistory` (SS4.5.22), and the opening durable record's event id for everything else. Opaque to clients. */
1142
1202
  itemId: string;
1143
1203
  /** `scheduledFire`: the cron job id that fired (tdd SS4.5.17; ADR 45446 D2, spec 13929 amendment #62595 FR-62595-1). */
@@ -1148,7 +1208,7 @@ export interface Item {
1148
1208
  label?: string;
1149
1209
  /** `workflow`: the reconciled terminal message, set on completion. */
1150
1210
  message?: string;
1151
- /** `agentMessage`: the phase the model declared on the commit; see [`MessagePhase`]. */
1211
+ /** `agentMessage`: the phase the model declared; see [`MessagePhase`]. */
1152
1212
  messagePhase?: MessagePhase;
1153
1213
  /** `toolCall`: rich content the model saw beyond text; base64 is not inlined on the view (tdd SS4.5.5). */
1154
1214
  modelVisibleContent?: ModelVisibleContent[];
@@ -1158,18 +1218,30 @@ export interface Item {
1158
1218
  monitorId?: string;
1159
1219
  /** `scheduledFire`: the next scheduled epoch in milliseconds; absent on a final delivery (tdd SS4.5.17; ADR 45446 D2). */
1160
1220
  nextFireAtMs?: number;
1221
+ /** `systemNotice`: an optional open machine code for what happened, minted per origin by the slice that adds its producer; omitted for `monitor` and for `hook` (tdd SS4.5.23). */
1222
+ noticeKind?: string;
1223
+ /** `systemNotice`: the producing family, so a client routes a notice without parsing its text (tdd SS4.5.23). Absent means the server named no origin: render generically, never infer one. */
1224
+ noticeOrigin?: NoticeOrigin;
1225
+ /** `systemNotice`: the notice's level — `info` | `warning` | `error`, open (tdd SS4.5.23; ADR 42729 D1). Absent means the server classified no level. */
1226
+ noticeSeverity?: NoticeSeverity;
1227
+ /** `systemNotice`: the durable thing the notice is about — for `hook`, the hook run's item id and its bounded label (tdd SS4.5.23; ADR 75121 D2). */
1228
+ noticeSubject?: NoticeSubject;
1161
1229
  /** `subagent`: objective as spawned, bounded on the wire at the 64 KiB retained-text budget (tdd SS4.5.4, ADR 35691 D9); a cut sets `truncated`. The durable record stays verbatim. */
1162
1230
  objective?: string;
1163
1231
  /** `compaction`: terminal only — folds installed/fallback status. */
1164
1232
  outcome?: CompactionOutcome;
1165
1233
  /** `toolCall`/`userShell`: stored-output reference; fetch the full bytes via `item/readOutput` (served by #208). */
1166
1234
  outputRef?: OutputRef;
1235
+ /** `subagent`: the `subagentId` of the subagent whose own session spawned this child, by `subagent/list`'s `parentSubagentId` rule. **Additive-optional**: absent for a child of the view's own session, or when no open `subagent` item in this view owns the spawning session; never guessed, never derived from `agentPath` (tdd SS4.5.7, #88542). */
1236
+ parentSubagentId?: string;
1167
1237
  /** `toolCall`: stored structured-patch reference (`kind: "tool_patch"`, `mediaType: "application/json"`); the body is fetched via `item/readOutput` with `patchRef.id`, and the ref survives the SS2.5.2 elided-snapshot rung exactly like `outputRef` without ever being an elision trigger (tdd SS2.5.2, SS4.5.5; #33025). */
1168
1238
  patchRef?: OutputRef;
1169
1239
  /** `toolCall`: server-authored edit-family diff summary (#33025) — always beside `patchRef`; absent = no diff available (tdd SS4.5.5). */
1170
1240
  patchSummary?: PatchSummary;
1171
1241
  /** `workflow`: `true` only while a durable pause fact is in force for the run's generation; absent otherwise, never `false` (tdd SS4.5.8, ADR 45437 D2; the fold sets it on pause commit and clears it on resume-commit supersession or the generation's terminal). */
1172
1242
  paused?: boolean;
1243
+ /** `peerMessage`: the four facts the consumed card renders (ADR 72708 D2, tdd SS4.5.24). */
1244
+ peerMessage?: PeerMessage;
1173
1245
  /** `reasoning`: provider reasoning item id (e.g. `rs_...`), for provider-side correlation. */
1174
1246
  providerItemId?: string;
1175
1247
  /** `compaction`: noop/failure reason, verbatim (snake_case durable vocabulary, e.g. `"no_compactable_history"`). `hookRun`: terminal-only capped terminal reason (tdd SS4.5.11). */
@@ -1182,6 +1254,8 @@ export interface Item {
1182
1254
  replayHint?: ReplayHint;
1183
1255
  /** `subagent`: the result envelope from `ResultReady` (tdd SS4.5.7). */
1184
1256
  result?: SubagentResult;
1257
+ /** `subagentResult`: the consumed attempt's outcome; absent if unseen at the drain (#88809). */
1258
+ resultStatus?: SubagentResultStatus;
1185
1259
  /** `workflow`: set on resumed launches. */
1186
1260
  resumeFromRunId?: string;
1187
1261
  /** `userMessage`: `true` after an accepted retract (tdd SS4.5.1); re-emitted via `item/updated`. */
@@ -1228,7 +1302,7 @@ export interface Item {
1228
1302
  summary?: string[];
1229
1303
  /** `reminderChild`: the linked task id. */
1230
1304
  taskId?: string;
1231
- /** Terminal `toolCall`: the item after whose rows the terminal row renders (tdd SS4.5.21, ADR 56496 D2/D3). */
1305
+ /** Terminal `toolCall`, or a `subagent` whose result drained (#70249): the item after whose rows the terminal row renders (tdd SS4.5.21, ADR 56496 D2/D3). */
1232
1306
  terminalRowAfterItemId?: string;
1233
1307
  /** `userMessage`: the prompt text as submitted. `agentMessage`: the accumulated reply, streamed via `item/delta` field `"text"`. `reasoning`: raw committed reasoning text where the provider exposes it (never streamed in v1, tdd SS4.5.4). */
1234
1308
  text?: string;
@@ -1246,9 +1320,9 @@ export interface Item {
1246
1320
  trigger?: CompactionTrigger;
1247
1321
  /** `workflow`: camelCased `WorkflowLaunchTriggerSource`, verbatim (durable runtime vocabulary, e.g. `"modelProposal"`). */
1248
1322
  triggerSource?: string;
1249
- /** `true` when the server's per-surface text budget saturated a streamed surface (`agentMessage.text`, `reasoning.summary[*]`, `toolCall.visibleOutput`, `userShell.visibleOutput`), cut a `subagent` surface (`objective`, `fallbackText`, `result.summary`, `result.text`), or cut a `monitorFeed` surface (`text`, `fallbackText`, `monitorDescription`) (ADR 50058-monitor-feed-wire D3). On a `subagent` item the flag is item-level and never cleared: once any of those four is cut, every later update keeps it, even when `result.text` arrives whole (ADR 35691 D9). The durable full text remains in the log (tdd SS4.5.4). */
1323
+ /** `true` when the server's per-surface text budget saturated a streamed surface (`agentMessage.text`, `reasoning.summary[*]`, `toolCall.visibleOutput`, `userShell.visibleOutput`), cut a `subagent` surface (`objective`, `fallbackText`, `result.summary`, `result.text`), or cut a `monitorFeed` surface (`text`, `fallbackText`, `monitorDescription`) (ADR 50058-monitor-feed-wire D3), or cut a `systemNotice` surface (`text`, `fallbackText`; the committed-surface budget, ADR 42729 D1, tdd SS4.5.23). On a `subagent` item the flag is item-level and never cleared: once any of those four is cut, every later update keeps it, even when `result.text` arrives whole (ADR 35691 D9). The durable full text remains in the log (tdd SS4.5.4). */
1250
1324
  truncated?: boolean;
1251
- /** The owning turn (== the submitting `commandId` for fresh turns, tdd SS3.1.4). `null` for the kinds outside a turn: `userShell` always (tdd SS4.5.6), `hookRun` for session-boundary runs, `monitorFeed` always (ADR 50058-monitor-feed-wire D1), `sideChat` always (SS4.5.13), `damagedRange` always (ADR 60914 D2), `earlierHistory` always (ADR 71910 D3). */
1325
+ /** The owning turn (== the submitting `commandId` for fresh turns, tdd SS3.1.4). `null` for the kinds outside a turn: `userShell` always (tdd SS4.5.6), `hookRun` for session-boundary runs, `monitorFeed` always (ADR 50058-monitor-feed-wire D1), `sideChat` always (SS4.5.13), `damagedRange` always (ADR 60914 D2), `earlierHistory` always (ADR 71910 D3), `systemNotice` when produced outside a turn (tdd SS4.5.23). */
1252
1326
  turnId?: string | null;
1253
1327
  /** `subagent`: **transitive** observed usage — the child and its own descendants; updated in place, absent until first observation; never folded into `session/tokenUsage.cumulative` (tdd SS4.6.5). */
1254
1328
  usage?: TokenUsage;
@@ -1289,7 +1363,7 @@ export interface ItemDeltaParams {
1289
1363
  }
1290
1364
 
1291
1365
  /** The eleven v1 item kinds (tdd SS4.5.2–4.5.13) plus post-v1 kinds (tdd SS4.5.14+). Open: a new kind is additive evolution, and clients MUST render unknown kinds generically (tdd SS4.10). */
1292
- export type ItemKind = "userMessage" | "agentMessage" | "reasoning" | "toolCall" | "userShell" | "subagent" | "workflow" | "reminderChild" | "compaction" | "hookRun" | "sideChat" | "webSearch" | "monitorFeed" | "damagedRange" | "scheduledFire" | "backgroundTerminalCompletion" | "overdueNotice" | "earlierHistory" | (string & {});
1366
+ export type ItemKind = "userMessage" | "agentMessage" | "reasoning" | "toolCall" | "userShell" | "subagent" | "workflow" | "reminderChild" | "compaction" | "hookRun" | "sideChat" | "webSearch" | "monitorFeed" | "damagedRange" | "scheduledFire" | "backgroundTerminalCompletion" | "overdueNotice" | "earlierHistory" | "peerMessage" | "subagentInput" | "subagentResult" | "systemNotice" | (string & {});
1293
1367
 
1294
1368
  /** The `item/readOutput` content encoding (tdd SS4.7.4). Closed: text media is ALWAYS `utf8` and binary media `base64`; a third value would change the client's decode contract. */
1295
1369
  export type ItemReadOutputEncoding = "utf8" | "base64";
@@ -1409,9 +1483,19 @@ export interface MessageAttachment {
1409
1483
  width?: number;
1410
1484
  }
1411
1485
 
1412
- /** `agentMessage.messagePhase` (tdd SS4.5.3, #50254): the phase the model declared on the commit, never inferred from position. Set on the completed item only; absent on `item/started`, which opens before the phase is recorded. Open: a client reads an absent or unknown value on a completed item as `"finalAnswer"` and still decodes the item. Not a turn-done signal; `turn/completed` is. */
1486
+ /** `agentMessage.messagePhase` (tdd SS4.5.3, #50254): the phase the model declared, never inferred from position. Set on every completed item, and on `item/started` when the host knows the phase (#77396): absent or unknown there means not yet known, and the completed value wins. A failed item carries none, and its missing value does not read as `"finalAnswer"`. Open: a client reads an absent or unknown value on a completed item as `"finalAnswer"` and still decodes the item. Not a turn-done signal; `turn/completed` is. */
1413
1487
  export type MessagePhase = "commentary" | "finalAnswer" | (string & {});
1414
1488
 
1489
+ /** `model/cancel` params (tdd SS3.40, FR-90352-4): the `commandId` of the call to cancel, not a retry id of its own. */
1490
+ export interface ModelCancelParams {
1491
+ /** The call to cancel. */
1492
+ commandId: string;
1493
+ }
1494
+
1495
+ /** `model/cancel` result (ADR 90352 D6): always empty, for a call in flight and for an id no call holds alike; `model/completed` reports the outcome. */
1496
+ export interface ModelCancelResult {
1497
+ }
1498
+
1415
1499
  /** One visible catalog row (tdd SS3.10). Catalog rows marked hidden never reach the wire, so a client cannot select one. */
1416
1500
  export interface ModelCatalogEntry {
1417
1501
  /** Context limit; `null` when the catalog source declared nothing. */
@@ -1450,6 +1534,69 @@ export type ModelCatalogSource = "providerCatalog" | "fakeCatalog" | "unresolved
1450
1534
  /** What drove a model selection (tdd SS4.6.1). Open. */
1451
1535
  export type ModelChangeSource = "user" | "default" | "policy" | (string & {});
1452
1536
 
1537
+ /** One `model/complete` message (tdd SS3.40). */
1538
+ export interface ModelCompleteMessage {
1539
+ /** Who said it. */
1540
+ role: ModelCompleteRole;
1541
+ /** What was said. */
1542
+ text: string;
1543
+ }
1544
+
1545
+ /** How a `model/complete` call settled. **Open**: a server-produced result vocabulary, so a word a newer host adds decodes to `Unknown` (tdd SS1.9). */
1546
+ export type ModelCompleteOutcome = "completed" | "failed" | "cancelled" | "timedOut" | (string & {});
1547
+
1548
+ /** `model/complete` params (tdd SS3.40, FR-90352-1): the retry id, 1 to 32 messages (the first and the last `user`), an optional system text and the output bound. No session and no model: the host picks the model (ADR 90352 D3). The host answers an unknown field with `invalidParams`; the type itself accepts it. */
1549
+ export interface ModelCompleteParams {
1550
+ /** The client-minted UUIDv7 retry id (required, SS3.1.1). */
1551
+ commandId: string;
1552
+ /** The most tokens the model may write. Range 1–1024 inclusive. */
1553
+ maxTokens: number;
1554
+ /** What the model answers, oldest first. At most 32 items. */
1555
+ messages: ModelCompleteMessage[];
1556
+ /** The system text, when the caller sends one. */
1557
+ system?: string;
1558
+ }
1559
+
1560
+ /** `model/complete` result (tdd SS3.40): admission only — the ack is never the completion. */
1561
+ export interface ModelCompleteResult {
1562
+ /** The request's id, echoed. */
1563
+ commandId: string;
1564
+ /** Always `accepted` on this path. */
1565
+ status: CommandStatus;
1566
+ }
1567
+
1568
+ /** Who said one `model/complete` message. **Closed**: a client-produced input the host validates, so an unknown role is `invalidParams`. */
1569
+ export type ModelCompleteRole = "user" | "assistant";
1570
+
1571
+ /** Why the model stopped on a `completed` call (FR-90352-2). **Open**: a server-produced word, so a word a newer host adds decodes to `Unknown` (tdd SS1.9). */
1572
+ export type ModelCompleteStopReason = "end" | "maxTokens" | (string & {});
1573
+
1574
+ /** The provider's token counts for one completed call (ADR 90352 D5): real counts only, never an estimate. */
1575
+ export interface ModelCompleteUsage {
1576
+ /** Input tokens, as the provider counted them. */
1577
+ inputTokens: number;
1578
+ /** Output tokens, as the provider counted them. */
1579
+ outputTokens: number;
1580
+ }
1581
+
1582
+ /** `model/completed` params (tdd SS3.40, FR-90352-2). `text`, `stopReason`, `modelId` and `usage` ride `completed` (`usage` only when the provider reported counts); `message` rides `failed`; `cancelled` and `timedOut` carry neither. The struct marks the conditional members optional; the SS prose pins the per-outcome rule. `text` is untrusted model output. */
1583
+ export interface ModelCompletedParams {
1584
+ /** The request's id — the correlation key. */
1585
+ commandId: string;
1586
+ /** Why the call failed, in words (on `failed`). */
1587
+ message?: string;
1588
+ /** The `model/list` id of the model that ran (on `completed`). */
1589
+ modelId?: string;
1590
+ /** How the call settled. */
1591
+ outcome: ModelCompleteOutcome;
1592
+ /** Why the model stopped (on `completed`). */
1593
+ stopReason?: ModelCompleteStopReason;
1594
+ /** The model's answer, verbatim (on `completed`). */
1595
+ text?: string;
1596
+ /** The provider's counts (on `completed`, when it reported them). */
1597
+ usage?: ModelCompleteUsage;
1598
+ }
1599
+
1453
1600
  /** Per-1M-token catalog cost, carried **verbatim** for display and never rounded or re-formatted by the host (tdd SS3.10). Cost arithmetic stays client-local view math. */
1454
1601
  export interface ModelCost {
1455
1602
  /** Cached-input cost, a decimal string. */
@@ -1581,6 +1728,48 @@ export interface MonitorInboxItemVoidedParams {
1581
1728
  voidedAt: string;
1582
1729
  }
1583
1730
 
1731
+ /** One snapshot `monitorInbox` entry (tdd SS4.9.1, FR-56492-7 as amended by #76729): a retained admission in the `monitor/inboxItemAdmitted` shape, envelope-stripped, plus the newest drain and void stamps folded for it. The entry is still awaiting delivery when `drainedAt` is absent, or when `voidedAt` is strictly newer than it (FR-56492-3). */
1732
+ export interface MonitorInboxSnapshotEntry {
1733
+ /** The model-facing delivery text. */
1734
+ body: string;
1735
+ /** The producer-recorded pre-augmentation content; absent on pre-#24686 records. */
1736
+ displayBody?: string;
1737
+ /** The newest drain stamp (RFC3339); absent while never drained. */
1738
+ drainedAt?: string;
1739
+ /** Per-task event order key (with `line_index`). */
1740
+ eventIndex: number;
1741
+ /** Monitor event kind, snake_case, open vocabulary. */
1742
+ eventKind: string;
1743
+ /** The inbox item id (dedupe key). */
1744
+ itemId: string;
1745
+ /** Line order key; absent when the event has no line. */
1746
+ lineIndex?: number;
1747
+ /** Admission stamp (RFC3339). */
1748
+ queuedAt: string;
1749
+ /** Whether the event carries displayable lines. */
1750
+ showLines: boolean;
1751
+ /** The notice-text summary. */
1752
+ summary: string;
1753
+ /** The owning monitor task id (per-task set key). */
1754
+ taskId: string;
1755
+ /** The newest wake-missed void stamp (RFC3339); absent while never voided. */
1756
+ voidedAt?: string;
1757
+ }
1758
+
1759
+ /** `systemNotice`: the producing family, so a client routes a notice without parsing its text (tdd SS4.5.23). Open. The v1 vocabulary is the Monitor notice and the three system-chrome producers (ADR 42729 D1) plus the hook-run producer (ADR 75121 D2) and the paused-Workflow checkpoint producer (ADR 39490 D5); absent means the server named no origin, and a client never infers one. */
1760
+ export type NoticeOrigin = "monitor" | "skillsStartup" | "scheduledFire" | "incompleteGeneration" | "hook" | "workflowCheckpoint" | (string & {});
1761
+
1762
+ /** `systemNotice`: the notice's level (tdd SS4.5.23). Open; an unknown value is an unknown-but-present level, rendered generically (SS4.10). */
1763
+ export type NoticeSeverity = "info" | "warning" | "error" | (string & {});
1764
+
1765
+ /** `systemNotice`: the durable thing the notice is about (tdd SS4.5.23). `id` is required whenever the object is present; `label` is the producer's sanitized, already-capped display value, omitted when it is empty, never `""`. */
1766
+ export interface NoticeSubject {
1767
+ /** The subject's durable identity: for `monitor`, the monitor's task id (its `toolCall` `itemId`); for `hook`, the hook run's item id (the opening `HookRunStarted` record's event id, SS4.5.11). */
1768
+ id: string;
1769
+ /** The subject's bounded display label (the `hookRun.label` shape). */
1770
+ label?: string;
1771
+ }
1772
+
1584
1773
  /** A notification frame, either direction (SS1.2 §2.2). No `id`; a notification is never answered. */
1585
1774
  export interface Notification {
1586
1775
  /** Emission time in Unix milliseconds, recorded once at emission; server→client notifications only (SS1.2.5). Optional on the wire so decoders tolerate older servers. */
@@ -1626,6 +1815,18 @@ export interface PatchSummary {
1626
1815
  removed: number;
1627
1816
  }
1628
1817
 
1818
+ /** `peerMessage`: the four facts the consumed card renders (ADR 72708 D2, tdd SS4.5.24). The fold reads them from the drained inbox record's delivery snapshot; `senderLabel` already ran the gate-off label rule host-side, so the client renders it verbatim. Stable from day one (the `scheduledFire` precedent): no `x-msp-stability` marker. */
1819
+ export interface PeerMessage {
1820
+ /** The message text verbatim — never cut (an over-budget event answers the typed `pageEventTooLarge` arm). */
1821
+ body: string;
1822
+ /** True for mailbox/remote senders, false for local session senders. */
1823
+ remote: boolean;
1824
+ /** The peer label gate-off shows: the sender name when the durable record names one, else the sender id shortened as gate-off shortens it, else `unknown session` — and `remote session` verbatim for a remote sender. */
1825
+ senderLabel: string;
1826
+ /** The local sender's session id; absent for remote senders and when the record names none. */
1827
+ senderSessionId?: string;
1828
+ }
1829
+
1629
1830
  /** A pending approval in the snapshot: the SS2.5.2 pointer shape plus the gated `itemId` when one exists (tdd SS4.9.1). */
1630
1831
  export interface PendingApprovalPointer {
1631
1832
  /** The pending approval's id. */
@@ -1854,6 +2055,19 @@ export interface PluginMarketplaceUpdateParams {
1854
2055
  /** A plugin row's source provenance (tdd SS3.26.2, ADR 33398 D7 item 3): camelCase of `PluginSourceProvenance`. Open (server-produced result vocabulary, the #22785 enum-openness rule): a future provenance is additive. */
1855
2056
  export type PluginSource = "curated" | "marketplaceUserAdded" | "foreignImport" | "nativeLocal" | (string & {});
1856
2057
 
2058
+ /** Why a workspace status probe produced no fresh reading (#35065 item 2). **Open**: a new reason is additive evolution, and a client MUST render an unknown value as an unknown-but-present reason rather than rejecting the row. */
2059
+ export type ProbeDegradedReason = "skippedUntrusted" | "skippedSandboxUnavailable" | "probeFailed" | (string & {});
2060
+
2061
+ /** One child session pruned below a checkpoint boundary (tdd SS2.5.5, ADR 71910 D8): the restored row's key, text, and stoppability — never pruned transcript. */
2062
+ export interface PrunedSubagent {
2063
+ /** The served display label (the spawn's role, agent path as fallback); absent when the spawn records carry neither. */
2064
+ label?: string;
2065
+ /** The child session id — the trace key for `session/read` on the child, exactly as for a live child row. */
2066
+ sessionId: string;
2067
+ /** `running`, `completed`, or `failed`; absent reads as `running`. */
2068
+ status?: string;
2069
+ }
2070
+
1857
2071
  /** One input still queued for delivery to a session (tdd SS2.5.5, ADR 63254-queued-inputs-on-read D2): the full message body plus its log record sequence, the delivery-order and re-read dedupe key, plus the run-log record id clients join served entries against record-seeded rows by. */
1858
2072
  export interface QueuedInput {
1859
2073
  /** The queued record's log sequence: delivery order, and the key clients deduplicate re-reads by. */
@@ -2002,12 +2216,16 @@ export interface RequestReceipt {
2002
2216
  /** A `turn/retracted` settlement outcome (tdd SS4.5.1, ADR 50074 D1). Open enum (D-033): decode is tolerant — a value outside the list reads as `Accepted` (the event's historical meaning — pre-feature hosts emit it only for accepted retracts), never fails. The bundle keeps enumerating the known values for codegen and docs. */
2003
2217
  export type RetractOutcome = "accepted" | "declined" | (string & {});
2004
2218
 
2005
- /** The runtime-owned git worktree a child session runs in, mirrored from the `subagent.worktree.*` records on its parent's log (tdd SS2.5.5, ADR 50042-child-worktree-on-read D2). The three enums are open: clients treat an unknown value as unknown. */
2219
+ /** The runtime-owned git worktree a child session runs in, mirrored from the `subagent.worktree.*` records on its parent's log (tdd SS2.5.5, ADR 50042-child-worktree-on-read D2). The four enums are open: clients treat an unknown value as unknown. */
2006
2220
  export interface RuntimeWorktree {
2007
2221
  /** The commit the worktree was created from. */
2008
2222
  baseCommit: string;
2223
+ /** The cleanup outcome's recorded diagnostic, verbatim (#70088); absent when the outcome records none. */
2224
+ cleanupDiagnostic?: string;
2009
2225
  /** How the worktree is cleaned up. */
2010
2226
  cleanupPolicy: RuntimeWorktreeCleanupPolicy;
2227
+ /** Why cleanup kept the worktree or failed, as the cleanup outcome recorded it (#70088); absent when the outcome records no reason. */
2228
+ cleanupReason?: RuntimeWorktreeCleanupReason;
2011
2229
  /** Where the worktree's cleanup stands. */
2012
2230
  cleanupState: RuntimeWorktreeCleanupState;
2013
2231
  /** The head commit the active lease recorded. */
@@ -2023,6 +2241,9 @@ export interface RuntimeWorktree {
2023
2241
  /** How a session's worktree is cleaned up. The set is open, so newer hosts may send other values. */
2024
2242
  export type RuntimeWorktreeCleanupPolicy = "removeIfClean" | (string & {});
2025
2243
 
2244
+ /** Why a session's worktree cleanup kept the worktree or failed. The set is open, so newer hosts may send other values. */
2245
+ export type RuntimeWorktreeCleanupReason = "dirtyWorktree" | "headChanged" | "pathEscape" | "cleanupFailed" | "uncertainLeaseState" | (string & {});
2246
+
2026
2247
  /** Where a session's worktree cleanup stands. The set is open, so newer hosts may send other values. */
2027
2248
  export type RuntimeWorktreeCleanupState = "active" | "cleaned" | "retained" | "cleanupFailed" | (string & {});
2028
2249
 
@@ -2067,6 +2288,8 @@ export interface Session {
2067
2288
  createdByClient?: ClientInfo;
2068
2289
  /** The handshake `ClientInfo` of the connection that currently holds this session's drive grant (spec 39851 INV-001; spec 42713 FR-58706-1, ADR 58706 D2), served on `session/read` only, as `name` and `version` (the handshake's display `title` is never served, the `createdByClient` rule). **Additive-optional, loaded-only, live**: present exactly when a live connection holds the grant and its handshake is known; absent on `notLoaded` rows, once the holder's connection drops (its orphaned turn included), and for a holder with no handshake stamp. Provenance only (INV-005): whether a client may drive is answered by `session/resume` / `turn/start` (`sessionInUse`), never by this member (FR-58706-4). */
2069
2290
  driveHolder?: ClientInfo;
2291
+ /** The live host-declared external wait for this session, served on `session/read` only. **Additive-optional, loaded-only, live**: present exactly while a declaration is live for the loaded session; absent on `notLoaded` rows, once the declaration is cleared, once the next user input clears it, and after a restart or resume, which lose it. Presence is the declaration — a client must never infer one from any other member. */
2292
+ externalWait?: ExternalWaitView;
2070
2293
  /** Derived first-user-prompt preview (tdd SS2.14.1, #27598). **Additive-optional**, omitted when underivable. */
2071
2294
  firstUserPrompt?: string;
2072
2295
  /** `null` for root sessions; fork provenance otherwise (tdd SS2.4). */
@@ -2087,10 +2310,12 @@ export interface Session {
2087
2310
  name?: string;
2088
2311
  /** How the served `name` was set (tdd SS2.4/SS2.14.1, #50048; ADR 50048 D1/D2). **Additive-optional**, **fold-only**: the snapshot fold (`session/read`, the resume/start/fork-ack snapshot) derives and carries it from the log; `session/list` rows never carry it. Absent — and any value the client does not recognize — reads as unknown, never fabricated. */
2089
2312
  nameOrigin?: SessionNameOrigin;
2090
- /** The containing session's id when `kind` is `"subagent"` (FR-002, INV-002) — the id of the TOP-LEVEL session whose home holds this child, which is **not necessarily the session that spawned it**: native-child homes are physical siblings under the outer session's `subagent/` directory, so a subagent spawned by another subagent resolves to the outer session, not to its spawner. A client building a tree from this field gets one level, not a chain. Flat rather than nested: there is exactly one fact to carry, unlike `forkedFrom`'s four-field `ForkProvenance`. **Additive-optional**; a root carries none. */
2313
+ /** The containing session's id when `kind` is `"subagent"` (FR-002, INV-002) — the id of the TOP-LEVEL session whose home holds this child, which is **not necessarily the session that spawned it**: native-child homes are physical siblings under the outer session's `subagent/` directory, so a subagent spawned by another subagent resolves to the outer session, not to its spawner. A client building a tree from this field gets one level, not a chain. Flat rather than nested: there is exactly one fact to carry, unlike `forkedFrom`'s structured `ForkProvenance`. **Additive-optional**; a root carries none. */
2091
2314
  parentSessionId?: string;
2092
2315
  /** Absolute path of the session's durable log; non-nullable. Under the ephemeral session profile it is the **empty string**, meaning "no durable log exists" (tdd SS2.13.2) — the one value a client must not hand to a filesystem call. */
2093
2316
  path: string;
2317
+ /** Why the workspace status probe produced no fresh reading (#35065 item 2) — the index's last derived value, like `branch`, so the TUI can show WHY status is unavailable instead of a generic unavailable. **Additive-optional**, omitted when the latest probed observation carries no reason or none exists. **Open enum**: a client treats an unknown-but-present reason and renders it, never rejecting the row. */
2318
+ probeDegradedReason?: ProbeDegradedReason;
2094
2319
  /** The winning metadata fold's provider; `null` when that record omits it. */
2095
2320
  providerId: string | null;
2096
2321
  /** The handshake `ClientInfo` of the connection whose wire `session/resume` most recently loaded this session (spec 42713 FR-58706-2, ADR 58706 D2): stamped on the durable `session.resumed` marker, folded into the session index, and served from that column by every carrier; while the session is loaded, the stamp the loading resume wrote replaces the column on every carrier (the ack, `session/read`, `session/list`, `session/listChanged`), and after the next fold the column serves it. **Additive-optional** and **provenance only** (INV-005); a resume with no admitting handshake (TUI, exec) stamps nothing, a warm attach to an already-loaded session writes no marker, and a half stamp serves nothing (FR-003a), so absence asserts nothing. `createdByClient` never follows a resume (FR-58706-3). */
@@ -2099,7 +2324,7 @@ export interface Session {
2099
2324
  sessionId: string;
2100
2325
  /** `null` for root sessions and forks; side provenance otherwise (tdd SS2.4/SS2.5.7; ADR 45435 D2). A session carries at most one of `forkedFrom` and `sideFrom`. */
2101
2326
  sideFrom?: SideProvenance | null;
2102
- /** The session that opened this one (spec 42713 FR-69621-6, ADR 69621 D4), recorded once in this session's creation record and served from the session index. Its `parentSessionId` is the exact spawner, unlike the containing session `parentSessionId` names above; `project` and `thread` are opaque labels the spawner may name beside it. **Additive-optional** and **provenance only** (INV-005): never a visibility or authority gate. Absence asserts nothing — no recorded spawner, a later session of the spawned process, a row folded before the member existed, or a session the index has not folded yet. */
2327
+ /** The session that opened this one (spec 42713 FR-69621-6, ADR 69621 D4), recorded once in this session's creation record and served from the session index. Unlike the containing session `parentSessionId` names above, its `parentSessionId` is the exact spawner, except that any `muse` started in a later pane of the worker's tmux session or Herdr workspace names the worker's manager and carries the worker's `project`/`thread` labels (ADR 69621 D8); `project` and `thread` are opaque labels the spawner may name beside it. **Additive-optional** and **provenance only** (INV-005): never a visibility or authority gate. Absence asserts nothing — no recorded spawner, a later session of the spawned process, a row folded before the member existed, or a session the index has not folded yet. */
2103
2328
  spawnedBy?: SessionSpawnedBy;
2104
2329
  /** Load state as this host knows it; `session/list` reports `notLoaded` for sessions loaded by *other* hosts (tdd SS2.4). */
2105
2330
  status: SessionStatus;
@@ -2147,6 +2372,18 @@ export interface SessionBranchChangedParams {
2147
2372
  workspaceRoot: string;
2148
2373
  }
2149
2374
 
2375
+ /** `session/clearExternalWait` params. */
2376
+ export interface SessionClearExternalWaitParams {
2377
+ /** The loaded session the declaration is cleared for. */
2378
+ sessionId: string;
2379
+ }
2380
+
2381
+ /** `session/clearExternalWait` result: no declaration is live. */
2382
+ export interface SessionClearExternalWaitResult {
2383
+ /** Always `false` on a successful clear: no declaration is live. */
2384
+ declared: boolean;
2385
+ }
2386
+
2150
2387
  /** `session/closed` params (tdd SS2.6.2; enrolled by #33065): a loaded session was unloaded from this host, broadcast to every initialized connection. After it, the session is `notLoaded`; the log remains on disk and `session/resume` reloads it. A crash emits nothing — only the orderly unload paths do (idle unload, host shutdown and a released `session/leave`), and each writes the durable `SessionEnd` record first. */
2151
2388
  export interface SessionClosedParams {
2152
2389
  /** Which orderly unload path fired. */
@@ -2202,6 +2439,22 @@ export interface SessionContextUsageParams {
2202
2439
  windowTokens?: number;
2203
2440
  }
2204
2441
 
2442
+ /** `session/declareExternalWait` params. */
2443
+ export interface SessionDeclareExternalWaitParams {
2444
+ /** The host's label for what the session waits on, shown in the session view while the declaration is live. Omitted when the host has no label to show. */
2445
+ reason?: string;
2446
+ /** The loaded session the declaration is for. */
2447
+ sessionId: string;
2448
+ }
2449
+
2450
+ /** `session/declareExternalWait` result: the declaration is live. */
2451
+ export interface SessionDeclareExternalWaitResult {
2452
+ /** Always `true` on a successful declare: a declaration is live. */
2453
+ declared: boolean;
2454
+ /** The live declaration's reason, as declared (truncated by the host runtime). Omitted when the host declared without one. */
2455
+ reason?: string;
2456
+ }
2457
+
2205
2458
  /** Whether this host writes its sessions to disk (SS1.4.1, SS2.13). A property of the host process, fixed at construction and identical for every session and every connection it serves — never requested, granted, or negotiated, which is why it is not a capability. Open: the unrepresented degraded state (#14401) has candidate resolutions that add a third value here, so closed would make that a breaking change. */
2206
2459
  export type SessionDurability = "durable" | "ephemeral" | (string & {});
2207
2460
 
@@ -2332,7 +2585,7 @@ export interface SessionListParams {
2332
2585
  workspaceRoot?: string;
2333
2586
  }
2334
2587
 
2335
- /** `session/list` result (tdd SS2.5.4). Ordering is `updatedAt` descending. */
2588
+ /** `session/list` result (tdd SS2.5.4). The default order is content activity: `lastActivityAt` descending, then `sessionId` ascending. The order is the session index's key, so a row's displayed timestamps do not always show its position: a row the index has not yet derived keeps its `updatedAt` position, a derived row with no content orders by `createdAt`, and a loaded row can show newer values. Do not re-sort or validate a page from them. `updatedAfter` still filters on `updatedAt`. */
2336
2589
  export interface SessionListResult {
2337
2590
  /** The canonical filter the server applied, present exactly when the request carried `filter` (#42035, spec 207 FR-42035-1). The probe is per-predicate PRESENCE (ADR 42035 D6): a client that requires filtering checks that every predicate it sent comes back as a member here, and treats a missing member as unsupported. Value equality is the wrong test — canonicalization trims, lowercases, NFC-normalizes, dedupes and sorts, so the echoed values often differ from the sent ones on a correctly filtered page. */
2338
2591
  appliedFilter?: SessionListFilter;
@@ -2435,12 +2688,16 @@ export interface SessionReadParams {
2435
2688
  export interface SessionReadResult {
2436
2689
  /** Same member as `session/resume` (tdd SS2.5.5, ADR 50074 D2). */
2437
2690
  blockedPrompt?: BlockedPrompt;
2691
+ /** The inputs the read session's log delivered to its subagents (tdd SS2.5.5, ADR 72596-delivered-inputs-on-read D2). Absent-when-empty: a missing member means nothing delivered, never an error. */
2692
+ deliveredInputs?: DeliveredInput[];
2438
2693
  /** The served history. */
2439
2694
  history: SessionHistory;
2440
2695
  /** Same member as `session/resume` (tdd SS2.5.5, ADR 36635 D2). */
2441
2696
  lastTurn?: LastTurn;
2442
2697
  /** The same pointer shape as `session/resume`. Because `session/read` never subscribes this is a point-in-time log read only: no requests are re-issued after it (tdd SS2.5.5). */
2443
2698
  pendingRequests: PendingRequestPointer[];
2699
+ /** One short record per child session the checkpoint boundary pruned (tdd SS2.5.5, ADR 71910 D8). Absent-when-empty: a missing member means the view is uncompacted or nothing pruned, never an error. */
2700
+ prunedSubagents?: PrunedSubagent[];
2444
2701
  /** The inputs still queued for delivery to the read session (tdd SS2.5.5, ADR 63254-queued-inputs-on-read D2). Absent-when-empty: a missing member means nothing queued, never an error. */
2445
2702
  queuedInputs?: QueuedInput[];
2446
2703
  /** Current local construction only; never inferred from retained history. Absence establishes neither a choice nor supported recovery. */
@@ -2499,7 +2756,7 @@ export interface SessionResumeParams {
2499
2756
  excludeItems?: boolean;
2500
2757
  /** History mode preference, default `auto`. A PREFERENCE, not a budget override: when the requested mode does not fit the history budget the server downgrades it and `history.mode` reports what was actually served (tdd SS2.5.2). Ignored when `cursor` or `excludeItems` makes it moot. */
2501
2758
  history?: HistoryPreference;
2502
- /** The explicit MSP model override (T-51858-304; INV-51858-11 rank 1): a model string the caller supplies at resume time. When present it wins over the retained binding's recorded origin — over a stamped label and over a stamped pin — and it recovers an otherwise-unresolved label binding by sending the override as the wire model instead of the unresolved refusal. Omitted preserves arm (2): the retained binding resolves by recorded origin exactly as without this member. Explicit `null` is invalid params (the same closed null-tolerant set as at start). The override changes the model within the retained provider; it never names a provider, and it never touches the retained profile. */
2759
+ /** The explicit MSP model override (T-51858-304; INV-51858-11 rank 1): a model string the caller supplies at resume time. When present it wins over the retained binding's recorded origin — over a stamped label and over a stamped pin — and it recovers an otherwise-unresolved label binding by sending the override as the wire model instead of the unresolved refusal. Omitted preserves arm (2): the retained binding resolves by recorded origin exactly as without this member. Explicit `null` is invalid params (the same closed null-tolerant set as at start). The override changes the model within the retained provider; it never names a provider. A resume that loads the session records it as a resume `--model` records (ADR 24046 D7): nothing when it already is the session's model, else one durable selection with the provider's profile for that model. A resume that attaches to a loaded session switches the model live. A model the host refuses, a blank one included, leaves the session on its recorded model, which `session.modelId` reports; a connection that opted into `experimentalApi` also gets the reason in `modelIdRefusal`. */
2503
2760
  modelId?: string;
2504
2761
  /** The launch permission-profile pick (amendment 42624 FR-42624-1, #50054): a profile id the host catalog already admits. Select, never create. Omitted restores retained authority only, with no override. The host restores first, then applies the pick in the same pre-marker step; over a declared lost record the restore is the never-wider reset, committed before the pick, and where the reset cannot commit the pick is committed alone as that reset (spec 11237 FR-57059-4). A pick that fails admission refuses the resume `commandRejected` (-32030; `permission_profile_unknown` / `permission_profile_unavailable`) before any durable byte. Explicit `null` is invalid params (the same closed null-tolerant set as at start). */
2505
2762
  permissionProfile?: string;
@@ -2519,6 +2776,8 @@ export interface SessionResumeResult {
2519
2776
  lastTurn?: LastTurn;
2520
2777
  /** The late-joiner pointer set; empty when nothing is pending. */
2521
2778
  pendingRequests: PendingRequestPointer[];
2779
+ /** One short record per child session the checkpoint boundary pruned (tdd SS2.5.2, ADR 71910 D8). **Additive-optional**, like `queuedInputs` on the read: absent-when-empty, never stripped. */
2780
+ prunedSubagents?: PrunedSubagent[];
2522
2781
  /** The loaded session. */
2523
2782
  session: Session;
2524
2783
  /** The session view head; the connection is subscribed after it. A still-loaded session a prior `view/unsubscribe` detached is RE-ATTACHED by this resume (spec 208 FR-002a, #28920): live delivery resumes from this head. Explicit-cursor re-attach with `(after, head]` engine replay stays `view/subscribe` (SS4.7.1). */
@@ -2605,7 +2864,7 @@ export interface SessionSideChatResult {
2605
2864
 
2606
2865
  /** Who opened a session (`Session.spawnedBy`, spec 42713 FR-69621-6, ADR 69621 D4). */
2607
2866
  export interface SessionSpawnedBy {
2608
- /** The exact session that opened this one (ADR 69621 D2). */
2867
+ /** The exact session that opened this one (ADR 69621 D2), except that any `muse` started in a later pane of the worker's tmux session or Herdr workspace names the worker's manager and carries the worker's `project`/`thread` labels (ADR 69621 D8). */
2609
2868
  parentSessionId: string;
2610
2869
  /** An opaque project label the spawner named, when it named one. */
2611
2870
  project?: string;
@@ -2730,14 +2989,14 @@ export interface SessionUserShellResult {
2730
2989
  status: CommandStatus;
2731
2990
  }
2732
2991
 
2733
- /** The view-health state (tdd SS2.5.2 companion). Open enum (`x-msp-openness: open`): a client MUST ignore an unrecognized value. v1 emits only `Unavailable`; openness itself reserves additive room for a future re-arm (ADR 32557 D1 names it `healthy`) and for the #14401 durable-degraded axis, so no never-emitted token is baked onto the stable surface now. */
2734
- export type SessionViewHealth = "unavailable" | (string & {});
2992
+ /** The view-health state (tdd SS2.5.2 companion). Open enum (`x-msp-openness: open`): a client MUST ignore an unrecognized value. `Healthy` is the re-arm value reserved by ADR 32557 D1, emitted after a host re-load (ADR 32557 D5, #60870); openness still reserves additive room for the #14401 durable-degraded axis. */
2993
+ export type SessionViewHealth = "unavailable" | "healthy" | (string & {});
2735
2994
 
2736
- /** `session/viewHealthChanged` params (ADR 32557; #32557): the named session's live view stream became unavailable, and why. Best-effort: ordered after already-queued view frames and may be dropped (for example when the connection is closing), so a client MUST NOT assume a guaranteed push and still reads `history.noneReason` on its next resume/read (FM-005). */
2995
+ /** `session/viewHealthChanged` params (ADR 32557; #32557): the named session's live view stream became unavailable, and why, or (ADR 32557 D5) it is back after the host re-loaded the view, so the client re-reads and re-subscribes. Best-effort: ordered after already-queued view frames and may be dropped (for example when the connection is closing), so a client MUST NOT assume a guaranteed push and still reads `history.noneReason` on its next resume/read (FM-005). */
2737
2996
  export interface SessionViewHealthChangedParams {
2738
- /** The new view-health state. In v1 the host emits only `Unavailable`. */
2997
+ /** The new view-health state: `Unavailable`, or `Healthy` once the host re-loaded a failed view (#60870). */
2739
2998
  health: SessionViewHealth;
2740
- /** Why the view is unavailable — the SAME typed `HistoryNoneReason` vocabulary the pull path stamps on `history.noneReason` (tdd SS2.5.2, D-050), so a client reuses one handler for push and pull. `projectionUnavailable` in v1; present only when `health` is `Unavailable`. Open on the client side: an unknown reason decodes conservatively and renders generically. */
2999
+ /** Why the view is unavailable — the SAME typed `HistoryNoneReason` vocabulary the pull path stamps on `history.noneReason` (tdd SS2.5.2, D-050), so a client reuses one handler for push and pull. `projectionUnavailable` when the view fails, then `projectionRebuildFailed`, which the pull path never stamps: it rides only a `session/viewHealthChanged` notification, after the host's one re-load of a failed live view fails or right after a fork child's live fail-close; present only when `health` is `Unavailable`. Open on the client side: an unknown reason decodes conservatively and renders generically. */
2741
3000
  noneReason?: HistoryNoneReason;
2742
3001
  /** The session whose live view health changed. */
2743
3002
  sessionId: string;
@@ -2922,6 +3181,8 @@ export interface SnapshotState {
2922
3181
  goal: Goal | null;
2923
3182
  /** Every item, in first-opened order, each at its latest revision at the snapshot cursor. One schema per kind, shared with the notification item object — which is what makes snapshot+suffix a pure splice (tdd SS4.9.1). */
2924
3183
  items: Item[];
3184
+ /** The retained Monitor admissions at this cursor (tdd SS4.9.1, FR-56492-7 as amended by #76729): every admission still awaiting delivery, plus per task the newest 200 non-blank stdout lines and the newest other admission, delivered or not, each with its drain and void stamps; a pending cut of the history ladder (tdd SS2.5.2, ADR 56492 D4) carries only the entries still awaiting delivery. A current host always sends it (empty when no monitor admitted anything); absent means an older host. */
3185
+ monitorInbox?: MonitorInboxSnapshotEntry[];
2925
3186
  /** The settled canonical session name; `null` when the session was never named (#27598, tdd SS4.9.1 / SS2.14). Folds the same durable `session/nameChanged` record `Session.name` reports. */
2926
3187
  name?: string | null;
2927
3188
  /** The pending-approval half of the pending set. */
@@ -3038,6 +3299,21 @@ export interface SubagentInputParams {
3038
3299
  subagentId: string;
3039
3300
  }
3040
3301
 
3302
+ /** `subagentInput.inputPhase` (#70249): the record the item stands for. Open: a client ignores an item whose phase it does not know. */
3303
+ export type SubagentInputPhase = "queued" | "delivered" | (string & {});
3304
+
3305
+ /** `subagent/list` params: the session whose subagent roster to read. A read-only query in the `skill/list` mold: no `commandId`, no durable record, no view event. Served by the loaded parent's runtime control records, so its refusals (`-32020`/`-32021`/`-32022`/`-32024`, plus a retryable `-32603` when the runtime source declines) are the `task/list` split. */
3306
+ export interface SubagentListParams {
3307
+ /** The target session (the parent whose children to list). */
3308
+ sessionId: string;
3309
+ }
3310
+
3311
+ /** `subagent/list` result: the session's roster rows. Empty only when the parent's control records name no durable child; a declined source refuses typed instead of answering empty. */
3312
+ export interface SubagentListResult {
3313
+ /** The session's roster rows, ordered by `(agentPath, subagentId)`. */
3314
+ subagents: SubagentRosterEntry[];
3315
+ }
3316
+
3041
3317
  /** Params for `subagent/interrupt`, `subagent/stop`, and `subagent/close` (SS3.16): a child target plus an optional human-readable reason that is preserved on the durable effect record. */
3042
3318
  export interface SubagentOwnerReasonParams {
3043
3319
  /** Client-minted UUIDv7 command id (SS3.1.1). */
@@ -3054,7 +3330,7 @@ export interface SubagentOwnerReasonParams {
3054
3330
  export interface SubagentResult {
3055
3331
  /** Artifact references, verbatim. */
3056
3332
  artifactRefs: string[];
3057
- /** `true` once the parent consumed the result (the inbox join fact the gate-off drain arm folds into the `Finished` marker — tdd SS4.5.7). Absent otherwise; never cleared once set. Clients mint the `Finished` marker off this flag instead of re-deriving the join. */
3333
+ /** `true` once the parent consumed the result (the inbox join fact the gate-off drain arm folds into the `Finished` marker — tdd SS4.5.7). Absent otherwise; never cleared once set. Clients mint the `Finished` marker off this flag instead of re-deriving the join; a client that knows `subagentResult` (tdd SS4.5.26) draws one `Finished` member per consumed result instead, and keeps drawing from this flag for a child with no such item, as on a host before the kind (#88809). */
3058
3334
  drained?: boolean;
3059
3335
  /** Error kind, verbatim durable vocabulary, when the child failed. */
3060
3336
  errorKind?: string;
@@ -3068,6 +3344,43 @@ export interface SubagentResult {
3068
3344
  text?: string;
3069
3345
  }
3070
3346
 
3347
+ /** `subagentResult.resultStatus` (#88809): the consumed attempt's outcome. Absent when the host had not seen that attempt's result envelope at the drain; a client then shows the child's current outcome (ADR 88809 D2). Open: a client treats a value it does not know as an absent member. */
3348
+ export type SubagentResultStatus = "completed" | "failed" | "cancelled" | (string & {});
3349
+
3350
+ /** One roster row: a durable child's identity, place, and state, projected from its control records. Rows carry no result content — the transcript stays on the child session / `subagent/readResult`. */
3351
+ export interface SubagentRosterEntry {
3352
+ /** The agent definition path (`agent_path`), verbatim from the spawn. */
3353
+ agentPath: string;
3354
+ /** The child's own session id, readable via `session/read`/`view/page`. **Additive-optional**: absent until the child's start is attested. */
3355
+ childSessionId?: string;
3356
+ /** The child's control status: `Accepted` at spawn, then the latest `StatusUpdated` / `Closed` / `ResultReady` / `RecoveryAvailable` / `RecoveryDecision` (`Accepted | Starting | Running | ResultReady | Closing | Closed | RecoveryPending | ManualReconciliation`). */
3357
+ controlStatus: SubagentControlStatus;
3358
+ /** The granted definition's name (`definition_grant_audit` `definition_name`). **Additive-optional**: absent on spawns without a grant audit (historical records). The resolved definition id is not persisted on the spawn record, so the name is what the roster can truthfully carry. */
3359
+ definitionName?: string;
3360
+ /** The spawn depth (1 = a root-session child). */
3361
+ depth: number;
3362
+ /** The child's observed wall-clock duration in ms, when the runtime observed one. **Additive-optional**: absent until first observation. */
3363
+ durationMs?: number;
3364
+ /** The child's display name: the spawn `description`, falling back to the spawn `role`. **Additive-optional**: absent when neither carries one; never parsed from `agentPath`. */
3365
+ name?: string;
3366
+ /** The spawn objective. **Additive-optional**: absent when the spawn carried none. */
3367
+ objective?: string;
3368
+ /** The parent row's `agentPath`. **Additive-optional**: absent whenever `parentSubagentId` is. */
3369
+ parentPath?: string;
3370
+ /** The parent's `subagentId`: the roster row whose child session issued this child's spawn. **Additive-optional**: absent when the parent is the root session, or when the parent row is not in the roster or not yet attested — never guessed, never derived from `agentPath`. */
3371
+ parentSubagentId?: string;
3372
+ /** Whether the child's latest attempt's result is ready (a `ResultReady` for the latest admitted attempt seen). */
3373
+ resultReady: boolean;
3374
+ /** The spawn role. **Additive-optional**: absent when the spawn carried none. */
3375
+ role?: string;
3376
+ /** The durable child identity (`subagent_id`). Rows without one are not roster rows: a rejected spawn names no child. */
3377
+ subagentId: string;
3378
+ /** The terminal reason: the result envelope's `errorKind` when present, else the cancel outcome's `reason`. **Additive-optional**: absent on live rows and on terminals that carry no reason — never fabricated from the close outcome's status word. */
3379
+ terminalReason?: string;
3380
+ /** The owning dynamic workflow run id, when the child was workflow-admitted. **Additive-optional**: absent for native spawns. */
3381
+ workflowRunId?: string;
3382
+ }
3383
+
3071
3384
  /** Params for `subagent/resume`, `subagent/reopen`, and `subagent/readResult` (SS3.16): the bare child target. */
3072
3385
  export interface SubagentTargetParams {
3073
3386
  /** Client-minted UUIDv7 command id (SS3.1.1). */
@@ -3391,6 +3704,18 @@ export interface TurnInterruptResult {
3391
3704
  turnId: string;
3392
3705
  }
3393
3706
 
3707
+ /** `turn/modelAttemptStarted` params (tdd SS4.5.1; ADR `68644-model-attempt-started` D1): a turn's model provider task recorded its opening status — one model attempt is starting (before the provider dials), retries and later model steps included. Clients raise their thinking state here, the point a switch-off TUI flips on model-task activity. Non-terminal: it never resolves a turn-wait. `sourceRange` cites the session stream's mirror of the task-lifecycle record (tdd SS4.2). */
3708
+ export interface TurnModelAttemptStartedParams {
3709
+ /** The owning session. */
3710
+ sessionId: string;
3711
+ /** The durable record this event folded from (the session stream's mirror of the model task's opening status; `first == last`). */
3712
+ sourceRange: SourceRange;
3713
+ /** The running turn whose model attempt is starting. */
3714
+ turnId: string;
3715
+ /** Opaque, strictly monotonic view cursor (tdd SS4.1). */
3716
+ viewCursor: string;
3717
+ }
3718
+
3394
3719
  /** `turn/modelRetryScheduled` params (tdd SS4.5.1; ADR `50047-model-retry-scheduled-members` D1): a durable model-stream retry-scheduled fact folded — the provider backoff behind one model attempt is observable BEFORE the turn terminates, so a streaming client can render "system words · retrying in Ss · attempt N/M" instead of dead air. Non-terminal: it never resolves a turn-wait. The sibling `turn/retryScheduled` shape at the model layer: same member names and semantics (attempt/nextAttempt/maxAttempts/ retryDelayMs/system/errorKind/httpStatus), minus `reason` — the row's words derive from `errorKind` through the shared gate-off mapping, and the recorded machine message is not user text. The delay is the recorded scheduled backoff, never an absolute fire time — clients derive any countdown locally. `sourceRange` cites the session stream's mirror of the task-lifecycle record (tdd SS4.2). */
3395
3720
  export interface TurnModelRetryScheduledParams {
3396
3721
  /** The failed model attempt (producer-normalized, >= 1). */
@@ -4027,10 +4352,10 @@ export interface WorkflowTokenBudget {
4027
4352
  }
4028
4353
 
4029
4354
  /** Every wire method in this schema (SS1.9 index). */
4030
- export type MspMethod = "initialize" | "subagent/sendMessage" | "subagent/followupTask" | "subagent/interrupt" | "subagent/stop" | "subagent/resume" | "subagent/reopen" | "subagent/close" | "subagent/readResult" | "session/start" | "session/resume" | "session/fork" | "session/leave" | "session/list" | "session/read" | "session/sideChat" | "turn/start" | "turn/steer" | "turn/interrupt" | "turn/cancel" | "turn/unqueue" | "session/compact" | "session/setModel" | "session/rename" | "session/setReasoningEffort" | "session/userShell" | "model/list" | "skill/list" | "skill/setActivation" | "skill/import" | "hook/list" | "plugin/list" | "plugin/install" | "plugin/marketplaceAdd" | "plugin/marketplaceUpdate" | "plugin/marketplaceRemove" | "task/background" | "task/stop" | "task/stopAll" | "task/list" | "goal/set" | "goal/edit" | "goal/clear" | "goal/pause" | "goal/resume" | "workflow/cancel" | "workflow/childControl" | "workflow/pause" | "workflow/resume" | "media/upload" | "view/subscribe" | "view/unsubscribe" | "view/page" | "item/readOutput" | "approval/decide" | "approval/listPending" | "session/setApprovalMode" | "userInput/answer" | "userInput/cancel" | "userInput/clarify" | "userInput/interrupt" | "usage/read" | "feedback/submit" | "recap/request" | "recap/cancel" | "computerUseSettings/read" | "computerUseSettings/update" | "computerUseSetup/read" | "computerUseSetup/start" | "computerUseSetup/check";
4355
+ export type MspMethod = "initialize" | "subagent/sendMessage" | "subagent/followupTask" | "subagent/interrupt" | "subagent/stop" | "subagent/resume" | "subagent/reopen" | "subagent/close" | "subagent/readResult" | "subagent/list" | "session/start" | "session/resume" | "session/fork" | "session/declareExternalWait" | "session/clearExternalWait" | "session/leave" | "session/list" | "session/read" | "session/sideChat" | "turn/start" | "turn/steer" | "turn/interrupt" | "turn/cancel" | "turn/unqueue" | "session/compact" | "session/setModel" | "session/rename" | "session/setReasoningEffort" | "session/userShell" | "model/list" | "skill/list" | "skill/setActivation" | "skill/import" | "hook/list" | "plugin/list" | "plugin/install" | "plugin/marketplaceAdd" | "plugin/marketplaceUpdate" | "plugin/marketplaceRemove" | "task/background" | "task/stop" | "task/stopAll" | "task/list" | "goal/set" | "goal/edit" | "goal/clear" | "goal/pause" | "goal/resume" | "workflow/cancel" | "workflow/childControl" | "workflow/pause" | "workflow/resume" | "media/upload" | "view/subscribe" | "view/unsubscribe" | "view/page" | "item/readOutput" | "approval/decide" | "approval/listPending" | "session/setApprovalMode" | "userInput/answer" | "userInput/cancel" | "userInput/clarify" | "userInput/interrupt" | "usage/read" | "feedback/submit" | "recap/request" | "recap/cancel" | "model/complete" | "model/cancel" | "computerUseSettings/read" | "computerUseSettings/update" | "computerUseSetup/read" | "computerUseSetup/start" | "computerUseSetup/check";
4031
4356
  /** Every wire notification in this schema (SS1.9 index). */
4032
- export type MspNotification = "initialized" | "session/started" | "session/closed" | "session/leaveCompleted" | "skill/changed" | "turn/started" | "turn/completed" | "turn/retracted" | "turn/retryScheduled" | "turn/modelRetryScheduled" | "turn/unqueued" | "turn/foregroundCompleted" | "item/started" | "item/updated" | "item/delta" | "item/completed" | "view/gap" | "approval/requested" | "approval/updated" | "approval/reviewing" | "approval/resolved" | "userInput/requested" | "userInput/settled" | "userInput/engaged" | "session/modelChanged" | "session/reasoningEffortChanged" | "session/statusChanged" | "session/goalChanged" | "session/todoListChanged" | "session/branchChanged" | "session/tokenUsage" | "session/contextUsage" | "session/approvalModeChanged" | "recap/completed" | "session/modelRouteUnserved" | "session/nameChanged" | "session/viewHealthChanged" | "session/listChanged" | "usage/changed" | "computerUseSetup/changed" | "plugin/changed" | "plugin/marketplaceChanged" | "monitor/inboxItemAdmitted" | "monitor/inboxItemDrained" | "monitor/inboxItemVoided";
4357
+ export type MspNotification = "initialized" | "session/started" | "session/closed" | "session/leaveCompleted" | "skill/changed" | "turn/started" | "turn/completed" | "turn/retracted" | "turn/retryScheduled" | "turn/modelRetryScheduled" | "turn/modelAttemptStarted" | "turn/unqueued" | "turn/foregroundCompleted" | "item/started" | "item/updated" | "item/delta" | "item/completed" | "view/gap" | "approval/requested" | "approval/updated" | "approval/reviewing" | "approval/resolved" | "userInput/requested" | "userInput/settled" | "userInput/engaged" | "session/modelChanged" | "session/reasoningEffortChanged" | "session/statusChanged" | "session/goalChanged" | "session/todoListChanged" | "session/branchChanged" | "session/tokenUsage" | "session/contextUsage" | "session/approvalModeChanged" | "recap/completed" | "model/completed" | "session/modelRouteUnserved" | "session/nameChanged" | "session/viewHealthChanged" | "session/listChanged" | "usage/changed" | "computerUseSetup/changed" | "plugin/changed" | "plugin/marketplaceChanged" | "monitor/inboxItemAdmitted" | "monitor/inboxItemDrained" | "monitor/inboxItemVoided";
4033
4358
  /** Every server-initiated wire request in this schema (SS5.3/SS5.10.1 index). */
4034
4359
  export type MspServerRequest = "approval/request" | "userInput/request";
4035
4360
  /** Every error `data.kind` in this schema's error table (SS1.6) — each code's primary kind plus its override kinds. */
4036
- export type MspErrorDataKind = "parseError" | "invalidRequest" | "notInitialized" | "alreadyInitialized" | "methodNotFound" | "experimentalRequired" | "invalidParams" | "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";
4361
+ export type MspErrorDataKind = "parseError" | "invalidRequest" | "notInitialized" | "alreadyInitialized" | "methodNotFound" | "experimentalRequired" | "invalidParams" | "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";