@scotthuang/agent-knock-knock 0.3.2 → 0.4.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.
Files changed (69) hide show
  1. package/CHANGELOG.md +9 -571
  2. package/README.md +97 -123
  3. package/dist/src/agent-session-provider.d.ts +1 -2
  4. package/dist/src/approval-policy.d.ts +1 -1
  5. package/dist/src/approval-policy.js +1 -1
  6. package/dist/src/approval-policy.js.map +1 -1
  7. package/dist/src/claude-terminal-agent-adapter.d.ts +2 -17
  8. package/dist/src/claude-terminal-agent-adapter.js +4 -489
  9. package/dist/src/claude-terminal-agent-adapter.js.map +1 -1
  10. package/dist/src/cli.js +1489 -3406
  11. package/dist/src/cli.js.map +1 -1
  12. package/dist/src/codex-local-session-provider.d.ts +1 -2
  13. package/dist/src/codex-local-session-provider.js +1 -9
  14. package/dist/src/codex-local-session-provider.js.map +1 -1
  15. package/dist/src/codex-session-provider.d.ts +1 -8
  16. package/dist/src/codex-session-provider.js +0 -56
  17. package/dist/src/codex-session-provider.js.map +1 -1
  18. package/dist/src/codex-terminal-agent-adapter.d.ts +1 -1
  19. package/dist/src/doctor-capabilities.d.ts +5 -13
  20. package/dist/src/doctor-capabilities.js +15 -60
  21. package/dist/src/doctor-capabilities.js.map +1 -1
  22. package/dist/src/executors.d.ts +5 -51
  23. package/dist/src/executors.js +4 -68
  24. package/dist/src/executors.js.map +1 -1
  25. package/dist/src/openclaw-doctor.d.ts +1 -1
  26. package/dist/src/openclaw-doctor.js +1 -1
  27. package/dist/src/openclaw-doctor.js.map +1 -1
  28. package/dist/src/openclaw-plugin-helpers.d.ts +5 -8
  29. package/dist/src/openclaw-plugin-helpers.js +57 -40
  30. package/dist/src/openclaw-plugin-helpers.js.map +1 -1
  31. package/dist/src/openclaw-plugin.js +138 -248
  32. package/dist/src/openclaw-plugin.js.map +1 -1
  33. package/dist/src/protocol.d.ts +1 -5
  34. package/dist/src/protocol.js +1 -1
  35. package/dist/src/protocol.js.map +1 -1
  36. package/dist/src/session-selector.js +1 -1
  37. package/dist/src/session-selector.js.map +1 -1
  38. package/dist/src/terminal-agent-adapter.d.ts +3 -17
  39. package/dist/src/terminal-agent-adapter.js.map +1 -1
  40. package/dist/src/terminal-agent-bridge.d.ts +3 -3
  41. package/dist/src/terminal-agent-bridge.js +0 -75
  42. package/dist/src/terminal-agent-bridge.js.map +1 -1
  43. package/dist/src/transcript.js +2 -3
  44. package/dist/src/transcript.js.map +1 -1
  45. package/docs/quickstart-tmux.md +7 -7
  46. package/openclaw.plugin.json +4 -83
  47. package/package.json +7 -15
  48. package/templates/openclaw-skills/agent-knock-knock/SKILL.md +94 -147
  49. package/dist/src/acpx-output.d.ts +0 -18
  50. package/dist/src/acpx-output.js +0 -223
  51. package/dist/src/acpx-output.js.map +0 -1
  52. package/dist/src/bootstrap.d.ts +0 -8
  53. package/dist/src/bootstrap.js +0 -45
  54. package/dist/src/bootstrap.js.map +0 -1
  55. package/dist/src/claude-hook-installer.d.ts +0 -65
  56. package/dist/src/claude-hook-installer.js +0 -410
  57. package/dist/src/claude-hook-installer.js.map +0 -1
  58. package/dist/src/claude-hook-protocol.d.ts +0 -89
  59. package/dist/src/claude-hook-protocol.js +0 -243
  60. package/dist/src/claude-hook-protocol.js.map +0 -1
  61. package/dist/src/claude-hook-store.d.ts +0 -247
  62. package/dist/src/claude-hook-store.js +0 -1075
  63. package/dist/src/claude-hook-store.js.map +0 -1
  64. package/dist/src/session-takeover-planner.d.ts +0 -37
  65. package/dist/src/session-takeover-planner.js +0 -57
  66. package/dist/src/session-takeover-planner.js.map +0 -1
  67. package/docs/quickstart-managed-acpx.md +0 -43
  68. package/scripts/smoke-acpx.js +0 -139
  69. package/scripts/smoke-tmux.js +0 -140
