@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.
Files changed (69) hide show
  1. package/CHANGELOG.md +17 -565
  2. package/README.md +100 -134
  3. package/dist/src/agent-session-provider.d.ts +1 -2
  4. package/dist/src/approval-policy.d.ts +1 -1
  5. package/dist/src/approval-policy.js +1 -1
  6. package/dist/src/approval-policy.js.map +1 -1
  7. package/dist/src/claude-terminal-agent-adapter.d.ts +2 -17
  8. package/dist/src/claude-terminal-agent-adapter.js +4 -489
  9. package/dist/src/claude-terminal-agent-adapter.js.map +1 -1
  10. package/dist/src/cli.js +1736 -3893
  11. package/dist/src/cli.js.map +1 -1
  12. package/dist/src/codex-local-session-provider.d.ts +1 -2
  13. package/dist/src/codex-local-session-provider.js +1 -9
  14. package/dist/src/codex-local-session-provider.js.map +1 -1
  15. package/dist/src/codex-session-provider.d.ts +1 -8
  16. package/dist/src/codex-session-provider.js +0 -56
  17. package/dist/src/codex-session-provider.js.map +1 -1
  18. package/dist/src/codex-terminal-agent-adapter.d.ts +1 -1
  19. package/dist/src/doctor-capabilities.d.ts +5 -13
  20. package/dist/src/doctor-capabilities.js +15 -60
  21. package/dist/src/doctor-capabilities.js.map +1 -1
  22. package/dist/src/executors.d.ts +5 -51
  23. package/dist/src/executors.js +4 -68
  24. package/dist/src/executors.js.map +1 -1
  25. package/dist/src/openclaw-doctor.d.ts +0 -1
  26. package/dist/src/openclaw-doctor.js +0 -7
  27. package/dist/src/openclaw-doctor.js.map +1 -1
  28. package/dist/src/openclaw-plugin-helpers.d.ts +5 -13
  29. package/dist/src/openclaw-plugin-helpers.js +91 -82
  30. package/dist/src/openclaw-plugin-helpers.js.map +1 -1
  31. package/dist/src/openclaw-plugin.js +272 -481
  32. package/dist/src/openclaw-plugin.js.map +1 -1
  33. package/dist/src/protocol.d.ts +1 -5
  34. package/dist/src/protocol.js +1 -1
  35. package/dist/src/protocol.js.map +1 -1
  36. package/dist/src/session-selector.js +1 -1
  37. package/dist/src/session-selector.js.map +1 -1
  38. package/dist/src/terminal-agent-adapter.d.ts +3 -17
  39. package/dist/src/terminal-agent-adapter.js.map +1 -1
  40. package/dist/src/terminal-agent-bridge.d.ts +3 -3
  41. package/dist/src/terminal-agent-bridge.js +0 -75
  42. package/dist/src/terminal-agent-bridge.js.map +1 -1
  43. package/dist/src/transcript.js +2 -3
  44. package/dist/src/transcript.js.map +1 -1
  45. package/docs/quickstart-tmux.md +15 -11
  46. package/openclaw.plugin.json +4 -100
  47. package/package.json +7 -15
  48. package/templates/openclaw-skills/agent-knock-knock/SKILL.md +82 -149
  49. package/dist/src/acpx-output.d.ts +0 -18
  50. package/dist/src/acpx-output.js +0 -223
  51. package/dist/src/acpx-output.js.map +0 -1
  52. package/dist/src/bootstrap.d.ts +0 -8
  53. package/dist/src/bootstrap.js +0 -45
  54. package/dist/src/bootstrap.js.map +0 -1
  55. package/dist/src/claude-hook-installer.d.ts +0 -65
  56. package/dist/src/claude-hook-installer.js +0 -410
  57. package/dist/src/claude-hook-installer.js.map +0 -1
  58. package/dist/src/claude-hook-protocol.d.ts +0 -89
  59. package/dist/src/claude-hook-protocol.js +0 -243
  60. package/dist/src/claude-hook-protocol.js.map +0 -1
  61. package/dist/src/claude-hook-store.d.ts +0 -247
  62. package/dist/src/claude-hook-store.js +0 -1075
  63. package/dist/src/claude-hook-store.js.map +0 -1
  64. package/dist/src/session-takeover-planner.d.ts +0 -37
  65. package/dist/src/session-takeover-planner.js +0 -57
  66. package/dist/src/session-takeover-planner.js.map +0 -1
  67. package/docs/quickstart-managed-acpx.md +0 -43
  68. package/scripts/smoke-acpx.js +0 -139
  69. package/scripts/smoke-tmux.js +0 -140
