@byok-sdk/client 0.2.0 → 0.3.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/dist/types.d.ts CHANGED
@@ -19,6 +19,12 @@ export interface RuntimeDetectResult {
19
19
  export interface RuntimeCapabilities {
20
20
  steer: boolean;
21
21
  resume: boolean;
22
+ /**
23
+ * Whether this adapter can project task-scoped, locally configured MCP
24
+ * servers into the runtime without accepting executable definitions from
25
+ * the remote task. Omission is fail-closed and means unsupported.
26
+ */
27
+ mcpToolsets?: boolean;
22
28
  /**
23
29
  * Whether this adapter can genuinely pause a running session on
24
30
  * `needs_approval` and resume it from an out-of-band decision — i.e.
@@ -36,6 +42,15 @@ export interface RuntimeCapabilities {
36
42
  /** Subset of {@link PermissionPolicy}'s `mode` values this adapter can express without widening. */
37
43
  permissionModes: string[];
38
44
  }
45
+ /** One local stdio MCP server definition. Remote task payloads can never supply this shape. */
46
+ export interface McpStdioServerConfig {
47
+ command: string;
48
+ args?: readonly string[];
49
+ }
50
+ /** A logical group of local MCP servers selectable by a wire-level toolset id. */
51
+ export interface McpToolsetConfig {
52
+ mcpServers: Readonly<Record<string, McpStdioServerConfig>>;
53
+ }
39
54
  /**
40
55
  * M4 Phase 3: the out-of-band approval channel `TaskRunner` (`daemon/
41
56
  * task-runner.ts`) hands to an adapter's `start()` via `TaskContext
@@ -80,6 +95,12 @@ export interface TaskContext {
80
95
  workspaceDir: string;
81
96
  policy: PermissionPolicy;
82
97
  env: NodeJS.ProcessEnv;
98
+ /**
99
+ * MCP servers resolved from this device's local registry for this task.
100
+ * The wire carries only logical toolset ids; command/args never originate
101
+ * from the SaaS task and are never copied into the task instruction.
102
+ */
103
+ mcpServers?: Readonly<Record<string, McpStdioServerConfig>>;
83
104
  /** Prepared local checkpoint repository metadata; absent for legacy plain workspaces. */
84
105
  gitWorkspace?: {
85
106
  workspaceId: string;
@@ -136,6 +157,14 @@ export interface Session {
136
157
  */
137
158
  export interface RuntimeAdapter {
138
159
  id: string;
160
+ /**
161
+ * Explicit opt-in to the authoritative `task.offer.dispatchSelection`
162
+ * contract. A custom adapter using a built-in runtime id must set this only
163
+ * when it validates and pins the exact lane/provider/model semantics; the
164
+ * daemon will otherwise withhold the connection-level capability so a
165
+ * server rejects the offer before sending it.
166
+ */
167
+ readonly supportsDispatchSelection?: true;
139
168
  detect(): Promise<RuntimeDetectResult>;
140
169
  capabilities(): RuntimeCapabilities;
141
170
  start(task: TaskOfferPayload, ctx: TaskContext): Promise<Session>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byok-sdk/client",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "BYOK SDK client daemon: runs on the end user's machine, pairs with a SaaS server, and drives a local coding-agent runtime",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -46,13 +46,13 @@
46
46
  "dependencies": {
47
47
  "@earendil-works/pi-coding-agent": "0.84.1",
48
48
  "ws": "^8.21.1",
49
- "@byok-sdk/core": "0.2.0",
50
- "@byok-sdk/protocol": "0.2.0"
49
+ "@byok-sdk/core": "0.3.0",
50
+ "@byok-sdk/protocol": "0.3.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/ws": "^8.18.1",
54
54
  "@hono/node-server": "^2.0.10",
55
- "@byok-sdk/server": "0.2.0"
55
+ "@byok-sdk/server": "0.3.0"
56
56
  },
57
57
  "scripts": {
58
58
  "build": "tsup && tsc -p tsconfig.build.json && node scripts/check-adapters-entry.mjs",