@muse-code/sdk 0.1.0 → 0.1.1

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 CHANGED
@@ -7,7 +7,22 @@ the Node standard library. A proposed runtime dependency is an owner
7
7
  escalation under the #211 O-3 precedent — official protocol-owner SDKs,
8
8
  pinned exact, supply-chain reviewed — not a local decision.
9
9
 
10
- **Nothing is published to npm** before 1.0 (tdd D-013).
10
+ ## Install
11
+
12
+ ```sh
13
+ npm install @muse-code/sdk
14
+ npm install -D @types/node # required: the declarations reference Node's stdlib
15
+ ```
16
+
17
+ Node 20 or newer. `@types/node` is a peer of your own toolchain rather than a
18
+ dependency of this package, so a TypeScript consumer installs it explicitly —
19
+ without it the declarations that name `ChildProcess`, `Readable` and friends do
20
+ not resolve. The MSP wire declarations are **bundled into the tarball**, so
21
+ nothing else is needed to typecheck against the published package.
22
+
23
+ **This is a 0.x release and it is experimental.** There is no stability promise
24
+ before 1.0: any release may change or remove API you are using. Pin an exact
25
+ version, and read the changelog before moving off it.
11
26
 
12
27
  ## The loop
13
28
 
@@ -8,7 +8,7 @@
8
8
  * stdout's encoding before implementing this interface — is one
9
9
  * well-behaved transport, not the general guarantee.
10
10
  */
11
- import type { ErrorKind, ErrorObject, Notification, Request, RequestId } from "@muse-code/msp";
11
+ import type { ErrorKind, ErrorObject, Notification, Request, RequestId } from "../msp.js";
12
12
  /**
13
13
  * The two-way text stream a `Connection` speaks MSP over.
14
14
  *
@@ -1,6 +1,6 @@
1
1
  /** Node stdio binding and type-state handshake for the MSP connection. */
2
2
  import type { ChildProcessWithoutNullStreams } from "node:child_process";
3
- import type { InitializeParams, InitializeResult } from "@muse-code/msp";
3
+ import type { InitializeParams, InitializeResult } from "../msp.js";
4
4
  import { Connection } from "./connection.js";
5
5
  import type { ConnectionOptions, DuplexTransport, NotificationHandler, ProtocolErrorHandler, ServerRequestHandler } from "./connection.js";
6
6
  import type { FingerprintWarning } from "../fingerprint.js";
@@ -13,7 +13,7 @@
13
13
  * would be a #206 enrollment request (INV-001), never a local interface.
14
14
  */
15
15
  import type { Connection } from "../connection/connection.js";
16
- import type { ApprovalDecideParams, ApprovalRequestParams } from "@muse-code/msp";
16
+ import type { ApprovalDecideParams, ApprovalRequestParams } from "../msp.js";
17
17
  /**
18
18
  * What an approval handler answers with: a choice the SERVER offered, and
19
19
  * optional feedback. Composed from the generated decide params, so "the client
@@ -39,7 +39,7 @@ import type { Connection } from "../connection/connection.js";
39
39
  import type { ExitClassification, SpawnedMspConnection } from "../connection/spawn.js";
40
40
  import type { SessionDurabilityProfile } from "./host-death.js";
41
41
  import { Session } from "./session.js";
42
- import type { InitializeParams, InitializeResult, SessionResumeParams, SessionStartParams } from "@muse-code/msp";
42
+ import type { InitializeParams, InitializeResult, SessionResumeParams, SessionStartParams } from "../msp.js";
43
43
  /**
44
44
  * Caller-facing options for `session/start` (tdd SS2.5.1).
45
45
  *
@@ -12,7 +12,7 @@
12
12
  * The stores stay wire-shape-blind (INV-001): the `Item` probe lives here,
13
13
  * where it is checked against the GENERATED type.
14
14
  */
15
- import type { InitializeResult, Item } from "@muse-code/msp";
15
+ import type { InitializeResult, Item } from "../msp.js";
16
16
  import type { ExitClassification } from "../connection/spawn.js";