@@ -1,209 +1,142 @@
1
1
  ---
2
2
  name: agent-knock-knock
3
- description: Delegate OpenClaw tasks to local Codex, Claude Code, and Cursor agents through Agent Knock Knock.
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 says `AKK`, `akk`, `Agent Knock Knock`, asks OpenClaw to delegate coding work to Codex, Claude, or Cursor, asks what agent tasks are running, asks what a listed AKK, Codex, or Claude session is about, sends a follow-up to an agent task, lists existing local coding-agent sessions, takes over an existing native Codex session, recovers an unavailable agent session, cancels a running agent task, or closes an agent task.
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 listed by AKK.
9
9
 
10
- Treat `AKK` and `akk` the same way.
11
-
12
- Default delegation target: plugin-configured `defaultAgent`. If `defaultAgent` is unset, Agent Knock Knock falls back to Codex.
10
+ AKK supports Codex and Claude Code that are already running inside tmux. It never launches a coding agent. OpenClaw, tmux, AKK, and the coding agent must run as the same OS user.
13
11
 
14
- Use Claude only when the user explicitly says `AKK Claude`, `Claude`, or asks to delegate to Claude. Use Cursor only when the user explicitly says `AKK Cursor`, `Cursor`, or asks to delegate to Cursor.
12
+ Treat `AKK` and `akk` the same way.
15
13
 
16
14
  ## Role
17
15
 
18
- You are OpenClaw, the autonomous product manager, requirements owner, and final acceptance decision maker.
16
+ 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.
19
17
 
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.
21
-
22
- Codex, Claude, or Cursor is allowed to directly edit files, run commands, fix tests, and complete the implementation.
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.
18
+ Keep the user's requested scope and approval boundaries. Do not expand a task, approve a permission, interrupt a process, or close a managed record unless the user request or an explicit trusted policy authorizes that action.
25
19
 
26
20
  ## Chat Routing
27
21
 
28
- Use the native `/akk` command when the user invokes slash-command syntax. Use the native OpenClaw plugin tools when the user uses natural language instead of a slash command.
22
+ Use the `/akk` command for slash-command syntax. Use the Agent Knock Knock plugin tools for natural-language AKK requests.
29
23
 
30
- Slash command forms:
24
+ Core slash-command forms:
31
25
 
32
- - `/akk <task>`: delegate to the plugin-configured default agent, falling back to Codex when unset.
33
- - `/akk codex <task>`: delegate to Codex.
34
- - `/akk claude <task>`: delegate to Claude.
35
- - `/akk cursor <task>`: delegate to Cursor.
36
- - `/akk list`: list open AKK sessions.
37
- - `/akk doctor [tmux|acpx|all]`: verify the configured AKK mode and OpenClaw integration.
38
- - `/akk status [session-selector]`: inspect one AKK session. Omitting the selector works only when exactly one actionable session exists.
39
- - `/akk describe [session-selector]`: summarize what one AKK-managed, native, or terminal-controlled session is about.
40
- - `/akk send <session-selector>: <message>`: send a follow-up to one open AKK session.
41
- - `/akk cancel <session-selector>`: request cooperative cancellation of the current in-flight prompt for one AKK session without closing it.
42
- - `/akk recover <session-selector>`: recover a session that is waiting for a recovery decision by starting a new agent session with AKK's saved protocol history summary.
43
- - `/akk close <session-selector> [reason]`: close one AKK session.
26
+ - `/akk <task>`: send a new task only when exactly one eligible idle coding-agent pane exists in the configured workspace.
27
+ - `/akk <selector>: <message>`: send a task or follow-up to one exact eligible idle pane.
28
+ - `/akk list`: list eligible and managed coding-agent terminals.
29
+ - `/akk status [session-selector]`: inspect one managed terminal turn.
30
+ - `/akk cancel <session-selector>`: interrupt the current turn without closing its tmux pane.
44
31
 
