@scotthuang/agent-knock-knock 0.3.0-beta.1 → 0.3.0-beta.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/CHANGELOG.md +13 -0
- package/README.md +47 -73
- package/dist/src/cli.js +382 -49
- package/dist/src/cli.js.map +1 -1
- package/dist/src/doctor-capabilities.d.ts +64 -13
- package/dist/src/doctor-capabilities.js +241 -12
- package/dist/src/doctor-capabilities.js.map +1 -1
- package/dist/src/openclaw-doctor.d.ts +28 -0
- package/dist/src/openclaw-doctor.js +359 -0
- package/dist/src/openclaw-doctor.js.map +1 -0
- package/dist/src/openclaw-plugin-helpers.d.ts +5 -2
- package/dist/src/openclaw-plugin-helpers.js +72 -24
- package/dist/src/openclaw-plugin-helpers.js.map +1 -1
- package/dist/src/openclaw-plugin.js +111 -3
- package/dist/src/openclaw-plugin.js.map +1 -1
- package/dist/src/session-selector.d.ts +81 -0
- package/dist/src/session-selector.js +330 -0
- package/dist/src/session-selector.js.map +1 -0
- package/dist/src/terminal-process-source.d.ts +4 -0
- package/dist/src/terminal-process-source.js +20 -0
- package/dist/src/terminal-process-source.js.map +1 -1
- package/docs/quickstart-managed-acpx.md +43 -0
- package/docs/quickstart-tmux.md +43 -0
- package/openclaw.plugin.json +5 -0
- package/package.json +7 -1
- package/scripts/smoke-acpx.js +139 -0
- package/scripts/smoke-tmux.js +140 -0
- package/templates/openclaw-skills/agent-knock-knock/SKILL.md +23 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.0-beta.2 - 2026-07-28
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Add bounded real probes and OpenClaw config, plugin runtime, skill, workspace, and Gateway diagnostics to `doctor`.
|
|
8
|
+
- Add fail-closed session selectors, stable short references, and independent five-minute tmux and Managed ACPX quickstarts.
|
|
9
|
+
- Add deterministic onboarding coverage and explicitly opt-in live ACPX and tmux smoke scripts.
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- Make `install-openclaw` configure workspace, default agent, and mode atomically, preserve approval policy, restart the Gateway at most once, and optionally verify readiness.
|
|
14
|
+
- Verify the packaged README after every ClawHub publish and the default README after stable releases.
|
|
15
|
+
|
|
3
16
|
## 0.3.0-beta.1 - 2026-07-28
|
|
4
17
|
|
|
5
18
|
### 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,7 +45,7 @@ The two modes intentionally use different permission models:
|
|
|
43
45
|
|
|
44
46
|
Core requirements:
|
|
45
47
|
|
|
46
|
-
- Node.js
|
|
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
|
|
|
@@ -51,6 +53,9 @@ Core requirements:
|
|
|
51
53
|
|
|
52
54
|
```bash
|
|
53
55
|
openclaw plugins install clawhub:@scotthuang/agent-knock-knock@beta
|
|
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
|
|
|
@@ -68,12 +73,12 @@ npm install -g @scotthuang/agent-knock-knock@next
|
|
|
68
73
|
|
|
69
74
|
```bash
|
|
70
75
|
npm install -g @scotthuang/agent-knock-knock@next
|
|
71
|
-
agent-knock-knock install-openclaw
|
|
76
|
+
agent-knock-knock install-openclaw --workspace "$PWD" --default-agent codex --mode tmux --verify
|
|
72
77
|
```
|
|
73
78
|
|
|
74
79
|
The npm `next` dist-tag follows the same prerelease line. Remove `@next` after `0.3.0` becomes stable.
|
|
75
80
|
|
|
76
|
-
`install-openclaw` installs or updates the plugin,
|
|
81
|
+
`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
82
|
|
|
78
83
|
If OpenClaw runs from a local checkout or another nonstandard location, pass its CLI explicitly:
|
|
79
84
|
|
|
@@ -133,13 +138,13 @@ AKK uses ACPX to start managed Codex, Claude Code, or Cursor sessions from OpenC
|
|
|
133
138
|
Finally, check which modes are ready if the global CLI is installed:
|
|
134
139
|
|
|
135
140
|
```bash
|
|
136
|
-
agent-knock-knock doctor
|
|
141
|
+
agent-knock-knock doctor --mode tmux
|
|
137
142
|
```
|
|
138
143
|
|
|
139
|
-
For a ClawHub-only installation,
|
|
144
|
+
For a ClawHub-only installation, use the package-local chat diagnostic:
|
|
140
145
|
|
|
141
|
-
```
|
|
142
|
-
|
|
146
|
+
```text
|
|
147
|
+
/akk doctor tmux
|
|
143
148
|
```
|
|
144
149
|
|
|
145
150
|
### Trust and Privacy
|
|
@@ -148,60 +153,16 @@ AKK is local-first. It has no hosted control plane or telemetry, does not modify
|
|
|
148
153
|
|
|
149
154
|
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
155
|
|
|
151
|
-
## Quick
|
|
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
|
-
```
|
|
156
|
+
## Five-Minute Quick Starts
|
|
180
157
|
|
|
181
|
-
|
|
158
|
+
Choose one complete, copy-paste path:
|
|
182
159
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
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
|
-
```
|
|
193
|
-
|
|
194
|
-
Attach to the same tmux session whenever you want to take over directly. Avoid typing while AKK is sending the same turn.
|
|
195
|
-
|
|
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
|
-
```
|
|
160
|
+
| Path | Result |
|
|
161
|
+
| --- | --- |
|
|
162
|
+
| [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. |
|
|
163
|
+
| [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
164
|
|
|
204
|
-
|
|
165
|
+
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
166
|
|
|
206
167
|
## How It Works
|
|
207
168
|
|
|
@@ -214,8 +175,8 @@ Use conversational `AKK` prompts on any chat surface. Explicit agent names overr
|
|
|
214
175
|
```text
|
|
215
176
|
AKK Claude: review the latest commit
|
|
216
177
|
AKK Cursor: fix the flaky UI test
|
|
217
|
-
AKK describe
|
|
218
|
-
AKK recover
|
|
178
|
+
AKK describe latest
|
|
179
|
+
AKK recover only
|
|
219
180
|
```
|
|
220
181
|
|
|
221
182
|
Surfaces with native commands use the same operations:
|
|
@@ -223,15 +184,18 @@ Surfaces with native commands use the same operations:
|
|
|
223
184
|
```text
|
|
224
185
|
/akk <task>
|
|
225
186
|
/akk list
|
|
226
|
-
/akk
|
|
227
|
-
/akk
|
|
228
|
-
/akk
|
|
229
|
-
/akk
|
|
230
|
-
/akk
|
|
231
|
-
/akk
|
|
232
|
-
/akk
|
|
187
|
+
/akk doctor [tmux|acpx|all]
|
|
188
|
+
/akk status [only|latest|codex|claude|cursor|@short-ref]
|
|
189
|
+
/akk describe [session-selector]
|
|
190
|
+
/akk send <session-selector>: <message>
|
|
191
|
+
/akk cancel <session-selector>
|
|
192
|
+
/akk renew <session-selector> [minutes]
|
|
193
|
+
/akk retry-callback <session-selector>
|
|
194
|
+
/akk close <session-selector> [reason]
|
|
233
195
|
```
|
|
234
196
|
|
|
197
|
+
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.
|
|
198
|
+
|
|
235
199
|
Codex CLI sessions started outside AKK can also be resumed, opened in a terminal, or forked:
|
|
236
200
|
|
|
237
201
|
```text
|
|
@@ -242,11 +206,12 @@ AKK fork takeover Codex <session-id>
|
|
|
242
206
|
|
|
243
207
|
## Configuration
|
|
244
208
|
|
|
245
|
-
|
|
209
|
+
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
210
|
|
|
247
211
|
| Option | Default | Purpose |
|
|
248
212
|
| --- | --- | --- |
|
|
249
213
|
| `defaultAgent` | `codex` | Agent used when a request does not name one. |
|
|
214
|
+
| `mode` | `all` | Mode checked by `/akk doctor`: `tmux`, `acpx`, or `all`. |
|
|
250
215
|
| `workspace` | OpenClaw process directory | Working directory for delegated tasks. |
|
|
251
216
|
| `storeDir` | `~/.agent-knock-knock/conversations` | Conversation state location; relative plugin paths resolve from `workspace`. |
|
|
252
217
|
| `openclawBin` | Auto-detected | OpenClaw CLI used for callback delivery. |
|
|
@@ -264,7 +229,7 @@ For tmux-backed Codex, AKK reports visible approval prompts. Claude approval is
|
|
|
264
229
|
|
|
265
230
|
- It is available only for the current AKK-managed turn.
|
|
266
231
|
- 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
|
|
232
|
+
- 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
233
|
- 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
234
|
- 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
235
|
|
|
@@ -288,15 +253,15 @@ Place `autoApprove` inside the plugin `config` object. It is disabled by default
|
|
|
288
253
|
|
|
289
254
|
## Troubleshooting
|
|
290
255
|
|
|
291
|
-
With the global npm CLI installed, start with `agent-knock-knock doctor`. It
|
|
256
|
+
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
257
|
|
|
293
258
|
| Symptom | Action |
|
|
294
259
|
| --- | --- |
|
|
295
260
|
| The npm installer or callbacks cannot find a local OpenClaw CLI | Set `openclawBin` and pass `--openclaw-bin` to `install-openclaw`. |
|
|
296
261
|
| 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
|
|
262
|
+
| 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
263
|
| ACPX task is `stalled` | Inspect `status --trace`; close and redelegate if the executor cannot continue. |
|
|
299
|
-
| Task is `callback_failed` | Run `/akk retry-callback
|
|
264
|
+
| Task is `callback_failed` | Run `/akk retry-callback only` when it is the only actionable failed callback, or use its `@short-ref`. |
|
|
300
265
|
| Terminal takeover is unavailable | Run Codex or Claude Code inside tmux and check `AKK list` for a `terminal_controlled` entry. |
|
|
301
266
|
| 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
267
|
| 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 +270,22 @@ With the global npm CLI installed, start with `agent-knock-knock doctor`. It che
|
|
|
305
270
|
For local diagnostics, use:
|
|
306
271
|
|
|
307
272
|
```bash
|
|
308
|
-
agent-knock-knock status --conversation
|
|
273
|
+
agent-knock-knock status --conversation latest --trace
|
|
309
274
|
agent-knock-knock list --terminal-debug
|
|
310
275
|
agent-knock-knock list --managed-only
|
|
311
276
|
```
|
|
312
277
|
|
|
313
278
|
Codex ACP uses the pinned `@agentclientprotocol/codex-acp` adapter. Override it only with a compatible command through `AKK_CODEX_ACPX_AGENT_COMMAND`.
|
|
314
279
|
|
|
280
|
+
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:
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
AKK_RUN_LIVE_ACPX_SMOKE=1 npm run smoke:acpx -- --confirm-live --agent codex --workspace "$PWD"
|
|
284
|
+
AKK_RUN_LIVE_TMUX_SMOKE=1 npm run smoke:tmux -- --confirm-live --agent codex --target akk-work:0.0 --expected-pane-pid <pid>
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
Both commands can use coding-agent credentials and may incur cost. Read the warning before opting in.
|
|
288
|
+
|
|
315
289
|
## Development
|
|
316
290
|
|
|
317
291
|
```bash
|