@scotthuang/agent-knock-knock 0.2.44 → 0.2.47

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 (49) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +148 -242
  3. package/dist/src/approval-policy.d.ts +1 -0
  4. package/dist/src/approval-policy.js +6 -0
  5. package/dist/src/approval-policy.js.map +1 -1
  6. package/dist/src/claude-hook-installer.d.ts +65 -0
  7. package/dist/src/claude-hook-installer.js +410 -0
  8. package/dist/src/claude-hook-installer.js.map +1 -0
  9. package/dist/src/claude-hook-protocol.d.ts +89 -0
  10. package/dist/src/claude-hook-protocol.js +243 -0
  11. package/dist/src/claude-hook-protocol.js.map +1 -0
  12. package/dist/src/claude-hook-store.d.ts +247 -0
  13. package/dist/src/claude-hook-store.js +1064 -0
  14. package/dist/src/claude-hook-store.js.map +1 -0
  15. package/dist/src/claude-terminal-agent-adapter.d.ts +47 -0
  16. package/dist/src/claude-terminal-agent-adapter.js +920 -0
  17. package/dist/src/claude-terminal-agent-adapter.js.map +1 -0
  18. package/dist/src/cli.js +1565 -772
  19. package/dist/src/cli.js.map +1 -1
  20. package/dist/src/codex-session-provider.d.ts +6 -32
  21. package/dist/src/codex-session-provider.js +2 -1
  22. package/dist/src/codex-session-provider.js.map +1 -1
  23. package/dist/src/codex-store-adapter.d.ts +3 -9
  24. package/dist/src/codex-store-adapter.js +5 -55
  25. package/dist/src/codex-store-adapter.js.map +1 -1
  26. package/dist/src/codex-terminal-agent-adapter.d.ts +34 -0
  27. package/dist/src/codex-terminal-agent-adapter.js +386 -0
  28. package/dist/src/codex-terminal-agent-adapter.js.map +1 -0
  29. package/dist/src/openclaw-plugin.js +60 -11
  30. package/dist/src/openclaw-plugin.js.map +1 -1
  31. package/dist/src/protocol.d.ts +1 -1
  32. package/dist/src/terminal-agent-adapter.d.ts +158 -0
  33. package/dist/src/terminal-agent-adapter.js +109 -0
  34. package/dist/src/terminal-agent-adapter.js.map +1 -0
  35. package/dist/src/terminal-agent-bridge.d.ts +114 -0
  36. package/dist/src/terminal-agent-bridge.js +487 -0
  37. package/dist/src/terminal-agent-bridge.js.map +1 -0
  38. package/dist/src/terminal-agent-registry.d.ts +7 -0
  39. package/dist/src/terminal-agent-registry.js +24 -0
  40. package/dist/src/terminal-agent-registry.js.map +1 -0
  41. package/dist/src/terminal-control-provider.d.ts +8 -6
  42. package/dist/src/terminal-control-provider.js +5 -5
  43. package/dist/src/terminal-control-provider.js.map +1 -1
  44. package/dist/src/terminal-process-source.d.ts +25 -0
  45. package/dist/src/terminal-process-source.js +77 -0
  46. package/dist/src/terminal-process-source.js.map +1 -0
  47. package/openclaw.plugin.json +7 -3
  48. package/package.json +1 -1
  49. package/templates/openclaw-skills/agent-knock-knock/SKILL.md +19 -16
