@zvada/agent-server 0.3.25 → 0.3.26
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/CHANGELOG.md +80 -0
- package/README.md +3 -0
- package/dist/core/agents/acp/acp-agent.js +91 -14
- package/dist/core/agents/acp/mappings.js +5 -1
- package/dist/core/agents/claude-code/approvals.js +2 -1
- package/dist/core/agents/claude-code/claude-agent.js +12 -2
- package/dist/core/agents/claude-code/mcp.js +9 -1
- package/dist/core/agents/claude-code/models.js +16 -10
- package/dist/core/agents/claude-code/options.js +23 -2
- package/dist/core/agents/claude-code/session.js +21 -1
- package/dist/core/agents/claude-code/tools.js +9 -4
- package/dist/core/agents/claude-code/turn.js +2 -0
- package/dist/core/agents/codex-app-server/adapter.js +2 -0
- package/dist/core/agents/codex-app-server/client.js +8 -5
- package/dist/core/agents/codex-app-server/codex-agent.js +35 -2
- package/dist/core/agents/codex-app-server/effort.js +13 -6
- package/dist/core/agents/codex-app-server/mcp.js +35 -18
- package/dist/core/agents/codex-app-server/models.js +10 -10
- package/dist/core/agents/codex-app-server/options.js +11 -2
- package/dist/core/agents/codex-app-server/session.js +11 -4
- package/dist/core/agents/codex-app-server/thread-settings.js +30 -11
- package/dist/core/agents/host-tools.js +493 -0
- package/dist/core/agents/mcp-config.js +6 -2
- package/dist/core/agents/scripted/scripted-agent.js +9 -3
- package/dist/core/agents/scripted/steps.js +5 -1
- package/dist/core/agents/session-agent.js +70 -2
- package/dist/core/agents/thinking-levels.js +8 -5
- package/dist/core/index.js +1 -0
- package/dist/core/presets.js +12 -2
- package/dist/core/processes/lifeline.js +9 -5
- package/dist/core/provision/pins.js +7 -16
- package/dist/core/provision/releases.js +25 -25
- package/dist/core/proxy/loopback.js +22 -4
- package/dist/protocol/config.js +21 -1
- package/dist/protocol/model-catalog.js +58 -18
- package/dist/protocol/models.js +6 -27
- package/dist/protocol/thinking.js +22 -9
- package/dist/protocol/wire-api.js +2 -2
- package/dist/server/bin.js +6 -4
- package/dist/types/core/agents/acp/acp-agent.d.ts +15 -0
- package/dist/types/core/agents/acp/acp-agent.d.ts.map +1 -1
- package/dist/types/core/agents/acp/mappings.d.ts +5 -1
- package/dist/types/core/agents/acp/mappings.d.ts.map +1 -1
- package/dist/types/core/agents/acp/requests.d.ts +2 -0
- package/dist/types/core/agents/acp/requests.d.ts.map +1 -1
- package/dist/types/core/agents/claude-code/approvals.d.ts +2 -1
- package/dist/types/core/agents/claude-code/approvals.d.ts.map +1 -1
- package/dist/types/core/agents/claude-code/claude-agent.d.ts +1 -0
- package/dist/types/core/agents/claude-code/claude-agent.d.ts.map +1 -1
- package/dist/types/core/agents/claude-code/mcp.d.ts +8 -1
- package/dist/types/core/agents/claude-code/mcp.d.ts.map +1 -1
- package/dist/types/core/agents/claude-code/models.d.ts +9 -5
- package/dist/types/core/agents/claude-code/models.d.ts.map +1 -1
- package/dist/types/core/agents/claude-code/options.d.ts +10 -1
- package/dist/types/core/agents/claude-code/options.d.ts.map +1 -1
- package/dist/types/core/agents/claude-code/session.d.ts +2 -0
- package/dist/types/core/agents/claude-code/session.d.ts.map +1 -1
- package/dist/types/core/agents/claude-code/tools.d.ts.map +1 -1
- package/dist/types/core/agents/claude-code/turn.d.ts +3 -0
- package/dist/types/core/agents/claude-code/turn.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/adapter.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/client.d.ts +2 -0
- package/dist/types/core/agents/codex-app-server/client.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/codex-agent.d.ts +11 -0
- package/dist/types/core/agents/codex-app-server/codex-agent.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/effort.d.ts +7 -7
- package/dist/types/core/agents/codex-app-server/effort.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/mcp.d.ts +11 -3
- package/dist/types/core/agents/codex-app-server/mcp.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/models.d.ts +4 -1
- package/dist/types/core/agents/codex-app-server/models.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/options.d.ts +9 -2
- package/dist/types/core/agents/codex-app-server/options.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/requests.d.ts +2 -0
- package/dist/types/core/agents/codex-app-server/requests.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/session.d.ts +6 -3
- package/dist/types/core/agents/codex-app-server/session.d.ts.map +1 -1
- package/dist/types/core/agents/codex-app-server/thread-settings.d.ts.map +1 -1
- package/dist/types/core/agents/host-tools.d.ts +162 -0
- package/dist/types/core/agents/host-tools.d.ts.map +1 -0
- package/dist/types/core/agents/mcp-config.d.ts +11 -2
- package/dist/types/core/agents/mcp-config.d.ts.map +1 -1
- package/dist/types/core/agents/scripted/scripted-agent.d.ts.map +1 -1
- package/dist/types/core/agents/scripted/steps.d.ts.map +1 -1
- package/dist/types/core/agents/session-agent.d.ts +2 -7
- package/dist/types/core/agents/session-agent.d.ts.map +1 -1
- package/dist/types/core/agents/thinking-levels.d.ts +7 -3
- package/dist/types/core/agents/thinking-levels.d.ts.map +1 -1
- package/dist/types/core/index.d.ts +1 -0
- package/dist/types/core/index.d.ts.map +1 -1
- package/dist/types/core/presets.d.ts +11 -1
- package/dist/types/core/presets.d.ts.map +1 -1
- package/dist/types/core/processes/lifeline.d.ts.map +1 -1
- package/dist/types/core/provision/pins.d.ts +5 -4
- package/dist/types/core/provision/pins.d.ts.map +1 -1
- package/dist/types/core/proxy/loopback.d.ts.map +1 -1
- package/dist/types/protocol/config.d.ts +12 -19
- package/dist/types/protocol/config.d.ts.map +1 -1
- package/dist/types/protocol/conversation.d.ts +4 -36
- package/dist/types/protocol/conversation.d.ts.map +1 -1
- package/dist/types/protocol/execution.d.ts +2 -18
- package/dist/types/protocol/execution.d.ts.map +1 -1
- package/dist/types/protocol/lifecycle.d.ts +8 -72
- package/dist/types/protocol/lifecycle.d.ts.map +1 -1
- package/dist/types/protocol/model-catalog.d.ts.map +1 -1
- package/dist/types/protocol/models.d.ts +4 -42
- package/dist/types/protocol/models.d.ts.map +1 -1
- package/dist/types/protocol/thinking.d.ts +19 -19
- package/dist/types/protocol/thinking.d.ts.map +1 -1
- package/dist/types/protocol/wire-api.d.ts +20 -105
- package/dist/types/protocol/wire-api.d.ts.map +1 -1
- package/dist/types/protocol/wire.d.ts +16 -117
- package/dist/types/protocol/wire.d.ts.map +1 -1
- package/docs/consuming.md +68 -11
- package/docs/deploy.md +6 -5
- package/docs/harnesses.md +79 -31
- package/package.json +4 -4
- package/src/core/agents/acp/acp-agent.ts +123 -17
- package/src/core/agents/acp/mappings.ts +5 -1
- package/src/core/agents/acp/requests.ts +2 -0
- package/src/core/agents/claude-code/approvals.ts +2 -1
- package/src/core/agents/claude-code/claude-agent.ts +14 -2
- package/src/core/agents/claude-code/mcp.ts +11 -1
- package/src/core/agents/claude-code/models.ts +15 -10
- package/src/core/agents/claude-code/options.ts +33 -3
- package/src/core/agents/claude-code/session.ts +26 -1
- package/src/core/agents/claude-code/tools.ts +10 -4
- package/src/core/agents/claude-code/turn.ts +4 -0
- package/src/core/agents/codex-app-server/adapter.ts +2 -0
- package/src/core/agents/codex-app-server/client.ts +11 -5
- package/src/core/agents/codex-app-server/codex-agent.ts +45 -1
- package/src/core/agents/codex-app-server/effort.ts +15 -20
- package/src/core/agents/codex-app-server/mcp.ts +46 -23
- package/src/core/agents/codex-app-server/models.ts +10 -10
- package/src/core/agents/codex-app-server/options.ts +16 -2
- package/src/core/agents/codex-app-server/requests.ts +2 -0
- package/src/core/agents/codex-app-server/session.ts +19 -4
- package/src/core/agents/codex-app-server/thread-settings.ts +31 -11
- package/src/core/agents/host-tools.ts +649 -0
- package/src/core/agents/mcp-config.ts +15 -3
- package/src/core/agents/scripted/scripted-agent.ts +9 -2
- package/src/core/agents/scripted/steps.ts +5 -1
- package/src/core/agents/session-agent.ts +78 -2
- package/src/core/agents/thinking-levels.ts +9 -6
- package/src/core/index.ts +9 -0
- package/src/core/presets.ts +24 -3
- package/src/core/processes/lifeline.ts +9 -5
- package/src/core/provision/pins.ts +7 -16
- package/src/core/provision/releases.ts +25 -25
- package/src/core/proxy/loopback.ts +25 -4
- package/src/protocol/config.ts +22 -1
- package/src/protocol/model-catalog.ts +58 -18
- package/src/protocol/models.ts +6 -26
- package/src/protocol/thinking.ts +27 -14
- package/src/protocol/wire-api.ts +2 -2
- package/src/server/bin.ts +6 -4
package/dist/core/presets.js
CHANGED
|
@@ -21,6 +21,7 @@ const HARNESSES = {
|
|
|
21
21
|
onDiagnostic: opts.onDiagnostic,
|
|
22
22
|
...opts.claudeCode,
|
|
23
23
|
credentials: opts.credentials,
|
|
24
|
+
hostTools: opts.hostTools,
|
|
24
25
|
idleTimeoutMs: opts.idleTimeoutMs,
|
|
25
26
|
cancelConfirmMs: opts.cancelConfirmMs,
|
|
26
27
|
cancelGraceMs: opts.cancelGraceMs,
|
|
@@ -34,6 +35,7 @@ const HARNESSES = {
|
|
|
34
35
|
new CodexAppServerAgent({
|
|
35
36
|
...opts.codexAppServer,
|
|
36
37
|
credentials: opts.credentials,
|
|
38
|
+
hostTools: opts.hostTools,
|
|
37
39
|
idleTimeoutMs: opts.idleTimeoutMs,
|
|
38
40
|
cancelConfirmMs: opts.cancelConfirmMs,
|
|
39
41
|
cancelGraceMs: opts.cancelGraceMs,
|
|
@@ -47,9 +49,16 @@ const HARNESSES = {
|
|
|
47
49
|
if (!opts.acp) {
|
|
48
50
|
throw new Error("the acp harness requires CreateRegistryOptions.acp (resolveLaunch)");
|
|
49
51
|
}
|
|
50
|
-
const { idleTimeoutMs, cancelConfirmMs, cancelGraceMs } = opts;
|
|
52
|
+
const { idleTimeoutMs, cancelConfirmMs, cancelGraceMs, hostTools } = opts;
|
|
51
53
|
return [
|
|
52
|
-
new AcpAgent({
|
|
54
|
+
new AcpAgent({
|
|
55
|
+
...opts.acp,
|
|
56
|
+
idleTimeoutMs,
|
|
57
|
+
cancelConfirmMs,
|
|
58
|
+
cancelGraceMs,
|
|
59
|
+
hostTools,
|
|
60
|
+
processes,
|
|
61
|
+
}),
|
|
53
62
|
createAcpTransformer,
|
|
54
63
|
];
|
|
55
64
|
},
|
|
@@ -69,6 +78,7 @@ const SAID_ONCE = {
|
|
|
69
78
|
cancelConfirmMs: atTheTop("cancelConfirmMs"),
|
|
70
79
|
cancelGraceMs: atTheTop("cancelGraceMs"),
|
|
71
80
|
inheritConfig: atTheTop("inheritConfig"),
|
|
81
|
+
hostTools: atTheTop("hostTools"),
|
|
72
82
|
processes: "the registry gives every harness its processes; say how they are owned with nativeProcesses",
|
|
73
83
|
resolveCliPath: "the registry's provisioner finds each CLI; name one with provision.overrides",
|
|
74
84
|
};
|
|
@@ -85,6 +85,13 @@ const RESPAWN_WINDOW_MS = 1_000;
|
|
|
85
85
|
*/
|
|
86
86
|
function startShell(ticks, exited, failed) {
|
|
87
87
|
const args = ["-c", LIFELINE_SCRIPT, LIFELINE_NAME, ticks];
|
|
88
|
+
// @ref LLP 0007#the-environment-a-process-is-given — only what its script needs
|
|
89
|
+
// It lives as long as the engine, and any process of this user can read its
|
|
90
|
+
// environment (`/proc/<pid>/environ`): `PATH` finds its `sed`, `awk`, `cat`,
|
|
91
|
+
// `tr` and `sleep`. Nothing else of the engine's environment is given;
|
|
92
|
+
// Node itself adds `NODE_V8_COVERAGE` to every child when the engine runs
|
|
93
|
+
// with it set (Bun adds nothing).
|
|
94
|
+
const env = { PATH: process.env.PATH };
|
|
88
95
|
const bun = globalThis.Bun;
|
|
89
96
|
if (bun) {
|
|
90
97
|
// @ref LLP 0007#the-lifeline — registered before the CLI gets input
|
|
@@ -96,10 +103,7 @@ function startShell(ticks, exited, failed) {
|
|
|
96
103
|
stdout: "ignore",
|
|
97
104
|
stderr: "ignore",
|
|
98
105
|
detached: true,
|
|
99
|
-
|
|
100
|
-
// Without one, Bun gives the environment it was launched with: a
|
|
101
|
-
// secret the host deleted from `process.env` would live on here.
|
|
102
|
-
env: process.env,
|
|
106
|
+
env,
|
|
103
107
|
onExit: exited,
|
|
104
108
|
});
|
|
105
109
|
child.unref();
|
|
@@ -116,7 +120,7 @@ function startShell(ticks, exited, failed) {
|
|
|
116
120
|
// Node writes a pipe at once when it can (libuv's `uv_try_write`).
|
|
117
121
|
const child = spawn("/bin/sh", args, {
|
|
118
122
|
detached: true,
|
|
119
|
-
env
|
|
123
|
+
env,
|
|
120
124
|
stdio: ["pipe", "ignore", "ignore"],
|
|
121
125
|
});
|
|
122
126
|
child.unref();
|
|
@@ -14,22 +14,13 @@
|
|
|
14
14
|
* `auto` an installed `@openai/codex` package (a lockfile's) runs instead,
|
|
15
15
|
* and a `codex` on PATH only in `system` mode.
|
|
16
16
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
17
|
+
* A bump is `bun run bump -- <tool>`: it writes what changed upstream, moves
|
|
18
|
+
* the pin, and runs both refreshes, `releases:refresh` (each platform's build
|
|
19
|
+
* and its checksums, `releases.ts`) and `models:refresh` (the model catalog,
|
|
20
|
+
* which records the versions that listed it); tests fail until both match
|
|
21
|
+
* these pins. The `bump-clis` skill says what to read and prove.
|
|
21
22
|
*/
|
|
22
23
|
export const DEFAULT_PINS = {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
// streamed token-estimate placeholders). Re-check thinking summaries on
|
|
26
|
-
// every bump (see options.ts extraArgs).
|
|
27
|
-
claude: "0.3.288",
|
|
28
|
-
// 0.160.0 re-verified 2026-10-03 against generate-ts: thread/turn/item
|
|
29
|
-
// methods, token usage, approvals, and host-managed ChatGPT auth changed
|
|
30
|
-
// only additively since 0.153.4. Of the GPT-6 family, 0.153.4 lists only
|
|
31
|
-
// gpt-6-astra; the rest needs 0.159 or newer.
|
|
32
|
-
// Since 0.160 a thread has one writer: resuming it from a second process
|
|
33
|
-
// fails until the first releases it.
|
|
34
|
-
codex: "0.160.0",
|
|
24
|
+
claude: "0.3.327",
|
|
25
|
+
codex: "0.169.1",
|
|
35
26
|
};
|
|
@@ -5,63 +5,63 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export const CLI_RELEASES = {
|
|
7
7
|
claude: {
|
|
8
|
-
version: "0.3.
|
|
9
|
-
cli: "2.1.
|
|
8
|
+
version: "0.3.327",
|
|
9
|
+
cli: "2.1.327",
|
|
10
10
|
builds: {
|
|
11
11
|
"darwin-arm64": {
|
|
12
|
-
integrity: "sha512-
|
|
13
|
-
sha256: "
|
|
12
|
+
integrity: "sha512-n+tQOPqz264l12BAKBcBPBbdB/bmZ2SfyONtEXQufTU6EeCoQMPS58RSt51Cxk5sDUme1hTF0vVAqRPdhq8tFg==",
|
|
13
|
+
sha256: "76d48205c926c8a6978cfc2171b631bcd01e20bbadd085638bb2ec57bea91c5b",
|
|
14
14
|
},
|
|
15
15
|
"darwin-x64": {
|
|
16
|
-
integrity: "sha512-
|
|
17
|
-
sha256: "
|
|
16
|
+
integrity: "sha512-u091X+eQIyqg8BIEYLWJ0o6U3BaivMcf8Im4hI3hti/NGJ6YC5sR+LLEa1RjSIKE+JoOfCxipdCNSKaEI+0d5Q==",
|
|
17
|
+
sha256: "1fe75c05df7be824af1ed80ff9ccdf2be991f3a2212b97e05fc9a3bff2f39ef9",
|
|
18
18
|
},
|
|
19
19
|
"linux-arm64": {
|
|
20
|
-
integrity: "sha512
|
|
21
|
-
sha256: "
|
|
20
|
+
integrity: "sha512-/k6BfV+L2er67UoLUabcp0w3L1DMemJjoijdxvXDiU8w81fGfHaKWKhRuhUQFmIrMLyMyQcBKaoyUNSLWovPnw==",
|
|
21
|
+
sha256: "acf0ef2f9da8d5ab08f193f007e19a06cbfb608b96a2f1f758d63a92a386cff8",
|
|
22
22
|
},
|
|
23
23
|
"linux-x64": {
|
|
24
|
-
integrity: "sha512-
|
|
25
|
-
sha256: "
|
|
24
|
+
integrity: "sha512-oAdL7KM9UVAZlATeSjh2haeEjex1N7ZcHzWO1tY2hgyhkyLNVw/tWUhITOucxMwokBx++h2dMVjxiPJiZ5uVOQ==",
|
|
25
|
+
sha256: "343c744baa14bfd38286a7cb90871051f04379956da6c5b803a9e66019a76ac9",
|
|
26
26
|
},
|
|
27
27
|
"linux-arm64-musl": {
|
|
28
|
-
integrity: "sha512-
|
|
29
|
-
sha256: "
|
|
28
|
+
integrity: "sha512-oV8/+ZixiPzEW1BStoP9FOXsHcznONaom6S2PwwIfhi5Pxa5fGuloy8TiOB9wK+03zavqt7jmzLgVPF2a2NsTA==",
|
|
29
|
+
sha256: "e44a59ef850788c578adaab7a6487d5d0af9c0844401da9d7263e7b41515754b",
|
|
30
30
|
},
|
|
31
31
|
"linux-x64-musl": {
|
|
32
|
-
integrity: "sha512-
|
|
33
|
-
sha256: "
|
|
32
|
+
integrity: "sha512-O0nDZ1gpXi83qAdd8SM0gTdjlzrqpOlW0M4W7PfHVrMXWLh9I+1tvHat+s17ehIW6A9VQIWIq4oMwq7jb708Dg==",
|
|
33
|
+
sha256: "d2b02e78664c1347aff8fcee045356ee044116be41d7f412721a6c50182b6d98",
|
|
34
34
|
},
|
|
35
35
|
"win32-arm64": {
|
|
36
|
-
integrity: "sha512-
|
|
37
|
-
sha256: "
|
|
36
|
+
integrity: "sha512-a5ju83mylDvUwvQyRt1E0TQ0ar2nzVMPeWZhjcmgpB1cNTjf+KT5jgUnLvxPOG2tyjhm8bYGysRMdgB+tVnhvw==",
|
|
37
|
+
sha256: "d2c3395d252007540a5662a2cfd4d8903a0beb5fa32c893cd13b81be427625a7",
|
|
38
38
|
},
|
|
39
39
|
"win32-x64": {
|
|
40
|
-
integrity: "sha512-
|
|
41
|
-
sha256: "
|
|
40
|
+
integrity: "sha512-bf52nw4j5RCvkXI5Poj5Qf0jWvuLQ/UPFqdav86UwaGTZZ0txNV33MKBIUoCyxXV6IC1/p2BNfkwmCAZ+Uc9pw==",
|
|
41
|
+
sha256: "d6c8075bfb3b87f1c1254e64b6c35dadc628d21e75930ae51e47047b3f05a4a2",
|
|
42
42
|
},
|
|
43
43
|
},
|
|
44
44
|
},
|
|
45
45
|
codex: {
|
|
46
|
-
version: "0.
|
|
46
|
+
version: "0.169.1",
|
|
47
47
|
builds: {
|
|
48
48
|
"darwin-arm64": {
|
|
49
|
-
integrity: "sha512-
|
|
49
|
+
integrity: "sha512-yOKvCJktlbxdETtXAidz2GcC4z/WMYPmu2plncYJtUI5AhnFIExen8n9eL/El6n9hYbzzZFf1JgyW7yHx6kwTw==",
|
|
50
50
|
},
|
|
51
51
|
"darwin-x64": {
|
|
52
|
-
integrity: "sha512-
|
|
52
|
+
integrity: "sha512-IbHIskdPWGAXFCdGiB8CosfXXtdvMmusrQ2AdW2kFHd6aSJZ+dvgalwjpxmAytalnNM3pQgXwS/6fU1OclFv8Q==",
|
|
53
53
|
},
|
|
54
54
|
"linux-arm64": {
|
|
55
|
-
integrity: "sha512-
|
|
55
|
+
integrity: "sha512-6vRE7ZxkngT6L5JQ9WUQ2UnztS6hqyfcQiFqvk0yhcvWsrZLJNiiDZcKzGbLfJK2sDy7tSt9uWdP1cIgMHIkaw==",
|
|
56
56
|
},
|
|
57
57
|
"linux-x64": {
|
|
58
|
-
integrity: "sha512-
|
|
58
|
+
integrity: "sha512-KmlHQ/lB9jcn8Yy5z/tWCpSPsqBvI3pU+0PUPccr+pKiiU2NJSCvZcAD7s3dmIFq5ZvGYtGcSn2KdFFdaPQICg==",
|
|
59
59
|
},
|
|
60
60
|
"win32-arm64": {
|
|
61
|
-
integrity: "sha512-
|
|
61
|
+
integrity: "sha512-EYXwgEdHHzwgA0nnDcK4pI98IdReB1aDebtOxcYixM1/GY2Y/76oDFYSs/u6DzA27f6Hhf5V92OwQFw/GLICUQ==",
|
|
62
62
|
},
|
|
63
63
|
"win32-x64": {
|
|
64
|
-
integrity: "sha512
|
|
64
|
+
integrity: "sha512-fImXWqxwxqHh9+FhJWsRRFiBzgBrSeN1bYTvtGZtUKGTPzHefYAL1agmlf5XScfwY5i5pHsExfdhFekzRBbqIw==",
|
|
65
65
|
},
|
|
66
66
|
},
|
|
67
67
|
},
|
|
@@ -35,31 +35,49 @@ async function bridge(handle, req, res) {
|
|
|
35
35
|
}
|
|
36
36
|
res.end();
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Bun's own `Response`. A product's process may have replaced the global one
|
|
40
|
+
* (Hono's Node server does, with a class of its own), and `Bun.serve` refuses
|
|
41
|
+
* any other ("Expected a Response object"); `fetch` still answers with Bun's.
|
|
42
|
+
*/
|
|
43
|
+
async function nativeResponse() {
|
|
44
|
+
return (await fetch("data:,")).constructor;
|
|
45
|
+
}
|
|
38
46
|
/**
|
|
39
47
|
* Serve `handle` on 127.0.0.1, on a port of its own: with `Bun.serve` under
|
|
40
48
|
* Bun, whose `node:http` says nothing of a client that left once its request
|
|
41
49
|
* body was read (a stopped turn's request would run on upstream), and with
|
|
42
50
|
* `node:http` under Node.
|
|
43
51
|
*/
|
|
44
|
-
export function serveLoopback(handle) {
|
|
52
|
+
export async function serveLoopback(handle) {
|
|
45
53
|
const bun = globalThis.Bun;
|
|
46
54
|
if (bun) {
|
|
55
|
+
const Native = await nativeResponse();
|
|
56
|
+
const native = (response) =>
|
|
57
|
+
// Not `instanceof`: Hono's class sets Bun's prototype under its own.
|
|
58
|
+
response.constructor === Native
|
|
59
|
+
? response
|
|
60
|
+
: new Native(response.body, {
|
|
61
|
+
status: response.status,
|
|
62
|
+
statusText: response.statusText,
|
|
63
|
+
headers: [...response.headers],
|
|
64
|
+
});
|
|
47
65
|
const server = bun.serve({
|
|
48
66
|
port: 0,
|
|
49
67
|
hostname: "127.0.0.1",
|
|
50
68
|
// A model can think longer than any idle limit between the events it streams.
|
|
51
69
|
idleTimeout: 0,
|
|
52
|
-
fetch: (request) => handle(request).
|
|
70
|
+
fetch: (request) => handle(request).then(native, () => new Native(null, { status: 502 })),
|
|
53
71
|
});
|
|
54
72
|
// Nothing on it keeps the process alive.
|
|
55
73
|
server.unref();
|
|
56
|
-
return
|
|
74
|
+
return {
|
|
57
75
|
url: `http://127.0.0.1:${server.port}`,
|
|
58
76
|
// Not waited for: with a client still connected, Bun's stop can take its time.
|
|
59
77
|
close: async () => {
|
|
60
78
|
server.stop(true);
|
|
61
79
|
},
|
|
62
|
-
}
|
|
80
|
+
};
|
|
63
81
|
}
|
|
64
82
|
const server = createServer((req, res) => {
|
|
65
83
|
bridge(handle, req, res).catch(() => {
|
package/dist/protocol/config.js
CHANGED
|
@@ -19,7 +19,7 @@ export const PermissionModeSchema = z.enum([
|
|
|
19
19
|
"bypass_permissions",
|
|
20
20
|
]);
|
|
21
21
|
export const ReportedPermissionModeSchema = openVocabulary(PermissionModeSchema.options);
|
|
22
|
-
/** The longest `requestTimeoutMs`: a timer's own limit, about 24.8 days. */
|
|
22
|
+
/** The longest `requestTimeoutMs` and the longest MCP `timeoutMs`: a timer's own limit, about 24.8 days. */
|
|
23
23
|
export const MAX_REQUEST_TIMEOUT_MS = 2_147_483_647;
|
|
24
24
|
/**
|
|
25
25
|
* Whether a turn needs the server (default `true`). A turn fails before the
|
|
@@ -29,6 +29,23 @@ export const MAX_REQUEST_TIMEOUT_MS = 2_147_483_647;
|
|
|
29
29
|
* agent connects its servers itself and decides.
|
|
30
30
|
*/
|
|
31
31
|
const required = z.boolean().optional();
|
|
32
|
+
/**
|
|
33
|
+
* How long one call to one of the server's tools may run, in milliseconds,
|
|
34
|
+
* on any transport: past it the call fails, and the model is told it timed out.
|
|
35
|
+
* - Claude: the server's `timeout`. A value under 1000 is ignored, as if unset.
|
|
36
|
+
* Unset, a call to an HTTP or SSE server is cut at 60 s unless
|
|
37
|
+
* `MCP_TOOL_TIMEOUT` (ms) is in the turn's or the engine's environment; a
|
|
38
|
+
* call to a stdio server is not cut at 60 s (one ran 70 s), and Claude's
|
|
39
|
+
* own longer limits still apply.
|
|
40
|
+
* - Codex: the server's `tool_timeout_sec`, in whole seconds rounded up
|
|
41
|
+
* (1118 cuts a call at 2 s), as Codex reads a fraction back changed.
|
|
42
|
+
* Unset, a call is cut at 300 s.
|
|
43
|
+
* - An ACP agent is not given it (ACP v1 has no such field): the agent keeps
|
|
44
|
+
* its own limit, if it has one.
|
|
45
|
+
* At most `MAX_REQUEST_TIMEOUT_MS`, a timer's own limit; a larger value is refused.
|
|
46
|
+
* A changed value applies from the next turn of a warm session.
|
|
47
|
+
*/
|
|
48
|
+
const timeoutMs = z.number().int().positive().max(MAX_REQUEST_TIMEOUT_MS).optional();
|
|
32
49
|
/** Minimal external MCP server descriptor (stdio or http/sse). */
|
|
33
50
|
export const McpServerConfigSchema = z.discriminatedUnion("type", [
|
|
34
51
|
z.object({
|
|
@@ -37,18 +54,21 @@ export const McpServerConfigSchema = z.discriminatedUnion("type", [
|
|
|
37
54
|
args: z.array(z.string()).optional(),
|
|
38
55
|
env: z.record(z.string(), z.string()).optional(),
|
|
39
56
|
required,
|
|
57
|
+
timeoutMs,
|
|
40
58
|
}),
|
|
41
59
|
z.object({
|
|
42
60
|
type: z.literal("http"),
|
|
43
61
|
url: z.string(),
|
|
44
62
|
headers: z.record(z.string(), z.string()).optional(),
|
|
45
63
|
required,
|
|
64
|
+
timeoutMs,
|
|
46
65
|
}),
|
|
47
66
|
z.object({
|
|
48
67
|
type: z.literal("sse"),
|
|
49
68
|
url: z.string(),
|
|
50
69
|
headers: z.record(z.string(), z.string()).optional(),
|
|
51
70
|
required,
|
|
71
|
+
timeoutMs,
|
|
52
72
|
}),
|
|
53
73
|
]);
|
|
54
74
|
/** Everything needed to configure a turn against a harness. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** What the pinned CLIs listed for the maintainer's login when this release was built. */
|
|
2
2
|
export const GENERATED_MODEL_CATALOG = {
|
|
3
3
|
cli: {
|
|
4
|
-
claude: "0.3.
|
|
5
|
-
codex: "0.
|
|
4
|
+
claude: "0.3.327",
|
|
5
|
+
codex: "0.169.1",
|
|
6
6
|
},
|
|
7
7
|
models: [
|
|
8
8
|
{
|
|
@@ -26,6 +26,16 @@ export const GENERATED_MODEL_CATALOG = {
|
|
|
26
26
|
levels: ["low", "medium", "high", "xhigh", "max"],
|
|
27
27
|
},
|
|
28
28
|
},
|
|
29
|
+
{
|
|
30
|
+
id: "fable",
|
|
31
|
+
harness: "claude-code",
|
|
32
|
+
label: "Fable 5.2",
|
|
33
|
+
description: "For your toughest challenges",
|
|
34
|
+
resolvedId: "claude-fable-5-2",
|
|
35
|
+
thinking: {
|
|
36
|
+
levels: ["low", "medium", "high", "xhigh", "max"],
|
|
37
|
+
},
|
|
38
|
+
},
|
|
29
39
|
{
|
|
30
40
|
id: "sonnet",
|
|
31
41
|
harness: "claude-code",
|
|
@@ -37,21 +47,29 @@ export const GENERATED_MODEL_CATALOG = {
|
|
|
37
47
|
},
|
|
38
48
|
},
|
|
39
49
|
{
|
|
40
|
-
id: "
|
|
50
|
+
id: "haiku",
|
|
51
|
+
harness: "claude-code",
|
|
52
|
+
label: "Haiku 5.5",
|
|
53
|
+
description: "Fastest for quick answers",
|
|
54
|
+
resolvedId: "claude-haiku-5-5",
|
|
55
|
+
thinking: {
|
|
56
|
+
levels: ["low", "medium", "high", "xhigh", "max"],
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: "claude-fable-5-1",
|
|
41
61
|
harness: "claude-code",
|
|
42
62
|
label: "Fable 5.1",
|
|
43
63
|
description: "Most capable for your hardest and longest-running tasks",
|
|
44
|
-
resolvedId: "claude-fable-5-1",
|
|
45
64
|
thinking: {
|
|
46
65
|
levels: ["low", "medium", "high", "xhigh", "max"],
|
|
47
66
|
},
|
|
48
67
|
},
|
|
49
68
|
{
|
|
50
|
-
id: "haiku",
|
|
69
|
+
id: "claude-haiku-4-5-20251001",
|
|
51
70
|
harness: "claude-code",
|
|
52
71
|
label: "Haiku 4.5",
|
|
53
72
|
description: "Fastest for quick answers",
|
|
54
|
-
resolvedId: "claude-haiku-4-5-20251001",
|
|
55
73
|
thinking: {
|
|
56
74
|
levels: [],
|
|
57
75
|
},
|
|
@@ -120,10 +138,10 @@ export const GENERATED_MODEL_CATALOG = {
|
|
|
120
138
|
},
|
|
121
139
|
},
|
|
122
140
|
{
|
|
123
|
-
id: "gpt-6.
|
|
141
|
+
id: "gpt-6.2-sol",
|
|
124
142
|
harness: "codex-app-server",
|
|
125
|
-
label: "GPT-6.
|
|
126
|
-
description: "
|
|
143
|
+
label: "GPT-6.2-Sol",
|
|
144
|
+
description: "Fast, go-to model for coding and everyday work.",
|
|
127
145
|
isDefault: true,
|
|
128
146
|
thinking: {
|
|
129
147
|
levels: ["low", "medium", "high", "xhigh", "max", "ultra"],
|
|
@@ -132,13 +150,13 @@ export const GENERATED_MODEL_CATALOG = {
|
|
|
132
150
|
images: true,
|
|
133
151
|
},
|
|
134
152
|
{
|
|
135
|
-
id: "gpt-6-astra",
|
|
153
|
+
id: "gpt-6.2-astra",
|
|
136
154
|
harness: "codex-app-server",
|
|
137
|
-
label: "GPT-6-Astra",
|
|
138
|
-
description: "
|
|
155
|
+
label: "GPT-6.2-Astra",
|
|
156
|
+
description: "Our most capable model for complex coding and professional work.",
|
|
139
157
|
thinking: {
|
|
140
158
|
levels: ["low", "medium", "high", "xhigh", "max", "ultra"],
|
|
141
|
-
default: "
|
|
159
|
+
default: "low",
|
|
142
160
|
},
|
|
143
161
|
images: true,
|
|
144
162
|
},
|
|
@@ -146,18 +164,40 @@ export const GENERATED_MODEL_CATALOG = {
|
|
|
146
164
|
id: "gpt-6.1-terra",
|
|
147
165
|
harness: "codex-app-server",
|
|
148
166
|
label: "GPT-6.1 Terra",
|
|
149
|
-
description: "
|
|
167
|
+
description: "Efficient model that excels at visual understanding and computer use.",
|
|
168
|
+
thinking: {
|
|
169
|
+
levels: ["low", "medium", "high", "xhigh", "max", "ultra"],
|
|
170
|
+
default: "low",
|
|
171
|
+
},
|
|
172
|
+
images: true,
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
id: "gpt-6.1-sol",
|
|
176
|
+
harness: "codex-app-server",
|
|
177
|
+
label: "GPT-6.1-Sol",
|
|
178
|
+
description: "Previous generation model for coding and everyday work.",
|
|
150
179
|
thinking: {
|
|
151
180
|
levels: ["low", "medium", "high", "xhigh", "max", "ultra"],
|
|
152
181
|
default: "low",
|
|
153
182
|
},
|
|
154
183
|
images: true,
|
|
155
184
|
},
|
|
185
|
+
{
|
|
186
|
+
id: "gpt-6-astra",
|
|
187
|
+
harness: "codex-app-server",
|
|
188
|
+
label: "GPT-6-Astra",
|
|
189
|
+
description: "Previous generation model for complex coding and professional work.",
|
|
190
|
+
thinking: {
|
|
191
|
+
levels: ["low", "medium", "high", "xhigh", "max", "ultra"],
|
|
192
|
+
default: "medium",
|
|
193
|
+
},
|
|
194
|
+
images: true,
|
|
195
|
+
},
|
|
156
196
|
{
|
|
157
197
|
id: "gpt-6-sol",
|
|
158
198
|
harness: "codex-app-server",
|
|
159
199
|
label: "GPT-6-Sol",
|
|
160
|
-
description: "
|
|
200
|
+
description: "Legacy model for coding and everyday work.",
|
|
161
201
|
thinking: {
|
|
162
202
|
levels: ["low", "medium", "high", "xhigh", "max", "ultra"],
|
|
163
203
|
default: "medium",
|
|
@@ -179,7 +219,7 @@ export const GENERATED_MODEL_CATALOG = {
|
|
|
179
219
|
id: "gpt-5.6-sol",
|
|
180
220
|
harness: "codex-app-server",
|
|
181
221
|
label: "GPT-5.6-Sol",
|
|
182
|
-
description: "
|
|
222
|
+
description: "Legacy model for coding and everyday work.",
|
|
183
223
|
thinking: {
|
|
184
224
|
levels: ["low", "medium", "high", "xhigh", "max", "ultra"],
|
|
185
225
|
default: "low",
|
|
@@ -190,7 +230,7 @@ export const GENERATED_MODEL_CATALOG = {
|
|
|
190
230
|
id: "gpt-5.6-terra",
|
|
191
231
|
harness: "codex-app-server",
|
|
192
232
|
label: "GPT-5.6-Terra",
|
|
193
|
-
description: "
|
|
233
|
+
description: "Legacy balanced model for agentic coding.",
|
|
194
234
|
thinking: {
|
|
195
235
|
levels: ["low", "medium", "high", "xhigh", "max", "ultra"],
|
|
196
236
|
default: "medium",
|
|
@@ -201,7 +241,7 @@ export const GENERATED_MODEL_CATALOG = {
|
|
|
201
241
|
id: "gpt-5.6-luna",
|
|
202
242
|
harness: "codex-app-server",
|
|
203
243
|
label: "GPT-5.6-Luna",
|
|
204
|
-
description: "
|
|
244
|
+
description: "Legacy fast model for simpler tasks.",
|
|
205
245
|
thinking: {
|
|
206
246
|
levels: ["low", "medium", "high", "xhigh", "max"],
|
|
207
247
|
default: "medium",
|
package/dist/protocol/models.js
CHANGED
|
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
import { AgentHarnessSchema } from "./harness.js";
|
|
3
3
|
import { MetaSchema } from "./meta.js";
|
|
4
4
|
import { GENERATED_MODEL_CATALOG } from "./model-catalog.js";
|
|
5
|
-
import { ThinkingLevelSchema
|
|
5
|
+
import { ThinkingLevelSchema } from "./thinking.js";
|
|
6
6
|
import { EpochMsSchema } from "./time.js";
|
|
7
7
|
/**
|
|
8
8
|
* One model a harness can run, in the same shape for every harness. Claude
|
|
@@ -19,7 +19,11 @@ export const ModelDescriptorSchema = z.object({
|
|
|
19
19
|
/** The model a turn runs when its config names none. */
|
|
20
20
|
isDefault: z.boolean().optional(),
|
|
21
21
|
thinking: z.object({
|
|
22
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* The levels the model runs as distinct settings, by the harness's own
|
|
24
|
+
* names and in its order (both CLIs list lowest first); a name may be
|
|
25
|
+
* one this build does not know. Empty: no thinking control.
|
|
26
|
+
*/
|
|
23
27
|
levels: z.array(ThinkingLevelSchema),
|
|
24
28
|
/** The model's own default, when the harness states one. Never invented. */
|
|
25
29
|
default: ThinkingLevelSchema.optional(),
|
|
@@ -47,31 +51,6 @@ export const ModelListSchema = z.object({
|
|
|
47
51
|
/** When the list was read. */
|
|
48
52
|
fetchedAt: EpochMsSchema,
|
|
49
53
|
});
|
|
50
|
-
/**
|
|
51
|
-
* Parse a model list from a server that may be newer than this build: a
|
|
52
|
-
* thinking level this build does not know is dropped from `levels` (and from
|
|
53
|
-
* `default`) instead of failing the whole list.
|
|
54
|
-
*/
|
|
55
|
-
export function decodeModelList(value) {
|
|
56
|
-
const raw = value;
|
|
57
|
-
if (!Array.isArray(raw?.models))
|
|
58
|
-
return ModelListSchema.parse(value);
|
|
59
|
-
const models = raw.models.map((model) => {
|
|
60
|
-
const thinking = model?.thinking;
|
|
61
|
-
if (!thinking || typeof thinking !== "object")
|
|
62
|
-
return model;
|
|
63
|
-
const levels = Array.isArray(thinking.levels)
|
|
64
|
-
? thinking.levels.filter((level) => typeof level === "string" && isThinkingLevel(level))
|
|
65
|
-
: thinking.levels;
|
|
66
|
-
const known = typeof thinking.default === "string" && isThinkingLevel(thinking.default);
|
|
67
|
-
const { default: _dropped, ...rest } = thinking;
|
|
68
|
-
return {
|
|
69
|
-
...model,
|
|
70
|
-
thinking: { ...rest, levels, ...(known && { default: thinking.default }) },
|
|
71
|
-
};
|
|
72
|
-
});
|
|
73
|
-
return ModelListSchema.parse({ ...value, models });
|
|
74
|
-
}
|
|
75
54
|
/**
|
|
76
55
|
* The models each harness's pinned CLI listed when this release was built
|
|
77
56
|
* (`bun run models:refresh`), for a picker without a live list. The live list
|
|
@@ -1,27 +1,40 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { openVocabulary } from "./vocabulary.js";
|
|
2
2
|
/**
|
|
3
3
|
* A single, harness-agnostic reasoning dial. Each harness maps it to its own
|
|
4
4
|
* native control: Claude -> adaptive `thinking` + `effort`; Codex ->
|
|
5
|
-
* `ReasoningEffort`. What runs depends on the model:
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* `ReasoningEffort`. What runs depends on the model: each harness runs the
|
|
6
|
+
* nearest level the model accepts (`ultra` on a Claude model topping out at
|
|
7
|
+
* `max` runs `max`).
|
|
8
|
+
*
|
|
9
|
+
* The levels this build knows, in order, lowest first. A harness may list
|
|
10
|
+
* others for a model: the names are an open vocabulary, the harness's own.
|
|
8
11
|
*/
|
|
9
12
|
export const THINKING_LEVELS = ["off", "low", "medium", "high", "xhigh", "max", "ultra"];
|
|
10
|
-
|
|
13
|
+
// @ref LLP 0002#open-vocabularies — a level a harness lists is kept, known or not
|
|
14
|
+
export const ThinkingLevelSchema = openVocabulary(THINKING_LEVELS);
|
|
15
|
+
/** Whether `v` is a level this build knows. */
|
|
11
16
|
export function isThinkingLevel(v) {
|
|
12
17
|
return THINKING_LEVELS.includes(v);
|
|
13
18
|
}
|
|
14
19
|
const rank = (level) => THINKING_LEVELS.indexOf(level);
|
|
15
20
|
/**
|
|
16
|
-
* The level a model runs when it offers only `supported
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* `
|
|
21
|
+
* The level a model runs when it offers only `supported`. A level it lists is
|
|
22
|
+
* itself. Otherwise, for a level this build knows, the highest known level it
|
|
23
|
+
* lists at or below `level`, else its lowest known one: use it when switching
|
|
24
|
+
* models, so `ultra` on a model topping out at `max` becomes `max`, not a
|
|
25
|
+
* fixed fallback. `undefined` for a level this build does not know and the
|
|
26
|
+
* model does not list, and when the model offers none.
|
|
20
27
|
*/
|
|
21
28
|
export function clampThinkingLevel(level, supported) {
|
|
29
|
+
if (supported.includes(level))
|
|
30
|
+
return level;
|
|
31
|
+
if (!isThinkingLevel(level))
|
|
32
|
+
return undefined;
|
|
22
33
|
let below;
|
|
23
34
|
let lowest;
|
|
24
35
|
for (const candidate of supported) {
|
|
36
|
+
if (!isThinkingLevel(candidate))
|
|
37
|
+
continue;
|
|
25
38
|
if (lowest === undefined || rank(candidate) < rank(lowest))
|
|
26
39
|
lowest = candidate;
|
|
27
40
|
if (rank(candidate) <= rank(level) && (below === undefined || rank(candidate) > rank(below)))
|
|
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
import { AuthCancelParamsSchema, AuthCancelResultSchema, AuthCompleteParamsSchema, AuthLoginParamsSchema, AuthLoginSchema, AuthLogoutParamsSchema, AuthStatusParamsSchema, AuthStatusResultSchema, AuthUpdatedSchema, HarnessAuthSchema, } from "./auth.js";
|
|
3
3
|
import { ClisParamsSchema, ClisResultSchema } from "./clis.js";
|
|
4
4
|
import { HISTORY_METHODS, HistoryCatalogSchema, HistoryCheckpointRequestSchema, HistoryCheckpointSchema, HistoryCommitSchema, HistoryForkSchema, HistoryHeadSchema, HistoryListSchema, HistoryReadSchema, HistorySliceSchema, HistoryVersionSchema, HistoryWaitSchema, SessionRefSchema, } from "./history.js";
|
|
5
|
-
import { ModelListSchema
|
|
5
|
+
import { ModelListSchema } from "./models.js";
|
|
6
6
|
import { DurableSessionSchema, ElicitationRespondParamsSchema, ElicitationRespondResultSchema, EventsReplayParamsSchema, EventsReplayResultSchema, InitializeParamsSchema, InitializeResultSchema, ModelsListParamsSchema, PermissionRespondParamsSchema, PermissionRespondResultSchema, RecoveryReasonSchema, SessionCloseParamsSchema, SessionCloseResultSchema, SessionConfirmStoppedParamsSchema, SessionConfirmStoppedResultSchema, SessionGetParamsSchema, SessionReleaseParamsSchema, SessionReleaseResultSchema, SessionSubscribeAllParamsSchema, SessionSubscribeAllResultSchema, SessionSubscribeParamsSchema, SessionSubscribeResultSchema, SessionUnsubscribeAllParamsSchema, SessionUnsubscribeParamsSchema, SessionUnsubscribeResultSchema, ShutdownResultSchema, TurnCancelParamsSchema, TurnCancelResultSchema, TurnGetParamsSchema, TurnReceiptSchema, TurnStartParamsSchema, TurnStartResultSchema, TurnSteerParamsSchema, TurnSteerResultSchema, WIRE_ERROR_CODES, WIRE_METHODS, decodeEventsReplayResult, } from "./wire.js";
|
|
7
7
|
/** `shutdown` takes nothing. */
|
|
8
8
|
const ShutdownParamsSchema = z.object({});
|
|
@@ -18,7 +18,7 @@ const API = {
|
|
|
18
18
|
[WIRE_METHODS.permissionRespond]: method(PermissionRespondParamsSchema, PermissionRespondResultSchema),
|
|
19
19
|
[WIRE_METHODS.elicitationRespond]: method(ElicitationRespondParamsSchema, ElicitationRespondResultSchema),
|
|
20
20
|
[WIRE_METHODS.eventsReplay]: method(EventsReplayParamsSchema, EventsReplayResultSchema, decodeEventsReplayResult),
|
|
21
|
-
[WIRE_METHODS.modelsList]: method(ModelsListParamsSchema, ModelListSchema
|
|
21
|
+
[WIRE_METHODS.modelsList]: method(ModelsListParamsSchema, ModelListSchema),
|
|
22
22
|
[WIRE_METHODS.clisList]: method(ClisParamsSchema, ClisResultSchema),
|
|
23
23
|
[WIRE_METHODS.clisPrepare]: method(ClisParamsSchema, ClisResultSchema),
|
|
24
24
|
[WIRE_METHODS.authStatus]: method(AuthStatusParamsSchema, AuthStatusResultSchema),
|
package/dist/server/bin.js
CHANGED
|
@@ -22,7 +22,7 @@ import { homedir } from "node:os";
|
|
|
22
22
|
import { join } from "node:path";
|
|
23
23
|
import pkg from "../../package.json" with { type: "json" };
|
|
24
24
|
import { createAgentRuntime, credentialsFromUrl, isInheritConfig, resolveAcpLaunch, resolveHarnessName, scriptedFile, } from "../core/index.js";
|
|
25
|
-
import { THINKING_LEVELS
|
|
25
|
+
import { THINKING_LEVELS } from "../protocol/index.js";
|
|
26
26
|
import { AgentServer } from "./agent-server.js";
|
|
27
27
|
import { runFeedbackCommand } from "./feedback.js";
|
|
28
28
|
import { installedLine, nothingToInstall, runInstall, toolsFor } from "./install.js";
|
|
@@ -39,7 +39,8 @@ function usage(exitCode) {
|
|
|
39
39
|
" --stdio serve NDJSON JSON-RPC on stdio (the default)",
|
|
40
40
|
" --acp speak ACP v1 on stdio instead (be the agent)",
|
|
41
41
|
" --model <id> every turn runs on this model (default: the harness's own)",
|
|
42
|
-
` --thinking <level> and at this thinking level (${THINKING_LEVELS.join(", ")}
|
|
42
|
+
` --thinking <level> and at this thinking level (${THINKING_LEVELS.join(", ")},`,
|
|
43
|
+
" or another the model lists);",
|
|
43
44
|
" the operator's choice: an ACP client cannot change either",
|
|
44
45
|
" install download the pinned agent CLIs into the managed cache",
|
|
45
46
|
" (always downloads — run at image build time to erase",
|
|
@@ -199,8 +200,9 @@ function parseArgs(argv) {
|
|
|
199
200
|
}
|
|
200
201
|
else if (arg === "--thinking") {
|
|
201
202
|
const level = next();
|
|
202
|
-
|
|
203
|
-
|
|
203
|
+
// A flag where the level belongs means the level was left out.
|
|
204
|
+
if (!level.trim() || level.startsWith("-"))
|
|
205
|
+
fail(`--thinking needs a level: ${THINKING_LEVELS.slice(0, -1).join(", ")} or ${THINKING_LEVELS.at(-1)}, or another the model lists`);
|
|
204
206
|
args.thinking = level;
|
|
205
207
|
}
|
|
206
208
|
else if (arg === "--credentials-url") {
|