@muse-code/sdk 1.4.20 → 1.4.23
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/README.md +54 -5
- package/dist/src/connection/connection.d.ts +67 -7
- package/dist/src/connection/connection.js +68 -11
- package/dist/src/connection/spawn.d.ts +26 -0
- package/dist/src/connection/spawn.js +156 -31
- package/dist/src/connection/surface.d.ts +49 -0
- package/dist/src/connection/surface.js +8 -0
- package/dist/src/facade/approval.js +1 -1
- package/dist/src/facade/client.d.ts +70 -17
- package/dist/src/facade/client.js +198 -62
- package/dist/src/facade/gap-fill.d.ts +2 -0
- package/dist/src/facade/gap-fill.js +11 -2
- package/dist/src/facade/session.d.ts +77 -3
- package/dist/src/facade/session.js +344 -16
- package/dist/src/fingerprint.d.ts +79 -4
- package/dist/src/fingerprint.js +110 -11
- package/dist/src/fingerprint.stamped.d.ts +2 -1
- package/dist/src/fingerprint.stamped.js +2 -1
- package/dist/src/index.d.ts +4 -4
- package/dist/src/index.js +1 -1
- package/dist/src/msp.d.ts +278 -2
- package/package.json +1 -1
package/dist/src/fingerprint.js
CHANGED
|
@@ -21,8 +21,25 @@
|
|
|
21
21
|
* error (tdd SS1.4.1) — additive-optional evolution means an older SDK
|
|
22
22
|
* keeps working against a newer host.
|
|
23
23
|
*/
|
|
24
|
-
import { STAMPED_SCHEMA_FINGERPRINT } from "./fingerprint.stamped.js";
|
|
24
|
+
import { STAMPED_SCHEMA_COMPATIBILITY_EPOCH, STAMPED_SCHEMA_FINGERPRINT, } from "./fingerprint.stamped.js";
|
|
25
25
|
export const EXPECTED_SCHEMA_FINGERPRINT = STAMPED_SCHEMA_FINGERPRINT;
|
|
26
|
+
/**
|
|
27
|
+
* The compatibility epoch this SDK was built against (ADR 22936 D3): the
|
|
28
|
+
* stable bundle's declared count of non-additive advances of the stable
|
|
29
|
+
* surface, stamped by the same `prebuild` step from the same bundle bytes
|
|
30
|
+
* as the fingerprint (the bundle records it at its root, ADR 22936 D5).
|
|
31
|
+
* Never a committed literal, for the same reasons as the fingerprint.
|
|
32
|
+
*/
|
|
33
|
+
export const EXPECTED_SCHEMA_COMPATIBILITY_EPOCH = STAMPED_SCHEMA_COMPATIBILITY_EPOCH;
|
|
34
|
+
/**
|
|
35
|
+
* The default pin of `classifyServedSchema`: module-private, because the two
|
|
36
|
+
* members are already the package's public pins and a third root export
|
|
37
|
+
* would bind the sibling SDKs to mirror it.
|
|
38
|
+
*/
|
|
39
|
+
const EXPECTED_SCHEMA_IDENTITY = {
|
|
40
|
+
fingerprint: EXPECTED_SCHEMA_FINGERPRINT,
|
|
41
|
+
compatibilityEpoch: EXPECTED_SCHEMA_COMPATIBILITY_EPOCH,
|
|
42
|
+
};
|
|
26
43
|
/**
|
|
27
44
|
* What a build-time mismatch MEANS, in the words a human needs at 2am.
|
|
28
45
|
*
|
|
@@ -47,18 +64,100 @@ export function fingerprintMismatchMessage(pinned, actual) {
|
|
|
47
64
|
].join("\n");
|
|
48
65
|
}
|
|
49
66
|
/**
|
|
50
|
-
*
|
|
51
|
-
*
|
|
67
|
+
* FR-22936-8's one reading of a served `compatibilityEpoch`, shared by the
|
|
68
|
+
* handshake and the classifier so the two cannot drift apart: absent, or a
|
|
69
|
+
* non-negative integer. Package-internal: not exported from the root.
|
|
52
70
|
*/
|
|
53
|
-
export function
|
|
54
|
-
|
|
71
|
+
export function isWellFormedEpoch(raw) {
|
|
72
|
+
return raw === undefined || (typeof raw === "number" && Number.isInteger(raw) && raw >= 0);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Classify a host's advertised schema identity against the pin (ADR 22936
|
|
76
|
+
* D3). Equal fingerprints: no check at all, whatever the epochs. A served
|
|
77
|
+
* epoch that is not a non-negative integer reads as absent (FR-22936-8), so
|
|
78
|
+
* this call on `initializeResult.schema` reports the tier the handshake
|
|
79
|
+
* reported. Returns `undefined` when there is nothing to say — a mismatch is
|
|
80
|
+
* surfaced, not thrown; the refusal is the connection's decision, not this
|
|
81
|
+
* function's.
|
|
82
|
+
*/
|
|
83
|
+
export function classifyServedSchema(served) {
|
|
84
|
+
return classify(served, EXPECTED_SCHEMA_IDENTITY);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The classifier's body, with the pin as an argument. Module-private: the
|
|
88
|
+
* pin is the SDK's own (FR-22936-6), never a public parameter; the one
|
|
89
|
+
* other caller is `checkServedFingerprint`.
|
|
90
|
+
*/
|
|
91
|
+
function classify(served, pinned) {
|
|
92
|
+
if (served.fingerprint === pinned.fingerprint)
|
|
55
93
|
return undefined;
|
|
56
|
-
|
|
94
|
+
// A present member that is not a non-negative integer is read as absent
|
|
95
|
+
// (FR-22936-8), here as in the handshake, and nothing is substituted for
|
|
96
|
+
// the value; the handshake alone decides whether to refuse it.
|
|
97
|
+
const raw = served.compatibilityEpoch;
|
|
98
|
+
const servedEpoch = isWellFormedEpoch(raw) ? raw : undefined;
|
|
99
|
+
const base = {
|
|
57
100
|
kind: "schemaFingerprintMismatch",
|
|
58
|
-
pinned,
|
|
59
|
-
served,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
101
|
+
pinned: pinned.fingerprint,
|
|
102
|
+
served: served.fingerprint,
|
|
103
|
+
pinnedEpoch: pinned.compatibilityEpoch,
|
|
104
|
+
};
|
|
105
|
+
if (servedEpoch === undefined || servedEpoch === pinned.compatibilityEpoch) {
|
|
106
|
+
return {
|
|
107
|
+
...base,
|
|
108
|
+
tier: "additive",
|
|
109
|
+
servedEpoch,
|
|
110
|
+
message: `host schema fingerprint ${served.fingerprint} differs from the fingerprint this ` +
|
|
111
|
+
`SDK was built against (${pinned.fingerprint}); proceeding under additive-optional ` +
|
|
112
|
+
`evolution (SS1.5.4). Rebuild after a schema advance.`,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
return {
|
|
116
|
+
...base,
|
|
117
|
+
tier: "declaredBreaking",
|
|
118
|
+
servedEpoch,
|
|
119
|
+
message: `host schema fingerprint ${served.fingerprint} at compatibility epoch ${String(servedEpoch)} ` +
|
|
120
|
+
`differs from the fingerprint this SDK was built against (${pinned.fingerprint}, epoch ` +
|
|
121
|
+
`${String(pinned.compatibilityEpoch)}) across a declared non-additive advance (ADR 22936 D3). ` +
|
|
122
|
+
`Rebuild the SDK against the served bundle.`,
|
|
63
123
|
};
|
|
64
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* Compare a host's advertised fingerprint against the pin, with no epoch:
|
|
127
|
+
* the pre-#22936 reading, kept for callers that have only the fingerprint.
|
|
128
|
+
* `pinned` overrides the fingerprint only: the pin's epoch is always this
|
|
129
|
+
* build's `EXPECTED_SCHEMA_COMPATIBILITY_EPOCH`, so the warning's
|
|
130
|
+
* `pinnedEpoch` names this build whatever `pinned` names. Returns
|
|
131
|
+
* `undefined` when they agree — a mismatch is surfaced, not thrown.
|
|
132
|
+
*/
|
|
133
|
+
export function checkServedFingerprint(served, pinned = EXPECTED_SCHEMA_FINGERPRINT) {
|
|
134
|
+
return classify({ fingerprint: served }, { fingerprint: pinned, compatibilityEpoch: EXPECTED_SCHEMA_COMPATIBILITY_EPOCH });
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* The connect-time refusal of the declared-breaking tier (ADR 22936 D3):
|
|
138
|
+
* one error naming the served fingerprint and epoch as the bundle to rebuild
|
|
139
|
+
* against, and the SDK's own pin. Thrown only when the caller opted in with
|
|
140
|
+
* `refuseDeclaredBreakingSchema`; the SDK has already closed the host it
|
|
141
|
+
* spawned when this reaches the caller, so a refusal orphans nothing. Its
|
|
142
|
+
* fields are the warning's flat fields (`served`, `servedEpoch`, `pinned`,
|
|
143
|
+
* `pinnedEpoch`), so code that handles both sees one shape.
|
|
144
|
+
*/
|
|
145
|
+
export class SchemaCompatibilityError extends Error {
|
|
146
|
+
kind = "schemaCompatibilityRefused";
|
|
147
|
+
tier = "declaredBreaking";
|
|
148
|
+
served;
|
|
149
|
+
servedEpoch;
|
|
150
|
+
pinned;
|
|
151
|
+
pinnedEpoch;
|
|
152
|
+
constructor(warning) {
|
|
153
|
+
super(`refused at connect: the host serves stable schema ${warning.served} at compatibility ` +
|
|
154
|
+
`epoch ${String(warning.servedEpoch)}, a declared non-additive advance from the bundle this ` +
|
|
155
|
+
`SDK was built against (${warning.pinned}, epoch ${String(warning.pinnedEpoch)}). Rebuild the ` +
|
|
156
|
+
`SDK against the served bundle (ADR 22936 D3). The spawned host was closed.`);
|
|
157
|
+
this.name = "SchemaCompatibilityError";
|
|
158
|
+
this.served = warning.served;
|
|
159
|
+
this.servedEpoch = warning.servedEpoch;
|
|
160
|
+
this.pinned = warning.pinned;
|
|
161
|
+
this.pinnedEpoch = warning.pinnedEpoch;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export declare const STAMPED_SCHEMA_FINGERPRINT = "sha256:
|
|
1
|
+
export declare const STAMPED_SCHEMA_FINGERPRINT = "sha256:b7fb9137267aa35c92424df37a5ac56287006a0e546b197bf0930d593fecbdb1";
|
|
2
|
+
export declare const STAMPED_SCHEMA_COMPATIBILITY_EPOCH = 0;
|
|
@@ -3,4 +3,5 @@
|
|
|
3
3
|
// schema/msp/stable/msp.schema.json through the port in
|
|
4
4
|
// scripts/msp-fingerprint.mjs. A schema advance moves this value at the
|
|
5
5
|
// next build; the file itself is gitignored and never committed.
|
|
6
|
-
export const STAMPED_SCHEMA_FINGERPRINT = "sha256:
|
|
6
|
+
export const STAMPED_SCHEMA_FINGERPRINT = "sha256:b7fb9137267aa35c92424df37a5ac56287006a0e546b197bf0930d593fecbdb1";
|
|
7
|
+
export const STAMPED_SCHEMA_COMPATIBILITY_EPOCH = 0;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
* regeneration, not behind a shape.
|
|
27
27
|
* - Corpus replay + checkpoint equality (slice 1c) — runnable now; own PR.
|
|
28
28
|
*/
|
|
29
|
-
export { EXPECTED_SCHEMA_FINGERPRINT, checkServedFingerprint, fingerprintMismatchMessage, } from "./fingerprint.js";
|
|
30
|
-
export type { FingerprintWarning } from "./fingerprint.js";
|
|
29
|
+
export { EXPECTED_SCHEMA_COMPATIBILITY_EPOCH, EXPECTED_SCHEMA_FINGERPRINT, SchemaCompatibilityError, checkServedFingerprint, classifyServedSchema, fingerprintMismatchMessage, } from "./fingerprint.js";
|
|
30
|
+
export type { AdditiveFingerprintWarning, DeclaredBreakingFingerprintWarning, FingerprintWarning, ServedSchemaIdentity, } from "./fingerprint.js";
|
|
31
31
|
export { ItemStore } from "./fold/item-store.js";
|
|
32
32
|
export type { DeltaApplyOutcome, ItemApplyOutcome, RevisionedItem, TerminalUnknownItemAnnotation, } from "./fold/item-store.js";
|
|
33
33
|
export { SessionStateStore } from "./fold/state-store.js";
|
|
@@ -45,7 +45,7 @@ DeepReadonly, FoldItems, FoldOutcome, FoldSessionState, PendingApproval, Session
|
|
|
45
45
|
export { COMMAND_REJECTED_CODE, COMMAND_REJECTED_KIND, PendingCommandSet, } from "./pending/pending-command-set.js";
|
|
46
46
|
export type { CommandErrorResponse, PendingCommandAck, PendingCommandEntry, PendingCommandSetOptions, PendingDisposition, PendingJoinPlan, PendingRetirement, ReplayAnswer, SnapshotJoinFacts, } from "./pending/pending-command-set.js";
|
|
47
47
|
export { Connection, createUuidV7Mint, MspError, ProtocolError, } from "./connection/connection.js";
|
|
48
|
-
export type { CommandOptions, ConnectionOptions, DuplexTransport, NotificationHandler, ProtocolErrorHandler, ServerRequestHandler, } from "./connection/connection.js";
|
|
48
|
+
export type { CommandOptions, ConnectionOptions, DuplexTransport, NotificationHandler, NotificationListener, ProtocolErrorHandler, ServerRequestHandler, } from "./connection/connection.js";
|
|
49
49
|
export { MspHandshake, MuseServeChild, SpawnedMspConnection, spawnMspConnection, } from "./connection/spawn.js";
|
|
50
50
|
export { MuseClient } from "./facade/client.js";
|
|
51
51
|
export type { MuseClientOptions, MuseClientSpawnOptions, NotificationFailureHandler, NotificationObserver, ResumeSessionOptions, StartSessionOptions, } from "./facade/client.js";
|
|
@@ -59,7 +59,7 @@ export { MuseHostStartError } from "./facade/host-start.js";
|
|
|
59
59
|
export type { HostStartFailure } from "./facade/host-start.js";
|
|
60
60
|
export type { AbnormalExit, HostDeathDischarge, HostDeathNotification, SessionDurabilityProfile, TransportEof, } from "./facade/host-death.js";
|
|
61
61
|
export { Session } from "./facade/session.js";
|
|
62
|
-
export type { PendingCommandView, SessionApplyOutcome, SessionApplyRefusal, SessionEvent, SessionEventsOptions, SessionFoldView, SessionGapBuffered, SessionGapOverlap, SessionOpening, SessionOptions, SubagentReasonOptions, ViewFrame, } from "./facade/session.js";
|
|
62
|
+
export type { PendingCommandView, ReloadOptions, SessionApplyOutcome, SessionApplyRefusal, SessionEvent, SessionEventSubagent, SessionEventsOptions, SessionFoldView, SessionGapBuffered, SessionGapOverlap, SessionOpening, SessionOptions, SessionReplayDuplicate, SubagentReasonOptions, ViewFrame, } from "./facade/session.js";
|
|
63
63
|
export type { ApprovalDecisionInput, ApprovalFailure, ApprovalFailureHandler, ApprovalHandler, } from "./facade/approval.js";
|
|
64
64
|
export type { SendUserTurnOptions, SteerTurnOptions } from "./facade/turn-submit.js";
|
|
65
65
|
export type { RunOptions, RunResult } from "./facade/run.js";
|
package/dist/src/index.js
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* regeneration, not behind a shape.
|
|
27
27
|
* - Corpus replay + checkpoint equality (slice 1c) — runnable now; own PR.
|
|
28
28
|
*/
|
|
29
|
-
export { EXPECTED_SCHEMA_FINGERPRINT, checkServedFingerprint, fingerprintMismatchMessage, } from "./fingerprint.js";
|
|
29
|
+
export { EXPECTED_SCHEMA_COMPATIBILITY_EPOCH, EXPECTED_SCHEMA_FINGERPRINT, SchemaCompatibilityError, checkServedFingerprint, classifyServedSchema, fingerprintMismatchMessage, } from "./fingerprint.js";
|
|
30
30
|
export { ItemStore } from "./fold/item-store.js";
|
|
31
31
|
export { SessionStateStore } from "./fold/state-store.js";
|
|
32
32
|
export { SessionFold } from "./fold/session-fold.js";
|
package/dist/src/msp.d.ts
CHANGED
|
@@ -60,8 +60,20 @@ export interface ApprovalChoice {
|
|
|
60
60
|
/** How long a grant made by a choice lasts. The set is open, so newer hosts may send other values. */
|
|
61
61
|
export type ApprovalChoiceScope = "once" | "session" | "localPersistent" | (string & {});
|
|
62
62
|
|
|
63
|
+
/** A browser card's notices: the first time Computer Use uses a browser on this Mac, and the session's consent before it opens its own window in a browser that comes to the front when it does. A client words each flag itself. */
|
|
64
|
+
export interface ApprovalCuaBrowser {
|
|
65
|
+
/** Show the first-use notice: Computer Use hasn't used this browser on this Mac before and will act signed in as the person. */
|
|
66
|
+
firstUse?: boolean;
|
|
67
|
+
/** The browser's display name. */
|
|
68
|
+
name: string;
|
|
69
|
+
/** Show the window consent line: Computer Use will open its own window in this browser and bring the browser to the front, once per session. */
|
|
70
|
+
windowConsent?: boolean;
|
|
71
|
+
}
|
|
72
|
+
|
|
63
73
|
/** One Computer Use card's facts. Empty collections and absent rows are omitted, never `null`. */
|
|
64
74
|
export interface ApprovalCuaCardFacts {
|
|
75
|
+
/** For a browser card, the notices it carries; absent unless at least one shows. */
|
|
76
|
+
browser?: ApprovalCuaBrowser;
|
|
65
77
|
/** The data the call would send that the card must name; a card with any offers only one-shot choices. */
|
|
66
78
|
data?: ApprovalCuaDataFact[];
|
|
67
79
|
/** For a browser, the host of the window's current page. */
|
|
@@ -1325,8 +1337,10 @@ export interface Item {
|
|
|
1325
1337
|
summary?: string[];
|
|
1326
1338
|
/** `reminderChild`: the linked task id. Unresolved `bodyCompletion` items also set it (FR-87062-1: the diagnostic names the task whose join did not hold). */
|
|
1327
1339
|
taskId?: string;
|
|
1328
|
-
/** Terminal `toolCall`,
|
|
1340
|
+
/** Terminal monitor `toolCall`, drained `subagent`, `backgroundTerminalCompletion`, or Finished-row `toolCall`: render after the target's logical rows (tdd SS4.5.21, ADR 56496 D2/D3, OD #738). */
|
|
1329
1341
|
terminalRowAfterItemId?: string;
|
|
1342
|
+
/** `backgroundTerminalCompletion`, or a terminal `toolCall` that already shows a Finished row: render before the target's whole coalesced region (tdd SS4.5.21, ADR 50041 D6). */
|
|
1343
|
+
terminalRowBeforeItemId?: string;
|
|
1330
1344
|
/** `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). */
|
|
1331
1345
|
text?: string;
|
|
1332
1346
|
/** `workflow`: the run's launch token budget, set from the launch fact (tdd SS4.5.8, #45449); absent when the launch carried none. */
|
|
@@ -2281,6 +2295,8 @@ export type SandboxUnavailableReason = "userNamespacesDenied" | "bubblewrapUnava
|
|
|
2281
2295
|
|
|
2282
2296
|
/** 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). */
|
|
2283
2297
|
export interface SchemaInfo {
|
|
2298
|
+
/** The host's declared compatibility epoch (spec 206 amendment #22936 FR-22936-2, ADR 22936 D2): the count of declared non-additive advances of the stable surface. A client reads a `fingerprint` mismatch by comparing this with its own pin: equal, every difference is additive; different, a declared non-additive advance lies between. Additive-optional: a host that predates the member omits it, and the reader treats absence as unknown, never a guessed value (SS1.5.4). */
|
|
2299
|
+
compatibilityEpoch?: number;
|
|
2284
2300
|
/** `sha256:<64 lower hex>` content hash of this server binary's experimental-surface bundle (ADR 97527 D5). Additive-optional: a host that predates the member omits it, and the reader treats absence as unknown — never a guessed value (SS1.5.4). */
|
|
2285
2301
|
experimentalFingerprint?: string;
|
|
2286
2302
|
/** `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). */
|
|
@@ -2881,7 +2897,7 @@ export interface SessionSideChatParams {
|
|
|
2881
2897
|
|
|
2882
2898
|
/** `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. */
|
|
2883
2899
|
export interface SessionSideChatResult {
|
|
2884
|
-
/** The served history
|
|
2900
|
+
/** The served history: inline, with empty items, since the side opens empty (SS2.5.7). */
|
|
2885
2901
|
history: SessionHistory;
|
|
2886
2902
|
/** The late-joiner pointer set. */
|
|
2887
2903
|
pendingRequests: PendingRequestPointer[];
|
|
@@ -4392,3 +4408,263 @@ export type MspNotification = "initialized" | "session/started" | "session/close
|
|
|
4392
4408
|
export type MspServerRequest = "approval/request" | "userInput/request";
|
|
4393
4409
|
/** Every error `data.kind` in this schema's error table (SS1.6) — each code's primary kind plus its override kinds. */
|
|
4394
4410
|
export type MspErrorDataKind = "parseError" | "invalidRequest" | "notInitialized" | "alreadyInitialized" | "methodNotFound" | "experimentalRequired" | "invalidParams" | "internal" | "pageEventTooLarge" | "outputResultTooLarge" | "overloaded" | "inputTooLarge" | "capabilityRequired" | "notFound" | "interrupted" | "cancelled" | "sessionNotFound" | "sessionInUse" | "sessionAmbiguous" | "forkBoundaryInvalid" | "sessionNotLoaded" | "sessionStreamMismatch" | "commandRejected" | "backpressured" | "skillNotFound" | "computerUseUnavailable" | "marketplaceNotFound" | "pluginNotFound" | "marketplaceAlreadyExists" | "pluginMutationsDisabled" | "uploadNotFound" | "viewTruncated" | "outputUnavailable" | "boundaryPruned" | "boundaryUnusable" | "noBoundary" | "approvalNotFound" | "approvalAlreadyResolved" | "approvalChoiceInvalid" | "approvalRequirementStale" | "approvalReviewerUnavailable" | "userInputNotFound" | "userInputAlreadySettled" | "userInputAnswerInvalid" | "approvalBrokerUnavailable" | "approvalResolving";
|
|
4411
|
+
|
|
4412
|
+
/** Every wire method's `params` and `result` types, keyed by method (SS1.9 index); `params` is `undefined` for a method that takes none. */
|
|
4413
|
+
export interface MspMethodMap {
|
|
4414
|
+
/** Opens the connection: client identification, capability requests, and the experimental opt-in; the reply carries the envelope schema version and the stable-surface fingerprint (SS1.4.1). */
|
|
4415
|
+
"initialize": { params: InitializeParams; result: InitializeResult };
|
|
4416
|
+
/** Queue a user note into a running child; admission-only ack, the note settles on the child session's view stream (SS3.16). */
|
|
4417
|
+
"subagent/sendMessage": { params: SubagentInputParams; result: CommandAcceptedResult };
|
|
4418
|
+
/** Queue a follow-up task for a child; admission-only ack, the task settles on the child session's view stream (SS3.16). */
|
|
4419
|
+
"subagent/followupTask": { params: SubagentInputParams; result: CommandAcceptedResult };
|
|
4420
|
+
/** Ask a child to yield at its next boundary; outcome folds to the parent's subagent item (SS3.16, SS4.5.7). */
|
|
4421
|
+
"subagent/interrupt": { params: SubagentOwnerReasonParams; result: CommandAcceptedResult };
|
|
4422
|
+
/** Stop a running child; outcome folds to the parent's subagent item (SS3.16, SS4.5.7). */
|
|
4423
|
+
"subagent/stop": { params: SubagentOwnerReasonParams; result: CommandAcceptedResult };
|
|
4424
|
+
/** Resume a paused/recoverable child as a durable later attempt (SS3.16). */
|
|
4425
|
+
"subagent/resume": { params: SubagentTargetParams; result: CommandAcceptedResult };
|
|
4426
|
+
/** Reopen a stopped/closed child as a durable later attempt (SS3.16). */
|
|
4427
|
+
"subagent/reopen": { params: SubagentTargetParams; result: CommandAcceptedResult };
|
|
4428
|
+
/** Owner-close a child; the terminal mapping folds per SS4.5.7 (SS3.16). */
|
|
4429
|
+
"subagent/close": { params: SubagentOwnerReasonParams; result: CommandAcceptedResult };
|
|
4430
|
+
/** Consume a ready child result (state-changing; the content is already the subagent item's result field) (SS3.16). */
|
|
4431
|
+
"subagent/readResult": { params: SubagentTargetParams; result: CommandAcceptedResult };
|
|
4432
|
+
/** Lists the session's subagent roster: one row per durable child, running and finished, projected from the loaded parent's runtime subagent control records (kt-o155). */
|
|
4433
|
+
"subagent/list": { params: SubagentListParams; result: SubagentListResult };
|
|
4434
|
+
/** Creates a brand-new session, loads it on this host, durably records the start, and auto-subscribes this connection (SS2.5.1). */
|
|
4435
|
+
"session/start": { params: SessionStartParams; result: SessionStartResult };
|
|
4436
|
+
/** Loads a stored session on this host, auto-subscribes this connection, and returns the history needed to render it (SS2.5.2). */
|
|
4437
|
+
"session/resume": { params: SessionResumeParams; result: SessionResumeResult };
|
|
4438
|
+
/** Branches a session into a new id whose log copies the source through a cut point, with durable provenance (SS2.5.3). */
|
|
4439
|
+
"session/fork": { params: SessionForkParams; result: SessionForkResult };
|
|
4440
|
+
/** Declares that a loaded session is waiting on an external event: the end-of-turn reminder boundary parks a blocking reminder instead of re-verifying until the next input arrives (ADR 66573 amendment). Live-only: a serve restart, unload, or resume loses the declaration; the next user input or an explicit clear ends it. */
|
|
4441
|
+
"session/declareExternalWait": { params: SessionDeclareExternalWaitParams; result: SessionDeclareExternalWaitResult };
|
|
4442
|
+
/** Clears a live host-declared external wait: no declaration is live afterwards, and the end-of-turn reminder boundary returns to today's behaviour at once. Clearing a session with no declaration is a no-op that still answers `declared: false`. */
|
|
4443
|
+
"session/clearExternalWait": { params: SessionClearExternalWaitParams; result: SessionClearExternalWaitResult };
|
|
4444
|
+
/** Admits release of one loaded session; final release or failure is pushed through session/leaveCompleted (SS2.15). */
|
|
4445
|
+
"session/leave": { params: SessionLeaveParams; result: SessionLeaveResult };
|
|
4446
|
+
/** Pages through stored sessions under the sessions root for history and picker UIs; read-only, never touches leases (SS2.5.4). */
|
|
4447
|
+
"session/list": { params: SessionListParams; result: SessionListResult };
|
|
4448
|
+
/** Reads one stored session without attaching: no lease, no load, no subscription, no resume record (SS2.5.5). */
|
|
4449
|
+
"session/read": { params: SessionReadParams; result: SessionReadResult };
|
|
4450
|
+
/** Opens a side chat from a loaded main session, with durable provenance (SS2.5.7; ADR 45435 D2). */
|
|
4451
|
+
"session/sideChat": { params: SessionSideChatParams; result: SessionSideChatResult };
|
|
4452
|
+
/** Submits user input to a session; the optional disposition controls queue, steer, or replace when a turn is already running (SS3.2). */
|
|
4453
|
+
"turn/start": { params: TurnStartParams; result: TurnStartResult };
|
|
4454
|
+
/** Injects input into the turn the caller names, failing if that turn is no longer active (SS3.3). */
|
|
4455
|
+
"turn/steer": { params: TurnSteerParams; result: TurnSteerResult };
|
|
4456
|
+
/** Stops the running turn on the runtime's priority lane, optionally pairing a durable retract intent (SS3.4). */
|
|
4457
|
+
"turn/interrupt": { params: TurnInterruptParams; result: TurnInterruptResult };
|
|
4458
|
+
/** Cancels a turn on the normal command lane, recording no priority interrupt intent (SS3.5). */
|
|
4459
|
+
"turn/cancel": { params: TurnCancelParams; result: TurnCancelResult };
|
|
4460
|
+
/** Reclaims a queued submit before it launches; never upgrades into a cancel once the target is running (SS3.6). */
|
|
4461
|
+
"turn/unqueue": { params: TurnUnqueueParams; result: TurnUnqueueResult };
|
|
4462
|
+
/** Compacts the session's conversation context; runs asynchronously, so the ack is admission only (SS3.7). */
|
|
4463
|
+
"session/compact": { params: SessionCompactParams; result: SessionCompactResult };
|
|
4464
|
+
/** Reconfigures the session's model; the selection is durable and applies to subsequent model calls (SS3.8). */
|
|
4465
|
+
"session/setModel": { params: SessionSetModelParams; result: SessionSetModelResult };
|
|
4466
|
+
/** Sets or changes the durable allocated session name through the runtime session_name command; withheld under the ephemeral profile (SS2.14.2, #27598). */
|
|
4467
|
+
"session/rename": { params: SessionRenameParams; result: SessionRenameResult };
|
|
4468
|
+
/** Sets the session's standing reasoning-effort default; a turn carrying its own tier overrides it for that turn only (SS3.21, ADR 31255 D1). */
|
|
4469
|
+
"session/setReasoningEffort": { params: SessionSetReasoningEffortParams; result: SessionSetReasoningEffortResult };
|
|
4470
|
+
/** Runs a user-initiated shell command in the session's workspace; capability-gated on `userShell` (SS3.9). */
|
|
4471
|
+
"session/userShell": { params: SessionUserShellParams; result: SessionUserShellResult };
|
|
4472
|
+
/** Reads the catalog of models the host will accept in `session/setModel`; a query, not a command (SS3.10). */
|
|
4473
|
+
"model/list": { params: ModelListParams; result: ModelListResult };
|
|
4474
|
+
/** Reads the session's user-invocable skill rows — one per typed-invocable shortcut spelling, the INV-007 predicate and shared name resolution by call-through; a query, not a command (SS3.22.1). */
|
|
4475
|
+
"skill/list": { params: SkillListParams; result: SkillListResult };
|
|
4476
|
+
/** Writes one skill's activation in any scope through the single `SkillsService::set_activation` seam; answers the applied state plus `previous`. `commandId`-idempotent; each successful write is a `skill/changed` detection point (tdd SS3.30.1, ADR 45433 D2/D4/D5, #45433). */
|
|
4477
|
+
"skill/setActivation": { params: SkillSetActivationParams; result: SkillSetActivationResult };
|
|
4478
|
+
/** Imports foreign skills from the host's own `claude | codex` dirs through the single `SkillsService::import_skills` seam; answers per-skill installed/quarantined/skipped/failed plus counts. `commandId`-idempotent (including `dryRun` previews); each successful write is a `skill/changed` detection point (tdd SS3.30.2, ADR 45433 D2/D4/D5, #45433). */
|
|
4479
|
+
"skill/import": { params: SkillImportParams; result: SkillImportResult };
|
|
4480
|
+
/** Reads the session's installed hook rows — one per installed handler per event, config-file handlers plus plugin-contributed hooks; a query, not a command (SS3.26.1). */
|
|
4481
|
+
"hook/list": { params: HookListParams; result: HookListResult };
|
|
4482
|
+
/** Reads the installed plugin records — one row per installed plugin; a query, not a command (SS3.26.2). */
|
|
4483
|
+
"plugin/list": { params: PluginListParams; result: PluginListResult };
|
|
4484
|
+
/** Install one plugin from a marketplace pair or a host local path with scope (per-session, `commandId`-idempotent, hold-open; answers the installed receipt) (SS3.29.1). */
|
|
4485
|
+
"plugin/install": { params: PluginInstallParams; result: PluginInstallResult };
|
|
4486
|
+
/** Add a marketplace from `owner/repo`, git URL, `file://` URL, or local path (per-session, `commandId`-idempotent; answers the stored record) (SS3.29.2). */
|
|
4487
|
+
"plugin/marketplaceAdd": { params: PluginMarketplaceAddParams; result: PluginMarketplaceRecordResult };
|
|
4488
|
+
/** Refresh a marketplace in place (per-session, `commandId`-idempotent; answers the stored record) (SS3.29.3). */
|
|
4489
|
+
"plugin/marketplaceUpdate": { params: PluginMarketplaceUpdateParams; result: PluginMarketplaceRecordResult };
|
|
4490
|
+
/** Remove a marketplace (per-session, `commandId`-idempotent; answers the removed name) (SS3.29.4). */
|
|
4491
|
+
"plugin/marketplaceRemove": { params: PluginMarketplaceRemoveParams; result: PluginMarketplaceRemoveResult };
|
|
4492
|
+
/** Durably sends a running foreground tool task to the background; the `TaskBackgrounded` record lands before the ack and the `toolCall` item's `item/updated` folds the flip (tdd §3.13, #14411; enrolled under the #33065 T1 ruling). */
|
|
4493
|
+
"task/background": { params: TaskBackgroundParams; result: TaskCommandResult };
|
|
4494
|
+
/** Stops one named background task; the kill settles durably and the item folds a terminal (tdd §3.14, #14411; enrolled under the #33065 T1 ruling). */
|
|
4495
|
+
"task/stop": { params: TaskStopParams; result: TaskCommandResult };
|
|
4496
|
+
/** Stops every stoppable background workload live at admission; always accepted, one item terminal folds per stopped item-visible task (tdd §3.15, #14411; enrolled under the #33065 T1 ruling). */
|
|
4497
|
+
"task/stopAll": { params: TaskStopAllParams; result: TaskStopAllResult };
|
|
4498
|
+
/** Lists the loaded session's background-task inventory: one row per stoppable workload at admission, ordered oldest-start first (tdd §3.31, #45144; enrolled under the #33065 T1 ruling). */
|
|
4499
|
+
"task/list": { params: TaskListParams; result: TaskListResult };
|
|
4500
|
+
/** Sets the session goal objective; wakes a goal-driving turn iff idle and the resulting goal is unfinished (tdd SS3.18, spec 14408; enrolled by #33066). */
|
|
4501
|
+
"goal/set": { params: GoalSetParams; result: GoalCommandResult };
|
|
4502
|
+
/** Replaces the current goal's objective under the same wake gate as goal/set (tdd SS3.18, spec 14408; enrolled by #33066). */
|
|
4503
|
+
"goal/edit": { params: GoalEditParams; result: GoalCommandResult };
|
|
4504
|
+
/** Clears the session goal; never wakes and its ack never names a turn (tdd SS3.18, spec 14408; enrolled by #33066). */
|
|
4505
|
+
"goal/clear": { params: GoalClearParams; result: GoalCommandResult };
|
|
4506
|
+
/** Pauses the session goal; never wakes and its ack never names a turn (tdd SS3.18, spec 14408; enrolled by #33066). */
|
|
4507
|
+
"goal/pause": { params: GoalPauseParams; result: GoalCommandResult };
|
|
4508
|
+
/** Resumes a paused goal under the same wake gate as goal/set (tdd SS3.18, spec 14408; enrolled by #33066). */
|
|
4509
|
+
"goal/resume": { params: GoalResumeParams; result: GoalCommandResult };
|
|
4510
|
+
/** Cancels a live workflow run; admission-only bare ack, the cancellation's truth arrives as the workflow item's view events (tdd SS3.19, spec 14410; enrolled by the #33065 sweep). */
|
|
4511
|
+
"workflow/cancel": { params: WorkflowCancelParams; result: WorkflowControlResult };
|
|
4512
|
+
/** Skips or retries one workflow child keyed by the item's (childId, attempt) pair; admission-only bare ack (tdd SS3.20, spec 14410; enrolled by the #33065 sweep). */
|
|
4513
|
+
"workflow/childControl": { params: WorkflowChildControlParams; result: WorkflowControlResult };
|
|
4514
|
+
/** Pauses a live workflow run; admission-only bare ack, the pause folds as the workflow item's `paused` member (tdd SS3.32, ADR 45437 D2). */
|
|
4515
|
+
"workflow/pause": { params: WorkflowPauseParams; result: WorkflowControlResult };
|
|
4516
|
+
/** Resumes a paused workflow run, host-driven; the reply names the driven turn, the resumed launch folds as a new workflow item whose `resumeFromRunId` names the paused run (tdd SS3.34, ADR 45437 D3). */
|
|
4517
|
+
"workflow/resume": { params: WorkflowResumeParams; result: WorkflowResumeResult };
|
|
4518
|
+
/** Moves one video chunk into the session's video store; answers the `uploadId` receipt on every chunk (tdd SS3.33, ADR 45443 D5). */
|
|
4519
|
+
"media/upload": { params: MediaUploadParams; result: MediaUploadResult };
|
|
4520
|
+
/** Attaches this connection's live view subscription for a session at an explicit cursor, replaying `(after, head]` before any live event; the re-attach path after `view/unsubscribe` (SS4.7.1). */
|
|
4521
|
+
"view/subscribe": { params: ViewSubscribeParams; result: ViewSubscribeResult };
|
|
4522
|
+
/** Removes this connection from the session's view subscription set; does not unload the session (SS4.7.2). */
|
|
4523
|
+
"view/unsubscribe": { params: ViewUnsubscribeParams; result: ViewUnsubscribeResult };
|
|
4524
|
+
/** Cursor-paged reads of the session view, forward or backward; each result element is an unframed view notification, the nested {method, params} pair of SS4.2.1 (SS4.7.3). */
|
|
4525
|
+
"view/page": { params: ViewPageParams; result: ViewPageResult };
|
|
4526
|
+
/** Byte-ranged read of stored full output the view truncated; works on loaded and unloaded sessions and takes no lease (SS4.7.4). */
|
|
4527
|
+
"item/readOutput": { params: ItemReadOutputParams; result: ItemReadOutputResult };
|
|
4528
|
+
/** Decides a pending approval, guarded by the current requirement id against the multi-stage race (SS5.4). */
|
|
4529
|
+
"approval/decide": { params: ApprovalDecideParams; result: ApprovalDecideResult };
|
|
4530
|
+
/** Reads the full pending approval and user-input payloads for a session; a lease-free fold read (SS5.7). */
|
|
4531
|
+
"approval/listPending": { params: ApprovalListPendingParams; result: ApprovalListPendingResult };
|
|
4532
|
+
/** Selects a preconfigured approval enforcement mode mid-session; select, never create (SS5.12). */
|
|
4533
|
+
"session/setApprovalMode": { params: SessionSetApprovalModeParams; result: SessionSetApprovalModeResult };
|
|
4534
|
+
/** Answers every question of an open user-input prompt (SS5.10.2). */
|
|
4535
|
+
"userInput/answer": { params: UserInputAnswerParams; result: UserInputAnswerResult };
|
|
4536
|
+
/** Declines an open user-input prompt; the tool call resolves with a cancelled result the model sees (SS5.10.2). */
|
|
4537
|
+
"userInput/cancel": { params: UserInputCancelParams; result: UserInputCancelResult };
|
|
4538
|
+
/** Answers an open user-input prompt with a free-form clarification the model re-decides against (SS5.10.2). */
|
|
4539
|
+
"userInput/clarify": { params: UserInputClarifyParams; result: UserInputClarifyResult };
|
|
4540
|
+
/** Interrupts an open user-input prompt carrying confirmed partial answers, then stops the turn (SS5.10.2, ADR 45450 D1). */
|
|
4541
|
+
"userInput/interrupt": { params: UserInputInterruptParams; result: UserInputInterruptResult };
|
|
4542
|
+
/** Reads the host's last-observed subscription usage window (5h-class and weekly percent blocks, tier, arrival stamp) without a model call; the usage member is omitted when nothing has been observed (ADR 32563 D2). */
|
|
4543
|
+
"usage/read": { params: undefined; result: UsageReadResult };
|
|
4544
|
+
/** Submits a first-party feedback report through the host, reusing the TUI submitter seam (consent, bundle-first persistence, redaction), and answers the upload receipt (ADR 42691 D2). */
|
|
4545
|
+
"feedback/submit": { params: FeedbackSubmitParams; result: FeedbackSubmitResult };
|
|
4546
|
+
/** Requests a "while you were away" recap for a loaded session; acks `accepted` and settles exactly once on `recap/completed` — one in flight per session, host-enforced 45s timeout (ADR 45447 D1/D5, tdd SS3.28.1). */
|
|
4547
|
+
"recap/request": { params: RecapRequestParams; result: RecapRequestResult };
|
|
4548
|
+
/** Cancels the session's in-flight recap, which settles `cancelled`; idle is an accepted no-op (ADR 45447 D5, tdd SS3.28.5). */
|
|
4549
|
+
"recap/cancel": { params: RecapCancelParams; result: RecapCancelResult };
|
|
4550
|
+
/** Runs one model completion with no session on the host's model; acks `accepted` and settles exactly once on `model/completed` — 4 in flight per connection, host-enforced 45s timeout (ADR 90352 D1-D4, tdd SS3.40). */
|
|
4551
|
+
"model/complete": { params: ModelCompleteParams; result: ModelCompleteResult };
|
|
4552
|
+
/** Cancels the sending connection's `model/complete` call, which settles `cancelled`; any other id answers `{}` and changes nothing (ADR 90352 D4/D6, tdd SS3.40). */
|
|
4553
|
+
"model/cancel": { params: ModelCancelParams; result: ModelCancelResult };
|
|
4554
|
+
/** Reads the computer-use Settings: each capability's Always allow switch and the user's blocked apps from the approval policy store, plus the built-in blocks as locked rows when asked; computerUseUnavailable while the CUA gate is off (ADR 630 D18.17). */
|
|
4555
|
+
"computerUseSettings/read": { params: ComputerUseSettingsReadParams; result: ComputerUseSettings };
|
|
4556
|
+
/** Applies one Settings patch (capability dropdowns, blocked apps to add or remove) all-or-nothing and answers the user's Settings after it; a built-in block is refused in either list; computerUseUnavailable while the CUA gate is off (ADR 630 D18.17). */
|
|
4557
|
+
"computerUseSettings/update": { params: ComputerUseSettingsUpdateParams; result: ComputerUseSettings };
|
|
4558
|
+
/** Reads one session's computer-use setup state and permissions by running cua_setup status for it as a host command: no model turn, no prompt, no spawn; computerUseUnavailable while the CUA gate is off (#52381). Without sessionId it reads the host's own setup, with computerUseHostSetup. */
|
|
4559
|
+
"computerUseSetup/read": { params: ComputerUseSetupReadParams; result: ComputerUseSetupState };
|
|
4560
|
+
/** A human command: runs cua_setup start for one session, between turns, exactly as the TUI's /cua on does, and answers the state it settles in, with the refusal code when setup refused; computerUseUnavailable while the CUA gate is off (#52381). Without sessionId it starts the host's own setup under one host owner, with computerUseHostSetup. */
|
|
4561
|
+
"computerUseSetup/start": { params: ComputerUseSetupStartParams; result: ComputerUseSetupState };
|
|
4562
|
+
/** Reads the host's three macOS grants with no prompt: starts the computer-use helper only long enough to check them, reports each as granted or missing, and ends it; never requests a grant or opens System Settings. Needs computerUseHostSetup; commandRejected runtime_busy while a setup attempt holds the host. */
|
|
4563
|
+
"computerUseSetup/check": { params: undefined; result: ComputerUseSetupState };
|
|
4564
|
+
}
|
|
4565
|
+
|
|
4566
|
+
/** Every wire notification's `params` type, keyed by method (SS1.9 index); `undefined` for a notification that carries none. */
|
|
4567
|
+
export interface MspNotificationMap {
|
|
4568
|
+
/** Client-to-server notification closing the handshake; no params (SS1.4.2). */
|
|
4569
|
+
"initialized": undefined;
|
|
4570
|
+
/** A session became newly loaded on this host via session/start or session/fork; broadcast to every initialized connection (SS2.6.1). */
|
|
4571
|
+
"session/started": SessionStartedParams;
|
|
4572
|
+
/** A loaded session was unloaded (idle | hostShutdown | leave) with the final view cursor; broadcast to every initialized connection (SS2.6.2). */
|
|
4573
|
+
"session/closed": SessionClosedParams;
|
|
4574
|
+
/** Protected correlated terminal for an admitted session/leave (SS2.15). */
|
|
4575
|
+
"session/leaveCompleted": SessionLeaveCompletedParams;
|
|
4576
|
+
/** The session's user-invocable skill set changed; clients re-issue skill/list. A live host-state projection, not a view event (SS3.22.2). */
|
|
4577
|
+
"skill/changed": SkillChangedParams;
|
|
4578
|
+
/** A foreground turn began running (SS4.5.1). */
|
|
4579
|
+
"turn/started": TurnStartedParams;
|
|
4580
|
+
/** Turn terminal: completed | failed | cancelled, with usage and the settled error object (SS4.5.1). */
|
|
4581
|
+
"turn/completed": TurnCompletedParams;
|
|
4582
|
+
/** An accepted interrupt's paired retract durably settled, accepted or declined (SS4.5.1; ADR 50074 D1). */
|
|
4583
|
+
"turn/retracted": TurnRetractedParams;
|
|
4584
|
+
/** A failing model attempt's retry is scheduled and waiting out its backoff; observable mid-turn, non-terminal (SS4.5.1, D-026). */
|
|
4585
|
+
"turn/retryScheduled": TurnRetryScheduledParams;
|
|
4586
|
+
/** A provider backoff behind one model attempt is scheduled and waiting out its delay; observable mid-turn, non-terminal (SS4.5.1; ADR 50047-model-retry-scheduled-members D1). */
|
|
4587
|
+
"turn/modelRetryScheduled": TurnModelRetryScheduledParams;
|
|
4588
|
+
/** A turn's model attempt is starting: its model provider task recorded its opening status; observable mid-turn, non-terminal (SS4.5.1; ADR 68644-model-attempt-started D1). */
|
|
4589
|
+
"turn/modelAttemptStarted": TurnModelAttemptStartedParams;
|
|
4590
|
+
/** A queued submit's reclaim durably won: its pre-minted turn never runs, and no turn/started or turn/completed will follow for that turnId (SS3.6, SS4.5.1). */
|
|
4591
|
+
"turn/unqueued": TurnUnqueuedParams;
|
|
4592
|
+
/** The turn's foreground work is done while named background reminder checks hold the turn open; explicitly non-terminal (SS4.5.12). */
|
|
4593
|
+
"turn/foregroundCompleted": TurnForegroundCompletedParams;
|
|
4594
|
+
/** An item opened on the transcript (SS4.3). */
|
|
4595
|
+
"item/started": ItemStartedParams;
|
|
4596
|
+
/** An open item changed non-terminally: full re-emission at a higher revision (SS4.4.2). */
|
|
4597
|
+
"item/updated": ItemUpdatedParams;
|
|
4598
|
+
/** Streaming append to an open item's field path (ephemeral-sourced, no sourceRange; opt-out-able) (SS4.3.1). */
|
|
4599
|
+
"item/delta": ItemDeltaParams;
|
|
4600
|
+
/** An item reached its terminal state: the authoritative final object (SS4.3). */
|
|
4601
|
+
"item/completed": ItemCompletedParams;
|
|
4602
|
+
/** Push delivery dropped events: `(after, next)` brackets the undelivered range and delivery continues from `next` (SS4.8; spec 208 FM-001). */
|
|
4603
|
+
"view/gap": ViewGapParams;
|
|
4604
|
+
/** An approval opened: the fold of its durable Requested record (SS5.5.1). */
|
|
4605
|
+
"approval/requested": ApprovalRequestParams;
|
|
4606
|
+
/** A non-terminal approval record changed the pending view (SS5.5.1). */
|
|
4607
|
+
"approval/updated": ApprovalUpdatedParams;
|
|
4608
|
+
/** The native reviewer holds an approval: the fold of a Requested whose phase is automated_reviewing; typed activity, not a request (SS5.5.1, spec 209 FR-52080-1). */
|
|
4609
|
+
"approval/reviewing": ApprovalRequestParams;
|
|
4610
|
+
/** The first durable approval terminal landed; protected delivery (SS5.5). */
|
|
4611
|
+
"approval/resolved": ApprovalResolvedParams;
|
|
4612
|
+
/** A user-input prompt opened: the fold of its durable Requested record (SS5.10.1). */
|
|
4613
|
+
"userInput/requested": UserInputRequestParams;
|
|
4614
|
+
/** The first durable user-input settlement landed; protected delivery (SS5.10.3). */
|
|
4615
|
+
"userInput/settled": UserInputSettledParams;
|
|
4616
|
+
/** Client-to-server engagement note: the user started interacting with a timed prompt, so the host disarms its countdown; no result, no errors, no ledger row (SS5.10.4, ADR 45450 D2). */
|
|
4617
|
+
"userInput/engaged": UserInputEngagedParams;
|
|
4618
|
+
/** A durable model selection took effect (SS4.6.1). */
|
|
4619
|
+
"session/modelChanged": SessionModelChangedParams;
|
|
4620
|
+
/** A durable session-default reasoning-effort change took effect (SS4.6.9, ADR 31255 D1). */
|
|
4621
|
+
"session/reasoningEffortChanged": SessionReasoningEffortChangedParams;
|
|
4622
|
+
/** A loaded session's (status, attention) flipped; command-plane broadcast, cursor-stamped, not subscription-gated (SS4.6.10, ADR 31983 D2). */
|
|
4623
|
+
"session/statusChanged": SessionStatusChangedParams;
|
|
4624
|
+
/** The session's goal block changed value; replace wholesale, an explicit null clears (SS4.6.2). */
|
|
4625
|
+
"session/goalChanged": SessionGoalChangedParams;
|
|
4626
|
+
/** The todo list was replaced wholesale; empty items is a cleared list (SS4.6.3). */
|
|
4627
|
+
"session/todoListChanged": SessionTodoListChangedParams;
|
|
4628
|
+
/** A durable workspace-branch observation landed; null branch is a detached-HEAD fact (SS4.6.4). */
|
|
4629
|
+
"session/branchChanged": SessionBranchChangedParams;
|
|
4630
|
+
/** A model call completed with usage: raw counters plus counted-once derivations plus session cumulative (SS4.6.5). */
|
|
4631
|
+
"session/tokenUsage": SessionTokenUsageParams;
|
|
4632
|
+
/** A provider-reported context-occupancy fact folded to a changed (windowTokens, usedTokens, pressure) triple (SS4.6.6). */
|
|
4633
|
+
"session/contextUsage": SessionContextUsageParams;
|
|
4634
|
+
/** The approval enforcement mode changed: the fold of the durable reconfigure audit fact (SS5.12). */
|
|
4635
|
+
"session/approvalModeChanged": SessionApprovalModeChangedParams;
|
|
4636
|
+
/** A recap request settled exactly once — `completed` (with `text` plus optional `title`), `failed` (`providerFailed`), `cancelled`, or `timedOut` — delivered to the requesting connection outside the view stream (ADR 45447 D2, tdd SS3.28.2). */
|
|
4637
|
+
"recap/completed": RecapCompletedParams;
|
|
4638
|
+
/** A model/complete call settled exactly once: `completed`, `failed`, `cancelled` or `timedOut`, to the requesting connection only (ADR 90352 D2, tdd SS3.40). */
|
|
4639
|
+
"model/completed": ModelCompletedParams;
|
|
4640
|
+
/** An accepted login credential update installed a provider that cannot serve the session's standing model route; the standing selection is unchanged and a routable session/setModel repairs it (#25603, spec 5469 Amendment 16). */
|
|
4641
|
+
"session/modelRouteUnserved": SessionModelRouteUnservedParams;
|
|
4642
|
+
/** A durable session-name record landed (rename or first naming): the fold of the session_name record (SS4.6.7, #27598). */
|
|
4643
|
+
"session/nameChanged": SessionNameChangedParams;
|
|
4644
|
+
/** A loaded session's live view stream became unavailable, and why: a command-plane push delivered independent of the view subscription set when the materialized projection fails closed (ADR 32557; #32557). */
|
|
4645
|
+
"session/viewHealthChanged": SessionViewHealthChangedParams;
|
|
4646
|
+
/** The changed session/list row, full-row replace; opt-in per connection via the sessionListStream capability, never subscription-gated (#33084, ADR 33084 D2/D3). */
|
|
4647
|
+
"session/listChanged": SessionListChangedParams;
|
|
4648
|
+
/** The host's last-observed subscription usage DATA changed (window, weekly, or tier — not a stamp-only refresh), with the same payload shape as usage/read's usage member; the absent-to-present first observation emits (ADR 32563 D3). */
|
|
4649
|
+
"usage/changed": SubscriptionUsage;
|
|
4650
|
+
/** A computerUseSetup/read or /start observed a session's setup state differ from the last one sent for it, including inProgress when a start begins and the state it settles in (#52381). Without sessionId it carries the host's own setup state, delivered only with computerUseHostSetup. */
|
|
4651
|
+
"computerUseSetup/changed": ComputerUseSetupChanged;
|
|
4652
|
+
/** An install landed; carries the installed-row summary and clients re-issue `plugin/list` (ADR 45434 D5). */
|
|
4653
|
+
"plugin/changed": PluginChangedParams;
|
|
4654
|
+
/** A marketplace was added, updated, or removed; carries the change summary (ADR 45434 D5). */
|
|
4655
|
+
"plugin/marketplaceChanged": PluginMarketplaceChangedParams;
|
|
4656
|
+
/** One monitor inbox admission: the fold keys gate-off consumes (SS4.5.18). */
|
|
4657
|
+
"monitor/inboxItemAdmitted": MonitorInboxItemAdmittedParams;
|
|
4658
|
+
/** One monitor inbox drain with its recorded stamp, the drain-side operand of latest-wins (SS4.5.18). */
|
|
4659
|
+
"monitor/inboxItemDrained": MonitorInboxItemDrainedParams;
|
|
4660
|
+
/** One wake-missed void with its recorded stamp; count-only, no transcript row (SS4.5.18). */
|
|
4661
|
+
"monitor/inboxItemVoided": MonitorInboxItemVoidedParams;
|
|
4662
|
+
}
|
|
4663
|
+
|
|
4664
|
+
/** Every server-initiated wire request's `params` type and the `result` the client answers with, keyed by method (SS5.3/SS5.10.1 index). */
|
|
4665
|
+
export interface MspServerRequestMap {
|
|
4666
|
+
/** Server-initiated must-answer request presenting a pending approval to every subscribed connection; the response is the SS5.3.3 presentation receipt — the decision travels as approval/decide (SS5.3; indexed by #23840). */
|
|
4667
|
+
"approval/request": { params: ApprovalRequestParams; result: RequestReceipt };
|
|
4668
|
+
/** Server-initiated must-answer request presenting a pending user-input prompt; the response is the SS5.3.3 presentation receipt — the answer travels as userInput/answer (SS5.10.1; indexed by #23840). */
|
|
4669
|
+
"userInput/request": { params: UserInputRequestParams; result: RequestReceipt };
|
|
4670
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muse-code/sdk",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.23",
|
|
4
4
|
"description": "TypeScript SDK for the Muse Session Protocol (MSP): connect to a Muse Code session, drive turns, and fold the event stream. Zero runtime dependencies.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/meta-models/muse-code-sdk",
|