@scotthuang/agent-knock-knock 0.13.18 → 0.14.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 +31 -0
- package/CONTRIBUTING.md +212 -0
- package/README.md +105 -166
- package/connectors/deepseek-harness/LICENSE +21 -0
- package/connectors/deepseek-harness/README.md +406 -0
- package/connectors/pi/LICENSE +21 -0
- package/connectors/pi/README.md +446 -0
- package/dist/src/backend-recovery-semantic.d.ts +16 -0
- package/dist/src/backend-recovery-semantic.js +113 -0
- package/dist/src/backend-recovery-semantic.js.map +1 -0
- package/dist/src/backend-task-recovery.d.ts +103 -0
- package/dist/src/backend-task-recovery.js +142 -0
- package/dist/src/backend-task-recovery.js.map +1 -0
- package/dist/src/callback-transport.d.ts +8 -0
- package/dist/src/callback-transport.js +14 -0
- package/dist/src/callback-transport.js.map +1 -1
- package/dist/src/cli-core.js +18 -8
- package/dist/src/cli-core.js.map +1 -1
- package/dist/src/cli-runtime-context.d.ts +5 -0
- package/dist/src/cli-runtime-context.js.map +1 -1
- package/dist/src/codex-native-cli-adapter.d.ts +6 -0
- package/dist/src/codex-native-cli-adapter.js +273 -0
- package/dist/src/codex-native-cli-adapter.js.map +1 -0
- package/dist/src/codex-native-client-interactions.d.ts +6 -0
- package/dist/src/codex-native-client-interactions.js +124 -0
- package/dist/src/codex-native-client-interactions.js.map +1 -0
- package/dist/src/codex-native-client-rpc.d.ts +21 -0
- package/dist/src/codex-native-client-rpc.js +137 -0
- package/dist/src/codex-native-client-rpc.js.map +1 -0
- package/dist/src/codex-native-client.d.ts +42 -0
- package/dist/src/codex-native-client.js +326 -0
- package/dist/src/codex-native-client.js.map +1 -0
- package/dist/src/codex-native-identity.d.ts +6 -0
- package/dist/src/codex-native-identity.js +42 -0
- package/dist/src/codex-native-identity.js.map +1 -0
- package/dist/src/codex-native-monitor.d.ts +4 -0
- package/dist/src/codex-native-monitor.js +92 -0
- package/dist/src/codex-native-monitor.js.map +1 -0
- package/dist/src/codex-native-outbox.d.ts +16 -0
- package/dist/src/codex-native-outbox.js +120 -0
- package/dist/src/codex-native-outbox.js.map +1 -0
- package/dist/src/codex-native-public-projection.d.ts +545 -0
- package/dist/src/codex-native-public-projection.js +182 -0
- package/dist/src/codex-native-public-projection.js.map +1 -0
- package/dist/src/codex-native-record-store.d.ts +27 -0
- package/dist/src/codex-native-record-store.js +111 -0
- package/dist/src/codex-native-record-store.js.map +1 -0
- package/dist/src/codex-native-response-service.d.ts +69 -0
- package/dist/src/codex-native-response-service.js +244 -0
- package/dist/src/codex-native-response-service.js.map +1 -0
- package/dist/src/codex-native-runtime.d.ts +46 -0
- package/dist/src/codex-native-runtime.js +112 -0
- package/dist/src/codex-native-runtime.js.map +1 -0
- package/dist/src/codex-native-semantic.d.ts +17 -0
- package/dist/src/codex-native-semantic.js +175 -0
- package/dist/src/codex-native-semantic.js.map +1 -0
- package/dist/src/codex-native-snapshot.d.ts +19 -0
- package/dist/src/codex-native-snapshot.js +160 -0
- package/dist/src/codex-native-snapshot.js.map +1 -0
- package/dist/src/codex-native-state-store.d.ts +61 -0
- package/dist/src/codex-native-state-store.js +132 -0
- package/dist/src/codex-native-state-store.js.map +1 -0
- package/dist/src/codex-native-task-service.d.ts +71 -0
- package/dist/src/codex-native-task-service.js +502 -0
- package/dist/src/codex-native-task-service.js.map +1 -0
- package/dist/src/codex-native-types.d.ts +92 -0
- package/dist/src/codex-native-types.js +15 -0
- package/dist/src/codex-native-types.js.map +1 -0
- package/dist/src/conversation-list.d.ts +12 -0
- package/dist/src/conversation-list.js +30 -0
- package/dist/src/conversation-list.js.map +1 -0
- package/dist/src/conversation-route-dispatch.d.ts +13 -0
- package/dist/src/conversation-route-dispatch.js +66 -0
- package/dist/src/conversation-route-dispatch.js.map +1 -0
- package/dist/src/conversation-route-legacy.d.ts +18 -0
- package/dist/src/conversation-route-legacy.js +54 -0
- package/dist/src/conversation-route-legacy.js.map +1 -0
- package/dist/src/conversation-route-store.d.ts +51 -0
- package/dist/src/conversation-route-store.js +126 -0
- package/dist/src/conversation-route-store.js.map +1 -0
- package/dist/src/conversation-routing-cli-adapter.d.ts +12 -0
- package/dist/src/conversation-routing-cli-adapter.js +211 -0
- package/dist/src/conversation-routing-cli-adapter.js.map +1 -0
- package/dist/src/conversation-routing-commands.d.ts +11 -0
- package/dist/src/conversation-routing-commands.js +85 -0
- package/dist/src/conversation-routing-commands.js.map +1 -0
- package/dist/src/conversation-routing-home.d.ts +26 -0
- package/dist/src/conversation-routing-home.js +105 -0
- package/dist/src/conversation-routing-home.js.map +1 -0
- package/dist/src/conversation-routing-identity.d.ts +40 -0
- package/dist/src/conversation-routing-identity.js +174 -0
- package/dist/src/conversation-routing-identity.js.map +1 -0
- package/dist/src/conversation-runtime-route-store.d.ts +11 -0
- package/dist/src/conversation-runtime-route-store.js +118 -0
- package/dist/src/conversation-runtime-route-store.js.map +1 -0
- package/dist/src/desktop-async-interactions.d.ts +15 -0
- package/dist/src/desktop-async-interactions.js +88 -0
- package/dist/src/desktop-async-interactions.js.map +1 -0
- package/dist/src/desktop-async-state.d.ts +5 -0
- package/dist/src/desktop-async-state.js +53 -0
- package/dist/src/desktop-async-state.js.map +1 -0
- package/dist/src/desktop-cli-adapter.d.ts +7 -0
- package/dist/src/desktop-cli-adapter.js +322 -0
- package/dist/src/desktop-cli-adapter.js.map +1 -0
- package/dist/src/desktop-cli-controls.d.ts +9 -0
- package/dist/src/desktop-cli-controls.js +45 -0
- package/dist/src/desktop-cli-controls.js.map +1 -0
- package/dist/src/desktop-command-presentation.d.ts +2 -0
- package/dist/src/desktop-command-presentation.js +31 -0
- package/dist/src/desktop-command-presentation.js.map +1 -0
- package/dist/src/desktop-control-semantic.d.ts +8 -0
- package/dist/src/desktop-control-semantic.js +68 -0
- package/dist/src/desktop-control-semantic.js.map +1 -0
- package/dist/src/desktop-identity.d.ts +5 -0
- package/dist/src/desktop-identity.js +40 -0
- package/dist/src/desktop-identity.js.map +1 -0
- package/dist/src/desktop-interaction-projection.d.ts +57 -0
- package/dist/src/desktop-interaction-projection.js +196 -0
- package/dist/src/desktop-interaction-projection.js.map +1 -0
- package/dist/src/desktop-interaction-state.d.ts +3 -0
- package/dist/src/desktop-interaction-state.js +48 -0
- package/dist/src/desktop-interaction-state.js.map +1 -0
- package/dist/src/desktop-ipc-async-answer.d.ts +9 -0
- package/dist/src/desktop-ipc-async-answer.js +71 -0
- package/dist/src/desktop-ipc-async-answer.js.map +1 -0
- package/dist/src/desktop-ipc-client.d.ts +47 -0
- package/dist/src/desktop-ipc-client.js +400 -0
- package/dist/src/desktop-ipc-client.js.map +1 -0
- package/dist/src/desktop-ipc-native-operations.d.ts +11 -0
- package/dist/src/desktop-ipc-native-operations.js +126 -0
- package/dist/src/desktop-ipc-native-operations.js.map +1 -0
- package/dist/src/desktop-ipc-transport.d.ts +13 -0
- package/dist/src/desktop-ipc-transport.js +123 -0
- package/dist/src/desktop-ipc-transport.js.map +1 -0
- package/dist/src/desktop-list.d.ts +25 -0
- package/dist/src/desktop-list.js +55 -0
- package/dist/src/desktop-list.js.map +1 -0
- package/dist/src/desktop-metadata-reader.d.ts +30 -0
- package/dist/src/desktop-metadata-reader.js +182 -0
- package/dist/src/desktop-metadata-reader.js.map +1 -0
- package/dist/src/desktop-monitor.d.ts +4 -0
- package/dist/src/desktop-monitor.js +101 -0
- package/dist/src/desktop-monitor.js.map +1 -0
- package/dist/src/desktop-public-projection.d.ts +6 -0
- package/dist/src/desktop-public-projection.js +134 -0
- package/dist/src/desktop-public-projection.js.map +1 -0
- package/dist/src/desktop-request-interactions.d.ts +14 -0
- package/dist/src/desktop-request-interactions.js +144 -0
- package/dist/src/desktop-request-interactions.js.map +1 -0
- package/dist/src/desktop-response-dispatch.d.ts +14 -0
- package/dist/src/desktop-response-dispatch.js +19 -0
- package/dist/src/desktop-response-dispatch.js.map +1 -0
- package/dist/src/desktop-response-evidence.d.ts +4 -0
- package/dist/src/desktop-response-evidence.js +19 -0
- package/dist/src/desktop-response-evidence.js.map +1 -0
- package/dist/src/desktop-response-service.d.ts +11 -0
- package/dist/src/desktop-response-service.js +188 -0
- package/dist/src/desktop-response-service.js.map +1 -0
- package/dist/src/desktop-response-store.d.ts +35 -0
- package/dist/src/desktop-response-store.js +58 -0
- package/dist/src/desktop-response-store.js.map +1 -0
- package/dist/src/desktop-response-types.d.ts +20 -0
- package/dist/src/desktop-response-types.js +2 -0
- package/dist/src/desktop-response-types.js.map +1 -0
- package/dist/src/desktop-response-value.d.ts +6 -0
- package/dist/src/desktop-response-value.js +31 -0
- package/dist/src/desktop-response-value.js.map +1 -0
- package/dist/src/desktop-runtime.d.ts +153 -0
- package/dist/src/desktop-runtime.js +88 -0
- package/dist/src/desktop-runtime.js.map +1 -0
- package/dist/src/desktop-semantic.d.ts +21 -0
- package/dist/src/desktop-semantic.js +140 -0
- package/dist/src/desktop-semantic.js.map +1 -0
- package/dist/src/desktop-session-catalog.d.ts +68 -0
- package/dist/src/desktop-session-catalog.js +225 -0
- package/dist/src/desktop-session-catalog.js.map +1 -0
- package/dist/src/desktop-session-controls.d.ts +145 -0
- package/dist/src/desktop-session-controls.js +176 -0
- package/dist/src/desktop-session-controls.js.map +1 -0
- package/dist/src/desktop-sidebar-metadata.d.ts +27 -0
- package/dist/src/desktop-sidebar-metadata.js +83 -0
- package/dist/src/desktop-sidebar-metadata.js.map +1 -0
- package/dist/src/desktop-sidebar-projects.d.ts +10 -0
- package/dist/src/desktop-sidebar-projects.js +31 -0
- package/dist/src/desktop-sidebar-projects.js.map +1 -0
- package/dist/src/desktop-sidebar-selection.d.ts +28 -0
- package/dist/src/desktop-sidebar-selection.js +85 -0
- package/dist/src/desktop-sidebar-selection.js.map +1 -0
- package/dist/src/desktop-snapshot-details.d.ts +4 -0
- package/dist/src/desktop-snapshot-details.js +116 -0
- package/dist/src/desktop-snapshot-details.js.map +1 -0
- package/dist/src/desktop-snapshot.d.ts +11 -0
- package/dist/src/desktop-snapshot.js +276 -0
- package/dist/src/desktop-snapshot.js.map +1 -0
- package/dist/src/desktop-state-store.d.ts +72 -0
- package/dist/src/desktop-state-store.js +269 -0
- package/dist/src/desktop-state-store.js.map +1 -0
- package/dist/src/desktop-task-interactions.d.ts +10 -0
- package/dist/src/desktop-task-interactions.js +93 -0
- package/dist/src/desktop-task-interactions.js.map +1 -0
- package/dist/src/desktop-task-recovery.d.ts +38 -0
- package/dist/src/desktop-task-recovery.js +171 -0
- package/dist/src/desktop-task-recovery.js.map +1 -0
- package/dist/src/desktop-task-service.d.ts +54 -0
- package/dist/src/desktop-task-service.js +441 -0
- package/dist/src/desktop-task-service.js.map +1 -0
- package/dist/src/desktop-types.d.ts +281 -0
- package/dist/src/desktop-types.js +13 -0
- package/dist/src/desktop-types.js.map +1 -0
- package/dist/src/host-monitor-reconciliation.js +36 -4
- package/dist/src/host-monitor-reconciliation.js.map +1 -1
- package/dist/src/host-profile-runtime.js +7 -3
- package/dist/src/host-profile-runtime.js.map +1 -1
- package/dist/src/local-codex-cli-adapter.d.ts +7 -0
- package/dist/src/local-codex-cli-adapter.js +13 -0
- package/dist/src/local-codex-cli-adapter.js.map +1 -0
- package/dist/src/openclaw-callback-transport.js +2 -1
- package/dist/src/openclaw-callback-transport.js.map +1 -1
- package/dist/src/semantic-conversation-target.d.ts +4 -0
- package/dist/src/semantic-conversation-target.js +20 -0
- package/dist/src/semantic-conversation-target.js.map +1 -0
- package/dist/src/semantic-permission-control.js +47 -9
- package/dist/src/semantic-permission-control.js.map +1 -1
- package/dist/src/semantic-private-authority-offers.d.ts +1 -1
- package/dist/src/semantic-private-authority-offers.js +3 -1
- package/dist/src/semantic-private-authority-offers.js.map +1 -1
- package/dist/src/semantic-tool-command-helpers.d.ts +6 -0
- package/dist/src/semantic-tool-command-helpers.js +199 -78
- package/dist/src/semantic-tool-command-helpers.js.map +1 -1
- package/dist/src/semantic-tool-descriptions.d.ts +2 -1
- package/dist/src/semantic-tool-descriptions.js +81 -35
- package/dist/src/semantic-tool-descriptions.js.map +1 -1
- package/dist/src/semantic-tool-list-projection.js +66 -2
- package/dist/src/semantic-tool-list-projection.js.map +1 -1
- package/dist/src/semantic-tool-presentation.js +76 -7
- package/dist/src/semantic-tool-presentation.js.map +1 -1
- package/dist/src/semantic-tool-runtime.js +129 -29
- package/dist/src/semantic-tool-runtime.js.map +1 -1
- package/dist/src/semantic-tool-schemas.d.ts +410 -27
- package/dist/src/semantic-tool-schemas.js +176 -88
- package/dist/src/semantic-tool-schemas.js.map +1 -1
- package/dist/src/terminal-action-contracts.js +10 -6
- package/dist/src/terminal-action-contracts.js.map +1 -1
- package/dist/src/terminal-list-cli-adapter.d.ts +1 -0
- package/dist/src/terminal-list-cli-adapter.js +6 -3
- package/dist/src/terminal-list-cli-adapter.js.map +1 -1
- package/dist/src/terminal-monitor-decision-policy.d.ts +1 -1
- package/dist/src/terminal-permission-control-list-projection.d.ts +1 -1
- package/dist/src/terminal-user-send-intent.d.ts +2 -0
- package/dist/src/terminal-user-send-intent.js +11 -3
- package/dist/src/terminal-user-send-intent.js.map +1 -1
- package/docs/architecture/current-architecture.md +313 -0
- package/docs/architecture/interactive-terminal-response.md +276 -0
- package/docs/architecture/issue-126-final-report.md +248 -0
- package/docs/architecture/orchestration-refactor-history.md +2987 -0
- package/docs/architecture/orchestration-refactor.md +21 -0
- package/docs/backend-task-recovery.md +89 -0
- package/docs/bidirectional-agent-protocol.md +260 -0
- package/docs/codex-cli-native-compatibility.md +246 -0
- package/docs/codex-desktop-compatibility.md +414 -0
- package/docs/openclaw-operations.md +281 -0
- package/docs/openclaw-session-turn-delivery-requirement.md +45 -0
- package/docs/operator-guide.md +543 -0
- package/docs/storage-and-logging.md +91 -0
- package/docs/test-performance-issue-108.md +80 -0
- package/docs/test-performance-issue-120.md +226 -0
- package/docs/testing.md +628 -0
- package/openclaw.plugin.json +7 -3
- package/package.json +6 -13
- package/templates/openclaw-skills/agent-knock-knock/SKILL.md +66 -15
|
@@ -0,0 +1,543 @@
|
|
|
1
|
+
# AKK Operator Guide
|
|
2
|
+
|
|
3
|
+
This guide covers daily use of existing Codex CLI backend conversations,
|
|
4
|
+
Codex Desktop conversations, and Codex or Claude Code terminals. OpenClaw,
|
|
5
|
+
Pi, DeepSeek Harness, or another compatible Host can act as the controller.
|
|
6
|
+
AKK 0.14.0 introduces the backend and Desktop features described here; see the
|
|
7
|
+
[README](../README.md) for installation. Each connector's pinned runtime
|
|
8
|
+
determines its supported capabilities.
|
|
9
|
+
|
|
10
|
+
Choose the guide for the coding agent you already use:
|
|
11
|
+
|
|
12
|
+
| Existing coding-agent environment | Setup and capability guide |
|
|
13
|
+
| --- | --- |
|
|
14
|
+
| Codex CLI connected to its shared backend | [CLI backend guide](codex-cli-native-compatibility.md); no tmux or Herdr required |
|
|
15
|
+
| Codex Desktop | [Desktop guide](codex-desktop-compatibility.md); keep the intended conversation open in the supported app |
|
|
16
|
+
| Codex or Claude Code in a shared terminal | [tmux quick start](quickstart-tmux.md) or [Herdr quick start](quickstart-herdr.md) |
|
|
17
|
+
|
|
18
|
+
For controller-specific setup, see [OpenClaw operations](openclaw-operations.md),
|
|
19
|
+
the [Pi guide](../connectors/pi/README.md), or the
|
|
20
|
+
[DeepSeek Harness guide](../connectors/deepseek-harness/README.md).
|
|
21
|
+
AKK never launches a hidden replacement coding agent. Human and controller
|
|
22
|
+
continue in the original conversation or shared terminal.
|
|
23
|
+
|
|
24
|
+
Start with AKK List, choose the intended conversation by title and project,
|
|
25
|
+
then use its advertised Send, Status, Watch, or interaction action. Backend
|
|
26
|
+
tools use the returned `conversation_id`; the controller supplies its own
|
|
27
|
+
session identity. Save the task's returned `watch_id` and, for a managed Send,
|
|
28
|
+
its equivalent `turn_id` for follow-up. A project path or title alone is never
|
|
29
|
+
task identity. [Backend task recovery](backend-task-recovery.md) explains how
|
|
30
|
+
to resume observation or release management for that exact task.
|
|
31
|
+
|
|
32
|
+
## Command reference
|
|
33
|
+
|
|
34
|
+
Direct slash commands are available in every first-party Host integration:
|
|
35
|
+
|
|
36
|
+
| Command | Purpose |
|
|
37
|
+
| --- | --- |
|
|
38
|
+
| `/akk <task>` | Send a task when AKK can prove one unique send-ready terminal. |
|
|
39
|
+
| `/akk <selector>: <message>` | Send to the exact selector returned by the current list. |
|
|
40
|
+
| `/akk list` | Discover conversations, managed work, Watches, and supported actions. |
|
|
41
|
+
| `/akk watch <terminal-id>` | Observe one exact terminal task. |
|
|
42
|
+
| `/akk unwatch <watch-id>` | Stop observation of one terminal or backend Watch without stopping its native task. |
|
|
43
|
+
| `/akk threads <terminal-id>` | List resumable native threads for one terminal. |
|
|
44
|
+
| `/akk models <terminal-id>` | Inspect the current native model and reasoning choices for one exact idle terminal. |
|
|
45
|
+
| `/akk permissions <terminal-id>` | Inspect the exact Codex terminal's native permission choices. |
|
|
46
|
+
| `/akk set-permissions <terminal-id> <advertised-mode-id>` | Apply the selected native permission mode before a task. |
|
|
47
|
+
| `/akk repair-model-control <terminal-id>` | Clear only an exact advertised stale profiled Codex 0.154.0/0.155.1 `/model` Composer surface or open native picker and prove an empty Composer. |
|
|
48
|
+
| `/akk set-model <terminal-id> <model> <reasoning-effort>` | Select one exact tuple from the immediately preceding model catalog. |
|
|
49
|
+
| `/akk new-thread <terminal-id>` | Start a clean native coding-agent thread. |
|
|
50
|
+
| `/akk clear-thread <terminal-id>` | Alias for the same clean-thread lifecycle action. |
|
|
51
|
+
| `/akk resume-thread <terminal-id> [thread]` | Resume one exact native thread. |
|
|
52
|
+
| `/akk status <turn-or-watch>` | Inspect the original managed terminal Turn or backend/terminal Watch. |
|
|
53
|
+
| `/akk respond <turn-id> <answer>` | Answer a question inside the same managed Turn. |
|
|
54
|
+
| `/akk cancel <turn-id>` | Interrupt one exact active managed Turn. |
|
|
55
|
+
|
|
56
|
+
AKK List presents one `conversations[]` collection. It merges terminal/backend
|
|
57
|
+
rows only when their exact current native identities match. A matching project
|
|
58
|
+
or title does not establish that link. Select a conversation and action; AKK
|
|
59
|
+
chooses the supported transport. Bound task and interaction IDs retain their
|
|
60
|
+
original provider, and an uncertain mutation is never retried through another
|
|
61
|
+
transport. The [CLI backend guide](codex-cli-native-compatibility.md#automatic-conversation-routing-2026-10-10)
|
|
62
|
+
describes backend preference and terminal fallback in detail.
|
|
63
|
+
|
|
64
|
+
The terminal-specific commands in the table require a physical terminal;
|
|
65
|
+
Desktop interaction, model, permission, and cancellation controls use their
|
|
66
|
+
advertised semantic tools. Backend and terminal capabilities are distinct.
|
|
67
|
+
Raw CLI output retains provider arrays, including `terminals[]`, for diagnostics.
|
|
68
|
+
Within a terminal row, the optional `managed.current_turn` is active work; `managed.recent_turn` is
|
|
69
|
+
retained history and does not occupy the terminal. Attention-needed records
|
|
70
|
+
whose pane is unavailable appear in `unavailable_managed_turns[]`.
|
|
71
|
+
|
|
72
|
+
Terminal status has three independent evidence axes. `screen_state` describes
|
|
73
|
+
the bounded live TUI (`idle`, `working`, `awaiting_approval`, or `unknown`);
|
|
74
|
+
`native_identity_state` describes foreground native-session resolution
|
|
75
|
+
(`resolved`, `ambiguous`, `verified_absent`, or `unavailable`); and
|
|
76
|
+
`durable_activity_state` describes exact rollout/transcript task evidence
|
|
77
|
+
(`idle`, `working`, or `unknown`). The legacy `activity_state` remains a
|
|
78
|
+
conservative compatibility projection and can therefore be `unknown` while
|
|
79
|
+
`screen_state` is `idle`. These fields are diagnostic; `available_actions`
|
|
80
|
+
remains the authority for tool calls.
|
|
81
|
+
|
|
82
|
+
Human-facing terminal selectors are a slash-command convenience. Terminal
|
|
83
|
+
structured tools use semantic identities: `session_id` for strict continuation, `terminal_id` for
|
|
84
|
+
the currently verified physical terminal, `turn_id` for one managed dispatch,
|
|
85
|
+
`watch_id` for read-only observation, and `native_thread_id` for resume. A
|
|
86
|
+
`session_exact` action targets the continuing native context; a
|
|
87
|
+
`terminal_follow_current` action targets the current verified context in the
|
|
88
|
+
pane. Except for user-intent-first Watch, always use the exact action and
|
|
89
|
+
prefilled semantic IDs from a fresh list.
|
|
90
|
+
|
|
91
|
+
## Reliable Send
|
|
92
|
+
|
|
93
|
+
Backend Send persists one submission and monitors its original accepted native
|
|
94
|
+
task. Reusing its message ID returns the same record; uncertain submission
|
|
95
|
+
evidence never triggers an automatic resend. See the [CLI backend guide](codex-cli-native-compatibility.md)
|
|
96
|
+
and [Desktop guide](codex-desktop-compatibility.md) for native acceptance and
|
|
97
|
+
interaction capabilities. The remainder of this section covers terminal Send,
|
|
98
|
+
including its physical-input fallback and terminal response adapters.
|
|
99
|
+
|
|
100
|
+
The v30 `action_contracts` expose model-facing semantic IDs only. The trusted
|
|
101
|
+
adapter privately derives and revalidates terminal, process, binding, native
|
|
102
|
+
thread, composer, approval, handoff, revision, and compare-and-swap evidence.
|
|
103
|
+
Callers never supply those opaque fences.
|
|
104
|
+
|
|
105
|
+
A managed Send verifies one terminal and native context, creates one Turn,
|
|
106
|
+
proves exact request acceptance, monitors that Turn, and returns completion or
|
|
107
|
+
attention callbacks to the initiating Host. A completed `turn_id` is history,
|
|
108
|
+
not a destination for another task. A question inside a live Turn uses the
|
|
109
|
+
advertised `respond` action with that Turn's `turn_id`.
|
|
110
|
+
|
|
111
|
+
Native interaction prompts use `respond_interaction`, not ordinary `respond`.
|
|
112
|
+
For a supported pending step, the managed monitor sends an
|
|
113
|
+
`interaction_required` callback to wake the owning controller conversation.
|
|
114
|
+
That callback is notification only and carries no private response authority:
|
|
115
|
+
first obtain the current managed Turn's `interaction_state` from Status in the
|
|
116
|
+
same controller conversation, show that exact step to the user, and submit only
|
|
117
|
+
its advertised semantic question/option IDs or bounded typed text. A blocking
|
|
118
|
+
`questionnaire` does not carry `delivery_mode`. A Codex `async_question`
|
|
119
|
+
coexists with a task that remains `working`; responses default to advertised
|
|
120
|
+
`steer_current_turn` or explicitly select advertised `queue_next_turn`: `steer_current_turn` delivers the answer to that running turn,
|
|
121
|
+
while `queue_next_turn` queues it for the next turn. One call resolves one
|
|
122
|
+
current step; the monitor notifies the next supported step when it appears.
|
|
123
|
+
Status remains the manual refresh fallback. Never submit raw keys, shortcut
|
|
124
|
+
chords, or menu indexes, and never respond to `manual_required`, expired,
|
|
125
|
+
changed, secret-bearing, or uncertain state. Codex 0.154.0 and 0.155.1 use
|
|
126
|
+
version-bound TUI execution; main-only notification and stable-question-ID
|
|
127
|
+
wrappers added after 0.155.1 are not assumed to exist in either release.
|
|
128
|
+
|
|
129
|
+
The initial async adapter accepts at most four fully visible suggestions plus
|
|
130
|
+
native Other, and custom answers must be a short, fully visible single line
|
|
131
|
+
without leading/trailing whitespace. Wrapped or clipped input cannot prove the
|
|
132
|
+
postcondition and stops without a submit key. Codex's own collapsed-question
|
|
133
|
+
timer still applies: AKK does not keep a question alive or reopen an expired
|
|
134
|
+
one. Refresh Status before responding; an absent question is not retryable.
|
|
135
|
+
|
|
136
|
+
The user-priority `terminal_user_explicit` path requires one exact live
|
|
137
|
+
physical terminal/process, a scanned non-blocked approval state, and no proven
|
|
138
|
+
input-owning questionnaire, editor, menu, or read-only viewer. Broken AKK Turn,
|
|
139
|
+
Session, transfer, transition, ledger, or Store state cannot veto the user's
|
|
140
|
+
explicit Send. Neither can parsed working activity, an existing draft, or
|
|
141
|
+
ordinary Composer visibility, stability, or exactness. Codex physical fallback
|
|
142
|
+
sends `C-u` once. Claude Code physical fallback uses a sentinel-backed native
|
|
143
|
+
`C-s` stash-clear transaction that is independent of the cursor position and
|
|
144
|
+
does not interrupt an active turn, then proves the main Composer empty. Each
|
|
145
|
+
then injects the new request,
|
|
146
|
+
waits through the paste window, and dispatches Enter exactly once. After text
|
|
147
|
+
injection, Composer observation cannot veto Enter. Unreviewed Codex fullscreen
|
|
148
|
+
frontends additionally require a recognizable styled Composer before clearing
|
|
149
|
+
and a fresh empty Composer afterward, before any task text is sent.
|
|
150
|
+
|
|
151
|
+
AKK first takes the managed path where its stronger pre-input requirements
|
|
152
|
+
hold. Otherwise it may deliver unmanaged work once and best-effort attaches a
|
|
153
|
+
Terminal Watch that provides the completion callback. Exact preparation failure falls back to a request-correlated terminal-activity
|
|
154
|
+
Watch when the physical identity and observation path remain valid. Its callback
|
|
155
|
+
reports stable idle with best-effort confidence, never exact task success.
|
|
156
|
+
Watch persistence failure never vetoes, revokes, or retries a successful
|
|
157
|
+
Send. Uncertain native probe input or unsafe input surfaces stop before task
|
|
158
|
+
text; they do not authorize this fallback. If clear or request input may have occurred and terminal
|
|
159
|
+
delivery or native acceptance is uncertain, AKK does not retry automatically;
|
|
160
|
+
inspect Status, the exact pane, or the returned Watch instead.
|
|
161
|
+
|
|
162
|
+
On first attach, the target terminal must be explicitly named by the user. AKK
|
|
163
|
+
never guesses which already-running pane should receive the task. An omitted
|
|
164
|
+
target is allowed only when AKK can prove one unique eligible terminal.
|
|
165
|
+
|
|
166
|
+
### Codex candidate attribution
|
|
167
|
+
|
|
168
|
+
The human-priority Codex path also covers a status-card-only Session, a
|
|
169
|
+
quiescent managed pane whose foreground rollout cannot be selected, and a
|
|
170
|
+
supported manual `/clear` whose new logical thread appears before its rollout
|
|
171
|
+
materializes. The complete exact inventory domain binds the provider terminal,
|
|
172
|
+
PID and process birth, workspace and canonical endpoint, and every open
|
|
173
|
+
rollout's UUID, descriptor, device, inode, canonical path, and
|
|
174
|
+
pre-submit byte offset. A `/clear` resume hint is advisory only, never routing or acceptance
|
|
175
|
+
authority.
|
|
176
|
+
|
|
177
|
+
Under the terminal lock, AKK isolates the predecessor, creates a separate
|
|
178
|
+
zero-UUID provisional Session and Turn, sends the real request once, and binds
|
|
179
|
+
only the single rollout that proves exact request acceptance. A rollout-backed
|
|
180
|
+
Codex row therefore advertises `terminal_follow_current`, not `session_exact`;
|
|
181
|
+
a cached or direct `session_exact` attempt rejects before task text and never
|
|
182
|
+
downgrades itself. Only released predecessor Turn history from an earlier
|
|
183
|
+
binding epoch is excluded from current authority. Use only the freshly listed
|
|
184
|
+
semantic-ID action.
|
|
185
|
+
|
|
186
|
+
Until promotion commits, strict `session_id` send, `respond`, managed
|
|
187
|
+
`approve`, `cancel`, native lifecycle, callback delivery, and `native_inspect`
|
|
188
|
+
remain unavailable. This provisional path can still work in a narrow pane
|
|
189
|
+
because it binds from acceptance rather than automating native `/status`.
|
|
190
|
+
|
|
191
|
+
### Explicit Codex foreground identification
|
|
192
|
+
|
|
193
|
+
When a recent `/clear` has not yet materialized a rollout, or several open
|
|
194
|
+
rollouts make `native_identity_state="ambiguous"`, a fresh List may advertise
|
|
195
|
+
two Codex-only actions. `identify_foreground({terminal_id})` holds the exact
|
|
196
|
+
terminal lock and sends the closed `/status` probe exactly once, but performs
|
|
197
|
+
no Store mutation and creates no Session, Turn, receipt, monitor, or callback.
|
|
198
|
+
The returned proof expires after 30 seconds and is diagnostic only: it cannot
|
|
199
|
+
authorize Send, approval, native-interaction response, lifecycle input, or a later
|
|
200
|
+
binding after the lock is released.
|
|
201
|
+
|
|
202
|
+
`identify_and_send({terminal_id,request})` is the actionable atomic form. It
|
|
203
|
+
keeps one terminal lock from foreground identification through the one task
|
|
204
|
+
dispatch. The status UUID is provisional; only one rollout that later accepts
|
|
205
|
+
the exact request can become durable Session/Turn identity. A changed or
|
|
206
|
+
uncertain probe boundary stops before the task and is not retried
|
|
207
|
+
automatically. This optional enhancement is not a prerequisite for ordinary
|
|
208
|
+
human Send: ordinary Send retains its user-priority behavior. Codex 0.158.0/0.159.0/0.159.2
|
|
209
|
+
exact Send and active-task Watch use a separate closed `/status` transaction
|
|
210
|
+
to bind the foreground paginated thread. List never types an identity probe.
|
|
211
|
+
Status for an exact backend task does not use terminal input. A targeted
|
|
212
|
+
conversation Status for an unbound, idle Codex terminal may use the separate
|
|
213
|
+
closed routing inspection described under [Status](#akk-status-and-native-inspection).
|
|
214
|
+
|
|
215
|
+
## Terminal Watch
|
|
216
|
+
|
|
217
|
+
The [terminal handoff demo](https://github.com/scotthuang/agent-knock-knock/blob/main/docs/assets/akk-tmux-handoff-demo.mp4)
|
|
218
|
+
shows OpenClaw giving Claude Code a task and handing its result to Codex
|
|
219
|
+
through tmux; both terminals remain available for direct human use.
|
|
220
|
+
|
|
221
|
+
Watch follows the exact terminal selected by the user. Codex 0.158.0/0.159.0/0.159.2 exact
|
|
222
|
+
Watch creation types a closed `/status` command into an available main Composer;
|
|
223
|
+
subsequent observation is read-only. Newer Codex versions may use the same
|
|
224
|
+
strict observed UI and paginated read contracts. See the
|
|
225
|
+
[upgrade compatibility policy](callback-compatibility.md).
|
|
226
|
+
|
|
227
|
+
```text
|
|
228
|
+
/akk list
|
|
229
|
+
/akk watch <exact-terminal-id>
|
|
230
|
+
/akk status <watch-id>
|
|
231
|
+
/akk unwatch <watch-id>
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
The fresh list is the safest way to copy a complete `terminal_id`, but missing
|
|
235
|
+
Watch advertisement, coding-agent version uncertainty, unusable task artifacts,
|
|
236
|
+
or existing managed ownership are warnings rather than authorization vetoes.
|
|
237
|
+
Watch fails only when the exact terminal/process cannot be identified, neither
|
|
238
|
+
an exact task anchor nor a read-only terminal-activity path exists, or the
|
|
239
|
+
durable Watch record cannot be created.
|
|
240
|
+
|
|
241
|
+
An exact provider anchor produces `watch_mode="exact_task"` and
|
|
242
|
+
`confidence="exact"`. Without one, AKK can use
|
|
243
|
+
`watch_mode="terminal_activity"` and `confidence="best_effort"`: it must first
|
|
244
|
+
observe working or approval activity and then stable idle. That callback proves
|
|
245
|
+
only that the observed activity became idle, not that one uniquely identified
|
|
246
|
+
task succeeded, and it contains no exact-task completion text.
|
|
247
|
+
|
|
248
|
+
After initial Codex foreground binding, Watch observation sends no terminal
|
|
249
|
+
input and does not adopt, reserve, block, interrupt,
|
|
250
|
+
approve, or own the selected task. Manual-Watch approval events are
|
|
251
|
+
notification-only and never participate in auto-approval. Durable Watch state,
|
|
252
|
+
notification identities, and callback outboxes make restart recovery
|
|
253
|
+
idempotent. A managed Turn monitor remains preferable when exact Turn
|
|
254
|
+
attribution already exists.
|
|
255
|
+
|
|
256
|
+
## Sessions, Turns, and native threads
|
|
257
|
+
|
|
258
|
+
For terminal-managed work, AKK keeps these identities separate:
|
|
259
|
+
|
|
260
|
+
```text
|
|
261
|
+
tmux or Herdr terminal / verified process incarnation
|
|
262
|
+
├─ native Codex or Claude Code session
|
|
263
|
+
│ └─ AKK Session (session_id)
|
|
264
|
+
│ ├─ Turn (turn_id)
|
|
265
|
+
│ └─ Turn (turn_id)
|
|
266
|
+
└─ Terminal Watch (watch_id)
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
Backend Send instead returns one persisted task ID as both `watch_id` and
|
|
270
|
+
`turn_id`; a standalone backend Watch has no Send management. These task IDs
|
|
271
|
+
stay bound to the original thread and native task. They do not authorize the
|
|
272
|
+
terminal lifecycle commands below.
|
|
273
|
+
|
|
274
|
+
New and resume are native lifecycle transitions. They create or activate an
|
|
275
|
+
AKK Session but create no Turn. Run `/akk threads <exact-terminal-id>` to get
|
|
276
|
+
the current candidates. The output includes deterministic numbers,
|
|
277
|
+
collision-safe display-only short IDs, and each complete native thread UUID.
|
|
278
|
+
The number and short-ID resume forms belong only to that displayed snapshot;
|
|
279
|
+
neither is a durable identity or model authority. They expire after five
|
|
280
|
+
minutes and after terminal, process, workspace, binding, candidate-set, or
|
|
281
|
+
relevant action changes.
|
|
282
|
+
|
|
283
|
+
`previous` is advertised only when the current Session's latest committed
|
|
284
|
+
transition and fresh discovery prove exactly one resumable source. If
|
|
285
|
+
`previous` is present, use only its exact prefilled semantic-ID action for a
|
|
286
|
+
natural-language “刚才那个” request. Never substitute the newest terminal row.
|
|
287
|
+
|
|
288
|
+
Do not ask AKK to send `/clear`, `/new`, `/resume`, `/status`, Codex `/fork`,
|
|
289
|
+
`/side`, `/btw`, Claude `/branch`, or another first-line native slash command
|
|
290
|
+
as an ordinary task. Use the advertised lifecycle, native-inspection, or
|
|
291
|
+
Codex foreground-identification action, express the outcome in natural
|
|
292
|
+
language, or type an unsupported command directly in the TUI. AKK revalidates
|
|
293
|
+
the entire candidate snapshot before terminal input; candidate-set changes
|
|
294
|
+
fail closed. A replaced or changed transcript/rollout cannot be resumed under
|
|
295
|
+
stale metadata.
|
|
296
|
+
|
|
297
|
+
## Permission settings
|
|
298
|
+
|
|
299
|
+
Send preserves the selected conversation's existing permission mode. Use an
|
|
300
|
+
explicit advertised permission action to change it before sending a task.
|
|
301
|
+
The [CLI backend](codex-cli-native-compatibility.md) and
|
|
302
|
+
[Desktop](codex-desktop-compatibility.md#settings-and-cancellation) adapters
|
|
303
|
+
apply and verify the selected conversation's native settings. For a Codex
|
|
304
|
+
terminal, [Codex permissions](codex-permissions.md) covers the current native
|
|
305
|
+
choices and exact idle-terminal checks. Full Access is an explicit supported
|
|
306
|
+
choice; AKK handles its native confirmation without an additional prompt.
|
|
307
|
+
|
|
308
|
+
## Safe model control
|
|
309
|
+
|
|
310
|
+
This section describes terminal model control. Desktop settings use the
|
|
311
|
+
[Desktop settings API](codex-desktop-compatibility.md#settings-and-cancellation)
|
|
312
|
+
and do not expose a model catalog; they accept an explicitly requested model
|
|
313
|
+
and effort. The direct CLI backend has no equivalent native model operation.
|
|
314
|
+
Use only the provider capability advertised by the selected conversation.
|
|
315
|
+
|
|
316
|
+
Model control is a two-step, current-snapshot operation. Start from a fresh
|
|
317
|
+
`/akk list`, copy one complete `terminal_id` whose row advertises
|
|
318
|
+
`available_actions.model_options`, then run:
|
|
319
|
+
|
|
320
|
+
```text
|
|
321
|
+
/akk models <exact-terminal-id>
|
|
322
|
+
/akk set-model <exact-terminal-id> <advertised-model-id> <advertised-reasoning-effort>
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
The first command opens and closes the agent's native model UI as one bounded
|
|
326
|
+
inspection. It returns the effective model, the semantic model IDs currently
|
|
327
|
+
available to that account and runtime, and each model's available reasoning
|
|
328
|
+
efforts. This is dynamic authority, not a static AKK allowlist: copy one exact
|
|
329
|
+
model ID and one exact reasoning value from that result. Both values are
|
|
330
|
+
required; an omitted, invented, or unadvertised effort fails before native
|
|
331
|
+
model-selection input. The structured postcondition remains authoritative
|
|
332
|
+
about the effective tuple.
|
|
333
|
+
|
|
334
|
+
The matching OpenClaw tools are
|
|
335
|
+
`agent_knock_knock_model_options({terminal_id})` and
|
|
336
|
+
`agent_knock_knock_set_model({terminal_id,model,reasoning_effort})`. The
|
|
337
|
+
options result and its private physical-terminal/catalog authority belong to the
|
|
338
|
+
same controller
|
|
339
|
+
conversation and are consumed by one set-model attempt. Relist after any pane,
|
|
340
|
+
process, catalog, or UI change, or after any failed attempt.
|
|
341
|
+
Neither tool accepts a slash command, raw key, menu index, display label,
|
|
342
|
+
scope override, token, or fingerprint.
|
|
343
|
+
|
|
344
|
+
If a failed profiled Codex 0.154.0/0.155.1 attempt leaves an exact `/model` popup or an
|
|
345
|
+
exact bare `/model` Composer, List may advertise both
|
|
346
|
+
`model_options({terminal_id})` and `repair_model_control({terminal_id})`.
|
|
347
|
+
The former uses separate residual-bound authority to continue that exact slash
|
|
348
|
+
command into read-only catalog discovery without retyping it. The latter is the
|
|
349
|
+
cleanup-only alternative; its equivalent human command is
|
|
350
|
+
`/akk repair-model-control <exact-terminal-id>`. It accepts only the terminal
|
|
351
|
+
ID and privately revalidates the pane, process, residue, approval state, and
|
|
352
|
+
absence of an active Turn before every reversible cleanup input. It never
|
|
353
|
+
presses Enter, selects a model, submits a task, or handles an approval or
|
|
354
|
+
questionnaire. Success requires an exactly empty Composer. An uncertain
|
|
355
|
+
continuation or repair is not retryable.
|
|
356
|
+
|
|
357
|
+
If the exact native model picker is already open, List projects the terminal
|
|
358
|
+
as non-idle and advertises only `repair_model_control`. That repair may dismiss
|
|
359
|
+
the exact picker but never receives authority to press Enter.
|
|
360
|
+
|
|
361
|
+
Both steps use explicit current-snapshot authority for the same exact physical
|
|
362
|
+
terminal and coding-agent process. Profiled Codex 0.154.0/0.155.1 may use either one exact current
|
|
363
|
+
native Session or a verified-zero-rollout pane, and the Codex-only
|
|
364
|
+
`identify_foreground` diagnostic is not a prerequisite. Claude Code still
|
|
365
|
+
requires one exact current native Session. The pane
|
|
366
|
+
must remain safely idle with an exactly empty Composer, except for the exact
|
|
367
|
+
Codex residual continuation described above. An active Turn, working
|
|
368
|
+
agent, approval, questionnaire or editor, read-only viewer, non-empty Composer,
|
|
369
|
+
ambiguous or multi-rollout Codex identity, stale physical snapshot, unsupported
|
|
370
|
+
version, or changed catalog fails closed
|
|
371
|
+
with no model-selection input. The private multi-step native sequence
|
|
372
|
+
revalidates each frame and must return to the main Composer without submitting
|
|
373
|
+
a task or answering a prompt.
|
|
374
|
+
|
|
375
|
+
Provider scope is explicit in both results:
|
|
376
|
+
|
|
377
|
+
- Codex reports `scope="current_and_new_sessions"`. Its native model flow
|
|
378
|
+
changes this session and persists the selected model as the default for
|
|
379
|
+
future Codex sessions. Ordinary reasoning efforts through `max` are also
|
|
380
|
+
persisted. Codex treats `ultra` specially: it is effective only in the
|
|
381
|
+
current session, while the future-session effort falls back to a non-Ultra
|
|
382
|
+
value. The scope label therefore does not claim that Ultra itself persists.
|
|
383
|
+
These are intentional, visible side effects of the approved native
|
|
384
|
+
operation; AKK does not edit `~/.codex/config.toml` directly or restore it
|
|
385
|
+
afterward.
|
|
386
|
+
- Claude Code reports `scope="current_session"`. Its native session-only path
|
|
387
|
+
changes the open session and leaves new-session defaults unchanged.
|
|
388
|
+
|
|
389
|
+
A successful result is `changed` or `already_effective` and reports the
|
|
390
|
+
current session under `effective`, the future Codex defaults under
|
|
391
|
+
`new_session_defaults`, and whether they changed under `defaults_changed`.
|
|
392
|
+
For an Ultra request, expect `effective.reasoning_effort="ultra"` and only the
|
|
393
|
+
persisted model in `new_session_defaults`. The native TUI does not expose the
|
|
394
|
+
exact non-Ultra effort it chooses for new sessions, so AKK omits that field
|
|
395
|
+
rather than guessing; never infer that Ultra became a future default from
|
|
396
|
+
`scope="current_and_new_sessions"` alone.
|
|
397
|
+
`outcome="uncertain"` means native input may have taken effect but AKK could
|
|
398
|
+
not prove the final state. It carries `do_not_retry=true`: inspect the shared
|
|
399
|
+
pane, then obtain a new model catalog before any deliberate new attempt. Model
|
|
400
|
+
control creates no AKK Turn and never approves, answers, or submits coding
|
|
401
|
+
work.
|
|
402
|
+
|
|
403
|
+
## AKK Status and native inspection
|
|
404
|
+
|
|
405
|
+
Status follows its target. An exact backend task's `watch_id` or Send-produced
|
|
406
|
+
`turn_id` reads that original backend's native state without terminal input.
|
|
407
|
+
A backend conversation Status reads the selected native conversation. Bound
|
|
408
|
+
terminal Turns and Watches retain their original observation route. List
|
|
409
|
+
never types into a terminal.
|
|
410
|
+
|
|
411
|
+
When the selected conversation is an unbound physical Codex terminal, targeted
|
|
412
|
+
Status may use the existing closed `/status` identity inspection if that pane
|
|
413
|
+
is safely idle. It can display a native status card to establish the exact
|
|
414
|
+
backend thread. It does not create a task or disturb a working or blocked
|
|
415
|
+
terminal. This routing inspection is separate from the diagnostic-only
|
|
416
|
+
`identify_foreground` action; see [automatic conversation routing](codex-cli-native-compatibility.md#automatic-conversation-routing-2026-10-10).
|
|
417
|
+
|
|
418
|
+
Explicit native inspection remains a closed action:
|
|
419
|
+
`native_inspect({terminal_id,inspection:"status"})`. It accepts no arbitrary
|
|
420
|
+
command and creates no AKK Turn, Session, receipt, monitor, or callback.
|
|
421
|
+
|
|
422
|
+
Native inspection and foreground identification are different contracts.
|
|
423
|
+
`native_inspect` inspects an already attributable native context. The explicit
|
|
424
|
+
Codex-only `identify_foreground` action is available for an otherwise safe but
|
|
425
|
+
ambiguous foreground and returns only the 30-second non-authorizing diagnostic
|
|
426
|
+
described above. `identify_and_send` consumes its observation without
|
|
427
|
+
releasing the terminal lock; callers must never cache a standalone proof and
|
|
428
|
+
use it as authority for a later action.
|
|
429
|
+
|
|
430
|
+
Codex native `/status` inspection requires an exact viewport of at least 80
|
|
431
|
+
columns so the complete UUID can be proven. Legacy terminal-scoped tasks
|
|
432
|
+
can bind from exact native acceptance afterward without running `/status` or
|
|
433
|
+
failing merely because the pane is narrow. Codex paginated read-contract candidates attempt a separate
|
|
434
|
+
closed `/status` binding before physical Send. If an exact callback Watch cannot
|
|
435
|
+
be prepared safely, AKK may prepare terminal-activity observation; the receipt states the actual mode and limitation. Claude inspection must prove,
|
|
436
|
+
parse, and dismiss one fresh Status panel and return to the same idle composer.
|
|
437
|
+
Other complete `x.y.z` agent versions remain callable with a compatibility
|
|
438
|
+
warning; incompatible runtime behavior fails or becomes uncertain rather than
|
|
439
|
+
being blocked by a version allowlist.
|
|
440
|
+
|
|
441
|
+
## Approval boundaries
|
|
442
|
+
|
|
443
|
+
Approval always requires the current exact prompt and explicit human intent.
|
|
444
|
+
Backend approvals use the exact pending interaction from fresh Status in the
|
|
445
|
+
same controller conversation. See the [CLI backend](codex-cli-native-compatibility.md)
|
|
446
|
+
and [Desktop interaction](codex-desktop-compatibility.md) guides. The prompt,
|
|
447
|
+
screen, and key boundaries below describe terminal approval.
|
|
448
|
+
|
|
449
|
+
Managed approval uses `approve({turn_id})`; terminal-scoped manual Codex
|
|
450
|
+
approval uses `approve({terminal_id})` when the current list advertises it.
|
|
451
|
+
On an unmanaged raw-terminal row, that action is prefilled with its exact
|
|
452
|
+
`terminal_id`; never construct or guess the target.
|
|
453
|
+
|
|
454
|
+
The private approval fence is prompt-scoped. It binds the adapter-isolated
|
|
455
|
+
exact unredacted approval region, terminal/process identity, decision keys,
|
|
456
|
+
prompt kind, working directory, reason, and request evidence. The whole-screen
|
|
457
|
+
digest and redacted excerpt are diagnostic only: output outside the approval
|
|
458
|
+
region may keep scrolling without invalidating the same prompt. Any change
|
|
459
|
+
inside the exact region—including a command or an otherwise identically
|
|
460
|
+
redacted secret—rejects and sends zero approval keys.
|
|
461
|
+
|
|
462
|
+
Terminal-scoped approval leaves Session and Turn identity unchanged, is never
|
|
463
|
+
available to auto-approve, and must not be retried blindly after an uncertain
|
|
464
|
+
transport result. Unsupported, stale, changed, ambiguous, or ownership-drifted
|
|
465
|
+
prompts remain for the human to resolve in the coding-agent TUI. OpenClaw's
|
|
466
|
+
optional exact-command auto-approval policy is documented separately in
|
|
467
|
+
[OpenClaw operations](openclaw-operations.md#automatic-approval).
|
|
468
|
+
|
|
469
|
+
## Recovery and advanced controls
|
|
470
|
+
|
|
471
|
+
Recovery is specific to the provider and original task. Use its exact saved ID
|
|
472
|
+
and the applicable actions below; do not substitute the latest conversation.
|
|
473
|
+
|
|
474
|
+
### Backend task recovery
|
|
475
|
+
|
|
476
|
+
For Codex CLI backend and Desktop tasks, use the original task's `watch_id`
|
|
477
|
+
from the originating controller; Recover, Renew, Close, and Retry Callback
|
|
478
|
+
also accept its Send-produced `turn_id`. `recover` reconciles
|
|
479
|
+
the original task and supervises eligible monitor work; `renew` verifies that
|
|
480
|
+
task before extending observation. `unwatch` stops observation while retaining
|
|
481
|
+
Send management, and `close` releases managed Send ownership without stopping
|
|
482
|
+
Codex. A standalone Watch uses Unwatch. `retry_callback` retries only a known
|
|
483
|
+
retryable notification with its original identity; select `notification_id`
|
|
484
|
+
when more than one is eligible.
|
|
485
|
+
|
|
486
|
+
These operations never select the latest task or fall back to a terminal.
|
|
487
|
+
Closed management cannot be reopened, and Recover does not extend deadlines
|
|
488
|
+
or resume an explicitly stopped Watch. For exact inputs, callback uncertainty,
|
|
489
|
+
and observation semantics, use the [backend task recovery reference](backend-task-recovery.md).
|
|
490
|
+
|
|
491
|
+
### Terminal recovery and diagnostics
|
|
492
|
+
|
|
493
|
+
The following terminal controls remain available when the corresponding
|
|
494
|
+
state makes them meaningful. `reconcile_binding`, `identify_foreground`, and
|
|
495
|
+
`repair_model_control` retain their physical-terminal requirements; backend
|
|
496
|
+
Recover does not replace them.
|
|
497
|
+
|
|
498
|
+
| Command | Use |
|
|
499
|
+
| --- | --- |
|
|
500
|
+
| `/akk doctor` | Diagnose installation, Host, terminal, and coding-agent readiness. |
|
|
501
|
+
| `/akk models <terminal>` | Inspect one idle pane's exact native model and reasoning catalog. |
|
|
502
|
+
| `/akk repair-model-control <terminal>` | Clear one exact List-advertised stale Codex `/model` surface; never submit it. |
|
|
503
|
+
| `/akk set-model <terminal> <model> <effort>` | Consume that catalog once; Codex reports current and future defaults separately (Ultra stays current-only), while Claude Code is session-only. |
|
|
504
|
+
| `/akk approve <turn-or-terminal>` | Approve one current prompt after explicit review. |
|
|
505
|
+
| `/akk renew <turn> <minutes>` | Restart monitoring for one still-live stalled Turn without terminal input. |
|
|
506
|
+
| `/akk retry-callback <turn>` | Retry one persisted failed callback with its original identity. |
|
|
507
|
+
| `/akk close <turn>` | Ordinary managed-Turn Close releases AKK management without terminal input or stopping the coding agent; native lifecycle recovery has the exception below. |
|
|
508
|
+
|
|
509
|
+
Explicit terminal Close is the user's management escape hatch. It has priority over
|
|
510
|
+
broken deferred-transfer or handoff state, closes the selected Turn first, and
|
|
511
|
+
then best-effort releases only linked AKK metadata. Refresh List afterward; if
|
|
512
|
+
the agent is still working, a new Watch can observe it.
|
|
513
|
+
|
|
514
|
+
Closing an uncertain native new/resume transition is a separate recovery path:
|
|
515
|
+
it may clear an unsubmitted Composer and perform a guarded `/status` inspection
|
|
516
|
+
to establish the actual native identity. Follow that exact advertised recovery
|
|
517
|
+
action. Do not treat every terminal Close variant as a record-only operation.
|
|
518
|
+
|
|
519
|
+
An uncertain terminal mutation is not a retry instruction. Do not resend,
|
|
520
|
+
approve, cancel, or repeat Enter blindly. Inspect the exact pane and durable
|
|
521
|
+
Status, then use only the action currently advertised by AKK.
|
|
522
|
+
|
|
523
|
+
## Structured tool surface
|
|
524
|
+
|
|
525
|
+
The OpenClaw plugin and Host Adapter register the ordered semantic tool catalog.
|
|
526
|
+
Pi and DeepSeek Harness verify the Host Adapter capability handshake against
|
|
527
|
+
their actual registrations, so the tool count and names are derived from that
|
|
528
|
+
catalog rather than maintained as connector constants. The current catalog
|
|
529
|
+
includes list, watch, unwatch, list resumable threads, native inspect, model
|
|
530
|
+
options, repair model control, set model, permission options, set permissions,
|
|
531
|
+
identify foreground, identify and send, new thread, reconcile binding, resume
|
|
532
|
+
thread, status, send, respond, typed native interaction response, approve,
|
|
533
|
+
renew, recover, retry callback, cancel, and close. Model-facing mutations
|
|
534
|
+
contain semantic IDs and user content only.
|
|
535
|
+
Connector prereleases that pin an earlier AKK runtime retain the tool surface
|
|
536
|
+
documented by that connector release.
|
|
537
|
+
Selectors, pane routes, draft text, fingerprints, tokens, revisions, candidate
|
|
538
|
+
fences, and binding generations stay inside the trusted Host adapter.
|
|
539
|
+
|
|
540
|
+
For the full lifecycle, callback, identity, handoff, and persistence contract,
|
|
541
|
+
see the [Terminal Handoff Protocol](bidirectional-agent-protocol.md). For
|
|
542
|
+
configuration and recovery specific to OpenClaw, see
|
|
543
|
+
[OpenClaw Operations](openclaw-operations.md).
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Storage and Logging
|
|
2
|
+
|
|
3
|
+
AKK keeps managed state in `~/.agent-knock-knock/store` by default. The Store
|
|
4
|
+
contains its compatibility manifest, authoritative Sessions and Turns,
|
|
5
|
+
independent Terminal Watch records, dispatch receipts, callback outboxes, and
|
|
6
|
+
event logs. It may therefore contain terminal and task metadata and should
|
|
7
|
+
remain private.
|
|
8
|
+
|
|
9
|
+
## Filesystem safety
|
|
10
|
+
|
|
11
|
+
- Store directories use mode `0700`.
|
|
12
|
+
- State and event-log files use mode `0600`.
|
|
13
|
+
- Durable JSON writes are atomic and do not follow symbolic-link targets.
|
|
14
|
+
- A custom Store must be a dedicated directory. AKK refuses a non-empty
|
|
15
|
+
manifestless directory rather than adopting unknown files.
|
|
16
|
+
- The Store manifest fences incompatible managed writers before managed
|
|
17
|
+
terminal or callback mutations. An eligible explicit physical Send retains
|
|
18
|
+
its separate runtime receipt and input-safety checks; it cannot mutate an
|
|
19
|
+
incompatible managed Store.
|
|
20
|
+
|
|
21
|
+
## Compatibility manifest
|
|
22
|
+
|
|
23
|
+
The manifest checks storage format and writer behavior separately. An unknown
|
|
24
|
+
`format_version` is not read. The current writer protocol is 9; writer
|
|
25
|
+
protocols 1 through 8 are supported predecessors and inspection reports them
|
|
26
|
+
as `upgradeable`.
|
|
27
|
+
|
|
28
|
+
Upgrading protocol 1 or 2 validates predecessor Turn records,
|
|
29
|
+
deterministically derives and durably materializes authoritative Session
|
|
30
|
+
records, quarantines ambiguous Session bindings, and finishes by atomically
|
|
31
|
+
publishing protocol 9. Existing Turn state, event logs, and the original
|
|
32
|
+
manifest `created_at` remain unchanged.
|
|
33
|
+
|
|
34
|
+
Protocols 3 through 8 already have Session authority, so their upgrade is an
|
|
35
|
+
atomic manifest-only writer fence with no data migration. Protocol 6 prevents
|
|
36
|
+
older writers from rejecting or damaging schema-v2 Terminal Watch records.
|
|
37
|
+
Protocol 7 fences the `interaction_manual_required` notification kind from
|
|
38
|
+
protocol-6 writers. Protocol 8 protects paginated task anchors and private
|
|
39
|
+
multi-question checkpoints from older writers. Terminal Watch schema v3 separately adds interaction
|
|
40
|
+
policy, subject-aware projection, one-shot reservation, and callback-outbox
|
|
41
|
+
state; its version fence makes older strict Watch decoders reject the record
|
|
42
|
+
instead of rewriting unknown authority. Legacy schema-v1/v2 Watches are
|
|
43
|
+
normalized to `notify_only`; they never silently acquire terminal response
|
|
44
|
+
authority. Downgrading after v3 records exist is not supported. Core
|
|
45
|
+
Session/Turn data remains readable across a writer-protocol mismatch, while
|
|
46
|
+
explicit reconciliation reports `skipped` and managed mutations fail before
|
|
47
|
+
terminal or Host side effects. This does not prohibit an independently
|
|
48
|
+
authorized physical Send that leaves managed state untouched.
|
|
49
|
+
|
|
50
|
+
## Conversation routing journal
|
|
51
|
+
|
|
52
|
+
Backend-first Send records its chosen provider before task delivery. These
|
|
53
|
+
records live under the private runtime directory (`~/.agent-knock-knock/runtime-v2`
|
|
54
|
+
by default, or `AKK_RUNTIME_DIR`), in `conversation-routing/<store-path-hash>/state`.
|
|
55
|
+
They have their own locks and compatibility manifest; they do not acquire the
|
|
56
|
+
managed Store's writer lock. A reused message ID stays on its original provider,
|
|
57
|
+
even if another route becomes available later.
|
|
58
|
+
|
|
59
|
+
Development builds that wrote these records under the managed Store are read
|
|
60
|
+
without modifying the old records. Their original route and any recorded outcome
|
|
61
|
+
remain authoritative; conflicting journals stop the request. A replayed receipt
|
|
62
|
+
is the original submission observation. Query Status for current task state.
|
|
63
|
+
|
|
64
|
+
## Legacy directory
|
|
65
|
+
|
|
66
|
+
The former `~/.agent-knock-knock/conversations` directory is left untouched.
|
|
67
|
+
AKK does not read or migrate it. Existing Codex and Claude Code terminals remain
|
|
68
|
+
discoverable, but legacy managed-turn IDs, callback associations, and old
|
|
69
|
+
conversation aliases are not imported into the stable Store.
|
|
70
|
+
|
|
71
|
+
## Logs and retention
|
|
72
|
+
|
|
73
|
+
Runtime logs redact common secret forms and default to 14-day retention. The
|
|
74
|
+
main controls are:
|
|
75
|
+
|
|
76
|
+
| Control | Purpose |
|
|
77
|
+
| --- | --- |
|
|
78
|
+
| `--store-dir` | Use a dedicated Store for standalone CLI operations. |
|
|
79
|
+
| `AKK_LOG_DIR` | Select a dedicated runtime log directory. |
|
|
80
|
+
| `AKK_LOG_LEVEL` | Set the emitted log level. |
|
|
81
|
+
| `AKK_LOG_RETENTION_DAYS` | Change the retention window. |
|
|
82
|
+
|
|
83
|
+
Do not point a custom Store or log directory at a broad home, workspace, or
|
|
84
|
+
shared directory. Review retained callback and terminal data before any manual
|
|
85
|
+
cleanup. AKK does not delete coding-agent transcripts, Codex rollouts, tmux or
|
|
86
|
+
Herdr sessions, or model credentials.
|
|
87
|
+
|
|
88
|
+
OpenClaw-specific `storeDir` configuration and operational diagnostics are in
|
|
89
|
+
[OpenClaw Operations](openclaw-operations.md). The full Session, Turn, Watch,
|
|
90
|
+
and callback identity contract is in the
|
|
91
|
+
[Terminal Handoff Protocol](bidirectional-agent-protocol.md).
|