@enderfga/claw-orchestrator 7.6.0 → 7.6.2
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/README.md +5 -5
- package/dist/src/autoloop/dispatcher.js +18 -1
- package/dist/src/autoloop/dispatcher.js.map +1 -1
- package/dist/src/base-oneshot-session.d.ts +5 -0
- package/dist/src/base-oneshot-session.js +11 -27
- package/dist/src/base-oneshot-session.js.map +1 -1
- package/dist/src/engine-spawn.d.ts +38 -0
- package/dist/src/engine-spawn.js +223 -0
- package/dist/src/engine-spawn.js.map +1 -0
- package/dist/src/models.js +9 -0
- package/dist/src/models.js.map +1 -1
- package/dist/src/persistent-agy-session.js +2 -2
- package/dist/src/persistent-agy-session.js.map +1 -1
- package/dist/src/persistent-codex-app-session.d.ts +8 -0
- package/dist/src/persistent-codex-app-session.js +18 -6
- package/dist/src/persistent-codex-app-session.js.map +1 -1
- package/dist/src/persistent-codex-session.d.ts +7 -0
- package/dist/src/persistent-codex-session.js +43 -7
- package/dist/src/persistent-codex-session.js.map +1 -1
- package/dist/src/persistent-cursor-session.js +2 -2
- package/dist/src/persistent-cursor-session.js.map +1 -1
- package/dist/src/persistent-custom-session.js +3 -3
- package/dist/src/persistent-custom-session.js.map +1 -1
- package/dist/src/persistent-gemini-session.js +2 -2
- package/dist/src/persistent-gemini-session.js.map +1 -1
- package/dist/src/persistent-grok-session.js +2 -2
- package/dist/src/persistent-grok-session.js.map +1 -1
- package/dist/src/persistent-opencode-session.js +10 -8
- package/dist/src/persistent-opencode-session.js.map +1 -1
- package/dist/src/persistent-session.js +2 -2
- package/dist/src/persistent-session.js.map +1 -1
- package/dist/src/session-manager.js +3 -2
- package/dist/src/session-manager.js.map +1 -1
- package/package.json +3 -1
- package/skills/references/autoloop.md +15 -8
- package/skills/references/claude-cli-tracking.md +3 -1
- package/skills/references/multi-engine.md +9 -7
- package/skills/references/tools.md +25 -25
|
@@ -19,7 +19,7 @@ SessionManager
|
|
|
19
19
|
├── engine: 'cursor' → PersistentCursorSession (legacy)
|
|
20
20
|
│ └── Wraps: cursor-agent -p --trust --output-format stream-json (per-message spawning)
|
|
21
21
|
├── engine: 'opencode' → PersistentOpencodeSession
|
|
22
|
-
│ └── Wraps: opencode run --format json (per-message spawning)
|
|
22
|
+
│ └── Wraps: opencode run --format json, message on stdin (per-message spawning)
|
|
23
23
|
└── engine: 'custom' → PersistentCustomSession
|
|
24
24
|
└── Wraps: any CLI via user-provided CustomEngineConfig
|
|
25
25
|
```
|
|
@@ -28,7 +28,7 @@ SessionManager
|
|
|
28
28
|
|
|
29
29
|
### Claude Code (`engine: 'claude'`)
|
|
30
30
|
|
|
31
|
-
Default engine. Long-running subprocess with streaming JSON I/O. Tested with Claude Code CLI **2.1.
|
|
31
|
+
Default engine. Long-running subprocess with streaming JSON I/O. Tested with Claude Code CLI **2.1.289**.
|
|
32
32
|
|
|
33
33
|
- Persistent multi-turn conversations
|
|
34
34
|
- Real-time streaming (text, tool_use, tool_result, system events)
|
|
@@ -62,7 +62,7 @@ await manager.startSession({
|
|
|
62
62
|
|
|
63
63
|
### OpenAI Codex (`engine: 'codex'`)
|
|
64
64
|
|
|
65
|
-
Wraps the `codex exec` subcommand. Each `send()` spawns a new process. Tested with `codex` CLI **0.
|
|
65
|
+
Wraps the `codex exec` subcommand. Each `send()` spawns a new process. Tested with `codex` CLI **0.160.0**.
|
|
66
66
|
|
|
67
67
|
- Non-interactive execution via `codex exec --sandbox workspace-write --skip-git-repo-check --json`
|
|
68
68
|
- Real `usage` from the `turn.completed` JSON event (input, output, cached, reasoning tokens). **These are cumulative over the thread, not per turn**, so they replace the session totals rather than being added to them; subtracting consecutive values gives one turn's prompt
|
|
@@ -79,8 +79,10 @@ Wraps the `codex exec` subcommand. Each `send()` spawns a new process. Tested wi
|
|
|
79
79
|
- One-shot execution per message (no persistent subprocess between sends)
|
|
80
80
|
- Captures the real Codex thread ID and persists it, so later sends and process-level session resume use `codex exec resume <thread_id>`
|
|
81
81
|
- Working directory passed via `-C` on the first turn
|
|
82
|
-
-
|
|
82
|
+
- Model: with no `model`, codex runs its own default — the `model` in `~/.codex/config.toml` if set. Cost is then priced as the model codex reports it ran (the rollout's `turn_context`; `thread/start` on `codex-app`), and as `gpt-5.5` only when that cannot be read
|
|
83
83
|
- Requires `codex` CLI >= 0.119 (for `exec resume`): `npm install -g @openai/codex`
|
|
84
|
+
- The prompt is sent on stdin (`codex exec … -`), never on the command line.
|
|
85
|
+
- **Windows:** the npm `.cmd` shim launches through `src/engine-spawn.ts` (cross-spawn), which escapes the remaining arguments for `cmd.exe`. Because the prompt is on stdin it arrives unchanged, newlines and quotes included. A timed-out turn ends the whole process tree (`taskkill /T /F`), not only `cmd.exe`.
|
|
84
86
|
- **Does not support `/goal`** — for that, use `engine: 'codex-app'` below
|
|
85
87
|
|
|
86
88
|
```typescript
|
|
@@ -126,7 +128,7 @@ await manager.startSession({
|
|
|
126
128
|
|
|
127
129
|
Wraps Google's **Antigravity CLI** (`agy`) — the successor to Gemini CLI (consumer
|
|
128
130
|
Gemini CLI tiers stopped serving 2026-06-18). Each `send()` spawns a new process
|
|
129
|
-
in print mode. Tested with `agy` **1.2.
|
|
131
|
+
in print mode. Tested with `agy` **1.2.17**.
|
|
130
132
|
|
|
131
133
|
- One-shot execution per message (no persistent subprocess)
|
|
132
134
|
- **Structured output and real usage** — `--output-format stream-json` emits an
|
|
@@ -211,7 +213,7 @@ await manager.startSession({
|
|
|
211
213
|
### Grok Build (`engine: 'grok'`)
|
|
212
214
|
|
|
213
215
|
Wraps xAI's **Grok Build** CLI. Each `send()` spawns `grok -p <msg> --output-format json`, which
|
|
214
|
-
prints a single JSON object and exits. Tested with `grok` **1.0.
|
|
216
|
+
prints a single JSON object and exits. Tested with `grok` **1.0.46**.
|
|
215
217
|
|
|
216
218
|
- **Cost comes from the engine, not from the price table.** The result object carries
|
|
217
219
|
`total_cost_usd`, and the wrapper writes it straight into the session's spend, so the run ledger
|
|
@@ -344,7 +346,7 @@ Wraps the [sst/opencode](https://github.com/sst/opencode) CLI with `run --format
|
|
|
344
346
|
- if the `clawo-readonly` agent fails to load, the turn is refused rather than run with write access
|
|
345
347
|
- to test a change to this config, use adversarial prompts that include asking the agent to delegate; `opencode agent list` shows compiled rules that look the same for a safe and an unsafe agent
|
|
346
348
|
- Requires opencode installed: `brew install sst/tap/opencode` or `npm install -g opencode-ai`. Auth via `opencode auth login` **or** any provider env var (`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GEMINI_API_KEY`, etc.) — opencode picks up either path
|
|
347
|
-
- Binary: `opencode` (set `OPENCODE_BIN` env var to override)
|
|
349
|
+
- Binary: `opencode` (set `OPENCODE_BIN` env var to override). The message is sent on stdin, never on the command line. **Windows:** the npm `.cmd` shim launches through `src/engine-spawn.ts` (cross-spawn), as for codex above.
|
|
348
350
|
|
|
349
351
|
```typescript
|
|
350
352
|
await manager.startSession({
|
|
@@ -351,16 +351,16 @@ Run one task across N engine/model agents **in parallel** and collect their answ
|
|
|
351
351
|
|
|
352
352
|
### `fanout_start`
|
|
353
353
|
|
|
354
|
-
| Parameter | Type | Required | Description
|
|
355
|
-
| ------------------------------------ | ------- | -------- |
|
|
356
|
-
| `task` | string | yes | Shared task sent to every agent, optionally after its `persona`.
|
|
357
|
-
| `projectDir` | string | yes | Working directory all agents run in.
|
|
354
|
+
| Parameter | Type | Required | Description |
|
|
355
|
+
| ------------------------------------ | ------- | -------- | --------------------------------------------------------------------------------------------------------- |
|
|
356
|
+
| `task` | string | yes | Shared task sent to every agent, optionally after its `persona`. |
|
|
357
|
+
| `projectDir` | string | yes | Working directory all agents run in. |
|
|
358
358
|
| `agents` | array | yes | Specs: `{ name, engine?, model?, effort?, prompt?, persona?, baseUrl?, permissionMode?, customEngine? }`. |
|
|
359
|
-
| `synthesize` | boolean | | Run a final synthesis pass over the successful results (needs ≥2).
|
|
360
|
-
| `synthesisModel` / `synthesisEngine` | string | | Model/engine for the synthesis pass (default engine `claude`).
|
|
361
|
-
| `agentTimeoutMs` | number | | Per-agent timeout (default 600000).
|
|
362
|
-
| `maxTurnsPerAgent` | number | | Max agent loop turns (default 30).
|
|
363
|
-
| `maxBudgetUsd` | number | | Per-agent spend cap.
|
|
359
|
+
| `synthesize` | boolean | | Run a final synthesis pass over the successful results (needs ≥2). |
|
|
360
|
+
| `synthesisModel` / `synthesisEngine` | string | | Model/engine for the synthesis pass (default engine `claude`). |
|
|
361
|
+
| `agentTimeoutMs` | number | | Per-agent timeout (default 600000). |
|
|
362
|
+
| `maxTurnsPerAgent` | number | | Max agent loop turns (default 30). |
|
|
363
|
+
| `maxBudgetUsd` | number | | Per-agent spend cap. |
|
|
364
364
|
|
|
365
365
|
Runs in the background; returns `{ ok, id, status, ... }`. Poll with `fanout_status`.
|
|
366
366
|
Each agent's optional `effort` accepts `low`, `medium`, `high`, `xhigh`, `max`,
|
|
@@ -578,25 +578,25 @@ Three-agent autonomous iteration loop (Planner / Coder / Reviewer) over a git wo
|
|
|
578
578
|
|
|
579
579
|
Start a chat-mode autoloop. Planner starts immediately; Coder + Reviewer start only after the Planner receives plan approval and emits `spawn_subagents`.
|
|
580
580
|
|
|
581
|
-
| Parameter | Type
|
|
582
|
-
| -------------------------- |
|
|
583
|
-
| `run_id` | string
|
|
584
|
-
| `workspace` | string
|
|
585
|
-
| `planner_engine` | EngineType
|
|
586
|
-
| `planner_model` | string
|
|
581
|
+
| Parameter | Type | Required | Description |
|
|
582
|
+
| -------------------------- | ----------- | -------- | ------------------------------------------------------------------------------------------------ |
|
|
583
|
+
| `run_id` | string | yes | Stable run identifier |
|
|
584
|
+
| `workspace` | string | yes | Git workspace path |
|
|
585
|
+
| `planner_engine` | EngineType | | Planner engine (default `claude`) |
|
|
586
|
+
| `planner_model` | string | | Planner model (Claude default `opus`; other engines use their own default when omitted) |
|
|
587
587
|
| `planner_effort` | EffortLevel | | Fixed Planner reasoning effort; omission keeps the session default |
|
|
588
|
-
| `planner_custom_engine` | object
|
|
589
|
-
| `coder_engine` | EngineType
|
|
590
|
-
| `coder_model` | string
|
|
588
|
+
| `planner_custom_engine` | object | | Trusted `CustomEngineConfig` when Planner engine is `custom`. **Local callers only** — see below |
|
|
589
|
+
| `coder_engine` | EngineType | | Default Coder engine (default `claude`) |
|
|
590
|
+
| `coder_model` | string | | Default Coder model (Claude default `sonnet`) |
|
|
591
591
|
| `coder_effort` | EffortLevel | | Fixed Coder reasoning effort; omission keeps the session default |
|
|
592
|
-
| `coder_custom_engine` | object
|
|
593
|
-
| `reviewer_engine` | EngineType
|
|
594
|
-
| `reviewer_model` | string
|
|
592
|
+
| `coder_custom_engine` | object | | Trusted config when Coder may use `custom`. **Local callers only** |
|
|
593
|
+
| `reviewer_engine` | EngineType | | Default Reviewer engine (default `claude`) |
|
|
594
|
+
| `reviewer_model` | string | | Default Reviewer model (Claude default `sonnet`) |
|
|
595
595
|
| `reviewer_effort` | EffortLevel | | Fixed Reviewer reasoning effort; omission keeps the session default |
|
|
596
|
-
| `reviewer_custom_engine` | object
|
|
597
|
-
| `send_timeout_ms` | number
|
|
598
|
-
| `activity_lease_ms` | number
|
|
599
|
-
| `autoloop_hard_timeout_ms` | number
|
|
596
|
+
| `reviewer_custom_engine` | object | | Trusted config when Reviewer may use `custom`. **Local callers only** |
|
|
597
|
+
| `send_timeout_ms` | number | | Per-agent send cap in ms (default 600000; inclusive 5000–7200000) |
|
|
598
|
+
| `activity_lease_ms` | number | | Inactivity lease in ms (default 1800000; inclusive 60000–7200000) |
|
|
599
|
+
| `autoloop_hard_timeout_ms` | number | | Absolute run cap in ms (default 86400000; inclusive 600000–259200000) |
|
|
600
600
|
|
|
601
601
|
> **Custom engines are local-only.** A `CustomEngineConfig` names an executable to
|
|
602
602
|
> spawn plus its argv and env, so it may only be supplied by a caller that already
|