@scotthuang/agent-knock-knock 0.4.0 → 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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.0 - 2026-07-29
4
+
5
+ ### Changed
6
+
7
+ - Make already-running, verified-idle Codex and Claude Code tmux panes the only delegation targets.
8
+ - Resolve bare `/akk <task>` only when exactly one eligible idle pane exists in the configured workspace, and use `/akk <selector>: <message>` for an explicit target.
9
+ - Enforce the configured workspace as a hard boundary even for explicit terminal IDs and recovery operations.
10
+ - Keep the main command surface focused on task routing, listing, status, and cancellation; keep diagnostics, approvals, and recovery operations in their relevant workflows.
11
+
12
+ ### Removed
13
+
14
+ - Remove configuration-based default-agent routing and the `--default-agent` installer option.
15
+ - Remove obsolete session inspection and attachment surfaces from the user-facing workflow.
16
+
3
17
  ## 0.4.0 - 2026-07-29
4
18
 
5
19
  ### Changed
package/README.md CHANGED
@@ -13,7 +13,7 @@ Agent Knock Knock lets OpenClaw control local Codex and Claude Code through shar
13
13
 
14
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. AKK keeps the agents' existing permission settings. 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 control. AKK keeps the agents' existing permission settings. Click the preview to watch in full quality.*
17
17
 
18
18
  ## Use Cases
19
19
 
@@ -60,12 +60,9 @@ From the project the agents may edit:
60
60
  ```bash
61
61
  openclaw plugins install clawhub:@scotthuang/agent-knock-knock
62
62
  openclaw config set plugins.entries.agent-knock-knock.config.workspace "$PWD"
63
- openclaw config set plugins.entries.agent-knock-knock.config.defaultAgent codex
64
63
  openclaw gateway restart
65
64
  ```
66
65
 
67
- Use `claude` instead of `codex` when preferred.
68
-
69
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.
70
67
 
71
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:
@@ -91,10 +88,10 @@ npm install -g @scotthuang/agent-knock-knock
91
88
 
92
89
  ```bash
93
90
  npm install -g @scotthuang/agent-knock-knock
94
- agent-knock-knock install-openclaw --workspace "$PWD" --default-agent codex --verify
91
+ agent-knock-knock install-openclaw --workspace "$PWD" --verify
95
92
  ```
96
93
 
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.
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.
98
95
 
99
96
  If OpenClaw runs from a local checkout or another nonstandard location, pass its CLI explicitly:
100
97
 
@@ -142,42 +139,37 @@ For one complete first run, follow [Agent Knock Knock in 5 minutes](https://gith
142
139
 
143
140
  ## Usage
144
141
 
145
- Use conversational `AKK` prompts on any chat surface. Explicit agent names override the configured default:
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.
143
+
144
+ If exactly one idle coding-agent pane matches the workspace, send a task directly:
145
+
146
+ ```text
147
+ /akk inspect this repository and summarize it
148
+ ```
149
+
150
+ If more than one pane is available, name the target before the colon:
146
151
 
147
152
  ```text
148
- AKK Codex: inspect this repository and summarize it
149
- AKK Claude: review the latest commit
150
- AKK describe latest
153
+ /akk codex: inspect this repository and summarize it
154
+ /akk claude: review the latest commit
155
+ /akk @a1b2c3d4: run the focused tests
151
156
  ```
152
157
 
153
- Surfaces with native commands use the same operations:
158
+ The core command surface is intentionally small:
154
159
 
155
160
  ```text
156
161
  /akk <task>
162
+ /akk <selector>: <message>
157
163
  /akk list
158
- /akk doctor
159
164
  /akk status [only|latest|codex|claude|@short-ref]
160
- /akk describe [session-selector]
161
- /akk send <session-selector>: <message>
162
- /akk approve <session-selector> --expected-approval-fingerprint <fingerprint>
163
165
  /akk cancel <session-selector>
164
- /akk renew <session-selector> [minutes]
165
- /akk retry-callback <session-selector>
166
- /akk close <session-selector> [--expected-message-id <id>] [reason]
167
166
  ```
168
167
 
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.
170
-
171
- You can also send directly to a terminal entry returned by `AKK list`:
172
-
173
- ```text
174
- AKK send codex: continue with the smaller implementation
175
- AKK send @a1b2c3d4: run the focused tests
176
- ```
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.
177
169
 
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.
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.
179
171
 
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.
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`.
181
173
 
182
174
  ## Configuration
183
175
 
@@ -185,7 +177,6 @@ AKK reads these options from `plugins.entries.agent-knock-knock.config`. The npm
185
177
 
186
178
  | Option | Default | Purpose |
187
179
  | --- | --- | --- |
188
- | `defaultAgent` | `codex` | Agent used when a request does not name one: `codex` or `claude`. |
189
180
  | `workspace` | OpenClaw process directory | Working directory matched against eligible terminal panes. |
190
181
  | `storeDir` | `~/.agent-knock-knock/conversations` | Conversation state location; relative plugin paths resolve from `workspace`. |
191
182
  | `openclawBin` | Auto-detected | OpenClaw CLI used for callback delivery. |
@@ -204,7 +195,7 @@ For Claude Code, manual approval is deliberately narrow:
204
195
 
205
196
  - It is available only for the current AKK-managed turn.
206
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.
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.
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.
208
199
  - AKK re-evaluates the evidence and revalidates the process and pane immediately before sending one Enter.
209
200
 
210
201
  Unknown, stale, changed, ambiguous, or unmanaged dialogs fail closed and must be resolved in the terminal.
@@ -244,6 +235,7 @@ With the global npm CLI installed, start with `agent-knock-knock doctor`. It run
244
235
  | Source changes do not appear | Build, reinstall from the checkout, and restart the Gateway. |
245
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. |
246
237
  | Task is `callback_failed` | Run `/akk retry-callback only` when it is the only actionable failed callback, or use its `@short-ref`. |
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. |
247
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. |
248
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. |
249
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. |