@scotthuang/agent-knock-knock 0.5.0 → 0.5.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.
@@ -1,47 +1,102 @@
1
1
  # Agent Knock Knock in 5 Minutes
2
2
 
3
- This is the canonical Agent Knock Knock setup: OpenClaw and a human share the same live Codex or Claude Code terminal. You need a Node.js version supported by your OpenClaw release (Node.js 24 LTS recommended), OpenClaw `2026.6.5`+, tmux, and an authenticated `codex` or `claude` CLI, all running as the same OS user.
3
+ This is the canonical ClawHub setup: OpenClaw and a human share one live Codex or Claude Code terminal without changing the coding agent's permission mode.
4
4
 
5
- ## 1. Install and configure
5
+ ## Before you start
6
6
 
7
- From the project the agent may edit:
7
+ You need:
8
8
 
9
- ```bash
10
- npm install -g @scotthuang/agent-knock-knock && agent-knock-knock install-openclaw --workspace "$PWD" --verify
11
- ```
9
+ - A Node.js version supported by OpenClaw; Node.js 24 LTS is recommended
10
+ - OpenClaw `2026.6.5` or newer
11
+ - tmux
12
+ - An installed and authenticated `codex` or `claude` CLI
13
+ - OpenClaw, tmux, and the coding agent running as the same OS user
12
14
 
13
- The installer updates only AKK's enabled flag and workspace. Existing plugin settings—including `autoApprove` rules—remain intact, and the Gateway restarts at most once.
15
+ AKK reuses a coding agent that you start in tmux. It never installs, authenticates, or launches Codex or Claude Code for you.
14
16
 
15
- ## 2. Run doctor
17
+ ## 1. Install AKK for one project
18
+
19
+ Run these commands from the project AKK may edit:
16
20
 
17
21
  ```bash
18
- agent-knock-knock doctor
22
+ cd /absolute/path/to/project
23
+ openclaw plugins install clawhub:@scotthuang/agent-knock-knock
24
+ openclaw config set plugins.entries.agent-knock-knock.config.workspace "$(pwd -P)"
25
+ openclaw gateway restart
19
26
  ```
20
27
 
21
- Success means `readiness` is `ready`, at least one supported CLI can return a version, the AKK runtime and skill are loaded, the workspace is canonical, and the Gateway is healthy. Doctor does not make a credentialed model call.
28
+ The physical path from `pwd -P` gives AKK one canonical workspace boundary. The ClawHub package includes the OpenClaw plugin, bundled AKK skill, and its package-local relay CLI.
22
29
 
23
- ## 3. Start the shared terminal
30
+ ## 2. Start the shared terminal
24
31
 
25
32
  ```bash
26
- tmux new-session -s akk-work -c "$PWD" codex
33
+ tmux new-session -s akk-work -c "$(pwd -P)" codex
27
34
  ```
28
35
 
29
- Use `claude` instead of `codex` to share a Claude Code terminal. Detach with `Ctrl-b`, then `d`.
36
+ Use `claude` instead of `codex` to share a Claude Code terminal. Wait until the coding agent is authenticated and showing its idle prompt. Detach from tmux with `Ctrl-b`, followed by `d`.
30
37
 
31
- AKK does not launch coding agents. It sends work only to a matching Codex or Claude Code pane that you already started and that is currently at a verified idle prompt.
38
+ AKK sends work only to a matching Codex or Claude Code pane that is already running and idle inside the configured workspace.
32
39
 
33
- ## 4. Send one chat command
40
+ ## 3. Run doctor
34
41
 
35
42
  From any configured OpenClaw channel:
36
43
 
44
+ ```text
45
+ /akk doctor
46
+ ```
47
+
48
+ Success starts with:
49
+
50
+ ```text
51
+ AKK doctor: ready
52
+ ```
53
+
54
+ Doctor verifies the installed plugin and skill, canonical workspace, Gateway health, tmux, and at least one supported coding-agent CLI. It does not make a credentialed model call or require a live pane.
55
+
56
+ ## 4. Send the first task
57
+
37
58
  ```text
38
59
  /akk inspect this repository and summarize it
39
60
  ```
40
61
 
41
- Because this quickstart starts one coding-agent pane in the configured workspace, the bare task resolves when exactly one eligible idle pane exists. If multiple panes are eligible, AKK stops instead of guessing: run `/akk list`, then target one explicitly with `/akk <selector>: <message>`, for example `/akk @a1b2c3d4: inspect this repository and summarize it`.
62
+ The bare task works when exactly one eligible idle coding-agent pane exists in the configured workspace. If more than one pane is eligible, AKK stops instead of guessing: run `/akk list`, then use `/akk <selector>: <message>`, for example:
63
+
64
+ ```text
65
+ /akk @a1b2c3d4: inspect this repository and summarize it
66
+ ```
67
+
68
+ Success returns a managed conversation and, when the task finishes, its result. The same tmux pane remains available for direct human control; reattach with `tmux attach -t akk-work`.
69
+
70
+ ## Optional: Enable natural-language delegation
71
+
72
+ Direct `/akk ...` commands work without changing the OpenClaw tool policy. To let OpenClaw decide to use AKK from a natural-language request, grant the optional `agent-knock-knock` tools in the applicable policy.
73
+
74
+ If you use the default `coding` profile and do not already have `tools.allow`:
75
+
76
+ ```json5
77
+ {
78
+ tools: {
79
+ profile: "coding",
80
+ alsoAllow: ["agent-knock-knock"]
81
+ }
82
+ }
83
+ ```
84
+
85
+ If a restrictive `tools.allow` list already exists at that scope, add `"agent-knock-knock"` to that list instead. Do not configure `allow` and `alsoAllow` at the same scope.
86
+
87
+ Restart the Gateway after changing the tool policy.
88
+
89
+ ## Alternative: Install from npm
90
+
91
+ Use this route only when you also want the standalone `agent-knock-knock` shell command:
92
+
93
+ ```bash
94
+ npm install -g @scotthuang/agent-knock-knock
95
+ agent-knock-knock install-openclaw --workspace "$(pwd -P)" --verify
96
+ ```
42
97
 
43
- Success returns a managed conversation while the same tmux pane remains available for direct human control.
98
+ Do not run `install-openclaw` after a ClawHub install. The two commands are alternative installation paths.
44
99
 
45
100
  ## Permissions and monitoring
46
101
 
47
- AKK keeps the coding agent's own permission settings. Trusted, exact `autoApprove` rules may approve a supported prompt; everything else remains manual. Reattach with `tmux attach -t akk-work` whenever you want to take over. If monitoring stalls while the same task is still live, inspect `/akk status only` and use `/akk renew only <minutes>` to resume monitoring without sending terminal input.
102
+ AKK keeps the coding agent's own permission settings. Trusted, exact `autoApprove` rules may approve a supported prompt; everything else remains manual. If monitoring stalls while the same task is still live, inspect `/akk status only` and use `/akk renew only <minutes>` to resume monitoring without sending terminal input.
@@ -64,7 +64,8 @@
64
64
  },
65
65
  "workspace": {
66
66
  "type": "string",
67
- "description": "Workspace matched against eligible coding-agent tmux panes."
67
+ "minLength": 1,
68
+ "description": "Absolute project directory matched against eligible coding-agent tmux panes. Configure this before using AKK; runtime operations fail closed when it is missing."
68
69
  },
69
70
  "storeDir": {
70
71
  "type": "string",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scotthuang/agent-knock-knock",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "Control local Codex and Claude Code from OpenClaw through shared tmux terminals, with seamless human-agent handoff.",
5
5
  "license": "MIT",
6
6
  "type": "module",