@muse-code/sdk 1.4.6 → 1.4.7

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:eae467ab60cb9a5d5af4de616830f065e59375c987fd59269c8cc33ed2a1137f";
16
+ export declare const EXPECTED_SCHEMA_FINGERPRINT = "sha256:6de32db08bbbe0deb478d2bfcaba001e9fb490986bc80db3aceb4d996abf7df9";
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:eae467ab60cb9a5d5af4de616830f065e59375c987fd59269c8cc33ed2a1137f";
16
+ export const EXPECTED_SCHEMA_FINGERPRINT = "sha256:6de32db08bbbe0deb478d2bfcaba001e9fb490986bc80db3aceb4d996abf7df9";
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
@@ -245,7 +245,7 @@ export interface BranchState {
245
245
  }
246
246
 
247
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. */
248
- export type CapabilityName = "userShell" | "sessionMcp" | "sessionListStream" | "feedback" | "computerUseSetup" | (string & {});
248
+ export type CapabilityName = "userShell" | "sessionMcp" | "sessionListStream" | "feedback" | "computerUseSetup" | "computerUseHostSetup" | (string & {});
249
249
 
250
250
  /** The client's requested capability posture (SS1.4.1). Every member defaults; an absent `capabilities` object means all defaults. */
251
251
  export interface ClientCapabilities {
@@ -366,8 +366,8 @@ export interface ComputerUseSettingsUpdateParams {
366
366
 
367
367
  /** `computerUseSetup/changed` params. */
368
368
  export interface ComputerUseSetupChanged {
369
- /** The session whose setup state changed. */
370
- sessionId: string;
369
+ /** The session whose setup state changed; absent for the host's own setup, which only `computerUseHostSetup` holders receive. */
370
+ sessionId?: string;
371
371
  /** Its new state. */
372
372
  state: ComputerUseSetupState;
373
373
  }
@@ -377,16 +377,16 @@ export type ComputerUseSetupPhase = "dormant" | "inProgress" | "restartRequired"
377
377
 
378
378
  /** `computerUseSetup/read` params. */
379
379
  export interface ComputerUseSetupReadParams {
380
- /** The session whose setup to read. */
381
- sessionId: string;
380
+ /** The session whose setup to read. Omitted reads the host's own setup, which needs the `computerUseHostSetup` grant. */
381
+ sessionId?: string;
382
382
  }
383
383
 
384
384
  /** `computerUseSetup/start` params: a human command. */
385
385
  export interface ComputerUseSetupStartParams {
386
386
  /** The client's id for this command. */
387
387
  commandId: string;
388
- /** The session whose setup to start. */
389
- sessionId: string;
388
+ /** The session whose setup to start. Omitted starts the host's own setup, which needs the `computerUseHostSetup` grant. */
389
+ sessionId?: string;
390
390
  }
391
391
 
392
392
  /** The session's setup state: the result of both methods and the `computerUseSetup/changed` payload's `state`. */
@@ -768,6 +768,10 @@ export interface InitializeResult {
768
768
  platformFamily: PlatformFamily;
769
769
  /** Server operating system. */
770
770
  platformOs: PlatformOs;
771
+ /** Whether this host can enforce the sandbox (ADR 50064-startup-report-sandbox-availability D2/D4). Optional so the addition is additive under SS1.5.4; a v1 host always sends it, and a client reads absent as unknown — the host predates the field, so the client falls back to its own probe rather than inventing an answer. */
772
+ sandboxAvailability?: SandboxAvailability;
773
+ /** Why enforcement is impossible. Sent only when `sandbox_availability` is `unavailable`; a client MUST NOT infer a reason when none is sent. */
774
+ sandboxUnavailableReason?: SandboxUnavailableReason;
771
775
  /** Envelope schema version and stable-surface fingerprint. */
772
776
  schema: SchemaInfo;
773
777
  /** Server identification. */
@@ -810,6 +814,8 @@ export interface Item {
810
814
  commandText?: string;
811
815
  /** `subagent`: camelCased `SubagentControlStatus` (open enum); `status` stays the generic item vocabulary. */
812
816
  controlStatus?: SubagentControlStatus;
817
+ /** `agentMessage`: `true` when the provider stream died mid-reply and the run failed with this partial text committed (ADR 50063 D2) — the wire mark for the gate-off "incomplete response" rule (#13328). Absent otherwise; never cleared once set. */
818
+ cutOff?: boolean;
813
819
  /** `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
820
  declaredPhase?: string;
815
821
  /** `subagent`: nesting depth. */
@@ -1577,6 +1583,12 @@ export interface RequestReceipt {
1577
1583
  /** 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
1584
  export type RetractOutcome = "accepted" | "declined" | (string & {});
1579
1585
 
1586
+ /** Whether this host can enforce the sandbox (ADR 50064-startup-report-sandbox-availability D2/D4). A property of the host process, probed once 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: a future enforcement posture arrives as a new value, read by older clients as unknown. */
1587
+ export type SandboxAvailability = "available" | "unavailable" | (string & {});
1588
+
1589
+ /** Why sandbox enforcement is impossible on this host. Sent only when [`SandboxAvailability`] is `unavailable`; a client MUST NOT infer a reason when none is sent. Open: a future reason arrives as a new value, read by older clients as unknown. */
1590
+ export type SandboxUnavailableReason = "userNamespacesDenied" | "bubblewrapUnavailable" | (string & {});
1591
+
1580
1592
  /** 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). */
1581
1593
  export interface SchemaInfo {
1582
1594
  /** `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). */
@@ -1619,6 +1631,8 @@ export interface Session {
1619
1631
  modelId: string | null;
1620
1632
  /** 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`. */
1621
1633
  name?: string;
1634
+ /** How the served `name` was set (tdd SS2.4/SS2.14.1, #50048; ADR 50048 D1/D2). **Additive-optional**, **fold-only**: the snapshot fold (`session/read`, the resume/start/fork-ack snapshot) derives and carries it from the log; `session/list` rows never carry it. Absent — and any value the client does not recognize — reads as unknown, never fabricated. */
1635
+ nameOrigin?: SessionNameOrigin;
1622
1636
  /** 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
1637
  parentSessionId?: string;
1624
1638
  /** 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. */
@@ -1896,6 +1910,8 @@ export interface SessionModelRouteUnservedParams {
1896
1910
  export interface SessionNameChangedParams {
1897
1911
  /** The new canonical name now in effect. */
1898
1912
  name: string;
1913
+ /** How the new name was set (tdd SS2.4/SS4.6.7, #50048; ADR 50048 D1/D2). **Additive-optional**: omitted when the emitting fold cannot prove an origin — absent reads as unknown, never fabricated. */
1914
+ nameOrigin?: SessionNameOrigin;
1899
1915
  /** The owning session. */
1900
1916
  sessionId: string;
1901
1917
  /** The durable records this event folded from. */
@@ -1904,6 +1920,9 @@ export interface SessionNameChangedParams {
1904
1920
  viewCursor: string;
1905
1921
  }
1906
1922
 
1923
+ /** How the served session name was set (tdd SS2.4/SS4.6.7, #50048; ADR 50048 D1). **Open enum** (`x-msp-openness: open`): v1 serves `automatic` and `custom`; a client MUST read absent — and any value it does not recognize — as unknown, never fabricated. Open: a future source such as conversation-generated names (#35260) adds a value here, so closed would make that a breaking change. */
1924
+ export type SessionNameOrigin = "automatic" | "custom" | (string & {});
1925
+
1907
1926
  /** `session/read` params (tdd SS2.5.5): read one stored session **without attaching** — no writer lease, no load, no subscription, no `SessionResumed` record. */
1908
1927
  export interface SessionReadParams {
1909
1928
  /** Metadata-only unless you ask: `false` carries the folded item history. Same name and polarity as `session/resume`/`session/fork`; only the default differs — here it is `true` (tdd SS2.5.5). */
@@ -3371,7 +3390,7 @@ export interface WorkflowTokenBudget {
3371
3390
  }
3372
3391
 
3373
3392
  /** Every wire method in this schema (SS1.9 index). */
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";
3393
+ 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" | "computerUseSetup/check";
3375
3394
  /** Every wire notification in this schema (SS1.9 index). */
3376
3395
  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";
3377
3396
  /** Every server-initiated wire request in this schema (SS5.3/SS5.10.1 index). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@muse-code/sdk",
3
- "version": "1.4.6",
3
+ "version": "1.4.7",
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",