@cortexkit/subc-client 0.3.4 → 0.4.0

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
@@ -3,7 +3,7 @@
3
3
  TypeScript client for the [subc](../../README.md) daemon. It speaks the same
4
4
  loopback-TCP transport as the Rust consumers (`subc-core`'s `subc-probe`),
5
5
  wire-compatible **byte-for-byte** with `subc-transport` (the HMAC-SHA256
6
- handshake) and `subc-protocol` (the 17-byte envelope and channel-0 control RPCs).
6
+ handshake) and `subc-protocol` (the 21-byte v2 envelope and channel-0 control RPCs).
7
7
 
8
8
  Use it when a TypeScript/JavaScript process needs to reach a subc-routed module
9
9
  (e.g. a provider module exposing a tool surface or a management surface).
@@ -21,7 +21,7 @@ imports are `node:net`, `node:crypto`, and `node:fs`.
21
21
  ## Usage
22
22
 
23
23
  A consumer authenticates, optionally lists the catalog, opens a route to a
24
- target module, then issues requests on the returned route channel. There is no
24
+ target module, then issues requests using the returned immutable route handle. There is no
25
25
  client `HELLO` — `HELLO` is module-registration only.
26
26
 
27
27
  ```ts
@@ -34,7 +34,7 @@ const client = await SubcClient.connect({ connectionFile });
34
34
  const modules = await client.catalogList();
35
35
 
36
36
  // Open a route to a management-surface module and call it.
37
- const routeChannel = await client.routeOpen(
37
+ const route = await client.routeOpen(
38
38
  { kind: "management_surface", module_id: "ai-provider-quota" },
39
39
  { project_root: process.cwd(), harness: "my-harness", session: "session-1" },
40
40
  );
@@ -42,12 +42,23 @@ const routeChannel = await client.routeOpen(
42
42
  // request() resolves to the module's full Response body (the parsed JSON),
43
43
  // NOT an unwrapped field. A module decides its own response envelope; this one
44
44
  // wraps its array under `result`, so read `body.result`.
45
- const body = await client.request(routeChannel, { method: "usage.get", params: {} });
45
+ const body = await client.request(route, { method: "usage.get", params: {} });
46
46
  const usage = body.result; // ProviderUsage[] for the ai-provider-quota module
47
47
 
48
+ await client.closeRoute(route);
48
49
  client.close();
49
50
  ```
50
51
 
52
+ ### v2 route-handle migration
53
+
54
+ Route identity is now an immutable `RouteHandle { channel, epoch }` bound to the
55
+ connection that opened it. `routeOpen()` returns a handle, and `request()`,
56
+ `subscribe()`, `routePoll()`, `cancel()`, `closeRoute()`, and
57
+ `closeRouteChannel()` all require that handle. A handle retained across reconnect
58
+ fails locally with `StaleRouteHandleError` and emits no frame. The former
59
+ `closeRoute(target, identity)` managed-cache operation is now
60
+ `closeManagedRoute(target, identity)`; no public operation accepts a bare channel.
61
+
51
62
  `connect()` runs the full handshake before resolving: `ClientHello` →
52
63
  verify the server's proof **and** the daemon id from the connection file →
53
64
  `ClientAuth`. A wrong key, an impostor daemon, or a tampered connection file
@@ -56,10 +67,10 @@ fails loud with an `AuthError` rather than connecting insecurely.
56
67
  ### Routing notes
57
68
 
58
69
  - **Correlation, not order.** Every request carries a correlation id; replies are
59
- matched by `(channel, corr)`, never by arrival order. subc may interleave a
70
+ matched by `(channel, epoch, corr)`, never by arrival order. subc may interleave a
60
71
  control reply ahead of another exchange's response on the same connection.
61
72
  - **Priority.** Channel-0 control RPCs and data-plane requests are sent
62
- `Interactive`. `request()` accepts `{ priority, timeoutMs, onProgress }`;
73
+ `Interactive`. `request()` accepts `{ priority, admissionClass, timeoutMs, onProgress }`;
63
74
  `onProgress` receives interim `Push`/`StreamData` frame bodies before the
64
75
  terminal reply.
65
76
  - **Errors.** A module that returns a `FrameType::Error` frame surfaces as a
