openclaw-code-agent 3.1.0 → 3.2.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 +69 -10
- package/dist/index.js +191 -106
- package/openclaw.plugin.json +1 -1
- package/package.json +28 -10
- package/skills/code-agent-orchestration/SKILL.md +114 -144
package/README.md
CHANGED
|
@@ -9,22 +9,61 @@
|
|
|
9
9
|
- **Plan -> Review -> Execute**. `plan` is the default launch mode, with `ask`, `delegate`, and `approve` deciding how much plan approval autonomy the orchestrator gets.
|
|
10
10
|
- **Optional worktree isolation**. New sessions default to `off`; opt into `ask`, `delegate`, `auto-merge`, or `auto-pr` when you want worktree-backed branch isolation and post-run branch handling.
|
|
11
11
|
- **State-driven decision UX**. `ask` sends explicit action buttons for **Merge locally**, **Create PR**, **Decide later**, and **Dismiss**. The same action-token model now backs both Telegram and Discord interactive callbacks.
|
|
12
|
+
- **Lifecycle-first cleanup**. Worktrees are treated as temporary task sandboxes. The plugin distinguishes `merged` from `released` so different-SHA branches whose content already landed on the base branch can still be cleaned safely.
|
|
12
13
|
- **Full session lifecycle**. Suspend, resume, fork, interrupt, and recover sessions across restarts with persisted metadata and output.
|
|
14
|
+
- **Explicit goal-task loops**. Opt into verifier-driven repair loops or Ralph-style completion loops when you need iterative autonomous execution toward a specific goal.
|
|
13
15
|
- **Real operator visibility**. `agent_sessions`, `agent_output`, and `agent_stats` show status, buffered output, duration, and USD cost.
|
|
14
16
|
- **Two harnesses, one control plane**. Claude Code and Codex share the same tools, routing, notification pipeline, and worktree strategy model while each backend uses its own native execution substrate.
|
|
15
17
|
- **One continuation primitive**. `agent_respond` is the only way to continue, approve, revise, or redirect an existing session. Forks still go through `agent_launch(..., resume_session_id=..., fork_session=true)`.
|
|
16
18
|
|
|
17
19
|
Need the version-pinned ACP breakdown? See [docs/ACP-COMPARISON.md](docs/ACP-COMPARISON.md).
|
|
18
20
|
|
|
21
|
+
## New In 3.2.0
|
|
22
|
+
|
|
23
|
+
`3.2.0` is the release that makes the newer worktree and plan-review model feel reliable enough for daily use.
|
|
24
|
+
|
|
25
|
+
- **Deterministic completion and approval state**. Terminal notifications and wakes no longer depend on transcript-style summary heuristics, and plan-gated sessions now surface explicit approval/execution state for operators and orchestration logic.
|
|
26
|
+
- **Real auto-merge conflict recovery**. `auto-merge` now gets one autonomous conflict-resolution attempt, then retries the merge automatically before escalating back to a preserved branch or PR path.
|
|
27
|
+
- **Lifecycle-first worktree cleanup**. Worktree status and cleanup now treat `released` as a first-class resolved state, so rebased, squashed, and cherry-picked work can still be identified and cleaned safely.
|
|
28
|
+
- **Safer repository follow-through**. Worktree disk-space validation now checks the correct filesystem on first run and for custom worktree directories, and cross-repo PR auto-targeting now works for upstream-only repos.
|
|
29
|
+
- **Stronger release hygiene**. The repo now standardizes on `pnpm` validation, and release automation validates `package.json`, `openclaw.plugin.json`, and the release version together before publish.
|
|
30
|
+
|
|
19
31
|
## From Prompt To Merged Branch
|
|
20
32
|
|
|
21
33
|
1. Launch a coding session from chat with `/agent ...` or `agent_launch(...)`.
|
|
22
34
|
2. Review the plan in the same thread before anything touches the repo.
|
|
23
35
|
3. Let the agent finish in an isolated worktree, then merge or publish the result from chat.
|
|
24
36
|
|
|
37
|
+
### Explicit Goal Tasks
|
|
38
|
+
|
|
39
|
+
Goal tasks are an explicit opt-in path for iterative autonomous work. They do not replace the default `agent_launch` flow.
|
|
40
|
+
|
|
41
|
+
Use the dedicated goal entrypoints:
|
|
42
|
+
|
|
43
|
+
- `/goal ...`
|
|
44
|
+
- `goal_launch(...)`
|
|
45
|
+
|
|
46
|
+
The plugin does not automatically switch into goal mode just because a freeform prompt contains the words `goal task`.
|
|
47
|
+
|
|
48
|
+
Use them when you want the plugin to keep looping toward one concrete outcome:
|
|
49
|
+
|
|
50
|
+
- **Verifier mode** reruns one or more shell checks after each coding turn and keeps iterating until they pass or the iteration budget is exhausted.
|
|
51
|
+
- **Ralph mode** keeps resuming the same task until the agent emits an exact completion promise, with optional verifiers run after completion is claimed.
|
|
52
|
+
|
|
53
|
+
Examples:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
/goal --workdir /repo --verify "npm test" --verify "npm run lint" Fix the failing auth flow
|
|
57
|
+
/goal --workdir /repo --mode ralph --completion-promise DONE Ship the draft blog post workflow end to end
|
|
58
|
+
goal_launch(goal="Fix the failing auth flow", verifier_commands=["npm test", "npm run lint"], workdir="/repo")
|
|
59
|
+
goal_launch(goal="Ship the draft blog post workflow end to end", goal_mode="ralph", completion_promise="DONE", workdir="/repo")
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Once launched, use `goal_status` / `/goal_status` to inspect progress and `goal_stop` / `/goal_stop` to terminate the loop. Goal-task state is persisted so recoverable loops can resume after a gateway restart.
|
|
63
|
+
|
|
25
64
|
### Plan First
|
|
26
65
|
|
|
27
|
-
The differentiator is the plan-review loop. Claude Code and Codex both feed the same review UX now: the plugin receives a structured plan artifact, keeps execution blocked until approval, and resumes the same session with `agent_respond(..., approve=true)`.
|
|
66
|
+
The differentiator is the plan-review loop. Claude Code and Codex both feed the same review UX now: the plugin receives a structured plan artifact, keeps execution blocked until approval, and resumes the same session with `agent_respond(..., approve=true)`. If the user asks for revisions, the revised submission becomes the new actionable review version for that same session, and `approve=true` resolves against that latest version instead of any stale earlier change-request state.
|
|
28
67
|
|
|
29
68
|
<img src="assets/ask-readme.gif" alt="Plan review in ask mode with inline approval controls">
|
|
30
69
|
|
|
@@ -38,6 +77,20 @@ When the task is done, the plugin can leave the branch for review, merge it auto
|
|
|
38
77
|
|
|
39
78
|
*The main checkout stays clean. The branch lifecycle happens in the worktree, and the chat thread stays current on what was shipped.*
|
|
40
79
|
|
|
80
|
+
### Worktree Lifecycle
|
|
81
|
+
|
|
82
|
+
Worktree-backed sessions move through product-facing lifecycle states:
|
|
83
|
+
|
|
84
|
+
- `active`: sandbox still in use
|
|
85
|
+
- `pending decision`: waiting for merge / PR / dismiss follow-through
|
|
86
|
+
- `pr_open`: PR exists and the sandbox is being preserved
|
|
87
|
+
- `merged`: branch landed by normal git ancestry
|
|
88
|
+
- `released`: content is already on the base branch even though branch SHAs differ after rebase, squash, or cherry-pick
|
|
89
|
+
- `dismissed`: user intentionally discarded the sandbox
|
|
90
|
+
- `no_change`: session finished without a committed delta
|
|
91
|
+
|
|
92
|
+
For cleanup, use `agent_worktree_cleanup(mode="preview_safe")` to preview what **Clean all safe** would remove, `mode="clean_safe"` to perform that cleanup, and `mode="preview_all"` to review both safe sandboxes and the reasons other worktrees were retained.
|
|
93
|
+
|
|
41
94
|
## Supported Harnesses
|
|
42
95
|
|
|
43
96
|
| Harness | Status | Notes |
|
|
@@ -57,6 +110,8 @@ openclaw plugins enable openclaw-code-agent
|
|
|
57
110
|
openclaw gateway restart
|
|
58
111
|
```
|
|
59
112
|
|
|
113
|
+
This release targets the OpenClaw `v2026.4.9` external plugin contract. `package.json` now carries the plugin API compatibility and build metadata used by modern OpenClaw / ClawHub installs, so keep those fields in sync when bumping the plugin release baseline.
|
|
114
|
+
|
|
60
115
|
Add a minimal config block under `plugins.entries["openclaw-code-agent"]` in `~/.openclaw/openclaw.json`:
|
|
61
116
|
|
|
62
117
|
```json
|
|
@@ -110,14 +165,15 @@ For multi-workspace or multi-bot setups, configure `agentChannels`. The full rou
|
|
|
110
165
|
|
|
111
166
|
Prefer fully routable channel strings such as `telegram|123456789` or `telegram|my-bot|123456789`. A bare provider like `telegram` is only a weak fallback; the plugin now repairs topic routing from `originSessionKey` when possible, but explicit channels are still the safer default.
|
|
112
167
|
|
|
113
|
-
### Upgrade Note For 3.
|
|
168
|
+
### Upgrade Note For 3.2.0
|
|
114
169
|
|
|
115
|
-
`3.1.0
|
|
170
|
+
If you are upgrading from `3.1.0`, the important behavioral changes are:
|
|
116
171
|
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
172
|
+
- `defaultWorktreeStrategy` is back to `off`, so worktree isolation remains opt-in unless you configure it explicitly.
|
|
173
|
+
- `auto-merge` now attempts one autonomous conflict resolution before escalating.
|
|
174
|
+
- Completion wakes and no-change outcomes are deterministic and carry explicit approval/execution state instead of relying on transcript inference.
|
|
175
|
+
- Worktree cleanup is lifecycle-first and can now classify already-landed branches as `released`, which makes `preview_safe` and `clean_safe` more trustworthy after rebase, squash, or cherry-pick flows.
|
|
176
|
+
- Release validation now checks package/plugin version parity in addition to the normal `pnpm verify` gate.
|
|
121
177
|
|
|
122
178
|
### Backend Capabilities
|
|
123
179
|
|
|
@@ -138,10 +194,13 @@ Prefer fully routable channel strings such as `telegram|123456789` or `telegram|
|
|
|
138
194
|
| `agent_stats` | Show aggregate usage and cost |
|
|
139
195
|
| `agent_merge` | Merge a worktree branch back to base |
|
|
140
196
|
| `agent_pr` | Create or update a GitHub PR |
|
|
141
|
-
| `agent_worktree_status` | Show
|
|
142
|
-
| `agent_worktree_cleanup` | Clean
|
|
197
|
+
| `agent_worktree_status` | Show authoritative lifecycle state, derived repo evidence, cleanup safety, and retained reasons |
|
|
198
|
+
| `agent_worktree_cleanup` | Clean all lifecycle-safe worktrees or dismiss one pending decision without touching live/unsafe worktrees |
|
|
199
|
+
| `goal_launch` | Start an explicit verifier or Ralph-style goal loop |
|
|
200
|
+
| `goal_status` | Show one goal task or list all goal tasks |
|
|
201
|
+
| `goal_stop` | Stop a running goal task |
|
|
143
202
|
|
|
144
|
-
The chat command surface mirrors the common workflows: `/agent`, `/agent_sessions`, `/agent_output`, `/agent_respond`, `/agent_kill`, and `/
|
|
203
|
+
The chat command surface mirrors the common workflows: `/agent`, `/agent_sessions`, `/agent_output`, `/agent_respond`, `/agent_kill`, `/agent_stats`, `/goal`, `/goal_status`, and `/goal_stop`.
|
|
145
204
|
|
|
146
205
|
## Docs
|
|
147
206
|
|