45
- A session selector may be an authoritative full ID, an `@short-ref` returned by `AKK list`, `only`, `latest`, an agent name (`codex`, `claude`, or `cursor`), 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; never guess which session they meant.
32
+ For the targeted slash form, a selector may be `codex`, `claude`, `only`, `latest`, or an `@short-ref` returned by `AKK list`. The `agent_knock_knock_send` tool additionally accepts an authoritative full ID in its `selector` field. Selectors fail closed when the target is missing or ambiguous. For every send, the selected pane must be in the configured workspace, owned by the expected coding-agent process, and at a verified idle prompt.
46
33
 
47
- Natural-language forms:
34
+ Treat the configured workspace as a hard boundary for every AKK plugin tool. Do not try to list, inspect, send to, approve, cancel, or recover a terminal outside it, including through an authoritative full ID.
48
35
 
49
- - `AKK: <task>` or `akk: <task>`: call `agent_knock_knock_delegate` with `request=<task>` and no `agent` parameter, so the plugin-configured `defaultAgent` is used. If unset, AKK falls back to Codex.
50
- - `AKK Codex: <task>`: call `agent_knock_knock_delegate` with `agent="codex"`.
51
- - `AKK Claude: <task>`: call `agent_knock_knock_delegate` with `agent="claude"`.
52
- - `AKK Cursor: <task>`: call `agent_knock_knock_delegate` with `agent="cursor"`.
53
- - `AKK list`, `akk list`, questions such as "what AKK sessions are open", "which Codex or Claude sessions are currently running", "terminal-controlled sessions", or requests to list active local coding-agent work: call `agent_knock_knock_list`.
54
- - `AKK status <session-selector>` or requests to view current output, execution result, terminal screen, or "what is it doing now": call `agent_knock_knock_status`. For `terminal_controlled` entries, status internally captures the terminal pane and returns `terminal_screen`; do not call tmux or shell commands directly to inspect the pane unless AKK status fails.
55
- - `AKK describe <session-selector>`, `AKK summary <session-selector>`, or requests such as "what is this session about", "what was this task doing", "remind me what this drawing/session is for", or "这个会话/绘画大概在做什么": call `agent_knock_knock_describe`. Prefer this over direct terminal/tmux inspection because AKK can combine saved conversation history, agent-specific structured history when available, and terminal-screen fallback with explicit confidence.
56
- - `AKK send <session-selector>: <message>` or follow-up requests for an existing open agent session: call `agent_knock_knock_send`. Also use `agent_knock_knock_send` when the user says to send/tell/ask/forward/add/continue a message or task to a listed AKK session, a listed native session, a terminal-controlled entry, a tmux target such as `my-work:0.1`, or "the one from the list". If the target comes from a `terminal_controlled` entry in `AKK list`, use that entry's authoritative `id` directly; its `short_ref` is only a stable user-facing selector. AKK submits only when the pane is at a verified idle prompt. For Claude Code, this background send returns the managed conversation ID required to bind later screen approval to the current message and process; use that returned ID for subsequent actions. Do not call `agent_knock_knock_delegate` for these requests unless the user explicitly asks for a new independent session.
57
- - `AKK cancel <session-selector>` or requests to stop the current running work: call `agent_knock_knock_cancel`. If the target is terminal-controlled, use its listed `id` directly. AKK uses the adapter's interrupt key (`Control-C` for Codex or `Escape` for Claude Code) and leaves the tmux pane open.
58
- - `AKK renew <session-selector>` or requests to extend/restart monitoring for a stalled but still-live terminal task: call `agent_knock_knock_renew`. This is only for an AKK-managed terminal bridge conversation already marked `stalled`; it does not send a message or key to Codex. Pass `minutes` only when the user requests a specific new inactivity timeout.
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
- ```
96
-
97
- ## Start A Conversation
98
-
99
- Use the OpenClaw plugin tool `agent_knock_knock_delegate`. It starts the selected coding agent in the background, creates durable conversation state, embeds a token-free OpenClaw callback command, and returns protocol metadata.
100
-
101
- If the plugin tool is unavailable, stop and report that Agent Knock Knock must be installed or repaired. Never request, print, or place an OpenClaw Gateway token in a delegated prompt or custom callback command.
102
-
103
- ## Communication Contract
36
+ Natural-language forms:
104
37
 
105
- Do not use OpenClaw's internal session tools, such as `sessions_send`, to send the task or follow-up messages directly to Codex, Claude, or Cursor.
38
+ - `AKK: <task>`: call `agent_knock_knock_send` with `request=<task>` and no `selector`. This succeeds only when exactly one eligible idle pane exists.
39
+ - `AKK Codex: <task>`: call `agent_knock_knock_send` with `request=<task>` and `selector="codex"`.
40
+ - `AKK Claude: <task>`: call `agent_knock_knock_send` with `request=<task>` and `selector="claude"`.
41
+ - Requests to list AKK or local coding-agent work: call `agent_knock_knock_list`.
42
+ - Requests to inspect current output or ask what a task is doing: call `agent_knock_knock_status`.
43
+ - Follow-ups for an existing listed terminal: call `agent_knock_knock_send` with `request=<message>` and the selected terminal reference as `selector`.
44
+ - Requests to stop current work: call `agent_knock_knock_cancel`.
106
45
 
107
- All OpenClaw-to-agent task delivery must go through the Agent Knock Knock plugin tools. Standard ACPX delegation builds the required bootstrap prompt, embeds the OpenClaw callback command, creates durable conversation state, and records the initial task message. Terminal-control bridge conversations are different: AKK types only the user-facing message into the tmux agent pane, monitors local terminal state, and sends OpenClaw callbacks when it has reliable evidence.
46
+ ## Starting and Reusing Work
108
47
 
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.
48
+ Use `agent_knock_knock_send` with `request` and no `selector` only for a new independent task whose target the user left unspecified. AKK must resolve exactly one eligible Codex or Claude Code pane and verify that it is idle immediately before writing the task. If no eligible pane exists, report AKK's setup guidance; do not substitute another execution path.
110
49
 
111
- The required routing is:
50
+ For a follow-up:
112
51
 
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.
52
+ 1. Reuse a terminal only when the user's reference uniquely identifies it.
53
+ 2. If no ID is supplied and more than one eligible pane may exist, call `agent_knock_knock_list`.
54
+ 3. If multiple rows match, show their `short_ref`, agent, and tmux target, then ask the user to choose.
55
+ 4. Call `agent_knock_knock_send` with the follow-up as `request` and the selected authoritative ID as `selector`.
56
+ 5. Never guess between multiple terminals or send to a pane that AKK has not verified as idle.
117
57
 
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.
58
+ An idle pane is at a verified ready prompt, with no current work or unresolved permission request. A previously completed managed turn alone is not proof that the pane is still idle.
119
59
 
120
- ## Recovery Decisions
60
+ Useful examples:
121
61
 
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.
62
+ ```text
63
+ /akk review the current branch and propose a small fix
64
+ /akk codex: inspect the repository and summarize it
65
+ /akk @a1b2c3d4: run the focused tests
66
+ /akk list
67
+ /akk status only
68
+ /akk cancel only
69
+ ```
123
70
 
124
- When AKK still reports that a conversation is `needs_recovery`, do not automatically recover, start a replacement task, or close it. Explain the options and let the user choose:
71
+ ## Terminal Communication Contract
125
72
 
126
- - `AKK recover <session-selector>`: use `agent_knock_knock_recover` to start a new coding-agent session with AKK's saved protocol history summary plus the pending message.
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.
73
+ 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.
130
74
 
131
- Make clear that `recover` is AKK replay recovery, not guaranteed native coding-agent session resume.
75
+ AKK:
132
76
 
133
- Do not start a replacement task without the user's explicit choice.
77
+ 1. Resolves the selected Codex or Claude Code process and tmux pane.
78
+ 2. Verifies the pane, process identity, workspace, and idle prompt.
79
+ 3. Types only the user-facing task into the shared terminal.
80
+ 4. Creates a managed turn bound to that terminal and message.
81
+ 5. Monitors reliable local evidence and sends callbacks to the originating OpenClaw session.
134
82
 
135
- ## Native and tmux Sessions
83
+ The coding agent does not run an AKK callback command and does not require an AKK-specific hook or plugin.
136
84
 
137
- Native stop/resume and fork takeover are for Codex sessions created outside AKK. tmux terminal control supports both Codex and Claude Code and is separate from AKK managed conversation recovery.
85
+ After an asynchronous send operation is accepted, end the OpenClaw turn. Wait for AKK's callback unless the user explicitly requests status.
138
86
 
139
- Use `agent_knock_knock_list` when the user asks about current native Codex sessions, terminal-controlled Codex or Claude Code sessions, or which local coding-agent work is currently open. The list result separates:
87
+ ## Status
140
88
 
141
- - `delegated`: AKK-managed tasks.
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.
89
+ For managed terminal 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.
144
90
 
145
- Use `agent_knock_knock_describe` when the user asks what a listed session is about. AKK-managed sessions use durable AKK conversation history. Terminal adapters use agent-specific structured history when available and otherwise return visible terminal/process context with lower confidence. Do not use raw tmux, shell, or peek tools for this summary unless `agent_knock_knock_describe` is unavailable or fails.
91
+ ## Cancellation and Recovery
146
92
 
147
- Use `agent_knock_knock_agent_takeover` when the user wants AKK to take over an existing native Codex session. By default this tool is side-effect-free and returns a plan. When the plan is ready and the user explicitly wants AKK to manage the session, call it with `createConversation=true` to create an AKK conversation bound to the native session:
93
+ `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.
148
94
 
