@tangle-network/sandbox 0.60.14 → 0.60.16-develop.20261006020509.71b03b7

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 (29) hide show
  1. package/README.md +36 -12
  2. package/dist/agent/index.d.ts +4 -4
  3. package/dist/agent/index.js +3 -3
  4. package/dist/agent/preview.d.ts +1 -1
  5. package/dist/{agent-run-outcome-CG7bb9lr.d.ts → agent-run-outcome-C8oSKngX.d.ts} +1 -1
  6. package/dist/auth/index.js +1 -1
  7. package/dist/{cli-auth-bundle-CJSdRlx0.js → cli-auth-bundle-D_1bUPSo.js} +388 -1
  8. package/dist/{client-Cd8xKjQZ.js → client-CT9Td-BV.js} +40 -15
  9. package/dist/{client-BCX8_Mu-.d.ts → client-CbOQtx9b.d.ts} +14 -4
  10. package/dist/core.d.ts +5 -5
  11. package/dist/core.js +2 -2
  12. package/dist/{index-BgFIcLar.d.ts → index-BWmtGiyF.d.ts} +2 -2
  13. package/dist/index.d.ts +19 -11
  14. package/dist/index.js +4 -4
  15. package/dist/{interactive-controller-f_ePJqoh.js → interactive-controller-5_ixpFnR.js} +105 -9
  16. package/dist/{lines-BbvLx7pi.d.ts → lines-BTZTbYDz.d.ts} +31 -2
  17. package/dist/lines.d.ts +2 -2
  18. package/dist/{local-cli-auth-BH9A-PW_.js → local-cli-auth-DRXaIXAj.js} +1 -1
  19. package/dist/{preview-Ddy1fJyc.d.ts → preview-T96_mF5c.d.ts} +3 -3
  20. package/dist/{raw-evidence-archive-FxWK99KW.js → raw-evidence-archive-Bi-Lt83d.js} +46 -2
  21. package/dist/runtime.d.ts +2 -2
  22. package/dist/runtime.js +1 -1
  23. package/dist/{sandbox-D3SjjeDp.js → sandbox-D3VcDY8b.js} +27 -11
  24. package/dist/{sandbox-BCygk0lS.d.ts → sandbox-DalvAflZ.d.ts} +10 -202
  25. package/dist/tangle/index.d.ts +1 -1
  26. package/dist/tangle/index.js +1 -1
  27. package/dist/{tangle-fMCqH1ig.js → tangle-CLrVMWGG.js} +1 -1
  28. package/dist/{types-BlA8Cly0.d.ts → types-CdT-paBK.d.ts} +405 -38
  29. package/package.json +5 -5
package/README.md CHANGED
@@ -85,7 +85,6 @@ const client = new Sandbox({
85
85
  });
