@muse-code/sdk 1.4.12 → 1.4.13

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.
@@ -13,7 +13,7 @@
13
13
  * (tdd SS1.4.1) — additive-optional evolution means an older SDK keeps
14
14
  * working against a newer host.
15
15
  */
16
- export declare const EXPECTED_SCHEMA_FINGERPRINT = "sha256:cfdb6d2525601b9bac76584ccb0610ab3a5539b5e4f51141f079b99b39fcb4e0";
16
+ export declare const EXPECTED_SCHEMA_FINGERPRINT = "sha256:7fddaf646dbc317e5fcac0785e135eb04df14fbb0db1863089dfd6da21730e5b";
17
17
  /**
18
18
  * What a build-time mismatch MEANS, in the words a human needs at 2am.
19
19
  *
@@ -13,7 +13,7 @@
13
13
  * (tdd SS1.4.1) — additive-optional evolution means an older SDK keeps
14
14
  * working against a newer host.
15
15
  */
16
- export const EXPECTED_SCHEMA_FINGERPRINT = "sha256:cfdb6d2525601b9bac76584ccb0610ab3a5539b5e4f51141f079b99b39fcb4e0";
16
+ export const EXPECTED_SCHEMA_FINGERPRINT = "sha256:7fddaf646dbc317e5fcac0785e135eb04df14fbb0db1863089dfd6da21730e5b";
17
17
  /**
18
18
  * What a build-time mismatch MEANS, in the words a human needs at 2am.
19
19
  *
package/dist/src/msp.d.ts CHANGED
@@ -62,6 +62,8 @@ export type ApprovalChoiceScope = "once" | "session" | "localPersistent" | (stri
62
62
 
63
63
  /** One Computer Use card's facts. Empty collections and absent rows are omitted, never `null`. */
