@enderfga/claw-orchestrator 6.4.0 → 7.0.0
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 +19 -4
- package/dist/bin/mcp-server.js +5 -3
- package/dist/bin/mcp-server.js.map +1 -1
- package/dist/src/autoloop/dispatcher.d.ts +37 -3
- package/dist/src/autoloop/dispatcher.js +171 -30
- package/dist/src/autoloop/dispatcher.js.map +1 -1
- package/dist/src/autoloop/messages.d.ts +19 -1
- package/dist/src/autoloop/messages.js +4 -0
- package/dist/src/autoloop/messages.js.map +1 -1
- package/dist/src/autoloop/runner.d.ts +57 -2
- package/dist/src/autoloop/runner.js +260 -26
- package/dist/src/autoloop/runner.js.map +1 -1
- package/dist/src/autoloop/types.d.ts +62 -2
- package/dist/src/autoloop/types.js +63 -0
- package/dist/src/autoloop/types.js.map +1 -1
- package/dist/src/embedded-server.d.ts +8 -0
- package/dist/src/embedded-server.js +65 -4
- package/dist/src/embedded-server.js.map +1 -1
- package/dist/src/index.d.ts +9 -7
- package/dist/src/index.js +120 -80
- package/dist/src/index.js.map +1 -1
- package/dist/src/kernel/engine.js +19 -14
- package/dist/src/kernel/engine.js.map +1 -1
- package/dist/src/models.js +16 -4
- package/dist/src/models.js.map +1 -1
- package/dist/src/persistent-agy-session.d.ts +4 -2
- package/dist/src/persistent-agy-session.js +12 -3
- package/dist/src/persistent-agy-session.js.map +1 -1
- package/dist/src/persistent-session.js +11 -1
- package/dist/src/persistent-session.js.map +1 -1
- package/dist/src/session-manager.d.ts +6 -0
- package/dist/src/session-manager.js +246 -13
- package/dist/src/session-manager.js.map +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/skills/SKILL.md +1 -1
- package/skills/references/autoloop.md +34 -3
- package/skills/references/claude-cli-tracking.md +2 -1
- package/skills/references/multi-engine.md +14 -2
- package/skills/references/tools.md +24 -3
|
@@ -36,6 +36,12 @@ Default engine. Long-running subprocess with streaming JSON I/O. Tested with Cla
|
|
|
36
36
|
- Full cost tracking from API usage data
|
|
37
37
|
- Cross-session peer messaging (`crossSessionInbound`): sets this session's policy for messages sent from other Claude Code sessions on the same machine — `accept` delivers straight in, `hold` waits for a human to approve it in that session's terminal, `refuse` rejects it. There is no CLI flag for this; it is a settings key, delivered through the `--settings` merge. Worth setting explicitly for orchestrated sessions: with no value the CLI decides from the two sides' permission modes and holds when they differ, and an orchestrated session (`bypassPermissions` / `acceptEdits`) versus a human terminal (prompting) is exactly that case — so the message parks waiting for approval in a terminal nobody is watching. Sessions started by the orchestrator do register as addressable peers and do receive messages (verified against 2.1.232 by sending to a live one and getting a reply). Note that a user-level `~/.claude/settings.json` value may take precedence over the per-session one; only the `accept` path has been confirmed end-to-end here.
|
|
38
38
|
- Hook lifecycle events (`includeHookEvents`), subagent output forwarding (`forwardSubagentText`), permission delegation (`permissionPromptTool`), prompt cache optimization (`bare` + `excludeDynamicSystemPromptSections` + `enablePromptCaching1H`), debug control, `--from-pr` resume, and MCP channel subscriptions
|
|
39
|
+
- `--permission-prompts none` is passed whenever no `permissionPromptTool` is configured (CLI
|
|
40
|
+
2.1.259+). This spawn shape has no TTY and, without a prompt tool, no host to answer a permission
|
|
41
|
+
prompt — so before this a tool call the permission mode did not already decide sat waiting for an
|
|
42
|
+
answer that could never come, until the turn timeout. `none` denies it instead; the model sees the
|
|
43
|
+
denial and can adapt, and the permission mode still decides everything else. With a prompt tool
|
|
44
|
+
configured the CLI's default (`host`) is left in place so the tool is asked
|
|
39
45
|
- `restricted` → `--restricted` (CLI 2.1.249+): removes the command- and code-running tools and
|
|
40
46
|
`WebFetch` from the session, and ignores user/project/local settings files. Not folded into
|
|
41
47
|
`sandboxMode: 'read-only'`, which maps to plan mode — measured against 2.1.251, plan mode alone
|
|
@@ -99,7 +105,7 @@ Wraps `codex app-server --listen stdio:// --enable goals` as a long-running JSON
|
|
|
99
105
|
- Cumulative token tracking from `thread/tokenUsage/updated` notifications. The same notification's `last` breakdown and `modelContextWindow` drive `contextPercent`, so it reports live occupancy against the window the server actually enforces (258,400 on 0.147.0) rather than a running total over the model's published window
|
|
100
106
|
- Goal lifecycle observation via `thread/goal/updated` and `thread/goal/cleared` notifications
|
|
101
107
|
- Goal control via the `codex_goal_*` tools (which internally send the `/goal` slash command as user text — see [tools.md](./tools.md#codex-13))
|
|
102
|
-
- v2 RPC tools (Codex 0.137): `codex_interrupt` (`turn/interrupt`), `codex_steer` (`turn/steer`), `codex_fork` (`thread/fork`), `codex_rollback` (`thread/rollback`), `codex_models` (`model/list`), `
|
|
108
|
+
- v2 RPC tools (Codex 0.137): `codex_interrupt` (`turn/interrupt`), `codex_steer` (`turn/steer`), `codex_fork` (`thread/fork`), `codex_rollback` (`thread/rollback`), `codex_models` (`model/list`), `codex_thread_list` (`thread/list`). A `turn/completed` with `status: 'failed'` rejects the turn and increments `toolErrors`.
|
|
103
109
|
- Thread resume: starting with `resumeSessionId` loads the existing thread via `thread/resume` instead of `thread/start`.
|
|
104
110
|
|
|
105
111
|
> **Feature-flag risk.** The `goals` feature is marked "under development" in Codex 0.128.0 and has known bugs (e.g. issue #20591). The session class always passes `--enable goals` so it works the moment upstream stabilizes the feature, but during the transition period some goal commands may fail or be silently dropped on the server side. The wrapper layer is unaffected.
|
|
@@ -135,7 +141,7 @@ in print mode. Verified against `agy` **1.1.13**.
|
|
|
135
141
|
`getStats().agyConversationId`.
|
|
136
142
|
- **Reasoning effort**: session `effort` and per-turn `session_send` overrides map
|
|
137
143
|
to `--effort`. agy accepts `low`, `medium`, and `high`; everything above that
|
|
138
|
-
(`xhigh`, `max`, `ultra`) clamps to `high`. agy 1.1.
|
|
144
|
+
(`xhigh`, `max`, `ultra`) clamps to `high`. agy 1.1.25 requires an effort with unsuffixed base
|
|
139
145
|
slugs such as `gemini-3.7-flash`, so `auto` resolves those to `high`; a model
|
|
140
146
|
already ending in `-low`, `-medium`, or `-high` keeps that qualified effort.
|
|
141
147
|
Per-turn overrides also work with qualified slugs: the adapter removes a
|
|
@@ -223,6 +229,12 @@ plan`. It refuses a direct write and a shell write, then loses to the third prom
|
|
|
223
229
|
`--no-subagents`, the obvious next probe, deliberately not wired: the run that would have
|
|
224
230
|
confirmed it hit the account's free-tier limit, and a probe that fails for lack of quota writes no
|
|
225
231
|
file either. A read-only grok session throws rather than running writable under a read-only label.
|
|
232
|
+
- **On a spent free tier, `grok -p` can hang silently instead of erroring.** Earlier in the same
|
|
233
|
+
session it printed a usage-limit message to stderr and exited 1; later invocations produced nothing
|
|
234
|
+
on either stream and never exited — in any directory, with or without `--no-leader`. The session's
|
|
235
|
+
turn timeout is what ends such a turn, so a caller on that tier pays the full timeout before seeing
|
|
236
|
+
a failure. Nothing in this wrapper can distinguish that hang from a slow turn; check `grok -p` by
|
|
237
|
+
hand when a grok session times out with no output.
|
|
226
238
|
- Binary: `grok` (set `GROK_BIN` to override). Not `agent`: xAI's installer claims that name too,
|
|
227
239
|
and so did Cursor's.
|
|
228
240
|
- Requires Grok Build: see `x.ai/cli`.
|
|
@@ -43,7 +43,7 @@ Start a persistent coding session with full CLI flag support.
|
|
|
43
43
|
| `crossSessionInbound` | string | `accept` / `hold` / `refuse` — policy for peer messages from other Claude Code sessions on this machine (Claude engine). Delivered as a settings key; there is no CLI flag. Without it the CLI holds messages whose two sides run different permission modes, which is the usual orchestrated-session-to-human-terminal case |
|
|
44
44
|
| `includeHookEvents` | boolean | Stream hook lifecycle events (PreToolUse/PostToolUse) as `system` events |
|
|
45
45
|
| `forwardSubagentText` | boolean | Forward subagent text and thinking into the output stream (Claude engine, CLI 2.1.211+). Without it the parent stream stays quiet while a subagent works |
|
|
46
|
-
| `permissionPromptTool` | string | MCP tool name to delegate permission prompts to (non-interactive use)
|
|
46
|
+
| `permissionPromptTool` | string | MCP tool name to delegate permission prompts to (non-interactive use) When omitted, the session runs with `--permission-prompts none`: a prompt nobody could answer is denied rather than left waiting until the turn timeout. |
|
|
47
47
|
| `excludeDynamicSystemPromptSections` | boolean | Move cwd/env/git context from system prompt to user message for better prompt cache hits; auto-enabled with `bare: true` |
|
|
48
48
|
| `enablePromptCaching1H` | boolean | Enable 1-hour prompt cache TTL (vs default 5-min); auto-enabled with `bare: true` |
|
|
49
49
|
| `debug` | string | Debug categories to enable (comma-separated, e.g. `"api,mcp"`) |
|
|
@@ -300,7 +300,7 @@ Codex app-server v2 RPCs (require `engine: "codex-app"`). Method names + param s
|
|
|
300
300
|
| `codex_fork` | `thread/fork` | `name` | `{ ok, threadId }` — branches the thread; returns the forked id |
|
|
301
301
|
| `codex_rollback` | `thread/rollback` | `name`, `numTurns` | `{ ok, numTurns }` — drops the last N turns |
|
|
302
302
|
| `codex_models` | `model/list` | `name` | `{ ok, models }` — incl. each model's `supportedReasoningEfforts` |
|
|
303
|
-
| `
|
|
303
|
+
| `codex_thread_list` | `thread/list` | `name`, `searchTerm?`, `cwd?`, `archived?`, `cursor?`, `limit?` | `{ ok, data, nextCursor }` — list threads with filters + pagination |
|
|
304
304
|
|
|
305
305
|
To **resume** a codex-app thread, start a session with `engine: "codex-app"` and
|
|
306
306
|
`resumeSessionId: "<threadId>"` — it loads the existing thread via `thread/resume` instead of
|
|
@@ -557,7 +557,9 @@ Start a chat-mode autoloop. Planner starts immediately; Coder + Reviewer start o
|
|
|
557
557
|
| `reviewer_engine` | EngineType | | Default Reviewer engine (default `claude`) |
|
|
558
558
|
| `reviewer_model` | string | | Default Reviewer model (Claude default `sonnet`) |
|
|
559
559
|
| `reviewer_custom_engine` | object | | Trusted config when Reviewer may use `custom`. **Local callers only** |
|
|
560
|
-
| `send_timeout_ms` | number | | Per-
|
|
560
|
+
| `send_timeout_ms` | number | | Per-agent send cap in ms (default 600000; inclusive 5000–7200000) |
|
|
561
|
+
| `activity_lease_ms` | number | | Inactivity lease in ms (default 1800000; inclusive 60000–7200000) |
|
|
562
|
+
| `autoloop_hard_timeout_ms` | number | | Absolute run cap in ms (default 86400000; inclusive 600000–259200000) |
|
|
561
563
|
|
|
562
564
|
> **Custom engines are local-only.** A `CustomEngineConfig` names an executable to
|
|
563
565
|
> spawn plus its argv and env, so it may only be supplied by a caller that already
|
|
@@ -587,6 +589,25 @@ Start a chat-mode autoloop. Planner starts immediately; Coder + Reviewer start o
|
|
|
587
589
|
|
|
588
590
|
Custom configs are not persisted or accepted from Planner output. See [`multi-engine.md`](./multi-engine.md) for their shape.
|
|
589
591
|
|
|
592
|
+
The three timeout controls form a hierarchy. `send_timeout_ms` caps one
|
|
593
|
+
Planner, Coder, or Reviewer delivery. A genuine send timeout is not retried:
|
|
594
|
+
the run pauses in `awaiting_resume` with a stable pending dispatch identity.
|
|
595
|
+
`activity_lease_ms` bounds inactivity and is renewed only by validated user or
|
|
596
|
+
agent progress, never by timer checks or runner bookkeeping.
|
|
597
|
+
`autoloop_hard_timeout_ms` is anchored to run start and never renews; it wins
|
|
598
|
+
when it coincides with lease expiry.
|
|
599
|
+
|
|
600
|
+
Recovery is exposed by `POST /autoloop/<id>/resume`, not by an MCP resume tool.
|
|
601
|
+
Its timeout body is limited to `send_timeout_ms` plus
|
|
602
|
+
`pending_dispatch_id`. The send timeout must be finite, in range, and strictly
|
|
603
|
+
larger than the run's latest effective value (legacy baseline: 600000). Equal
|
|
604
|
+
or smaller values are rejected, and there is deliberately no
|
|
605
|
+
`allow_decrease`. Lease and hard-cap overrides are not accepted on resume.
|
|
606
|
+
Each successful increase appends one migration row to `decisions.jsonl`; the
|
|
607
|
+
original run spec, history, and prior audit bytes are not rewritten. The
|
|
608
|
+
matching live awaiting-resume condition is advanced without replaying the
|
|
609
|
+
timed-out logical dispatch.
|
|
610
|
+
|
|
590
611
|
### `autoloop_chat`
|
|
591
612
|
|
|
592
613
|
Send a message into the Planner conversation.
|