@@ -70,20 +81,23 @@ fails loud with an `AuthError` rather than connecting insecurely.
70
81
  ## Testing
71
82
 
72
83
  ```sh
73
- bun test # 23 unit + 2 live-handshake
84
+ bun test # 75 unit/mock tests + 17 RUN_SUBC_LIVE-gated tests
74
85
  ```
75
86
 
76
- The live-handshake tests boot the real `subc-core` binary
77
- (`target/debug/subc-core`) and complete the handshake against it — the
87
+ The live-handshake tests boot the real daemon binary
88
+ (`target/debug/ck-subc`) and complete the handshake against it — the
78
89
  byte-identity authority for this client. They skip automatically when the binary
79
- is not built; run `cargo build -p subc-core` first (the CI lane does this).
90
+ is not built; run `cargo build -p subc-core` first (the CI lane does this; the
91
+ package builds the `ck-subc` executable).
80
92
 
81
93
  ## Layout
82
94
 
83
95
  | File | Responsibility |
84
96
  | --- | --- |
85
- | `src/envelope.ts` | 17-byte header codec, frame types, flags, priority |
97
+ | `src/envelope.ts` | 21-byte header codec, frame types, flags, priority, admission class |
86
98
  | `src/connection-file.ts` | read + validate the daemon connection file (owner-only gate) |
87
- | `src/socket.ts` | buffered TCP socket with deadline-bounded `readExact` |
99
+ | `src/socket.ts` | prefix-first envelope reader and deadline-bounded buffered TCP I/O |
88
100
  | `src/auth.ts` | HMAC-SHA256 handshake (`computeProof`, constant-time verify) |
89
- | `src/client.ts` | `SubcClient`: handshake, channel-0 RPCs, `request()` corr-mux |
101
+ | `src/route-handle.ts` | immutable connection-bound `(channel, epoch)` route identity |
102
+ | `src/client.ts` | `SubcClient`: route handles, channel-0 RPCs, epoch-aware corr-mux |
103
+ | `src/provider.ts` | provider bind publication, epoch validation, and routed serving |
package/dist/client.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { type ConnectionInfo } from "./connection-file.js";
2
- import { Priority } from "./envelope.js";
2
+ import { AdmissionClass, Priority } from "./envelope.js";
3
+ import { RouteHandle } from "./route-handle.js";
3
4
  export declare const SUBC_MODULE_ID_ENV = "SUBC_MODULE_ID";
4
5
  export declare const SUBC_LAUNCH_NONCE_ENV = "SUBC_LAUNCH_NONCE";
