@muse-code/sdk 1.4.2 → 1.4.6
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/connection/connection.d.ts +21 -0
- package/dist/src/connection/connection.js +38 -5
- package/dist/src/connection/spawn.d.ts +28 -1
- package/dist/src/connection/spawn.js +42 -8
- package/dist/src/errors.d.ts +17 -0
- package/dist/src/errors.js +25 -0
- package/dist/src/facade/approval.js +34 -2
- package/dist/src/facade/client.d.ts +20 -1
- package/dist/src/facade/client.js +149 -14
- package/dist/src/facade/gap-fill.js +14 -1
- package/dist/src/facade/host-start.d.ts +62 -0
- package/dist/src/facade/host-start.js +81 -0
- package/dist/src/facade/session.js +1 -0
- package/dist/src/facade/turn-submit.js +7 -0
- package/dist/src/fingerprint.d.ts +1 -1
- package/dist/src/fingerprint.js +1 -1
- package/dist/src/fold/session-fold.d.ts +15 -5
- package/dist/src/fold/session-fold.js +27 -3
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.js +6 -1
- package/dist/src/msp.d.ts +902 -58
- package/package.json +1 -1
package/dist/src/msp.d.ts
CHANGED
|
@@ -142,6 +142,8 @@ export type ApprovalResolvedBy = "user" | "policy" | "llmJudge" | (string & {});
|
|
|
142
142
|
export interface ApprovalResolvedParams {
|
|
143
143
|
amendment?: ApprovalAmendment;
|
|
144
144
|
approvalId: string;
|
|
145
|
+
/** The decision time as RFC3339, projected from the durable `DecisionApplied` record's own stamp (ADR 45450 D3): optional on the wire so decoders tolerate its absence, always populated by current hosts. */
|
|
146
|
+
decidedAt?: string;
|
|
145
147
|
decidedByCommandId?: string;
|
|
146
148
|
decision: ApprovalDecision;
|
|
147
149
|
itemId: string;
|
|
@@ -243,7 +245,7 @@ export interface BranchState {
|
|
|
243
245
|
}
|
|
244
246
|
|
|
245
247
|
/** A grantable capability name (SS1.4.4). Open: the reserved `rawLog` entry joins this domain as an additive open-enum extension when SS6 un-defers (#13929, Scenario 5 AS-3) — closed would make that a retype. */
|
|
246
|
-
export type CapabilityName = "userShell" | "sessionMcp" | "sessionListStream" | "feedback" | (string & {});
|
|
248
|
+
export type CapabilityName = "userShell" | "sessionMcp" | "sessionListStream" | "feedback" | "computerUseSetup" | (string & {});
|
|
247
249
|
|
|
248
250
|
/** The client's requested capability posture (SS1.4.1). Every member defaults; an absent `capabilities` object means all defaults. */
|
|
249
251
|
export interface ClientCapabilities {
|
|
@@ -267,6 +269,34 @@ export interface ClientInfo {
|
|
|
267
269
|
version: string;
|
|
268
270
|
}
|
|
269
271
|
|
|
272
|
+
/** The language a Code Mode cell ran in (ADR 42727 D2). Open: values are lowercase VS Code language identifiers, and only `javascript` (the V8 engine) is minted today. */
|
|
273
|
+
export type CodeModeLanguage = "javascript" | (string & {});
|
|
274
|
+
|
|
275
|
+
/** One public-output span inside the item's `visibleOutput` (ADR 42727 D3). Offsets index the UTF-8 encoding of the **decoded** `visibleOutput` string, never the JSON-escaped wire text; both ends fall on code-point boundaries; named and measured like `item/readOutput`'s byte range. */
|
|
276
|
+
export interface CodeModeOutputSpan {
|
|
277
|
+
/** Length of the span, in bytes. Range 0–9007199254740991 inclusive. */
|
|
278
|
+
lengthBytes: number;
|
|
279
|
+
/** Start of the span, in bytes. Range 0–9007199254740991 inclusive. */
|
|
280
|
+
offsetBytes: number;
|
|
281
|
+
/** What the bytes are. */
|
|
282
|
+
stream: CodeModeOutputStream;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/** What a Code Mode output span's bytes are (ADR 42727 D3). Open: each engine mints its own values. */
|
|
286
|
+
export type CodeModeOutputStream = "transcript" | (string & {});
|
|
287
|
+
|
|
288
|
+
/** Code Mode's `details` payload (ADR 42727 D2/D3). Every member is absent when it does not apply, never `null`; an empty `outputSpans` list is never served. */
|
|
289
|
+
export interface CodeModeReceipt {
|
|
290
|
+
/** `wait` only, when the producer resolved it: the `itemId` of the `execute` item that started the cell. */
|
|
291
|
+
cellItemId?: string;
|
|
292
|
+
/** `execute`, and `wait` when the producer resolved the originating execute: the language the cell ran in. */
|
|
293
|
+
language?: CodeModeLanguage;
|
|
294
|
+
/** The public cell-output spans, ascending and non-overlapping; absent when there is no cell body or a hook rewrote the served body. */
|
|
295
|
+
outputSpans?: CodeModeOutputSpan[];
|
|
296
|
+
/** `execute` only: the top-level key of the item's `args` object whose value is the cell source. A pointer, never source bytes. */
|
|
297
|
+
sourceArg?: string;
|
|
298
|
+
}
|
|
299
|
+
|
|
270
300
|
/** The uniform SS3.1.2 command acknowledgement: admission only, never an outcome. `session/compact` alone may answer `"noop"`; every other command answers `"accepted"`. */
|
|
271
301
|
export interface CommandAcceptedResult {
|
|
272
302
|
/** Echo of the client-minted UUIDv7 `commandId` (SS3.1.1). */
|
|
@@ -290,6 +320,91 @@ export type CompactionOutcome = "compacted" | "noop" | "failed" | "cancelled" |
|
|
|
290
320
|
/** What initiated a compaction (tdd SS4.5.10). Open. */
|
|
291
321
|
export type CompactionTrigger = "manual" | "auto" | (string & {});
|
|
292
322
|
|
|
323
|
+
/** One row of the Settings blocked-apps list. */
|
|
324
|
+
export interface ComputerUseBlockedApp {
|
|
325
|
+
/** The app's bundle ID, or the family prefix when `prefix` is true. */
|
|
326
|
+
bundleId: string;
|
|
327
|
+
/** A built-in block, which Settings cannot remove (ADR 630 D18.8). */
|
|
328
|
+
locked: boolean;
|
|
329
|
+
/** A built-in family row: it blocks every bundle ID that starts with `bundleId`. Omitted means false; only locked rows are prefixes. */
|
|
330
|
+
prefix?: boolean;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/** A capability dropdown's value (ADR 630 D18.4). **Open**: the read result carries it, so an older client tolerates a value it does not know. */
|
|
334
|
+
export type ComputerUseChoice = "ask" | "alwaysAllow" | (string & {});
|
|
335
|
+
|
|
336
|
+
/** One macOS permission as setup last saw it. **Open**, like the phase. */
|
|
337
|
+
export type ComputerUsePermission = "granted" | "missing" | "unknown" | (string & {});
|
|
338
|
+
|
|
339
|
+
/** `computerUseSettings/read` result, also answered by `computerUseSettings/update`. */
|
|
340
|
+
export interface ComputerUseSettings {
|
|
341
|
+
/** The user's blocks in the order they were added, then the built-in blocks when `showBuiltIns` asked for them. */
|
|
342
|
+
blockedApps: ComputerUseBlockedApp[];
|
|
343
|
+
/** The computer-control dropdown, as it applies: `ask` while the stored blocked-apps list can't be read (ADR 630 D18.4). */
|
|
344
|
+
computerControl: ComputerUseChoice;
|
|
345
|
+
/** The screenshots dropdown, under the same rule. */
|
|
346
|
+
screenshots: ComputerUseChoice;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/** `computerUseSettings/read` params. */
|
|
350
|
+
export interface ComputerUseSettingsReadParams {
|
|
351
|
+
/** Also list the built-in blocks as locked rows (the D18.8 toggle). Omitted means false. */
|
|
352
|
+
showBuiltIns?: boolean;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/** `computerUseSettings/update` params: a patch. Omitted members are left alone; the whole patch applies or none of it does. */
|
|
356
|
+
export interface ComputerUseSettingsUpdateParams {
|
|
357
|
+
/** Bundle IDs to add to the user's blocked apps. A built-in block is refused: it is already blocked. */
|
|
358
|
+
blockApps?: string[];
|
|
359
|
+
/** The new computer-control dropdown value. */
|
|
360
|
+
computerControl?: ComputerUseChoice;
|
|
361
|
+
/** The new screenshots dropdown value. */
|
|
362
|
+
screenshots?: ComputerUseChoice;
|
|
363
|
+
/** Bundle IDs to remove from the user's blocked apps. Only the user's own entries can be removed; a built-in block stays. */
|
|
364
|
+
unblockApps?: string[];
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/** `computerUseSetup/changed` params. */
|
|
368
|
+
export interface ComputerUseSetupChanged {
|
|
369
|
+
/** The session whose setup state changed. */
|
|
370
|
+
sessionId: string;
|
|
371
|
+
/** Its new state. */
|
|
372
|
+
state: ComputerUseSetupState;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/** Where the session's setup stands: `cua_setup`'s state codes, camelCase. **Open**: a result vocabulary, so an older client tolerates a new state. */
|
|
376
|
+
export type ComputerUseSetupPhase = "dormant" | "inProgress" | "restartRequired" | "readyForTarget" | "stopped" | (string & {});
|
|
377
|
+
|
|
378
|
+
/** `computerUseSetup/read` params. */
|
|
379
|
+
export interface ComputerUseSetupReadParams {
|
|
380
|
+
/** The session whose setup to read. */
|
|
381
|
+
sessionId: string;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/** `computerUseSetup/start` params: a human command. */
|
|
385
|
+
export interface ComputerUseSetupStartParams {
|
|
386
|
+
/** The client's id for this command. */
|
|
387
|
+
commandId: string;
|
|
388
|
+
/** The session whose setup to start. */
|
|
389
|
+
sessionId: string;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/** The session's setup state: the result of both methods and the `computerUseSetup/changed` payload's `state`. */
|
|
393
|
+
export interface ComputerUseSetupState {
|
|
394
|
+
/** Accessibility. */
|
|
395
|
+
accessibility: ComputerUsePermission;
|
|
396
|
+
/** Input Monitoring: computer use is ready without it; some actions need it. */
|
|
397
|
+
inputMonitoring: ComputerUsePermission;
|
|
398
|
+
/** The sentence `cua_setup` gives the user for this answer. */
|
|
399
|
+
message?: string;
|
|
400
|
+
/** The `cua_setup` refusal code when the call was refused, verbatim. */
|
|
401
|
+
refused?: string;
|
|
402
|
+
/** Screen Recording. */
|
|
403
|
+
screenRecording: ComputerUsePermission;
|
|
404
|
+
/** Where setup stands. */
|
|
405
|
+
setup: ComputerUseSetupPhase;
|
|
406
|
+
}
|
|
407
|
+
|
|
293
408
|
/** Context pressure level (tdd SS4.6.6): hard threshold first, both inclusive `>=`. Open. */
|
|
294
409
|
export type ContextPressureLevel = "normal" | "warning" | "blocked" | (string & {});
|
|
295
410
|
|
|
@@ -303,6 +418,24 @@ export interface ContextUsage {
|
|
|
303
418
|
windowTokens?: number;
|
|
304
419
|
}
|
|
305
420
|
|
|
421
|
+
/** Cron's `details` payload (ADR 42728 D2, thirteenth directive). Every field a family owns lives here, under the container's one `details` key, rather than flat beside the discriminators — ADR 43399 D5 as amended. Each is a **bounded machine fact**: scalars, short identifiers and a small fixed-shape array of those. */
|
|
422
|
+
export interface CronReceipt {
|
|
423
|
+
/** Cron `create` and `delete`: the job id. On `delete`'s `missing` arm this is the caller's own id echoed back under ADR 43399 D1's declared echo — that arm has no server-side subject to name. Also the field ADR 42728 D4's D8 declaration names as conveying the hidden fact on the declared `created` + `cancelled` pairing: a job row was committed and will fire. */
|
|
424
|
+
jobId?: string;
|
|
425
|
+
/** Cron `list`: the served jobs in server order, `active` and `firing` rows only. */
|
|
426
|
+
jobs?: CronReceiptJob[];
|
|
427
|
+
/** Cron `create` (`created`, `duplicate`): absolute epoch-milliseconds of the job's next scheduled fire (the existing job's on `duplicate`, ADR 42728 D2). */
|
|
428
|
+
nextFireAtMs?: number;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
/** One row of the Cron `list` receipt's `jobs` array (ADR 42728 D2). Server order, and **`active` + `firing` rows only** — the owner's `Serve active+firing only` directive. A small fixed-shape array of scalars, which is what keeps it inside D5's bounded-machine-fact rule. */
|
|
432
|
+
export interface CronReceiptJob {
|
|
433
|
+
/** The job's server-owned id. */
|
|
434
|
+
jobId: string;
|
|
435
|
+
/** Absolute epoch-milliseconds of the job's next scheduled fire. */
|
|
436
|
+
nextFireAtMs: number;
|
|
437
|
+
}
|
|
438
|
+
|
|
306
439
|
/** Server-computed session cost member of [`CumulativeTokenUsage`] (tdd SS4.6.5, Amendment #41610 FR-41610-2/3). */
|
|
307
440
|
export interface CumulativeCost {
|
|
308
441
|
/** True when at least one leg lacked price data — clients render `(partial)`. */
|
|
@@ -383,6 +516,10 @@ export interface ErrorData {
|
|
|
383
516
|
latestBoundaryCursor?: string | null;
|
|
384
517
|
/** The exceeded byte limit, on `inputTooLarge` errors. */
|
|
385
518
|
limitBytes?: number;
|
|
519
|
+
/** The store on `pluginNotFound` (`-32035`, SS3.29.1). */
|
|
520
|
+
marketplace?: string;
|
|
521
|
+
/** The rejected marketplace name on `marketplaceNotFound` (`-32034`, SS3.29.7) and `marketplaceAlreadyExists` (`-32036`, SS3.29.2); the rejected plugin name on `pluginNotFound` (`-32035`, SS3.29.1). */
|
|
522
|
+
name?: string;
|
|
386
523
|
/** The requested `outputRef.id`, on the same `item/readOutput` arms. */
|
|
387
524
|
outputRef?: string;
|
|
388
525
|
/** Candidate retained paths on `sessionAmbiguous`. */
|
|
@@ -393,12 +530,18 @@ export interface ErrorData {
|
|
|
393
530
|
resolution?: ApprovalResolutionSummary;
|
|
394
531
|
/** Whether retrying can succeed (e.g. `overloaded`). When present, overrides the error table row's `retryable` default for this code. */
|
|
395
532
|
retryable?: boolean;
|
|
533
|
+
/** Why the branch seed did not use a checkpoint, on the same arms: one of `no_usable_checkpoint`, `unsupported_checkpoint_shape`, `checkpoint_has_model_visible_tail`, `checkpoint_missing_suffix`; absent when the seed used a checkpoint or no fallback was recorded. */
|
|
534
|
+
seedFallbackReason?: string;
|
|
535
|
+
/** The branch-seed path the host read before rejecting, on branch-validation rejections (`session/fork`, `session/sideChat`: the `forkBoundaryInvalid`, `commandRejected` and `sessionNotFound` arms; SS2.5.3, SS2.5.7; #51365): one of `runtime_checkpoint_tail`, `runtime_full_replay`, `legacy_session_data` — the durable branch-seed vocabulary, so the client cites the real seed decision instead of guessing at a stale binary. */
|
|
536
|
+
seedPath?: string;
|
|
396
537
|
/** The rejected skill selector on `skillNotFound` (`-32032`, SS3.22.4). */
|
|
397
538
|
selector?: string;
|
|
398
539
|
/** Session identity on errors whose lookup is session-scoped. */
|
|
399
540
|
sessionId?: string;
|
|
400
541
|
/** Winning settlement on `userInputAlreadySettled`. */
|
|
401
542
|
settlement?: UserInputSettlementSummary;
|
|
543
|
+
/** The rejected upload id on `uploadNotFound` (`-32038`, SS3.33). */
|
|
544
|
+
uploadId?: string;
|
|
402
545
|
/** User-input prompt identity on SS5.10 errors. */
|
|
403
546
|
userInputId?: string;
|
|
404
547
|
/** The blocked view position on `pageEventTooLarge` errors. */
|
|
@@ -406,7 +549,7 @@ export interface ErrorData {
|
|
|
406
549
|
}
|
|
407
550
|
|
|
408
551
|
/** A stable `error.data.kind` category (SS1.6): camelCase, the value clients branch on. Open: SS2–SS5 lanes add kinds additively as their methods land (Appendix B already registers them), and the spec's edge-case rule makes a new `kind` additive only because this domain is declared open. */
|
|
409
|
-
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" | "viewTruncated" | "outputUnavailable" | "boundaryPruned" | "boundaryUnusable" | "noBoundary" | "approvalNotFound" | "approvalAlreadyResolved" | "approvalChoiceInvalid" | "approvalRequirementStale" | "approvalReviewerUnavailable" | "userInputNotFound" | "userInputAlreadySettled" | "userInputAnswerInvalid" | (string & {});
|
|
552
|
+
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 & {});
|
|
410
553
|
|
|
411
554
|
/** The `error` member of an error response (SS1.2 §2.4). */
|
|
412
555
|
export interface ErrorObject {
|
|
@@ -436,7 +579,7 @@ export type FeedbackSubmitOutcome = "uploaded" | "recorded" | "acceptedWithoutRe
|
|
|
436
579
|
|
|
437
580
|
/** `feedback/submit` params (tdd SS3.25): mirrors the TUI confirm-time `FeedbackRequest`. The call itself is the explicit confirm. */
|
|
438
581
|
export interface FeedbackSubmitParams {
|
|
439
|
-
/** Consent to attach the session record; honored only for `bug`/`badResult
|
|
582
|
+
/** Consent to attach the session record; honored only for `bug`/`badResult` with `session_id` present. `true` with `with_files: false`, with a non-`bug`/`badResult` classification, or without `session_id` is `invalidParams` (F4, F8). Defaults to `false`. */
|
|
440
583
|
attachSessionRecord?: boolean;
|
|
441
584
|
/** The report class (required). */
|
|
442
585
|
classification: FeedbackClassification;
|
|
@@ -444,8 +587,8 @@ export interface FeedbackSubmitParams {
|
|
|
444
587
|
clientArtifactsPath?: string;
|
|
445
588
|
/** The user report text (required; non-empty for `bug`). */
|
|
446
589
|
note: string;
|
|
447
|
-
/** Names the session this call is about (
|
|
448
|
-
sessionId
|
|
590
|
+
/** Names the session this call is about when present (F8, superseding F3): the bundle lands in that session's dir. Names a session this host owns. When absent, the bundle lands in the host-level feedback folder and the `session_id` tag is omitted. */
|
|
591
|
+
sessionId?: string;
|
|
449
592
|
/** The files-consent decision (required). */
|
|
450
593
|
withFiles: boolean;
|
|
451
594
|
}
|
|
@@ -569,6 +712,39 @@ export type HistoryNoneReason = "excluded" | "cursorSuffix" | "historyBudget" |
|
|
|
569
712
|
/** 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. */
|
|
570
713
|
export type HistoryPreference = "auto" | "inline" | "snapshot" | "anchored";
|
|
571
714
|
|
|
715
|
+
/** One installed handler (tdd SS3.26.1). */
|
|
716
|
+
export interface HookCatalogEntry {
|
|
717
|
+
/** The row's own switch (tdd SS3.26.1). Non-enabled rows are included as `false`, never dropped. */
|
|
718
|
+
enabled: boolean;
|
|
719
|
+
/** The event the handler runs on (ADR 33398 D7 item 2). */
|
|
720
|
+
event: HookEventName;
|
|
721
|
+
/** Where the handler comes from (ADR 33398 D7 item 1). */
|
|
722
|
+
handlerKind: HookHandlerKind;
|
|
723
|
+
/** The handler key (config key or plugin hook id). */
|
|
724
|
+
key: string;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
/** Hook event names (tdd SS3.26.1, ADR 33398 D7 item 2): the lowercase-first-letter spelling of every `HookEventKind::all()` variant. Open (server-produced result vocabulary, the #22785 enum-openness rule): a future event value is additive. */
|
|
728
|
+
export type HookEventName = "sessionStart" | "userPromptSubmit" | "preToolUse" | "permissionRequest" | "postToolUse" | "preCompact" | "postCompact" | "subagentStart" | "subagentStop" | "stop" | "sessionEnd" | "notification" | "postToolUseFailure" | "stopFailure" | "postToolBatch" | "interrupt" | "sessionFork" | "toolUseStart" | "preLLMCall" | "postLLMCall" | (string & {});
|
|
729
|
+
|
|
730
|
+
/** A hook row's origin (tdd SS3.26.1, ADR 33398 D7 item 1): the config `HookSourceKind` values plus plugin-contributed. Open (server-produced result vocabulary, the #22785 enum-openness rule): a future origin is additive. */
|
|
731
|
+
export type HookHandlerKind = "managed" | "user" | "project" | "plugin" | (string & {});
|
|
732
|
+
|
|
733
|
+
/** `hook/list` params (tdd SS3.26.1). Per-session because hook scope follows the session's workspace and plugin state. */
|
|
734
|
+
export interface HookListParams {
|
|
735
|
+
/** The target session. */
|
|
736
|
+
sessionId: string;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
/** `hook/list` result (tdd SS3.26.1): one row per installed handler per event — a `ResolvedHookHandler` carries one event, and grouping would lose matcher/command identity (ADR 33398 D7 item 1). */
|
|
740
|
+
export interface HookListResult {
|
|
741
|
+
/** The session's installed hook rows (tdd SS3.26.1 promises the set, not an order). */
|
|
742
|
+
hooks: HookCatalogEntry[];
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
/** `hookRun` durable outcome (tdd SS4.5.11). Open: new outcomes are additive, and clients MUST render unknown values generically. */
|
|
746
|
+
export type HookRunStatus = "completed" | "blocked" | "failed" | "timedOut" | "cancelled" | (string & {});
|
|
747
|
+
|
|
572
748
|
/** Disposition when a turn is already running (tdd SS3.2). The wire default is `queue`: an SDK caller who has not looked at session state should not silently mutate an in-flight turn. */
|
|
573
749
|
export type IfBusy = "queue" | "steer" | "replace";
|
|
574
750
|
|
|
@@ -602,7 +778,7 @@ export interface InitializeResult {
|
|
|
602
778
|
userAgent: string;
|
|
603
779
|
}
|
|
604
780
|
|
|
605
|
-
/** One transcript item at one revision (tdd SS4.4.1 common fields plus the per-kind fields of SS4.5.2–4.5.
|
|
781
|
+
/** One transcript item at one revision (tdd SS4.4.1 common fields plus the per-kind fields of SS4.5.2–4.5.11, all optional and owned by the kind their doc names). `item/started`, `item/updated`, and `item/completed` carry the full object; `item/delta` appends to it by field path. */
|
|
606
782
|
export interface Item {
|
|
607
783
|
/** `subagent`: agent definition path. */
|
|
608
784
|
agentPath?: string;
|
|
@@ -616,8 +792,12 @@ export interface Item {
|
|
|
616
792
|
background?: boolean;
|
|
617
793
|
/** `toolCall`: who backgrounded the task; absent on pre-split records — never inferred (tdd SS4.5.5). */
|
|
618
794
|
backgroundInitiator?: BackgroundInitiator;
|
|
795
|
+
/** `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`. */
|
|
796
|
+
blocking?: boolean;
|
|
619
797
|
/** `toolCall`: the provider call id (`call_...`), opaque. */
|
|
620
798
|
callId?: string;
|
|
799
|
+
/** `workflow`: one `outputRef`-shaped link per recorded child spawn with an objective (`kind: "workflow_child_prompt"`), fetched via `item/readOutput` (tdd SS4.5.8/SS4.7.4, #45449). */
|
|
800
|
+
childPromptRefs?: OutputRef[];
|
|
621
801
|
/** `subagent`/`reminderChild`: the child's own session id, readable via `session/read`/`view/page` — child transcript drill-down without a second protocol (tdd SS4.5.7). */
|
|
622
802
|
childSessionId?: string;
|
|
623
803
|
/** `reminderChild`: parent-session-dir-relative child log path; absent when no filesystem log. */
|
|
@@ -630,14 +810,18 @@ export interface Item {
|
|
|
630
810
|
commandText?: string;
|
|
631
811
|
/** `subagent`: camelCased `SubagentControlStatus` (open enum); `status` stays the generic item vocabulary. */
|
|
632
812
|
controlStatus?: SubagentControlStatus;
|
|
813
|
+
/** `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). */
|
|
814
|
+
declaredPhase?: string;
|
|
633
815
|
/** `subagent`: nesting depth. */
|
|
634
816
|
depth?: number;
|
|
635
817
|
/** `userMessage`: presentation form (tdd SS3.2); absent when the client sent none. */
|
|
636
818
|
displayText?: string;
|
|
637
|
-
/** `userShell`/`subagent`: observed wall-clock duration. */
|
|
819
|
+
/** `userShell`/`subagent`: observed wall-clock duration. `workflow`: the run's wall time from launch to reconciliation, set only on the settling `item/completed` — never a sum of child durations. */
|
|
638
820
|
durationMs?: number;
|
|
639
821
|
/** `workflow`: launched entry identity. */
|
|
640
822
|
entryId?: string;
|
|
823
|
+
/** `hookRun`: the hook event in Q2 camelCase vocabulary (tdd SS4.5.11). */
|
|
824
|
+
event?: HookEventName;
|
|
641
825
|
/** `userShell`: the process exit code, when it exited by code. */
|
|
642
826
|
exitCode?: number;
|
|
643
827
|
/** `userShell`: the terminating signal NUMBER, when signalled (e.g. 9) — the durable payload verbatim; nothing maps numbers to names, and the fold never invents one. */
|
|
@@ -648,12 +832,18 @@ export interface Item {
|
|
|
648
832
|
failureReason?: string;
|
|
649
833
|
/** Server-provided one-line human summary any kind MAY carry, for generic rendering of kinds a client does not recognize; new kinds SHOULD carry it during their first release cycle (tdd SS4.10). */
|
|
650
834
|
fallbackText?: string;
|
|
835
|
+
/** `workflow`: the human terminal summary projected from the reconciled Launch envelope, bounded at the 64 KiB surface budget; terminal-only (tdd SS4.5.8, #45449). */
|
|
836
|
+
finalSummary?: string;
|
|
651
837
|
/** `reminderChild`: the reminder generation. */
|
|
652
838
|
generationId?: number;
|
|
839
|
+
/** `hookRun`: the durable `hook_key` (tdd SS4.5.11). */
|
|
840
|
+
hookKey?: string;
|
|
653
841
|
/** 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`), and the opening durable record's event id for everything else. Opaque to clients. */
|
|
654
842
|
itemId: string;
|
|
655
843
|
/** The item kind (open enum): clients MUST render unknown kinds generically — kind name plus `status` plus `fallbackText` (tdd SS4.10). */
|
|
656
844
|
kind: ItemKind;
|
|
845
|
+
/** `hookRun`: capped display label (tdd SS4.5.11). */
|
|
846
|
+
label?: string;
|
|
657
847
|
/** `workflow`: the reconciled terminal message, set on completion. */
|
|
658
848
|
message?: string;
|
|
659
849
|
/** `toolCall`: rich content the model saw beyond text; base64 is not inlined on the view (tdd SS4.5.5). */
|
|
@@ -668,9 +858,11 @@ export interface Item {
|
|
|
668
858
|
patchRef?: OutputRef;
|
|
669
859
|
/** `toolCall`: server-authored edit-family diff summary (#33025) — always beside `patchRef`; absent = no diff available (tdd SS4.5.5). */
|
|
670
860
|
patchSummary?: PatchSummary;
|
|
861
|
+
/** `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). */
|
|
862
|
+
paused?: boolean;
|
|
671
863
|
/** `reasoning`: provider reasoning item id (e.g. `rs_...`), for provider-side correlation. */
|
|
672
864
|
providerItemId?: string;
|
|
673
|
-
/** `compaction`: noop/failure reason, verbatim (snake_case durable vocabulary, e.g. `"no_compactable_history"`). */
|
|
865
|
+
/** `compaction`: noop/failure reason, verbatim (snake_case durable vocabulary, e.g. `"no_compactable_history"`). `hookRun`: terminal-only capped terminal reason (tdd SS4.5.11). */
|
|
674
866
|
reason?: string;
|
|
675
867
|
/** RFC3339 timestamp of the item's driving durable record. Absent on ephemeral-opened items until first durable re-emission (tdd SS4.4.1). */
|
|
676
868
|
recordedAt?: string;
|
|
@@ -686,12 +878,32 @@ export interface Item {
|
|
|
686
878
|
revision: number;
|
|
687
879
|
/** `subagent`: role as spawned. */
|
|
688
880
|
role?: string;
|
|
881
|
+
/** `hookRun`: terminal-only durable outcome; stays `blocked` when the item settles `rejected` (tdd SS4.5.11). */
|
|
882
|
+
runStatus?: HookRunStatus;
|
|
689
883
|
/** `workflow`: launched script identity. */
|
|
690
884
|
scriptId?: string;
|
|
885
|
+
/** `sideChat`: the side's own session id, readable via `session/read`/`view/page` — drill-down without a second protocol (tdd SS4.5.13; ADR 45435 D3). */
|
|
886
|
+
sideSessionId?: string;
|
|
691
887
|
/** Open enum; terminal = anything other than `"inProgress"`. Unknown values MUST be treated as terminal-unknown and rendered generically (tdd SS4.4.1). */
|
|
692
888
|
status: ItemStatus;
|
|
889
|
+
/** `toolCall`: the latest external-attempt facet, field-for-field — countdown inputs the client renders the tick from; absent when the latest detail carries none (tdd SS4.5.5, #45448). */
|
|
890
|
+
statusAttempt?: StatusAttempt;
|
|
891
|
+
/** `toolCall`: the latest child-summary facet, field-for-field; absent when the latest detail carries none (tdd SS4.5.5, #45448). */
|
|
892
|
+
statusChildren?: StatusChildren;
|
|
893
|
+
/** `toolCall`: the latest health facet, field-for-field; absent when the latest detail carries none (tdd SS4.5.5, #45448). */
|
|
894
|
+
statusHealth?: StatusHealth;
|
|
895
|
+
/** `toolCall`: the task's visible latest-status line — the latest `Status` message through the shared detail normalization; absent when no status folded or nothing displayable remains (tdd SS4.5.5, #45448). */
|
|
896
|
+
statusLine?: string;
|
|
897
|
+
/** `toolCall`: the latest detail's phase row, verbatim; absent when the latest detail carries none (tdd SS4.5.5, #45448). */
|
|
898
|
+
statusPhase?: string;
|
|
899
|
+
/** `toolCall`: the latest progress facet, field-for-field; absent when the latest detail carries none (tdd SS4.5.5, #45448). */
|
|
900
|
+
statusProgress?: StatusProgress;
|
|
901
|
+
/** `toolCall`: the latest active-step facet, field-for-field; absent when the latest detail carries none (tdd SS4.5.5, #45448). */
|
|
902
|
+
statusStep?: StatusStep;
|
|
693
903
|
/** `userMessage`: `true` when injected mid-turn via `turn/steer` or `ifBusy: "steer"`; absent otherwise. */
|
|
694
904
|
steered?: boolean;
|
|
905
|
+
/** `workflow`: display-only stop affordance — `true` while the run is open, `false` once settled; stopping rides `workflow/cancel` (tdd SS4.5.8, #45449). Authorizes nothing. */
|
|
906
|
+
stopAvailable?: boolean;
|
|
695
907
|
/** `compaction`: summarizer strategy (installed only). */
|
|
696
908
|
strategyId?: string;
|
|
697
909
|
/** `subagent`: durable child identity (`subagent_id`). */
|
|
@@ -704,12 +916,16 @@ export interface Item {
|
|
|
704
916
|
taskId?: string;
|
|
705
917
|
/** `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). */
|
|
706
918
|
text?: string;
|
|
919
|
+
/** `workflow`: the run's launch token budget, set from the launch fact (tdd SS4.5.8, #45449); absent when the launch carried none. */
|
|
920
|
+
tokenBudget?: WorkflowTokenBudget;
|
|
707
921
|
/** `compaction`: token budget snapshot after, when measured. */
|
|
708
922
|
tokensAfter?: number;
|
|
709
923
|
/** `compaction`: token budget snapshot before, when measured. */
|
|
710
924
|
tokensBefore?: number;
|
|
711
925
|
/** `toolCall`: tool name. */
|
|
712
926
|
tool?: string;
|
|
927
|
+
/** `toolCall`: the shared semantic receipt — what the operation did, as machine-readable fact (ADR 43399 D1, tdd SS4.5.5). Optional and additive: absence is always valid and is never an error (D3). When present, a server serves the **same** receipt on every item path — `item/completed`, `view/page`, seeded snapshots and resume (D3). Observation only; carries no control authority (D4), and no field in it enters model-visible content (D7). */
|
|
928
|
+
toolReceipt?: ToolReceipt;
|
|
713
929
|
/** `compaction`: what initiated the compaction. */
|
|
714
930
|
trigger?: CompactionTrigger;
|
|
715
931
|
/** `workflow`: camelCased `WorkflowLaunchTriggerSource`, verbatim (durable runtime vocabulary, e.g. `"modelProposal"`). */
|
|
@@ -752,8 +968,8 @@ export interface ItemDeltaParams {
|
|
|
752
968
|
viewCursor: string;
|
|
753
969
|
}
|
|
754
970
|
|
|
755
|
-
/** The
|
|
756
|
-
export type ItemKind = "userMessage" | "agentMessage" | "reasoning" | "toolCall" | "userShell" | "subagent" | "workflow" | "reminderChild" | "compaction" | (string & {});
|
|
971
|
+
/** 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). */
|
|
972
|
+
export type ItemKind = "userMessage" | "agentMessage" | "reasoning" | "toolCall" | "userShell" | "subagent" | "workflow" | "reminderChild" | "compaction" | "hookRun" | "sideChat" | "webSearch" | (string & {});
|
|
757
973
|
|
|
758
974
|
/** 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. */
|
|
759
975
|
export type ItemReadOutputEncoding = "utf8" | "base64";
|
|
@@ -818,8 +1034,51 @@ export interface ItemUpdatedParams {
|
|
|
818
1034
|
/** The literal `"2.0"` every frame carries (SS1.2). */
|
|
819
1035
|
export type JsonRpcVersion = "2.0";
|
|
820
1036
|
|
|
1037
|
+
/** The last `turn/completed` the session-view fold applied, restated on `session/resume` and `session/read` so a reopened session can report a failed last turn (tdd SS2.5.2, ADR 36635 D2/D3). */
|
|
1038
|
+
export interface LastTurn {
|
|
1039
|
+
/** Copied when the `turn/completed` carried it: runtime `failed` terminals do, host-death `failed` terminals do not (ADR 36635 D2). */
|
|
1040
|
+
error?: TurnError;
|
|
1041
|
+
/** Copied when the `turn/completed` carried it; a synthesized host-death `failed` terminal carries only this (`crash`, `crash_inferred`, or `incomplete`). Free display text: clients never branch on it. */
|
|
1042
|
+
reason?: string;
|
|
1043
|
+
/** The turn's terminal (tdd SS4.5.1; open enum). */
|
|
1044
|
+
terminal: TurnTerminal;
|
|
1045
|
+
/** The turn's id, as on its `turn/completed`; clients deduplicate a live `turn/completed` against this member by it (ADR 36635 D2). */
|
|
1046
|
+
turnId: string;
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
/** Quota limit kinds (tdd SS4.5.1, ADR 50047 D2): open for evolution. */
|
|
1050
|
+
export type LimitKind = "tierLimit" | (string & {});
|
|
1051
|
+
|
|
1052
|
+
/** `media/upload` params (tdd SS3.33, ADR 45443 D5): one chunk of a client-minted upload. All members required. */
|
|
1053
|
+
export interface MediaUploadParams {
|
|
1054
|
+
/** This chunk's bytes; each call's frame stays in the SS1.1 budget. */
|
|
1055
|
+
chunkBase64: string;
|
|
1056
|
+
/** The upload's chunk total; positive. */
|
|
1057
|
+
chunkCount: number;
|
|
1058
|
+
/** This chunk's 0-based position. */
|
|
1059
|
+
chunkIndex: number;
|
|
1060
|
+
/** One per call; SS3.1.1 replay answers the recorded receipt. */
|
|
1061
|
+
commandId: string;
|
|
1062
|
+
/** `video/mp4` or `video/quicktime`, matching `VideoInput`. */
|
|
1063
|
+
mediaType: string;
|
|
1064
|
+
/** The session owning the video store. */
|
|
1065
|
+
sessionId: string;
|
|
1066
|
+
/** The assembled byte count; must equal the bytes the chunks deliver. */
|
|
1067
|
+
totalBytes: number;
|
|
1068
|
+
/** The client-minted upload id (UUIDv7), sent on every chunk. */
|
|
1069
|
+
uploadId: string;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
/** `media/upload` result (tdd SS3.33): echoes the client-minted id, on every chunk and replay. */
|
|
1073
|
+
export interface MediaUploadResult {
|
|
1074
|
+
/** The receipt the turn part references. */
|
|
1075
|
+
uploadId: string;
|
|
1076
|
+
}
|
|
1077
|
+
|
|
821
1078
|
/** `userMessage` image attachment metadata (tdd SS4.5.2): metadata only — the durable bytes live in the log and are reachable on the raw altitude. */
|
|
822
1079
|
export interface MessageAttachment {
|
|
1080
|
+
/** This attachment's name, `<itemId>/<n>` — the item's id plus this entry's 1-based position in its `attachments` array (tdd SS4.5.2, D-071, ADR 42850; #42850). Name only: no link form and no byte read by id (#42648). Set by the server on every attachment entry it emits, and identical on live, paging, snapshot and rebuild paths (tdd SS4.5.2). Optional in the schema so older servers stay valid; clients compare and store the whole string and MUST NOT parse it (ADR 42850). */
|
|
1081
|
+
attachmentId?: string;
|
|
823
1082
|
/** Pixel height, when known. */
|
|
824
1083
|
height?: number;
|
|
825
1084
|
/** The image media type (e.g. `"image/png"`). */
|
|
@@ -1023,6 +1282,201 @@ export type PlatformFamily = "unix" | "windows";
|
|
|
1023
1282
|
/** The server's operating system (SS1.4.1). Closed, for the same reason as [`PlatformFamily`]. */
|
|
1024
1283
|
export type PlatformOs = "macos" | "linux" | "windows";
|
|
1025
1284
|
|
|
1285
|
+
/** One installed plugin record (tdd SS3.26.2). */
|
|
1286
|
+
export interface PluginCatalogEntry {
|
|
1287
|
+
/** The record's own install switch; non-enabled rows are included as `false`, never dropped. */
|
|
1288
|
+
enabled: boolean;
|
|
1289
|
+
/** The installed plugin's identifier. */
|
|
1290
|
+
id: string;
|
|
1291
|
+
/** The installed record's source provenance (ADR 33398 D7 item 3). */
|
|
1292
|
+
source: PluginSource;
|
|
1293
|
+
/** The installed version. */
|
|
1294
|
+
version: string;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
/** `plugin/changed` params (tdd SS3.29.5): an install landed; clients re-issue `plugin/list` (plus `hook/list` and `skill/list`). */
|
|
1298
|
+
export interface PluginChangedParams {
|
|
1299
|
+
/** The installed record's own switch. */
|
|
1300
|
+
enabled: boolean;
|
|
1301
|
+
/** The installed record's identifier. */
|
|
1302
|
+
id: string;
|
|
1303
|
+
/** The acting session. */
|
|
1304
|
+
sessionId: string;
|
|
1305
|
+
/** The installed-list provenance vocabulary (tdd SS3.26.2). */
|
|
1306
|
+
source: PluginSource;
|
|
1307
|
+
/** The installed record's version. */
|
|
1308
|
+
version: string;
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
/** The `plugin/install` local-path arm (tdd SS3.29.1). */
|
|
1312
|
+
export interface PluginInstallLocalPathTarget {
|
|
1313
|
+
/** The host folder to install from; absolute recommended, relative resolves against the host working directory. */
|
|
1314
|
+
path: string;
|
|
1315
|
+
/** The install lane; omitted means `default`. */
|
|
1316
|
+
scope?: PluginInstallScope;
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
/** The `plugin/install` marketplace arm (tdd SS3.29.1). */
|
|
1320
|
+
export interface PluginInstallMarketplaceTarget {
|
|
1321
|
+
/** The configured marketplace name. */
|
|
1322
|
+
marketplace: string;
|
|
1323
|
+
/** The plugin name within the store. */
|
|
1324
|
+
name: string;
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
/** `plugin/install` params (tdd SS3.29.1). Per-session params plus a client-generated `commandId` (UUIDv7) with the uniform SS3.1.1 idempotency contract. */
|
|
1328
|
+
export interface PluginInstallParams {
|
|
1329
|
+
/** The client-generated idempotency key (UUIDv7). */
|
|
1330
|
+
commandId: string;
|
|
1331
|
+
/** The target session; its workspace resolves project scope. */
|
|
1332
|
+
sessionId: string;
|
|
1333
|
+
/** Exactly one install target arm. */
|
|
1334
|
+
target: PluginInstallTarget;
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
/** `plugin/install` result (tdd SS3.29.1): the SS3.1.2 ack envelope plus the installed receipt. */
|
|
1338
|
+
export interface PluginInstallResult {
|
|
1339
|
+
/** The echoed idempotency key. */
|
|
1340
|
+
commandId: string;
|
|
1341
|
+
/** The installed record's own switch. */
|
|
1342
|
+
enabled: boolean;
|
|
1343
|
+
/** The installed record's identifier. */
|
|
1344
|
+
id: string;
|
|
1345
|
+
/** The installed-list provenance vocabulary (tdd SS3.26.2). */
|
|
1346
|
+
source: PluginSource;
|
|
1347
|
+
/** The ack status. */
|
|
1348
|
+
status: CommandStatus;
|
|
1349
|
+
/** The installed record's version. */
|
|
1350
|
+
version: string;
|
|
1351
|
+
/** The installer's advisory text when the install succeeded with a caveat; absent otherwise. */
|
|
1352
|
+
warning?: string;
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
/** The `plugin/install` local-path scope (tdd SS3.29.1). Closed: an unknown scope is `-32602 invalidParams`. */
|
|
1356
|
+
export type PluginInstallScope = "default" | "user" | "project";
|
|
1357
|
+
|
|
1358
|
+
/** The one structured install target (tdd SS3.29.1): a flat object with two optional arms, exactly one present — the `TurnInputPart` convention, since the v1 schema model names no object-variant union. Both arms or neither is `-32602 invalidParams`. */
|
|
1359
|
+
export interface PluginInstallTarget {
|
|
1360
|
+
/** The local-path arm: install from a host folder. */
|
|
1361
|
+
localPath?: PluginInstallLocalPathTarget;
|
|
1362
|
+
/** The marketplace arm: install a named plugin from a store. */
|
|
1363
|
+
marketplace?: PluginInstallMarketplaceTarget;
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
/** `plugin/list` params (tdd SS3.26.2). Per-session params; rows are the installed plugin records. */
|
|
1367
|
+
export interface PluginListParams {
|
|
1368
|
+
/** The target session. */
|
|
1369
|
+
sessionId: string;
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
/** `plugin/list` result (tdd SS3.26.2): one row per installed plugin record; the spec promises the set, not an order. */
|
|
1373
|
+
export interface PluginListResult {
|
|
1374
|
+
/** The installed plugin rows. */
|
|
1375
|
+
plugins: PluginCatalogEntry[];
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
/** `plugin/marketplaceAdd` params (tdd SS3.29.2). Per-session params plus a client-generated `commandId` (UUIDv7). */
|
|
1379
|
+
export interface PluginMarketplaceAddParams {
|
|
1380
|
+
/** The client-generated idempotency key (UUIDv7). */
|
|
1381
|
+
commandId: string;
|
|
1382
|
+
/** The marketplace name to configure. */
|
|
1383
|
+
name: string;
|
|
1384
|
+
/** The target session. */
|
|
1385
|
+
sessionId: string;
|
|
1386
|
+
/** The app's source vocabulary: `owner/repo`, a git URL, a `file://` URL, or a local path. */
|
|
1387
|
+
source: string;
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
/** What happened to a marketplace (tdd SS3.29.6). Closed: an unknown change is a contract violation, never tolerated. */
|
|
1391
|
+
export type PluginMarketplaceChange = "added" | "updated" | "removed";
|
|
1392
|
+
|
|
1393
|
+
/** `plugin/marketplaceChanged` params (tdd SS3.29.6): a marketplace was added, updated, or removed. */
|
|
1394
|
+
export interface PluginMarketplaceChangedParams {
|
|
1395
|
+
/** What happened. */
|
|
1396
|
+
change: PluginMarketplaceChange;
|
|
1397
|
+
/** The marketplace name. */
|
|
1398
|
+
name: string;
|
|
1399
|
+
/** The stored record's plugin count; omitted on `removed`, never fabricated. */
|
|
1400
|
+
pluginCount?: number;
|
|
1401
|
+
/** The acting session. */
|
|
1402
|
+
sessionId: string;
|
|
1403
|
+
/** The stored record's skipped count; omitted on `removed`, never fabricated. */
|
|
1404
|
+
skippedCount?: number;
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
/** The stored marketplace record both add and update answer (tdd SS3.29.2, SS3.29.3): the SS3.1.2 ack envelope plus the record. */
|
|
1408
|
+
export interface PluginMarketplaceRecordResult {
|
|
1409
|
+
/** The echoed idempotency key. */
|
|
1410
|
+
commandId: string;
|
|
1411
|
+
/** The configured marketplace name. */
|
|
1412
|
+
name: string;
|
|
1413
|
+
/** The plugins the store now offers. */
|
|
1414
|
+
pluginCount: number;
|
|
1415
|
+
/** Entries the store could not offer, with the reason each was skipped; empty when nothing was skipped. */
|
|
1416
|
+
skipped: PluginMarketplaceSkippedEntry[];
|
|
1417
|
+
/** The normalized stored source. */
|
|
1418
|
+
source: PluginMarketplaceSourceShape;
|
|
1419
|
+
/** The ack status. */
|
|
1420
|
+
status: CommandStatus;
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
/** `plugin/marketplaceRemove` params (tdd SS3.29.4). Per-session params plus a client-generated `commandId` (UUIDv7). */
|
|
1424
|
+
export interface PluginMarketplaceRemoveParams {
|
|
1425
|
+
/** The client-generated idempotency key (UUIDv7). */
|
|
1426
|
+
commandId: string;
|
|
1427
|
+
/** The marketplace name to remove. */
|
|
1428
|
+
name: string;
|
|
1429
|
+
/** The target session. */
|
|
1430
|
+
sessionId: string;
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
/** `plugin/marketplaceRemove` result (tdd SS3.29.4): the SS3.1.2 ack envelope plus the removed name. */
|
|
1434
|
+
export interface PluginMarketplaceRemoveResult {
|
|
1435
|
+
/** The echoed idempotency key. */
|
|
1436
|
+
commandId: string;
|
|
1437
|
+
/** The removed marketplace name. */
|
|
1438
|
+
name: string;
|
|
1439
|
+
/** The ack status. */
|
|
1440
|
+
status: CommandStatus;
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
/** One skipped marketplace entry (tdd SS3.29.2). */
|
|
1444
|
+
export interface PluginMarketplaceSkippedEntry {
|
|
1445
|
+
/** The skipped plugin. */
|
|
1446
|
+
plugin: string;
|
|
1447
|
+
/** Why it was skipped. */
|
|
1448
|
+
reason: string;
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
/** The normalized stored marketplace source (tdd SS3.29.2). */
|
|
1452
|
+
export interface PluginMarketplaceSourceShape {
|
|
1453
|
+
/** The stored source kind. */
|
|
1454
|
+
kind: string;
|
|
1455
|
+
/** The stored source path. */
|
|
1456
|
+
path: string;
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
/** `plugin/marketplaceUpdate` params (tdd SS3.29.3). Per-session params plus a client-generated `commandId` (UUIDv7). */
|
|
1460
|
+
export interface PluginMarketplaceUpdateParams {
|
|
1461
|
+
/** The client-generated idempotency key (UUIDv7). */
|
|
1462
|
+
commandId: string;
|
|
1463
|
+
/** The marketplace name to refresh. */
|
|
1464
|
+
name: string;
|
|
1465
|
+
/** The target session. */
|
|
1466
|
+
sessionId: string;
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
/** 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. */
|
|
1470
|
+
export type PluginSource = "curated" | "marketplaceUserAdded" | "foreignImport" | "nativeLocal" | (string & {});
|
|
1471
|
+
|
|
1472
|
+
/** Typed quota-exhaustion detail (tdd SS4.5.1, ADR 50047 D2): the limit kind plus the provider's reset instant. */
|
|
1473
|
+
export interface QuotaDetail {
|
|
1474
|
+
/** Which quota was exhausted (open enum; unknown values fall back). */
|
|
1475
|
+
limitKind: LimitKind;
|
|
1476
|
+
/** Epoch milliseconds at which the provider says usage resets. */
|
|
1477
|
+
resetsAtMs: number;
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1026
1480
|
/** The reasoning-effort tier sampled at submission (tdd SS3.2, SS3.3). The **same closed tier vocabulary** on both the fresh-turn and steer lanes, spelled identically; invalid tiers are invalid params. `none` is a tier of the vocabulary (ask for no reasoning), not a way to say "unset". */
|
|
1027
1481
|
export type ReasoningEffort = "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | "ultra";
|
|
1028
1482
|
|
|
@@ -1037,6 +1491,60 @@ export interface ReasoningEffortState {
|
|
|
1037
1491
|
source: ReasoningEffortChangeSource;
|
|
1038
1492
|
}
|
|
1039
1493
|
|
|
1494
|
+
/** `recap/cancel` params (tdd SS3.28.5): the session plus the cancel's own retry id. No target — one in-flight slot per session makes the target unambiguous. */
|
|
1495
|
+
export interface RecapCancelParams {
|
|
1496
|
+
/** The cancel's own retry id (required, SS3.1.1). */
|
|
1497
|
+
commandId: string;
|
|
1498
|
+
/** The session whose in-flight recap to cancel (required). */
|
|
1499
|
+
sessionId: string;
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
/** `recap/cancel` result (tdd SS3.28.5): admission only. In flight → the recap settles `cancelled`; idle → accepted no-op. */
|
|
1503
|
+
export interface RecapCancelResult {
|
|
1504
|
+
/** The cancel's id, echoed. */
|
|
1505
|
+
commandId: string;
|
|
1506
|
+
/** Always `accepted` on this path. */
|
|
1507
|
+
status: CommandStatus;
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
/** `recap/completed` params (tdd SS3.28.2): the settlement, delivered to the requesting connection outside the view stream — no `viewCursor`, no `sourceRange`. `text` is required on `completed` (plus optional `title`, untrusted model output — clients MUST sanitize per spec 442 INV-015); `reason` is required on `failed`; neither rides `cancelled`/`timedOut`. The struct marks the conditional members optional; the SS prose pins the per-outcome rule, the `turn/completed` usage/error convention. */
|
|
1511
|
+
export interface RecapCompletedParams {
|
|
1512
|
+
/** The request's id — the correlation key. */
|
|
1513
|
+
commandId: string;
|
|
1514
|
+
/** How the request settled. */
|
|
1515
|
+
outcome: RecapOutcome;
|
|
1516
|
+
/** Why the side-call failed (on `failed`). */
|
|
1517
|
+
reason?: RecapFailureReason;
|
|
1518
|
+
/** The recapped session. */
|
|
1519
|
+
sessionId: string;
|
|
1520
|
+
/** The recap text verbatim (on `completed`). */
|
|
1521
|
+
text?: string;
|
|
1522
|
+
/** The model-produced short title (on `completed`, when produced). */
|
|
1523
|
+
title?: string;
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
/** `recap/completed` failure reason (tdd SS3.28.2/SS3.28.8): post-ack failures fold to the single initial value. **Open**: later splits stay additive (#22785 E2). */
|
|
1527
|
+
export type RecapFailureReason = "providerFailed" | (string & {});
|
|
1528
|
+
|
|
1529
|
+
/** `recap/completed` outcome (tdd SS3.28.2): the terminal vocabulary, camelCase per SS1.6. **Open**: a server-produced result vocabulary (#22785 E2). */
|
|
1530
|
+
export type RecapOutcome = "completed" | "failed" | "cancelled" | "timedOut" | (string & {});
|
|
1531
|
+
|
|
1532
|
+
/** `recap/request` params (tdd SS3.28.1): the session plus the client-minted UUIDv7 retry id. No other param; unknown fields are `invalidParams`. */
|
|
1533
|
+
export interface RecapRequestParams {
|
|
1534
|
+
/** The client-minted retry id (required, SS3.1.1). */
|
|
1535
|
+
commandId: string;
|
|
1536
|
+
/** The session to recap (required). */
|
|
1537
|
+
sessionId: string;
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
/** `recap/request` result (tdd SS3.28.1): admission only — the ack is never the recap. */
|
|
1541
|
+
export interface RecapRequestResult {
|
|
1542
|
+
/** The request's id, echoed. */
|
|
1543
|
+
commandId: string;
|
|
1544
|
+
/** Always `accepted` on this path. */
|
|
1545
|
+
status: CommandStatus;
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1040
1548
|
/** One end of a [`SourceRange`]: a record's event id and its sequence number within the stream (tdd SS4.2). */
|
|
1041
1549
|
export interface RecordPosition {
|
|
1042
1550
|
/** The record's event id. */
|
|
@@ -1066,6 +1574,9 @@ export type RequestId = number | string;
|
|
|
1066
1574
|
export interface RequestReceipt {
|
|
1067
1575
|
}
|
|
1068
1576
|
|
|
1577
|
+
/** 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. */
|
|
1578
|
+
export type RetractOutcome = "accepted" | "declined" | (string & {});
|
|
1579
|
+
|
|
1069
1580
|
/** The `schema` pair in [`InitializeResult`] (SS1.4.1, SS1.5.3). `version` is the wire **envelope** schema version — distinct from the session-view `schemaVersion`, the raw-log `schema_version`, and the 0.x/1.0 stability posture, which is not on the wire at all (INV-006a). */
|
|
1070
1581
|
export interface SchemaInfo {
|
|
1071
1582
|
/** `sha256:<64 lower hex>` content hash of this server binary's stable-surface bundle (INV-003). A mismatch is a warning condition, not an error (SS1.4.1). */
|
|
@@ -1094,22 +1605,30 @@ export interface Session {
|
|
|
1094
1605
|
branch?: string;
|
|
1095
1606
|
/** RFC3339. For a fork this is the fork session id's UUIDv7 mint instant (tdd SS2.4). */
|
|
1096
1607
|
createdAt: string;
|
|
1608
|
+
/** The handshake `ClientInfo` recorded when the session was opened (FR-003), echoed verbatim — provenance, never an interpretation, and never a visibility gate (INV-005). **Additive-optional**; absence has four indistinguishable causes (INV-004): an in-process open; a pre-#23124 record; a half stamp where only one of name/version was recorded (FM-005) and `ClientInfo` requires both; and a session with no admitting handshake of its own — a fork child or a subagent — which never carries a stamp to begin with. */
|
|
1609
|
+
createdByClient?: ClientInfo;
|
|
1097
1610
|
/** Derived first-user-prompt preview (tdd SS2.14.1, #27598). **Additive-optional**, omitted when underivable. */
|
|
1098
1611
|
firstUserPrompt?: string;
|
|
1099
1612
|
/** `null` for root sessions; fork provenance otherwise (tdd SS2.4). */
|
|
1100
1613
|
forkedFrom: ForkProvenance | null;
|
|
1614
|
+
/** What kind of session this is (spec 42713 FR-001, ADR 42713 D1/D4). **Open enum**, v1 values `"root"` and `"subagent"`; a client treats an unknown value as an unknown-but-present kind and renders it, never rejecting the row. **Additive-optional**: absence asserts nothing — the host could not determine the home shape (FM-001), or the value is not yet available to serve (FM-003). */
|
|
1615
|
+
kind?: SessionKind;
|
|
1101
1616
|
/** Content-activity recency, RFC3339 (tdd SS2.4, ADR 31983 D5). **Additive-optional**: omitted when no content record exists. Never advanced by lifecycle bookkeeping (the resume marker, re-stamps) or a fork's copied seed-replay records, and never precedes `createdAt`. */
|
|
1102
1617
|
lastActivityAt?: string;
|
|
1103
1618
|
/** The winning metadata fold's model; `null` when that record omits it. */
|
|
1104
1619
|
modelId: string | null;
|
|
1105
1620
|
/** The durable allocated session name (tdd SS2.4/SS2.14.1, #27598; ADR 27598 D2/D4). **Additive-optional**: present when the serving path holds an allocated name, omitted otherwise — absent is never fabricated. Authoritative and renameable via `session/rename`. */
|
|
1106
1621
|
name?: string;
|
|
1622
|
+
/** 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. */
|
|
1623
|
+
parentSessionId?: string;
|
|
1107
1624
|
/** 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. */
|
|
1108
1625
|
path: string;
|
|
1109
1626
|
/** The winning metadata fold's provider; `null` when that record omits it. */
|
|
1110
1627
|
providerId: string | null;
|
|
1111
1628
|
/** The session identity. */
|
|
1112
1629
|
sessionId: string;
|
|
1630
|
+
/** `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`. */
|
|
1631
|
+
sideFrom?: SideProvenance | null;
|
|
1113
1632
|
/** Load state as this host knows it; `session/list` reports `notLoaded` for sessions loaded by *other* hosts (tdd SS2.4). */
|
|
1114
1633
|
status: SessionStatus;
|
|
1115
1634
|
/** Derived display title (tdd SS2.14.1, #27598): a heuristic that may evolve — its carriage, not its derivation, is the contract. **Additive-optional**, omitted when underivable. */
|
|
@@ -1143,7 +1662,7 @@ export interface SessionApprovalModeChangedParams {
|
|
|
1143
1662
|
/** `session/branchChanged` params (tdd SS4.6.4): a durable workspace-branch observation landed. */
|
|
1144
1663
|
export interface SessionBranchChangedParams {
|
|
1145
1664
|
/** The observed branch; `null` on a detached-HEAD observation — a fact, not "unchanged" (tdd SS4.6.4). */
|
|
1146
|
-
branch
|
|
1665
|
+
branch: string | null;
|
|
1147
1666
|
/** The owning session. */
|
|
1148
1667
|
sessionId: string;
|
|
1149
1668
|
/** The durable records this event folded from. */
|
|
@@ -1211,37 +1730,6 @@ export interface SessionContextUsageParams {
|
|
|
1211
1730
|
windowTokens?: number;
|
|
1212
1731
|
}
|
|
1213
1732
|
|
|
1214
|
-
/** The persisted deletion terminal, separate from admission (SS3.24). The shared schema is one object. Actual failed producers send both optional fields; completed producers omit both. Clients enforce those obligations before interpreting a known outcome. Preserve unknown strings without treating them as successful completion. */
|
|
1215
|
-
export interface SessionDeleteCompletedParams {
|
|
1216
|
-
/** Idempotency key of the original deletion command. */
|
|
1217
|
-
commandId: string;
|
|
1218
|
-
/** Deletion result; an unknown value leaves the command pending. */
|
|
1219
|
-
outcome: SessionDeleteOutcome;
|
|
1220
|
-
/** Erasure evidence for a failed result; omitted for a completed result. */
|
|
1221
|
-
physicalChange?: SessionDeletePhysicalChange;
|
|
1222
|
-
/** Required for a failed result and omitted for a completed result. */
|
|
1223
|
-
reason?: SessionDeleteFailureReason;
|
|
1224
|
-
/** Session named by the original deletion command. */
|
|
1225
|
-
sessionId: string;
|
|
1226
|
-
}
|
|
1227
|
-
|
|
1228
|
-
/** Stable deletion-failure vocabulary known to this version (SS3.24). The server emits only these values. Future reason strings remain an open result vocabulary; consumers cannot infer completion from any reason. */
|
|
1229
|
-
export type SessionDeleteFailureReason = "ownershipUnavailable" | "sharedSource" | "writerBusy" | "unsafeSource" | "sourceChanged" | "quiescenceFailed" | "cancelled" | "storageFailure" | "cleanupIncomplete" | "unsupportedLayout" | (string & {});
|
|
1230
|
-
|
|
1231
|
-
/** Known terminal outcomes. A future outcome cannot authorize success or exit. */
|
|
1232
|
-
export type SessionDeleteOutcome = "completed" | "failed" | (string & {});
|
|
1233
|
-
|
|
1234
|
-
/** `session/delete` params. The host validates a non-nil legacy-valid UUID target and a UUID-v7 command identity before admission. Unknown members are ignored and do not enter the normalized command identity (SS1.5.4). */
|
|
1235
|
-
export interface SessionDeleteParams {
|
|
1236
|
-
/** UUID-v7 idempotency key for this deletion command. */
|
|
1237
|
-
commandId: string;
|
|
1238
|
-
/** Non-nil UUID of the session selected for deletion. */
|
|
1239
|
-
sessionId: string;
|
|
1240
|
-
}
|
|
1241
|
-
|
|
1242
|
-
/** The failed attempt's immutable snapshot of persisted physical evidence. `possible` is recorded before a detach/unlink, `confirmed` after a proved owned effect. A failure never resets that evidence merely because the session path is absent. Unknown strings remain representable; consumers must treat them conservatively as `possible`. */
|
|
1243
|
-
export type SessionDeletePhysicalChange = "none" | "possible" | "confirmed" | (string & {});
|
|
1244
|
-
|
|
1245
1733
|
/** 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. */
|
|
1246
1734
|
export type SessionDurability = "durable" | "ephemeral" | (string & {});
|
|
1247
1735
|
|
|
@@ -1272,7 +1760,7 @@ export interface SessionForkResult {
|
|
|
1272
1760
|
/** `session/goalChanged` params (tdd SS4.6.2): the projected goal block's value changed — identical adoptions emit nothing (the change gate), and an explicit `null` clears. Replace wholesale; `null` never means unchanged. */
|
|
1273
1761
|
export interface SessionGoalChangedParams {
|
|
1274
1762
|
/** The full current goal block, or `null` to clear. */
|
|
1275
|
-
goal
|
|
1763
|
+
goal: Goal | null;
|
|
1276
1764
|
/** The owning session. */
|
|
1277
1765
|
sessionId: string;
|
|
1278
1766
|
/** The durable records this event folded from. */
|
|
@@ -1293,6 +1781,9 @@ export interface SessionHistory {
|
|
|
1293
1781
|
snapshot: ViewSnapshot | null;
|
|
1294
1782
|
}
|
|
1295
1783
|
|
|
1784
|
+
/** What kind of session this is (spec 42713 FR-001/FR-005, ADR 42713 D1/D4). **Open**: a new kind is additive evolution, and a client MUST render an unknown value as an unknown-but-present kind rather than rejecting the row. Both v1 values are terms the tree already uses — the child log directory is `subagent` and `ItemKind` already carries a `subagent` variant — so no new vocabulary is minted. */
|
|
1785
|
+
export type SessionKind = "root" | "subagent" | (string & {});
|
|
1786
|
+
|
|
1296
1787
|
/** Exact branch selection (#42035 FR-42035-2). */
|
|
1297
1788
|
export interface SessionListBranchFilter {
|
|
1298
1789
|
/** 1–32 nonempty branch names, each 1–256 UTF-8 bytes, counted before deduplication; `null` selects sessions with no branch. */
|
|
@@ -1372,7 +1863,7 @@ export interface SessionModelChangedParams {
|
|
|
1372
1863
|
/** The selected model. */
|
|
1373
1864
|
modelId: string;
|
|
1374
1865
|
/** The selected provider; `null` when the selection names none. */
|
|
1375
|
-
providerId
|
|
1866
|
+
providerId: string | null;
|
|
1376
1867
|
/** The owning session. */
|
|
1377
1868
|
sessionId: string;
|
|
1378
1869
|
/** What drove the selection. */
|
|
@@ -1392,7 +1883,7 @@ export interface SessionModelRouteUnservedParams {
|
|
|
1392
1883
|
/** The standing (still bound, now unroutable) model. */
|
|
1393
1884
|
modelId: string;
|
|
1394
1885
|
/** The standing model's provider; `null` when the selection names none. */
|
|
1395
|
-
providerId
|
|
1886
|
+
providerId: string | null;
|
|
1396
1887
|
/** The owning session. */
|
|
1397
1888
|
sessionId: string;
|
|
1398
1889
|
/** The durable records this event folded from. */
|
|
@@ -1425,6 +1916,8 @@ export interface SessionReadParams {
|
|
|
1425
1916
|
export interface SessionReadResult {
|
|
1426
1917
|
/** The served history. */
|
|
1427
1918
|
history: SessionHistory;
|
|
1919
|
+
/** Same member as `session/resume` (tdd SS2.5.5, ADR 36635 D2). */
|
|
1920
|
+
lastTurn?: LastTurn;
|
|
1428
1921
|
/** 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). */
|
|
1429
1922
|
pendingRequests: PendingRequestPointer[];
|
|
1430
1923
|
/** The session as folded point-in-time. */
|
|
@@ -1487,6 +1980,8 @@ export interface SessionResumeParams {
|
|
|
1487
1980
|
export interface SessionResumeResult {
|
|
1488
1981
|
/** The served history. */
|
|
1489
1982
|
history: SessionHistory;
|
|
1983
|
+
/** How the last folded turn ended (tdd SS2.5.2, ADR 36635 D2). **Additive-optional**; absence is a non-assertion. */
|
|
1984
|
+
lastTurn?: LastTurn;
|
|
1490
1985
|
/** The late-joiner pointer set; empty when nothing is pending. */
|
|
1491
1986
|
pendingRequests: PendingRequestPointer[];
|
|
1492
1987
|
/** The loaded session. */
|
|
@@ -1553,6 +2048,26 @@ export interface SessionSetReasoningEffortResult {
|
|
|
1553
2048
|
status: CommandStatus;
|
|
1554
2049
|
}
|
|
1555
2050
|
|
|
2051
|
+
/** `session/sideChat` params (tdd SS2.5.7; ADR 45435 D2). */
|
|
2052
|
+
export interface SessionSideChatParams {
|
|
2053
|
+
/** The SS2.5 idempotency handle (UUIDv7). */
|
|
2054
|
+
commandId: string;
|
|
2055
|
+
/** The source main session. */
|
|
2056
|
+
sessionId: string;
|
|
2057
|
+
}
|
|
2058
|
+
|
|
2059
|
+
/** `session/sideChat` result (tdd SS2.5.7; ADR 45435 D2): the `session/resume` envelope for the **new** side session, whose `session.sideFrom` carries the provenance. The side opens empty. */
|
|
2060
|
+
export interface SessionSideChatResult {
|
|
2061
|
+
/** The served history (inline; SS2.5.7's empty-items half is #49416 — inherited turns surface until the boundary-aware fold lands). */
|
|
2062
|
+
history: SessionHistory;
|
|
2063
|
+
/** The late-joiner pointer set. */
|
|
2064
|
+
pendingRequests: PendingRequestPointer[];
|
|
2065
|
+
/** The new side session, carrying `sideFrom` provenance. */
|
|
2066
|
+
session: Session;
|
|
2067
|
+
/** The new side session's view head. */
|
|
2068
|
+
viewCursor: string;
|
|
2069
|
+
}
|
|
2070
|
+
|
|
1556
2071
|
/** `session/start` params (tdd SS2.5.1). */
|
|
1557
2072
|
export interface SessionStartParams {
|
|
1558
2073
|
/** The session's starting approval mode; server default when omitted or explicit `null` — both spellings select the default (#23468). Select, never create — the value names a mode the host's configuration already defines (tdd SS2.5.1, SS5.12). This is the only surface that declares a non-interactive run's policy (tdd SS5.11, D-008). */
|
|
@@ -1563,6 +2078,8 @@ export interface SessionStartParams {
|
|
|
1563
2078
|
config?: SessionConfig;
|
|
1564
2079
|
/** Initial model; server default when omitted. */
|
|
1565
2080
|
modelId?: string;
|
|
2081
|
+
/** The new session's initial permission profile (amendment 42624 FR-42624-1, ADR 42197 D2): a profile id the host catalog already admits — the rows `permissionProfile/list` serves without `sessionId`. Select, never create. Omitted means today's behavior: the host's configured default under native admission, unchanged. An id the catalog does not carry, or one it serves unavailable, refuses the start `commandRejected` (-32030; `permission_profile_unknown` / `permission_profile_unavailable`) before any durable byte, and an ephemeral host refuses any id (`permission_profile_ephemeral_fixed`). `session/resume` and `session/fork` do not admit the member. Explicit `null` is invalid params: the set of members that tolerate `null` is closed and excludes this one, exactly as it excludes `workspaceRoots`. */
|
|
2082
|
+
permissionProfile?: string;
|
|
1566
2083
|
/** Initial provider routing; server default when omitted or explicit `null` — both spellings select the default (#23468). */
|
|
1567
2084
|
providerId?: string | null;
|
|
1568
2085
|
/** Exact identity for this new root session. When omitted the server mints a UUIDv7. This field never selects an existing session: a retained or reserved id is rejected `commandRejected` with reason `session_id_conflict` (tdd SS2.5.1). */
|
|
@@ -1581,7 +2098,7 @@ export interface SessionStartResult {
|
|
|
1581
2098
|
viewCursor: string;
|
|
1582
2099
|
}
|
|
1583
2100
|
|
|
1584
|
-
/** `session/started` params (tdd SS2.6.1; enrolled by #33065): a session became newly loaded on this host via `session/start` or `session/
|
|
2101
|
+
/** `session/started` params (tdd SS2.6.1; enrolled by #33065): a session became newly loaded on this host via `session/start`, `session/fork`, or `session/sideChat` (never `session/resume` — Appendix C, OQ-F), broadcast to every initialized connection. The one member is the same `$defs/Session` object the `session/start`/`session/fork` results carry, so the broadcast and the result describe one fact through one type — the host builds the broadcast payload as a `$defs/Session` — the fresh-start arm reuses the result's `session` member, the start-replay arm builds the live attach snapshot — and the emission is parity-gated against this type at the producer (`session-server` prod-assembly capture) and over the committed transcript corpus (conformance `session_lifecycle_enrollment`). */
|
|
1585
2102
|
export interface SessionStartedParams {
|
|
1586
2103
|
/** The newly loaded session, as of the start/fork fold. */
|
|
1587
2104
|
session: Session;
|
|
@@ -1627,7 +2144,7 @@ export interface SessionTokenUsageParams {
|
|
|
1627
2144
|
/** Provider finish reason when reported (open vocabulary, verbatim). */
|
|
1628
2145
|
finishReason?: string;
|
|
1629
2146
|
/** The effective model that produced this usage; `null` on pre-schema records — never back-filled, an unpriced leg (tdd SS4.6.5). */
|
|
1630
|
-
modelId
|
|
2147
|
+
modelId: string | null;
|
|
1631
2148
|
/** Prompt tokens counted exactly once under the provider's cache convention (#8803). Server-derived; deterministic — the provider is in the log. */
|
|
1632
2149
|
promptTokens: number;
|
|
1633
2150
|
/** The owning session. */
|
|
@@ -1675,6 +2192,22 @@ export interface SessionViewHealthChangedParams {
|
|
|
1675
2192
|
sessionId: string;
|
|
1676
2193
|
}
|
|
1677
2194
|
|
|
2195
|
+
/** Side provenance folded from the durable side provenance (`SideChatProvenance`, tdd SS2.4/SS2.5.7; ADR 45435 D2). */
|
|
2196
|
+
export interface SideProvenance {
|
|
2197
|
+
/** The `commandId` of the `session/sideChat` that created it. */
|
|
2198
|
+
commandId: string;
|
|
2199
|
+
/** An **opaque provenance string** preserved verbatim from the durable side provenance (`source_cut_cursor`). Display-only — not one of the cursor families: clients MUST NOT parse it and no method accepts it (tdd SS2.4). */
|
|
2200
|
+
cutCursor: string;
|
|
2201
|
+
/** The source main session this side was opened from. */
|
|
2202
|
+
sessionId: string;
|
|
2203
|
+
}
|
|
2204
|
+
|
|
2205
|
+
/** `skill/setActivation` activation target (tdd SS3.30.1). **Closed**: a client-selected write vocabulary (ADR 45433 D2) — a write must fail a scope the host does not implement rather than record activation against an unknown target. Contrast the open read-side [`SkillSource`]. */
|
|
2206
|
+
export type SkillActivationScope = "user" | "project" | "bundled" | "plugin";
|
|
2207
|
+
|
|
2208
|
+
/** The three-state skill activation (tdd SS3.30.1, ADR 10512 — no new state). **Closed**: a client-selected write vocabulary (ADR 45433 D2). */
|
|
2209
|
+
export type SkillActivationState = "on" | "userInvocableOnly" | "off";
|
|
2210
|
+
|
|
1678
2211
|
/** One typed-invocable shortcut spelling (tdd SS3.22.1). A plugin skill may contribute two rows: its bare-name winner and its qualified `<pluginId>:<skillId>` form. */
|
|
1679
2212
|
export interface SkillCatalogEntry {
|
|
1680
2213
|
/** Present when the skill declares an argument hint. */
|
|
@@ -1697,7 +2230,74 @@ export interface SkillChangedParams {
|
|
|
1697
2230
|
sessionId: string;
|
|
1698
2231
|
}
|
|
1699
2232
|
|
|
1700
|
-
/**
|
|
2233
|
+
/** The four receipt-list lengths (tdd SS3.30.2): a client renders counts without walking lists. */
|
|
2234
|
+
export interface SkillImportCounts {
|
|
2235
|
+
/** `failed.len()`. */
|
|
2236
|
+
failed: number;
|
|
2237
|
+
/** `installed.len()`. */
|
|
2238
|
+
installed: number;
|
|
2239
|
+
/** `quarantined.len()`. */
|
|
2240
|
+
quarantined: number;
|
|
2241
|
+
/** `skipped.len()`. */
|
|
2242
|
+
skipped: number;
|
|
2243
|
+
}
|
|
2244
|
+
|
|
2245
|
+
/** One import candidate that could neither install nor quarantine (tdd SS3.30.2): recorded so the run continues past it. `id` is null when the candidate never yielded one — present-but-null, never omitted. */
|
|
2246
|
+
export interface SkillImportFailure {
|
|
2247
|
+
/** The candidate's id, or null when it never yielded one. */
|
|
2248
|
+
id: string | null;
|
|
2249
|
+
/** Why the candidate failed. */
|
|
2250
|
+
reason: string;
|
|
2251
|
+
}
|
|
2252
|
+
|
|
2253
|
+
/** `skill/import` params (tdd SS3.30.2, #45433): import foreign skills through the single `SkillsService::import_skills` seam. */
|
|
2254
|
+
export interface SkillImportParams {
|
|
2255
|
+
/** The SS3.1.1 idempotency handle (UUIDv7) — required even for `dryRun` previews. */
|
|
2256
|
+
commandId: string;
|
|
2257
|
+
/** Preview for the consent UI; writes nothing. Additive-optional, default false. */
|
|
2258
|
+
dryRun?: boolean;
|
|
2259
|
+
/** Re-import over already-imported ids (the CLI `--force` twin). Additive-optional, default false. */
|
|
2260
|
+
force?: boolean;
|
|
2261
|
+
/** The target session. */
|
|
2262
|
+
sessionId: string;
|
|
2263
|
+
/** The foreign ecosystem to import from. */
|
|
2264
|
+
source: SkillImportSource;
|
|
2265
|
+
}
|
|
2266
|
+
|
|
2267
|
+
/** One quarantined import candidate (tdd SS3.30.2): kept, not loaded. */
|
|
2268
|
+
export interface SkillImportQuarantine {
|
|
2269
|
+
/** The candidate's id. */
|
|
2270
|
+
id: string;
|
|
2271
|
+
/** The quarantine reasons. */
|
|
2272
|
+
reasons: string[];
|
|
2273
|
+
}
|
|
2274
|
+
|
|
2275
|
+
/** `skill/import` result (tdd SS3.30.2, #45433): the ack envelope plus the service receipt projection. */
|
|
2276
|
+
export interface SkillImportResult {
|
|
2277
|
+
/** Echoes the client's id. */
|
|
2278
|
+
commandId: string;
|
|
2279
|
+
/** The four list lengths. */
|
|
2280
|
+
counts: SkillImportCounts;
|
|
2281
|
+
/** Echoes the call's preview flag. */
|
|
2282
|
+
dryRun: boolean;
|
|
2283
|
+
/** Candidates that could neither install nor quarantine. Import never aborts the whole run on one bad candidate. */
|
|
2284
|
+
failed: SkillImportFailure[];
|
|
2285
|
+
/** The ids the run installed, in pipeline order. */
|
|
2286
|
+
installed: string[];
|
|
2287
|
+
/** Kept, not loaded, with reasons. */
|
|
2288
|
+
quarantined: SkillImportQuarantine[];
|
|
2289
|
+
/** Ids the run did not install: already-imported ids and in-run duplicates, verbatim from the seam's `skipped` vec. */
|
|
2290
|
+
skipped: string[];
|
|
2291
|
+
/** Echoes the call's ecosystem. */
|
|
2292
|
+
source: SkillImportSource;
|
|
2293
|
+
/** Admission status. */
|
|
2294
|
+
status: CommandStatus;
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2297
|
+
/** `skill/import` foreign ecosystem (tdd SS3.30.2). **Closed**: a client-selected write vocabulary (ADR 45433 D2) — a write must fail an ecosystem the host does not implement rather than import from an unknown dir. The host resolves its own foreign dir (the `foreign_skills_sources` derivation); no client paths cross the wire. */
|
|
2298
|
+
export type SkillImportSource = "claude" | "codex";
|
|
2299
|
+
|
|
2300
|
+
/** `skill/list` params (tdd SS3.22.1, SS3.30.3). Per-session because skill scope follows the session's workspace and plugin state. */
|
|
1701
2301
|
export interface SkillListParams {
|
|
1702
2302
|
/** The target session. */
|
|
1703
2303
|
sessionId: string;
|
|
@@ -1709,6 +2309,36 @@ export interface SkillListResult {
|
|
|
1709
2309
|
skills: SkillCatalogEntry[];
|
|
1710
2310
|
}
|
|
1711
2311
|
|
|
2312
|
+
/** `skill/setActivation` params (tdd SS3.30.1, #45433): turn one skill on or off in any scope through the single `SkillsService::set_activation` seam. */
|
|
2313
|
+
export interface SkillSetActivationParams {
|
|
2314
|
+
/** The activation to apply. */
|
|
2315
|
+
activation: SkillActivationState;
|
|
2316
|
+
/** The SS3.1.1 idempotency handle (UUIDv7). */
|
|
2317
|
+
commandId: string;
|
|
2318
|
+
/** The activation target. */
|
|
2319
|
+
scope: SkillActivationScope;
|
|
2320
|
+
/** Names one skill: a bare or plugin-qualified token from the session's full catalog (tdd SS3.30.3), the SS3.22.1 row vocabulary. */
|
|
2321
|
+
selector: string;
|
|
2322
|
+
/** The target session. */
|
|
2323
|
+
sessionId: string;
|
|
2324
|
+
}
|
|
2325
|
+
|
|
2326
|
+
/** `skill/setActivation` result (tdd SS3.30.1, #45433): the ack envelope plus the applied state. */
|
|
2327
|
+
export interface SkillSetActivationResult {
|
|
2328
|
+
/** The applied activation. */
|
|
2329
|
+
activation: SkillActivationState;
|
|
2330
|
+
/** Echoes the client's id. */
|
|
2331
|
+
commandId: string;
|
|
2332
|
+
/** The activation value in force for that `(selector, scope)` immediately before the write: the same value a full-catalog `skill/list` row would have carried in `activation` for it. */
|
|
2333
|
+
previous: SkillActivationState;
|
|
2334
|
+
/** Echoes the applied write's scope. */
|
|
2335
|
+
scope: SkillActivationScope;
|
|
2336
|
+
/** Echoes the applied write's selector. */
|
|
2337
|
+
selector: string;
|
|
2338
|
+
/** Admission status. */
|
|
2339
|
+
status: CommandStatus;
|
|
2340
|
+
}
|
|
2341
|
+
|
|
1712
2342
|
/** A skill row's source scope (tdd SS3.22.1): the projection of the skills crate's `SkillsSourceScope`. Open (server-produced result vocabulary, the #22785 enum-openness rule): a future scope value is additive. */
|
|
1713
2343
|
export type SkillSource = "bundled" | "user" | "project" | "plugin" | (string & {});
|
|
1714
2344
|
|
|
@@ -1737,7 +2367,7 @@ export interface SnapshotState {
|
|
|
1737
2367
|
/** 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). */
|
|
1738
2368
|
items: Item[];
|
|
1739
2369
|
/** 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. */
|
|
1740
|
-
name?: string;
|
|
2370
|
+
name?: string | null;
|
|
1741
2371
|
/** The pending-approval half of the pending set. */
|
|
1742
2372
|
pendingApprovals: PendingApprovalPointer[];
|
|
1743
2373
|
/** The pending-user-input half of the pending set. */
|
|
@@ -1764,6 +2394,71 @@ export interface SourceRange {
|
|
|
1764
2394
|
stream: StreamRef;
|
|
1765
2395
|
}
|
|
1766
2396
|
|
|
2397
|
+
/** `toolCall.statusAttempt` (tdd SS4.5.5, #45448): the latest `TaskExternalAttemptDetail`, field-for-field — countdown inputs the client renders the tick from, so no event spam. */
|
|
2398
|
+
export interface StatusAttempt {
|
|
2399
|
+
/** The attempt number. */
|
|
2400
|
+
attempt: number;
|
|
2401
|
+
/** The error kind (durable vocabulary, verbatim), when recorded. */
|
|
2402
|
+
errorKind?: string;
|
|
2403
|
+
/** The HTTP status, when recorded. */
|
|
2404
|
+
httpStatus?: number;
|
|
2405
|
+
/** The maximum attempts, when known. */
|
|
2406
|
+
maxAttempts?: number;
|
|
2407
|
+
/** The scheduled next attempt, when known. */
|
|
2408
|
+
nextAttempt?: number;
|
|
2409
|
+
/** The operation (durable vocabulary, verbatim). */
|
|
2410
|
+
operation: string;
|
|
2411
|
+
/** The retry delay in ms, when known. */
|
|
2412
|
+
retryDelayMs?: number;
|
|
2413
|
+
/** The external system (durable vocabulary, verbatim). */
|
|
2414
|
+
system: string;
|
|
2415
|
+
}
|
|
2416
|
+
|
|
2417
|
+
/** `toolCall.statusChildren` (tdd SS4.5.5, #45448): the latest `TaskChildSummaryDetail`, field-for-field. */
|
|
2418
|
+
export interface StatusChildren {
|
|
2419
|
+
/** Active children. */
|
|
2420
|
+
active: number;
|
|
2421
|
+
/** Cancelled children. */
|
|
2422
|
+
cancelled: number;
|
|
2423
|
+
/** Completed children. */
|
|
2424
|
+
completed: number;
|
|
2425
|
+
/** Failed children. */
|
|
2426
|
+
failed: number;
|
|
2427
|
+
/** Total children, when known. */
|
|
2428
|
+
total?: number;
|
|
2429
|
+
}
|
|
2430
|
+
|
|
2431
|
+
/** `toolCall.statusHealth` (tdd SS4.5.5, #45448): the latest `TaskHealthDetail`, field-for-field. */
|
|
2432
|
+
export interface StatusHealth {
|
|
2433
|
+
/** The health level (the durable `TaskHealthLevel` vocabulary verbatim). */
|
|
2434
|
+
level: StatusHealthLevel;
|
|
2435
|
+
/** The reason, when recorded. */
|
|
2436
|
+
reason?: string;
|
|
2437
|
+
}
|
|
2438
|
+
|
|
2439
|
+
/** `toolCall.statusHealth.level` (tdd SS4.5.5, #45448): the durable `TaskHealthLevel` vocabulary verbatim. Open — runtime vocabulary may grow additively, and clients MUST render unknown levels generically. */
|
|
2440
|
+
export type StatusHealthLevel = "ok" | "waiting" | "degraded" | "retrying" | "blocked" | "failed" | (string & {});
|
|
2441
|
+
|
|
2442
|
+
/** `toolCall.statusProgress` (tdd SS4.5.5, #45448): the latest `TaskProgressDetail`, field-for-field. */
|
|
2443
|
+
export interface StatusProgress {
|
|
2444
|
+
/** Completed units. */
|
|
2445
|
+
current: number;
|
|
2446
|
+
/** Total units, when known. */
|
|
2447
|
+
total?: number;
|
|
2448
|
+
/** Unit label, when recorded. */
|
|
2449
|
+
unit?: string;
|
|
2450
|
+
}
|
|
2451
|
+
|
|
2452
|
+
/** `toolCall.statusStep` (tdd SS4.5.5, #45448): the latest `TaskActiveStepDetail`, field-for-field. */
|
|
2453
|
+
export interface StatusStep {
|
|
2454
|
+
/** The step index, when known. */
|
|
2455
|
+
index?: number;
|
|
2456
|
+
/** The active step's label. */
|
|
2457
|
+
label: string;
|
|
2458
|
+
/** The step count, when known. */
|
|
2459
|
+
total?: number;
|
|
2460
|
+
}
|
|
2461
|
+
|
|
1767
2462
|
/** One raw stream named by a [`SourceRange`] (tdd SS4.2). */
|
|
1768
2463
|
export interface StreamRef {
|
|
1769
2464
|
/** The stream id. */
|
|
@@ -1885,6 +2580,37 @@ export interface TaskCommandResult {
|
|
|
1885
2580
|
taskId: string;
|
|
1886
2581
|
}
|
|
1887
2582
|
|
|
2583
|
+
/** One background-task inventory row (tdd SS3.31). The row is the stable contract: `kind` and `status` stay open so a future state extends them without breaking clients. */
|
|
2584
|
+
export interface TaskListEntry {
|
|
2585
|
+
/** Who backgrounded the task, mirroring the item field. **Additive-optional**: absent on pre-split records and registry-only rows, never inferred. */
|
|
2586
|
+
backgroundInitiator?: BackgroundInitiator;
|
|
2587
|
+
/** What the workload is: `"tool"` or `"tool.*"` for item rows (the recorded kind when the registry records one, else `"tool"`); the recorded registry kind string verbatim for registry-only rows. Open vocabulary — clients MUST ignore unknown kinds. A `String`, not an enum: registry kind strings are unbounded. */
|
|
2588
|
+
kind: string;
|
|
2589
|
+
/** The host-known task start, RFC3339. **Additive-optional**: omitted, never guessed, when the host does not know it. */
|
|
2590
|
+
startedAt?: string;
|
|
2591
|
+
/** `"inProgress"` — the only value at this increment, since every listed row is non-terminal by construction. */
|
|
2592
|
+
status: TaskListStatus;
|
|
2593
|
+
/** The `toolCall` item's `itemId` for item rows; the runtime registry id for registry-only rows. */
|
|
2594
|
+
taskId: string;
|
|
2595
|
+
/** The short tool name on item-visible tool rows only; never a label, never arguments. **Additive-optional**: absent elsewhere. */
|
|
2596
|
+
tool?: string;
|
|
2597
|
+
}
|
|
2598
|
+
|
|
2599
|
+
/** `task/list` params (tdd SS3.31): the session whose background-task inventory to read. A read-only query in the `skill/list` mold: no `commandId`, no durable record, no view event. */
|
|
2600
|
+
export interface TaskListParams {
|
|
2601
|
+
/** The target session. */
|
|
2602
|
+
sessionId: string;
|
|
2603
|
+
}
|
|
2604
|
+
|
|
2605
|
+
/** `task/list` result (tdd SS3.31): one row per running background workload in `task/stopAll` reach, oldest first; empty when nothing is running. */
|
|
2606
|
+
export interface TaskListResult {
|
|
2607
|
+
/** The session's live background-task rows. */
|
|
2608
|
+
tasks: TaskListEntry[];
|
|
2609
|
+
}
|
|
2610
|
+
|
|
2611
|
+
/** A task row's status (tdd SS3.31). Open (server-produced result vocabulary, the #22785 enum-openness rule): a future state is additive, and clients MUST ignore unknown statuses. */
|
|
2612
|
+
export type TaskListStatus = "inProgress" | (string & {});
|
|
2613
|
+
|
|
1888
2614
|
/** `task/stopAll` params (tdd §3.15): stop every stoppable background workload live at admission. */
|
|
1889
2615
|
export interface TaskStopAllParams {
|
|
1890
2616
|
/** The SS3.1.1 idempotency handle (UUIDv7). */
|
|
@@ -1950,6 +2676,14 @@ export interface TokenUsage {
|
|
|
1950
2676
|
reasoningTokens: number;
|
|
1951
2677
|
}
|
|
1952
2678
|
|
|
2679
|
+
export type ToolReceipt = { details?: CronReceipt; family: "cron"; operation: ToolReceiptOperation; outcome: ToolReceiptOutcome; } | { details?: CodeModeReceipt; family: "codeMode"; operation: ToolReceiptOperation; outcome: ToolReceiptOutcome; } | { details?: Record<string, unknown>; family: string; operation: string; outcome: string; };
|
|
2680
|
+
|
|
2681
|
+
/** Which operation within the family the receipt describes (ADR 43399 D1/D2). Open — registered per family, never derived from the tool name. */
|
|
2682
|
+
export type ToolReceiptOperation = "create" | "delete" | "list" | "execute" | "wait" | (string & {});
|
|
2683
|
+
|
|
2684
|
+
/** What the operation did (ADR 43399 D1/D2). Open, and a **single shared vocabulary**: a value appearing in two families means the same thing in both, which is why the permitted `status` values are bound to the value here rather than per family. */
|
|
2685
|
+
export type ToolReceiptOutcome = "created" | "duplicate" | "deleted" | "missing" | "listed" | "rejected" | "completed" | "pending" | "failed" | "timedOut" | "cancelled" | (string & {});
|
|
2686
|
+
|
|
1953
2687
|
/** Optional W3C trace context, on requests in both directions only — never on responses or notifications (SS1.8). */
|
|
1954
2688
|
export interface TraceContext {
|
|
1955
2689
|
/** W3C `traceparent` string; receivers that do not trace ignore it. */
|
|
@@ -1982,7 +2716,7 @@ export interface TurnCancelResult {
|
|
|
1982
2716
|
export interface TurnCompletedParams {
|
|
1983
2717
|
/** Turn duration; absent means unmeasured, never fabricated. */
|
|
1984
2718
|
durationMs?: number;
|
|
1985
|
-
/** Present
|
|
2719
|
+
/** Present when `terminal` is `"failed"`, except on a synthesized host-death terminal, which carries `reason` instead (tdd SS4.5.1, ADR 36635 D2): mid-turn failures reach the client here — never as a JSON-RPC error. */
|
|
1986
2720
|
error?: TurnError;
|
|
1987
2721
|
/** The runtime's free-text terminal reason, verbatim. Display and diagnostics only; never branch on it. */
|
|
1988
2722
|
reason?: string;
|
|
@@ -2008,12 +2742,28 @@ export interface TurnError {
|
|
|
2008
2742
|
kind: TurnErrorKind;
|
|
2009
2743
|
/** Human-readable failure text. */
|
|
2010
2744
|
message: string;
|
|
2745
|
+
/** Typed quota-exhaustion detail (ADR 50047 D2/D3): present iff the stopping failure was the quota class. Clients branch on presence, never by parsing `message`. */
|
|
2746
|
+
quota?: QuotaDetail;
|
|
2011
2747
|
/** The server's judgment that resubmitting the same input may succeed. */
|
|
2012
2748
|
retryable: boolean;
|
|
2013
2749
|
}
|
|
2014
2750
|
|
|
2015
2751
|
/** Turn failure classes (tdd SS4.5.1, `TerminalErrorKind` plus the model-task failure class). Open. */
|
|
2016
|
-
export type TurnErrorKind = "stepLimit" | "configError" | "projectionError" | "logError" | "workflowLaunchError" | "environmentError" | "modelError" | "launchError" | "authRequired" | (string & {});
|
|
2752
|
+
export type TurnErrorKind = "stepLimit" | "configError" | "projectionError" | "logError" | "workflowLaunchError" | "environmentError" | "modelError" | "launchError" | "authRequired" | "mcpLinkError" | (string & {});
|
|
2753
|
+
|
|
2754
|
+
/** `turn/foregroundCompleted` params (tdd SS4.5.12): the turn's foreground work is done and named background reminder checks hold the turn open. Explicitly non-terminal: the turn ends only at `turn/completed` / `turn/unqueued`. */
|
|
2755
|
+
export interface TurnForegroundCompletedParams {
|
|
2756
|
+
/** `reminderAgentId`s of the firing's blocking set, never empty; agent ids, never display names. Live-best-effort: reads, resume, and replay may narrow it to the linked subset. */
|
|
2757
|
+
blockingAgents: string[];
|
|
2758
|
+
/** The owning session. */
|
|
2759
|
+
sessionId: string;
|
|
2760
|
+
/** The durable records this event folded from, anchored at the first blocking link of the firing window. */
|
|
2761
|
+
sourceRange: SourceRange;
|
|
2762
|
+
/** The turn whose foreground completed. */
|
|
2763
|
+
turnId: string;
|
|
2764
|
+
/** Opaque, strictly monotonic view cursor (tdd SS4.1). */
|
|
2765
|
+
viewCursor: string;
|
|
2766
|
+
}
|
|
2017
2767
|
|
|
2018
2768
|
/** One ordered content part of a turn submission (tdd SS3.2). File mentions are text, not a part type: write `@relative/path` in a text part. A structured `mention` part is reserved and currently rejected, and an unknown part type is `invalidParams` (tdd SS3.1.2, SS3.2) — which is what closes [`TurnInputPartType`]. Modelled as a discriminated flat object rather than a Rust `enum`, the convention [`crate::view::approval::ApprovalSubject`] already established for a wire union in this crate: the v1 schema model names no object-variant union shape and fails closed on one. The serialized JSON is the tdd shape either way; what a flat object cannot express is "`mediaType` is required exactly when `type` is `image`". **RULED (#22785 E4, owner, 2026-08-26): the precedent is accepted.** A strict union node kind may be funded later as a follow-up; if it is, it must cover [`crate::method::lifecycle::PendingRequestPointer`] too. `height` may only appear together with `width`. `width` may only appear together with `height`. */
|
|
2019
2769
|
export interface TurnInputPart {
|
|
@@ -2031,12 +2781,14 @@ export interface TurnInputPart {
|
|
|
2031
2781
|
text?: string;
|
|
2032
2782
|
/** The part type. */
|
|
2033
2783
|
type: TurnInputPartType;
|
|
2784
|
+
/** The upload receipt, required on a `video` part (tdd SS3.2, SS3.33; ADR 45443 D5): the client-minted id `media/upload` echoed. */
|
|
2785
|
+
uploadId?: string;
|
|
2034
2786
|
/** Pixel width; must be provided together with `height` or not at all (tdd SS3.2). Published as a `dependentRequired` pair under #22785 E6c. */
|
|
2035
2787
|
width?: number;
|
|
2036
2788
|
}
|
|
2037
2789
|
|
|
2038
2790
|
/** The `type` discriminator of a turn input part (tdd SS3.2). Closed: an unknown part type is `invalidParams` (tdd SS3.1.2). */
|
|
2039
|
-
export type TurnInputPartType = "text" | "image" | "skill";
|
|
2791
|
+
export type TurnInputPartType = "text" | "image" | "skill" | "video";
|
|
2040
2792
|
|
|
2041
2793
|
/** `turn/interrupt` params (tdd SS3.4): the "user pressed stop" gesture, on the runtime's priority lane. */
|
|
2042
2794
|
export interface TurnInterruptParams {
|
|
@@ -2064,14 +2816,20 @@ export interface TurnInterruptResult {
|
|
|
2064
2816
|
export interface TurnRef {
|
|
2065
2817
|
/** The `commandId` of the submit that minted it. */
|
|
2066
2818
|
commandId: string;
|
|
2819
|
+
/** `queuedTurns[]` only (#45455; ADR 45443 D7): the queued submit's presentation text, so a late joiner can render it without waiting for launch. A current host sets it on every entry it admits; absent means an older host (or a pre-feature restored entry). Never set on `activeTurn`: the running turn's text is its `userMessage` item. */
|
|
2820
|
+
displayText?: string;
|
|
2821
|
+
/** `queuedTurns[]` only: set when `displayText` was cut to the committed-surface budget, mirroring `userMessage.truncated` (tdd SS4.5.2). Absent unless `true`. */
|
|
2822
|
+
truncated?: boolean;
|
|
2067
2823
|
/** The turn's id, pre-minted per tdd SS3.1.4. */
|
|
2068
2824
|
turnId: string;
|
|
2069
2825
|
}
|
|
2070
2826
|
|
|
2071
|
-
/** `turn/retracted` params (tdd SS4.5.1): an interrupt-paired retract
|
|
2827
|
+
/** `turn/retracted` params (tdd SS4.5.1): an interrupt-paired retract durably settled, accepted or declined (ADR 50074 D1). On `"accepted"` the retracted user-message item is re-emitted via `item/updated` with `retracted: true`; on `"declined"` the client folds the legacy declined rollback instead and no item is re-emitted. */
|
|
2072
2828
|
export interface TurnRetractedParams {
|
|
2073
2829
|
/** The retracted submission's command id. */
|
|
2074
2830
|
commandId: string;
|
|
2831
|
+
/** The retract settlement outcome (tdd SS4.5.1, ADR 50074 D1). Additive-optional: absent reads as `"accepted"` — pre-feature hosts emit the event only for accepted retracts — and so does an unrecognized value (open enum, D-033). */
|
|
2832
|
+
outcome?: RetractOutcome;
|
|
2075
2833
|
/** The owning session. */
|
|
2076
2834
|
sessionId: string;
|
|
2077
2835
|
/** The durable records this event folded from. */
|
|
@@ -2086,6 +2844,10 @@ export interface TurnRetractedParams {
|
|
|
2086
2844
|
export interface TurnRetryScheduledParams {
|
|
2087
2845
|
/** The attempt that failed (producer-normalized, >= 1). */
|
|
2088
2846
|
attempt: number;
|
|
2847
|
+
/** The failing model attempt's durable kind, verbatim (ADR 50047 D2/D3) — a plain string: the durable vocabulary is open-ended. */
|
|
2848
|
+
errorKind?: string;
|
|
2849
|
+
/** The failing model attempt's HTTP status (ADR 50047 D2/D3). */
|
|
2850
|
+
httpStatus?: number;
|
|
2089
2851
|
/** The turn's model-retry chain bound. */
|
|
2090
2852
|
maxAttempts: number;
|
|
2091
2853
|
/** The attempt about to run (producer contract: attempt < nextAttempt <= maxAttempts; not a schema constraint). */
|
|
@@ -2098,6 +2860,8 @@ export interface TurnRetryScheduledParams {
|
|
|
2098
2860
|
sessionId: string;
|
|
2099
2861
|
/** The durable record this event folded from (the session stream's mirror of the retry-scheduled task status; `first == last`). */
|
|
2100
2862
|
sourceRange: SourceRange;
|
|
2863
|
+
/** The failing model attempt's provider system, verbatim (ADR 50047 D2/D3) — e.g. `"meta"`. Absent when no model-attempt facet precedes the retry status on the task (old logs). */
|
|
2864
|
+
system?: string;
|
|
2101
2865
|
/** The running turn whose model attempt is being retried. */
|
|
2102
2866
|
turnId: string;
|
|
2103
2867
|
/** Opaque, strictly monotonic view cursor (tdd SS4.1). */
|
|
@@ -2107,7 +2871,7 @@ export interface TurnRetryScheduledParams {
|
|
|
2107
2871
|
/** What `turn/start` did with the input (tdd SS3.2). Resolves OQ-H in v1: since `queue` is the default `ifBusy`, clients need to distinguish these without folding history. */
|
|
2108
2872
|
export type TurnStartDisposition = "started" | "queued" | "steered" | (string & {});
|
|
2109
2873
|
|
|
2110
|
-
/** `turn/start.providerRequestOptions` is deliberately absent: **RULED (#22785 E3, owner, 2026-08-26) to stay off the published schema.** The schema is the contract, and a free-form-object node kind is revisited only if the experimental field graduates.
|
|
2874
|
+
/** `turn/start` params (tdd SS3.2). `turn/start.providerRequestOptions` is deliberately absent: **RULED (#22785 E3, owner, 2026-08-26) to stay off the published schema.** The schema is the contract, and a free-form-object node kind is revisited only if the experimental field graduates. */
|
|
2111
2875
|
export interface TurnStartParams {
|
|
2112
2876
|
/** The SS3.1.1 idempotency handle (UUIDv7). The fresh turn's `turnId` derives from it (tdd SS3.1.4). */
|
|
2113
2877
|
commandId: string;
|
|
@@ -2121,6 +2885,8 @@ export interface TurnStartParams {
|
|
|
2121
2885
|
reasoningEffort?: ReasoningEffort;
|
|
2122
2886
|
/** The target session. */
|
|
2123
2887
|
sessionId: string;
|
|
2888
|
+
/** A queued `!` shell action riding this turn (tdd SS3.2, ADR 50034): the `!cmd` typed while a turn runs, executed at the next model-call boundary before any later steer. Exclusive with `text` and `skill` input; `input` may be empty only when this member is present. Capability-gated on `userShell`: a carrying turn on a connection without the grant fails `-32010 capabilityRequired`. Explicit `null` is invalid params (the null-tolerant set is closed). A v1 stable member. */
|
|
2889
|
+
userShell?: TurnUserShell;
|
|
2124
2890
|
/** A sticky REPLACEMENT of the session's runtime workspace-root set, binding at this turn's launch and persisting for subsequent turns until replaced again — unlike `reasoningEffort`, which is this-turn-only. Same shape and validation as `session/start.workspaceRoots`; invalid params on an explicit `ifBusy: "steer"` submit and so is explicit `null` (the D-049 null-tolerant set is closed); omitted means "unchanged", never "reset" (tdd SS3.2, ADR 37313 D3, #37313). */
|
|
2125
2891
|
workspaceRoots?: string[];
|
|
2126
2892
|
}
|
|
@@ -2214,6 +2980,12 @@ export interface TurnUnqueuedParams {
|
|
|
2214
2980
|
viewCursor: string;
|
|
2215
2981
|
}
|
|
2216
2982
|
|
|
2983
|
+
/** The queued `!` shell action a `turn/start` carries (tdd SS3.2, ADR 50034): the `!cmd` typed while a turn runs. The shell's command id derives from the carrying turn's `commandId`, exactly as the app's own queued submit does; the params' sibling `displayText` carries the `!…` presentation form. */
|
|
2984
|
+
export interface TurnUserShell {
|
|
2985
|
+
/** The shell command text, without the leading `!`. */
|
|
2986
|
+
commandText: string;
|
|
2987
|
+
}
|
|
2988
|
+
|
|
2217
2989
|
/** One element of a `view/page` result's `events` array: an **unframed view notification** exactly as tdd SS4.2.1 defines it — the nested pair `{"method", "params"}`, which is the live notification minus `jsonrpc` and `emittedAtMs`, with nothing lifted out of `params` and nothing spliced into it. SS4.2.1 is the single normative definition; SS4.7.3 and SS7.4 both cite it, so the two surfaces cannot drift. */
|
|
2218
2990
|
export interface UnframedViewNotification {
|
|
2219
2991
|
/** The event type — the live notification's method name, retained because the type lives only in the notification name and would otherwise be lost (tdd SS4.2.1). */
|
|
@@ -2320,6 +3092,36 @@ export interface UserInputClarifyResult {
|
|
|
2320
3092
|
userInputId: string;
|
|
2321
3093
|
}
|
|
2322
3094
|
|
|
3095
|
+
/** `userInput/engaged` params (tdd SS5.10.4, ADR 45450 D2): a fire-and-forget engagement note — the user started interacting with a timed prompt, so the host disarms that prompt's auto-resolution countdown. No result, no errors, no `commandId`, no ledger row. */
|
|
3096
|
+
export interface UserInputEngagedParams {
|
|
3097
|
+
/** The target session. */
|
|
3098
|
+
sessionId: string;
|
|
3099
|
+
/** The prompt being engaged. */
|
|
3100
|
+
userInputId: string;
|
|
3101
|
+
}
|
|
3102
|
+
|
|
3103
|
+
/** `userInput/interrupt` params (tdd SS5.10.2, ADR 45450 D1): interrupt the named prompt carrying confirmed partial answers, then stop the turn. `answers` is optional and, when present, follows exactly the `userInput/answer` shape and limits (same `questionId` + one-of + `note` rules, same -32057 `userInputAnswerInvalid` on mismatch); absent or empty means interrupt with no confirmed answers. */
|
|
3104
|
+
export interface UserInputInterruptParams {
|
|
3105
|
+
/** Confirmed partial answers the named settlement carries. */
|
|
3106
|
+
answers?: UserInputAnswer[];
|
|
3107
|
+
/** The SS3.1.1 idempotency handle (UUIDv7). */
|
|
3108
|
+
commandId: string;
|
|
3109
|
+
/** The target session. */
|
|
3110
|
+
sessionId: string;
|
|
3111
|
+
/** The prompt being interrupted. */
|
|
3112
|
+
userInputId: string;
|
|
3113
|
+
}
|
|
3114
|
+
|
|
3115
|
+
/** `userInput/interrupt` result (tdd SS5.10.2). */
|
|
3116
|
+
export interface UserInputInterruptResult {
|
|
3117
|
+
/** Echoes the client's id. */
|
|
3118
|
+
commandId: string;
|
|
3119
|
+
/** Admission status. */
|
|
3120
|
+
status: CommandStatus;
|
|
3121
|
+
/** The prompt this interruption settled. */
|
|
3122
|
+
userInputId: string;
|
|
3123
|
+
}
|
|
3124
|
+
|
|
2323
3125
|
export interface UserInputOption {
|
|
2324
3126
|
description?: string;
|
|
2325
3127
|
label: string;
|
|
@@ -2367,6 +3169,8 @@ export type UserInputSelectionMode = "single" | "multiple";
|
|
|
2367
3169
|
export interface UserInputSettledParams {
|
|
2368
3170
|
answers: UserInputAnswer[];
|
|
2369
3171
|
clarification: UserInputClarification | null;
|
|
3172
|
+
/** The decision time as RFC3339, projected from the durable settlement record's own stamp (ADR 45450 D3, ruling 2026-10-01): always present on the wire (schema-required, `null`-able); decoders still tolerate its absence (`default`, never skipped — SS5.10.3 keeps every member present), and current hosts always populate it. */
|
|
3173
|
+
decidedAt: string | null;
|
|
2370
3174
|
decidedByCommandId: string | null;
|
|
2371
3175
|
outcome: UserInputOutcome;
|
|
2372
3176
|
reason: string | null;
|
|
@@ -2485,6 +3289,10 @@ export interface WorkflowChild {
|
|
|
2485
3289
|
childId: string;
|
|
2486
3290
|
/** The child's observed duration, when recorded. */
|
|
2487
3291
|
durationMs?: number;
|
|
3292
|
+
/** The attempt's machine failure class, verbatim when recorded (open, snake_case durable runtime vocabulary — the SS1.6 casing exemption). The attempt's outcome (`terminal`, else `status`) stays authoritative, except that `"completed"` with `failureKind` present means it failed (#17769). */
|
|
3293
|
+
failureKind?: string;
|
|
3294
|
+
/** The attempt's failure reason text, verbatim when recorded except cut to at most 2,048 UTF-8 bytes ending in U+2026 when longer. */
|
|
3295
|
+
failureReason?: string;
|
|
2488
3296
|
/** The child's display label, when recorded. */
|
|
2489
3297
|
label?: string;
|
|
2490
3298
|
/** The child's phase, when recorded. */
|
|
@@ -2518,7 +3326,7 @@ export interface WorkflowChildControlParams {
|
|
|
2518
3326
|
workflowRunId: string;
|
|
2519
3327
|
}
|
|
2520
3328
|
|
|
2521
|
-
/** The shared SS3.19/SS3.20 admission-only ack: deliberately bare `{commandId, status}` — settlement arrives as the workflow item's view events, never through the ack. */
|
|
3329
|
+
/** The shared SS3.19/SS3.20/SS3.32 admission-only ack: deliberately bare `{commandId, status}` — settlement arrives as the workflow item's view events, never through the ack. */
|
|
2522
3330
|
export interface WorkflowControlResult {
|
|
2523
3331
|
/** Echoes the client's id. */
|
|
2524
3332
|
commandId: string;
|
|
@@ -2526,11 +3334,47 @@ export interface WorkflowControlResult {
|
|
|
2526
3334
|
status: CommandStatus;
|
|
2527
3335
|
}
|
|
2528
3336
|
|
|
3337
|
+
/** `workflow/pause` params (tdd SS3.32, ADR 45437 D2): pause a live workflow run, shaped exactly like `workflow/cancel`. */
|
|
3338
|
+
export interface WorkflowPauseParams {
|
|
3339
|
+
/** The SS3.1.1 idempotency handle (UUIDv7). */
|
|
3340
|
+
commandId: string;
|
|
3341
|
+
/** The target session. */
|
|
3342
|
+
sessionId: string;
|
|
3343
|
+
/** The run to pause, exactly as the `workflow` item names it (SS4.5.8); required, non-empty. */
|
|
3344
|
+
workflowRunId: string;
|
|
3345
|
+
}
|
|
3346
|
+
|
|
3347
|
+
/** `workflow/resume` params (tdd SS3.34, ADR 45437 D3): resume a paused workflow run, host-driven. */
|
|
3348
|
+
export interface WorkflowResumeParams {
|
|
3349
|
+
/** The SS3.1.1 idempotency handle (UUIDv7). */
|
|
3350
|
+
commandId: string;
|
|
3351
|
+
/** The target session. */
|
|
3352
|
+
sessionId: string;
|
|
3353
|
+
/** The paused run to resume, exactly as the `workflow` item names it (SS4.5.8); required, non-empty. */
|
|
3354
|
+
workflowRunId: string;
|
|
3355
|
+
}
|
|
3356
|
+
|
|
3357
|
+
/** `workflow/resume` result (tdd SS3.34): admission-only plus the driven turn — always present, since resume always drives (idle fresh turn or busy steer). */
|
|
3358
|
+
export interface WorkflowResumeResult {
|
|
3359
|
+
/** Echoes the client's id. */
|
|
3360
|
+
commandId: string;
|
|
3361
|
+
/** Admission status. */
|
|
3362
|
+
status: CommandStatus;
|
|
3363
|
+
/** The turn the host drove: the fresh resume turn on an idle session, the admission-time active turn on a busy session (a routing fact like the SS3.18 wake-gate's, not settlement). */
|
|
3364
|
+
turnId: string;
|
|
3365
|
+
}
|
|
3366
|
+
|
|
3367
|
+
/** `workflow`: the run's launch token budget (tdd SS4.5.8, #45449). */
|
|
3368
|
+
export interface WorkflowTokenBudget {
|
|
3369
|
+
/** The effective launch budget in tokens, verbatim from the launch fact. */
|
|
3370
|
+
total: number;
|
|
3371
|
+
}
|
|
3372
|
+
|
|
2529
3373
|
/** Every wire method in this schema (SS1.9 index). */
|
|
2530
|
-
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/list" | "session/read" | "turn/start" | "turn/steer" | "turn/interrupt" | "turn/cancel" | "turn/unqueue" | "session/compact" | "session/
|
|
3374
|
+
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/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";
|
|
2531
3375
|
/** Every wire notification in this schema (SS1.9 index). */
|
|
2532
|
-
export type MspNotification = "initialized" | "session/started" | "session/closed" | "
|
|
3376
|
+
export type MspNotification = "initialized" | "session/started" | "session/closed" | "skill/changed" | "turn/started" | "turn/completed" | "turn/retracted" | "turn/retryScheduled" | "turn/unqueued" | "turn/foregroundCompleted" | "item/started" | "item/updated" | "item/delta" | "item/completed" | "view/gap" | "approval/requested" | "approval/updated" | "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";
|
|
2533
3377
|
/** Every server-initiated wire request in this schema (SS5.3/SS5.10.1 index). */
|
|
2534
3378
|
export type MspServerRequest = "approval/request" | "userInput/request";
|
|
2535
3379
|
/** Every error `data.kind` in this schema's error table (SS1.6) — each code's primary kind plus its override kinds. */
|
|
2536
|
-
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" | "viewTruncated" | "outputUnavailable" | "boundaryPruned" | "boundaryUnusable" | "noBoundary" | "approvalNotFound" | "approvalAlreadyResolved" | "approvalChoiceInvalid" | "approvalRequirementStale" | "approvalReviewerUnavailable" | "userInputNotFound" | "userInputAlreadySettled" | "userInputAnswerInvalid";
|
|
3380
|
+
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";
|