17
17
  import type { TerminalUnknownItemAnnotation } from "../fold/item-store.js";
18
18
  import type { PendingRetirement } from "../pending/pending-command-set.js";
@@ -30,7 +30,7 @@ import type { GapFillFailureHandler } from "./gap-fill.js";
30
30
  import type { DiscardedSessions } from "./discarded.js";
31
31
  import type { HostDeathDischarge, HostDeathNotification, SessionDurabilityProfile } from "./host-death.js";
32
32
  import type { Turn } from "./turn-handle.js";
33
- import type { SessionResumeResult, SessionStartResult } from "@muse-code/msp";
33
+ import type { SessionResumeResult, SessionStartResult } from "../msp.js";
34
34
  /**
35
35
  * Which verb opened this session, and what it answered.
36
36
  *
@@ -13,7 +13,7 @@
13
13
  * client MUST ("stop waiting for a terminal") and which stays an annotation
14
14
  * rather than a synthesized event.
15
15
  */
16
- import type { Item, ItemDeltaParams, TurnCompletedParams, TurnUnqueuedParams } from "@muse-code/msp";
16
+ import type { Item, ItemDeltaParams, TurnCompletedParams, TurnUnqueuedParams } from "../msp.js";
17
17
  import type { DeepReadonly } from "../fold/session-fold.js";
18
18
  /**
19
19
  * What the iterators yield: the fold's stored item, sealed.
@@ -15,7 +15,7 @@
15
15
  import type { Connection } from "../connection/connection.js";
16
16
  import type { PendingCommandSet } from "../pending/pending-command-set.js";
17
17
  import type { CommandErrorResponse, PendingCommandAck, PendingRetirement, ReplayAnswer } from "../pending/pending-command-set.js";
18
- import type { TurnStartParams } from "@muse-code/msp";
18
+ import type { TurnStartParams } from "../msp.js";
19
19
  /**
20
20
  * What `Session.sendUserTurn` sends, COMPOSED from the generated params rather
21
21
  * than restated (INV-001).
@@ -26,7 +26,7 @@
26
26
  * unrecognized `TurnTerminal` is kept verbatim, and a second resolution never
27
27
  * displaces the first durable one.
28
28
  */
29
- import type { ApprovalRequestParams, ApprovalResolvedParams, ApprovalUpdatedParams, Item, ItemCompletedParams, ItemDeltaParams, ItemStartedParams, ItemUpdatedParams, MspNotification, SessionApprovalModeChangedParams, SessionBranchChangedParams, SessionContextUsageParams, SessionGoalChangedParams, SessionModelChangedParams, SessionTodoListChangedParams, SessionTokenUsageParams, TurnCompletedParams, TurnError, TurnRetractedParams, TurnRetryScheduledParams, TurnStartedParams, TurnTerminal, TurnUnqueuedParams, UserInputRequestParams, UserInputSettledParams, ViewGapParams } from "@muse-code/msp";
29
+ import type { ApprovalRequestParams, ApprovalResolvedParams, ApprovalUpdatedParams, Item, ItemCompletedParams, ItemDeltaParams, ItemStartedParams, ItemUpdatedParams, MspNotification, SessionApprovalModeChangedParams, SessionBranchChangedParams, SessionContextUsageParams, SessionGoalChangedParams, SessionModelChangedParams, SessionTodoListChangedParams, SessionTokenUsageParams, TurnCompletedParams, TurnError, TurnRetractedParams, TurnRetryScheduledParams, TurnStartedParams, TurnTerminal, TurnUnqueuedParams, UserInputRequestParams, UserInputSettledParams, ViewGapParams } from "../msp.js";
30
30
  import type { DeltaApplyOutcome, ItemApplyOutcome, TerminalUnknownItemAnnotation } from "./item-store.js";
31
31
  import type { StateApplyOutcome, StateValue } from "./state-store.js";
32
32
  /** The session-state families, each keyed in the store by its method name. */