64
64
  export interface ApprovalCuaCardFacts {
65
+ /** The data the call would send that the card must name; a card with any offers only one-shot choices. */
66
+ data?: ApprovalCuaDataFact[];
65
67
  /** For a browser, the host of the window's current page. */
66
68
  page?: ApprovalCuaPage;
67
69
  /** Only the consequential steps, in call order. */
@@ -70,6 +72,26 @@ export interface ApprovalCuaCardFacts {
70
72
  windowTitle?: string;
71
73
  }
72
74
 
75
+ /** One piece of data the call would send. An open union on `kind` (`secret`, or `other` for a row the host can't word); a client shows `other` and any kind it doesn't know as a generic data row. */
76
+ export interface ApprovalCuaDataFact {
77
+ /** Open discriminator: `secret` or `other`. */
78
+ kind: string;
79
+ /** For `secret`, the parts of it the card may show, never the value. */
80
+ mask?: ApprovalCuaMask;
81
+ /** For `secret`, the scanner's open tag (`github_token`, `secret_named_value` and so on); a client words the tags it knows and shows any other as "a secret". */
82
+ secretKind?: string;
83
+ }
84
+
85
+ /** A secret's mask: a vendor token's prefix and last 4 characters (`ghp_…3f9a`), a named value's name and length (`password=… (12 chars)`), or the length alone; all absent names the kind only. */
86
+ export interface ApprovalCuaMask {
87
+ /** The secret's length in characters. */
88
+ chars?: number;
89
+ /** A vendor token's last 4 characters. */
90
+ last4?: string;
91
+ /** A vendor token's fixed prefix (`ghp_`), or a named value's name and its `=` (`password=`). */
92
+ prefix?: string;
93
+ }
94
+
73
95
  /** The page's full host, no path or query. */
74
96
  export interface ApprovalCuaPage {
75
97
  /** The host in Unicode. */
@@ -1131,6 +1153,8 @@ export interface Item {
1131
1153
  recordedAt?: string;
1132
1154
  /** `reminderChild`: the reminder agent's id. */
1133
1155
  reminderAgentId?: string;
1156
+ /** Monitor `toolCall`: the D26 hint verdict plus anchor (`ReplayHint`); absent means no hint. */
1157
+ replayHint?: ReplayHint;
1134
1158
  /** `subagent`: the result envelope from `ResultReady` (tdd SS4.5.7). */
1135
1159
  result?: SubagentResult;
1136
1160
  /** `workflow`: set on resumed launches. */
@@ -1179,6 +1203,8 @@ export interface Item {
1179
1203
  summary?: string[];
1180
1204
  /** `reminderChild`: the linked task id. */
1181
1205
  taskId?: string;
1206
+ /** Terminal `toolCall`: the item after whose rows the terminal row renders (tdd SS4.5.21, ADR 56496 D2/D3). */
1207
+ terminalRowAfterItemId?: string;
1182
1208
  /** `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). */
1183
1209
  text?: string;
1184
1210
  /** `workflow`: the run's launch token budget, set from the launch fact (tdd SS4.5.8, #45449); absent when the launch carried none. */
@@ -1203,6 +1229,8 @@ export interface Item {
1203
1229
  usage?: TokenUsage;
1204
1230
  /** `toolCall`/`userShell`: bounded transcript-visible result text (budget per tdd SS4.5.4); streams via `item/delta` field `"output"`. */
1205
1231
  visibleOutput?: string;
1232
+ /** `toolCall`: the task's registered Work ID, verbatim (`work.v2.managed_bash.sha256.…`); present only when the task registered a ManagedBash id, absent otherwise (tdd SS4.5.5, ADR 50041 D20). Stable from day one: no `x-msp-stability` marker. The host serves it at the later of the task terminal and the inbox admission (D21); absence keeps the client's v1 derivation. */
1233
+ workId?: string;
1206
1234
  /** `subagent`/`workflow`: the owning durable workflow run id (opaque string — not a UUID family). */
1207
1235
  workflowRunId?: string;
1208
1236
  }
@@ -1799,6 +1827,18 @@ export interface PluginMarketplaceUpdateParams {
1799
1827
  /** 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. */
1800
1828
  export type PluginSource = "curated" | "marketplaceUserAdded" | "foreignImport" | "nativeLocal" | (string & {});
1801
1829
 
1830
+ /** One input still queued for delivery to a session (tdd SS2.5.5, ADR 63254-queued-inputs-on-read D2): the full message body plus its log record sequence, the delivery-order and re-read dedupe key, plus the run-log record id clients join served entries against record-seeded rows by. */
1831
+ export interface QueuedInput {
1832
+ /** The queued record's log sequence: delivery order, and the key clients deduplicate re-reads by. */
1833
+ sequence: number;
1834
+ /** The `SubagentInput` record's model-authored command id: the key wire-twin rows join by in either order (the twin reads the same string from the verbatim wire args). Absent for root own-queue members, which are never `SubagentInput`. */
1835
+ sourceCommandId?: string;
1836
+ /** The run-log record id the served mirror was taken from: the key clients join served entries against record-seeded rows by, so an already-rendered input never mints a second row under diverged sequences. Absent when the host's record carries no mirror metadata (a pre-feature host), which falls back to sequence-key dedup only. */
1837
+ sourceRunRecordId?: string;
1838
+ /** The full message body, verbatim (never truncated, never a summary). */
1839
+ text: string;
1840
+ }
1841
+
1802
1842
  /** Typed quota-exhaustion detail (tdd SS4.5.1, ADR 50047 D2): the limit kind plus the provider's reset instant. */
1803
1843
  export interface QuotaDetail {
1804
1844
  /** Which quota was exhausted (open enum; unknown values fall back). */
@@ -1905,6 +1945,12 @@ export type RecoveryObservedMode = "on" | "off" | "unknown" | (string & {});
1905
1945
  /** This construction's assessment, never an operation acceptance receipt. */
1906
1946
  export type RecoveryQualification = "qualified" | "unavailable" | "notRequired" | "unknown" | (string & {});
1907
1947
 
1948
+ /** The D26 first-tree-transition hint verdict plus anchor (tdd SS4.5.21, ADR 56496 D3): `rowKinds` is the open lowercase row-kind vocabulary the client formats through its shared kind-noun constructor; `afterItemId` is the item id after whose rows the hint renders. Both members always ride when the object does. */
1949
+ export interface ReplayHint {
1950
+ afterItemId: string;
1951
+ rowKinds: string[];
1952
+ }
1953
+
1908
1954
  /** A request frame, either direction (SS1.2 §2.1). */
1909
1955
  export interface Request {
1910
1956
  /** Client-chosen id, unique among that client's in-flight requests. */
@@ -2331,6 +2377,8 @@ export interface SessionReadResult {
2331
2377
  lastTurn?: LastTurn;
2332
2378
  /** 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). */
2333
2379
  pendingRequests: PendingRequestPointer[];
2380
+ /** The inputs still queued for delivery to the read session (tdd SS2.5.5, ADR 63254-queued-inputs-on-read D2). Absent-when-empty: a missing member means nothing queued, never an error. */
2381
+ queuedInputs?: QueuedInput[];
2334
2382
  /** Current local construction only; never inferred from retained history. Absence establishes neither a choice nor supported recovery. */
2335
2383
  recoveryObservation?: RecoveryObservation;
2336
2384
  /** The session as folded point-in-time. */
@@ -2385,7 +2433,7 @@ export interface SessionResumeParams {
2385
2433
  excludeItems?: boolean;
2386
2434
  /** History mode preference, default `auto`. A PREFERENCE, not a budget override: when the requested mode does not fit the history budget the server downgrades it and `history.mode` reports what was actually served (tdd SS2.5.2). Ignored when `cursor` or `excludeItems` makes it moot. */
2387
2435
  history?: HistoryPreference;
2388
- /** The launch permission-profile pick (amendment 42624 FR-42624-1, #50054): a profile id the host catalog already admits. Select, never create. Omitted means today's behavior: restore retained authority only, no override. The host restores first, then applies the pick in the same pre-marker step; a pick that fails admission refuses the resume `commandRejected` (-32030; `permission_profile_unknown` / `permission_profile_unavailable`) before any durable byte. Explicit `null` is invalid params (the same closed null-tolerant set as at start). */
2436
+ /** The launch permission-profile pick (amendment 42624 FR-42624-1, #50054): a profile id the host catalog already admits. Select, never create. Omitted restores retained authority only, with no override. The host restores first, then applies the pick in the same pre-marker step; over a declared lost record the restore is the never-wider reset, committed before the pick, and where the reset cannot commit the pick is committed alone as that reset (spec 11237 FR-57059-4). A pick that fails admission refuses the resume `commandRejected` (-32030; `permission_profile_unknown` / `permission_profile_unavailable`) before any durable byte. Explicit `null` is invalid params (the same closed null-tolerant set as at start). */
2389
2437
  permissionProfile?: string;
2390
2438
  /** Cold-resume replacement choice; omission preserves the retained choice. A warm attach rejects a different or unestablished choice as invalidParams. Explicit null is invalid. */
2391
2439
  recoveryMode?: RecoveryMode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@muse-code/sdk",
3
- "version": "1.4.12",
3
+ "version": "1.4.13",
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",