@@ -1 +1 @@
1
- {"version":3,"file":"terminal-control-provider.js","sourceRoot":"","sources":["../../src/terminal-control-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AA8C7B,MAAM,OAAO,2BAA2B;IACrB,UAAU,CAAqD;IAC/D,WAAW,CAAW;IACtB,QAAQ,CAAW;IAEpC,YAAY,UAIR,EAAE;QACJ,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,UAAU,CAAC;QACnD,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,sBAAsB,EAAE,CAAC;QACnE,IAAI,CAAC,QAAQ,GAAG,aAAa,CAAC,OAAO,CAAC,QAAQ,IAAI,mBAAmB,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED,KAAK,CAAC,SAAS;QACb,OAAO,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC;IACvC,CAAC;IAED,KAAK,CAAC,QAAQ;QACZ,MAAM,KA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C9B,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,yBAAyB,CAAC,KAAyB;IAC1D,OAAO,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC;AAC3C,CAAC;AAED,SAAS,aAAa,CAAC,IAAY;IACjC,IAAI,OAAO,OAAO,CAAC,MAAM,KAAK,UAAU,EAAE,CAAC;QACzC,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,GAAG,IAAI,SAAS,OAAO,CAAC,MAAM,EAAE,UAAU,CAAC;AACpD,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { TerminalProcessSnapshot } from "./terminal-agent-adapter.js";
2
+ export interface ProcessCommandResult {
3
+ status: number | null;
4
+ stdout: string;
5
+ stderr: string;
6
+ error?: Error;
7
+ }
8
+ export interface TerminalProcessSource {
9
+ listProcessSnapshots(isCandidate?: (snapshot: TerminalProcessSnapshot) => boolean): Promise<TerminalProcessSnapshot[]>;
10
+ }
11
+ export declare class StaticTerminalProcessSource implements TerminalProcessSource {
12
+ private readonly snapshots;
13
+ constructor(snapshots: readonly TerminalProcessSnapshot[]);
14
+ listProcessSnapshots(isCandidate?: (snapshot: TerminalProcessSnapshot) => boolean): Promise<TerminalProcessSnapshot[]>;
15
+ }
16
+ export declare class SystemTerminalProcessSource implements TerminalProcessSource {
17
+ private readonly runCommand;
18
+ constructor(options?: {
19
+ runCommand?: (command: string, args: string[]) => ProcessCommandResult;
20
+ });
21
+ listProcessSnapshots(isCandidate?: (snapshot: TerminalProcessSnapshot) => boolean): Promise<TerminalProcessSnapshot[]>;
22
+ }
23
+ export declare function parsePsProcessSnapshots(output: string): TerminalProcessSnapshot[];
24
+ export declare function parseLsofCwdMap(output: string): Map<number, string>;
25
+ export declare function runProcessCommand(command: string, args: string[]): ProcessCommandResult;
@@ -0,0 +1,77 @@
1
+ import { spawnSync } from "node:child_process";
2
+ export class StaticTerminalProcessSource {
3
+ snapshots;
4
+ constructor(snapshots) {
5
+ this.snapshots = snapshots;
6
+ }
7
+ async listProcessSnapshots(isCandidate = () => true) {
8
+ return this.snapshots.filter(isCandidate).map((snapshot) => ({ ...snapshot }));
9
+ }
10
+ }
11
+ export class SystemTerminalProcessSource {
12
+ runCommand;
13
+ constructor(options = {}) {
14
+ this.runCommand = options.runCommand ?? runProcessCommand;
15
+ }
16
+ async listProcessSnapshots(isCandidate = () => true) {
17
+ const ps = this.runCommand("ps", ["-axo", "pid,ppid,etime,command"]);
18
+ if (ps.status !== 0) {
19
+ throw new Error(ps.stderr || ps.error?.message || "ps failed");
20
+ }
21
+ const candidates = parsePsProcessSnapshots(ps.stdout).filter(isCandidate);
22
+ if (candidates.length === 0) {
23
+ return [];
24
+ }
25
+ const lsof = this.runCommand("lsof", [
26
+ "-a",
27
+ "-d",
28
+ "cwd",
29
+ "-p",
30
+ candidates.map((snapshot) => String(snapshot.pid)).join(",")
31
+ ]);
32
+ if (lsof.status !== 0) {
33
+ return candidates;
34
+ }
35
+ const cwdByPid = parseLsofCwdMap(lsof.stdout);
36
+ return candidates.map((snapshot) => ({
37
+ ...snapshot,
38
+ cwd: snapshot.cwd ?? cwdByPid.get(snapshot.pid)
39
+ }));
40
+ }
41
+ }
42
+ export function parsePsProcessSnapshots(output) {
43
+ return output
44
+ .split(/\r?\n/)
45
+ .slice(1)
46
+ .map((line) => /^\s*(\d+)\s+(\d+)\s+(\S+)\s+(.+?)\s*$/u.exec(line))
47
+ .filter((match) => Boolean(match))
48
+ .map((match) => ({
49
+ pid: Number(match[1]),
50
+ ppid: Number(match[2]),
51
+ elapsed: match[3],
52
+ command: match[4]
53
+ }));
54
+ }
55
+ export function parseLsofCwdMap(output) {
56
+ const cwdByPid = new Map();
57
+ for (const line of output.split(/\r?\n/).slice(1)) {
58
+ const match = /^\S+\s+(\d+)\s+\S+\s+cwd\s+\S+\s+\S+\s+\S+\s+\S+\s+(.+?)\s*$/u.exec(line);
59
+ if (match) {
60
+ cwdByPid.set(Number(match[1]), match[2]);
61
+ }
62
+ }
63
+ return cwdByPid;
64
+ }
65
+ export function runProcessCommand(command, args) {
66
+ const result = spawnSync(command, args, {
67
+ encoding: "utf8",
68
+ maxBuffer: 1024 * 1024 * 10
69
+ });
70
+ return {
71
+ status: result.status,
72
+ stdout: result.stdout,
73
+ stderr: result.stderr,
74
+ error: result.error
75
+ };
76
+ }
77
+ //# sourceMappingURL=terminal-process-source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"terminal-process-source.js","sourceRoot":"","sources":["../../src/terminal-process-source.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAgB/C,MAAM,OAAO,2BAA2B;IACT;IAA7B,YAA6B,SAA6C;QAA7C,cAAS,GAAT,SAAS,CAAoC;IAAG,CAAC;IAE9E,KAAK,CAAC,oBAAoB,CACxB,cAA8D,GAAG,EAAE,CAAC,IAAI;QAExE,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,QAAQ,EAAE,CAAC,CAAC,CAAC;IACjF,CAAC;CACF;AAED,MAAM,OAAO,2BAA2B;IACrB,UAAU,CAA4D;IAEvF,YAAY,UAER,EAAE;QACJ,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,iBAAiB,CAAC;IAC5D,CAAC;IAED,KAAK,CAAC,oBAAoB,CACxB,cAA8D,GAAG,EAAE,CAAC,IAAI;QAExE,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC,CAAC;QACrE,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CA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"description": "Agent Knock Knock (AKK/akk) delegates OpenClaw coding work to local Codex, Claude, or Cursor agents. Use this plugin when the user says AKK, akk, Agent Knock Knock, asks to hand work to Codex, Claude, or Cursor, asks what agent tasks are running, asks what an AKK/Codex session is about, sends a follow-up to an agent task, renews monitoring for a stalled terminal task, recovers an unavailable agent session, cancels a running agent task, or closes an agent task. Default delegation target comes from plugin config defaultAgent and falls back to Codex when unset; explicit user agent requests override it.",
4
+ "description": "Agent Knock Knock (AKK/akk) delegates OpenClaw coding work to local Codex, Claude, or Cursor agents. Use this plugin when the user says AKK, akk, Agent Knock Knock, asks to hand work to Codex, Claude, or Cursor, asks what agent tasks are running, asks what an AKK, Codex, or Claude session is about, sends a follow-up to an agent task, renews monitoring for a stalled terminal task, recovers an unavailable agent session, cancels a running agent task, or closes an agent task. Default delegation target comes from plugin config defaultAgent and falls back to Codex when unset; explicit user agent requests override it.",
5
5
  "activation": {
6
6
  "onStartup": true
7
7
  },
@@ -16,6 +16,7 @@
16
16
  "agent_knock_knock_describe",
17
17
  "agent_knock_knock_send",
18
18
  "agent_knock_knock_renew",
19
+ "agent_knock_knock_retry_callback",
19
20
  "agent_knock_knock_cancel",
20
21
  "agent_knock_knock_recover",
21
22
  "agent_knock_knock_close",
@@ -43,6 +44,9 @@
43
44
  "agent_knock_knock_renew": {
44
45
  "optional": true
45
46
  },
47
+ "agent_knock_knock_retry_callback": {
48
+ "optional": true
49
+ },
46
50
  "agent_knock_knock_cancel": {
47
51
  "optional": true
48
52
  },
@@ -167,7 +171,7 @@
167
171
  "autoApprove": {
168
172
  "type": "object",
169
173
  "additionalProperties": false,
170
- "description": "Deterministic terminal approval policy. Disabled by default and never exposed as model-controlled tool parameters.",
174
+ "description": "Deterministic Codex and Claude Code terminal approval policy. Disabled by default and never exposed as model-controlled tool parameters.",
171
175
  "properties": {
172
176
  "enabled": {
173
177
  "type": "boolean",
@@ -189,7 +193,7 @@
189
193
  "minItems": 1,
190
194
  "items": {
191
195
  "type": "string",
192
- "enum": ["codex"]
196
+ "enum": ["codex", "claude"]
193
197
  }
194
198
  },
195
199
  "workspaces": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scotthuang/agent-knock-knock",
3
- "version": "0.2.44",
3
+ "version": "0.2.47",
4
4
  "description": "OpenClaw plugin bridge for delegating work to local coding agents through ACPX.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -5,7 +5,7 @@ description: Delegate OpenClaw tasks to local Codex, Claude Code, and Cursor age
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 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 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.
9
9
 
10
10
  Treat `AKK` and `akk` the same way.
11
11
 
@@ -35,7 +35,7 @@ Slash command forms:
35
35
  - `/akk cursor <task>`: delegate to Cursor.
36
36
  - `/akk list`: list open AKK sessions.
37
37
  - `/akk status <conversation-id>`: inspect one AKK session.
38
- - `/akk describe <conversation-id>`: summarize what one AKK-managed, native Codex, or terminal-controlled Codex session is about.
38
+ - `/akk describe <conversation-id>`: summarize what one AKK-managed, native, or terminal-controlled session is about.
39
39
  - `/akk send <conversation-id> <message>`: send a follow-up to one open AKK session.
40
40
  - `/akk cancel <conversation-id>`: request cooperative cancellation of the current in-flight prompt for one AKK session without closing it.
41
41
  - `/akk recover <conversation-id>`: recover a session that is waiting for a recovery decision by starting a new agent session with AKK's saved protocol history summary.
@@ -47,24 +47,24 @@ Natural-language forms:
47
47
  - `AKK Codex: <task>`: call `agent_knock_knock_delegate` with `agent="codex"`.
48
48
  - `AKK Claude: <task>`: call `agent_knock_knock_delegate` with `agent="claude"`.
49
49
  - `AKK Cursor: <task>`: call `agent_knock_knock_delegate` with `agent="cursor"`.
50
- - `AKK list`, `akk list`, questions such as "what AKK sessions are open", "which Codex sessions are currently running", "terminal-controlled Codex sessions", or requests to list active local coding-agent work: call `agent_knock_knock_list`.
50
+ - `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`.
51
51
  - `AKK status <conversation-id>` 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.
52
- - `AKK describe <conversation-id>`, `AKK summary <conversation-id>`, 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, Codex rollout history, cwd-matched history, and terminal-screen fallback with explicit confidence.
53
- - `AKK send <conversation-id>: <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 Codex 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 `id` directly; AKK will type the message into the controlled terminal pane and submit it. Do not call `agent_knock_knock_delegate` for these requests unless the user explicitly asks for a new independent session.
54
- - `AKK cancel <conversation-id>` or requests to stop the current running work without closing the session: call `agent_knock_knock_cancel`. If the target comes from a `terminal_controlled` entry in `AKK list`, use that entry's `id` directly; AKK sends Control-C to the controlled terminal pane.
52
+ - `AKK describe <conversation-id>`, `AKK summary <conversation-id>`, 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.
53
+ - `AKK send <conversation-id>: <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 `id` directly; AKK submits only when the pane is at a verified idle prompt. For Claude Code, this background send returns a managed conversation ID and creates the lease required for structured approvals and completion callbacks; 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.
54
+ - `AKK cancel <conversation-id>` 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 denies a pending structured Claude permission request; otherwise it uses the adapter's interrupt key (`Control-C` for Codex or `Escape` for Claude Code). If a Claude permission dialog cannot be revalidated, AKK sends no key and it must be resolved manually in the terminal.
55
55
  - `AKK renew <conversation-id>` 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.
56
56
  - `AKK recover <conversation-id>`: call `agent_knock_knock_recover`.
57
57
  - `AKK close <conversation-id>`: call `agent_knock_knock_close`.
58
58
  - `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"`.
59
59
  - `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"`.
60
- - `AKK approve <conversation-id>` or requests to approve the current visible Codex permission/command prompt for a terminal-controlled session: first call `agent_knock_knock_status` for that conversation and show the terminal screen excerpt to the user. Only after the user explicitly approves that prompt, call `agent_knock_knock_approve`. If an AKK callback says a terminal bridge session is waiting for approval, follow its instructions: approve with `agent_knock_knock_approve`; deny or stop that request with `agent_knock_knock_cancel`. If the target comes from a `terminal_controlled` entry in `AKK list`, use that entry's `id` directly; it does not need an AKK-managed state file before status or approval.
60
+ - `AKK approve <conversation-id>` or requests to approve a terminal-controlled permission or command prompt: first call `agent_knock_knock_status` and show the detected request details to the user. Only after the user explicitly approves that exact request, call `agent_knock_knock_approve` with its `approval_state.fingerprint` as `expected_approval_fingerprint`. Claude Code uses the structured `PermissionRequest` hook; Codex uses the current visible prompt. 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, ambiguous, or changed requests must never be approved. Status works directly for every listed `terminal_controlled` ID. Codex visible-prompt approval can also work without managed state; Claude approval requires the managed lease created by a prior background send.
61
61
  - `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"`.
62
62
 
63
63
  Session reuse rule:
64
64
 
65
65
  - 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 the most recent matching open AKK session instead of creating a new delegation.
66
66
  - When the user gives a follow-up without a `conversation_id`, first call `agent_knock_knock_list`, choose the most recent open session that matches the requested agent if one is named, and then call `agent_knock_knock_send` with that `conversation_id`.
67
- - 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:tmux:my-work:0.1:38140`; do not create a new AKK delegation.
67
+ - 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.
68
68
  - `idle` means the agent completed the previous round but the AKK session is still open and should be reused for follow-ups.
69
69
  - `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 <conversation-id>`, `AKK close <conversation-id>`, or starting a new independent AKK delegation.
70
70
  - 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.
@@ -79,7 +79,8 @@ AKK Cursor: fix the flaky UI test
79
79
  akk list
80
80
  akk describe task-20260618T010203Z-abcdef12
81
81
  akk send task-20260618T010203Z-abcdef12: continue with the smaller implementation
82
- akk send terminal:tmux:my-work:0.1:38140: hello 测试一下通信
82
+ akk send terminal:v2:tmux:codex:my-work:0.1:38140: hello 测试一下通信
83
+ akk send terminal:v2:tmux:claude:claude-work:0.1:29466: review the current changes
83
84
  给 AKK list 里的 my-work:0.1 发一条消息:继续刚才的任务
84
85
  再让刚才那个 Codex 分析 ~/chrome-debug 为什么占空间
85
86
  akk cancel task-20260618T010203Z-abcdef12
@@ -114,7 +115,7 @@ scripts/bidirectional-delegate.sh --request '<user task>'
114
115
 
115
116
  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.
116
117
 
117
- All OpenClaw-to-agent task delivery must go through the Agent Knock Knock plugin tools, `scripts/bidirectional-delegate.sh`, or an equivalent `agent-knock-knock delegate` command. 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 Codex pane, monitors Codex rollout/terminal state, and sends the OpenClaw callback itself.
118
+ All OpenClaw-to-agent task delivery must go through the Agent Knock Knock plugin tools, `scripts/bidirectional-delegate.sh`, or an equivalent `agent-knock-knock delegate` command. 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 adapter and structured hook state, and sends the OpenClaw callback itself.
118
119
 
119
120
  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.
120
121
 
@@ -142,24 +143,26 @@ Make clear that `recover` is AKK replay recovery, not guaranteed native coding-a
142
143
 
143
144
  Do not start a replacement task without the user's explicit choice.
144
145
 
145
- ## Native Session Takeover
146
+ ## Native and tmux Sessions
146
147
 
147
- Native session takeover is for Codex sessions that were created outside AKK, such as a user-run terminal Codex CLI. It is separate from AKK managed conversation recovery.
148
+ 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.
148
149
 
149
- Use `agent_knock_knock_list` when the user asks about current active native Codex sessions, terminal-controlled Codex sessions, or which local coding-agent work is currently open. The list result separates:
150
+ 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:
150
151
 
151
152
  - `delegated`: AKK-managed tasks.
152
153
  - `native`: discovered local native sessions that AKK cannot directly control.
153
154
  - `terminal_controlled`: discovered local native sessions in a controllable terminal provider. The current provider is tmux.
154
155
 
155
- Use `agent_knock_knock_describe` when the user asks what a listed session is about. AKK-managed sessions use durable AKK conversation history. Native and terminal-controlled Codex sessions use exact Codex rollout history when a session id is available, fall back to cwd-matched rollout history when needed, 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.
156
+ 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.
156
157
 
157
158
  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:
158
159
 
159
160
  - `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.
160
- - `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`, call `agent_knock_knock_status`, show the terminal screen excerpt, and ask for explicit approval.
161
+ - `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`.
161
162
  - `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.
162
163
 
164
+ 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. Treat the structured completion or error callback as authoritative. Do not report completion merely because the pane looks idle: AKK emits one completion from Claude's `Stop.last_assistant_message` only after background tasks and scheduled jobs are empty, and maps `StopFailure` to an error. If the Claude hooks are unavailable, AKK deliberately keeps completion and approval conservative.
165
+
163
166
  Do not present `fork` as a standalone command or standalone feature. It is a takeover strategy.
164
167
 
165
168
  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.
@@ -177,7 +180,7 @@ Use structured JSON messages with these types:
177
180
  - `error`: runtime, tool, or protocol failure
178
181
  - `control`: budget warning or lifecycle control
179
182
 
180
- `cancel` is lifecycle control outside the agent message protocol. For delegated sessions, it asks ACPX to cooperatively cancel the current in-flight prompt for the existing Codex, Claude, or Cursor session. For terminal-controlled sessions, it sends Control-C to the controlled terminal pane. It does not close the AKK session; use `close` only when the session should no longer be reused.
183
+ `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 denies a pending structured permission when safe or uses the adapter's interrupt action, then marks that AKK task cancelled while leaving the tmux pane open.
181
184
 
182
185
  Only messages with `requires_response=true` consume response rounds.
183
186