openclaw-code-agent 4.1.0 → 4.1.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 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, with `ask`, `delegate`, and `approve` deciding how much plan approval autonomy the orchestrator gets.
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.
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,16 @@ 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.0
31
+ ## New In 4.1.2
32
32
 
33
- `4.1.0` is the managed-lifecycle and notification reliability release. It keeps the `4.0.0` messaging-contract cleanup intact, preserves the `>=2026.4.21` compatibility floor, and adds the release-line fixes that make completion state and direct notification delivery deterministic.
33
+ `4.1.2` is a plan-approval reliability patch for the OpenClaw `2026.5.4` release line. It keeps the `>=2026.4.21` compatibility floor and the `4.1.1` build/test target, while tightening the user-facing approval path that gates implementation.
34
34
 
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
- - **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
- - **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.29` while keeping the minimum compatibility floor at `>=2026.4.21`.
35
+ - **Telegram plan approval buttons restored**. Plan prompts in Telegram use the shared direct-message presentation path and carry the canonical **Approve**, **Revise**, and **Reject** actions.
36
+ - **Plain-text fallback is explicit**. While a plan is awaiting review, replying `Approve`, `Revise`, or `Reject` triggers the same approval, revision, or rejection path as the buttons.
37
+ - **Stale prompts are suppressed**. Rejected or killed plan sessions no longer resurface an obsolete Plan v2 prompt as if it were still actionable.
38
+ - **Verified release evidence**. A plan-gated `rust-hello-world` run, `rust-hello-world-minor-change-2` (`FzPCkqjh`), completed as `approved_then_implemented` after explicit approval; a later run (`VmUBWOH2`) delivered a clean plan prompt without the old stale Plan v2-after-reject behavior.
39
+
40
+ The `4.1.1` OpenClaw `2026.5.4` compatibility work remains current: managed TaskFlow mirroring is opportunistic, deterministic runtime state is exposed in wakes, direct notification failures are surfaced, and local build/test metadata still targets stable OpenClaw `2026.5.4`.
39
41
 
40
42
  ## From Prompt To Merged Branch
41
43
 
@@ -119,11 +121,14 @@ Install and enable the plugin:
119
121
  openclaw plugins install openclaw-code-agent
120
122
  openclaw plugins enable openclaw-code-agent
121
123
  openclaw gateway restart
124
+ openclaw plugins inspect openclaw-code-agent --runtime --json
122
125
  ```
123
126
 
124
127
  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
128
 
126
- This release targets the OpenClaw `v2026.4.21` external plugin contract and is verified against the stable `v2026.4.29` 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 and command activation surface plus the onboarding metadata OpenClaw uses during plugin-config setup. Keep those metadata surfaces in sync when bumping the plugin release baseline.
129
+ 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.
130
+
131
+ 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
132
 
128
133
  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
134
 
@@ -131,11 +136,11 @@ The current manifest descriptors stay intentionally narrow: activation advertise
131
136
 
132
137
  In OpenClaw's Manual setup flow, the plugin should only ask for three first-run decisions:
133
138
 
134
- - `defaultWorkdir`: the repo or workspace path you expect to launch from most often
139
+ - `defaultWorkdir`: the git repo path you expect to launch from most often
135
140
  - `defaultHarness`: whether your default harness is `claude-code` or `codex`
136
141
  - `fallbackChannel`: an optional but recommended fully routable notification target for async updates
137
142
 
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.
143
+ 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
144
 
140
145
  Add a minimal config block under `plugins.entries["openclaw-code-agent"]` in `~/.openclaw/openclaw.json`:
141
146
 
@@ -170,8 +175,10 @@ Add a minimal config block under `plugins.entries["openclaw-code-agent"]` in `~/
170
175
  You can leave the advanced settings at their defaults for the first run. The plugin defaults to:
171
176
 
172
177
  - `permissionMode: "plan"`
173
- - `planApproval: "ask"`
174
- - `defaultWorktreeStrategy: "off"`
178
+ - `planApproval: "delegate"`
179
+ - `defaultWorktreeStrategy: "delegate"`
180
+
181
+ 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
182
 
176
183
  If you run Codex sessions, keep Codex on the ChatGPT auth path:
177
184
 
@@ -209,6 +216,14 @@ Prefer fully routable channel strings such as `telegram|123456789` or `telegram|
209
216
 
210
217
  ### Upgrade Notes
211
218
 
219
+ For OpenClaw `2026.5.4` readiness:
220
+
221
+ - Build and SDK metadata now target OpenClaw `2026.5.4`; the peer floor remains `>=2026.4.21` for existing compatible installs.
222
+ - 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.
223
+ - 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`.
224
+ - 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.
225
+ - `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.
226
+
212
227
  For `4.1.0`:
213
228
 
214
229
  - 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 +234,7 @@ For `3.2.0`:
219
234
 
220
235
  If you are upgrading from `3.1.0`, the important behavioral changes are:
221
236
 
222
- - `defaultWorktreeStrategy` is back to `off`, so worktree isolation remains opt-in unless you configure it explicitly.
237
+ - `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
238
  - `auto-merge` now attempts one autonomous conflict resolution before escalating.
224
239
  - Completion wakes and no-change outcomes are deterministic and carry explicit approval/execution state instead of relying on transcript inference.
225
240
  - 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.