149
- - `terminate_then_resume`: use when the user wants to take over an active native Codex CLI. The first call is side-effect-free. If the result is `requires_confirmation`, explain the exact pid, cwd, and session that would be stopped. Only after explicit user confirmation, call `agent_knock_knock_agent_takeover` again with `strategy="terminate_then_resume"`, `createConversation=true`, `confirmTerminate=true`, and `expectedPid=<confirmed pid>`. AKK will re-scan before terminating and will only stop an exact session match. If Codex does not expose a session id and the user still explicitly confirms a specific pid in the target cwd, you may add `allowCwdOnly=true`; explain that this is higher risk because it relies on pid and cwd rather than a visible session id.
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.
95
+ Use `agent_knock_knock_renew` only when AKK marked the same live terminal turn `stalled`, the process and task remain in the same pane, and the user wants monitoring to continue without terminal input. The contextual slash form is `/akk renew @a1b2c3d4 30`.
152
96
 
153
- Claude Code terminal entries are controlled directly by their `terminal:v2:tmux:claude:...` ids; do not offer Codex-only stop/resume or fork strategies for them. AKK does not install or require Claude hooks. A background send creates a managed turn that can report a strictly recognized, one-time Bash approval prompt. On the manual path, require the user to inspect the named live tmux pane, pass the exact fingerprint, and explicitly confirm the request. A trusted, default-disabled plugin policy may automatically approve only an exact command/workspace match backed by the same current screen and local transcript evidence. Claude approval expires quickly; AKK re-evaluates policy, reserves the one-shot dispatch, recaptures the prompt and evidence, and revalidates pane/process identity before Enter. Hook-free completion comes from a strictly correlated local Claude transcript turn and may fail closed for unknown schemas, background work, or ambiguous identity. Never report completion merely because the pane looks idle; rely on the AKK callback or use `status` and inspect the terminal when monitoring becomes `stalled`.
97
+ Use `agent_knock_knock_retry_callback` only for a `callback_failed` managed turn, for example `/akk retry-callback @a1b2c3d4`.
154
98
 
