@with-logic/elwood 0.1.2 → 0.1.3
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 +13 -0
- package/README.md +20 -14
- package/dist/cli/help.d.ts +1 -1
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +13 -10
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/main.js +9 -0
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/models/combined.d.ts +6 -0
- package/dist/cli/models/combined.d.ts.map +1 -0
- package/dist/cli/models/combined.js +92 -0
- package/dist/cli/models/combined.js.map +1 -0
- package/dist/cli/models/index.d.ts +2 -0
- package/dist/cli/models/index.d.ts.map +1 -1
- package/dist/cli/models/index.js +15 -4
- package/dist/cli/models/index.js.map +1 -1
- package/dist/cli/models/render.d.ts +4 -0
- package/dist/cli/models/render.d.ts.map +1 -1
- package/dist/cli/models/render.js +28 -1
- package/dist/cli/models/render.js.map +1 -1
- package/dist/cli/models/result.d.ts +13 -0
- package/dist/cli/models/result.d.ts.map +1 -0
- package/dist/cli/models/result.js +2 -0
- package/dist/cli/models/result.js.map +1 -0
- package/dist/cli/models/settings.d.ts +61 -0
- package/dist/cli/models/settings.d.ts.map +1 -0
- package/dist/cli/models/settings.js +24 -0
- package/dist/cli/models/settings.js.map +1 -0
- package/dist/cli/models/signals.d.ts +11 -0
- package/dist/cli/models/signals.d.ts.map +1 -0
- package/dist/cli/models/signals.js +21 -0
- package/dist/cli/models/signals.js.map +1 -0
- package/dist/cli/request/index.js +1 -1
- package/dist/cli/request/index.js.map +1 -1
- package/dist/cli/request/validation.d.ts.map +1 -1
- package/dist/cli/request/validation.js +0 -4
- package/dist/cli/request/validation.js.map +1 -1
- package/dist/cli/run/output.d.ts.map +1 -1
- package/dist/cli/run/output.js +3 -6
- package/dist/cli/run/output.js.map +1 -1
- package/docs/cli-output.md +40 -10
- package/docs/cli.md +3 -2
- package/package.json +1 -1
- package/prd/12a-cli.md +38 -11
- package/prd/14-conformance.md +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -12,6 +12,19 @@ back each entry are listed in `prd/14-conformance.md`.
|
|
|
12
12
|
|
|
13
13
|
## [Unreleased]
|
|
14
14
|
|
|
15
|
+
## [0.1.3] - 2026-09-14
|
|
16
|
+
|
|
17
|
+
- Keep live session warnings quiet in text and JSON CLI output, including model
|
|
18
|
+
discovery; enable them with `--verbose` or `--debug`. JSONL warning events and
|
|
19
|
+
fatal errors remain available as before.
|
|
20
|
+
|
|
21
|
+
- List both Claude and Codex catalogs in bare `elwood models`, with agent
|
|
22
|
+
associations, partial failure diagnostics, and one shared timeout budget.
|
|
23
|
+
Explicit `--agent` keeps the single-agent output contract.
|
|
24
|
+
|
|
25
|
+
- Preserve new CLI sessions by default so they can be listed and resumed; use
|
|
26
|
+
`--ephemeral` to remove new or resumed Elwood state after the run.
|
|
27
|
+
|
|
15
28
|
## [0.1.2] - 2026-09-13
|
|
16
29
|
|
|
17
30
|
- Preserve the inherited PATH when an interactive login shell exits successfully
|
package/README.md
CHANGED
|
@@ -107,7 +107,7 @@ when a human should make those decisions. There is no default turn timeout; pass
|
|
|
107
107
|
elwood "Summarize this repository"
|
|
108
108
|
git diff | elwood --agent claude "Review this diff for correctness"
|
|
109
109
|
elwood --output json "Run the tests and summarize failures" | jq -r .response
|
|
110
|
-
elwood --
|
|
110
|
+
elwood --output json "Remember that the release color is teal"
|
|
111
111
|
elwood --resume <sessionId> "What is the release color?"
|
|
112
112
|
```
|
|
113
113
|
|
|
@@ -179,11 +179,13 @@ combined with `--stream`, `--verbose`, `--debug`, or `--output jsonl`.
|
|
|
179
179
|
|
|
180
180
|
### Continuation and cleanup
|
|
181
181
|
|
|
182
|
-
New runs
|
|
183
|
-
session ID on stderr
|
|
182
|
+
New and resumed headless runs preserve Elwood state by default. A resumable
|
|
183
|
+
session ID is reported on stderr for text output and in the terminal record for
|
|
184
|
+
JSON and JSONL. `--keep` explicitly selects the default; use `--ephemeral` for
|
|
185
|
+
one-off runs that should remove their Elwood state afterward:
|
|
184
186
|
|
|
185
187
|
```sh
|
|
186
|
-
first=$(elwood --
|
|
188
|
+
first=$(elwood --output json "Remember that the release color is teal")
|
|
187
189
|
id=$(printf '%s' "$first" | jq -r .sessionId)
|
|
188
190
|
elwood --resume "$id" "What is the release color?"
|
|
189
191
|
elwood --resume "$id" --ephemeral "Finish this conversation"
|
|
@@ -232,7 +234,7 @@ signal: a socket left behind by a force-killed owner reads as live until that
|
|
|
232
234
|
session is next started or torn down. Unreadable records are skipped with a
|
|
233
235
|
stderr warning, and an empty state directory is a normal empty result.
|
|
234
236
|
`resume <id>` follows every `--resume` rule: stored agent and workspace, no
|
|
235
|
-
`--cwd`, no
|
|
237
|
+
`--cwd`, no persona, and piped stdin composes the same way.
|
|
236
238
|
|
|
237
239
|
`elwood interactive [id]` opens the real `claude` or `codex` TUI in the current
|
|
238
240
|
terminal — no hidden PTY, no automation, no observation, no Elwood state — with
|
|
@@ -259,21 +261,25 @@ command rejects `--output json|jsonl`, `--stream`, `--verbose`, `--debug`,
|
|
|
259
261
|
|
|
260
262
|
### Listing models
|
|
261
263
|
|
|
262
|
-
`elwood models`
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
264
|
+
`elwood models` lists Claude and Codex models, with each model's agent noted.
|
|
265
|
+
It probes Claude then Codex, briefly opening and cancelling each model picker,
|
|
266
|
+
and removes both probe sessions afterward. `--agent` limits the listing to one
|
|
267
|
+
agent; saved configuration and `ELWOOD_AGENT` do not narrow the bare command.
|
|
268
|
+
Text marks the current model with `*` and the default with `(default)`.
|
|
266
269
|
|
|
267
270
|
```sh
|
|
268
271
|
elwood models
|
|
272
|
+
elwood models --output json | jq '.agents[] | {agent, models}'
|
|
269
273
|
elwood models --agent claude --output json | jq -r '.models[] | select(.isCurrent) | .id'
|
|
270
274
|
```
|
|
271
275
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
`--
|
|
275
|
-
|
|
276
|
-
|
|
276
|
+
JSON is one `{"schemaVersion":1,"type":"models",...}` document. Combined
|
|
277
|
+
listings contain `agents: [{agent, models}]` and `errors: [...]`; explicit
|
|
278
|
+
`--agent` retains the single `agent` and `models` fields. If one agent fails or
|
|
279
|
+
is unavailable, the other catalog remains available and the command exits
|
|
280
|
+
nonzero. `--timeout` is one budget shared by both probes, and Ctrl-C stops
|
|
281
|
+
further probes. Workspace, model, reasoning, trust, state-directory, and
|
|
282
|
+
matching adapter posture settings apply; the configured model stays unchanged.
|
|
277
283
|
|
|
278
284
|
### Trust and security
|
|
279
285
|
|
package/dist/cli/help.d.ts
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* Static production help for the first-party headless Elwood command.
|
|
3
3
|
* Implements PRD §12A.1/§12A.7-§12A.10 and C-CLI-02/C-CLI-21 through C-CLI-26.
|
|
4
4
|
*/
|
|
5
|
-
export declare const cliHelp = "Usage: elwood [options] [prompt...]\n elwood run [options] [prompt...]\n elwood resume <id> [options] [prompt...]\n elwood interactive [id] [options]\n elwood sessions [--state-dir <path>] [--output <text|json>]\n elwood models [options] [--output <text|json>]\n elwood config <command>\n\nRun one Claude Code or Codex turn and write its combined assistant response.\nPositional text and piped stdin are combined with one blank line.\n\nExamples:\n elwood \"Summarize this repository\"\n git diff | elwood \"Review this diff for correctness\"\n elwood run --output json < prompt.txt\n elwood --
|
|
5
|
+
export declare const cliHelp = "Usage: elwood [options] [prompt...]\n elwood run [options] [prompt...]\n elwood resume <id> [options] [prompt...]\n elwood interactive [id] [options]\n elwood sessions [--state-dir <path>] [--output <text|json>]\n elwood models [options] [--output <text|json>]\n elwood config <command>\n\nRun one Claude Code or Codex turn and write its combined assistant response.\nPositional text and piped stdin are combined with one blank line.\n\nExamples:\n elwood \"Summarize this repository\"\n git diff | elwood \"Review this diff for correctness\"\n elwood run --output json < prompt.txt\n elwood --output json \"Remember this decision\"\n\nCommands:\n run Run one agent turn (default)\n resume <id> [prompt...] Resume a kept session; same as run --resume <id>\n interactive [id] Open the agent's own TUI here with Elwood's settings\n sessions List Elwood-owned session records; never starts an agent\n models List both agents' models (starts each briefly)\n config Inspect or update global defaults; see config --help\n help Show this help\n\nAgent and turn options:\n --agent <claude|codex> Select the agent (default: first available of claude, codex)\n --model <id> Select or switch the model\n --reasoning-effort <level> Claude: low|medium|high|xhigh|max\n Codex: none|minimal|low|medium|high|xhigh|max\n --persona <prompt> Run a real side-effect-capable setup turn; hide its answer\n -C, --cwd <path> Workspace for a new run (default: current directory)\n --image <path> Attach an image; repeat to preserve order\n --timeout <duration> Bound launch, setup, and turn (default: none; ms|s|m|h)\n --trust / --no-trust Toggle allowlisted trust automation (default: trust)\n --no-defaults Ignore saved config and ELWOOD_* run defaults\n\nContinuation and output:\n --keep Preserve Elwood state (default)\n --resume <id> Resume the exact stored agent and workspace\n --ephemeral Remove new or resumed Elwood state afterward\n --output <text|json|jsonl> Stdout protocol (default: text)\n --stream / --no-stream Toggle incremental text output (default: off)\n --verbose / --no-verbose Toggle warnings and concise progress on stderr (default: off)\n --debug Write full sanitized event details to stderr\n --head View the full agent TUI in this terminal\n --state-dir <path> Override CLI-owned state storage\n\nAgent posture defaults and supported values:\n --high-trust / --no-high-trust\n Never ask for permissions on either agent (default: off):\n Claude bypassPermissions; Codex danger-full-access + never\n --claude-permission-mode <default|acceptEdits|plan|auto|dontAsk|bypassPermissions>\n Default: dontAsk\n --codex-sandbox <read-only|workspace-write|danger-full-access>\n Default: workspace-write\n --codex-approval-policy <untrusted|on-request|never>\n Default: never\n\nHead mode is view-only and requires terminal stdin and stderr. It cannot be\ncombined with stream, verbose, debug, or JSONL output. Ctrl-C still interrupts.\n\nWarnings and diagnostics use stderr; stdout remains the selected protocol.\nUse \"elwood config effective\" to explain resolved values and their sources.\n\nResume subcommand:\n elwood resume <id> [prompt...] is exactly elwood run --resume <id>: the stored\n agent and workspace are used, --cwd is rejected, and piped stdin still applies.\n\nInteractive mode:\n elwood interactive [id] runs claude or codex in the foreground of this terminal\n with the resolved agent, model, effort, workspace, and posture passed as the\n agent's own flags. Elwood does not observe or record the conversation and\n writes no session state. With an id, the stored session's own conversation is\n resumed in its stored workspace with its stored posture. Requires a terminal on\n stdin and stdout; cannot be combined with --output json/jsonl, --stream,\n --verbose, --debug, --head, --timeout, --persona, --image, --keep, --ephemeral,\n or --resume. Built-in posture defaults are not applied unless configured.\n\nSession listing:\n elwood sessions lists id, agent, live, resumable, last used, created, and\n workspace for records in the effective state directory. \"live\" means a\n launch's bridge socket is present. Text is an aligned table; --output json\n emits one {\"schemaVersion\":1,\"type\":\"sessions\",...} document. An empty state\n directory is a normal, empty result.\n\nModel listing:\n elwood models probes Claude then Codex, showing each model's agent. --agent\n limits the listing to that agent; saved/environment agent defaults do not.\n Each probe opens and cancels the picker, then removes its session state.\n Text marks current with * and default with (default); JSON emits one models\n document: agents/errors arrays for both, or agent/models with --agent.\n Partial failures retain available models and exit nonzero. --timeout is one\n budget for the whole command; Ctrl-C stops further probes. Honors --cwd,\n --model, --reasoning-effort, --state-dir, trust, and matching posture flags.\n\n -h, --help Show this help\n -V, --version Show the Elwood version\n";
|
|
6
6
|
export declare const cliConfigHelp = "Usage: elwood config <command> [arguments]\n\nInspect or update Elwood's global user configuration without starting an agent.\n\nCommands:\n path Print the global config path\n show Print the saved configuration document\n effective [run options] Explain resolved launch/output settings and sources\n get <key> Print one configured scalar\n set <key> <value> Set one documented config key\n unset <key> Remove one configured key\n\n -h, --help Show this help\n\nExamples:\n elwood config show\n elwood config effective --agent claude\n elwood config set codex.sandbox workspace-write\n";
|
|
7
7
|
//# sourceMappingURL=help.d.ts.map
|
package/dist/cli/help.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/cli/help.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../../src/cli/help.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,OAAO,g/KAmGnB,CAAC;AAEF,eAAO,MAAM,aAAa,usBAkBzB,CAAC"}
|
package/dist/cli/help.js
CHANGED
|
@@ -17,14 +17,14 @@ Examples:
|
|
|
17
17
|
elwood "Summarize this repository"
|
|
18
18
|
git diff | elwood "Review this diff for correctness"
|
|
19
19
|
elwood run --output json < prompt.txt
|
|
20
|
-
elwood --
|
|
20
|
+
elwood --output json "Remember this decision"
|
|
21
21
|
|
|
22
22
|
Commands:
|
|
23
23
|
run Run one agent turn (default)
|
|
24
24
|
resume <id> [prompt...] Resume a kept session; same as run --resume <id>
|
|
25
25
|
interactive [id] Open the agent's own TUI here with Elwood's settings
|
|
26
26
|
sessions List Elwood-owned session records; never starts an agent
|
|
27
|
-
models List
|
|
27
|
+
models List both agents' models (starts each briefly)
|
|
28
28
|
config Inspect or update global defaults; see config --help
|
|
29
29
|
help Show this help
|
|
30
30
|
|
|
@@ -41,12 +41,12 @@ Agent and turn options:
|
|
|
41
41
|
--no-defaults Ignore saved config and ELWOOD_* run defaults
|
|
42
42
|
|
|
43
43
|
Continuation and output:
|
|
44
|
-
--keep Preserve Elwood state
|
|
44
|
+
--keep Preserve Elwood state (default)
|
|
45
45
|
--resume <id> Resume the exact stored agent and workspace
|
|
46
|
-
--ephemeral Remove resumed Elwood state afterward
|
|
46
|
+
--ephemeral Remove new or resumed Elwood state afterward
|
|
47
47
|
--output <text|json|jsonl> Stdout protocol (default: text)
|
|
48
48
|
--stream / --no-stream Toggle incremental text output (default: off)
|
|
49
|
-
--verbose / --no-verbose Toggle concise
|
|
49
|
+
--verbose / --no-verbose Toggle warnings and concise progress on stderr (default: off)
|
|
50
50
|
--debug Write full sanitized event details to stderr
|
|
51
51
|
--head View the full agent TUI in this terminal
|
|
52
52
|
--state-dir <path> Override CLI-owned state storage
|
|
@@ -90,11 +90,14 @@ Session listing:
|
|
|
90
90
|
directory is a normal, empty result.
|
|
91
91
|
|
|
92
92
|
Model listing:
|
|
93
|
-
elwood models
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
elwood models probes Claude then Codex, showing each model's agent. --agent
|
|
94
|
+
limits the listing to that agent; saved/environment agent defaults do not.
|
|
95
|
+
Each probe opens and cancels the picker, then removes its session state.
|
|
96
|
+
Text marks current with * and default with (default); JSON emits one models
|
|
97
|
+
document: agents/errors arrays for both, or agent/models with --agent.
|
|
98
|
+
Partial failures retain available models and exit nonzero. --timeout is one
|
|
99
|
+
budget for the whole command; Ctrl-C stops further probes. Honors --cwd,
|
|
100
|
+
--model, --reasoning-effort, --state-dir, trust, and matching posture flags.
|
|
98
101
|
|
|
99
102
|
-h, --help Show this help
|
|
100
103
|
-V, --version Show the Elwood version
|
package/dist/cli/help.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/cli/help.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG
|
|
1
|
+
{"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/cli/help.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmGtB,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;CAkB5B,CAAC"}
|
package/dist/cli/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,KAAK,EA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AO,EAAE,MAAM,MAAM,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,OAAO,iBAAiB,CAAC;IAC3C,QAAQ,CAAC,QAAQ,EAAE,OAAO,kBAAkB,CAAC;IAC7C,QAAQ,CAAC,OAAO,EAAE,OAAO,iBAAiB,CAAC;IAC3C,QAAQ,CAAC,OAAO,EAAE,OAAO,UAAU,CAAC;IACpC,QAAQ,CAAC,UAAU,EAAE,OAAO,aAAa,CAAC;IAC1C,QAAQ,CAAC,WAAW,EAAE,OAAO,qBAAqB,CAAC;IACnD,QAAQ,CAAC,GAAG,EAAE,MAAM,MAAM,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,OAAO,iBACmB,CAAC;AAElE,eAAO,MAAM,oBAAoB,EAAE,OAAO,UACY,CAAC;AAEvD,eAAO,MAAM,oBAAoB,EAAE,OAAO,aACkB,CAAC;AAE7D,eAAO,MAAM,qBAAqB,EAAE,OAAO,qBAC8B,CAAC;AAa1E,+FAA+F;AAC/F,wBAAsB,IAAI,CACxB,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,EAAE,cAAc,EACvB,YAAY,GAAE,mBAA8B,GAC3C,OAAO,CAAC,MAAM,CAAC,CAwFjB"}
|
package/dist/cli/main.js
CHANGED
|
@@ -7,9 +7,11 @@ import { runConfigCommand } from "./config/commands.js";
|
|
|
7
7
|
import { HeadedDisplay } from "./head/display.js";
|
|
8
8
|
import { cliHelp } from "./help.js";
|
|
9
9
|
import { agentHint, cliFailure, errorRecord, explicitStructuredOutput, renderErrorRecord, } from "./main-failure.js";
|
|
10
|
+
import { executeCombinedModels } from "./models/combined.js";
|
|
10
11
|
import { resolveRunRequest, resolveRunSettings } from "./request/index.js";
|
|
11
12
|
import { optional, usage } from "./request/values.js";
|
|
12
13
|
import { assertListingOutput, runSessionsCommand } from "./sessions/index.js";
|
|
14
|
+
import { resolveListingSettings } from "./sessions/settings.js";
|
|
13
15
|
import { AsyncOutputSink } from "./stream.js";
|
|
14
16
|
import { readCliVersion } from "./version.js";
|
|
15
17
|
export const prepareDefaultCliSession = async (...args) => (await import("./session/index.js")).prepareCliSession(...args);
|
|
@@ -55,6 +57,13 @@ export async function main(args, context, dependencies = defaults) {
|
|
|
55
57
|
return await dependencies.interactive(parsed, context);
|
|
56
58
|
}
|
|
57
59
|
if (parsed.command === "models") {
|
|
60
|
+
if (parsed.run.flags.agent === undefined) {
|
|
61
|
+
const settings = resolveListingSettings(parsed.run, context);
|
|
62
|
+
output = settings.output;
|
|
63
|
+
agent = null;
|
|
64
|
+
assertListingOutput(settings, "models");
|
|
65
|
+
return await executeCombinedModels(parsed.run, output, context, { stdout, stderr }, dependencies, startedAt);
|
|
66
|
+
}
|
|
58
67
|
const settings = await dependencies.settings(parsed.run, context);
|
|
59
68
|
assertListingOutput(settings, "models");
|
|
60
69
|
output = settings.output;
|
package/dist/cli/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,EACL,SAAS,EACT,UAAU,EACV,WAAW,EACX,wBAAwB,EACxB,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../src/cli/main.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,O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,CAAC,KAAK,CAAC,CAAC;QAClC,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC;QAC3E,MAAM,iBAAiB,CAAC,MAAM,EAAE,WAAW,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,KAAK,CAC5F,GAAG,EAAE,CAAC,SAAS,CAChB,CAAC;QACF,OAAO,OAAO,CAAC,QAAQ,CAAC;IAC1B,CAAC;YAAS,CAAC;QACT,MAAM,IAAI,EAAE,KAAK,EAAE,CAAC;QACpB,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QACpD,MAAM,CAAC,OAAO,EAAE,CAAC;QACjB,MAAM,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Sequential aggregate model listing with a command-wide deadline (PRD §12A.10, C-CLI-26). */
|
|
2
|
+
import type { CliMainContext, CliMainDependencies } from "../main.ts";
|
|
3
|
+
import type { CliOutputMode, ParsedRunCommand } from "../types.ts";
|
|
4
|
+
import type { ExecuteModelsIo } from "./index.ts";
|
|
5
|
+
export declare function executeCombinedModels(parsed: ParsedRunCommand, output: CliOutputMode, context: CliMainContext, io: ExecuteModelsIo, dependencies: CliMainDependencies, startedAt: number): Promise<number>;
|
|
6
|
+
//# sourceMappingURL=combined.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combined.d.ts","sourceRoot":"","sources":["../../../src/cli/models/combined.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAG/F,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAItE,OAAO,KAAK,EAAY,aAAa,EAAE,gBAAgB,EAAsB,MAAM,aAAa,CAAC;AAEjG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAiBlD,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,cAAc,EACvB,EAAE,EAAE,eAAe,EACnB,YAAY,EAAE,mBAAmB,EACjC,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,CAAC,CA2EjB"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/** Sequential aggregate model listing with a command-wide deadline (PRD §12A.10, C-CLI-26). */
|
|
2
|
+
import { cliFailure, errorRecord } from "../main-failure.js";
|
|
3
|
+
import { cliAgents } from "../types.js";
|
|
4
|
+
import { renderCombinedModels } from "./render.js";
|
|
5
|
+
import { modelAgentInputs } from "./settings.js";
|
|
6
|
+
import { ModelsSignals } from "./signals.js";
|
|
7
|
+
async function teardownPreparedSession(session) {
|
|
8
|
+
try {
|
|
9
|
+
await session.teardown();
|
|
10
|
+
return { action: "teardown", status: "succeeded" };
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
return { action: "teardown", status: "failed", error: "Cleanup failed." };
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export async function executeCombinedModels(parsed, output, context, io, dependencies, startedAt) {
|
|
17
|
+
const signals = new ModelsSignals(context.signals);
|
|
18
|
+
const results = [];
|
|
19
|
+
let deadline;
|
|
20
|
+
const stopped = () => {
|
|
21
|
+
if (signals.interrupted)
|
|
22
|
+
return { code: "interrupted", message: "Interrupted.", exitCode: 130 };
|
|
23
|
+
if (deadline !== undefined && dependencies.now() >= deadline)
|
|
24
|
+
return { code: "timeout", message: "Timed out.", exitCode: 124 };
|
|
25
|
+
return undefined;
|
|
26
|
+
};
|
|
27
|
+
const failed = (agent, failure, cleanup) => {
|
|
28
|
+
results.push({
|
|
29
|
+
agent,
|
|
30
|
+
error: errorRecord(agent, failure, Math.max(0, dependencies.now() - startedAt), cleanup),
|
|
31
|
+
exitCode: failure.exitCode,
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
try {
|
|
35
|
+
// Validate both sets of settings before launching either adapter.
|
|
36
|
+
const settings = new Map();
|
|
37
|
+
const failures = new Map();
|
|
38
|
+
for (const agent of cliAgents) {
|
|
39
|
+
const inputs = modelAgentInputs(parsed, context.env, agent);
|
|
40
|
+
try {
|
|
41
|
+
const request = await dependencies.settings(inputs.parsed, { ...context, env: inputs.env });
|
|
42
|
+
if (request.timeoutMs !== undefined)
|
|
43
|
+
deadline = startedAt + request.timeoutMs;
|
|
44
|
+
settings.set(agent, request);
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
failures.set(agent, cliFailure(error));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
for (const agent of cliAgents) {
|
|
51
|
+
const stop = stopped();
|
|
52
|
+
if (stop !== undefined) {
|
|
53
|
+
failed(agent, stop);
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
const invalid = failures.get(agent);
|
|
57
|
+
if (invalid !== undefined) {
|
|
58
|
+
failed(agent, invalid);
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
let prepared;
|
|
62
|
+
try {
|
|
63
|
+
prepared = await dependencies.prepare(settings.get(agent));
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
const stop = stopped();
|
|
67
|
+
if (stop !== undefined) {
|
|
68
|
+
failed(agent, stop);
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
failed(agent, cliFailure(error));
|
|
72
|
+
continue;
|
|
73
|
+
}
|
|
74
|
+
const afterPreparation = stopped();
|
|
75
|
+
if (afterPreparation !== undefined) {
|
|
76
|
+
const cleanup = await teardownPreparedSession(prepared.session);
|
|
77
|
+
failed(agent, afterPreparation, cleanup);
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
await dependencies.listModels({
|
|
81
|
+
...prepared.request,
|
|
82
|
+
...(deadline === undefined ? {} : { timeoutMs: deadline - dependencies.now() }),
|
|
83
|
+
}, prepared.session, io, { signals, onResult: (result) => results.push(result) });
|
|
84
|
+
}
|
|
85
|
+
await renderCombinedModels(output, results, io);
|
|
86
|
+
return Math.max(0, ...results.map((result) => ("error" in result ? result.exitCode : 0)));
|
|
87
|
+
}
|
|
88
|
+
finally {
|
|
89
|
+
signals.dispose();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=combined.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combined.js","sourceRoot":"","sources":["../../../src/cli/models/combined.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAI/F,OAAO,EAAE,UAAU,EAAE,WAAW,EAAsB,MAAM,oBAAoB,CAAC;AAIjF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAI7C,KAAK,UAAU,uBAAuB,CAAC,OAAyB;IAC9D,IAAI,CAAC;QACH,MAAM,OAAO,CAAC,QAAQ,EAAE,CAAC;QACzB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;IACrD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC5E,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,MAAwB,EACxB,MAAqB,EACrB,OAAuB,EACvB,EAAmB,EACnB,YAAiC,EACjC,SAAiB;IAEjB,MAAM,OAAO,GAAG,IAAI,aAAa,CAAC,OAAO,CA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AAC;gBACnC,MAAM,OAAO,GAAG,MAAM,uBAAuB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;gBAChE,MAAM,CAAC,KAAK,EAAE,gBAAgB,EAAE,OAAO,CAAC,CAAC;gBACzC,MAAM;YACR,CAAC;YACD,MAAM,YAAY,CAAC,UAAU,CAC3B;gBACE,GAAG,QAAQ,CAAC,OAAO;gBACnB,GAAG,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,QAAQ,GAAG,YAAY,CAAC,GAAG,EAAE,EAAE,CAAC;aAChF,EACD,QAAQ,CAAC,OAAO,EAChB,EAAE,EACF,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CACxD,CAAC;QACJ,CAAC;QACD,MAAM,oBAAoB,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,CAAC,CAAC;QAChD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,IAAI,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5F,CAAC;YAAS,CAAC;QACT,OAAO,CAAC,OAAO,EAAE,CAAC;IACpB,CAAC;AACH,CAAC"}
|
|
@@ -8,6 +8,7 @@ import { type CliLifecycleClock, type CliSignalSource } from "../lifecycle/index
|
|
|
8
8
|
import type { CliSessionFacade } from "../session/index.ts";
|
|
9
9
|
import type { AsyncOutputSink } from "../stream.ts";
|
|
10
10
|
import type { EffectiveRunRequest } from "../types.ts";
|
|
11
|
+
import type { ModelsResult } from "./result.ts";
|
|
11
12
|
export type ExecuteModelsIo = {
|
|
12
13
|
readonly stdout: AsyncOutputSink;
|
|
13
14
|
readonly stderr: AsyncOutputSink;
|
|
@@ -15,6 +16,7 @@ export type ExecuteModelsIo = {
|
|
|
15
16
|
export type ExecuteModelsDependencies = {
|
|
16
17
|
readonly signals: CliSignalSource;
|
|
17
18
|
readonly clock?: CliLifecycleClock;
|
|
19
|
+
readonly onResult?: (result: ModelsResult) => void;
|
|
18
20
|
};
|
|
19
21
|
export declare function executeModels(request: EffectiveRunRequest, session: CliSessionFacade, io: ExecuteModelsIo, dependencies: ExecuteModelsDependencies): Promise<number>;
|
|
20
22
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/models/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAgB,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAMnG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/models/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAgB,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAMnG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;CAClC,CAAC;AACF,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC,QAAQ,CAAC,KAAK,CAAC,EAAE,iBAAiB,CAAC;IACnC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;CACpD,CAAC;AAEF,wBAAsB,aAAa,CACjC,OAAO,EAAE,mBAAmB,EAC5B,OAAO,EAAE,gBAAgB,EACzB,EAAE,EAAE,eAAe,EACnB,YAAY,EAAE,yBAAyB,GACtC,OAAO,CAAC,MAAM,CAAC,CA+DjB"}
|
package/dist/cli/models/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import { subscribeRunEvents } from "../run/subscribe.js";
|
|
|
13
13
|
import { CodexUpdateAttentionGuard } from "../update-attention.js";
|
|
14
14
|
import { renderModels } from "./render.js";
|
|
15
15
|
export async function executeModels(request, session, io, dependencies) {
|
|
16
|
-
const lifecycle = new CliLifecycle(request, session, dependencies.signals, dependencies.clock);
|
|
16
|
+
const lifecycle = new CliLifecycle({ ...request, keep: false, ephemeral: true }, session, dependencies.signals, dependencies.clock);
|
|
17
17
|
const clean = createCliSanitizer();
|
|
18
18
|
const warnings = [];
|
|
19
19
|
const updateAttention = request.agent === "codex"
|
|
@@ -21,11 +21,16 @@ export async function executeModels(request, session, io, dependencies) {
|
|
|
21
21
|
: undefined;
|
|
22
22
|
const unsubscribers = subscribeRunEvents(request, session, lifecycle, {
|
|
23
23
|
status: () => undefined,
|
|
24
|
-
warning: (event) =>
|
|
24
|
+
warning: (event) => {
|
|
25
|
+
if (request.verbose || request.debug === true)
|
|
26
|
+
warnings.push(writeWarning(io.stderr, event, clean));
|
|
27
|
+
},
|
|
25
28
|
}, undefined, updateAttention);
|
|
26
29
|
let models;
|
|
27
30
|
lifecycle.start();
|
|
28
31
|
try {
|
|
32
|
+
if (lifecycle.failure !== undefined)
|
|
33
|
+
throw lifecycle.failure;
|
|
29
34
|
lifecycle.beginLaunch();
|
|
30
35
|
const started = await lifecycle.race(session.start());
|
|
31
36
|
if (started.completed) {
|
|
@@ -49,11 +54,17 @@ export async function executeModels(request, session, io, dependencies) {
|
|
|
49
54
|
const failure = lifecycle.failure;
|
|
50
55
|
if (failure === undefined) {
|
|
51
56
|
// Both races completed (the lifecycle only stops on a recorded failure), so rows exist.
|
|
52
|
-
|
|
57
|
+
if (dependencies.onResult === undefined)
|
|
58
|
+
await renderModels(request.output, request.agent, models, io.stdout);
|
|
59
|
+
else
|
|
60
|
+
dependencies.onResult({ agent: request.agent, models: models });
|
|
53
61
|
return 0;
|
|
54
62
|
}
|
|
55
63
|
const record = errorRecord(request.agent, failure, lifecycle.durationMs(), cleanup);
|
|
56
|
-
|
|
64
|
+
if (dependencies.onResult === undefined)
|
|
65
|
+
await renderErrorRecord(request.output, record, io.stdout, io.stderr);
|
|
66
|
+
else
|
|
67
|
+
dependencies.onResult({ agent: request.agent, error: record, exitCode: failure.exitCode });
|
|
57
68
|
return failure.exitCode;
|
|
58
69
|
}
|
|
59
70
|
function writeWarning(stderr, event, clean) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/models/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,YAAY,EAAgD,MAAM,uBAAuB,CAAC;AACnG,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAIzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,YAAY,EAA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C,CAAC;AAC3F,CAAC"}
|
|
@@ -5,5 +5,9 @@
|
|
|
5
5
|
import type { AgentModelOption } from "../../core/models/rows.ts";
|
|
6
6
|
import type { AsyncOutputSink } from "../stream.ts";
|
|
7
7
|
import type { CliAgent, CliOutputMode } from "../types.ts";
|
|
8
|
+
import type { ExecuteModelsIo } from "./index.ts";
|
|
9
|
+
import type { ModelsResult } from "./result.ts";
|
|
8
10
|
export declare function renderModels(output: CliOutputMode, agent: CliAgent, models: readonly AgentModelOption[], stdout: AsyncOutputSink): Promise<void>;
|
|
11
|
+
/** Render a combined invocation once, after every started probe has been cleaned up. */
|
|
12
|
+
export declare function renderCombinedModels(output: CliOutputMode, results: readonly ModelsResult[], io: ExecuteModelsIo): Promise<void>;
|
|
9
13
|
//# sourceMappingURL=render.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../src/cli/models/render.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAElE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../src/cli/models/render.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAElE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIhD,wBAAsB,YAAY,CAChC,MAAM,EAAE,aAAa,EACrB,KAAK,EAAE,QAAQ,EACf,MAAM,EAAE,SAAS,gBAAgB,EAAE,EACnC,MAAM,EAAE,eAAe,GACtB,OAAO,CAAC,IAAI,CAAC,CAoBf;AAeD,wFAAwF;AACxF,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,SAAS,YAAY,EAAE,EAChC,EAAE,EAAE,eAAe,GAClB,OAAO,CAAC,IAAI,CAAC,CAsCf"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Table and JSON rendering for `elwood models`.
|
|
3
3
|
* Implements PRD §12A.10 and C-CLI-26.
|
|
4
4
|
*/
|
|
5
|
-
import { createCliSanitizer } from "../output/sanitize.js";
|
|
5
|
+
import { createCliSanitizer, formatDiagnosticValue } from "../output/sanitize.js";
|
|
6
6
|
import { renderTable } from "../table.js";
|
|
7
7
|
const header = ["CURRENT", "ID", "LABEL", "DEFAULT", "DESCRIPTION"];
|
|
8
8
|
export async function renderModels(output, agent, models, stdout) {
|
|
@@ -30,4 +30,31 @@ function sanitizedModel(model, clean) {
|
|
|
30
30
|
raw: clean(model.raw),
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
+
/** Render a combined invocation once, after every started probe has been cleaned up. */
|
|
34
|
+
export async function renderCombinedModels(output, results, io) {
|
|
35
|
+
const clean = createCliSanitizer();
|
|
36
|
+
const agents = results.flatMap((result) => "models" in result
|
|
37
|
+
? [
|
|
38
|
+
{
|
|
39
|
+
agent: result.agent,
|
|
40
|
+
models: result.models.map((model) => sanitizedModel(model, clean)),
|
|
41
|
+
},
|
|
42
|
+
]
|
|
43
|
+
: []);
|
|
44
|
+
const errors = results.flatMap((result) => ("error" in result ? [result.error] : []));
|
|
45
|
+
if (output === "json") {
|
|
46
|
+
await io.stdout.write(`${JSON.stringify({ schemaVersion: 1, type: "models", agents, errors })}\n`);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
await io.stdout.write(renderTable(["AGENT", ...header], agents.flatMap(({ agent, models }) => models.map((model) => [
|
|
50
|
+
agent,
|
|
51
|
+
model.isCurrent ? "*" : "",
|
|
52
|
+
model.id,
|
|
53
|
+
model.label,
|
|
54
|
+
model.isDefault ? "(default)" : "",
|
|
55
|
+
model.description ?? "",
|
|
56
|
+
]))));
|
|
57
|
+
for (const error of errors)
|
|
58
|
+
await io.stderr.write(`elwood: ${error.agent}: ${formatDiagnosticValue(error.error.message, clean)}\n`);
|
|
59
|
+
}
|
|
33
60
|
//# sourceMappingURL=render.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../../src/cli/models/render.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../../src/cli/models/render.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAElF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAK1C,MAAM,MAAM,GAAG,CAAC,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;AAEpE,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,MAAqB,EACrB,KAAe,EACf,MAAmC,EACnC,MAAuB;IAEvB,MAAM,KAAK,GAAG,kBAAkB,EAAE,CAAC;IACnC,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;IACjE,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,MAAM,QAAQ,GAAG,EAAE,aAAa,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QAC3E,MAA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AO,EAAE,KAAK,CAAC,IAAI,CACjF,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Typed model probe outcomes shared by single and combined listings (PRD §12A.10, C-CLI-26). */
|
|
2
|
+
import type { AgentModelOption } from "../../core/models/rows.ts";
|
|
3
|
+
import type { CliError } from "../output/types.ts";
|
|
4
|
+
import type { CliAgent } from "../types.ts";
|
|
5
|
+
export type ModelsResult = {
|
|
6
|
+
readonly agent: CliAgent;
|
|
7
|
+
readonly models: readonly AgentModelOption[];
|
|
8
|
+
} | {
|
|
9
|
+
readonly agent: CliAgent;
|
|
10
|
+
readonly error: CliError;
|
|
11
|
+
readonly exitCode: number;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=result.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"result.d.ts","sourceRoot":"","sources":["../../../src/cli/models/result.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,MAAM,YAAY,GACpB;IAAE,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,CAAA;CAAE,GAC1E;IAAE,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"result.js","sourceRoot":"","sources":["../../../src/cli/models/result.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { CliAgent, CliEnvironment, ParsedRunCommand } from "../types.ts";
|
|
2
|
+
export declare function modelAgentInputs(parsed: ParsedRunCommand, environment: CliEnvironment, agent: CliAgent): {
|
|
3
|
+
parsed: {
|
|
4
|
+
flags: {
|
|
5
|
+
claudePermissionMode?: string;
|
|
6
|
+
agent: "claude" | "codex";
|
|
7
|
+
output?: string;
|
|
8
|
+
timeout?: string;
|
|
9
|
+
trust?: boolean;
|
|
10
|
+
highTrust?: boolean;
|
|
11
|
+
stateDir?: string;
|
|
12
|
+
verbose?: boolean;
|
|
13
|
+
stream?: boolean;
|
|
14
|
+
debug?: boolean;
|
|
15
|
+
ignoreDefaults?: boolean;
|
|
16
|
+
head?: boolean;
|
|
17
|
+
persona?: string;
|
|
18
|
+
model?: string;
|
|
19
|
+
reasoningEffort?: string;
|
|
20
|
+
cwd?: string;
|
|
21
|
+
images: readonly string[];
|
|
22
|
+
keep?: boolean;
|
|
23
|
+
resume?: string;
|
|
24
|
+
ephemeral?: boolean;
|
|
25
|
+
} | {
|
|
26
|
+
codexApprovalPolicy?: string;
|
|
27
|
+
codexSandbox?: string;
|
|
28
|
+
agent: "claude" | "codex";
|
|
29
|
+
output?: string;
|
|
30
|
+
timeout?: string;
|
|
31
|
+
trust?: boolean;
|
|
32
|
+
highTrust?: boolean;
|
|
33
|
+
stateDir?: string;
|
|
34
|
+
verbose?: boolean;
|
|
35
|
+
stream?: boolean;
|
|
36
|
+
debug?: boolean;
|
|
37
|
+
ignoreDefaults?: boolean;
|
|
38
|
+
head?: boolean;
|
|
39
|
+
persona?: string;
|
|
40
|
+
model?: string;
|
|
41
|
+
reasoningEffort?: string;
|
|
42
|
+
cwd?: string;
|
|
43
|
+
images: readonly string[];
|
|
44
|
+
keep?: boolean;
|
|
45
|
+
resume?: string;
|
|
46
|
+
ephemeral?: boolean;
|
|
47
|
+
};
|
|
48
|
+
command: "run";
|
|
49
|
+
explicit: ReadonlySet<import("../types.ts").RunOptionKey>;
|
|
50
|
+
promptWords: readonly string[];
|
|
51
|
+
};
|
|
52
|
+
env: {
|
|
53
|
+
ELWOOD_CODEX_SANDBOX: undefined;
|
|
54
|
+
ELWOOD_CODEX_APPROVAL_POLICY: undefined;
|
|
55
|
+
ELWOOD_AGENT: undefined;
|
|
56
|
+
} | {
|
|
57
|
+
ELWOOD_CLAUDE_PERMISSION_MODE: undefined;
|
|
58
|
+
ELWOOD_AGENT: undefined;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../../src/cli/models/settings.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE9E,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,gBAAgB,EACxB,WAAW,EAAE,cAAc,EAC3B,KAAK,EAAE,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBhB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Select only the matching adapter's options for combined model probes (PRD §12A.10). */
|
|
2
|
+
import { optional } from "../request/values.js";
|
|
3
|
+
export function modelAgentInputs(parsed, environment, agent) {
|
|
4
|
+
const { claudePermissionMode, codexSandbox, codexApprovalPolicy, ...shared } = parsed.flags;
|
|
5
|
+
const flags = {
|
|
6
|
+
...shared,
|
|
7
|
+
agent,
|
|
8
|
+
...(agent === "claude"
|
|
9
|
+
? optional(claudePermissionMode, "claudePermissionMode")
|
|
10
|
+
: {
|
|
11
|
+
...optional(codexSandbox, "codexSandbox"),
|
|
12
|
+
...optional(codexApprovalPolicy, "codexApprovalPolicy"),
|
|
13
|
+
}),
|
|
14
|
+
};
|
|
15
|
+
const env = {
|
|
16
|
+
...environment,
|
|
17
|
+
ELWOOD_AGENT: undefined,
|
|
18
|
+
...(agent === "claude"
|
|
19
|
+
? { ELWOOD_CODEX_SANDBOX: undefined, ELWOOD_CODEX_APPROVAL_POLICY: undefined }
|
|
20
|
+
: { ELWOOD_CLAUDE_PERMISSION_MODE: undefined }),
|
|
21
|
+
};
|
|
22
|
+
return { parsed: { ...parsed, flags }, env };
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../../src/cli/models/settings.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhD,MAAM,UAAU,gBAAgB,CAC9B,MAAwB,EACxB,WAA2B,EAC3B,KAAe;IAEf,MAAM,EAAE,oBAAoB,EAAE,YAAY,EAAE,mBAAmB,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC;IAC5F,MAAM,KAAK,GAAG;QACZ,GAAG,MAAM;QACT,KAAK;QACL,GAAG,CAAC,KAAK,KAAK,QAAQ;YACpB,CAAC,CAAC,QAAQ,CAAC,oBAAoB,EAAE,sBAAsB,CAAC;YACxD,CAAC,CAAC;gBACE,GAAG,QAAQ,CAAC,YAAY,EAAE,cAAc,CAAC;gBACzC,GAAG,QAAQ,CAAC,mBAAmB,EAAE,qBAAqB,CAAC;aACxD,CAAC;KACP,CAAC;IACF,MAAM,GAAG,GAAG;QACV,GAAG,WAAW;QACd,YAAY,EAAE,SAAS;QACvB,GAAG,CAAC,KAAK,KAAK,QAAQ;YACpB,CAAC,CAAC,EAAE,oBAAoB,EAAE,SAAS,EAAE,4BAA4B,EAAE,SAAS,EAAE;YAC9E,CAAC,CAAC,EAAE,6BAA6B,EAAE,SAAS,EAAE,CAAC;KAClD,CAAC;IACF,OAAO,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Keep SIGINT bound between combined probes and replay cancellation at launch (PRD §12A.10). */
|
|
2
|
+
import type { Unsubscribe } from "../../core/types.ts";
|
|
3
|
+
import type { CliSignalSource } from "../lifecycle/index.ts";
|
|
4
|
+
export declare class ModelsSignals implements CliSignalSource {
|
|
5
|
+
interrupted: boolean;
|
|
6
|
+
private readonly handlers;
|
|
7
|
+
readonly dispose: Unsubscribe;
|
|
8
|
+
constructor(source: CliSignalSource);
|
|
9
|
+
onSigint(handler: () => void): Unsubscribe;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=signals.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signals.d.ts","sourceRoot":"","sources":["../../../src/cli/models/signals.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,qBAAa,aAAc,YAAW,eAAe;IACnD,WAAW,UAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAyB;IAClD,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;gBAElB,MAAM,EAAE,eAAe;IAOnC,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,GAAG,WAAW;CAO3C"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export class ModelsSignals {
|
|
2
|
+
interrupted = false;
|
|
3
|
+
handlers = new Set();
|
|
4
|
+
dispose;
|
|
5
|
+
constructor(source) {
|
|
6
|
+
this.dispose = source.onSigint(() => {
|
|
7
|
+
this.interrupted = true;
|
|
8
|
+
for (const handler of this.handlers)
|
|
9
|
+
handler();
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
onSigint(handler) {
|
|
13
|
+
this.handlers.add(handler);
|
|
14
|
+
if (this.interrupted)
|
|
15
|
+
handler();
|
|
16
|
+
return () => {
|
|
17
|
+
this.handlers.delete(handler);
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=signals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signals.js","sourceRoot":"","sources":["../../../src/cli/models/signals.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,aAAa;IACxB,WAAW,GAAG,KAAK,CAAC;IACH,QAAQ,GAAG,IAAI,GAAG,EAAc,CAAC;IACzC,OAAO,CAAc;IAE9B,YAAY,MAAuB;QACjC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE;YAClC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;YACxB,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ;gBAAE,OAAO,EAAE,CAAC;QACjD,CAAC,CAAC,CAAC;IACL,CAAC;IAED,QAAQ,CAAC,OAAmB;QAC1B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC3B,IAAI,IAAI,CAAC,WAAW;YAAE,OAAO,EAAE,CAAC;QAChC,OAAO,GAAG,EAAE;YACV,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAChC,CAAC,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -78,7 +78,7 @@ export async function resolveRunSettings(parsed, context, detectAgent = detectAv
|
|
|
78
78
|
cwdExplicit: parsed.explicit.has("cwd"),
|
|
79
79
|
imagePaths: parsed.flags.images,
|
|
80
80
|
prompt: "",
|
|
81
|
-
keep: parsed.flags.
|
|
81
|
+
keep: !parsed.flags.ephemeral,
|
|
82
82
|
...optional(optionalNonBlank(parsed.flags.resume, "resume"), "resume"),
|
|
83
83
|
ephemeral: parsed.flags.ephemeral ?? false,
|
|
84
84
|
resolution: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/request/index.ts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SACzC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/cli/request/validation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACtB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,gBAAgB,EACxB,GAAG,EAAE,WAAW,EAChB,KAAK,EAAE,QAAQ,EACf,WAAW,EAAE,MAAM,GAClB,IAAI,CAQN;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,EAAE,WAAW,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/cli/request/validation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACtB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,gBAAgB,EACxB,GAAG,EAAE,WAAW,EAChB,KAAK,EAAE,QAAQ,EACf,WAAW,EAAE,MAAM,GAClB,IAAI,CAQN;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,EAAE,WAAW,GAAG,IAAI,CAYlF;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,YAAY,CAAC,OAAO,CAAC,EAC7B,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,EAC9B,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,OAAO,GACZ,IAAI,CAaN;AAMD,yFAAyF;AACzF,wBAAgB,eAAe,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CASlF;AAED,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC,CAAC;AAEF,4FAA4F;AAC5F,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,gBAAgB,EACxB,GAAG,EAAE,WAAW,GACf,sBAAsB,CAaxB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,EAAE,WAAW,GAAG,IAAI,CAMlF"}
|
|
@@ -24,10 +24,6 @@ export function validateSpecificFlags(parsed, env, agent, agentSource) {
|
|
|
24
24
|
export function validateLifecycle(parsed, env) {
|
|
25
25
|
if (parsed.flags.keep && parsed.flags.ephemeral)
|
|
26
26
|
throw usage("--keep and --ephemeral cannot be combined.");
|
|
27
|
-
if (parsed.flags.ephemeral && parsed.flags.resume === undefined)
|
|
28
|
-
throw usage("--ephemeral requires --resume.");
|
|
29
|
-
if (parsed.flags.keep && parsed.flags.resume !== undefined)
|
|
30
|
-
throw usage("--keep is only valid for a new session.");
|
|
31
27
|
if (parsed.flags.cwd !== undefined && parsed.flags.resume !== undefined)
|
|
32
28
|
throw usage("--cwd cannot be used with --resume; resume uses the stored workspace.");
|
|
33
29
|
if (parsed.flags.resume !== undefined) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../src/cli/request/validation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,gBAAgB,GAIjB,MAAM,aAAa,CAAC;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atDiagnosticValue } from "../output/sanitize.js";
|
|
9
9
|
import { StreamingTextRenderer, writeFinalText } from "../output/text.js";
|
|
10
10
|
import { agentDisplayName } from "../types.js";
|
|
11
|
-
import { completionLine, conciseLine, debugLine
|
|
11
|
+
import { completionLine, conciseLine, debugLine } from "./output-lines.js";
|
|
12
12
|
export class RunOutput {
|
|
13
13
|
request;
|
|
14
14
|
stdout;
|
|
@@ -52,12 +52,9 @@ export class RunOutput {
|
|
|
52
52
|
warning(event) {
|
|
53
53
|
if (this.ended)
|
|
54
54
|
return;
|
|
55
|
-
|
|
56
|
-
if (this.request.output !== "jsonl" && !this.request.verbose && this.request.debug !== true) {
|
|
57
|
-
this.queueDiagnostic(warningLine(record, this.diagnosticValue));
|
|
55
|
+
if (this.request.output !== "jsonl" && !this.request.verbose && this.request.debug !== true)
|
|
58
56
|
return;
|
|
59
|
-
|
|
60
|
-
void this.enqueue(record);
|
|
57
|
+
void this.enqueue(progressFromWarning(event, this.clean));
|
|
61
58
|
}
|
|
62
59
|
starting() {
|
|
63
60
|
this.progress(`Starting ${agentDisplayName(this.request.agent)} in ${this.diagnosticValue(this.request.cwd)}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../../src/cli/run/output.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAG1E,OAAO,EAAE,gBAAgB,EAA4B,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,SAAS,E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MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE;YACxC,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACjE,CAAC;IAEO,KAAK,CAAC,IAAY;QACxB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,IAAI,EAAE,CAAC;IACxF,CAAC;IAED,0FAA0F;IAClF,KAAK,CAAC,iBAAiB,CAAC,IAAY;QAC1C,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC9B,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACzB,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAEgB,eAAe,GAAG,CAAC,KAAa,EAAU,EAAE,CAC3D,qBAAqB,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;CAC5C"}
|
package/docs/cli-output.md
CHANGED
|
@@ -5,9 +5,9 @@ exit codes, and safe shell recipes. Start with [cli.md](cli.md) for usage.
|
|
|
5
5
|
|
|
6
6
|
## Text, verbose, and stream
|
|
7
7
|
|
|
8
|
-
Text is the default output protocol.
|
|
9
|
-
|
|
10
|
-
tool-name, warning, and cleanup progress; it does not repeat assistant or
|
|
8
|
+
Text is the default output protocol. Live session warnings are quiet by default,
|
|
9
|
+
including during `elwood models`. Errors remain visible. `--verbose` adds compact
|
|
10
|
+
elapsed phase, tool-name, warning, and cleanup progress on stderr; it does not repeat assistant or
|
|
11
11
|
thinking text. `--debug` adds full sanitized event details. `--stream` emits
|
|
12
12
|
assistant text as it arrives and is valid only with text output; use
|
|
13
13
|
`--no-stream` when config enabled streaming but a script needs JSON.
|
|
@@ -26,7 +26,9 @@ a downstream pipe closing early triggers cleanup without an uncaught `EPIPE`.
|
|
|
26
26
|
|
|
27
27
|
`--output json` emits exactly one version-1 document. Its stable fields are
|
|
28
28
|
`schemaVersion`, `type`, `agent`, `response`, `sessionId`, `durationMs`,
|
|
29
|
-
`cleanup`, and, on failure, `error
|
|
29
|
+
`cleanup`, and, on failure, `error`. The examples below use `--ephemeral`, so
|
|
30
|
+
cleanup removes session state and `sessionId` is null. By default, CLI turns
|
|
31
|
+
preserve state and return a resumable session ID once one is available:
|
|
30
32
|
|
|
31
33
|
```json
|
|
32
34
|
{
|
|
@@ -66,7 +68,8 @@ a usage error or `no_agent_found`) reports `"agent": null`.
|
|
|
66
68
|
`--output jsonl` emits sequenced version-1 `text`, `thinking`, `tool`,
|
|
67
69
|
`status`, and `warning` records followed by exactly one `result` or `error`
|
|
68
70
|
record. Every record has `sequence` and `elapsedMs`; tool calls and results
|
|
69
|
-
share `toolCallId` when the agent supplies one
|
|
71
|
+
share `toolCallId` when the agent supplies one. This example also uses
|
|
72
|
+
`--ephemeral`:
|
|
70
73
|
|
|
71
74
|
```jsonl
|
|
72
75
|
{"schemaVersion":1,"type":"status","status":"running","sequence":1,"elapsedMs":114}
|
|
@@ -77,7 +80,9 @@ share `toolCallId` when the agent supplies one:
|
|
|
77
80
|
```
|
|
78
81
|
|
|
79
82
|
JSONL warning records stay on stdout so the machine protocol remains ordered;
|
|
80
|
-
text and JSON runs surface warnings on stderr
|
|
83
|
+
text and JSON runs surface session warnings on stderr only with `--verbose`
|
|
84
|
+
or `--debug`. `ELWOOD_VERBOSE=true` or config `verbose: true` also enables them;
|
|
85
|
+
`--no-verbose` overrides inherited verbosity (but not explicit `--debug`).
|
|
81
86
|
|
|
82
87
|
## Session and model listings
|
|
83
88
|
|
|
@@ -108,10 +113,35 @@ in JSON mode, and `sessions` never starts an agent:
|
|
|
108
113
|
check, so a force-killed owner can leave a stale "live" until the session is
|
|
109
114
|
next started or torn down. An empty state directory yields an empty `sessions`
|
|
110
115
|
array (text mode prints a notice on stderr and nothing on stdout). Unreadable
|
|
111
|
-
records are skipped with one stderr warning each
|
|
116
|
+
records are skipped with one stderr warning each, even without verbosity,
|
|
117
|
+
because the listing omits those results.
|
|
112
118
|
|
|
113
|
-
`elwood models`
|
|
114
|
-
|
|
119
|
+
`elwood models` probes Claude then Codex, regardless of saved or environment
|
|
120
|
+
agent defaults. Text includes an `AGENT` column. JSON contains successful
|
|
121
|
+
catalogs and canonical per-agent error records in one document:
|
|
122
|
+
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"schemaVersion": 1,
|
|
126
|
+
"type": "models",
|
|
127
|
+
"agents": [
|
|
128
|
+
{ "agent": "claude", "models": [] },
|
|
129
|
+
{ "agent": "codex", "models": [] }
|
|
130
|
+
],
|
|
131
|
+
"errors": []
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Each probe opens and cancels its model picker and always removes its session
|
|
136
|
+
state. An empty `models` array means that probe succeeded with no rows. If an
|
|
137
|
+
adapter fails, its catalog is absent from `agents` and its canonical error
|
|
138
|
+
record appears in `errors`, including `agent`, `error`, `durationMs`, and
|
|
139
|
+
`cleanup`. Available catalogs remain present. Incomplete results exit nonzero:
|
|
140
|
+
130 for interruption, then 124 for timeout, 2 for usage errors, or 1 for other
|
|
141
|
+
failures, in that precedence order. `--timeout` is a whole-command budget; no
|
|
142
|
+
next probe starts after timeout or Ctrl-C.
|
|
143
|
+
|
|
144
|
+
Explicit `elwood models --agent claude` retains its single-agent document:
|
|
115
145
|
|
|
116
146
|
```json
|
|
117
147
|
{
|
|
@@ -125,7 +155,7 @@ tears the session down:
|
|
|
125
155
|
}
|
|
126
156
|
```
|
|
127
157
|
|
|
128
|
-
|
|
158
|
+
Single-agent failures use the same `error` document and statuses as a run. Useful recipes:
|
|
129
159
|
|
|
130
160
|
```sh
|
|
131
161
|
id=$(elwood sessions --output json | jq -r '.sessions[0].id')
|
package/docs/cli.md
CHANGED
|
@@ -83,8 +83,9 @@ Boolean environment values are exactly `true` or `false`.
|
|
|
83
83
|
Run `elwood --help` for the full flag list. Launch controls include `--model`,
|
|
84
84
|
`--reasoning-effort`, `--persona`, `--claude-permission-mode`,
|
|
85
85
|
`--codex-sandbox`, `--codex-approval-policy`, `--state-dir`, `--verbose`,
|
|
86
|
-
`--debug`, and `--trust` / `--no-trust`.
|
|
87
|
-
|
|
86
|
+
`--debug`, and `--trust` / `--no-trust`. Live session warnings are quiet by
|
|
87
|
+
default; use `--verbose` or `--debug` to see them, including for `elwood models`.
|
|
88
|
+
The built-in non-interactive posture is Claude `dontAsk`, or Codex `workspace-write` with approval policy `never`.
|
|
88
89
|
|
|
89
90
|
For an unattended run that must never stop on a permission prompt, prefer the
|
|
90
91
|
agent-neutral `--high-trust` over per-agent posture flags. It selects Claude
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@with-logic/elwood",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Control interactive agentic coding CLIs (Claude Code, Codex) through real terminal sessions: typed hooks, a unified activity stream, resumable sessions, and a headless CLI.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Logic App, Inc.",
|
package/prd/12a-cli.md
CHANGED
|
@@ -86,10 +86,12 @@ launch, persona setup, and the user turn. Signal handlers are active before
|
|
|
86
86
|
launch. The first `SIGINT` requests interruption and cleanup, a repeated
|
|
87
87
|
`SIGINT` force-kills the process tree, and an interrupted invocation exits 130.
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
`--
|
|
92
|
-
|
|
89
|
+
New and resumed headless runs preserve their Elwood-owned state after every
|
|
90
|
+
outcome by default, after stop-or-kill cleanup. `--keep` explicitly selects this
|
|
91
|
+
default. `--ephemeral` instead requests teardown for either a new or resumed
|
|
92
|
+
run; it cannot be combined with `--keep`. Teardown does not undo workspace
|
|
93
|
+
changes or remove history owned by the underlying agent. A preserved run reports
|
|
94
|
+
its resumable session ID on stderr in text mode. A resume uses `--resume <id>` to load exactly the
|
|
93
95
|
stored adapter and cwd; it never falls back to a new conversation, and `--cwd`
|
|
94
96
|
is therefore rejected with `--resume` rather than overriding the stored
|
|
95
97
|
workspace. Explicit adapter conflicts are usage errors. Before launch, resumed state and its cwd MUST satisfy the private,
|
|
@@ -117,11 +119,13 @@ stacks, bridge credentials, and terminal escape sequences.
|
|
|
117
119
|
|
|
118
120
|
Text is the default output. It writes the combined assistant response — every
|
|
119
121
|
observed assistant text message in order, separated by one blank line — with one
|
|
120
|
-
trailing newline when non-empty and zero bytes for an empty response.
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
trailing newline when non-empty and zero bytes for an empty response. Live session
|
|
123
|
+
warnings are quiet by default for text and JSON runs, including model probes.
|
|
124
|
+
`--verbose` enables concise sanitized warnings and elapsed-time phase, tool-name,
|
|
125
|
+
and cleanup progress on stderr without replaying assistant or thinking text.
|
|
126
|
+
`--debug` also enables warnings. JSONL always represents warnings as ordered
|
|
127
|
+
records without duplicating them on stderr. Fatal errors and `sessions` warnings
|
|
128
|
+
about omitted unreadable records remain visible without verbosity. `--debug` emits
|
|
125
129
|
full sanitized normalized event details to stderr and is intended for diagnosis
|
|
126
130
|
rather than routine progress. `--stream` is text-only, emits assistant chunks once with one
|
|
127
131
|
blank line between distinct messages, preserves partial output on failure, and
|
|
@@ -345,7 +349,7 @@ and status 1.
|
|
|
345
349
|
### 12A.10 Model listing
|
|
346
350
|
|
|
347
351
|
`elwood models [options] [--output <text|json>]` briefly starts a headless
|
|
348
|
-
session for
|
|
352
|
+
session for each requested agent — honoring workspace, model, reasoning
|
|
349
353
|
effort, timeout, trust, state directory, and adapter posture with normal
|
|
350
354
|
precedence — waits for readiness, drives the agent's own model picker through
|
|
351
355
|
the public `listModels` operation (which opens and cancels the picker and leaves
|
|
@@ -354,7 +358,30 @@ runs no persona turn, uses a fresh session identity under the effective state
|
|
|
354
358
|
directory, and always tears that identity down, so no Elwood state remains
|
|
355
359
|
afterward. Starting the agent is unavoidable and the help text says so.
|
|
356
360
|
|
|
357
|
-
|
|
361
|
+
Without an explicit `--agent`, the command MUST probe Claude and then Codex
|
|
362
|
+
sequentially, regardless of `ELWOOD_AGENT` or a saved agent default. Each probe
|
|
363
|
+
uses its own adapter settings; adapter-specific flags and environment posture
|
|
364
|
+
settings apply only to their matching adapter. Shared settings apply to both.
|
|
365
|
+
`--timeout` is one budget for the whole command, including settings resolution
|
|
366
|
+
and preparation. Each probe receives only the remaining budget. Once exhausted,
|
|
367
|
+
the next adapter MUST NOT start; available catalogs remain in the partial result. A failed or unavailable adapter MUST NOT
|
|
368
|
+
hide the other adapter’s available models. SIGINT stops the command and MUST
|
|
369
|
+
NOT launch the next adapter. Every started probe is cleaned up before the next.
|
|
370
|
+
|
|
371
|
+
For combined listings, text includes an `AGENT` column and per-agent errors go
|
|
372
|
+
to stderr. JSON is exactly one document
|
|
373
|
+
`{ "schemaVersion": 1, "type": "models", "agents": [{ "agent": "...", "models": [...] }], "errors": [...] }`.
|
|
374
|
+
`agents` contains successful catalogs (including empty catalogs), and `errors`
|
|
375
|
+
contains the canonical version-1 error records with agent, error, duration, and
|
|
376
|
+
cleanup fields. Both arrays retain probe order. Status is 0 only if both probes
|
|
377
|
+
succeeded; otherwise interruption (130) takes precedence over timeout (124),
|
|
378
|
+
usage errors (2), and other failures (1). Output-protocol errors and global
|
|
379
|
+
config-file read, parse, or schema errors fail before any probe. Adapter-specific
|
|
380
|
+
setting validation failures are recorded for that adapter and permit the other
|
|
381
|
+
adapter to proceed. An explicit `--agent` preserves the single-agent output
|
|
382
|
+
and error contract below. All model probes remain ephemeral.
|
|
383
|
+
|
|
384
|
+
Single-agent text output is an aligned table with a header row: `*` in the first column marks
|
|
358
385
|
the current model, followed by the id, label, `(default)` when the row is the
|
|
359
386
|
adapter's default, and the description. JSON output is exactly one version-1
|
|
360
387
|
document `{ "schemaVersion": 1, "type": "models", "agent": "...", "models": [...] }`
|
package/prd/14-conformance.md
CHANGED
|
@@ -291,9 +291,9 @@ Each criterion has:
|
|
|
291
291
|
| C-CLI-05 | §12A.2 | A CLI turn preserves Elwood's real interactive environment and auto-authorizes only its documented trust classes; disabled or unrecognized trust automation fails as `blocked_prompt` without submitting into the dialog. |
|
|
292
292
|
| C-CLI-06 | §12A.2 | Built-in and selected per-agent permission, sandbox, approval, model, effort, and persona settings validate against the effective adapter before launch. |
|
|
293
293
|
| C-CLI-07 | §12A.2 | An optional duration bounds launch, setup, and turn; first and repeated `SIGINT` perform interrupt then force-kill behavior; timeout and interruption exit 124 and 130 respectively. |
|
|
294
|
-
| C-CLI-08 | §12A.2 §12A.5 | New
|
|
294
|
+
| C-CLI-08 | §12A.2 §12A.5 | New and resumed headless state preserves by default; explicit `--keep` selects preservation, `--ephemeral` selects teardown for either, the two flags conflict, exact resume never falls back, teardown does not undo workspace/agent-owned state, and persona is one output-discarded but side-effect-capable new-session setup turn that is rejected on resume. |
|
|
295
295
|
| C-CLI-09 | §12A.2 | Premature agent exit and cleanup failure retain collected response data; cleanup runs once, never replaces a primary failure, and changes otherwise-successful execution to status 1. |
|
|
296
|
-
| C-CLI-10 | §12A.3 | Default text output contains only the combined observed assistant messages with exact separator/newline semantics; text/JSON warnings
|
|
296
|
+
| C-CLI-10 | §12A.3 | Default text output contains only the combined observed assistant messages with exact separator/newline semantics; text/JSON live session warnings (including model probes) are silent unless verbose or debug is enabled, while JSONL keeps ordered warning records and fatal errors remain visible; verbose emits concise elapsed progress without assistant/thinking duplication; debug detail stays on stderr; and streamed text is emitted once with partial output retained on failure. |
|
|
297
297
|
| C-CLI-11 | §12A.3 | JSON emits one version-1 terminal document and JSONL emits ordered normalized records plus exactly one terminal record, including structured validation errors when explicitly selected; every JSONL record has `elapsedMs` and tool records carry `toolCallId` when available. An error record emitted before any adapter was selected reports `agent: null`; otherwise `agent` is the selected or running adapter. |
|
|
298
298
|
| C-CLI-12 | §12A.3 | Output excludes terminal and secret-bearing internals, honors backpressure, and treats downstream `EPIPE` as graceful consumer closure followed by cleanup. |
|
|
299
299
|
| C-CLI-13 | §12A.4 | Config path resolution follows explicit, absolute XDG, then home fallback order; config is strict version 1 with only documented keys, and project-local config is ignored. |
|
|
@@ -309,7 +309,7 @@ Each criterion has:
|
|
|
309
309
|
| C-CLI-23 | §12A.7 | `elwood resume <id> [options] [prompt...]` is a parse-time rewrite of `elwood run --resume <id>` sharing one resolution/execution path: stored adapter and workspace loading, `--cwd`/explicit-adapter/`--keep`/persona/`--ephemeral` rules, and positional-plus-piped prompt composition are identical; a missing id or an additional `--resume` is a usage error. |
|
|
310
310
|
| C-CLI-24 | §12A.8 | `elwood sessions` lists private, owner-matched session records under the effective state directory without launching an agent, reporting id, adapter, workspace, ISO-8601 `createdAt`/`lastUsedAt`, `resumable`, and socket-presence `live`, ordered by most recent use; unreadable records are skipped with a stderr warning, an empty or absent state directory is a status-0 empty listing (stderr notice in text, empty array in JSON), text is an aligned header table, JSON is one version-1 `sessions` document, and JSONL, prompt words, or other run options are usage errors. |
|
|
311
311
|
| C-CLI-25 | §12A.9 | `elwood interactive [id]` spawns the selected agent's own CLI in the foreground with inherited stdio, no PTY/bridge/automation/state, `SIGINT` passed through, and the agent's exit status; it fails with status 2 before spawning without terminal stdin and stdout or with `--output json|jsonl`, `--stream`, `--verbose`, `--debug`, `--head`, `--timeout`, `--persona`, `--image`, `--keep`, `--ephemeral`, `--resume`, or extra positionals; explicitly selected agent, model, effort, workspace, and posture map through the adapters' shared launch-argument builders while built-in posture defaults are omitted; and `[id]` loads the stored record with `--resume` semantics, merges stored posture field by field, and passes the agent's own conversation id or fails as `resume_unavailable`. |
|
|
312
|
-
| C-CLI-26 | §12A.10 | `elwood models` starts a fresh headless session with normal setting precedence, lists models through the public picker operation without changing the model, always tears the session and its state down, prints an aligned table (`*` current, `(default)`) or one version-1 `models` document of `AgentModelOption` rows, maps timeout/interruption/blocked-prompt/agent-exit/picker failures to the existing error conventions and statuses, and rejects stream, head, persona, image, keep, resume, ephemeral, positional, and JSONL inputs as usage errors. |
|
|
312
|
+
| C-CLI-26 | §12A.10 | `elwood models` without explicit `--agent` probes Claude then Codex sequentially despite environment/config agent defaults, associates each catalog with its adapter, applies each adapter’s settings and one shared timeout budget, retains partial successes alongside per-agent errors in one aggregate JSON document or an AGENT-column table, exits nonzero on incomplete results, and stops before launching another adapter after SIGINT. Explicit `--agent` preserves the single-agent contract: it starts a fresh headless session with normal setting precedence, lists models through the public picker operation without changing the model, always tears the session and its state down, prints an aligned table (`*` current, `(default)`) or one version-1 `models` document of `AgentModelOption` rows, maps timeout/interruption/blocked-prompt/agent-exit/picker failures to the existing error conventions and statuses, and rejects stream, head, persona, image, keep, resume, ephemeral, positional, and JSONL inputs as usage errors. |
|
|
313
313
|
|
|
314
314
|
#### C-E2E: Real Adapter Flows (§12)
|
|
315
315
|
|