@tangle-network/sandbox 0.60.61 → 0.60.74
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/agent/index.d.ts +4 -4
- package/dist/agent/index.js +4 -4
- package/dist/agent/preview.d.ts +1 -1
- package/dist/{agent-run-outcome-jmKaXys4.d.ts → agent-run-outcome-eZF8RuUN.d.ts} +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/backend-types-D6bYbvMB.js +42 -0
- package/dist/{browser-interactive-control-controller-JUW3gOGH.d.ts → browser-interactive-control-controller-rpTbyvAS.d.ts} +1 -1
- package/dist/{chunked-upload-BklCn3Li.js → chunked-upload-CDrLMO8N.js} +1 -1
- package/dist/{chunked-upload-file-Cp-iWsWN.js → chunked-upload-file-BwbqHWUX.js} +1 -1
- package/dist/cli-auth-bundle-cSJjPeFF.js +1543 -0
- package/dist/{client-4G99U4L2.d.ts → client-BujziOIc.d.ts} +10 -6
- package/dist/{client-BuWj2tMd.js → client-C7Y6waVg.js} +29 -10
- package/dist/collaboration/index.d.ts +1 -1
- package/dist/collaboration/index.js +1 -1
- package/dist/{collaboration-B2g1j2ey.js → collaboration-CTbq2OYh.js} +1 -1
- package/dist/core.d.ts +7 -7
- package/dist/core.js +3 -3
- package/dist/{errors-CBy-dqOv.d.ts → errors-Bj5DL2ge.d.ts} +61 -2
- package/dist/{errors-iWIsey1D.js → errors-C8YcR1BL.js} +31 -1
- package/dist/{index-ClxFpHIl.d.ts → index-CP9a77KP.d.ts} +2 -2
- package/dist/index.d.ts +14 -15
- package/dist/index.js +9 -9
- package/dist/intelligence/index.js +1 -1
- package/dist/interactive-control.d.ts +1 -1
- package/dist/{interactive-controller-DaYmUCO_.js → interactive-controller-BFbCkMq4.js} +213 -21
- package/dist/{lines-Bm8NULkl.d.ts → lines-_rRdwxof.d.ts} +10 -2
- package/dist/lines.d.ts +2 -2
- package/dist/lines.js +1 -1
- package/dist/{local-cli-auth-CZjO7FeG.js → local-cli-auth-CBV7Vjk5.js} +1 -1
- package/dist/{managed-process-Ddx8dULu.d.ts → managed-process-CPHeQONO.d.ts} +1 -1
- package/dist/{preview-DqKY0kxQ.d.ts → preview-n41aOXde.d.ts} +3 -3
- package/dist/runtime.d.ts +5 -6
- package/dist/runtime.js +3 -3
- package/dist/{sandbox-C6BLOrcg.js → sandbox-DGoQMthD.js} +678 -69
- package/dist/{sandbox-CIK4LMS-.d.ts → sandbox-DfSqEr3f.d.ts} +70 -17
- package/dist/tangle/index.d.ts +1 -1
- package/dist/tangle/index.js +1 -1
- package/dist/{tangle-CvB_QTGV.js → tangle-vyeLQFFg.js} +2 -2
- package/dist/{terminal-stream-CV1pMSKC.d.ts → terminal-stream-jdYomM1m.d.ts} +123 -4
- package/dist/{types-CS_FytQM.d.ts → types-Mi83KD0D.d.ts} +194 -21
- package/package.json +5 -5
- package/dist/backend-types-C7b_Gpa0.js +0 -59
- package/dist/cli-auth-bundle-BWNakb5F.js +0 -1007
- package/dist/interactive-controller-DNbLzamS.d.ts +0 -40
- /package/dist/{index-BgmgfYZZ.d.ts → index-DO7GVpk_.d.ts} +0 -0
- /package/dist/{index-DHuHjNie.d.ts → index-DZ27pdB8.d.ts} +0 -0
|
@@ -1,1007 +0,0 @@
|
|
|
1
|
-
import { n as BACKEND_TYPE } from "./backend-types-C7b_Gpa0.js";
|
|
2
|
-
import { agentProfileJsonSchema, agentProfileSchema as agentProfileSchema$1 } from "@tangle-network/agent-interface";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
import "@tangle-network/agent-interface/harness-capabilities";
|
|
5
|
-
//#region ../../../packages/cli-agent-registry/dist/native-session-contracts-C678jqma.mjs
|
|
6
|
-
/** The CLI version infra/nix ships for each registered harness. */
|
|
7
|
-
const HARNESS_CLI_VERSIONS = {
|
|
8
|
-
"claude-code": "2.1.296",
|
|
9
|
-
codex: "0.162.1",
|
|
10
|
-
opencode: "1.18.35",
|
|
11
|
-
pi: "1.1.0",
|
|
12
|
-
"kimi-code": "1.49.0",
|
|
13
|
-
"factory-droids": "0.240.0",
|
|
14
|
-
amp: "0.0.1791633643-g895a91",
|
|
15
|
-
prime: "0.7.2",
|
|
16
|
-
hermes: "0.21.6",
|
|
17
|
-
forge: "2.14.0",
|
|
18
|
-
openclaw: "2026.7.1-2",
|
|
19
|
-
acp: "claude-agent-acp 0.89.1; codex-acp 0.16.0; gemini-cli 0.63.0"
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* The declared native session of every registered harness. Each entry is
|
|
23
|
-
* proven by a conformance receipt (tests/harness-conformance/receipts) for
|
|
24
|
-
* its pinned CLI version, or is listed in HARNESS_CONFORMANCE_PENDING.
|
|
25
|
-
*
|
|
26
|
-
* CLI versions are the pins in infra/nix (agent-clis.json and flake.nix),
|
|
27
|
-
* generated into harness-cli-versions.ts by the bump. The registry test
|
|
28
|
-
* tests/harness-session-contract.test.ts fails when a pin, a contract or an
|
|
29
|
-
* adapter's source moves without a new receipt.
|
|
30
|
-
*/
|
|
31
|
-
const CLAUDE_PROJECTS = {
|
|
32
|
-
root: ".claude/projects",
|
|
33
|
-
files: ["*/{id}.jsonl", "*/{id}/subagents/**/*.jsonl"],
|
|
34
|
-
write: "jsonl-append",
|
|
35
|
-
shared: false,
|
|
36
|
-
format: "claude-code.projects-jsonl"
|
|
37
|
-
};
|
|
38
|
-
const CODEX_ROLLOUTS = {
|
|
39
|
-
root: ".codex/sessions",
|
|
40
|
-
files: ["*/*/*/rollout-*-{id}.jsonl"],
|
|
41
|
-
write: "jsonl-append",
|
|
42
|
-
shared: false,
|
|
43
|
-
format: "codex.rollout-jsonl"
|
|
44
|
-
};
|
|
45
|
-
const GEMINI_CHATS = {
|
|
46
|
-
root: ".gemini/tmp",
|
|
47
|
-
files: ["*/chats/session-*{id}*.json"],
|
|
48
|
-
write: "json-rewrite",
|
|
49
|
-
shared: false,
|
|
50
|
-
format: "gemini.chat-json"
|
|
51
|
-
};
|
|
52
|
-
const KIMI_SESSIONS = {
|
|
53
|
-
root: ".kimi/sessions",
|
|
54
|
-
files: ["*/{id}/**", "*/{id}.jsonl"],
|
|
55
|
-
write: "jsonl-append",
|
|
56
|
-
shared: false,
|
|
57
|
-
format: "kimi.session-dir"
|
|
58
|
-
};
|
|
59
|
-
const HERMES_STATE = {
|
|
60
|
-
root: ".hermes",
|
|
61
|
-
files: [
|
|
62
|
-
"state.db",
|
|
63
|
-
"state.db-wal",
|
|
64
|
-
"state.db-shm"
|
|
65
|
-
],
|
|
66
|
-
write: "sqlite-wal",
|
|
67
|
-
shared: true,
|
|
68
|
-
format: "hermes.state-sqlite"
|
|
69
|
-
};
|
|
70
|
-
const NATIVE_SESSION_CONTRACTS = {
|
|
71
|
-
"claude-code": {
|
|
72
|
-
version: 1,
|
|
73
|
-
stores: [CLAUDE_PROJECTS],
|
|
74
|
-
identity: {
|
|
75
|
-
kind: "pre-minted",
|
|
76
|
-
args: ["--session-id", "{id}"]
|
|
77
|
-
},
|
|
78
|
-
resume: {
|
|
79
|
-
kind: "args",
|
|
80
|
-
args: ["--resume", "{id}"]
|
|
81
|
-
},
|
|
82
|
-
forbiddenArgs: ["--no-session-persistence", "--fork-session"],
|
|
83
|
-
storeEnv: { CLAUDE_CONFIG_DIR: ".claude" },
|
|
84
|
-
evidence: {
|
|
85
|
-
servedModel: "provider-response",
|
|
86
|
-
usage: "per-response",
|
|
87
|
-
endingError: "session-record"
|
|
88
|
-
},
|
|
89
|
-
cliVersion: HARNESS_CLI_VERSIONS["claude-code"]
|
|
90
|
-
},
|
|
91
|
-
codex: {
|
|
92
|
-
version: 1,
|
|
93
|
-
stores: [CODEX_ROLLOUTS],
|
|
94
|
-
identity: {
|
|
95
|
-
kind: "first-event",
|
|
96
|
-
event: "thread.started",
|
|
97
|
-
deadlineMs: 3e4
|
|
98
|
-
},
|
|
99
|
-
resume: {
|
|
100
|
-
kind: "args",
|
|
101
|
-
args: [
|
|
102
|
-
"exec",
|
|
103
|
-
"resume",
|
|
104
|
-
"{id}"
|
|
105
|
-
]
|
|
106
|
-
},
|
|
107
|
-
forbiddenArgs: ["--ephemeral"],
|
|
108
|
-
storeEnv: { CODEX_HOME: ".codex" },
|
|
109
|
-
evidence: {
|
|
110
|
-
servedModel: "turn-context",
|
|
111
|
-
usage: "cumulative",
|
|
112
|
-
endingError: "session-record"
|
|
113
|
-
},
|
|
114
|
-
cliVersion: HARNESS_CLI_VERSIONS.codex
|
|
115
|
-
},
|
|
116
|
-
opencode: {
|
|
117
|
-
version: 1,
|
|
118
|
-
stores: [{
|
|
119
|
-
root: ".local/share/opencode",
|
|
120
|
-
files: [
|
|
121
|
-
"opencode.db",
|
|
122
|
-
"opencode.db-wal",
|
|
123
|
-
"opencode.db-shm"
|
|
124
|
-
],
|
|
125
|
-
write: "sqlite-wal",
|
|
126
|
-
shared: true,
|
|
127
|
-
format: "opencode.sqlite"
|
|
128
|
-
}],
|
|
129
|
-
identity: {
|
|
130
|
-
kind: "first-event",
|
|
131
|
-
event: "sessionID",
|
|
132
|
-
deadlineMs: 3e5
|
|
133
|
-
},
|
|
134
|
-
resume: {
|
|
135
|
-
kind: "args",
|
|
136
|
-
args: ["--session", "{id}"]
|
|
137
|
-
},
|
|
138
|
-
forbiddenArgs: [],
|
|
139
|
-
storeEnv: { XDG_DATA_HOME: ".local/share" },
|
|
140
|
-
evidence: {
|
|
141
|
-
servedModel: "turn-context",
|
|
142
|
-
usage: "per-response",
|
|
143
|
-
endingError: "session-record"
|
|
144
|
-
},
|
|
145
|
-
cliVersion: HARNESS_CLI_VERSIONS.opencode
|
|
146
|
-
},
|
|
147
|
-
pi: {
|
|
148
|
-
version: 1,
|
|
149
|
-
stores: [{
|
|
150
|
-
root: ".pi/agent/sessions",
|
|
151
|
-
files: ["**/*_{id}.jsonl"],
|
|
152
|
-
write: "jsonl-append",
|
|
153
|
-
shared: false,
|
|
154
|
-
format: "pi.session-jsonl"
|
|
155
|
-
}],
|
|
156
|
-
identity: {
|
|
157
|
-
kind: "pre-minted",
|
|
158
|
-
args: ["--session-id", "{id}"]
|
|
159
|
-
},
|
|
160
|
-
resume: {
|
|
161
|
-
kind: "args",
|
|
162
|
-
args: ["--session", "{id}"]
|
|
163
|
-
},
|
|
164
|
-
forbiddenArgs: [
|
|
165
|
-
"--no-session",
|
|
166
|
-
"--fork",
|
|
167
|
-
"--continue"
|
|
168
|
-
],
|
|
169
|
-
storeEnv: {
|
|
170
|
-
PI_CODING_AGENT_DIR: ".pi/agent",
|
|
171
|
-
PI_CODING_AGENT_SESSION_DIR: ".pi/agent/sessions",
|
|
172
|
-
"--session-dir": ".pi/agent/sessions"
|
|
173
|
-
},
|
|
174
|
-
evidence: {
|
|
175
|
-
servedModel: "session-record",
|
|
176
|
-
usage: "per-response",
|
|
177
|
-
endingError: "session-record"
|
|
178
|
-
},
|
|
179
|
-
cliVersion: HARNESS_CLI_VERSIONS.pi
|
|
180
|
-
},
|
|
181
|
-
"kimi-code": {
|
|
182
|
-
version: 1,
|
|
183
|
-
stores: [KIMI_SESSIONS],
|
|
184
|
-
identity: {
|
|
185
|
-
kind: "pre-minted",
|
|
186
|
-
args: ["--session", "{id}"]
|
|
187
|
-
},
|
|
188
|
-
resume: {
|
|
189
|
-
kind: "args",
|
|
190
|
-
args: ["--session", "{id}"]
|
|
191
|
-
},
|
|
192
|
-
forbiddenArgs: [],
|
|
193
|
-
storeEnv: {},
|
|
194
|
-
evidence: {
|
|
195
|
-
servedModel: "session-record",
|
|
196
|
-
usage: "per-response",
|
|
197
|
-
endingError: "none"
|
|
198
|
-
},
|
|
199
|
-
cliVersion: HARNESS_CLI_VERSIONS["kimi-code"]
|
|
200
|
-
},
|
|
201
|
-
"factory-droids": {
|
|
202
|
-
version: 1,
|
|
203
|
-
stores: [{
|
|
204
|
-
root: ".factory/sessions",
|
|
205
|
-
files: ["*/{id}.jsonl"],
|
|
206
|
-
write: "jsonl-append",
|
|
207
|
-
shared: false,
|
|
208
|
-
format: "factory.session-jsonl"
|
|
209
|
-
}, {
|
|
210
|
-
root: ".factory/sessions",
|
|
211
|
-
files: ["*/{id}.settings.json"],
|
|
212
|
-
write: "json-rewrite",
|
|
213
|
-
shared: false,
|
|
214
|
-
format: "factory.session-jsonl"
|
|
215
|
-
}],
|
|
216
|
-
identity: {
|
|
217
|
-
kind: "first-event",
|
|
218
|
-
event: "session_id",
|
|
219
|
-
deadlineMs: 6e4
|
|
220
|
-
},
|
|
221
|
-
resume: {
|
|
222
|
-
kind: "args",
|
|
223
|
-
args: ["--session-id", "{id}"]
|
|
224
|
-
},
|
|
225
|
-
forbiddenArgs: [],
|
|
226
|
-
storeEnv: {},
|
|
227
|
-
evidence: {
|
|
228
|
-
servedModel: "turn-context",
|
|
229
|
-
usage: "session-total",
|
|
230
|
-
endingError: "none"
|
|
231
|
-
},
|
|
232
|
-
cliVersion: HARNESS_CLI_VERSIONS["factory-droids"]
|
|
233
|
-
},
|
|
234
|
-
amp: {
|
|
235
|
-
version: 1,
|
|
236
|
-
stores: [{
|
|
237
|
-
root: ".local/share/amp/threads",
|
|
238
|
-
files: ["{id}.json"],
|
|
239
|
-
write: "json-rewrite",
|
|
240
|
-
shared: false,
|
|
241
|
-
format: "amp.thread-json"
|
|
242
|
-
}],
|
|
243
|
-
identity: {
|
|
244
|
-
kind: "first-event",
|
|
245
|
-
event: "thread",
|
|
246
|
-
deadlineMs: 6e4
|
|
247
|
-
},
|
|
248
|
-
resume: {
|
|
249
|
-
kind: "args",
|
|
250
|
-
args: [
|
|
251
|
-
"threads",
|
|
252
|
-
"continue",
|
|
253
|
-
"{id}"
|
|
254
|
-
]
|
|
255
|
-
},
|
|
256
|
-
forbiddenArgs: [],
|
|
257
|
-
storeEnv: { XDG_DATA_HOME: ".local/share" },
|
|
258
|
-
evidence: {
|
|
259
|
-
servedModel: "session-record",
|
|
260
|
-
usage: "per-response",
|
|
261
|
-
endingError: "none"
|
|
262
|
-
},
|
|
263
|
-
cliVersion: HARNESS_CLI_VERSIONS.amp
|
|
264
|
-
},
|
|
265
|
-
prime: {
|
|
266
|
-
version: 1,
|
|
267
|
-
stores: [{
|
|
268
|
-
root: ".prime-provider/prime-agent-dirs",
|
|
269
|
-
files: ["**/*_{id}.jsonl"],
|
|
270
|
-
write: "jsonl-append",
|
|
271
|
-
shared: false,
|
|
272
|
-
format: "prime.session-jsonl"
|
|
273
|
-
}],
|
|
274
|
-
identity: {
|
|
275
|
-
kind: "api-created",
|
|
276
|
-
call: "acp session/new"
|
|
277
|
-
},
|
|
278
|
-
resume: { kind: "api" },
|
|
279
|
-
forbiddenArgs: ["--no-session"],
|
|
280
|
-
storeEnv: {},
|
|
281
|
-
evidence: {
|
|
282
|
-
servedModel: "session-record",
|
|
283
|
-
usage: "per-response",
|
|
284
|
-
endingError: "session-record"
|
|
285
|
-
},
|
|
286
|
-
cliVersion: HARNESS_CLI_VERSIONS.prime
|
|
287
|
-
},
|
|
288
|
-
hermes: {
|
|
289
|
-
version: 1,
|
|
290
|
-
stores: [HERMES_STATE],
|
|
291
|
-
identity: {
|
|
292
|
-
kind: "first-event",
|
|
293
|
-
event: "session_id",
|
|
294
|
-
deadlineMs: 6e4
|
|
295
|
-
},
|
|
296
|
-
resume: {
|
|
297
|
-
kind: "args",
|
|
298
|
-
args: ["--resume", "{id}"]
|
|
299
|
-
},
|
|
300
|
-
forbiddenArgs: [],
|
|
301
|
-
storeEnv: { HERMES_HOME: ".hermes" },
|
|
302
|
-
evidence: {
|
|
303
|
-
servedModel: "session-record",
|
|
304
|
-
usage: "session-total",
|
|
305
|
-
endingError: "none"
|
|
306
|
-
},
|
|
307
|
-
cliVersion: HARNESS_CLI_VERSIONS.hermes
|
|
308
|
-
},
|
|
309
|
-
forge: {
|
|
310
|
-
version: 1,
|
|
311
|
-
stores: [{
|
|
312
|
-
root: ".forge",
|
|
313
|
-
files: [
|
|
314
|
-
".forge.db",
|
|
315
|
-
".forge.db-wal",
|
|
316
|
-
".forge.db-shm"
|
|
317
|
-
],
|
|
318
|
-
write: "sqlite-wal",
|
|
319
|
-
shared: true,
|
|
320
|
-
format: "forge.sqlite"
|
|
321
|
-
}],
|
|
322
|
-
identity: {
|
|
323
|
-
kind: "first-event",
|
|
324
|
-
event: "conversation",
|
|
325
|
-
deadlineMs: 6e4
|
|
326
|
-
},
|
|
327
|
-
resume: {
|
|
328
|
-
kind: "args",
|
|
329
|
-
args: ["--conversation-id", "{id}"]
|
|
330
|
-
},
|
|
331
|
-
forbiddenArgs: [],
|
|
332
|
-
storeEnv: {},
|
|
333
|
-
evidence: {
|
|
334
|
-
servedModel: "session-record",
|
|
335
|
-
usage: "per-response",
|
|
336
|
-
endingError: "none"
|
|
337
|
-
},
|
|
338
|
-
cliVersion: HARNESS_CLI_VERSIONS.forge
|
|
339
|
-
},
|
|
340
|
-
openclaw: {
|
|
341
|
-
version: 1,
|
|
342
|
-
stores: [{
|
|
343
|
-
root: ".openclaw/agents",
|
|
344
|
-
files: ["**/{id}.jsonl"],
|
|
345
|
-
write: "jsonl-append",
|
|
346
|
-
shared: false,
|
|
347
|
-
format: "openclaw.session-jsonl"
|
|
348
|
-
}],
|
|
349
|
-
identity: {
|
|
350
|
-
kind: "first-event",
|
|
351
|
-
event: "session",
|
|
352
|
-
deadlineMs: 6e4
|
|
353
|
-
},
|
|
354
|
-
resume: {
|
|
355
|
-
kind: "args",
|
|
356
|
-
args: ["--session-id", "{id}"]
|
|
357
|
-
},
|
|
358
|
-
forbiddenArgs: [],
|
|
359
|
-
storeEnv: {},
|
|
360
|
-
evidence: {
|
|
361
|
-
servedModel: "session-record",
|
|
362
|
-
usage: "per-response",
|
|
363
|
-
endingError: "none"
|
|
364
|
-
},
|
|
365
|
-
cliVersion: HARNESS_CLI_VERSIONS.openclaw
|
|
366
|
-
},
|
|
367
|
-
acp: {
|
|
368
|
-
version: 1,
|
|
369
|
-
stores: [
|
|
370
|
-
CLAUDE_PROJECTS,
|
|
371
|
-
CODEX_ROLLOUTS,
|
|
372
|
-
GEMINI_CHATS,
|
|
373
|
-
KIMI_SESSIONS,
|
|
374
|
-
HERMES_STATE
|
|
375
|
-
],
|
|
376
|
-
identity: {
|
|
377
|
-
kind: "api-created",
|
|
378
|
-
call: "acp session/new"
|
|
379
|
-
},
|
|
380
|
-
resume: { kind: "api" },
|
|
381
|
-
forbiddenArgs: [],
|
|
382
|
-
storeEnv: {},
|
|
383
|
-
evidence: {
|
|
384
|
-
servedModel: "session-record",
|
|
385
|
-
usage: "per-response",
|
|
386
|
-
endingError: "none"
|
|
387
|
-
},
|
|
388
|
-
cliVersion: HARNESS_CLI_VERSIONS.acp
|
|
389
|
-
}
|
|
390
|
-
};
|
|
391
|
-
//#endregion
|
|
392
|
-
//#region ../../../packages/runtime-contracts/dist/harness-warm-transport.js
|
|
393
|
-
/** Persistent Kimi wire process and shared create/resume prewarm gates. */
|
|
394
|
-
const AGENT_INTERNAL_KIMI_WARM_SERVER_ENV_VAR = "AGENT_INTERNAL_KIMI_WARM_SERVER";
|
|
395
|
-
//#endregion
|
|
396
|
-
//#region ../../../packages/cli-agent-registry/dist/specs-B7vJDLJI.mjs
|
|
397
|
-
z.globalRegistry.add(agentProfileSchema$1, {
|
|
398
|
-
id: "AgentProfile",
|
|
399
|
-
...agentProfileJsonSchema
|
|
400
|
-
});
|
|
401
|
-
const CLI_AGENT_SPECS = [
|
|
402
|
-
{
|
|
403
|
-
name: BACKEND_TYPE.OPENCODE,
|
|
404
|
-
nativeSession: NATIVE_SESSION_CONTRACTS.opencode,
|
|
405
|
-
messageStorageDir: ".opencode",
|
|
406
|
-
displayName: "OpenCode Agent",
|
|
407
|
-
description: "OpenCode CLI coding agent with native sessions, profiles, tools, and MCP.",
|
|
408
|
-
envVars: {
|
|
409
|
-
apiKey: "OPENCODE_MODEL_API_KEY",
|
|
410
|
-
model: "OPENCODE_MODEL_NAME",
|
|
411
|
-
baseUrl: "OPENCODE_MODEL_BASE_URL",
|
|
412
|
-
extras: {
|
|
413
|
-
OPENCODE_MODEL_PROVIDER: {
|
|
414
|
-
parser: "string",
|
|
415
|
-
role: "provider"
|
|
416
|
-
},
|
|
417
|
-
OPENCODE_MODEL_MODE: {
|
|
418
|
-
parser: "string",
|
|
419
|
-
role: "mode"
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
},
|
|
423
|
-
capabilities: {
|
|
424
|
-
streaming: true,
|
|
425
|
-
toolUse: true,
|
|
426
|
-
reasoning: true,
|
|
427
|
-
multimodal: true,
|
|
428
|
-
contextWindow: 2e5,
|
|
429
|
-
mcp: true,
|
|
430
|
-
runtimeAttachments: { mcp: true },
|
|
431
|
-
sessions: true,
|
|
432
|
-
configurable: true,
|
|
433
|
-
interactions: [
|
|
434
|
-
"permission",
|
|
435
|
-
"question",
|
|
436
|
-
"plan"
|
|
437
|
-
],
|
|
438
|
-
imageInput: true
|
|
439
|
-
},
|
|
440
|
-
hostPassthroughEnvVars: [
|
|
441
|
-
"OPENCODE_MODEL_MODE",
|
|
442
|
-
"OPENCODE_CODEX_PLUGIN_VERSION",
|
|
443
|
-
"OPENCODE_EXPERIMENTAL_NATIVE_LLM"
|
|
444
|
-
],
|
|
445
|
-
interactiveSeededPrompt: true,
|
|
446
|
-
builtinTools: [
|
|
447
|
-
{
|
|
448
|
-
id: "apply_patch",
|
|
449
|
-
name: "Apply Patch",
|
|
450
|
-
description: "Apply a unified-diff patch to files"
|
|
451
|
-
},
|
|
452
|
-
{
|
|
453
|
-
id: "bash",
|
|
454
|
-
name: "Bash",
|
|
455
|
-
description: "Execute bash commands"
|
|
456
|
-
},
|
|
457
|
-
{
|
|
458
|
-
id: "codesearch",
|
|
459
|
-
name: "Code Search",
|
|
460
|
-
description: "Search code across the workspace"
|
|
461
|
-
},
|
|
462
|
-
{
|
|
463
|
-
id: "edit",
|
|
464
|
-
name: "Edit",
|
|
465
|
-
description: "Edit a file with string replacement"
|
|
466
|
-
},
|
|
467
|
-
{
|
|
468
|
-
id: "glob",
|
|
469
|
-
name: "Glob",
|
|
470
|
-
description: "Find files by glob pattern"
|
|
471
|
-
},
|
|
472
|
-
{
|
|
473
|
-
id: "grep",
|
|
474
|
-
name: "Grep",
|
|
475
|
-
description: "Search file contents using regular expressions"
|
|
476
|
-
},
|
|
477
|
-
{
|
|
478
|
-
id: "question",
|
|
479
|
-
name: "Question",
|
|
480
|
-
description: "Ask the user a question and wait for the answer"
|
|
481
|
-
},
|
|
482
|
-
{
|
|
483
|
-
id: "read",
|
|
484
|
-
name: "Read",
|
|
485
|
-
description: "Read file contents"
|
|
486
|
-
},
|
|
487
|
-
{
|
|
488
|
-
id: "skill",
|
|
489
|
-
name: "Skill",
|
|
490
|
-
description: "Invoke an installed skill"
|
|
491
|
-
},
|
|
492
|
-
{
|
|
493
|
-
id: "task",
|
|
494
|
-
name: "Task",
|
|
495
|
-
description: "Delegate a task to a subagent"
|
|
496
|
-
},
|
|
497
|
-
{
|
|
498
|
-
id: "todowrite",
|
|
499
|
-
name: "Todo Write",
|
|
500
|
-
description: "Maintain the turn's todo list"
|
|
501
|
-
},
|
|
502
|
-
{
|
|
503
|
-
id: "webfetch",
|
|
504
|
-
name: "Webfetch",
|
|
505
|
-
description: "Fetch and read web content"
|
|
506
|
-
},
|
|
507
|
-
{
|
|
508
|
-
id: "websearch",
|
|
509
|
-
name: "Websearch",
|
|
510
|
-
description: "Search the web"
|
|
511
|
-
},
|
|
512
|
-
{
|
|
513
|
-
id: "write",
|
|
514
|
-
name: "Write",
|
|
515
|
-
description: "Write content to a file"
|
|
516
|
-
}
|
|
517
|
-
],
|
|
518
|
-
runtime: {
|
|
519
|
-
redactsHostEnv: true,
|
|
520
|
-
supportsToolDisabledTurns: true
|
|
521
|
-
},
|
|
522
|
-
cliAuthHome: { kind: "inherit-home" },
|
|
523
|
-
hasCliAuth: false
|
|
524
|
-
},
|
|
525
|
-
{
|
|
526
|
-
name: BACKEND_TYPE.CLAUDE_CODE,
|
|
527
|
-
nativeSession: NATIVE_SESSION_CONTRACTS["claude-code"],
|
|
528
|
-
runtime: {},
|
|
529
|
-
messageStorageDir: ".claude-code",
|
|
530
|
-
displayName: "Claude Code",
|
|
531
|
-
description: "Anthropic Claude Code CLI-based agent backend.",
|
|
532
|
-
envVars: {
|
|
533
|
-
apiKey: "ANTHROPIC_API_KEY",
|
|
534
|
-
model: "CLAUDE_CODE_MODEL_NAME",
|
|
535
|
-
authMode: "CLAUDE_CODE_AUTH_MODE",
|
|
536
|
-
authFiles: "CLAUDE_CODE_AUTH_FILES_JSON",
|
|
537
|
-
oauthToken: "CLAUDE_CODE_OAUTH_TOKEN",
|
|
538
|
-
baseUrl: "ANTHROPIC_BASE_URL"
|
|
539
|
-
},
|
|
540
|
-
modelWire: "anthropic-messages",
|
|
541
|
-
capabilities: {
|
|
542
|
-
streaming: true,
|
|
543
|
-
toolUse: true,
|
|
544
|
-
reasoning: true,
|
|
545
|
-
multimodal: true,
|
|
546
|
-
contextWindow: 2e5,
|
|
547
|
-
mcp: true,
|
|
548
|
-
runtimeAttachments: { mcp: true },
|
|
549
|
-
sessions: true,
|
|
550
|
-
configurable: true,
|
|
551
|
-
interactions: [
|
|
552
|
-
"permission",
|
|
553
|
-
"question",
|
|
554
|
-
"plan"
|
|
555
|
-
],
|
|
556
|
-
imageInput: true
|
|
557
|
-
},
|
|
558
|
-
securityCapabilities: [
|
|
559
|
-
"SYS_PTRACE",
|
|
560
|
-
"SETUID",
|
|
561
|
-
"SETGID",
|
|
562
|
-
"DAC_OVERRIDE",
|
|
563
|
-
"CHOWN",
|
|
564
|
-
"FOWNER"
|
|
565
|
-
],
|
|
566
|
-
interactiveSeededPrompt: true,
|
|
567
|
-
cliAuthHome: {
|
|
568
|
-
kind: "agent-home",
|
|
569
|
-
uid: 1e3,
|
|
570
|
-
home: "/home/agent"
|
|
571
|
-
},
|
|
572
|
-
hasCliAuth: true,
|
|
573
|
-
byoOAuth: true
|
|
574
|
-
},
|
|
575
|
-
{
|
|
576
|
-
name: BACKEND_TYPE.KIMI_CODE,
|
|
577
|
-
nativeSession: NATIVE_SESSION_CONTRACTS["kimi-code"],
|
|
578
|
-
runtime: { warmRetention: {
|
|
579
|
-
envVar: AGENT_INTERNAL_KIMI_WARM_SERVER_ENV_VAR,
|
|
580
|
-
enabledByDefault: false
|
|
581
|
-
} },
|
|
582
|
-
messageStorageDir: ".kimi-code",
|
|
583
|
-
displayName: "Kimi Code",
|
|
584
|
-
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.",
|
|
585
|
-
envVars: {
|
|
586
|
-
apiKey: "MOONSHOT_API_KEY",
|
|
587
|
-
model: "KIMI_CODE_MODEL_NAME",
|
|
588
|
-
authMode: "KIMI_CODE_AUTH_MODE",
|
|
589
|
-
authFiles: "KIMI_CODE_AUTH_FILES_JSON",
|
|
590
|
-
extras: { OPENAI_BASE_URL: { parser: "string" } }
|
|
591
|
-
},
|
|
592
|
-
capabilities: {
|
|
593
|
-
streaming: true,
|
|
594
|
-
toolUse: true,
|
|
595
|
-
reasoning: true,
|
|
596
|
-
multimodal: true,
|
|
597
|
-
contextWindow: 262144,
|
|
598
|
-
mcp: false,
|
|
599
|
-
runtimeAttachments: { mcp: true },
|
|
600
|
-
sessions: true,
|
|
601
|
-
configurable: true,
|
|
602
|
-
interactions: [],
|
|
603
|
-
imageInput: false
|
|
604
|
-
},
|
|
605
|
-
cliAuthHome: { kind: "inherit-home" },
|
|
606
|
-
hasCliAuth: true
|
|
607
|
-
},
|
|
608
|
-
{
|
|
609
|
-
name: BACKEND_TYPE.CODEX,
|
|
610
|
-
nativeSession: NATIVE_SESSION_CONTRACTS.codex,
|
|
611
|
-
messageStorageDir: ".codex",
|
|
612
|
-
displayName: "Codex",
|
|
613
|
-
description: "OpenAI Codex CLI-based agent backend.",
|
|
614
|
-
envVars: {
|
|
615
|
-
apiKey: "OPENAI_API_KEY",
|
|
616
|
-
model: "CODEX_MODEL_NAME",
|
|
617
|
-
authMode: "CODEX_AUTH_MODE",
|
|
618
|
-
authFiles: "CODEX_AUTH_FILES_JSON",
|
|
619
|
-
baseUrl: "OPENAI_BASE_URL"
|
|
620
|
-
},
|
|
621
|
-
modelWire: "openai-responses",
|
|
622
|
-
capabilities: {
|
|
623
|
-
streaming: true,
|
|
624
|
-
toolUse: true,
|
|
625
|
-
reasoning: false,
|
|
626
|
-
multimodal: true,
|
|
627
|
-
contextWindow: 128e3,
|
|
628
|
-
mcp: false,
|
|
629
|
-
sessions: true,
|
|
630
|
-
configurable: false,
|
|
631
|
-
runtimeAttachments: { mcp: true },
|
|
632
|
-
interactions: [
|
|
633
|
-
"permission",
|
|
634
|
-
"question",
|
|
635
|
-
"plan"
|
|
636
|
-
],
|
|
637
|
-
imageInput: true
|
|
638
|
-
},
|
|
639
|
-
interactiveSeededPrompt: true,
|
|
640
|
-
cliAuthHome: { kind: "inherit-home" },
|
|
641
|
-
hasCliAuth: true,
|
|
642
|
-
byoOAuth: true
|
|
643
|
-
},
|
|
644
|
-
{
|
|
645
|
-
name: BACKEND_TYPE.AMP,
|
|
646
|
-
nativeSession: NATIVE_SESSION_CONTRACTS.amp,
|
|
647
|
-
messageStorageDir: ".amp-sessions",
|
|
648
|
-
displayName: "AMP (Sourcegraph)",
|
|
649
|
-
description: "Sourcegraph AMP CLI-based agent backend.",
|
|
650
|
-
callerCredentialOnly: true,
|
|
651
|
-
envVars: {
|
|
652
|
-
apiKey: "AMP_API_KEY",
|
|
653
|
-
model: "AMP_MODEL_NAME",
|
|
654
|
-
authMode: "AMP_AUTH_MODE",
|
|
655
|
-
authFiles: "AMP_AUTH_FILES_JSON"
|
|
656
|
-
},
|
|
657
|
-
capabilities: {
|
|
658
|
-
streaming: true,
|
|
659
|
-
toolUse: true,
|
|
660
|
-
reasoning: false,
|
|
661
|
-
multimodal: false,
|
|
662
|
-
contextWindow: 128e3,
|
|
663
|
-
mcp: false,
|
|
664
|
-
sessions: true,
|
|
665
|
-
configurable: false,
|
|
666
|
-
interactions: [],
|
|
667
|
-
imageInput: false
|
|
668
|
-
},
|
|
669
|
-
cliAuthHome: { kind: "inherit-home" },
|
|
670
|
-
hasCliAuth: true
|
|
671
|
-
},
|
|
672
|
-
{
|
|
673
|
-
name: BACKEND_TYPE.FACTORY_DROIDS,
|
|
674
|
-
nativeSession: NATIVE_SESSION_CONTRACTS["factory-droids"],
|
|
675
|
-
messageStorageDir: ".factory-droids",
|
|
676
|
-
displayName: "Factory Droids",
|
|
677
|
-
description: "Factory Droids CLI-based agent backend. A managed box runs its Tangle Router model as a droid custom model; a caller's FACTORY_API_KEY runs on the caller's Factory account.",
|
|
678
|
-
envVars: {
|
|
679
|
-
apiKey: "FACTORY_API_KEY",
|
|
680
|
-
model: "FACTORY_DROIDS_MODEL_NAME"
|
|
681
|
-
},
|
|
682
|
-
capabilities: {
|
|
683
|
-
streaming: true,
|
|
684
|
-
toolUse: true,
|
|
685
|
-
reasoning: false,
|
|
686
|
-
multimodal: false,
|
|
687
|
-
contextWindow: 128e3,
|
|
688
|
-
mcp: false,
|
|
689
|
-
sessions: true,
|
|
690
|
-
configurable: false,
|
|
691
|
-
interactions: ["question"],
|
|
692
|
-
imageInput: false
|
|
693
|
-
},
|
|
694
|
-
cliAuthHome: { kind: "inherit-home" },
|
|
695
|
-
hasCliAuth: true
|
|
696
|
-
},
|
|
697
|
-
{
|
|
698
|
-
name: BACKEND_TYPE.PI,
|
|
699
|
-
nativeSession: NATIVE_SESSION_CONTRACTS.pi,
|
|
700
|
-
runtime: {},
|
|
701
|
-
messageStorageDir: ".pi/agent",
|
|
702
|
-
displayName: "Pi",
|
|
703
|
-
description: "Pi CLI backend. Managed OpenAI-compatible model tuples use one private runtime HOME models.json and the shared Pi model schema.",
|
|
704
|
-
envVars: {
|
|
705
|
-
apiKey: "OPENCODE_MODEL_API_KEY",
|
|
706
|
-
model: "TANGLE_ROUTER_MODEL",
|
|
707
|
-
baseUrl: "TANGLE_ROUTER_BASE_URL"
|
|
708
|
-
},
|
|
709
|
-
capabilities: {
|
|
710
|
-
streaming: true,
|
|
711
|
-
toolUse: true,
|
|
712
|
-
reasoning: true,
|
|
713
|
-
multimodal: false,
|
|
714
|
-
contextWindow: 128e3,
|
|
715
|
-
mcp: true,
|
|
716
|
-
sessions: true,
|
|
717
|
-
configurable: true,
|
|
718
|
-
interactions: ["permission"],
|
|
719
|
-
runtimeAttachments: { mcp: true },
|
|
720
|
-
imageInput: false
|
|
721
|
-
},
|
|
722
|
-
interactiveSeededPrompt: true,
|
|
723
|
-
cliAuthHome: { kind: "inherit-home" },
|
|
724
|
-
hasCliAuth: true
|
|
725
|
-
},
|
|
726
|
-
{
|
|
727
|
-
name: BACKEND_TYPE.PRIME,
|
|
728
|
-
nativeSession: NATIVE_SESSION_CONTRACTS.prime,
|
|
729
|
-
messageStorageDir: ".prime-provider",
|
|
730
|
-
displayName: "Prime Agent (PrimeIntellect)",
|
|
731
|
-
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).",
|
|
732
|
-
envVars: {
|
|
733
|
-
apiKey: "OPENCODE_MODEL_API_KEY",
|
|
734
|
-
model: "TANGLE_ROUTER_MODEL",
|
|
735
|
-
baseUrl: "TANGLE_ROUTER_BASE_URL"
|
|
736
|
-
},
|
|
737
|
-
hostPassthroughEnvVars: ["PRIME_AGENT_INSTALL_UV", "PRIME_AGENT_KERNEL_PYTHON"],
|
|
738
|
-
capabilities: {
|
|
739
|
-
streaming: true,
|
|
740
|
-
toolUse: true,
|
|
741
|
-
reasoning: true,
|
|
742
|
-
multimodal: true,
|
|
743
|
-
contextWindow: 128e3,
|
|
744
|
-
mcp: false,
|
|
745
|
-
sessions: true,
|
|
746
|
-
configurable: true,
|
|
747
|
-
interactions: [],
|
|
748
|
-
imageInput: true
|
|
749
|
-
},
|
|
750
|
-
cliAuthHome: { kind: "inherit-home" },
|
|
751
|
-
hasCliAuth: false
|
|
752
|
-
},
|
|
753
|
-
{
|
|
754
|
-
name: BACKEND_TYPE.HERMES,
|
|
755
|
-
nativeSession: NATIVE_SESSION_CONTRACTS.hermes,
|
|
756
|
-
messageStorageDir: ".hermes-agent",
|
|
757
|
-
displayName: "Hermes Agent (Nous Research)",
|
|
758
|
-
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.",
|
|
759
|
-
envVars: {
|
|
760
|
-
apiKey: "HERMES_API_KEY",
|
|
761
|
-
model: "HERMES_MODEL_NAME",
|
|
762
|
-
authMode: "HERMES_AUTH_MODE",
|
|
763
|
-
authFiles: "HERMES_AUTH_FILES_JSON",
|
|
764
|
-
baseUrl: "HERMES_BASE_URL",
|
|
765
|
-
extras: { HERMES_INFERENCE_PROVIDER: { parser: "string" } }
|
|
766
|
-
},
|
|
767
|
-
capabilities: {
|
|
768
|
-
streaming: false,
|
|
769
|
-
toolUse: true,
|
|
770
|
-
reasoning: false,
|
|
771
|
-
multimodal: false,
|
|
772
|
-
contextWindow: 2e5,
|
|
773
|
-
mcp: true,
|
|
774
|
-
sessions: true,
|
|
775
|
-
configurable: true,
|
|
776
|
-
interactions: [],
|
|
777
|
-
imageInput: true
|
|
778
|
-
},
|
|
779
|
-
cliAuthHome: { kind: "inherit-home" },
|
|
780
|
-
hasCliAuth: true
|
|
781
|
-
},
|
|
782
|
-
{
|
|
783
|
-
name: BACKEND_TYPE.FORGE,
|
|
784
|
-
nativeSession: NATIVE_SESSION_CONTRACTS.forge,
|
|
785
|
-
messageStorageDir: ".forge-agent",
|
|
786
|
-
displayName: "Forge (forgecode.dev)",
|
|
787
|
-
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.",
|
|
788
|
-
envVars: {
|
|
789
|
-
apiKey: "FORGE_API_KEY",
|
|
790
|
-
model: "FORGE_MODEL_ID",
|
|
791
|
-
authMode: "FORGE_AUTH_MODE",
|
|
792
|
-
authFiles: "FORGE_AUTH_FILES_JSON",
|
|
793
|
-
extras: {
|
|
794
|
-
FORGE_SESSION__PROVIDER_ID: { parser: "string" },
|
|
795
|
-
FORGE_SESSION__MODEL_ID: { parser: "string" },
|
|
796
|
-
FORGE_AGENT_ID: { parser: "string" }
|
|
797
|
-
}
|
|
798
|
-
},
|
|
799
|
-
capabilities: {
|
|
800
|
-
streaming: false,
|
|
801
|
-
toolUse: true,
|
|
802
|
-
reasoning: true,
|
|
803
|
-
multimodal: false,
|
|
804
|
-
contextWindow: 2e5,
|
|
805
|
-
mcp: true,
|
|
806
|
-
sessions: true,
|
|
807
|
-
configurable: true,
|
|
808
|
-
interactions: [],
|
|
809
|
-
imageInput: false
|
|
810
|
-
},
|
|
811
|
-
cliAuthHome: { kind: "inherit-home" },
|
|
812
|
-
hasCliAuth: true
|
|
813
|
-
},
|
|
814
|
-
{
|
|
815
|
-
name: BACKEND_TYPE.OPENCLAW,
|
|
816
|
-
nativeSession: NATIVE_SESSION_CONTRACTS.openclaw,
|
|
817
|
-
messageStorageDir: ".openclaw-agent",
|
|
818
|
-
displayName: "OpenClaw (Orchestrator)",
|
|
819
|
-
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.",
|
|
820
|
-
envVars: {
|
|
821
|
-
apiKey: "OPENCODE_MODEL_API_KEY",
|
|
822
|
-
model: "TANGLE_ROUTER_MODEL",
|
|
823
|
-
baseUrl: "TANGLE_ROUTER_BASE_URL",
|
|
824
|
-
authMode: "OPENCLAW_AUTH_MODE",
|
|
825
|
-
authFiles: "OPENCLAW_AUTH_FILES_JSON"
|
|
826
|
-
},
|
|
827
|
-
capabilities: {
|
|
828
|
-
streaming: false,
|
|
829
|
-
toolUse: true,
|
|
830
|
-
reasoning: true,
|
|
831
|
-
multimodal: true,
|
|
832
|
-
contextWindow: 2e5,
|
|
833
|
-
mcp: true,
|
|
834
|
-
sessions: true,
|
|
835
|
-
configurable: true,
|
|
836
|
-
interactions: [],
|
|
837
|
-
imageInput: false
|
|
838
|
-
},
|
|
839
|
-
cliAuthHome: { kind: "inherit-home" },
|
|
840
|
-
hasCliAuth: true
|
|
841
|
-
},
|
|
842
|
-
{
|
|
843
|
-
name: BACKEND_TYPE.NANOCLAW,
|
|
844
|
-
nativeSession: null,
|
|
845
|
-
messageStorageDir: ".nanoclaw-agent",
|
|
846
|
-
displayName: "NanoClaw",
|
|
847
|
-
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.",
|
|
848
|
-
envVars: {
|
|
849
|
-
apiKey: "OPENCODE_MODEL_API_KEY",
|
|
850
|
-
model: "TANGLE_ROUTER_MODEL",
|
|
851
|
-
authMode: "NANOCLAW_AUTH_MODE",
|
|
852
|
-
baseUrl: "TANGLE_ROUTER_BASE_URL",
|
|
853
|
-
extras: {
|
|
854
|
-
NANOCLAW_PROJECT_ROOT: { parser: "string" },
|
|
855
|
-
NANOCLAW_NATIVE_CREDENTIALS: { parser: "string" },
|
|
856
|
-
OPENCODE_MODEL_PROVIDER: {
|
|
857
|
-
parser: "string",
|
|
858
|
-
role: "provider"
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
},
|
|
862
|
-
capabilities: {
|
|
863
|
-
streaming: false,
|
|
864
|
-
toolUse: true,
|
|
865
|
-
reasoning: true,
|
|
866
|
-
multimodal: false,
|
|
867
|
-
contextWindow: 2e5,
|
|
868
|
-
mcp: false,
|
|
869
|
-
sessions: true,
|
|
870
|
-
configurable: true,
|
|
871
|
-
interactions: [],
|
|
872
|
-
imageInput: false
|
|
873
|
-
},
|
|
874
|
-
cliAuthHome: { kind: "inherit-home" },
|
|
875
|
-
hasCliAuth: false
|
|
876
|
-
},
|
|
877
|
-
{
|
|
878
|
-
name: BACKEND_TYPE.ACP,
|
|
879
|
-
nativeSession: NATIVE_SESSION_CONTRACTS.acp,
|
|
880
|
-
messageStorageDir: ".acp-agent",
|
|
881
|
-
displayName: "ACP Bridge (multi-agent)",
|
|
882
|
-
description: "Generic Agent Client Protocol bridge — fronts any ACP-compliant agent binary (claude-agent-acp, codex-acp, gemini, openclaw acp, hermes acp). Pick the backing agent via config.subAgent; hermes runs on the box's Router model when none is named. One TypeScript adapter, many supported coding harnesses.",
|
|
883
|
-
envVars: {
|
|
884
|
-
apiKey: "OPENCODE_MODEL_API_KEY",
|
|
885
|
-
model: "TANGLE_ROUTER_MODEL",
|
|
886
|
-
baseUrl: "TANGLE_ROUTER_BASE_URL",
|
|
887
|
-
authFiles: "ACP_AUTH_FILES_JSON"
|
|
888
|
-
},
|
|
889
|
-
capabilities: {
|
|
890
|
-
streaming: true,
|
|
891
|
-
toolUse: true,
|
|
892
|
-
reasoning: true,
|
|
893
|
-
multimodal: false,
|
|
894
|
-
contextWindow: 2e5,
|
|
895
|
-
mcp: false,
|
|
896
|
-
sessions: true,
|
|
897
|
-
configurable: true,
|
|
898
|
-
interactions: ["permission"],
|
|
899
|
-
imageInput: false
|
|
900
|
-
},
|
|
901
|
-
cliAuthHome: { kind: "inherit-home" },
|
|
902
|
-
hasCliAuth: true
|
|
903
|
-
},
|
|
904
|
-
{
|
|
905
|
-
name: BACKEND_TYPE.CURSOR,
|
|
906
|
-
nativeSession: null,
|
|
907
|
-
messageStorageDir: ".cursor-sdk-sessions",
|
|
908
|
-
displayName: "Cursor Agent SDK",
|
|
909
|
-
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.",
|
|
910
|
-
callerCredentialOnly: true,
|
|
911
|
-
egressHosts: ["api2.cursor.sh", "api.cursor.com"],
|
|
912
|
-
envVars: {
|
|
913
|
-
apiKey: "CURSOR_API_KEY",
|
|
914
|
-
model: "CURSOR_MODEL_NAME"
|
|
915
|
-
},
|
|
916
|
-
capabilities: {
|
|
917
|
-
streaming: true,
|
|
918
|
-
toolUse: true,
|
|
919
|
-
reasoning: true,
|
|
920
|
-
multimodal: true,
|
|
921
|
-
contextWindow: 2e5,
|
|
922
|
-
mcp: true,
|
|
923
|
-
sessions: true,
|
|
924
|
-
configurable: true,
|
|
925
|
-
interactions: [],
|
|
926
|
-
imageInput: true
|
|
927
|
-
},
|
|
928
|
-
cliAuthHome: { kind: "inherit-home" },
|
|
929
|
-
hasCliAuth: false
|
|
930
|
-
},
|
|
931
|
-
{
|
|
932
|
-
name: BACKEND_TYPE.CLI_BASE,
|
|
933
|
-
nativeSession: null,
|
|
934
|
-
displayName: "CLI Base (no agent)",
|
|
935
|
-
description: "Bare sandbox without an AI agent backend. Use when you want the workspace, tools, and SSH access but no LLM dispatch.",
|
|
936
|
-
envVars: {},
|
|
937
|
-
capabilities: {
|
|
938
|
-
streaming: false,
|
|
939
|
-
toolUse: false,
|
|
940
|
-
reasoning: false,
|
|
941
|
-
multimodal: false,
|
|
942
|
-
contextWindow: 0,
|
|
943
|
-
mcp: false,
|
|
944
|
-
sessions: false,
|
|
945
|
-
configurable: false,
|
|
946
|
-
interactions: [],
|
|
947
|
-
imageInput: false
|
|
948
|
-
},
|
|
949
|
-
cliAuthHome: { kind: "inherit-home" },
|
|
950
|
-
hasCliAuth: false
|
|
951
|
-
}
|
|
952
|
-
];
|
|
953
|
-
function getSpec(name) {
|
|
954
|
-
return CLI_AGENT_SPECS.find((spec) => spec.name === name);
|
|
955
|
-
}
|
|
956
|
-
//#endregion
|
|
957
|
-
//#region ../../../packages/cli-agent-registry/dist/cli-auth-bundle.mjs
|
|
958
|
-
const DEFAULT_MODE = 384;
|
|
959
|
-
const AUTH_BUNDLE_PATHS = Object.freeze({
|
|
960
|
-
codex: ".codex/auth.json",
|
|
961
|
-
"claude-code": ".claude/.credentials.json"
|
|
962
|
-
});
|
|
963
|
-
/** Convert a native credential JSON bundle without reading host credentials. */
|
|
964
|
-
function materializeCliAuthBundle(backendType, rawBundle) {
|
|
965
|
-
if (backendType !== "codex" && backendType !== "claude-code") throw new Error("CLI auth bundle is not supported for the selected backend");
|
|
966
|
-
if (typeof rawBundle !== "string") throw new Error("CLI auth bundle must be a JSON object");
|
|
967
|
-
let value;
|
|
968
|
-
try {
|
|
969
|
-
value = JSON.parse(rawBundle);
|
|
970
|
-
} catch {
|
|
971
|
-
throw new Error("CLI auth bundle must be a JSON object");
|
|
972
|
-
}
|
|
973
|
-
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("CLI auth bundle must be a JSON object");
|
|
974
|
-
return [{
|
|
975
|
-
path: AUTH_BUNDLE_PATHS[backendType],
|
|
976
|
-
content: rawBundle,
|
|
977
|
-
mode: DEFAULT_MODE
|
|
978
|
-
}];
|
|
979
|
-
}
|
|
980
|
-
const cliAuthReferenceSchema = z.object({
|
|
981
|
-
account: z.string().regex(/^[A-Za-z0-9][A-Za-z0-9@._+-]{0,127}$/),
|
|
982
|
-
secretEnv: z.string().regex(/^[A-Za-z_][A-Za-z0-9_]{0,63}$/),
|
|
983
|
-
format: z.enum([
|
|
984
|
-
"token",
|
|
985
|
-
"bundle",
|
|
986
|
-
"files"
|
|
987
|
-
])
|
|
988
|
-
}).strict();
|
|
989
|
-
z.array(z.object({
|
|
990
|
-
path: z.string().min(1).max(4096).refine((value) => !value.startsWith("/") && !/^[A-Za-z]:/.test(value) && !/[\\\0]/.test(value) && value.split("/").every((part) => part !== "" && part !== "." && part !== "..")),
|
|
991
|
-
content: z.string().max(1024 * 1024),
|
|
992
|
-
mode: z.number().int().min(0).max(448).refine((mode) => (mode & 63) === 0).optional()
|
|
993
|
-
}).strict()).min(1).max(128);
|
|
994
|
-
function assertCliAuthReferenceSupported(backendType, model) {
|
|
995
|
-
if (model.cliAuth === void 0) return void 0;
|
|
996
|
-
const parsedReference = cliAuthReferenceSchema.safeParse(model.cliAuth);
|
|
997
|
-
if (!parsedReference.success) throw new Error("Invalid native authentication reference");
|
|
998
|
-
const reference = parsedReference.data;
|
|
999
|
-
if (model.authMode === "api-key" || model.apiKey !== void 0 || model.apiKeyEnv !== void 0 || model.baseUrl !== void 0 || model.authFiles !== void 0) throw new Error("cliAuth cannot be combined with API credentials, baseUrl, or inline authFiles");
|
|
1000
|
-
const spec = getSpec(backendType);
|
|
1001
|
-
if (!spec?.hasCliAuth) throw new Error(`Native CLI authentication is unsupported by ${backendType}`);
|
|
1002
|
-
if (reference.format === "token" && !spec.envVars.oauthToken) throw new Error(`Native subscription tokens are unsupported by ${backendType}`);
|
|
1003
|
-
if (reference.format === "bundle" && backendType !== "codex" && backendType !== "claude-code") throw new Error(`Native credential bundles are unsupported by ${backendType}`);
|
|
1004
|
-
return reference;
|
|
1005
|
-
}
|
|
1006
|
-
//#endregion
|
|
1007
|
-
export { materializeCliAuthBundle as i, assertCliAuthReferenceSupported as n, cliAuthReferenceSchema as r, AUTH_BUNDLE_PATHS as t };
|