5
6
  export interface BindIdentity {
@@ -26,6 +27,8 @@ export interface ConsumerIdentity {
26
27
  export interface RouteOpenOptions {
27
28
  /** Optional override for the consumer identity; by default the SUBC_MODULE_ID and SUBC_LAUNCH_NONCE environment variables are used when both are non-empty. Set null to send route.open without consumer_identity. */
28
29
  consumerIdentity?: ConsumerIdentity | null;
30
+ /** Optional consumer-declared reverse-request capabilities for this route.open. This is a declaration, not a verified privilege; providers must treat an omitted field as no reverse-request capability. Known MCP method-family values today are "elicitation", "sampling", and "roots". */
31
+ consumerCapabilities?: string[];
29
32
  }
30
33
  export interface CatalogEntry {
31
34
  module_id: string;
@@ -34,6 +37,7 @@ export interface CatalogEntry {
34
37
  }
35
38
  export interface RequestOptions {
36
39
  priority?: Priority;
40
+ admissionClass?: AdmissionClass;
37
41
  timeoutMs?: number;
38
42
  /** Called for each interim PUSH / StreamData frame before the terminal reply. */
39
43
  onProgress?: (body: Uint8Array) => void;
@@ -48,6 +52,14 @@ export interface ManagedCallOptions extends RequestOptions {
48
52
  }
49
53
  export interface SubscribeOptions {
50
54
  priority?: Priority;
55
+ admissionClass?: AdmissionClass;
56
+ }
57
+ export type RoutePollKind = "status" | "liveness";
58
+ export interface RoutePollResult {
59
+ route_channel: number;
60
+ route_epoch: number;
61
+ status: string | null;
62
+ live: boolean | null;
51
63
  }
52
64
  export interface CloseRouteOptions {
53
65
  /**
@@ -56,7 +68,9 @@ export interface CloseRouteOptions {
56
68
  * Defaults to false: close immediately, aborting everything in flight.
57
69
  */
58
70
  drain?: boolean;
59
- /** Consumer identity to use when looking up the route to close; only needed for routes opened with a non-default consumer identity. */
71
+ }
72
+ export interface ManagedCloseRouteOptions extends CloseRouteOptions {
73
+ /** Consumer identity used by the cached managed route. */
60
74
  consumerIdentity?: ConsumerIdentity | null;
61
75
  }
62
76
  /**
@@ -135,7 +149,11 @@ export declare class SubcClient {
135
149
  private readonly opts;
136
150
  private nextCorr;
137
151
  private readonly pending;
152
+ private readonly lateResponses;
138
153
  private readonly routes;
154
+ private readonly liveRoutes;
155
+ private connectionToken;
156
+ private ingressEpochDropCount;
139
157
  private closedErr;
140
158
  private closeStarted;
141
159
  private reconnecting;
@@ -147,56 +165,31 @@ export declare class SubcClient {
147
165
  static connect(opts: ConnectOptions): Promise<SubcClient>;
148
166
  /** List modules subc knows about (channel-0 catalog.list). */
149
167
  catalogList(moduleId?: string): Promise<CatalogEntry[]>;
150
- /** Open a route to a provider (channel-0 route.open); returns the route channel. */
151
- routeOpen(target: RouteTarget, identity: BindIdentity, opts?: RouteOpenOptions): Promise<number>;
152
- /** Send a data-plane request on a route channel and await its terminal reply. */
153
- request(routeChannel: number, body: unknown, opts?: RequestOptions): Promise<unknown>;
168
+ /** Open a route and return its connection-bound immutable handle. */
169
+ routeOpen(target: RouteTarget, identity: BindIdentity, opts?: RouteOpenOptions): Promise<RouteHandle>;
170
+ /** Send a data-plane request on exactly the supplied route generation. */
171
+ request(handle: RouteHandle, body: unknown, opts?: RequestOptions): Promise<unknown>;
154
172
  /**
155
173
  * Managed route + request convenience. Opens and caches a route for the module,
156
174
  * reconnecting and re-opening cached routes after connection drops.
157
175
  */
158
176
  call<Response = unknown>(moduleId: string, method: string, params?: unknown, opts?: ManagedCallOptions): Promise<Response>;
159
- /**
160
- * Open a held-open event subscription on a route channel. Sends one Request the
161
- * provider keeps open, delivering each interim StreamData frame to `onEvent`; the
162
- * returned `closed` settles on the StreamEnd terminal (resolve) or an Error / route
163
- * GOODBYE (reject). Events ride this held-open request's correlation id they are
164
- * never unsolicited, so they are not dropped. Call `unsubscribe()` to cancel.
165
- */
166
- subscribe(routeChannel: number, body: unknown, onEvent: (event: Uint8Array) => void, opts?: SubscribeOptions): Subscription;
167
- /**
168
- * Tear down ONE managed route (a route opened via `call()`), keyed by its
169
- * (target, identity). Idempotent and never throws — callers over-call on
170
- * session-end. The teardown:
171
- * - flips a tombstone on the cached route and removes it from the cache, so an
172
- * in-flight `openCachedRoute` for the same key will NOT install its channel
173
- * (the generation guard: close beats a racing reopen), and a later `call()`
174
- * opens a fresh route (this is NOT a permanent tombstone);
175
- * - settles in-flight requests on the channel as RouteClosed (managed requests
176
- * keep their at-most-once classification: outcome_unknown if already sent,
177
- * not_sent otherwise; subscriptions always abort);
178
- * - sends a best-effort route GOODBYE so subc releases the route and notifies
179
- * the module to free per-session resources.
180
- * `opts.drain` waits for in-flight UNARY requests to settle before tearing down.
181
- */
182
- closeRoute(target: Extract<RouteTarget, {
177
+ /** Open a held request on exactly one route generation. */
178
+ subscribe(handle: RouteHandle, body: unknown, onEvent: (event: Uint8Array) => void, opts?: SubscribeOptions): Subscription;
179
+ /** Send a pure-header cancellation for an in-flight request. */
180
+ cancel(handle: RouteHandle, corr: bigint, priority?: Priority): void;
181
+ /** Poll status or liveness for exactly the supplied route generation. */
182
+ routePoll(handle: RouteHandle, kind: RoutePollKind): Promise<RoutePollResult>;
183
+ /** Tear down exactly the supplied route generation. */
184
+ closeRoute(handle: RouteHandle, opts?: CloseRouteOptions): Promise<void>;
185
+ /** Close a cached managed route by its route-open identity tuple. */
186
+ closeManagedRoute(target: Extract<RouteTarget, {
183
187
  kind: ManagedRouteKind;
184
- }>, identity: BindIdentity, opts?: CloseRouteOptions): Promise<void>;
185
- /**
186
- * Tear down ONE route by its channel number — the primitive for callers that
187
- * opened a route with `routeOpen` directly (e.g. a tool route carrying raw
188
- * {name, arguments}) and hold the channel themselves. Idempotent, never throws.
189
- * Settles in-flight requests on the channel as RouteClosed and sends a best-effort
190
- * route GOODBYE. `opts.drain` awaits in-flight UNARY requests first; subscriptions
191
- * are always aborted (a held-open stream cannot be drained).
192
- */
193
- closeRouteChannel(channel: number, opts?: CloseRouteOptions): Promise<void>;
188
+ }>, identity: BindIdentity, opts?: ManagedCloseRouteOptions): Promise<void>;
189
+ /** Alias retained for callers that name the operation by protocol channel; it still requires a full handle. */
190
+ closeRouteChannel(handle: RouteHandle, opts?: CloseRouteOptions): Promise<void>;
194
191
  close(): void;
195
- /** Resolve once every in-flight UNARY request on the channel (snapshot at call
196
- * time) has settled. Subscriptions are excluded — they are aborted, not drained. */
197
- private drainUnaryOnChannel;
198
- /** Send a best-effort header-only route GOODBYE for `channel`. One-way: the daemon
199
- * releases the route and relays a route-gone GOODBYE to the module; no ack. */
192
+ private drainUnaryOnHandle;
200
193
  private sendRouteGoodbye;
201
194
  private static openConnection;
202
195
  private controlRpc;
@@ -214,7 +207,7 @@ export declare class SubcClient {
214
207
  private arbitrateTimeout;
215
208
  private managedRequest;
216
209
  private sendManaged;
217
- private cachedRouteChannel;
210
+ private cachedRouteHandle;
218
211
  private openCachedRoute;
219
212
  private ensureConnectedForManaged;
220
213
  private scheduleReconnectAfterDrop;
@@ -238,19 +231,21 @@ export declare class SubcClient {
238
231
  private settle;
239
232
  private rejectPending;
240
233
  private errorFromFrame;
241
- /**
242
- * Drop a dead channel from the managed-route cache so the next call re-opens.
243
- * Only clears entries still pointing at THIS channel in the CURRENT socket
244
- * generation; a route already re-opened (new channel) or re-created after a
245
- * reconnect (new generation) is left alone.
246
- */
247
- private evictRouteChannel;
248
- private failChannel;
234
+ private evictRouteHandle;
235
+ private failHandle;
249
236
  private fail;
250
237
  private notSentCallError;
251
238
  private outcomeUnknownCallError;
252
239
  private terminalCallError;
253
240
  private notSentRecoveryError;
241
+ /** Number of nonzero-channel ingress frames dropped by endpoint epoch validation. */
242
+ get droppedIngressFrames(): number;
243
+ private installRoute;
244
+ private isLiveHandle;
245
+ private assertLiveConnection;
246
+ private assertLiveHandle;
247
+ private allocateCorr;
248
+ private closeConnectionAfterCleanupFailure;
254
249
  private encode;
255
250
  private parseJson;
256
251
  }
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAeA,OAAO,EAA2C,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACpG,OAAO,EAOL,QAAQ,EAET,MAAM,eAAe,CAAC;AAmDvB,eAAO,MAAM,kBAAkB,mBAAmB,CAAC;AACnD,eAAO,MAAM,qBAAqB,sBAAsB,CAAC;AAEzD,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAC5C;IAAE,IAAI,EAAE,oBAAoB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,G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