@scotthuang/agent-knock-knock 0.3.2 → 0.5.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 +17 -565
- package/README.md +100 -134
- package/dist/src/agent-session-provider.d.ts +1 -2
- package/dist/src/approval-policy.d.ts +1 -1
- package/dist/src/approval-policy.js +1 -1
- package/dist/src/approval-policy.js.map +1 -1
- package/dist/src/claude-terminal-agent-adapter.d.ts +2 -17
- package/dist/src/claude-terminal-agent-adapter.js +4 -489
- package/dist/src/claude-terminal-agent-adapter.js.map +1 -1
- package/dist/src/cli.js +1736 -3893
- package/dist/src/cli.js.map +1 -1
- package/dist/src/codex-local-session-provider.d.ts +1 -2
- package/dist/src/codex-local-session-provider.js +1 -9
- package/dist/src/codex-local-session-provider.js.map +1 -1
- package/dist/src/codex-session-provider.d.ts +1 -8
- package/dist/src/codex-session-provider.js +0 -56
- package/dist/src/codex-session-provider.js.map +1 -1
- package/dist/src/codex-terminal-agent-adapter.d.ts +1 -1
- package/dist/src/doctor-capabilities.d.ts +5 -13
- package/dist/src/doctor-capabilities.js +15 -60
- package/dist/src/doctor-capabilities.js.map +1 -1
- package/dist/src/executors.d.ts +5 -51
- package/dist/src/executors.js +4 -68
- package/dist/src/executors.js.map +1 -1
- package/dist/src/openclaw-doctor.d.ts +0 -1
- package/dist/src/openclaw-doctor.js +0 -7
- package/dist/src/openclaw-doctor.js.map +1 -1
- package/dist/src/openclaw-plugin-helpers.d.ts +5 -13
- package/dist/src/openclaw-plugin-helpers.js +91 -82
- package/dist/src/openclaw-plugin-helpers.js.map +1 -1
- package/dist/src/openclaw-plugin.js +272 -481
- package/dist/src/openclaw-plugin.js.map +1 -1
- package/dist/src/protocol.d.ts +1 -5
- package/dist/src/protocol.js +1 -1
- package/dist/src/protocol.js.map +1 -1
- package/dist/src/session-selector.js +1 -1
- package/dist/src/session-selector.js.map +1 -1
- package/dist/src/terminal-agent-adapter.d.ts +3 -17
- package/dist/src/terminal-agent-adapter.js.map +1 -1
- package/dist/src/terminal-agent-bridge.d.ts +3 -3
- package/dist/src/terminal-agent-bridge.js +0 -75
- package/dist/src/terminal-agent-bridge.js.map +1 -1
- package/dist/src/transcript.js +2 -3
- package/dist/src/transcript.js.map +1 -1
- package/docs/quickstart-tmux.md +15 -11
- package/openclaw.plugin.json +4 -100
- package/package.json +7 -15
- package/templates/openclaw-skills/agent-knock-knock/SKILL.md +82 -149
- package/dist/src/acpx-output.d.ts +0 -18
- package/dist/src/acpx-output.js +0 -223
- package/dist/src/acpx-output.js.map +0 -1
- package/dist/src/bootstrap.d.ts +0 -8
- package/dist/src/bootstrap.js +0 -45
- package/dist/src/bootstrap.js.map +0 -1
- package/dist/src/claude-hook-installer.d.ts +0 -65
- package/dist/src/claude-hook-installer.js +0 -410
- package/dist/src/claude-hook-installer.js.map +0 -1
- package/dist/src/claude-hook-protocol.d.ts +0 -89
- package/dist/src/claude-hook-protocol.js +0 -243
- package/dist/src/claude-hook-protocol.js.map +0 -1
- package/dist/src/claude-hook-store.d.ts +0 -247
- package/dist/src/claude-hook-store.js +0 -1075
- package/dist/src/claude-hook-store.js.map +0 -1
- package/dist/src/session-takeover-planner.d.ts +0 -37
- package/dist/src/session-takeover-planner.js +0 -57
- package/dist/src/session-takeover-planner.js.map +0 -1
- package/docs/quickstart-managed-acpx.md +0 -43
- package/scripts/smoke-acpx.js +0 -139
- package/scripts/smoke-tmux.js +0 -140
package/README.md
CHANGED
|
@@ -2,52 +2,48 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@scotthuang/agent-knock-knock)
|
|
4
4
|
[](https://github.com/scotthuang/agent-knock-knock/actions/workflows/ci.yml)
|
|
5
|
-
[](https://nodejs.org/)
|
|
6
6
|
[](https://github.com/scotthuang/agent-knock-knock/blob/main/LICENSE)
|
|
7
7
|
|
|
8
|
-
Agent Knock Knock lets
|
|
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
|
-
**
|
|
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
|
-
[](docs/assets/akk-tmux-handoff-demo.mp4)
|
|
14
|
+
[](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
|
|
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 control. 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
|
|
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
|
|
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
|

|
|
25
25
|
|
|
26
|
-
##
|
|
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
|
-
|
|
28
|
+
AKK connects OpenClaw to Codex or Claude Code already running inside tmux:
|
|
38
29
|
|
|
39
|
-
|
|
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
|
-
-
|
|
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
|
-
|
|
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
|
-
-
|
|
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,28 @@ 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
|
-
openclaw config set plugins.entries.agent-knock-knock.config.defaultAgent codex
|
|
66
|
-
openclaw config set plugins.entries.agent-knock-knock.config.mode tmux
|
|
67
63
|
openclaw gateway restart
|
|
68
64
|
```
|
|
69
65
|
|
|
70
|
-
ClawHub installs the OpenClaw plugin, bundled AKK skill, and package-local relay CLI together.
|
|
66
|
+
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.
|
|
67
|
+
|
|
68
|
+
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:
|
|
69
|
+
|
|
70
|
+
```json5
|
|
71
|
+
{
|
|
72
|
+
tools: {
|
|
73
|
+
profile: "coding",
|
|
74
|
+
alsoAllow: ["agent-knock-knock"]
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
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
80
|
|
|
72
81
|
If you also want standalone shell commands such as `agent-knock-knock doctor`, install the npm package globally without running `install-openclaw`:
|
|
73
82
|
|
|
@@ -79,10 +88,10 @@ npm install -g @scotthuang/agent-knock-knock
|
|
|
79
88
|
|
|
80
89
|
```bash
|
|
81
90
|
npm install -g @scotthuang/agent-knock-knock
|
|
82
|
-
agent-knock-knock install-openclaw --workspace "$PWD" --
|
|
91
|
+
agent-knock-knock install-openclaw --workspace "$PWD" --verify
|
|
83
92
|
```
|
|
84
93
|
|
|
85
|
-
`install-openclaw` installs or updates the plugin,
|
|
94
|
+
`install-openclaw` installs or updates the plugin, configures the workspace 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
95
|
|
|
87
96
|
If OpenClaw runs from a local checkout or another nonstandard location, pass its CLI explicitly:
|
|
88
97
|
|
|
@@ -90,22 +99,7 @@ If OpenClaw runs from a local checkout or another nonstandard location, pass its
|
|
|
90
99
|
agent-knock-knock install-openclaw --openclaw-bin /path/to/openclaw/openclaw.mjs
|
|
91
100
|
```
|
|
92
101
|
|
|
93
|
-
|
|
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)
|
|
102
|
+
## Start the Shared Terminal
|
|
109
103
|
|
|
110
104
|
Install tmux on macOS:
|
|
111
105
|
|
|
@@ -119,123 +113,90 @@ Or on Debian/Ubuntu:
|
|
|
119
113
|
sudo apt-get install tmux
|
|
120
114
|
```
|
|
121
115
|
|
|
122
|
-
Then start a shared terminal
|
|
116
|
+
Then start Codex in a shared terminal:
|
|
123
117
|
|
|
124
118
|
```bash
|
|
125
|
-
tmux new -s
|
|
119
|
+
tmux new-session -s akk-work -c "$PWD" codex
|
|
126
120
|
```
|
|
127
121
|
|
|
128
|
-
|
|
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:
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
npm install -g acpx
|
|
138
|
-
```
|
|
122
|
+
Use `claude` instead of `codex` for Claude Code. Detach with `Ctrl-b`, then `d`. AKK discovers the pane automatically.
|
|
139
123
|
|
|
140
|
-
|
|
124
|
+
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.
|
|
141
125
|
|
|
142
|
-
|
|
126
|
+
Run the diagnostic:
|
|
143
127
|
|
|
144
128
|
```bash
|
|
145
|
-
agent-knock-knock doctor
|
|
129
|
+
agent-knock-knock doctor
|
|
146
130
|
```
|
|
147
131
|
|
|
148
|
-
For a ClawHub-only installation, use
|
|
132
|
+
For a ClawHub-only installation, use:
|
|
149
133
|
|
|
150
134
|
```text
|
|
151
|
-
/akk doctor
|
|
135
|
+
/akk doctor
|
|
152
136
|
```
|
|
153
137
|
|
|
154
|
-
|
|
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.
|
|
138
|
+
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).
|
|
159
139
|
|
|
160
|
-
##
|
|
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`.
|
|
140
|
+
## Usage
|
|
170
141
|
|
|
171
|
-
|
|
142
|
+
AKK sends work only to Codex or Claude Code panes that are already running in tmux, inside the configured workspace, and at a verified idle prompt. It never starts a coding agent for you.
|
|
172
143
|
|
|
173
|
-
|
|
144
|
+
If exactly one idle coding-agent pane matches the workspace, send a task directly:
|
|
174
145
|
|
|
175
|
-
|
|
146
|
+
```text
|
|
147
|
+
/akk inspect this repository and summarize it
|
|
148
|
+
```
|
|
176
149
|
|
|
177
|
-
|
|
150
|
+
If more than one pane is available, name the target before the colon:
|
|
178
151
|
|
|
179
152
|
```text
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
AKK recover only
|
|
153
|
+
/akk codex: inspect this repository and summarize it
|
|
154
|
+
/akk claude: review the latest commit
|
|
155
|
+
/akk @a1b2c3d4: run the focused tests
|
|
184
156
|
```
|
|
185
157
|
|
|
186
|
-
|
|
158
|
+
The core command surface is intentionally small:
|
|
187
159
|
|
|
188
160
|
```text
|
|
189
161
|
/akk <task>
|
|
162
|
+
/akk <selector>: <message>
|
|
190
163
|
/akk list
|
|
191
|
-
/akk
|
|
192
|
-
/akk status [only|latest|codex|claude|cursor|@short-ref]
|
|
193
|
-
/akk describe [session-selector]
|
|
194
|
-
/akk send <session-selector>: <message>
|
|
164
|
+
/akk status [only|latest|codex|claude|@short-ref]
|
|
195
165
|
/akk cancel <session-selector>
|
|
196
|
-
/akk renew <session-selector> [minutes]
|
|
197
|
-
/akk retry-callback <session-selector>
|
|
198
|
-
/akk close <session-selector> [reason]
|
|
199
166
|
```
|
|
200
167
|
|
|
201
|
-
Selectors fail closed: `only` works only with one actionable target, `latest` requires a unique newest target, and
|
|
168
|
+
Selectors fail closed: `only` works only with one actionable target, `latest` requires a unique newest target, and `codex` or `claude` must identify exactly one eligible pane. `AKK list` shows stable short references while JSON output retains the authoritative full IDs. Every send revalidates the pane, process, workspace, and idle state immediately before typing.
|
|
202
169
|
|
|
203
|
-
|
|
170
|
+
The configured workspace is a hard boundary for OpenClaw tools and slash commands. Listing, inspection, sending, approval, cancellation, and recovery do not cross into another workspace even when given an explicit terminal ID.
|
|
204
171
|
|
|
205
|
-
|
|
206
|
-
AKK takeover Codex <session-id>
|
|
207
|
-
AKK terminal takeover Codex <session-id>
|
|
208
|
-
AKK fork takeover Codex <session-id>
|
|
209
|
-
```
|
|
172
|
+
If no eligible pane exists, AKK stops with setup guidance. If a send is ambiguous, run `/akk list` and retry with the returned `@short-ref`.
|
|
210
173
|
|
|
211
174
|
## Configuration
|
|
212
175
|
|
|
213
|
-
AKK reads these options from `plugins.entries.agent-knock-knock.config`. The npm installer writes
|
|
176
|
+
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
177
|
|
|
215
178
|
| Option | Default | Purpose |
|
|
216
179
|
| --- | --- | --- |
|
|
217
|
-
| `
|
|
218
|
-
| `mode` | `all` | Mode checked by `/akk doctor`: `tmux`, `acpx`, or `all`. |
|
|
219
|
-
| `workspace` | OpenClaw process directory | Working directory for delegated tasks. |
|
|
180
|
+
| `workspace` | OpenClaw process directory | Working directory matched against eligible terminal panes. |
|
|
220
181
|
| `storeDir` | `~/.agent-knock-knock/conversations` | Conversation state location; relative plugin paths resolve from `workspace`. |
|
|
221
182
|
| `openclawBin` | Auto-detected | OpenClaw CLI used for callback delivery. |
|
|
183
|
+
| `codexHome` | Auto-detected | Optional Codex home used to identify Codex sessions running in tmux. |
|
|
222
184
|
| `idleTimeoutMinutes` | `10080` | Time before an idle task is lazily closed. |
|
|
223
|
-
| `agentTimeoutMinutes` | `60` |
|
|
224
|
-
| `agentHardTimeoutMinutes` | `720` | Maximum terminal
|
|
185
|
+
| `agentTimeoutMinutes` | `60` | Terminal inactivity timeout. |
|
|
186
|
+
| `agentHardTimeoutMinutes` | `720` | Maximum terminal monitor lifetime. |
|
|
225
187
|
|
|
226
|
-
See [`openclaw.plugin.json`](openclaw.plugin.json) for the complete schema
|
|
188
|
+
See [`openclaw.plugin.json`](https://github.com/scotthuang/agent-knock-knock/blob/main/openclaw.plugin.json) for the complete schema.
|
|
227
189
|
|
|
228
190
|
## Approvals
|
|
229
191
|
|
|
230
|
-
AKK
|
|
192
|
+
AKK keeps each coding agent's existing permission mode and reports supported visible approval prompts.
|
|
231
193
|
|
|
232
|
-
For
|
|
194
|
+
For Claude Code, manual approval is deliberately narrow:
|
|
233
195
|
|
|
234
196
|
- It is available only for the current AKK-managed turn.
|
|
235
197
|
- 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
|
-
- 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
|
|
237
|
-
-
|
|
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.
|
|
198
|
+
- 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 @a1b2c3d4 --expected-approval-fingerprint <fresh-fingerprint>` using the fingerprint from that current notification; the hash-only callback is not sufficient for review.
|
|
199
|
+
- AKK re-evaluates the evidence and revalidates the process and pane immediately before sending one Enter.
|
|
239
200
|
|
|
240
201
|
Unknown, stale, changed, ambiguous, or unmanaged dialogs fail closed and must be resolved in the terminal.
|
|
241
202
|
|
|
@@ -253,60 +214,65 @@ autoApprove: {
|
|
|
253
214
|
}
|
|
254
215
|
```
|
|
255
216
|
|
|
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.
|
|
217
|
+
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.
|
|
218
|
+
|
|
219
|
+
## Trust and Privacy
|
|
220
|
+
|
|
221
|
+
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.
|
|
222
|
+
|
|
223
|
+
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.
|
|
224
|
+
|
|
225
|
+
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
226
|
|
|
258
227
|
## Troubleshooting
|
|
259
228
|
|
|
260
|
-
With the global npm CLI installed, start with `agent-knock-knock doctor
|
|
229
|
+
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
230
|
|
|
262
231
|
| Symptom | Action |
|
|
263
232
|
| --- | --- |
|
|
233
|
+
| No eligible terminal is available | Start Codex or Claude Code inside tmux as the same OS user, then run `AKK list`. |
|
|
264
234
|
| The npm installer or callbacks cannot find a local OpenClaw CLI | Set `openclawBin` and pass `--openclaw-bin` to `install-openclaw`. |
|
|
265
235
|
| Source changes do not appear | Build, reinstall from the checkout, and restart the Gateway. |
|
|
266
|
-
| Terminal
|
|
267
|
-
| ACPX task is `stalled` | Inspect `status --trace`; close and redelegate if the executor cannot continue. |
|
|
236
|
+
| 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
237
|
| Task is `callback_failed` | Run `/akk retry-callback only` when it is the only actionable failed callback, or use its `@short-ref`. |
|
|
269
|
-
|
|
|
270
|
-
| Claude permission is not offered through AKK |
|
|
271
|
-
| Claude request was not auto-approved | Check `autoApprove.enabled`,
|
|
272
|
-
| Claude
|
|
238
|
+
| `AKK list` reports an orphaned terminal dispatch | Inspect the named pane first, then run the exact `/akk close ... --expected-message-id ...` recovery command returned by `list`. AKK leaves the coding agent and tmux pane running. |
|
|
239
|
+
| 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. |
|
|
240
|
+
| 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. |
|
|
241
|
+
| 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
242
|
|
|
274
|
-
For local diagnostics
|
|
243
|
+
For local diagnostics:
|
|
275
244
|
|
|
276
245
|
```bash
|
|
277
246
|
agent-knock-knock status --conversation latest --trace
|
|
278
247
|
agent-knock-knock list --terminal-debug
|
|
279
|
-
agent-knock-knock list --managed-only
|
|
280
248
|
```
|
|
281
249
|
|
|
282
|
-
|
|
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:
|
|
250
|
+
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
251
|
|
|
286
252
|
```bash
|
|
287
|
-
|
|
288
|
-
AKK_RUN_LIVE_TMUX_SMOKE=1
|
|
253
|
+
npm run build
|
|
254
|
+
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
255
|
```
|
|
290
256
|
|
|
291
|
-
|
|
257
|
+
This command can use coding-agent credentials and may incur cost. Read the warning before opting in.
|
|
292
258
|
|
|
293
259
|
## Development
|
|
294
260
|
|
|
295
261
|
```bash
|
|
296
|
-
npm run build
|
|
297
|
-
npm run typecheck
|
|
298
|
-
npm test
|
|
262
|
+
npm run build
|
|
263
|
+
npm run typecheck
|
|
264
|
+
npm test
|
|
299
265
|
```
|
|
300
266
|
|
|
301
267
|
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
268
|
|
|
303
269
|
### ClawHub Maintainer Release
|
|
304
270
|
|
|
305
|
-
The package is configured for ClawHub trusted publishing. Dispatch the `ClawHub Publish` workflow
|
|
271
|
+
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
272
|
|
|
307
273
|
```bash
|
|
308
|
-
gh workflow run clawhub-publish.yml --ref
|
|
309
|
-
gh workflow run clawhub-publish.yml --ref
|
|
274
|
+
gh workflow run clawhub-publish.yml --ref vX.Y.Z -f dry_run=true
|
|
275
|
+
gh workflow run clawhub-publish.yml --ref vX.Y.Z -f dry_run=false
|
|
310
276
|
```
|
|
311
277
|
|
|
312
278
|
## Storage and Logs
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ActiveCodexProcess,
|
|
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
|
}
|
|
@@ -26,7 +26,7 @@ export function approvalCandidateFromMessage(message) {
|
|
|
26
26
|
agent,
|
|
27
27
|
kind,
|
|
28
28
|
fingerprint,
|
|
29
|
-
...(candidate?.decision_mode === "
|
|
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,C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|
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
|
-
/**
|
|
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
|
};
|