@scotthuang/agent-knock-knock 0.3.0-beta.1 → 0.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.0 - 2026-07-28
4
+
5
+ ### Added
6
+
7
+ - Publish the complete OpenClaw plugin, bundled AKK skill, and package-local relay through ClawHub, with stable npm and ClawHub installation paths.
8
+ - Add bounded runtime diagnostics, fail-closed session selectors, stable short references, five-minute tmux and Managed ACPX quickstarts, and opt-in live smoke scripts.
9
+
10
+ ### Changed
11
+
12
+ - Make installation configure and verify the OpenClaw runtime while preserving unrelated plugin settings.
13
+ - Confirm asynchronous Gateway callback runs before settling delivery, instead of treating a `started` acknowledgement as delivered.
14
+
15
+ ### Fixed
16
+
17
+ - Find the matching Codex completion across plausible same-workspace rollouts and reconcile durable completion before a newer same-pane task can supersede it.
18
+ - Keep uncertain terminal completion and callback delivery states retryable without duplicating callbacks or attributing a newer task's screen output to an older monitor.
19
+
20
+ ## 0.3.0-beta.2 - 2026-07-28
21
+
22
+ ### Added
23
+
24
+ - Add bounded real probes and OpenClaw config, plugin runtime, skill, workspace, and Gateway diagnostics to `doctor`.
25
+ - Add fail-closed session selectors, stable short references, and independent five-minute tmux and Managed ACPX quickstarts.
26
+ - Add deterministic onboarding coverage and explicitly opt-in live ACPX and tmux smoke scripts.
27
+
28
+ ### Changed
29
+
30
+ - Make `install-openclaw` configure workspace, default agent, and mode atomically, preserve approval policy, restart the Gateway at most once, and optionally verify readiness.
31
+ - Verify the packaged README after every ClawHub publish and the default README after stable releases.
32
+
3
33
  ## 0.3.0-beta.1 - 2026-07-28
4
34
 
5
35
  ### Added
package/README.md CHANGED
@@ -32,6 +32,8 @@ Agent Knock Knock lets you control local Codex and Claude Code from any configur
32
32
 
