openclaw-code-agent 4.1.0 → 4.1.1
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 +24 -11
- package/dist/index.js +158 -156
- package/openclaw.plugin.json +35 -12
- package/package.json +10 -7
package/README.md
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
`openclaw-code-agent` is the OpenClaw plugin for running Claude Code and Codex as managed background coding sessions from chat. Launch work from Telegram, Discord, or any OpenClaw-supported channel, review the plan before execution, keep the job isolated in its own git worktree, and merge or open a PR without leaving the thread.
|
|
8
8
|
|
|
9
|
-
- **Plan -> Review -> Execute**. `plan` is the default launch mode,
|
|
10
|
-
- **
|
|
9
|
+
- **Plan -> Review -> Execute**. `plan` is the default launch mode, and plan approval defaults to `delegate` so the orchestrator reviews the full plan before approving or escalating to the user.
|
|
10
|
+
- **Delegated worktree isolation**. New sessions default to `delegate`; opt into `ask`, `off`, `manual`, `auto-merge`, or `auto-pr` when you want a different branch follow-through policy.
|
|
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
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.
|
|
13
13
|
- **Full session lifecycle**. Suspend, resume, fork, interrupt, and recover sessions across restarts with persisted metadata and output.
|
|
@@ -28,14 +28,14 @@ Need the ACPX vs Codex vs code-agent breakdown? See [docs/ACP-COMPARISON.md](doc
|
|
|
28
28
|
|
|
29
29
|
The shared substrate is often the local `codex` command and Codex App Server, but the responsibilities are different. This plugin is not an ACP server and it does not depend on OpenClaw's bundled Codex provider to expose its own `codex` harness.
|
|
30
30
|
|
|
31
|
-
## New In 4.1.
|
|
31
|
+
## New In 4.1.1
|
|
32
32
|
|
|
33
|
-
`4.1.
|
|
33
|
+
`4.1.1` is the OpenClaw `2026.5.4` compatibility patch. It keeps the `4.1.0` managed-lifecycle and notification reliability work intact, preserves the `>=2026.4.21` compatibility floor, and aligns harness model/thinking behavior with the newer OpenClaw release line.
|
|
34
34
|
|
|
35
35
|
- **Managed TaskFlow lifecycle**. When the current OpenClaw runtime exposes managed TaskFlow APIs, code-agent sessions now create, update, wait, and finalize a gateway-owned flow record; older runtimes fall back cleanly without changing session behavior.
|
|
36
36
|
- **Deterministic runtime state**. Completion and no-change paths now surface canonical approval/runtime state instead of asking operators to infer it from transcript text.
|
|
37
37
|
- **Notification delivery reliability**. Direct notification timeouts, fallback failures, and completion-delivery diagnostics are handled explicitly so failed delivery is visible instead of silently hanging.
|
|
38
|
-
- **Verified OpenClaw target**. Local build/test metadata targets stable OpenClaw `2026.4
|
|
38
|
+
- **Verified OpenClaw target**. Local build/test metadata targets stable OpenClaw `2026.5.4` while keeping the minimum compatibility floor at `>=2026.4.21`.
|
|
39
39
|
|
|
40
40
|
## From Prompt To Merged Branch
|
|
41
41
|
|
|
@@ -119,11 +119,14 @@ Install and enable the plugin:
|
|
|
119
119
|
openclaw plugins install openclaw-code-agent
|
|
120
120
|
openclaw plugins enable openclaw-code-agent
|
|
121
121
|
openclaw gateway restart
|
|
122
|
+
openclaw plugins inspect openclaw-code-agent --runtime --json
|
|
122
123
|
```
|
|
123
124
|
|
|
124
125
|
Restart or reload the gateway only as part of your normal install/upgrade flow; it is not needed for editing docs or preparing a release branch.
|
|
125
126
|
|
|
126
|
-
This release targets the OpenClaw `v2026.4.21` external plugin contract and is verified against the stable `v2026.4
|
|
127
|
+
This release targets the OpenClaw `v2026.4.21` external plugin contract and is verified against the stable `v2026.5.4` build/test target. `package.json` carries the plugin API compatibility and build metadata used by modern OpenClaw / ClawHub installs, and `openclaw.plugin.json` advertises the plugin-owned startup, command activation surface, tool contracts, and onboarding metadata OpenClaw uses during plugin-config setup. Keep those metadata surfaces in sync when bumping the plugin release baseline.
|
|
128
|
+
|
|
129
|
+
After install or update, inspect the runtime plugin view after the gateway restart. The runtime inspection should show the chat commands, service, and `agent_*` / `goal_*` tools without diagnostics. If `tools.effective` or `tools.invoke` cannot see `agent_launch` or `agent_sessions`, the installed plugin is stale or the gateway has not restarted onto the updated manifest and bundle.
|
|
127
130
|
|
|
128
131
|
The current manifest descriptors stay intentionally narrow: activation advertises startup loading plus only the chat commands this plugin owns, and setup stays minimal with `requiresRuntime: false`. First-run onboarding is driven by the manifest config schema and `uiHints`, not by provider/backend setup descriptors.
|
|
129
132
|
|
|
@@ -131,11 +134,11 @@ The current manifest descriptors stay intentionally narrow: activation advertise
|
|
|
131
134
|
|
|
132
135
|
In OpenClaw's Manual setup flow, the plugin should only ask for three first-run decisions:
|
|
133
136
|
|
|
134
|
-
- `defaultWorkdir`: the repo
|
|
137
|
+
- `defaultWorkdir`: the git repo path you expect to launch from most often
|
|
135
138
|
- `defaultHarness`: whether your default harness is `claude-code` or `codex`
|
|
136
139
|
- `fallbackChannel`: an optional but recommended fully routable notification target for async updates
|
|
137
140
|
|
|
138
|
-
Everything else stays advanced/manual. In particular, `agentChannels`, per-harness model policy, permission defaults, and worktree policy are intentionally deferred until after the first successful launch.
|
|
141
|
+
Everything else stays advanced/manual. In particular, `agentChannels`, per-harness model policy, permission defaults, and worktree policy are intentionally deferred until after the first successful launch, even though plan approval and worktree follow-through now default to delegated behavior. If your first launch must run outside a git repo, expand Advanced during setup or edit config afterwards and set `defaultWorktreeStrategy` to `off`.
|
|
139
142
|
|
|
140
143
|
Add a minimal config block under `plugins.entries["openclaw-code-agent"]` in `~/.openclaw/openclaw.json`:
|
|
141
144
|
|
|
@@ -170,8 +173,10 @@ Add a minimal config block under `plugins.entries["openclaw-code-agent"]` in `~/
|
|
|
170
173
|
You can leave the advanced settings at their defaults for the first run. The plugin defaults to:
|
|
171
174
|
|
|
172
175
|
- `permissionMode: "plan"`
|
|
173
|
-
- `planApproval: "
|
|
174
|
-
- `defaultWorktreeStrategy: "
|
|
176
|
+
- `planApproval: "delegate"`
|
|
177
|
+
- `defaultWorktreeStrategy: "delegate"`
|
|
178
|
+
|
|
179
|
+
Because delegated worktree follow-through is now the default, the first-run `defaultWorkdir` should normally point at a git repository. Non-git workdirs are still supported by setting `defaultWorktreeStrategy: "off"` globally or by launching with `worktree_strategy: "off"`.
|
|
175
180
|
|
|
176
181
|
If you run Codex sessions, keep Codex on the ChatGPT auth path:
|
|
177
182
|
|
|
@@ -209,6 +214,14 @@ Prefer fully routable channel strings such as `telegram|123456789` or `telegram|
|
|
|
209
214
|
|
|
210
215
|
### Upgrade Notes
|
|
211
216
|
|
|
217
|
+
For OpenClaw `2026.5.4` readiness:
|
|
218
|
+
|
|
219
|
+
- Build and SDK metadata now target OpenClaw `2026.5.4`; the peer floor remains `>=2026.4.21` for existing compatible installs.
|
|
220
|
+
- If your OpenClaw config uses an exclusive `plugins.allow` list, include `openclaw-code-agent` or the plugin's `agent_*` / `goal_*` tools will not load even if `tools.allow` names them.
|
|
221
|
+
- Harness model policy should live under `harnesses.codex.*` and `harnesses["claude-code"].*`. Legacy `defaultModel`, `model`, `reasoningEffort`, and global `allowedModels` are compatibility-only. Configured `reasoningEffort` supports `low`, `medium`, `high`, `xhigh`, and `max`.
|
|
222
|
+
- Codex and Claude Code restrictions are harness-scoped. Codex defaults to `gpt-5.5` with `gpt-5.5` / `gpt-5.5-pro` allowed; Claude Code defaults to `anthropic/claude-sonnet-4-7` with `sonnet` / `opus` matching.
|
|
223
|
+
- `tools.deny` does not disable OpenClaw's `apply_patch` tool by itself. Use OpenClaw's `tools.exec.applyPatch.*` settings when you need patch-tool policy.
|
|
224
|
+
|
|
212
225
|
For `4.1.0`:
|
|
213
226
|
|
|
214
227
|
- Managed TaskFlow integration is opportunistic. It uses OpenClaw's current managed-flow runtime when available and degrades to the existing session-only behavior when that surface is absent.
|
|
@@ -219,7 +232,7 @@ For `3.2.0`:
|
|
|
219
232
|
|
|
220
233
|
If you are upgrading from `3.1.0`, the important behavioral changes are:
|
|
221
234
|
|
|
222
|
-
- `defaultWorktreeStrategy`
|
|
235
|
+
- `defaultWorktreeStrategy` now defaults to `delegate`, so new sessions use worktree isolation and orchestrator-led follow-through unless you configure or launch with a different strategy.
|
|
223
236
|
- `auto-merge` now attempts one autonomous conflict resolution before escalating.
|
|
224
237
|
- Completion wakes and no-change outcomes are deterministic and carry explicit approval/execution state instead of relying on transcript inference.
|
|
225
238
|
- 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.
|