@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.
- package/CHANGELOG.md +19 -0
- package/README.md +61 -30
- package/dist/src/cli.js +3 -2
- package/dist/src/cli.js.map +1 -1
- package/dist/src/openclaw-doctor.js +3 -1
- package/dist/src/openclaw-doctor.js.map +1 -1
- package/dist/src/openclaw-plugin-helpers.d.ts +2 -0
- package/dist/src/openclaw-plugin-helpers.js +27 -6
- package/dist/src/openclaw-plugin-helpers.js.map +1 -1
- package/dist/src/openclaw-plugin.js +12 -15
- package/dist/src/openclaw-plugin.js.map +1 -1
- package/dist/src/terminal-process-source.js +3 -2
- package/dist/src/terminal-process-source.js.map +1 -1
- package/docs/quickstart-tmux.md +73 -18
- package/openclaw.plugin.json +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.2 - 2026-07-30
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Keep macOS tmux workspace revalidation reliable when `lsof` returns usable cwd rows with a partial-failure status.
|
|
8
|
+
- Limit cwd lookups to the expected coding-agent PID while retaining ancestry checks and failing closed when target cwd evidence is absent.
|
|
9
|
+
|
|
10
|
+
## 0.5.1 - 2026-07-29
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Put one complete ClawHub-first path from installation through workspace setup, Gateway restart, tmux startup, diagnostics, and the first task at the top of the README.
|
|
15
|
+
- Separate direct `/akk` usage from optional natural-language tool access and keep the npm installer as an alternative path.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- Fail closed with actionable setup guidance when the plugin workspace is missing or non-absolute instead of falling back to the Gateway working directory.
|
|
20
|
+
- Keep `/akk doctor` available to diagnose invalid workspace configuration.
|
|
21
|
+
|
|
3
22
|
## 0.5.0 - 2026-07-29
|
|
4
23
|
|
|
5
24
|
### Changed
|
package/README.md
CHANGED
|
@@ -9,6 +9,41 @@ Agent Knock Knock lets OpenClaw control local Codex and Claude Code through shar
|
|
|
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
|
+
## Quick Start with ClawHub
|
|
13
|
+
|
|
14
|
+
AKK reuses Codex or Claude Code already running in tmux; it never launches a coding agent. You need OpenClaw `2026.6.5`+, tmux, and an authenticated `codex` or `claude` CLI, all running as the same OS user.
|
|
15
|
+
|
|
16
|
+
From the project AKK may edit:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
cd /absolute/path/to/project
|
|
20
|
+
openclaw plugins install clawhub:@scotthuang/agent-knock-knock
|
|
21
|
+
openclaw config set plugins.entries.agent-knock-knock.config.workspace "$(pwd -P)"
|
|
22
|
+
openclaw gateway restart
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Start the shared coding-agent terminal:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
tmux new-session -s akk-work -c "$(pwd -P)" codex
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Use `claude` instead of `codex` if preferred. Wait for the coding agent's idle prompt, then detach from tmux with `Ctrl-b`, followed by `d`.
|
|
32
|
+
|
|
33
|
+
From any configured OpenClaw channel, first send:
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
/akk doctor
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
After doctor reports `AKK doctor: ready`, send a separate message:
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
/akk inspect this repository and summarize it
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The second command proves that AKK can find the pane, send work in the configured workspace, and return the result. Direct `/akk ...` commands need no OpenClaw tool-policy changes.
|
|
46
|
+
|
|
12
47
|
## See It in Action
|
|
13
48
|
|
|
14
49
|
[](https://github.com/scotthuang/agent-knock-knock/blob/main/docs/assets/akk-tmux-handoff-demo.mp4)
|
|
@@ -35,7 +70,26 @@ AKK connects OpenClaw to Codex or Claude Code already running inside tmux:
|
|
|
35
70
|
|
|
36
71
|
AKK is local-first. It has no hosted control plane or telemetry and does not change the coding agent's configured permission mode.
|
|
37
72
|
|
|
38
|
-
##
|
|
73
|
+
## Optional: Natural-Language Delegation
|
|
74
|
+
|
|
75
|
+
The quick start uses direct `/akk ...` commands, which bypass the model and work without plugin tool access. To let OpenClaw decide to use AKK from a natural-language request, grant the optional `agent-knock-knock` tools in the applicable tool policy.
|
|
76
|
+
|
|
77
|
+
If you use the default `coding` profile and do not already have `tools.allow`, add AKK without replacing the profile:
|
|
78
|
+
|
|
79
|
+
```json5
|
|
80
|
+
{
|
|
81
|
+
tools: {
|
|
82
|
+
profile: "coding",
|
|
83
|
+
alsoAllow: ["agent-knock-knock"]
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
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.
|
|
89
|
+
|
|
90
|
+
Restart the Gateway after changing the tool policy.
|
|
91
|
+
|
|
92
|
+
## Installation Details
|
|
39
93
|
|
|
40
94
|
Requirements:
|
|
41
95
|
|
|
@@ -53,42 +107,19 @@ Requirements:
|
|
|
53
107
|
|
|
54
108
|
The compatibility suite tests the normal installation floor and the Plugin API boundary with isolated state and the real packed artifact.
|
|
55
109
|
|
|
56
|
-
### Install from ClawHub (recommended)
|
|
57
|
-
|
|
58
|
-
From the project the agents may edit:
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
openclaw plugins install clawhub:@scotthuang/agent-knock-knock
|
|
62
|
-
openclaw config set plugins.entries.agent-knock-knock.config.workspace "$PWD"
|
|
63
|
-
openclaw gateway restart
|
|
64
|
-
```
|
|
65
|
-
|
|
66
110
|
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
111
|
|
|
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.
|
|
80
|
-
|
|
81
112
|
If you also want standalone shell commands such as `agent-knock-knock doctor`, install the npm package globally without running `install-openclaw`:
|
|
82
113
|
|
|
83
114
|
```bash
|
|
84
115
|
npm install -g @scotthuang/agent-knock-knock
|
|
85
116
|
```
|
|
86
117
|
|
|
87
|
-
### Install from npm
|
|
118
|
+
### Alternative: Install from npm
|
|
88
119
|
|
|
89
120
|
```bash
|
|
90
121
|
npm install -g @scotthuang/agent-knock-knock
|
|
91
|
-
agent-knock-knock install-openclaw --workspace "$
|
|
122
|
+
agent-knock-knock install-openclaw --workspace "$(pwd -P)" --verify
|
|
92
123
|
```
|
|
93
124
|
|
|
94
125
|
`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.
|
|
@@ -99,7 +130,7 @@ If OpenClaw runs from a local checkout or another nonstandard location, pass its
|
|
|
99
130
|
agent-knock-knock install-openclaw --openclaw-bin /path/to/openclaw/openclaw.mjs
|
|
100
131
|
```
|
|
101
132
|
|
|
102
|
-
##
|
|
133
|
+
## Shared Terminal Details
|
|
103
134
|
|
|
104
135
|
Install tmux on macOS:
|
|
105
136
|
|
|
@@ -116,7 +147,7 @@ sudo apt-get install tmux
|
|
|
116
147
|
Then start Codex in a shared terminal:
|
|
117
148
|
|
|
118
149
|
```bash
|
|
119
|
-
tmux new-session -s akk-work -c "$
|
|
150
|
+
tmux new-session -s akk-work -c "$(pwd -P)" codex
|
|
120
151
|
```
|
|
121
152
|
|
|
122
153
|
Use `claude` instead of `codex` for Claude Code. Detach with `Ctrl-b`, then `d`. AKK discovers the pane automatically.
|
|
@@ -173,11 +204,11 @@ If no eligible pane exists, AKK stops with setup guidance. If a send is ambiguou
|
|
|
173
204
|
|
|
174
205
|
## Configuration
|
|
175
206
|
|
|
176
|
-
AKK reads these options from `plugins.entries.agent-knock-knock.config`. The npm installer writes the common options; the ClawHub
|
|
207
|
+
AKK reads these options from `plugins.entries.agent-knock-knock.config`. The npm installer writes the common options; the ClawHub quick start shows the equivalent manual setup.
|
|
177
208
|
|
|
178
209
|
| Option | Default | Purpose |
|
|
179
210
|
| --- | --- | --- |
|
|
180
|
-
| `workspace` |
|
|
211
|
+
| `workspace` | Required before use | Absolute, canonical working directory matched against eligible terminal panes. Runtime operations fail closed when it is missing. |
|
|
181
212
|
| `storeDir` | `~/.agent-knock-knock/conversations` | Conversation state location; relative plugin paths resolve from `workspace`. |
|
|
182
213
|
| `openclawBin` | Auto-detected | OpenClaw CLI used for callback delivery. |
|
|
183
214
|
| `codexHome` | Auto-detected | Optional Codex home used to identify Codex sessions running in tmux. |
|
package/dist/src/cli.js
CHANGED
|
@@ -653,8 +653,9 @@ function createTerminalAgentBridge(options, terminalProvider = createTerminalCon
|
|
|
653
653
|
terminalProvider,
|
|
654
654
|
async verifyIdentity({ agent, pid, terminalControl }) {
|
|
655
655
|
const adapter = registry.require(agent);
|
|
656
|
-
const snapshots = await processSource.listProcessSnapshots(
|
|
657
|
-
includeCwd: options.workspace !== undefined
|
|
656
|
+
const snapshots = await processSource.listProcessSnapshots((candidate) => candidate.pid === pid, {
|
|
657
|
+
includeCwd: options.workspace !== undefined,
|
|
658
|
+
includeAncestors: true
|
|
658
659
|
});
|
|
659
660
|
const snapshot = snapshots.find((candidate) => candidate.pid === pid);
|
|
660
661
|
if (!snapshot || !adapter.classifyProcess(snapshot)) {
|