@byok-sdk/client 0.6.0 → 0.7.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.
Files changed (39) hide show
  1. package/README.md +94 -1
  2. package/dist/adapters/index.js +183 -34
  3. package/dist/adapters/index.js.map +1 -1
  4. package/dist/adapters/pi/events.d.ts +1 -1
  5. package/dist/adapters/pi/mcp-config.d.ts +1 -0
  6. package/dist/adapters/pi/mcp-extension.js +25 -0
  7. package/dist/adapters/pi/mcp-extension.js.map +1 -0
  8. package/dist/adapters/pi/permission-mapping.d.ts +1 -1
  9. package/dist/adapters/pi/pi-adapter.d.ts +5 -0
  10. package/dist/adapters/pi/resolve-extensions.d.ts +11 -0
  11. package/dist/agent-home.d.ts +106 -0
  12. package/dist/bin/byok-agent.js +12926 -9436
  13. package/dist/bin/byok-agent.js.map +1 -1
  14. package/dist/bin/byok-approval-mcp.js.map +1 -1
  15. package/dist/bin/commands/toolsets.d.ts +8 -0
  16. package/dist/bin/format.d.ts +3 -0
  17. package/dist/daemon/agent-content-audit-store.d.ts +35 -0
  18. package/dist/daemon/agent-content-read.d.ts +169 -0
  19. package/dist/daemon/agent-egress-controller.d.ts +79 -0
  20. package/dist/daemon/agent-egress-policy.d.ts +36 -0
  21. package/dist/daemon/agent-egress-sanitizer.d.ts +38 -0
  22. package/dist/daemon/agent-egress-spool.d.ts +116 -0
  23. package/dist/daemon/agent-session-handoff-store.d.ts +82 -0
  24. package/dist/daemon/blob-client.d.ts +6 -2
  25. package/dist/daemon/connection-manager.d.ts +2 -2
  26. package/dist/daemon/control-protocol.d.ts +9 -0
  27. package/dist/daemon/create-daemon.d.ts +76 -10
  28. package/dist/daemon/long-poll-transport.d.ts +60 -0
  29. package/dist/daemon/presence-publisher.d.ts +2 -2
  30. package/dist/daemon/store.d.ts +9 -0
  31. package/dist/daemon/task-runner.d.ts +53 -4
  32. package/dist/daemon/toolset-registry.d.ts +30 -0
  33. package/dist/daemon/url.d.ts +21 -0
  34. package/dist/daemon/ws-transport.d.ts +30 -5
  35. package/dist/index.d.ts +12 -2
  36. package/dist/index.js +8550 -5105
  37. package/dist/index.js.map +1 -1
  38. package/dist/types.d.ts +44 -0
  39. package/package.json +7 -5
package/dist/types.d.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  import type { AgentEvent, PermissionPolicy, TaskOfferPayload } from '@byok-sdk/protocol';
2
2
  import type { RuntimeEnvironmentRequirements } from './daemon/environment';
3
+ import type { AgentRef } from './agent-home';
4
+ export type { AgentRef } from './agent-home';
5
+ export type { AgentEgressPolicy } from '@byok-sdk/protocol';
3
6
  export type { RuntimeEnvironmentRequirements } from './daemon/environment';
4
7
  export interface GitWorkspaceConfig {
5
8
  mode: 'local-checkpoints';
@@ -51,6 +54,38 @@ export interface McpStdioServerConfig {
51
54
  export interface McpToolsetConfig {
52
55
  mcpServers: Readonly<Record<string, McpStdioServerConfig>>;
53
56
  }
57
+ /** Lifecycle facts a device host may explicitly report for one configured toolset. */
58
+ export type McpToolsetLifecycleState = 'installed' | 'unauthorized' | 'starting' | 'ready' | 'degraded' | 'crashed' | 'incompatible';
59
+ /**
60
+ * One host-owned lifecycle observation. The SDK validates and projects this
61
+ * evidence but never derives it from executable configuration or command
62
+ * presence. `reasonCode` is a bounded machine code, not arbitrary log text.
63
+ */
64
+ export interface McpToolsetObservation {
65
+ state: McpToolsetLifecycleState;
66
+ observedAt: string;
67
+ version?: string;
68
+ reasonCode?: string;
69
+ }
70
+ /** Redacted status for one configured toolset; executable definitions are absent by construction. */
71
+ export interface McpToolsetStatus {
72
+ id: string;
73
+ serverCount: number;
74
+ definitionRevision: string;
75
+ observation?: Readonly<McpToolsetObservation>;
76
+ }
77
+ /** Content-addressed status of the daemon's complete device-local toolset registry. */
78
+ export interface McpToolsetRegistryStatus {
79
+ revision: string;
80
+ toolsets: readonly Readonly<McpToolsetStatus>[];
81
+ }
82
+ /** Receipt returned after an atomic, expected-revision registry reload. */
83
+ export interface McpToolsetReloadReceipt {
84
+ previousRevision: string;
85
+ revision: string;
86
+ changed: boolean;
87
+ toolsets: readonly Readonly<McpToolsetStatus>[];
88
+ }
54
89
  /**
55
90
  * M4 Phase 3: the out-of-band approval channel `TaskRunner` (`daemon/
56
91
  * task-runner.ts`) hands to a prepared operation's `start()` via
@@ -172,6 +207,15 @@ export interface RuntimeOperationManifest {
172
207
  /** The credential-free runtime/lane/provider/model authority for this operation. */
173
208
  readonly dispatchSelection?: TaskOfferPayload['dispatchSelection'];
174
209
  readonly sessionRef?: string;
210
+ /** Strict Agent identity, present only for task.offer_for_agent. */
211
+ readonly agentRef?: AgentRef;
212
+ /** Canonical runtime cwd; for an Agent task this is the Agent home root. */
213
+ readonly cwd?: string;
214
+ /** Opaque local lease identity sealed with the Agent manifest. */
215
+ readonly lease?: {
216
+ readonly leaseId: string;
217
+ readonly canonicalHome: string;
218
+ };
175
219
  readonly workspace: {
176
220
  readonly workspaceDir: string;
177
221
  readonly workspaceId?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byok-sdk/client",
3
- "version": "0.6.0",
3
+ "version": "0.7.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",
@@ -55,14 +55,16 @@
55
55
  "clean": "rm -rf dist"
56
56
  },
57
57
  "dependencies": {
58
- "@earendil-works/pi-coding-agent": "0.84.1",
59
- "@byok-sdk/core": "0.6.0",
60
- "@byok-sdk/protocol": "0.6.0",
58
+ "@byok-sdk/core": "0.7.0",
59
+ "@byok-sdk/protocol": "0.7.0",
60
+ "@earendil-works/pi-coding-agent": "0.84.2",
61
+ "pi-mcp-adapter": "2.27.0",
62
+ "pi-web-access": "0.24.1",
61
63
  "ws": "^8.21.1"
62
64
  },
63
65
  "devDependencies": {
64
66
  "@types/ws": "^8.18.1",
65
- "@byok-sdk/server": "0.6.0",
67
+ "@byok-sdk/server": "0.7.0",
66
68
  "@hono/node-server": "^2.0.10"
67
69
  }
68
70
  }