33
33
  Install either mode or both. tmux does not require ACPX. Cursor tmux control is [not yet supported](https://github.com/scotthuang/agent-knock-knock/issues/42). AKK can also discover, resume, or fork local Codex sessions; that is a Codex capability, not a third installation mode.
34
34
 
35
+ For a complete first run, choose [tmux bridge in 5 minutes](https://github.com/scotthuang/agent-knock-knock/blob/main/docs/quickstart-tmux.md) or [Managed ACPX in 5 minutes](https://github.com/scotthuang/agent-knock-knock/blob/main/docs/quickstart-managed-acpx.md). Both guides use the npm installer so configuration, restart, and verification fit in one copy-paste path.
36
+
35
37
  ### Permission Boundaries
36
38
 
37
39
  The two modes intentionally use different permission models:
@@ -43,37 +45,36 @@ The two modes intentionally use different permission models:
43
45
 
44
46
  Core requirements:
45
47
 
46
- - Node.js 22.14+ (Node.js 24 recommended; use a version supported by your OpenClaw release)
48
+ - A Node.js version supported by OpenClaw (Node.js 24.15+ on the 24.x line is recommended for the compatibility floor below)
47
49
  - [OpenClaw](https://docs.openclaw.ai/) Gateway and plugin API `2026.7.1-2` or newer
48
50
  - At least one authenticated coding agent: Codex, Claude Code, or Cursor
49
51
 
50
52
  ### Install from ClawHub (recommended)
51
53
 
52
54
  ```bash
53
- openclaw plugins install clawhub:@scotthuang/agent-knock-knock@beta
55
+ openclaw plugins install clawhub:@scotthuang/agent-knock-knock
56
+ openclaw config set plugins.entries.agent-knock-knock.config.workspace "$PWD"
57
+ openclaw config set plugins.entries.agent-knock-knock.config.defaultAgent codex
58
+ openclaw config set plugins.entries.agent-knock-knock.config.mode tmux
54
59
  openclaw gateway restart
55
60
  ```
56
61
 
57
- The explicit `@beta` selector follows the `0.3.0` prerelease channel. Remove it after the stable ClawHub release is available.
58
-
59
62
  ClawHub installs the OpenClaw plugin, bundled AKK skill, and package-local relay CLI together. OpenClaw invokes that bundled CLI directly, but ClawHub does not add the `agent-knock-knock` command to your shell `PATH`. Do not run `install-openclaw` after a ClawHub install; that command belongs to the npm installation path below and would repeat the plugin setup.
60
63
 
61
64
  If you also want standalone shell commands such as `agent-knock-knock doctor`, install the npm package globally without running `install-openclaw`:
62
65
 
63
66
  ```bash
64
- npm install -g @scotthuang/agent-knock-knock@next
67
+ npm install -g @scotthuang/agent-knock-knock
65
68
  ```
66
69
 
67
- ### Install from npm (beta)
70
+ ### Install from npm
68
71
 
69
72
  ```bash
70
- npm install -g @scotthuang/agent-knock-knock@next
71
- agent-knock-knock install-openclaw
73
+ npm install -g @scotthuang/agent-knock-knock
74
+ agent-knock-knock install-openclaw --workspace "$PWD" --default-agent codex --mode tmux --verify
72
75
  ```
73
76
 
74
- The npm `next` dist-tag follows the same prerelease line. Remove `@next` after `0.3.0` becomes stable.
75
-
76
- `install-openclaw` installs or updates the plugin, enables it, installs the AKK skill template, and restarts the OpenClaw Gateway. It is safe to rerun. Use `--skill-only` to skip plugin installation; add `--no-restart` to skip the automatic Gateway restart.
77
+ `install-openclaw` installs or updates the plugin, atomically configures the selected workspace, agent, and mode without replacing unrelated settings, installs the AKK skill template, restarts the Gateway at most once, and optionally verifies the full runtime chain. It is safe to rerun. Without `--verify`, the result remains unverified rather than claiming readiness. Use `--skill-only` to skip plugin installation; add `--no-restart` to leave an explicit pending-restart state.
77
78
 
78
79
  If OpenClaw runs from a local checkout or another nonstandard location, pass its CLI explicitly:
79
80
 
@@ -133,13 +134,13 @@ AKK uses ACPX to start managed Codex, Claude Code, or Cursor sessions from OpenC
133
134
  Finally, check which modes are ready if the global CLI is installed:
134
135
 
135
136
  ```bash
136
- agent-knock-knock doctor
137
+ agent-knock-knock doctor --mode tmux
137
138
  ```
138
139
 
139
- For a ClawHub-only installation, verify that OpenClaw loaded the packaged runtime:
140
+ For a ClawHub-only installation, use the package-local chat diagnostic:
140
141
 
141
- ```bash
142
- openclaw plugins inspect agent-knock-knock --runtime
142
+ ```text
143
+ /akk doctor tmux
143
144
  ```
144
145
 
145
146
  ### Trust and Privacy
@@ -148,60 +149,16 @@ AKK is local-first. It has no hosted control plane or telemetry, does not modify
148
149
 
149
150
  Your task content is still processed by OpenClaw and the coding-agent or model providers you configure. Use explicit workspaces, review agent permissions, and keep secrets out of custom callback commands.
150
151
 
151
- ## Quick Start
152
-
153
- First merge this configuration into `~/.openclaw/openclaw.json`, setting `workspace` to the absolute path of the project agents may modify:
154
-
155
- ```json5
156
- // ~/.openclaw/openclaw.json
157
- {
158
- tools: {
159
- profile: "coding",
160
- alsoAllow: ["agent-knock-knock"]
161
- },
162
- plugins: {
163
- entries: {
164
- "agent-knock-knock": {
165
- config: {
166
- defaultAgent: "codex",
167
- workspace: "/absolute/path/to/project"
168
- }
169
- }
170
- }
171
- }
172
- }
173
- ```
174
-
175
- Restart the Gateway after changing the configuration:
176
-
177
- ```bash
178
- openclaw gateway restart
179
- ```
180
-
181
- For the recommended tmux mode, start an agent in tmux, then ask AKK to list and send to the discovered terminal:
182
-
183
- ```bash
184
- tmux new -s claude-work
185
- claude
186
- ```
187
-
188
- ```text
189
- AKK list
190
- AKK send <terminal-controlled-id>: inspect this repository and summarize it
191
- AKK status <managed-conversation-id>
192
- ```
152
+ ## Five-Minute Quick Starts
193
153
 
194
- Attach to the same tmux session whenever you want to take over directly. Avoid typing while AKK is sending the same turn.
154
+ Choose one complete, copy-paste path:
195
155
 
196
- For Managed ACP, start a new task and use its conversation ID for follow-ups:
197
-
198
- ```text
199
- AKK Codex: inspect this repository and summarize it
200
- AKK status <conversation-id>
201
- AKK send <conversation-id>: run the tests and fix any failures
202
- ```
156
+ | Path | Result |
157
+ | --- | --- |
158
+ | [tmux bridge in 5 minutes](https://github.com/scotthuang/agent-knock-knock/blob/main/docs/quickstart-tmux.md) | Connect OpenClaw to an existing Codex or Claude Code terminal and keep direct human takeover. |
159
+ | [Managed ACPX in 5 minutes](https://github.com/scotthuang/agent-knock-knock/blob/main/docs/quickstart-managed-acpx.md) | Start managed Codex, Claude Code, or Cursor background tasks with durable state and callbacks. |
203
160
 
204
- For new ACP tasks, omitting the agent uses `defaultAgent`, falling back to Codex.
161
+ The five-minute paths use the npm installer so installation, configuration, restart, and verification fit in one command. The ClawHub path above remains the OpenClaw-native distribution option and exposes the same package-local `/akk doctor`.
205
162
 
206
163
  ## How It Works
207
164
 
@@ -214,8 +171,8 @@ Use conversational `AKK` prompts on any chat surface. Explicit agent names overr
214
171
  ```text
215
172
  AKK Claude: review the latest commit
216
173
  AKK Cursor: fix the flaky UI test
217
- AKK describe <conversation-id>
218
- AKK recover <conversation-id>
174
+ AKK describe latest
175
+ AKK recover only
219
176
  ```
220
177
 
221
178
  Surfaces with native commands use the same operations:
@@ -223,15 +180,18 @@ Surfaces with native commands use the same operations:
223
180
  ```text
224
181
  /akk <task>
225
182
  /akk list
226
- /akk status <conversation-id>
227
- /akk describe <conversation-id>
228
- /akk send <conversation-id> <message>
229
- /akk cancel <conversation-id>
230
- /akk renew <conversation-id> [minutes]
231
- /akk retry-callback <conversation-id>
232
- /akk close <conversation-id> [reason]
183
+ /akk doctor [tmux|acpx|all]
184
+ /akk status [only|latest|codex|claude|cursor|@short-ref]
185
+ /akk describe [session-selector]
186
+ /akk send <session-selector>: <message>
187
+ /akk cancel <session-selector>
188
+ /akk renew <session-selector> [minutes]
189
+ /akk retry-callback <session-selector>
190
+ /akk close <session-selector> [reason]
233
191
  ```
234
192
 
193
+ Selectors fail closed: `only` works only with one actionable target, `latest` requires a unique newest target, and an agent name must identify exactly one actionable session. `AKK list` shows stable short references while JSON output retains the authoritative full IDs.
194
+
235
195
  Codex CLI sessions started outside AKK can also be resumed, opened in a terminal, or forked:
236
196
 
237
197
  ```text
@@ -242,11 +202,12 @@ AKK fork takeover Codex <session-id>
242
202
 
243
203
  ## Configuration
244
204
 
245
- Configure AKK under `plugins.entries.agent-knock-knock.config` in `~/.openclaw/openclaw.json`, as shown in the Quick Start.
205
+ AKK reads these options from `plugins.entries.agent-knock-knock.config`. The npm installer writes them for you; the ClawHub install section shows the equivalent `openclaw config set` commands.
246
206
 
247
207
  | Option | Default | Purpose |
248
208
  | --- | --- | --- |
249
209
  | `defaultAgent` | `codex` | Agent used when a request does not name one. |
210
+ | `mode` | `all` | Mode checked by `/akk doctor`: `tmux`, `acpx`, or `all`. |
250
211
  | `workspace` | OpenClaw process directory | Working directory for delegated tasks. |
251
212
  | `storeDir` | `~/.agent-knock-knock/conversations` | Conversation state location; relative plugin paths resolve from `workspace`. |
252
213
  | `openclawBin` | Auto-detected | OpenClaw CLI used for callback delivery. |
@@ -264,7 +225,7 @@ For tmux-backed Codex, AKK reports visible approval prompts. Claude approval is
264
225
 
265
226
  - It is available only for the current AKK-managed turn.
266
227
  - AKK accepts only an exact, current Bash dialog with the one-time **Yes** choice already highlighted, correlated to one unresolved foreground Bash tool request in the anchored owner-private transcript. Persistent permission choices are rejected.
267
- - When no trusted rule matches, the callback takes the manual path. The user must personally inspect the named tmux pane, explicitly confirm the exact request, and then run `AKK approve <conversation-id>`; the hash-only callback is not sufficient for review.
228
+ - When no trusted rule matches, the callback takes the manual path. The user must personally inspect the named tmux pane, explicitly confirm the exact request, and then run `AKK approve <@short-ref>`; the hash-only callback is not sufficient for review.
268
229
  - A disabled-by-default `autoApprove` rule may approve Claude only when its agent, canonical workspace, and exact argument vector all match the freshly re-read local evidence.
269
230
  - AKK re-evaluates the policy, reserves the one-shot dispatch, recaptures the one-time choice and transcript evidence, and revalidates the process and pane before sending one Enter. A stale, changed, replayed, or uncertain request fails closed and must be resolved in the terminal.
270
231
 
@@ -288,15 +249,15 @@ Place `autoApprove` inside the plugin `config` object. It is disabled by default
288
249
 
289
250
  ## Troubleshooting
290
251
 
291
- With the global npm CLI installed, start with `agent-knock-knock doctor`. It checks the core installation and reports ACPX and tmux readiness separately; either execution mode is enough. It does not authenticate an agent, verify live Gateway/plugin connectivity, or run a real task. For a ClawHub-only installation, start with `openclaw plugins inspect agent-knock-knock --runtime`.
252
+ With the global npm CLI installed, start with `agent-knock-knock doctor --mode tmux|acpx|all`. It runs bounded version probes, validates the OpenClaw config and AKK workspace, verifies the installed/enabled/loaded plugin and bundled skill, and checks Gateway health separately. For a ClawHub-only installation, use `/akk doctor`.
292
253
 
293
254
  | Symptom | Action |
294
255
  | --- | --- |
295
256
  | The npm installer or callbacks cannot find a local OpenClaw CLI | Set `openclawBin` and pass `--openclaw-bin` to `install-openclaw`. |
296
257
  | Source changes do not appear | Build, reinstall from the checkout, and restart the Gateway. |
297
- | Terminal bridge task is `stalled` | Inspect `status` and the terminal; use `/akk renew <conversation-id> <minutes>` only when more monitoring time is useful. |
258
+ | Terminal bridge task is `stalled` | Inspect `status` and the terminal; use `/akk renew only <minutes>` only when exactly one stalled task needs more monitoring time. |
298
259
  | ACPX task is `stalled` | Inspect `status --trace`; close and redelegate if the executor cannot continue. |
299
- | Task is `callback_failed` | Run `/akk retry-callback <conversation-id>` in a native-command chat. |
260
+ | Task is `callback_failed` | Run `/akk retry-callback only` when it is the only actionable failed callback, or use its `@short-ref`. |
300
261
  | Terminal takeover is unavailable | Run Codex or Claude Code inside tmux and check `AKK list` for a `terminal_controlled` entry. |
301
262
  | Claude permission is not offered through AKK | Use the managed conversation returned by a background send. If the dialog is not the exact supported one-time Bash prompt, resolve it in the terminal. |
302
263
  | Claude request was not auto-approved | Check `autoApprove.enabled`, `agents: ["claude"]`, the canonical workspace, and the exact command vector. The request must also be a current one-time Bash prompt with matching local transcript evidence from a supported Claude `2.1.x` version. |
@@ -305,13 +266,22 @@ With the global npm CLI installed, start with `agent-knock-knock doctor`. It che
305
266
  For local diagnostics, use:
306
267
 
307
268
  ```bash
308
- agent-knock-knock status --conversation <conversation-id> --trace
269
+ agent-knock-knock status --conversation latest --trace
309
270
  agent-knock-knock list --terminal-debug
310
271
  agent-knock-knock list --managed-only
311
272
  ```
312
273
 
313
274
  Codex ACP uses the pinned `@agentclientprotocol/codex-acp` adapter. Override it only with a compatible command through `AKK_CODEX_ACPX_AGENT_COMMAND`.
314
275
 
276
+ Credentialed smoke tests stay outside normal CI. From a repository checkout, the ACPX smoke creates a nonce-scoped session and closes it; the tmux smoke requires the exact pane PID and a freshly verified idle pane before sending one real turn:
277
+
278
+ ```bash
279
+ AKK_RUN_LIVE_ACPX_SMOKE=1 npm run smoke:acpx -- --confirm-live --agent codex --workspace "$PWD"
280
+ AKK_RUN_LIVE_TMUX_SMOKE=1 npm run smoke:tmux -- --confirm-live --agent codex --target akk-work:0.0 --expected-pane-pid <pid>
281
+ ```
282
+
283
+ Both commands can use coding-agent credentials and may incur cost. Read the warning before opting in.
284
+
315
285
  ## Development
316
286
 
317
287
  ```bash
@@ -324,18 +294,13 @@ See [CONTRIBUTING.md](https://github.com/scotthuang/agent-knock-knock/blob/main/
324
294
 
325
295
  ### ClawHub Maintainer Release
326
296
 
327
- The first `0.3.0` beta publish is intentionally manual and must stay on ClawHub's `beta` tag:
297
+ The package is configured for ClawHub trusted publishing. Dispatch the `ClawHub Publish` workflow for a release; it derives `beta` versus `latest` from the package version and defaults to a dry run:
328
298
 
329
299
  ```bash
330
- npm ci
331
- npm run build
332
- npm exec clawhub -- login
333
- npm exec clawhub -- package publish . --family code-plugin --owner scotthuang --tags beta --dry-run --json
334
- npm exec clawhub -- package publish . --family code-plugin --owner scotthuang --tags beta
300
+ gh workflow run clawhub-publish.yml --ref main -f dry_run=true
301
+ gh workflow run clawhub-publish.yml --ref main -f dry_run=false
335
302
  ```
336
303
 
337
- After that first release creates the package, configure this repository as its trusted publisher. Future publishes use the manually dispatched `ClawHub Publish` workflow, which defaults to a dry run and derives `beta` versus `latest` from the package version.
338
-
339
304
  ## Storage and Logs
340
305
 
341
306
  State lives under `~/.agent-knock-knock/`. Directories use mode `0700`; state and log files use `0600`. Runtime logs redact common secrets and default to 14-day retention. Configure storage and logging with `--store-dir`, `AKK_LOG_DIR`, `AKK_LOG_LEVEL`, and `AKK_LOG_RETENTION_DAYS`; use a dedicated custom log directory.