@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.
- package/CHANGELOG.md +9 -571
- package/README.md +97 -123
- 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 +1489 -3406
- 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 +1 -1
- package/dist/src/openclaw-doctor.js +1 -1
- package/dist/src/openclaw-doctor.js.map +1 -1
- package/dist/src/openclaw-plugin-helpers.d.ts +5 -8
- package/dist/src/openclaw-plugin-helpers.js +57 -40
- package/dist/src/openclaw-plugin-helpers.js.map +1 -1
- package/dist/src/openclaw-plugin.js +138 -248
- 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 +7 -7
- package/openclaw.plugin.json +4 -83
- package/package.json +7 -15
- package/templates/openclaw-skills/agent-knock-knock/SKILL.md +94 -147
- 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
|
@@ -1,209 +1,156 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: agent-knock-knock
|
|
3
|
-
description:
|
|
3
|
+
description: Control local Codex and Claude Code through shared tmux terminals with Agent Knock Knock.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Agent Knock Knock
|
|
7
7
|
|
|
8
|
-
Use this skill when the user
|
|
8
|
+
Use this skill when the user explicitly invokes `AKK`, `akk`, or `Agent Knock Knock`, or asks OpenClaw to inspect or control a coding-agent terminal previously listed by AKK.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
AKK supports Codex and Claude Code running inside tmux. It does not launch a hidden coding-agent runtime. OpenClaw, tmux, AKK, and the coding agent must run as the same OS user.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Treat `AKK` and `akk` the same way.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Default delegation target: plugin-configured `defaultAgent`. If unset, AKK uses Codex. Use Claude only when the user names Claude or it is the configured default.
|
|
15
15
|
|
|
16
16
|
## Role
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
You are not a message forwarder and you are not the primary implementation agent. You understand the user's request, define the product intent, make autonomous product decisions, delegate implementation to a local coding agent, handle the coding agent's questions or blockers, verify whether the delivered result satisfies the request, and return only the final delivery result or failure reason to the user.
|
|
18
|
+
OpenClaw interprets the user's request, delegates the requested work, handles actionable callbacks, and reports the outcome. The coding agent performs the engineering work in its existing tmux terminal.
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
The delegated coding agent owns engineering execution. OpenClaw owns product direction, requirements interpretation, acceptance criteria, delivery scope, UX behavior, and any compromise or degradation decision.
|
|
20
|
+
Keep the user's requested scope and approval boundaries. Do not expand a task, approve a permission, interrupt a process, or close a session unless the user request or an explicit trusted policy authorizes that action.
|
|
25
21
|
|
|
26
22
|
## Chat Routing
|
|
27
23
|
|
|
28
|
-
Use the native `/akk` command
|
|
24
|
+
Use the native `/akk` command for slash-command syntax. Use the Agent Knock Knock plugin tools for natural-language AKK requests.
|
|
29
25
|
|
|
30
26
|
Slash command forms:
|
|
31
27
|
|
|
32
|
-
- `/akk <task>`:
|
|
33
|
-
- `/akk codex <task>`:
|
|
34
|
-
- `/akk claude <task>`:
|
|
35
|
-
- `/akk
|
|
36
|
-
- `/akk
|
|
37
|
-
- `/akk
|
|
38
|
-
- `/akk
|
|
39
|
-
- `/akk
|
|
40
|
-
- `/akk
|
|
41
|
-
- `/akk
|
|
42
|
-
- `/akk
|
|
43
|
-
- `/akk
|
|
44
|
-
|
|
45
|
-
|
|
28
|
+
- `/akk <task>`: send a new task to the configured default agent.
|
|
29
|
+
- `/akk codex <task>`: send a new task to Codex.
|
|
30
|
+
- `/akk claude <task>`: send a new task to Claude Code.
|
|
31
|
+
- `/akk list`: list available and managed coding-agent terminals.
|
|
32
|
+
- `/akk doctor`: verify AKK, OpenClaw, tmux, and coding-agent readiness.
|
|
33
|
+
- `/akk status [session-selector]`: inspect one managed terminal turn.
|
|
34
|
+
- `/akk describe [session-selector]`: summarize one listed session.
|
|
35
|
+
- `/akk send <session-selector>: <message>`: send a follow-up to one open terminal session.
|
|
36
|
+
- `/akk cancel <session-selector>`: interrupt the current turn without closing its tmux pane.
|
|
37
|
+
- `/akk renew <session-selector> [minutes]`: restart monitoring for a stalled but still-live terminal turn.
|
|
38
|
+
- `/akk retry-callback <session-selector>`: retry one failed callback delivery.
|
|
39
|
+
- `/akk approve <session-selector> --expected-approval-fingerprint <fingerprint>`: approve one exact, current terminal permission request after explicit review. Use only the fresh fingerprint returned for that request.
|
|
40
|
+
- `/akk close <session-selector> [reason]`: close AKK's managed conversation without closing the tmux pane. If `AKK list` explicitly reports an orphaned terminal dispatch, inspect the pane first and use the exact `/akk close <terminal-id> --expected-message-id <id>` recovery command it returns; never invent or reuse that message id.
|
|
41
|
+
|
|
42
|
+
A session selector may be an authoritative full ID, an `@short-ref` returned by `AKK list`, `only`, `latest`, an agent name (`codex` or `claude`), or `<agent>:latest`. Selectors fail closed when the target is missing or ambiguous. Use `latest` only when the user explicitly asks for the newest session.
|
|
46
43
|
|
|
47
44
|
Natural-language forms:
|
|
48
45
|
|
|
49
|
-
- `AKK: <task
|
|
46
|
+
- `AKK: <task>`: call `agent_knock_knock_delegate` with `request=<task>` and no `agent`.
|
|
50
47
|
- `AKK Codex: <task>`: call `agent_knock_knock_delegate` with `agent="codex"`.
|
|
51
48
|
- `AKK Claude: <task>`: call `agent_knock_knock_delegate` with `agent="claude"`.
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
- `AKK recover <session-selector>`: call `agent_knock_knock_recover`.
|
|
60
|
-
- `AKK close <session-selector>`: call `agent_knock_knock_close`.
|
|
61
|
-
- `AKK takeover Codex <session-id>` or requests to take over an active Codex CLI session: call `agent_knock_knock_agent_takeover` with `agent="codex"` and `strategy="terminate_then_resume"`.
|
|
62
|
-
- `AKK terminal takeover Codex <session-id>` or requests to take over a Codex CLI that is running inside a controllable terminal provider without stopping it: call `agent_knock_knock_agent_takeover` with `agent="codex"` and `strategy="terminal_control"`.
|
|
63
|
-
- `AKK approve <conversation-id>` or requests to approve a terminal-controlled permission or command prompt: this is the manual path. First call `agent_knock_knock_status` and show the detected request details to the user. For hookless Claude, the callback intentionally omits the raw command; require the user to personally inspect the named live tmux pane and never approve from a hash or summary alone. Only after the user explicitly approves that exact request, call `agent_knock_knock_approve` with its `approval_state.fingerprint` as `expected_approval_fingerprint`. Codex and Claude Code both use the current visible prompt; Claude manual approval is limited to a strict one-time `Yes` Bash dialog in the current AKK-managed turn. A trusted, default-disabled plugin `autoApprove` policy may act independently when the Claude command, workspace, screen, and local transcript evidence match exactly; the model cannot configure that policy. If an AKK callback says a terminal bridge session is waiting for approval, pass its fingerprint the same way; deny it with `agent_knock_knock_cancel`. Unknown, stale, expired, ambiguous, persistent-permission, or changed requests must never be approved. Codex visible-prompt approval can also work without managed state; Claude requires the managed conversation returned by a prior background send.
|
|
64
|
-
- `AKK takeover Codex <session-id> with fork`, `AKK fork takeover Codex <session-id>`, or requests to take over without stopping the original Codex CLI: call `agent_knock_knock_agent_takeover` with `agent="codex"` and `strategy="fork"`.
|
|
65
|
-
|
|
66
|
-
Session reuse rule:
|
|
67
|
-
|
|
68
|
-
- If the user asks to continue, add, follow up, "send another task", "let it also", "tell it", "ask Codex/Claude/Cursor to also", "再让它", "继续让它", "给刚才那个", or otherwise refers to an existing AKK agent, reuse it only when the referenced open session is uniquely identifiable.
|
|
69
|
-
- When the user gives a follow-up without a `conversation_id`, first call `agent_knock_knock_list`. Reuse the session only when exactly one actionable row matches the user's wording. If multiple rows match, show their `short_ref`, agent, and description and ask the user to choose. If the user explicitly says latest/newest, use `latest` or `<agent>:latest`; AKK will still reject recency ties.
|
|
70
|
-
- After `AKK list`, if the user refers to any listed row by id, tmux target, pane number, session name, ordinal ("first/second/that one"), cwd, or visible description and asks to send or assign work to it, resolve that listed row and call `agent_knock_knock_send`. For `terminal_controlled` rows, pass the row's `id` such as `terminal:v2:tmux:codex:my-work:0.1:38140`; do not create a new AKK delegation.
|
|
71
|
-
- `idle` means the agent completed the previous round but the AKK session is still open and should be reused for follow-ups.
|
|
72
|
-
- `send` automatically falls back to AKK replay recovery when the previous coding-agent session is unavailable. If AKK still reports `needs_recovery`, ask the user to choose `AKK recover <session-selector>`, `AKK close <session-selector>`, or starting a new independent AKK delegation.
|
|
73
|
-
- Call `agent_knock_knock_delegate` only when the user clearly asks for a new independent AKK task/session, names a different agent that does not already have a suitable open session, or there is no matching open session to reuse.
|
|
74
|
-
|
|
75
|
-
Useful examples:
|
|
76
|
-
|
|
77
|
-
```text
|
|
78
|
-
akk: fix the failing tests in this project
|
|
79
|
-
AKK Codex: review the current branch and propose a small fix
|
|
80
|
-
AKK Claude: review the latest commit
|
|
81
|
-
AKK Cursor: fix the flaky UI test
|
|
82
|
-
akk list
|
|
83
|
-
akk describe task-20260618T010203Z-abcdef12
|
|
84
|
-
akk send task-20260618T010203Z-abcdef12: continue with the smaller implementation
|
|
85
|
-
akk send terminal:v2:tmux:codex:my-work:0.1:38140: hello 测试一下通信
|
|
86
|
-
akk send terminal:v2:tmux:claude:claude-work:0.1:29466: review the current changes
|
|
87
|
-
给 AKK list 里的 my-work:0.1 发一条消息:继续刚才的任务
|
|
88
|
-
再让刚才那个 Codex 分析 ~/chrome-debug 为什么占空间
|
|
89
|
-
akk cancel task-20260618T010203Z-abcdef12
|
|
90
|
-
akk recover task-20260618T010203Z-abcdef12
|
|
91
|
-
akk close task-20260618T010203Z-abcdef12
|
|
92
|
-
akk takeover codex 019ee559-7bb8-7fd1-970c-0f7b6978c44e
|
|
93
|
-
akk terminal takeover codex 019ee559-7bb8-7fd1-970c-0f7b6978c44e
|
|
94
|
-
akk approve task-20260618T010203Z-abcdef12
|
|
95
|
-
```
|
|
49
|
+
- Requests to list AKK or local coding-agent work: call `agent_knock_knock_list`.
|
|
50
|
+
- Requests to inspect current output or ask what a task is doing: call `agent_knock_knock_status`.
|
|
51
|
+
- Requests to summarize what a listed session is about: call `agent_knock_knock_describe`.
|
|
52
|
+
- Follow-ups for an existing listed session: call `agent_knock_knock_send`.
|
|
53
|
+
- Requests to stop current work: call `agent_knock_knock_cancel`.
|
|
54
|
+
- Requests to resume monitoring for the same stalled terminal turn: call `agent_knock_knock_renew`.
|
|
55
|
+
- Requests to close AKK's record for a terminal turn: call `agent_knock_knock_close`.
|
|
96
56
|
|
|
97
|
-
##
|
|
57
|
+
## Starting and Reusing Work
|
|
98
58
|
|
|
99
|
-
Use
|
|
59
|
+
Use `agent_knock_knock_delegate` only for a new independent task. AKK must resolve an eligible Codex or Claude Code pane and verify that it is idle before writing the task. If no eligible pane exists, report AKK's setup guidance; do not substitute another execution path.
|
|
100
60
|
|
|
101
|
-
|
|
61
|
+
For a follow-up:
|
|
102
62
|
|
|
103
|
-
|
|
63
|
+
1. Reuse a session only when the user's reference uniquely identifies it.
|
|
64
|
+
2. If no ID is supplied, call `agent_knock_knock_list`.
|
|
65
|
+
3. If multiple rows match, show their `short_ref`, agent, tmux target, and description and ask the user to choose.
|
|
66
|
+
4. If a `terminal_controlled` row was listed, pass its authoritative `id` to `agent_knock_knock_send`.
|
|
67
|
+
5. Never guess between multiple terminals or send to a pane that AKK has not verified as idle.
|
|
104
68
|
|
|
105
|
-
|
|
69
|
+
`idle` means the previous managed turn finished while its tmux pane remains open for follow-ups.
|
|
106
70
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
For standard ACPX delegation, the coding agent must communicate back to OpenClaw by executing the callback command included in its bootstrap prompt. For terminal-control bridge conversations, AKK owns callback delivery. The coding agent should not rely on OpenClaw's session tools, chat memory, or an out-of-band reply path.
|
|
110
|
-
|
|
111
|
-
The required routing is:
|
|
112
|
-
|
|
113
|
-
1. OpenClaw starts delegation with `agent_knock_knock_delegate`.
|
|
114
|
-
2. Agent Knock Knock sends the bootstrap prompt and task to the selected Codex, Claude, or Cursor session through ACPX, or sends only the user-facing task text to a terminal-control bridge session.
|
|
115
|
-
3. The coding agent sends `question`, `progress`, `blocked`, `done`, or `error` messages back by running the provided callback command. For terminal-control bridge sessions, AKK reports approvals and sends completion callbacks only when that adapter has reliable completion evidence.
|
|
116
|
-
4. OpenClaw answers `question` or `blocked` messages with structured `answer` messages through the same protocol path.
|
|
117
|
-
|
|
118
|
-
If the plugin tool is unavailable, stop and report that Agent Knock Knock is not available. Do not fall back to direct `sessions_send` delivery.
|
|
119
|
-
|
|
120
|
-
## Recovery Decisions
|
|
121
|
-
|
|
122
|
-
`AKK send <session-selector>: <message>` automatically falls back to AKK replay recovery when the previous ACPX session is unavailable. This starts a fresh ACPX session, gives the coding agent AKK's saved protocol history summary, and includes the pending message.
|
|
71
|
+
Useful examples:
|
|
123
72
|
|
|
124
|
-
|
|
73
|
+
```text
|
|
74
|
+
AKK Codex: review the current branch and propose a small fix
|
|
75
|
+
AKK Claude: review the latest commit
|
|
76
|
+
AKK list
|
|
77
|
+
AKK status only
|
|
78
|
+
AKK send codex: continue with the smaller implementation
|
|
79
|
+
AKK send @a1b2c3d4: run the focused tests
|
|
80
|
+
AKK cancel only
|
|
81
|
+
AKK renew only 30
|
|
82
|
+
AKK approve @a1b2c3d4
|
|
83
|
+
```
|
|
125
84
|
|
|
126
|
-
|
|
127
|
-
- `AKK close <session-selector>`: use `agent_knock_knock_close` to close the task.
|
|
128
|
-
- `AKK renew <session-selector>`: use `agent_knock_knock_renew` when a live terminal bridge task was marked stalled and monitoring should resume without injecting another task.
|
|
129
|
-
- Start a new independent `AKK <task>` delegation if the old task should not be recovered.
|
|
85
|
+
## Terminal Communication Contract
|
|
130
86
|
|
|
131
|
-
|
|
87
|
+
All OpenClaw-to-agent task delivery must go through Agent Knock Knock plugin tools. Do not use OpenClaw internal session tools, raw tmux commands, shell commands, or another messaging path to bypass AKK's terminal checks.
|
|
132
88
|
|
|
133
|
-
|
|
89
|
+
AKK:
|
|
134
90
|
|
|
135
|
-
|
|
91
|
+
1. Resolves the selected Codex or Claude Code process and tmux pane.
|
|
92
|
+
2. Verifies the pane, process identity, workspace, and idle prompt.
|
|
93
|
+
3. Types only the user-facing task into the shared terminal.
|
|
94
|
+
4. Creates a managed turn bound to that terminal and message.
|
|
95
|
+
5. Monitors reliable local evidence and sends callbacks to the originating OpenClaw session.
|
|
136
96
|
|
|
137
|
-
|
|
97
|
+
The coding agent does not run an AKK callback command and does not require an AKK-specific hook or plugin.
|
|
138
98
|
|
|
139
|
-
|
|
99
|
+
After an asynchronous delegate or send operation is accepted, end the OpenClaw turn. Wait for AKK's callback unless the user explicitly requests status.
|
|
140
100
|
|
|
141
|
-
|
|
142
|
-
- `native`: discovered local native sessions that AKK cannot directly control.
|
|
143
|
-
- `terminal_controlled`: discovered local native sessions in a controllable terminal provider. The current provider is tmux.
|
|
101
|
+
## Status and Description
|
|
144
102
|
|
|
145
|
-
|
|
103
|
+
For terminal-controlled entries, `agent_knock_knock_status` captures a bounded terminal screen and returns `terminal_screen`. Do not inspect the pane with raw tmux or shell commands unless AKK status is unavailable or fails.
|
|
146
104
|
|
|
147
|
-
Use `
|
|
105
|
+
Use `agent_knock_knock_describe` for requests about what a session is doing or why it exists. AKK combines saved conversation history, supported agent-local context, and a conservative terminal fallback with explicit confidence.
|
|
148
106
|
|
|
149
|
-
|
|
150
|
-
- `terminal_control`: use when the target Codex CLI is running inside a controllable terminal provider and the user wants AKK to operate the existing TUI without stopping or resuming it. The first call is side-effect-free. If the result is `requires_confirmation`, show the exact terminal target, pid, cwd, and current terminal-control metadata. Only after explicit user confirmation, call again with `strategy="terminal_control"`, `createConversation=true`, `confirmTerminal=true`, and `terminalTarget=<confirmed target>`. Follow-up `AKK send` messages will be typed into the terminal pane as concise user-facing task text; AKK monitors the Codex rollout/terminal state and sends the callback to OpenClaw itself. `AKK cancel` sends Control-C to the controlled terminal pane. Terminal-controlled entries from `AKK list` can be sent to, cancelled, approved, and inspected directly with their `id`; use `agent_knock_knock_status` to inspect the current terminal screen or execution result. Before `agent_knock_knock_approve`, show the user the latest terminal excerpt and pass its fingerprint as `expected_approval_fingerprint`.
|
|
151
|
-
- `fork`: use when the user wants to avoid stopping the original Codex CLI. First call returns a bounded context package plus `summaryPrompt` and `nextAction`; use that prompt to summarize as OpenClaw, ask the user to confirm, and do not inject raw full rollout history directly. After the user confirms the summary, call `agent_knock_knock_agent_takeover` again with `strategy="fork"`, `createConversation=true`, and `forkSummary=<approved summary>` to create the forked AKK-managed session. Then use the returned `conversation_id` with `AKK send` for follow-up work.
|
|
107
|
+
## Cancellation, Stalls, and Close
|
|
152
108
|
|
|
153
|
-
|
|
109
|
+
`agent_knock_knock_cancel` uses the adapter's interrupt action—Control-C for Codex or Escape for Claude Code—and leaves the tmux pane open.
|
|
154
110
|
|
|
155
|
-
|
|
111
|
+
Use `agent_knock_knock_renew` only when:
|
|
156
112
|
|
|
157
|
-
|
|
113
|
+
- AKK marked a managed terminal turn `stalled`;
|
|
114
|
+
- the same process and task are still live in the same pane; and
|
|
115
|
+
- the user wants monitoring to continue without injecting another task.
|
|
158
116
|
|
|
159
|
-
|
|
117
|
+
Closing an AKK conversation does not close the underlying tmux pane or coding-agent CLI.
|
|
160
118
|
|
|
161
|
-
|
|
119
|
+
## Terminal Approval
|
|
162
120
|
|
|
163
|
-
|
|
164
|
-
- `question`: the coding agent asks for a decision
|
|
165
|
-
- `answer`: OpenClaw gives a decision
|
|
166
|
-
- `progress`: the coding agent reports progress and does not require a response
|
|
167
|
-
- `blocked`: the coding agent cannot continue without a decision
|
|
168
|
-
- `done`: the coding agent reports the current round is complete; AKK marks the session `idle`, and OpenClaw may send later follow-ups until the session is closed or times out
|
|
169
|
-
- `error`: runtime, tool, or protocol failure
|
|
170
|
-
- `control`: budget warning or lifecycle control
|
|
121
|
+
Approval is a sensitive action.
|
|
171
122
|
|
|
172
|
-
|
|
123
|
+
1. Call `agent_knock_knock_status`.
|
|
124
|
+
2. Show the detected request details to the user.
|
|
125
|
+
3. Require explicit approval of that exact current request.
|
|
126
|
+
4. Call `agent_knock_knock_approve` with the returned `approval_state.fingerprint` as `expected_approval_fingerprint`.
|
|
173
127
|
|
|
174
|
-
|
|
128
|
+
For hookless Claude Code, the callback intentionally omits the raw command. Require the user to inspect the named live tmux pane personally; never approve from a hash or summary alone. Claude manual approval accepts only the strictly recognized one-time **Yes** Bash dialog for the current managed turn. Codex approval also requires the current visible prompt.
|
|
175
129
|
|
|
176
|
-
|
|
130
|
+
Unknown, stale, expired, ambiguous, persistent-permission, replayed, or changed requests must not be approved. Deny or interrupt them with `agent_knock_knock_cancel`, or tell the user to resolve them directly in the terminal.
|
|
177
131
|
|
|
178
|
-
|
|
132
|
+
A trusted, default-disabled plugin `autoApprove` policy may independently approve only an exact configured agent, canonical workspace, and command vector backed by current terminal evidence. The model cannot create or modify that policy.
|
|
179
133
|
|
|
180
|
-
|
|
181
|
-
2. Answer from the product and acceptance perspective: intended behavior, user-visible result, scope boundary, priority, or acceptable compromise.
|
|
182
|
-
3. Prefer keeping scope small and shippable when that still satisfies the user's intent.
|
|
183
|
-
4. Avoid asking the user unless the task is impossible to complete safely without new user input.
|
|
184
|
-
5. Reply with an `answer` message.
|
|
134
|
+
## tmux Sessions
|
|
185
135
|
|
|
186
|
-
|
|
136
|
+
`agent_knock_knock_list` separates:
|
|
187
137
|
|
|
188
|
-
|
|
138
|
+
- `delegated`: AKK-managed terminal turns;
|
|
139
|
+
- `native`: local sessions AKK can describe but cannot control;
|
|
140
|
+
- `terminal_controlled`: live Codex or Claude Code sessions in a controllable tmux pane.
|
|
189
141
|
|
|
190
|
-
|
|
142
|
+
When the user asks AKK to control a listed terminal entry, use the authoritative `terminal_controlled` ID. For a Codex process already discovered in tmux, `agent_knock_knock_agent_takeover` may attach a managed conversation only with `strategy="terminal_control"` and the exact terminal target confirmed by AKK. This is the only supported takeover strategy.
|
|
191
143
|
|
|
192
|
-
-
|
|
193
|
-
- Hard limit: 100 response rounds
|
|
194
|
-
- At 30 response rounds, require the coding agent to converge and list remaining work
|
|
195
|
-
- At 40 response rounds, warn the coding agent to finish, degrade, or fail within 10 response rounds
|
|
196
|
-
- At 50 response rounds, end by default unless completion is clearly near
|
|
197
|
-
- At 100 response rounds, force termination and summarize failure
|
|
144
|
+
Claude Code terminal entries are controlled directly through their listed IDs. AKK does not install or require Claude hooks. Hook-free completion depends on a strictly correlated local Claude transcript turn and fails closed for unknown schemas, background work, or ambiguous identity. Never report completion merely because the pane looks idle.
|
|
198
145
|
|
|
199
146
|
## Final User Reply
|
|
200
147
|
|
|
201
|
-
Do not replay
|
|
148
|
+
Do not replay internal terminal-monitor or callback details.
|
|
202
149
|
|
|
203
150
|
Return:
|
|
204
151
|
|
|
205
|
-
-
|
|
206
|
-
-
|
|
207
|
-
-
|
|
208
|
-
-
|
|
209
|
-
-
|
|
152
|
+
- what was delivered;
|
|
153
|
+
- important files or behavior changed;
|
|
154
|
+
- verification performed;
|
|
155
|
+
- remaining issues, if any; or
|
|
156
|
+
- the actionable failure reason.
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Actor } from "./protocol.js";
|
|
2
|
-
export declare function normalizeAcpxOutput({ conversationId, from, to, round, output, now }: {
|
|
3
|
-
conversationId: string;
|
|
4
|
-
from: Actor | string;
|
|
5
|
-
to: Actor | string;
|
|
6
|
-
round: number;
|
|
7
|
-
output: string;
|
|
8
|
-
now?: Date;
|
|
9
|
-
}): NormalizedAcpxEvent[];
|
|
10
|
-
export interface NormalizedAcpxEvent {
|
|
11
|
-
ts: string;
|
|
12
|
-
conversation_id: string;
|
|
13
|
-
event: string;
|
|
14
|
-
from?: string;
|
|
15
|
-
to?: string;
|
|
16
|
-
round?: number;
|
|
17
|
-
[key: string]: unknown;
|
|
18
|
-
}
|
package/dist/src/acpx-output.js
DELETED
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
import { extractJsonObject } from "./protocol.js";
|
|
2
|
-
export function normalizeAcpxOutput({ conversationId, from, to, round, output, now = new Date() }) {
|
|
3
|
-
const events = [];
|
|
4
|
-
const lines = String(output ?? "").split(/\r?\n/);
|
|
5
|
-
for (const line of lines) {
|
|
6
|
-
const text = line.trim();
|
|
7
|
-
if (!text) {
|
|
8
|
-
continue;
|
|
9
|
-
}
|
|
10
|
-
const jsonEvent = normalizeJsonLine({ conversationId, from, to, round, text, now });
|
|
11
|
-
if (jsonEvent) {
|
|
12
|
-
events.push(jsonEvent);
|
|
13
|
-
continue;
|
|
14
|
-
}
|
|
15
|
-
const textEvent = normalizeTextLine({ conversationId, from, to, round, text, now });
|
|
16
|
-
if (textEvent) {
|
|
17
|
-
events.push(textEvent);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return events;
|
|
21
|
-
}
|
|
22
|
-
function normalizeJsonLine({ conversationId, from, to, round, text, now }) {
|
|
23
|
-
let parsed;
|
|
24
|
-
try {
|
|
25
|
-
parsed = extractJsonObject(text);
|
|
26
|
-
}
|
|
27
|
-
catch {
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
if (parsed.type && parsed.from && parsed.to && "body" in parsed) {
|
|
31
|
-
const event = {
|
|
32
|
-
event: "message",
|
|
33
|
-
conversationId,
|
|
34
|
-
round,
|
|
35
|
-
now,
|
|
36
|
-
type: parsed.type,
|
|
37
|
-
requires_response: parsed.requires_response,
|
|
38
|
-
body: typeof parsed.body === "string" ? parsed.body : JSON.stringify(parsed.body),
|
|
39
|
-
source: "normalized_acpx",
|
|
40
|
-
raw: parsed
|
|
41
|
-
};
|
|
42
|
-
return baseEvent({
|
|
43
|
-
...event,
|
|
44
|
-
...optionalStringField("from", parsed.from),
|
|
45
|
-
...optionalStringField("to", parsed.to)
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
const eventName = eventNameFromJson(parsed);
|
|
49
|
-
if (!eventName) {
|
|
50
|
-
return null;
|
|
51
|
-
}
|
|
52
|
-
return baseEvent({
|
|
53
|
-
event: eventName,
|
|
54
|
-
conversationId,
|
|
55
|
-
from: stringOrUndefined(parsed.from) ?? from,
|
|
56
|
-
to: stringOrUndefined(parsed.to) ?? to,
|
|
57
|
-
round: numberOrUndefined(parsed.round) ?? round,
|
|
58
|
-
now,
|
|
59
|
-
status: parsed.status,
|
|
60
|
-
tool_name: parsed.tool_name ?? parsed.tool ?? parsed.name,
|
|
61
|
-
permission: parsed.permission ?? parsed.permission_name,
|
|
62
|
-
body: parsed.body ?? parsed.message ?? parsed.text,
|
|
63
|
-
source: "normalized_acpx",
|
|
64
|
-
raw: parsed
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
function normalizeTextLine({ conversationId, from, to, round, text, now }) {
|
|
68
|
-
const lower = text.toLowerCase();
|
|
69
|
-
if (isPermissionRequest(lower)) {
|
|
70
|
-
return baseEvent({
|
|
71
|
-
event: "permission_request",
|
|
72
|
-
conversationId,
|
|
73
|
-
from,
|
|
74
|
-
to,
|
|
75
|
-
round,
|
|
76
|
-
now,
|
|
77
|
-
source: "normalized_acpx",
|
|
78
|
-
body: text
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
const toolStarted = matchToolStarted(text);
|
|
82
|
-
if (toolStarted) {
|
|
83
|
-
return baseEvent({
|
|
84
|
-
event: "tool_call_started",
|
|
85
|
-
conversationId,
|
|
86
|
-
from,
|
|
87
|
-
to,
|
|
88
|
-
round,
|
|
89
|
-
now,
|
|
90
|
-
tool_name: toolStarted,
|
|
91
|
-
source: "normalized_acpx",
|
|
92
|
-
body: text
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
const toolFinished = matchToolFinished(text);
|
|
96
|
-
if (toolFinished) {
|
|
97
|
-
return baseEvent({
|
|
98
|
-
event: "tool_call_finished",
|
|
99
|
-
conversationId,
|
|
100
|
-
from,
|
|
101
|
-
to,
|
|
102
|
-
round,
|
|
103
|
-
now,
|
|
104
|
-
tool_name: toolFinished,
|
|
105
|
-
source: "normalized_acpx",
|
|
106
|
-
body: text
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
if (isAgentStatus(lower)) {
|
|
110
|
-
return baseEvent({
|
|
111
|
-
event: "agent_status",
|
|
112
|
-
conversationId,
|
|
113
|
-
from,
|
|
114
|
-
to,
|
|
115
|
-
round,
|
|
116
|
-
now,
|
|
117
|
-
status: statusFromText(lower),
|
|
118
|
-
source: "normalized_acpx",
|
|
119
|
-
body: text
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
return null;
|
|
123
|
-
}
|
|
124
|
-
function eventNameFromJson(parsed) {
|
|
125
|
-
const value = String(parsed.event ?? parsed.kind ?? "").toLowerCase();
|
|
126
|
-
if (["tool_call_started", "tool_call_finished", "permission_request", "agent_status"].includes(value)) {
|
|
127
|
-
return value;
|
|
128
|
-
}
|
|
129
|
-
if (value === "tool_call" && parsed.status === "started") {
|
|
130
|
-
return "tool_call_started";
|
|
131
|
-
}
|
|
132
|
-
if (value === "tool_call" && ["finished", "completed", "done"].includes(String(parsed.status))) {
|
|
133
|
-
return "tool_call_finished";
|
|
134
|
-
}
|
|
135
|
-
return null;
|
|
136
|
-
}
|
|
137
|
-
function isPermissionRequest(lower) {
|
|
138
|
-
return lower.includes("permission") && (lower.includes("request") ||
|
|
139
|
-
lower.includes("requires") ||
|
|
140
|
-
lower.includes("approve") ||
|
|
141
|
-
lower.includes("allow"));
|
|
142
|
-
}
|
|
143
|
-
function matchToolStarted(text) {
|
|
144
|
-
const patterns = [
|
|
145
|
-
/tool(?: call)? (?:started|starting):?\s*([A-Za-z0-9_.:-]+)/i,
|
|
146
|
-
/(?:running|started|starting) tool:?\s*([A-Za-z0-9_.:-]+)/i,
|
|
147
|
-
/tool_use(?:\.start)?:?\s*([A-Za-z0-9_.:-]+)/i
|
|
148
|
-
];
|
|
149
|
-
return firstMatch(text, patterns);
|
|
150
|
-
}
|
|
151
|
-
function matchToolFinished(text) {
|
|
152
|
-
const patterns = [
|
|
153
|
-
/tool(?: call)? (?:finished|completed|succeeded|failed):?\s*([A-Za-z0-9_.:-]+)/i,
|
|
154
|
-
/(?:finished|completed|succeeded|failed) tool:?\s*([A-Za-z0-9_.:-]+)/i,
|
|
155
|
-
/tool_use(?:\.finish|\.end)?:?\s*([A-Za-z0-9_.:-]+)/i
|
|
156
|
-
];
|
|
157
|
-
return firstMatch(text, patterns);
|
|
158
|
-
}
|
|
159
|
-
function firstMatch(text, patterns) {
|
|
160
|
-
for (const pattern of patterns) {
|
|
161
|
-
const match = text.match(pattern);
|
|
162
|
-
if (match?.[1]) {
|
|
163
|
-
return match[1];
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
return null;
|
|
167
|
-
}
|
|
168
|
-
function isAgentStatus(lower) {
|
|
169
|
-
return lower.includes("session") ||
|
|
170
|
-
lower.includes("agent") ||
|
|
171
|
-
lower.includes("thinking") ||
|
|
172
|
-
lower.includes("queued") ||
|
|
173
|
-
lower.includes("running") ||
|
|
174
|
-
lower.includes("completed") ||
|
|
175
|
-
lower.includes("failed") ||
|
|
176
|
-
lower.includes("timed out") ||
|
|
177
|
-
lower.includes("timeout");
|
|
178
|
-
}
|
|
179
|
-
function statusFromText(lower) {
|
|
180
|
-
if (lower.includes("timed out") || lower.includes("timeout")) {
|
|
181
|
-
return "timeout";
|
|
182
|
-
}
|
|
183
|
-
if (lower.includes("failed") || lower.includes("error")) {
|
|
184
|
-
return "failed";
|
|
185
|
-
}
|
|
186
|
-
if (lower.includes("completed") || lower.includes("done") || lower.includes("finished")) {
|
|
187
|
-
return "completed";
|
|
188
|
-
}
|
|
189
|
-
if (lower.includes("queued")) {
|
|
190
|
-
return "queued";
|
|
191
|
-
}
|
|
192
|
-
if (lower.includes("thinking")) {
|
|
193
|
-
return "thinking";
|
|
194
|
-
}
|
|
195
|
-
if (lower.includes("running")) {
|
|
196
|
-
return "running";
|
|
197
|
-
}
|
|
198
|
-
return "status";
|
|
199
|
-
}
|
|
200
|
-
function baseEvent({ event, conversationId, from, to, round, now, ...rest }) {
|
|
201
|
-
return dropUndefined({
|
|
202
|
-
ts: now.toISOString(),
|
|
203
|
-
conversation_id: conversationId,
|
|
204
|
-
event,
|
|
205
|
-
from,
|
|
206
|
-
to,
|
|
207
|
-
round,
|
|
208
|
-
...dropUndefined(rest)
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
function dropUndefined(value) {
|
|
212
|
-
return Object.fromEntries(Object.entries(value).filter(([, entryValue]) => entryValue !== undefined));
|
|
213
|
-
}
|
|
214
|
-
function stringOrUndefined(value) {
|
|
215
|
-
return typeof value === "string" ? value : undefined;
|
|
216
|
-
}
|
|
217
|
-
function numberOrUndefined(value) {
|
|
218
|
-
return typeof value === "number" ? value : undefined;
|
|
219
|
-
}
|
|
220
|
-
function optionalStringField(key, value) {
|
|
221
|
-
return typeof value === "string" ? { [key]: value } : {};
|
|
222
|
-
}
|
|
223
|
-
//# sourceMappingURL=acpx-output.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acpx-output.js","sourceRoot":"","sources":["../../src/acpx-output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGlD,MAAM,UAAU,mBAAmB,CAAC,EAClC,cAAc,EACd,IAAI,EACJ,EAAE,EACF,KAAK,EACL,MAAM,EACN,GAAG,GAAG,IAAI,IAAI,EAAE,EAQjB;IACC,MAAM,MAAM,GAA0B,EAAE,CAAC;IACzC,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC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O,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAC3D,CAAC"}
|
package/dist/src/bootstrap.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export interface BootstrapPromptOptions {
|
|
2
|
-
callbackCommand: string;
|
|
3
|
-
executorName?: string;
|
|
4
|
-
softLimit?: number;
|
|
5
|
-
hardLimit?: number;
|
|
6
|
-
}
|
|
7
|
-
export declare function claudeBootstrapPrompt(options: Omit<BootstrapPromptOptions, "executorName">): string;
|
|
8
|
-
export declare function executorBootstrapPrompt({ callbackCommand, executorName, softLimit, hardLimit }: BootstrapPromptOptions): string;
|