package/README.md CHANGED
@@ -2,52 +2,48 @@
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/%40scotthuang%2Fagent-knock-knock)](https://www.npmjs.com/package/@scotthuang/agent-knock-knock)
4
4
  [![CI](https://github.com/scotthuang/agent-knock-knock/actions/workflows/ci.yml/badge.svg)](https://github.com/scotthuang/agent-knock-knock/actions/workflows/ci.yml)
5
- [![Node.js](https://img.shields.io/badge/Node.js-%3E%3D22.14-339933)](https://nodejs.org/)
5
+ [![Node.js](https://img.shields.io/badge/Node.js-%3E%3D22.19-339933)](https://nodejs.org/)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/scotthuang/agent-knock-knock/blob/main/LICENSE)
7
7
 
8
- Agent Knock Knock lets you control local Codex and Claude Code from any configured OpenClaw channel, then take over the same live tmux session without losing context. For managed background work, Managed ACP (via ACPX) also supports Cursor.
8
+ Agent Knock Knock lets OpenClaw control local Codex and Claude Code through shared tmux terminals, so you can take over and hand work back without losing context.
9
9
 
10
- **Local-first, with no hosted control plane or telemetry. tmux mode keeps the coding agent's existing permission settings; Managed ACP uses a separate background permission model.**
10
+ **No hooks. No agent-side plugins. Just share a terminal and stay in control. No YOLO. Automate the trusted. Review the rest.**
11
11
 
12
12
  ## See It in Action
13
13
 
14
- [![AKK orchestrating a Claude Code-to-Codex handoff through tmux](docs/assets/akk-tmux-handoff-demo.gif)](docs/assets/akk-tmux-handoff-demo.mp4)
14
+ [![AKK orchestrating a Claude Code-to-Codex handoff through tmux](https://raw.githubusercontent.com/scotthuang/agent-knock-knock/main/docs/assets/akk-tmux-handoff-demo.gif)](https://github.com/scotthuang/agent-knock-knock/blob/main/docs/assets/akk-tmux-handoff-demo.mp4)
15
15
 
16
- *OpenClaw asks Claude Code to write a file, waits for AKK to report completion, then hands the result to Codex. Both terminals remain available for direct human takeover. The demo uses the agents' existing permission settings; AKK does not switch them. Click the preview to watch in full quality.*
16
+ *OpenClaw asks Claude Code to write a file, waits for AKK to report completion, then hands the result to Codex. Both terminals remain available for direct human takeover. AKK keeps the agents' existing permission settings. Click the preview to watch in full quality.*
17
17
 
18
18
  ## Use Cases
19
19
 
20
- **Delegate from anywhere.** Use any configured OpenClaw channel to hand work to a local coding agent wherever you are. AKK keeps the task running outside the chat, reports when the agent needs input or finishes, and lets you continue from chat or the shared terminal.
20
+ **Delegate from anywhere.** Use any configured OpenClaw channel to hand work to a local coding agent while you are away from your computer. AKK reports when the agent needs attention or finishes, and you can continue from chat or the shared terminal.
21
21
 
22
- **Orchestrate specialist agents.** OpenClaw can coordinate agent handoffs: Claude Code can plan, Codex can implement, and Claude Code can review. In tmux mode, AKK can also automatically approve trusted permission requests under rules you define. At any point, you can take over the shared terminal, keep working yourself, then hand the same task back to OpenClawwith context intact.
22
+ **Orchestrate specialist agents.** OpenClaw can coordinate handoffs: Claude Code can plan, Codex can implement, and Claude Code can review. At any point, you can take over the live terminal, keep working yourself, then hand the same task back to OpenClaw with its context intact.
23
23
 
24
24
  ![Agent Knock Knock cover: OpenClaw knocking on coding agents' door](docs/assets/agent-knock-knock-cover.jpg)
25
25
 
26
- ## Choose an Execution Mode
27
-
28
- | Mode | Best for | Agents | Requires |
29
- | --- | --- | --- | --- |
30
- | **tmux bridge (recommended)** | Share one live CLI session. OpenClaw and a human can hand the task back and forth. | Codex, Claude Code | `tmux` |
31
- | **Managed ACP** | Start background tasks with durable ACP state and callbacks. | Codex, Claude Code, Cursor | [ACPX](https://github.com/openclaw/acpx) |
32
-
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
-
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.
26
+ ## How It Works
36
27
 
37
- ### Permission Boundaries
28
+ AKK connects OpenClaw to Codex or Claude Code already running inside tmux:
38
29
 
39
- The two modes intentionally use different permission models:
30
+ 1. OpenClaw sends a task or follow-up through the AKK plugin.
31
+ 2. AKK finds an eligible agent pane and writes only the user-facing task into that terminal.
32
+ 3. AKK monitors the same pane for reliable approval, completion, cancellation, and failure evidence.
33
+ 4. AKK reports the result to the originating OpenClaw conversation.
34
+ 5. A human can attach to the same tmux session at any time and continue directly.
40
35
 
41
- - **tmux bridge:** AKK does not change the coding agent's configured permission mode. For supported prompts in an AKK-managed turn, disabled-by-default exact-command rules may auto-approve a trusted request; unmatched or uncertain requests stay manual.
42
- - **Managed ACP:** AKK starts ACPX-backed agents with `--approve-all`; the tmux prompt inspection and exact-command `autoApprove` policy do not apply to this mode. Claude Code may still surface permission requests through ACPX, while some Codex sandbox-sensitive operations fail directly. Keep managed work inside an explicit workspace.
36
+ AKK is local-first. It has no hosted control plane or telemetry and does not change the coding agent's configured permission mode.
43
37
 
44
38
  ## Install
45
39
 
46
- Core requirements:
40
+ Requirements:
47
41
 
48
42
  - A Node.js version supported by your OpenClaw release (Node.js 24 LTS is recommended)
49
43
  - [OpenClaw](https://docs.openclaw.ai/) `2026.6.5` or newer
50
- - At least one authenticated coding agent: Codex, Claude Code, or Cursor
44
+ - `tmux`
45
+ - At least one authenticated coding-agent CLI: Codex or Claude Code
46
+ - OpenClaw, AKK, tmux, and the coding agent running as the same OS user
51
47
 
52
48
  | Compatibility layer | Version | Evidence |
53
49
  | --- | --- | --- |
@@ -59,15 +55,31 @@ The compatibility suite tests the normal installation floor and the Plugin API b
59
55
 
60
56
  ### Install from ClawHub (recommended)
61
57
 
58
+ From the project the agents may edit:
59
+
62
60
  ```bash
63
61
  openclaw plugins install clawhub:@scotthuang/agent-knock-knock
64
62
  openclaw config set plugins.entries.agent-knock-knock.config.workspace "$PWD"
65
63
  openclaw config set plugins.entries.agent-knock-knock.config.defaultAgent codex
66
- openclaw config set plugins.entries.agent-knock-knock.config.mode tmux
67
64
  openclaw gateway restart
68
65
  ```
69
66
 
70
- 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.
67
+ Use `claude` instead of `codex` when preferred.
68
+
69
+ ClawHub installs the OpenClaw plugin, bundled AKK skill, and package-local relay CLI together. It 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 path below.
70
+
71
+ AKK's plugin tools are optional OpenClaw tools and require an explicit tool-policy grant. If you use the default `coding` profile and do not already have `tools.allow`, add AKK without replacing the profile:
72
+
73
+ ```json5
74
+ {
75
+ tools: {
76
+ profile: "coding",
77
+ alsoAllow: ["agent-knock-knock"]
78
+ }
79
+ }
80
+ ```
81
+
82
+ If your configuration already has a restrictive `tools.allow` list, add `"agent-knock-knock"` to that existing list instead. Do not set `allow` and `alsoAllow` at the same scope.
71
83
 
72
84
  If you also want standalone shell commands such as `agent-knock-knock doctor`, install the npm package globally without running `install-openclaw`:
73
85
 
@@ -79,10 +91,10 @@ npm install -g @scotthuang/agent-knock-knock
79
91
 
80
92
  ```bash
81
93
  npm install -g @scotthuang/agent-knock-knock
82
- agent-knock-knock install-openclaw --workspace "$PWD" --default-agent codex --mode tmux --verify
94
+ agent-knock-knock install-openclaw --workspace "$PWD" --default-agent codex --verify
83
95
  ```
84
96
 
85
- `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.
97
+ `install-openclaw` installs or updates the plugin, configures the workspace and default agent without replacing unrelated settings, installs the bundled skill, restarts the Gateway at most once, and optionally verifies the 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.
86
98
 
87
99
  If OpenClaw runs from a local checkout or another nonstandard location, pass its CLI explicitly:
88
100
 
@@ -90,22 +102,7 @@ If OpenClaw runs from a local checkout or another nonstandard location, pass its
90
102
  agent-knock-knock install-openclaw --openclaw-bin /path/to/openclaw/openclaw.mjs
91
103
  ```
92
104
 
93
- AKK's agent tools are optional and require an explicit OpenClaw tool-policy opt-in. If you use the default `coding` profile and do not already have `tools.allow`, add AKK without replacing the profile:
94
-
95
- ```json5
96
- {
97
- tools: {
98
- profile: "coding",
99
- alsoAllow: ["agent-knock-knock"]
100
- }
101
- }
102
- ```
103
-
104
- If your configuration already has a restrictive `tools.allow` list, add `"agent-knock-knock"` to that existing list instead. Do not set `allow` and `alsoAllow` at the same scope.
105
-
106
- Choose one execution mode, or install both.
107
-
108
- ### Option A: tmux bridge (recommended)
105
+ ## Start the Shared Terminal
109
106
 
110
107
  Install tmux on macOS:
111
108
 
@@ -119,68 +116,38 @@ Or on Debian/Ubuntu:
119
116
  sudo apt-get install tmux
120
117
  ```
121
118
 
122
- Then start a shared terminal session:
119
+ Then start Codex in a shared terminal:
123
120
 
124
121
  ```bash
125
- tmux new -s coding
122
+ tmux new-session -s akk-work -c "$PWD" codex
126
123
  ```
127
124
 
128
- Run `codex` or `claude` inside the tmux session. AKK will discover it automatically when OpenClaw and the coding agent run as the same user.
129
-
130
- Claude tmux support requires no hooks and does not modify Claude Code settings. Hook-free completion monitoring is verified on Claude Code `2.1.198` and `2.1.218`; newer versions remain eligible when their interactive transcripts preserve the required identity and completion structure. Hookless auto-approval is deliberately narrower: approval evidence currently requires Claude Code `2.1.x` at `2.1.198` or later, and any other version falls back to manual handling.
131
-
132
- ### Option B: Managed ACP
133
-
134
- Install ACPX:
125
+ Use `claude` instead of `codex` for Claude Code. Detach with `Ctrl-b`, then `d`. AKK discovers the pane automatically.
135
126
 
136
- ```bash
137
- npm install -g acpx
138
- ```
127
+ Claude tmux support requires no hooks and does not modify Claude Code settings. Hook-free completion monitoring is verified on Claude Code `2.1.198` and `2.1.218`; newer versions remain eligible when their interactive transcripts preserve the required identity and completion structure. Hookless auto-approval is deliberately narrower: approval evidence currently requires Claude Code `2.1.x` at `2.1.198` or later, and other versions fall back to manual handling.
139
128
 
140
- AKK uses ACPX to start managed Codex, Claude Code, or Cursor sessions from OpenClaw.
141
-
142
- Finally, check which modes are ready if the global CLI is installed:
129
+ Run the diagnostic:
143
130
 
144
131
  ```bash
145
- agent-knock-knock doctor --mode tmux
132
+ agent-knock-knock doctor
146
133
  ```
147
134
 
148
- For a ClawHub-only installation, use the package-local chat diagnostic:
135
+ For a ClawHub-only installation, use:
149
136
 
150
137
  ```text
151
- /akk doctor tmux
138
+ /akk doctor
152
139
  ```
153
140
 
154
- ### Trust and Privacy
155
-
156
- AKK is local-first. It has no hosted control plane or telemetry, does not modify coding-agent settings, and keeps its state, logs, terminal control, and approval decisions on your machine. Sensitive approval commands are never included in callbacks or AKK logs.
157
-
158
- 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.
159
-
160
- ## Five-Minute Quick Starts
161
-
162
- Choose one complete, copy-paste path:
163
-
164
- | Path | Result |
165
- | --- | --- |
166
- | [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. |
167
- | [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. |
168
-
169
- 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`.
170
-
171
- ## How It Works
172
-
173
- AKK keeps task state outside the chat channel, so OpenClaw can inspect and continue work even where threads are unavailable. OpenClaw remains the orchestrator; AKK supplies the ACP transport, tmux bridge, local state, and callbacks. See the [roadmap](https://github.com/scotthuang/agent-knock-knock/blob/main/ROADMAP.md) for planned work.
141
+ For one complete first run, follow [Agent Knock Knock in 5 minutes](https://github.com/scotthuang/agent-knock-knock/blob/main/docs/quickstart-tmux.md).
174
142
 
175
143
  ## Usage
176
144
 
177
145
  Use conversational `AKK` prompts on any chat surface. Explicit agent names override the configured default:
178
146
 
179
147
  ```text
148
+ AKK Codex: inspect this repository and summarize it
180
149
  AKK Claude: review the latest commit
181
- AKK Cursor: fix the flaky UI test
182
150
  AKK describe latest
183
- AKK recover only
184
151
  ```
185
152
 
186
153
  Surfaces with native commands use the same operations:
@@ -188,54 +155,57 @@ Surfaces with native commands use the same operations:
188
155
  ```text
189
156
  /akk <task>
190
157
  /akk list
191
- /akk doctor [tmux|acpx|all]
192
- /akk status [only|latest|codex|claude|cursor|@short-ref]
158
+ /akk doctor
159
+ /akk status [only|latest|codex|claude|@short-ref]
193
160
  /akk describe [session-selector]
194
161
  /akk send <session-selector>: <message>
162
+ /akk approve <session-selector> --expected-approval-fingerprint <fingerprint>
195
163
  /akk cancel <session-selector>
196
164
  /akk renew <session-selector> [minutes]
197
165
  /akk retry-callback <session-selector>
198
- /akk close <session-selector> [reason]
166
+ /akk close <session-selector> [--expected-message-id <id>] [reason]
199
167
  ```
200
168
 
201
169
  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.
202
170
 
203
- Codex CLI sessions started outside AKK can also be resumed, opened in a terminal, or forked:
171
+ You can also send directly to a terminal entry returned by `AKK list`:
204
172
 
205
173
  ```text
206
- AKK takeover Codex <session-id>
207
- AKK terminal takeover Codex <session-id>
208
- AKK fork takeover Codex <session-id>
174
+ AKK send codex: continue with the smaller implementation
175
+ AKK send @a1b2c3d4: run the focused tests
209
176
  ```
210
177
 
178
+ AKK submits only when the selected pane is at a verified idle prompt. If no eligible Codex or Claude Code tmux pane is available, it stops and tells you how to start one instead of launching an invisible replacement.
179
+
180
+ If `AKK list` reports an orphaned terminal dispatch after its managed state was lost, inspect the named pane first. Clear only that stale dispatch fence with the exact `/akk close ... --expected-message-id ...` recovery command returned by the list; AKK leaves both the coding agent and tmux pane running.
181
+
211
182
  ## Configuration
212
183
 
213
- 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.
184
+ AKK reads these options from `plugins.entries.agent-knock-knock.config`. The npm installer writes the common options; the ClawHub section shows the equivalent setup.
214
185
 
215
186
  | Option | Default | Purpose |
216
187
  | --- | --- | --- |
217
- | `defaultAgent` | `codex` | Agent used when a request does not name one. |
218
- | `mode` | `all` | Mode checked by `/akk doctor`: `tmux`, `acpx`, or `all`. |
219
- | `workspace` | OpenClaw process directory | Working directory for delegated tasks. |
188
+ | `defaultAgent` | `codex` | Agent used when a request does not name one: `codex` or `claude`. |
189
+ | `workspace` | OpenClaw process directory | Working directory matched against eligible terminal panes. |
220
190
  | `storeDir` | `~/.agent-knock-knock/conversations` | Conversation state location; relative plugin paths resolve from `workspace`. |
221
191
  | `openclawBin` | Auto-detected | OpenClaw CLI used for callback delivery. |
192
+ | `codexHome` | Auto-detected | Optional Codex home used to identify Codex sessions running in tmux. |
222
193
  | `idleTimeoutMinutes` | `10080` | Time before an idle task is lazily closed. |
223
- | `agentTimeoutMinutes` | `60` | Callback timeout; terminal bridges treat it as an inactivity timeout. |
224
- | `agentHardTimeoutMinutes` | `720` | Maximum terminal bridge monitor lifetime. |
194
+ | `agentTimeoutMinutes` | `60` | Terminal inactivity timeout. |
195
+ | `agentHardTimeoutMinutes` | `720` | Maximum terminal monitor lifetime. |
225
196
 
226
- See [`openclaw.plugin.json`](openclaw.plugin.json) for the complete schema and compatibility aliases.
197
+ See [`openclaw.plugin.json`](https://github.com/scotthuang/agent-knock-knock/blob/main/openclaw.plugin.json) for the complete schema.
227
198
 
228
199
  ## Approvals
229
200
 
230
- AKK runs ACPX-backed agents with `--approve-all`. Claude Code surfaces permission requests through ACPX, but some Codex sandbox-sensitive operations fail directly. Keep Codex background work inside its workspace, or prefer Claude Code when a task requires ACPX-approved access elsewhere.
201
+ AKK keeps each coding agent's existing permission mode and reports supported visible approval prompts.
231
202
 
232
- For tmux-backed Codex, AKK reports visible approval prompts. Claude approval is deliberately narrower:
203
+ For Claude Code, manual approval is deliberately narrow:
233
204
 
234
205
  - It is available only for the current AKK-managed turn.
235
206
  - 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.
236
207
  - 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.
237
- - 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.
238
- - 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.
208
+ - AKK re-evaluates the evidence and revalidates the process and pane immediately before sending one Enter.
239
209
 
240
210
  Unknown, stale, changed, ambiguous, or unmanaged dialogs fail closed and must be resolved in the terminal.
241
211
 
@@ -253,60 +223,64 @@ autoApprove: {
253
223
  }
254
224
  ```
255
225
 
256
- Place `autoApprove` inside the plugin `config` object. It is disabled by default and matches only exact argument vectors in configured workspaces. Shell composition, substitutions, globs, environment assignments, unparseable commands, and out-of-workspace paths require manual approval. Rules match arguments, not executable hashes. For Claude, the raw command never leaves the local executor; callbacks expose only bounded hashes and opaque request identities.
226
+ Place `autoApprove` inside the plugin `config` object. It is disabled by default and matches only exact argument vectors in configured workspaces. Shell composition, substitutions, globs, environment assignments, unparseable commands, and out-of-workspace paths require manual approval. For Claude, the raw command never leaves the local executor; callbacks expose only bounded hashes and opaque request identities.
227
+
228
+ ## Trust and Privacy
229
+
230
+ AKK has no hosted control plane or telemetry and does not modify coding-agent settings. Its terminal state and logs stay on your machine; Claude approval callbacks omit raw commands, while Codex may include the visible command details OpenClaw needs to present for review.
231
+
232
+ At startup, AKK only registers its tools and reconciles monitors for existing tasks. It never launches a coding agent; delegation reuses exactly one eligible agent pane that you already started in tmux.
233
+
234
+ Your task content is still processed by OpenClaw and the coding-agent or model providers you configure. Review agent permissions and keep secrets out of task prompts.
257
235
 
258
236
  ## Troubleshooting
259
237
 
260
- 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`.
238
+ With the global npm CLI installed, start with `agent-knock-knock doctor`. 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`.
261
239
 
262
240
  | Symptom | Action |
263
241
  | --- | --- |
242
+ | No eligible terminal is available | Start Codex or Claude Code inside tmux as the same OS user, then run `AKK list`. |
264
243
  | The npm installer or callbacks cannot find a local OpenClaw CLI | Set `openclawBin` and pass `--openclaw-bin` to `install-openclaw`. |
265
244
  | Source changes do not appear | Build, reinstall from the checkout, and restart the Gateway. |
266
- | 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. |
267
- | ACPX task is `stalled` | Inspect `status --trace`; close and redelegate if the executor cannot continue. |
245
+ | Terminal task is `stalled` | Inspect `status` and the terminal; use `/akk renew only <minutes>` only when exactly one live stalled task needs more monitoring time. |
268
246
  | Task is `callback_failed` | Run `/akk retry-callback only` when it is the only actionable failed callback, or use its `@short-ref`. |
269
- | Terminal takeover is unavailable | Run Codex or Claude Code inside tmux and check `AKK list` for a `terminal_controlled` entry. |
270
- | 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. |
271
- | 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. |
272
- | Claude tmux monitor becomes `stalled` | Check the Claude version and `status`, then inspect the terminal. Unknown transcript schemas, background work, identity changes, and ambiguous turns intentionally fail closed. |
247
+ | Claude permission is not offered through AKK | Resolve unsupported dialogs in the terminal. The AKK path requires the exact supported one-time Bash prompt for the current managed turn. |
248
+ | Claude request was not auto-approved | Check `autoApprove.enabled`, the agent, canonical workspace, and exact command vector. The request must also have matching current screen and local transcript evidence. |
249
+ | Claude monitor becomes `stalled` | Check the Claude version and `status`, then inspect the terminal. Unknown transcript schemas, background work, identity changes, and ambiguous turns intentionally fail closed. |
273
250
 
274
- For local diagnostics, use:
251
+ For local diagnostics:
275
252
 
276
253
  ```bash
277
254
  agent-knock-knock status --conversation latest --trace
278
255
  agent-knock-knock list --terminal-debug
279
- agent-knock-knock list --managed-only
280
256
  ```
281
257
 
282
- Codex ACP uses the pinned `@agentclientprotocol/codex-acp` adapter. Override it only with a compatible command through `AKK_CODEX_ACPX_AGENT_COMMAND`.
283
-
284
- 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:
258
+ Credentialed smoke tests stay outside normal CI. From a repository checkout, the tmux smoke requires the exact pane PID and a freshly verified idle pane before sending one real turn:
285
259
 
286
260
  ```bash
287
- AKK_RUN_LIVE_ACPX_SMOKE=1 npm run smoke:acpx -- --confirm-live --agent codex --workspace "$PWD"
288
- AKK_RUN_LIVE_TMUX_SMOKE=1 npm run smoke:tmux -- --confirm-live --agent codex --target akk-work:0.0 --expected-pane-pid <pid>
261
+ npm run build
262
+ AKK_RUN_LIVE_TMUX_SMOKE=1 node scripts/smoke-tmux.js --confirm-live --agent codex --target akk-work:0.0 --expected-pane-pid <pid>
289
263
  ```
290
264
 
291
- Both commands can use coding-agent credentials and may incur cost. Read the warning before opting in.
265
+ This command can use coding-agent credentials and may incur cost. Read the warning before opting in.
292
266
 
293
267
  ## Development
294
268
 
295
269
  ```bash
296
- npm run build # compile TypeScript into dist/
297
- npm run typecheck # check types without writing output
298
- npm test # build and run the full test suite
270
+ npm run build
271
+ npm run typecheck
272
+ npm test
299
273
  ```
300
274
 
301
275
  See [CONTRIBUTING.md](https://github.com/scotthuang/agent-knock-knock/blob/main/CONTRIBUTING.md) for the development and pull request workflow. For local OpenClaw testing, rebuild, run `node dist/src/cli.js install-openclaw`, and restart the Gateway.
302
276
 
303
277
  ### ClawHub Maintainer Release
304
278
 
305
- 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:
279
+ The package is configured for ClawHub trusted publishing. Dispatch the `ClawHub Publish` workflow from the matching release tag (replace `vX.Y.Z` below); it verifies that tag against `package.json`, derives `beta` versus `latest`, and defaults to a dry run:
306
280
 
307
281
  ```bash
308
- gh workflow run clawhub-publish.yml --ref main -f dry_run=true
309
- gh workflow run clawhub-publish.yml --ref main -f dry_run=false
282
+ gh workflow run clawhub-publish.yml --ref vX.Y.Z -f dry_run=true
283
+ gh workflow run clawhub-publish.yml --ref vX.Y.Z -f dry_run=false
310
284
  ```
311
285
 
312
286
  ## Storage and Logs
@@ -1,4 +1,4 @@
1
- import type { ActiveCodexProcess, CodexSessionModelInfo, CodexSessionSummary, ForkContextPackage, RolloutExcerptOptions } from "./codex-session-provider.js";
1
+ import type { ActiveCodexProcess, CodexSessionSummary, ForkContextPackage, RolloutExcerptOptions } from "./codex-session-provider.js";
2
2
  export type CodingAgentSessionProviderAgent = "codex";
3
3
  export type HistoricalSessionCapability = "full" | "metadata_only" | "unavailable";
4
4
  export type ForkContextCapability = "full" | "partial" | "unavailable";
@@ -20,6 +20,5 @@ export interface CodingAgentSessionProvider {
20
20
  listHistoricalSessions(): Promise<CodexSessionSummary[]>;
21
21
  listActiveSessions(): Promise<ActiveCodexProcess[]>;
22
22
  getSession(sessionId: string): Promise<CodexSessionSummary | undefined>;
23
- getSessionModel(sessionId: string): Promise<CodexSessionModelInfo | undefined>;
24
23
  getForkContext(options: ForkContextOptions): Promise<ForkContextPackage | undefined>;
25
24
  }
@@ -1,7 +1,7 @@
1
1
  export interface ApprovalCandidate {
2
2
  agent: string;
3
3
  kind: string;
4
- decisionMode?: "keys" | "structured";
4
+ decisionMode?: "keys";
5
5
  command?: string;
6
6
  cwd?: string;
7
7
  fingerprint: string;
@@ -26,7 +26,7 @@ export function approvalCandidateFromMessage(message) {
26
26
  agent,
27
27
  kind,
28
28
  fingerprint,
29
- ...(candidate?.decision_mode === "structured" || candidate?.decision_mode === "keys"
29
+ ...(candidate?.decision_mode === "keys"
30
30
  ? { decisionMode: candidate.decision_mode }
31
31
  : {}),
32
32
  command: stringValue(candidate?.command),
@@ -1 +1 @@
1
- {"version":3,"file":"approval-policy.js","sourceRoot":"","sources":["../../src/approval-policy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAuC7B,MAAM,UAAU,4BAA4B,CAAC,OAAgB;IAC3D,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACvB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IAC3E,IACE,OAAO,CAAC,IAAI,KAAK,UAAU;QAC3B,QAAQ,EAAE,MAAM,KAAK,iBAAiB;QACtC,QAAQ,EAAE,MAAM,KAAK,mBAAmB,EACxC,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,SAAS,GAAG,QAAQ,CAAC,QAAQ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,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAChI,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AACzF,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACpE,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC"}
@@ -1,4 +1,3 @@
1
- import { ClaudeHookStore } from "./claude-hook-store.js";
2
1
  import type { ActiveTerminalProcess, TerminalAgentAdapter, TerminalApprovalInspection, TerminalDurableCompletionRequest, TerminalProcessSnapshot, TerminalScreenInspection, TerminalScreenInspectionOptions } from "./terminal-agent-adapter.js";
3
2
  export type ClaudeProcessKind = "claude_cli";
4
3
  /** A row returned by `claude agents --json --all`. Unknown fields are intentionally ignored. */
@@ -16,9 +15,7 @@ export interface CreateClaudeTerminalAgentAdapterOptions {
16
15
  * names, cwd values, and fuzzy command matches are never used as process identity.
17
16
  */
18
17
  agentRows?: readonly ClaudeAgentRow[];
19
- /** Structured Claude hook state used for one-time permission decisions and durable completion. */
20
- hookStore?: ClaudeHookStore;
21
- /** Read-only local transcript detector used when Claude hooks are not installed. */
18
+ /** Read-only local transcript detector used for durable completion. */
22
19
  detectDurableCompletion?: NonNullable<TerminalAgentAdapter<ClaudeProcessKind>["detectDurableCompletion"]>;
23
20
  /**
24
21
  * Local transcript evidence for the one pending Bash tool use in the current
@@ -26,8 +23,6 @@ export interface CreateClaudeTerminalAgentAdapterOptions {
26
23
  * screen before exposing any executor-local policy authority.
27
24
  */
28
25
  detectPendingApproval?: (request: TerminalDurableCompletionRequest) => ClaudePendingApprovalEvidence | undefined;
29
- /** Canonical launchers explicitly configured by Claude's trusted Tokenjuice PreToolUse hook. */
30
- trustedTokenjuiceLaunchers?: readonly ClaudeTrustedTokenjuiceLauncher[];
31
26
  }
32
27
  export interface ClaudePendingApprovalEvidence {
33
28
  source: "claude_transcript";
@@ -44,22 +39,12 @@ export interface ClaudePendingApprovalEvidence {
44
39
  evidenceFingerprint: string;
45
40
  observedEndOffsetBytes: number;
46
41
  }
47
- export interface ClaudeTrustedTokenjuiceLauncher {
48
- configuredPath: string;
49
- canonicalPath: string;
50
- }
51
42
  export declare function createClaudeTerminalAgentAdapter(options?: CreateClaudeTerminalAgentAdapterOptions): TerminalAgentAdapter<ClaudeProcessKind>;
52
43
  export declare const claudeTerminalAgentAdapter: TerminalAgentAdapter<"claude_cli">;
53
44
  export declare function classifyClaudeProcess(snapshot: TerminalProcessSnapshot, agentRows?: readonly ClaudeAgentRow[]): ActiveTerminalProcess<ClaudeProcessKind> | undefined;
54
45
  export declare function extractClaudeSessionId(command: string): string | undefined;
55
46
  export declare function inspectClaudeScreen(options: TerminalScreenInspectionOptions): TerminalScreenInspection;
56
- /**
57
- * Tokenjuice's official Claude PreToolUse hook wraps Bash through a login shell before
58
- * PermissionRequest runs. Recover only that exact, source-tagged shape so policy matching
59
- * sees Claude's original command; every other wrapper remains visible and fails closed.
60
- */
61
- export declare function normalizeClaudePermissionCommand(command: string, trustedTokenjuiceLaunchers?: readonly ClaudeTrustedTokenjuiceLauncher[]): string;
62
- export declare function claudePermissionCommandForApproval(command: string, trustedTokenjuiceLaunchers?: readonly ClaudeTrustedTokenjuiceLauncher[]): {
47
+ export declare function claudePermissionCommandForApproval(command: string): {
63
48
  command?: string;
64
49
  display: string;
65
50
  };