86
86
  const box = await client.create({
87
87
  name: "sdk-quick-start",
88
- environment: "universal",
89
88
  resources: {
90
89
  cpuCores: 2,
91
90
  memoryMB: 4096,
@@ -137,8 +136,15 @@ That sandbox is already gone for every read, so a later call does not list it ag
137
136
 
138
137
  ## Create a sandbox
139
138
 
140
- `client.create()` accepts a named environment, container image, or published image ID.
141
- The server chooses its default environment when `environment` is omitted.
139
+ Omit `environment` to use the server's default image. No image choice is
140
+ needed for an ordinary sandbox:
141
+
142
+ ```typescript
143
+ const box = await client.create();
144
+ ```
145
+
146
+ Set `environment` when the workload needs a custom container image or a
147
+ published image ID. For example, this sandbox uses `node:22`:
142
148
 
143
149
  ```typescript
144
150
  const box = await client.create({
@@ -169,7 +175,9 @@ const box = await client.create({
169
175
  });
170
176
  ```
171
177
 
172
- List server-supported environments instead of hard-coding an internal catalog.
178
+ For named environments, use the IDs returned by the server. Language names
179
+ such as `python` or `node` do not select versioned container images; use an
180
+ image reference such as `python:3.12-slim` or `node:22` for that.
173
181
 
174
182
  ```typescript
175
183
  const environments = await client.environments.list();
@@ -181,6 +189,27 @@ for (const environment of environments) {
181
189
  Use `bare: true` for a minimal container with command execution and lifecycle controls.
182
190
  Use `agent: false` for managed files, processes, and telemetry without configuring an agent backend.
183
191
 
192
+ ## Host-owned preview publication
193
+
194
+ An application that publishes previews outside the agent turn sets the admitted
195
+ AgentProfile's `metadata.sandbox.previewPublication` to `"host"`:
196
+
197
+ ```typescript
198
+ const profile = {
199
+ prompt: { systemPrompt: "Build the app and update workspace-apps.json." },
200
+ metadata: { sandbox: { previewPublication: "host" } },
201
+ } satisfies AgentProfile;
202
+ ```
203
+
204
+ Sidecar then supplies host-handoff instructions instead of its default self-publication
205
+ CLI/tool instructions. Keep the application's manifest and server contract in the
206
+ profile instructions; the application must perform publication and confirm readiness.
207
+ Without this exact value, Sandbox retains its default managed-preview instructions.
208
+ This profile metadata is instruction policy, not a credential or filesystem security
209
+ boundary. It does not grant publication authority or remove supplied tools.
210
+ Version the profile when changing publication ownership and adopt the Sidecar release
211
+ that supports this contract before relying on it in an existing sandbox.
212
+
184
213
  ## Run several Agents in one Sandbox
185
214
 
186
215
  Import the Agent entrypoint when one Sandbox should host several AgentProfiles.
@@ -208,7 +237,6 @@ const implementerProfile = {
208
237
  } satisfies AgentProfile;
209
238
 
210
239
  const box = await client.create({
211
- environment: "universal",
212
240
  agent: false,
213
241
  });
214
242
 
@@ -484,14 +512,11 @@ Provider credentials must come from your platform configuration or the backend m
484
512
 
485
513
  ```typescript
486
514
  const agentBox = await client.create({
487
- environment: "universal",
488
515
  backend: {
489
516
  type: "opencode",
490
- model: {
491
- provider: process.env.MODEL_PROVIDER!,
492
- model: process.env.MODEL_NAME!,
493
- apiKey: process.env.MODEL_API_KEY!,
494
- },
517
+ modelId: process.env.MODEL_NAME!,
518
+ provider: process.env.MODEL_PROVIDER!,
519
+ apiKey: process.env.MODEL_API_KEY!,
495
520
  },
496
521
  });
497
522
 
@@ -571,7 +596,6 @@ Use it for parallel jobs, coordinated workers, or workloads that need stable mac
571
596
  const fleet = await client.fleets.createWithCoordinator({
572
597
  fleetId: "dependency-audit",
573
598
  defaults: {
574
- environment: "universal",
575
599
  maxLifetimeSeconds: 1800,
576
600
  },
577
601
  policy: {
@@ -1,7 +1,7 @@
1
- import { _ as SandboxSession, h as SandboxTaskSession, r as SandboxInstance } from "../sandbox-BCygk0lS.js";
2
- import { D as CodeExecutionResult, E as CodeExecutionOptions, Gi as SessionInfo, Kr as SandboxFleetParent, O as CodeLanguage, d as BackendConfig, k as CodeResultPart, qa as BackendType, qi as SessionListOptions } from "../types-BlA8Cly0.js";
3
- import { i as Sandbox } from "../client-BCX8_Mu-.js";
4
- import { u as PreviewAuthorizer } from "../preview-Ddy1fJyc.js";
1
+ import { _ as SandboxSession, h as SandboxTaskSession, r as SandboxInstance } from "../sandbox-DalvAflZ.js";
2
+ import { D as CodeExecutionResult, E as CodeExecutionOptions, Ji as SessionListOptions, Ki as SessionInfo, Kr as SandboxFleetParent, O as CodeLanguage, d as BackendConfig, io as BackendType, k as CodeResultPart } from "../types-CdT-paBK.js";
3
+ import { i as Sandbox } from "../client-CbOQtx9b.js";
4
+ import { u as PreviewAuthorizer } from "../preview-T96_mF5c.js";
5
5
  import * as _$_modelcontextprotocol_sdk_server_index_js0 from "@modelcontextprotocol/sdk/server/index.js";
6
6
  import { JSONSchema } from "zod/v4/core";
7
7
  import { ToolSet } from "ai";
@@ -1,8 +1,8 @@
1
1
  import { a as TOOL_SPECS, i as ALL_TOOL_SPECS, o as serializeToolResult, r as bindToolSpecs, t as createMcpServer } from "../mcp-local-DY1CnWBn.js";
2
- import { k as assertCurrentBackendType } from "../interactive-controller-f_ePJqoh.js";
2
+ import { k as assertCurrentBackendType } from "../interactive-controller-5_ixpFnR.js";
3
3
  import { c as NotFoundError, g as ValidationError, m as StateError } from "../errors-D1JIX7Jm.js";
4
- import { n as Sandbox } from "../client-Cd8xKjQZ.js";
5
- import { t as SandboxInstance } from "../sandbox-D3SjjeDp.js";
4
+ import { n as Sandbox } from "../client-CT9Td-BV.js";
5
+ import { t as SandboxInstance } from "../sandbox-D3VcDY8b.js";
6
6
  import { z } from "zod";
7
7
  //#region src/agent/instances.ts
8
8
  const managers = /* @__PURE__ */ new WeakMap();
@@ -1,2 +1,2 @@
1
- import { _ as publishAgentPreview, a as previewOperationTool, c as AgentPreviewOptions, d as PreviewExecutionContext, f as PublishAgentPreviewOptions, g as listAgentPreviews, h as getAgentPreview, i as PreviewTool, l as PreviewAuthorizationRequest, m as ensureAgentPreview, n as PREVIEW_MCP_ALIAS, o as previewToolsForProfile, p as assertPreviewId, r as PREVIEW_TOOLS, s as AgentPreviewError, t as servePreviewMcp, u as PreviewAuthorizer, v as removeAgentPreview, y as resolveSelfSandbox } from "../preview-Ddy1fJyc.js";
1
+ import { _ as publishAgentPreview, a as previewOperationTool, c as AgentPreviewOptions, d as PreviewExecutionContext, f as PublishAgentPreviewOptions, g as listAgentPreviews, h as getAgentPreview, i as PreviewTool, l as PreviewAuthorizationRequest, m as ensureAgentPreview, n as PREVIEW_MCP_ALIAS, o as previewToolsForProfile, p as assertPreviewId, r as PREVIEW_TOOLS, s as AgentPreviewError, t as servePreviewMcp, u as PreviewAuthorizer, v as removeAgentPreview, y as resolveSelfSandbox } from "../preview-T96_mF5c.js";
2
2
  export { AgentPreviewError, AgentPreviewOptions, PREVIEW_MCP_ALIAS, PREVIEW_TOOLS, PreviewAuthorizationRequest, PreviewAuthorizer, PreviewExecutionContext, PreviewTool, PublishAgentPreviewOptions, assertPreviewId, ensureAgentPreview, getAgentPreview, listAgentPreviews, previewOperationTool, previewToolsForProfile, publishAgentPreview, removeAgentPreview, resolveSelfSandbox, servePreviewMcp };
@@ -1,4 +1,4 @@
1
- import { Dr as SandboxEvent, a as AgentQuestionRequest, ct as DurablePlanSnapshot, i as AgentApprovalRequirement, o as AgentRunStatus, s as AgentToolInvocation } from "./types-BlA8Cly0.js";
1
+ import { Dr as SandboxEvent, a as AgentQuestionRequest, ct as DurablePlanSnapshot, i as AgentApprovalRequirement, o as AgentRunStatus, s as AgentToolInvocation } from "./types-CdT-paBK.js";
2
2
  import { InteractionRequest } from "@tangle-network/agent-interface";
3
3
 
4
4
  //#region src/agent-run-outcome.d.ts
@@ -1,4 +1,4 @@
1
- import { i as materializeCliAuthBundle, n as assertCliAuthReferenceSupported, r as cliAuthReferenceSchema } from "../cli-auth-bundle-CJSdRlx0.js";
1
+ import { i as materializeCliAuthBundle, n as assertCliAuthReferenceSupported, r as cliAuthReferenceSchema } from "../cli-auth-bundle-D_1bUPSo.js";
2
2
  //#region src/auth/tokens.ts
3
3
  const textEncoder = new TextEncoder();
4
4
  const textDecoder = new TextDecoder();
@@ -1,7 +1,379 @@
1
1
  import { n as BACKEND_TYPE } from "./backend-types-C7b_Gpa0.js";
2
2
  import { agentProfileJsonSchema, agentProfileSchema as agentProfileSchema$1 } from "@tangle-network/agent-interface";
3
3
  import { z } from "zod";
4
- //#region ../../../packages/cli-agent-registry/dist/specs-CuvDK4-Y.mjs
4
+ //#region ../../../packages/cli-agent-registry/dist/native-session-contracts.mjs
5
+ /**
6
+ * The declared native session of every registered harness. Each entry is
7
+ * proven by a conformance receipt (tests/harness-conformance/receipts) for
8
+ * its pinned CLI version, or is listed in HARNESS_CONFORMANCE_PENDING.
9
+ *
10
+ * CLI versions are the pins in infra/nix (agent-clis.nix, flake.nix and
11
+ * npm-locks). The registry test tests/harness-session-contract.test.ts
12
+ * fails when a pin, a contract or an adapter's source moves without a new
13
+ * receipt.
14
+ */
15
+ const CLAUDE_PROJECTS = {
16
+ root: ".claude/projects",
17
+ files: ["*/{id}.jsonl", "*/{id}/subagents/**/*.jsonl"],
18
+ write: "jsonl-append",
19
+ shared: false,
20
+ format: "claude-code.projects-jsonl"
21
+ };
22
+ const CODEX_ROLLOUTS = {
23
+ root: ".codex/sessions",
24
+ files: ["*/*/*/rollout-*-{id}.jsonl"],
25
+ write: "jsonl-append",
26
+ shared: false,
27
+ format: "codex.rollout-jsonl"
28
+ };
29
+ const GEMINI_CHATS = {
30
+ root: ".gemini/tmp",
31
+ files: ["*/chats/session-*{id}*.json"],
32
+ write: "json-rewrite",
33
+ shared: false,
34
+ format: "gemini.chat-json"
35
+ };
36
+ const KIMI_SESSIONS = {
37
+ root: ".kimi/sessions",
38
+ files: ["*/{id}/**", "*/{id}.jsonl"],
39
+ write: "jsonl-append",
40
+ shared: false,
41
+ format: "kimi.session-dir"
42
+ };
43
+ const HERMES_STATE = {
44
+ root: ".hermes",
45
+ files: [
46
+ "state.db",
47
+ "state.db-wal",
48
+ "state.db-shm"
49
+ ],
50
+ write: "sqlite-wal",
51
+ shared: true,
52
+ format: "hermes.state-sqlite"
53
+ };
54
+ const NATIVE_SESSION_CONTRACTS = {
55
+ "claude-code": {
56
+ version: 1,
57
+ stores: [CLAUDE_PROJECTS],
58
+ identity: {
59
+ kind: "pre-minted",
60
+ args: ["--session-id", "{id}"]
61
+ },
62
+ resume: {
63
+ kind: "args",
64
+ args: ["--resume", "{id}"]
65
+ },
66
+ forbiddenArgs: ["--no-session-persistence", "--fork-session"],
67
+ storeEnv: { CLAUDE_CONFIG_DIR: ".claude" },
68
+ evidence: {
69
+ servedModel: "provider-response",
70
+ usage: "per-response",
71
+ endingError: "session-record"
72
+ },
73
+ cliVersion: "2.1.286"
74
+ },
75
+ codex: {
76
+ version: 1,
77
+ stores: [CODEX_ROLLOUTS],
78
+ identity: {
79
+ kind: "first-event",
80
+ event: "thread.started",
81
+ deadlineMs: 3e4
82
+ },
83
+ resume: {
84
+ kind: "args",
85
+ args: [
86
+ "exec",
87
+ "resume",
88
+ "{id}"
89
+ ]
90
+ },
91
+ forbiddenArgs: ["--ephemeral"],
92
+ storeEnv: { CODEX_HOME: ".codex" },
93
+ evidence: {
94
+ servedModel: "turn-context",
95
+ usage: "cumulative",
96
+ endingError: "session-record"
97
+ },
98
+ cliVersion: "0.145.0"
99
+ },
100
+ opencode: {
101
+ version: 1,
102
+ stores: [{
103
+ root: ".local/share/opencode",
104
+ files: [
105
+ "opencode.db",
106
+ "opencode.db-wal",
107
+ "opencode.db-shm"
108
+ ],
109
+ write: "sqlite-wal",
110
+ shared: true,
111
+ format: "opencode.sqlite"
112
+ }],
113
+ identity: {
114
+ kind: "first-event",
115
+ event: "sessionID",
116
+ deadlineMs: 3e5
117
+ },
118
+ resume: {
119
+ kind: "args",
120
+ args: ["--session", "{id}"]
121
+ },
122
+ forbiddenArgs: [],
123
+ storeEnv: { XDG_DATA_HOME: ".local/share" },
124
+ evidence: {
125
+ servedModel: "turn-context",
126
+ usage: "per-response",
127
+ endingError: "session-record"
128
+ },
129
+ cliVersion: "1.18.25"
130
+ },
131
+ pi: {
132
+ version: 1,
133
+ stores: [{
134
+ root: ".pi/agent/sessions",
135
+ files: ["**/*_{id}.jsonl"],
136
+ write: "jsonl-append",
137
+ shared: false,
138
+ format: "pi.session-jsonl"
139
+ }],
140
+ identity: {
141
+ kind: "pre-minted",
142
+ args: ["--session-id", "{id}"]
143
+ },
144
+ resume: {
145
+ kind: "args",
146
+ args: ["--session", "{id}"]
147
+ },
148
+ forbiddenArgs: [
149
+ "--no-session",
150
+ "--fork",
151
+ "--continue"
152
+ ],
153
+ storeEnv: {
154
+ PI_CODING_AGENT_DIR: ".pi/agent",
155
+ PI_CODING_AGENT_SESSION_DIR: ".pi/agent/sessions",
156
+ "--session-dir": ".pi/agent/sessions"
157
+ },
158
+ evidence: {
159
+ servedModel: "session-record",
160
+ usage: "per-response",
161
+ endingError: "session-record"
162
+ },
163
+ cliVersion: "0.85.1"
164
+ },
165
+ "kimi-code": {
166
+ version: 1,
167
+ stores: [KIMI_SESSIONS],
168
+ identity: {
169
+ kind: "pre-minted",
170
+ args: ["--session", "{id}"]
171
+ },
172
+ resume: {
173
+ kind: "args",
174
+ args: ["--session", "{id}"]
175
+ },
176
+ forbiddenArgs: [],
177
+ storeEnv: {},
178
+ evidence: {
179
+ servedModel: "session-record",
180
+ usage: "per-response",
181
+ endingError: "none"
182
+ },
183
+ cliVersion: "1.49.0"
184
+ },
185
+ "factory-droids": {
186
+ version: 1,
187
+ stores: [{
188
+ root: ".factory/sessions",
189
+ files: ["*/{id}.jsonl"],
190
+ write: "jsonl-append",
191
+ shared: false,
192
+ format: "factory.session-jsonl"
193
+ }, {
194
+ root: ".factory/sessions",
195
+ files: ["*/{id}.settings.json"],
196
+ write: "json-rewrite",
197
+ shared: false,
198
+ format: "factory.session-jsonl"
199
+ }],
200
+ identity: {
201
+ kind: "first-event",
202
+ event: "session_id",
203
+ deadlineMs: 6e4
204
+ },
205
+ resume: {
206
+ kind: "args",
207
+ args: ["--session-id", "{id}"]
208
+ },
209
+ forbiddenArgs: [],
210
+ storeEnv: {},
211
+ evidence: {
212
+ servedModel: "turn-context",
213
+ usage: "session-total",
214
+ endingError: "none"
215
+ },
216
+ cliVersion: "0.232.0"
217
+ },
218
+ amp: {
219
+ version: 1,
220
+ stores: [{
221
+ root: ".local/share/amp/threads",
222
+ files: ["{id}.json"],
223
+ write: "json-rewrite",
224
+ shared: false,
225
+ format: "amp.thread-json"
226
+ }],
227
+ identity: {
228
+ kind: "first-event",
229
+ event: "thread",
230
+ deadlineMs: 6e4
231
+ },
232
+ resume: {
233
+ kind: "args",
234
+ args: [
235
+ "threads",
236
+ "continue",
237
+ "{id}"
238
+ ]
239
+ },
240
+ forbiddenArgs: [],
241
+ storeEnv: { XDG_DATA_HOME: ".local/share" },
242
+ evidence: {
243
+ servedModel: "session-record",
244
+ usage: "per-response",
245
+ endingError: "none"
246
+ },
247
+ cliVersion: "0.0.1790887360-g98f23e"
248
+ },
249
+ prime: {
250
+ version: 1,
251
+ stores: [{
252
+ root: ".prime-provider/prime-agent-dirs",
253
+ files: ["**/*_{id}.jsonl"],
254
+ write: "jsonl-append",
255
+ shared: false,
256
+ format: "prime.session-jsonl"
257
+ }],
258
+ identity: {
259
+ kind: "api-created",
260
+ call: "acp session/new"
261
+ },
262
+ resume: { kind: "api" },
263
+ forbiddenArgs: ["--no-session"],
264
+ storeEnv: {},
265
+ evidence: {
266
+ servedModel: "session-record",
267
+ usage: "per-response",
268
+ endingError: "session-record"
269
+ },
270
+ cliVersion: "0.7.2"
271
+ },
272
+ hermes: {
273
+ version: 1,
274
+ stores: [HERMES_STATE],
275
+ identity: {
276
+ kind: "first-event",
277
+ event: "session_id",
278
+ deadlineMs: 6e4
279
+ },
280
+ resume: {
281
+ kind: "args",
282
+ args: ["--resume", "{id}"]
283
+ },
284
+ forbiddenArgs: [],
285
+ storeEnv: { HERMES_HOME: ".hermes" },
286
+ evidence: {
287
+ servedModel: "session-record",
288
+ usage: "session-total",
289
+ endingError: "none"
290
+ },
291
+ cliVersion: "2026.9.24"
292
+ },
293
+ forge: {
294
+ version: 1,
295
+ stores: [{
296
+ root: ".forge",
297
+ files: [
298
+ ".forge.db",
299
+ ".forge.db-wal",
300
+ ".forge.db-shm"
301
+ ],
302
+ write: "sqlite-wal",
303
+ shared: true,
304
+ format: "forge.sqlite"
305
+ }],
306
+ identity: {
307
+ kind: "first-event",
308
+ event: "conversation",
309
+ deadlineMs: 6e4
310
+ },
311
+ resume: {
312
+ kind: "args",
313
+ args: ["--conversation-id", "{id}"]
314
+ },
315
+ forbiddenArgs: [],
316
+ storeEnv: {},
317
+ evidence: {
318
+ servedModel: "session-record",
319
+ usage: "per-response",
320
+ endingError: "none"
321
+ },
322
+ cliVersion: "2.14.0"
323
+ },
324
+ openclaw: {
325
+ version: 1,
326
+ stores: [{
327
+ root: ".openclaw/agents",
328
+ files: ["**/{id}.jsonl"],
329
+ write: "jsonl-append",
330
+ shared: false,
331
+ format: "openclaw.session-jsonl"
332
+ }],
333
+ identity: {
334
+ kind: "first-event",
335
+ event: "session",
336
+ deadlineMs: 6e4
337
+ },
338
+ resume: {
339
+ kind: "args",
340
+ args: ["--session-id", "{id}"]
341
+ },
342
+ forbiddenArgs: [],
343
+ storeEnv: {},
344
+ evidence: {
345
+ servedModel: "session-record",
346
+ usage: "per-response",
347
+ endingError: "none"
348
+ },
349
+ cliVersion: "2026.7.1-2"
350
+ },
351
+ acp: {
352
+ version: 1,
353
+ stores: [
354
+ CLAUDE_PROJECTS,
355
+ CODEX_ROLLOUTS,
356
+ GEMINI_CHATS,
357
+ KIMI_SESSIONS,
358
+ HERMES_STATE
359
+ ],
360
+ identity: {
361
+ kind: "api-created",
362
+ call: "acp session/new"
363
+ },
364
+ resume: { kind: "api" },
365
+ forbiddenArgs: [],
366
+ storeEnv: {},
367
+ evidence: {
368
+ servedModel: "session-record",
369
+ usage: "per-response",
370
+ endingError: "none"
371
+ },
372
+ cliVersion: "claude-agent-acp 0.64.2; codex-acp 0.16.0; gemini-cli 0.62.0"
373
+ }
374
+ };
375
+ //#endregion
376
+ //#region ../../../packages/cli-agent-registry/dist/specs-DSy1cxjc.mjs
5
377
  z.globalRegistry.add(agentProfileSchema$1, {
6
378
  id: "AgentProfile",
7
379
  ...agentProfileJsonSchema
@@ -9,6 +381,7 @@ z.globalRegistry.add(agentProfileSchema$1, {
9
381
  const CLI_AGENT_SPECS = [
10
382
  {
11
383
  name: BACKEND_TYPE.OPENCODE,
384
+ nativeSession: NATIVE_SESSION_CONTRACTS.opencode,
12
385
  messageStorageDir: ".opencode",
13
386
  displayName: "OpenCode Agent",
14
387
  description: "OpenCode CLI coding agent with native sessions, profiles, tools, and MCP.",
@@ -131,6 +504,7 @@ const CLI_AGENT_SPECS = [
131
504
  },
132
505
  {
133
506
  name: BACKEND_TYPE.CLAUDE_CODE,
507
+ nativeSession: NATIVE_SESSION_CONTRACTS["claude-code"],
134
508
  runtime: {},
135
509
  messageStorageDir: ".claude-code",
136
510
  displayName: "Claude Code",
@@ -181,6 +555,7 @@ const CLI_AGENT_SPECS = [
181
555
  },
182
556
  {
183
557
  name: BACKEND_TYPE.KIMI_CODE,
558
+ nativeSession: NATIVE_SESSION_CONTRACTS["kimi-code"],
184
559
  messageStorageDir: ".kimi-code",
185
560
  displayName: "Kimi Code",
186
561
  description: "Moonshot AI Kimi Code CLI — headless non-interactive mode via `kimi --print --output-format stream-json --prompt ...`. Defaults to OAuth (Kimi Code subscription) with credentials materialized from the host-managed ~/.kimi/credentials/kimi-code.json; falls back to MOONSHOT_API_KEY when an apiKey is supplied.",
@@ -208,6 +583,7 @@ const CLI_AGENT_SPECS = [
208
583
  },
209
584
  {
210
585
  name: BACKEND_TYPE.CODEX,
586
+ nativeSession: NATIVE_SESSION_CONTRACTS.codex,
211
587
  messageStorageDir: ".codex",
212
588
  displayName: "Codex",
213
589
  description: "OpenAI Codex CLI-based agent backend.",
@@ -244,6 +620,7 @@ const CLI_AGENT_SPECS = [
244
620
  },
245
621
  {
246
622
  name: BACKEND_TYPE.AMP,
623
+ nativeSession: NATIVE_SESSION_CONTRACTS.amp,
247
624
  messageStorageDir: ".amp-sessions",
248
625
  displayName: "AMP (Sourcegraph)",
249
626
  description: "Sourcegraph AMP CLI-based agent backend.",
@@ -270,6 +647,7 @@ const CLI_AGENT_SPECS = [
270
647
  },
271
648
  {
272
649
  name: BACKEND_TYPE.FACTORY_DROIDS,
650
+ nativeSession: NATIVE_SESSION_CONTRACTS["factory-droids"],
273
651
  messageStorageDir: ".factory-droids",
274
652
  displayName: "Factory Droids",
275
653
  description: "Factory Droids CLI-based agent backend.",
@@ -291,6 +669,7 @@ const CLI_AGENT_SPECS = [
291
669
  },
292
670
  {
293
671
  name: BACKEND_TYPE.PI,
672
+ nativeSession: NATIVE_SESSION_CONTRACTS.pi,
294
673
  runtime: {},
295
674
  messageStorageDir: ".pi/agent",
296
675
  displayName: "Pi",
@@ -319,6 +698,7 @@ const CLI_AGENT_SPECS = [
319
698
  },
320
699
  {
321
700
  name: BACKEND_TYPE.PRIME,
701
+ nativeSession: NATIVE_SESSION_CONTRACTS.prime,
322
702
  messageStorageDir: ".prime-provider",
323
703
  displayName: "Prime Agent (PrimeIntellect)",
324
704
  description: "PrimeIntellect-ai/prime-agent — IPython-first coding agent (pi hard fork, fork line 0.7.x) driven over its native ACP mode. Model tuple travels via backend.model into a per-session materialized models.json, never env; the adapter pins PRIME_AGENT_CODING_AGENT_DIR to an isolated per-session agent dir (fail-closed harness-state isolation).",
@@ -341,6 +721,7 @@ const CLI_AGENT_SPECS = [
341
721
  },
342
722
  {
343
723
  name: BACKEND_TYPE.HERMES,
724
+ nativeSession: NATIVE_SESSION_CONTRACTS.hermes,
344
725
  messageStorageDir: ".hermes-agent",
345
726
  displayName: "Hermes Agent (Nous Research)",
346
727
  description: "Open-source self-improving CLI agent. Persistent memory and skills live in $HERMES_HOME (pinned to the per-session workspace mount, not the read-only in-box $HOME) across same-tenant snapshot resumes — the learning loop is the differentiator. Provider-pluggable; defaults to OpenRouter via Tangle Router.",
@@ -369,6 +750,7 @@ const CLI_AGENT_SPECS = [
369
750
  },
370
751
  {
371
752
  name: BACKEND_TYPE.FORGE,
753
+ nativeSession: NATIVE_SESSION_CONTRACTS.forge,
372
754
  messageStorageDir: ".forge-agent",
373
755
  displayName: "Forge (forgecode.dev)",
374
756
  description: "Rust-built multi-provider coding agent from tailcallhq/forgecode. Speaks anthropic/openai/openrouter/gemini/deepseek/kimi + local providers (ollama, lm_studio, llama_cpp). Credentials live in ~/.forge/.credentials.json, materialized via the standard authFiles pipeline — no interactive `forge provider login` required.",
@@ -400,6 +782,7 @@ const CLI_AGENT_SPECS = [
400
782
  },
401
783
  {
402
784
  name: BACKEND_TYPE.OPENCLAW,
785
+ nativeSession: NATIVE_SESSION_CONTRACTS.openclaw,
403
786
  messageStorageDir: ".openclaw-agent",
404
787
  displayName: "OpenClaw (Orchestrator)",
405
788
  description: "Orchestrator-tier CLI agent that dispatches to underlying coding-agent CLIs (claude-cli, codex-cli, gemini-cli) via its built-in cliBackends plugin model. Use this when you want one entry point that intelligently routes tasks to the right coding harness.",
@@ -427,6 +810,7 @@ const CLI_AGENT_SPECS = [
427
810
  },
428
811
  {
429
812
  name: BACKEND_TYPE.NANOCLAW,
813
+ nativeSession: null,
430
814
  messageStorageDir: ".nanoclaw-agent",
431
815
  displayName: "NanoClaw",
432
816
  description: "NanoClaw local socket bridge. Requires a running NanoClaw install and uses its `pnpm run chat` CLI channel; the adapter does not manage NanoClaw's Docker/service lifecycle.",
@@ -461,6 +845,7 @@ const CLI_AGENT_SPECS = [
461
845
  },
462
846
  {
463
847
  name: BACKEND_TYPE.ACP,
848
+ nativeSession: NATIVE_SESSION_CONTRACTS.acp,
464
849
  messageStorageDir: ".acp-agent",
465
850
  displayName: "ACP Bridge (multi-agent)",
466
851
  description: "Generic Agent Client Protocol bridge — fronts any ACP-compliant agent binary (claude-agent-acp, codex-acp, gemini, openclaw acp, ...). Pick the backing agent via config.subAgent. One TypeScript adapter, many supported coding harnesses.",
@@ -482,6 +867,7 @@ const CLI_AGENT_SPECS = [
482
867
  },
483
868
  {
484
869
  name: BACKEND_TYPE.CURSOR,
870
+ nativeSession: null,
485
871
  messageStorageDir: ".cursor-sdk-sessions",
486
872
  displayName: "Cursor Agent SDK",
487
873
  description: "Cursor Agent SDK backend. Runs Cursor's local agent against the sandbox workspace via @cursor/sdk, using CURSOR_API_KEY or backend.model.apiKey for authentication.",
@@ -506,6 +892,7 @@ const CLI_AGENT_SPECS = [
506
892
  },
507
893
  {
508
894
  name: BACKEND_TYPE.CLI_BASE,
895
+ nativeSession: null,
509
896
  displayName: "CLI Base (no agent)",
510
897
  description: "Bare sandbox without an AI agent backend. Use when you want the workspace, tools, and SSH access but no LLM dispatch.",
511
898
  envVars: {},