155
- Do not present `fork` as a standalone command or standalone feature. It is a takeover strategy.
99
+ Use `agent_knock_knock_close` only when the user explicitly wants to close AKK's managed record. If `AKK list` 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. Closing a managed record does not close the coding agent or tmux pane.
156
100
 
157
- Do not use `resume-anyway` or start a second live client on the same native Codex session while another Codex CLI is active. That can create mixed session history where multiple clients do not see each other's live context until a later resume.
101
+ Use `/akk doctor` only for installation checks or troubleshooting.
158
102
 
159
- ## Message Rules
103
+ ## Terminal Approval
160
104
 
161
- Use structured JSON messages with these types:
105
+ Approval is a sensitive action.
162
106
 
163
- - `task`: delegate work to Codex, Claude, or Cursor
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
107
+ 1. Call `agent_knock_knock_status`.
108
+ 2. Show the detected request details to the user.
109
+ 3. Require explicit approval of that exact current request.
110
+ 4. Call `agent_knock_knock_approve` with the returned `approval_state.fingerprint` as `expected_approval_fingerprint`.
171
111
 
172
- `cancel` is lifecycle control outside the agent message protocol. For delegated sessions, it asks ACPX to cooperatively cancel the current in-flight prompt. For terminal-controlled sessions, it uses the adapter's interrupt action, then marks that AKK task cancelled while leaving the tmux pane open.
112
+ The equivalent slash command must also include that fresh fingerprint:
173
113
 
174
- Only messages with `requires_response=true` consume response rounds.
114
+ ```text
115
+ /akk approve @a1b2c3d4 --expected-approval-fingerprint <fresh-fingerprint>
116
+ ```
175
117
 
176
- ## Decision Rules
118
+ 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.
177
119
 
178
- When the delegated coding agent asks a question or reports a blocker:
120
+ 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.
179
121
 
180
- 1. Decide directly.
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.
122
+ 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.
185
123
 
186
- Require the coding agent to ask before it changes product behavior, narrows scope, degrades quality, accepts a workaround, or changes acceptance criteria because of an engineering constraint.
124
+ ## tmux Sessions
187
125
 
188
- Do not take over implementation details unless they affect the product outcome. Let the coding agent choose local code structure, test mechanics, and ordinary engineering tactics.
126
+ `agent_knock_knock_list` reports eligible already-running Codex and Claude Code panes together with AKK-managed turns. Use an authoritative full ID or returned `@short-ref` whenever more than one candidate exists.
189
127
 
190
- ## Budget Rules
128
+ AKK writes only to a pane that passes its current process, workspace, and idle checks. Humans can attach to the same tmux session and continue directly at any time.
191
129
 
192
- - Default soft limit: 50 response rounds
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
130
+ Claude Code completion depends on a strictly correlated local transcript turn and fails closed for unknown schemas, background work, or ambiguous identity. Never report completion merely because the pane looks idle.
198
131
 
199
132
  ## Final User Reply
200
133
 
201
- Do not replay the internal conversation to the user.
134
+ Do not replay internal terminal-monitor or callback details.
202
135
 
203
136
  Return:
204
137
 
205
- - What was delivered
206
- - Important files changed
207
- - Verification performed
208
- - Remaining issues, if any
209
- - Failure reason, if the task failed
138
+ - what was delivered;
139
+ - important files or behavior changed;
140
+ - verification performed;
141
+ - remaining issues, if any; or
142
+ - 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
- }
@@ -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,OAAO,CAAC,CAAC;IAElD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QACzB,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,SAAS;QACX,CAAC;QAED,MAAM,SAAS,GAAG,iBAAiB,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACpF,IAAI,SAAS,EAAE,CAAC;YACd,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACvB,SAAS;QACX,CAAC;QAED,MAAM,SAAS,GAAG,iBAAiB,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACpF,IAAI,SAAS,EAAE,CAAC;YACd,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACzB,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAYD,SAAS,iBAAiB,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,E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,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC,EAAE,EAAE,CAAC,UAAU,KAAK,SAAS,CAAC,CAC3E,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAc;IACvC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACvD,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAc;IACvC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACvD,CAAC;AAED,SAAS,mBAAmB,CAAC,GAAW,EAAE,KAAc;IACtD,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AAC3D,CAAC"}
@@ -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;