@scotthuang/agent-knock-knock 0.13.18 → 0.14.1

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 (289) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/CONTRIBUTING.md +212 -0
  3. package/README.md +106 -166
  4. package/connectors/deepseek-harness/LICENSE +21 -0
  5. package/connectors/deepseek-harness/README.md +406 -0
  6. package/connectors/pi/LICENSE +21 -0
  7. package/connectors/pi/README.md +446 -0
  8. package/dist/src/backend-public-progress.d.ts +38 -0
  9. package/dist/src/backend-public-progress.js +106 -0
  10. package/dist/src/backend-public-progress.js.map +1 -0
  11. package/dist/src/backend-recovery-semantic.d.ts +16 -0
  12. package/dist/src/backend-recovery-semantic.js +113 -0
  13. package/dist/src/backend-recovery-semantic.js.map +1 -0
  14. package/dist/src/backend-task-recovery.d.ts +103 -0
  15. package/dist/src/backend-task-recovery.js +143 -0
  16. package/dist/src/backend-task-recovery.js.map +1 -0
  17. package/dist/src/callback-transport.d.ts +8 -0
  18. package/dist/src/callback-transport.js +14 -0
  19. package/dist/src/callback-transport.js.map +1 -1
  20. package/dist/src/cli-core.js +20 -10
  21. package/dist/src/cli-core.js.map +1 -1
  22. package/dist/src/cli-runtime-context.d.ts +5 -0
  23. package/dist/src/cli-runtime-context.js.map +1 -1
  24. package/dist/src/codex-app-server-read-client.d.ts +3 -0
  25. package/dist/src/codex-app-server-read-client.js.map +1 -1
  26. package/dist/src/codex-native-cli-adapter.d.ts +6 -0
  27. package/dist/src/codex-native-cli-adapter.js +303 -0
  28. package/dist/src/codex-native-cli-adapter.js.map +1 -0
  29. package/dist/src/codex-native-client-interactions.d.ts +6 -0
  30. package/dist/src/codex-native-client-interactions.js +124 -0
  31. package/dist/src/codex-native-client-interactions.js.map +1 -0
  32. package/dist/src/codex-native-client-rpc.d.ts +21 -0
  33. package/dist/src/codex-native-client-rpc.js +137 -0
  34. package/dist/src/codex-native-client-rpc.js.map +1 -0
  35. package/dist/src/codex-native-client.d.ts +42 -0
  36. package/dist/src/codex-native-client.js +331 -0
  37. package/dist/src/codex-native-client.js.map +1 -0
  38. package/dist/src/codex-native-identity.d.ts +6 -0
  39. package/dist/src/codex-native-identity.js +42 -0
  40. package/dist/src/codex-native-identity.js.map +1 -0
  41. package/dist/src/codex-native-monitor.d.ts +4 -0
  42. package/dist/src/codex-native-monitor.js +92 -0
  43. package/dist/src/codex-native-monitor.js.map +1 -0
  44. package/dist/src/codex-native-outbox.d.ts +16 -0
  45. package/dist/src/codex-native-outbox.js +120 -0
  46. package/dist/src/codex-native-outbox.js.map +1 -0
  47. package/dist/src/codex-native-public-projection.d.ts +545 -0
  48. package/dist/src/codex-native-public-projection.js +182 -0
  49. package/dist/src/codex-native-public-projection.js.map +1 -0
  50. package/dist/src/codex-native-record-store.d.ts +27 -0
  51. package/dist/src/codex-native-record-store.js +111 -0
  52. package/dist/src/codex-native-record-store.js.map +1 -0
  53. package/dist/src/codex-native-response-service.d.ts +69 -0
  54. package/dist/src/codex-native-response-service.js +244 -0
  55. package/dist/src/codex-native-response-service.js.map +1 -0
  56. package/dist/src/codex-native-runtime.d.ts +46 -0
  57. package/dist/src/codex-native-runtime.js +112 -0
  58. package/dist/src/codex-native-runtime.js.map +1 -0
  59. package/dist/src/codex-native-semantic.d.ts +17 -0
  60. package/dist/src/codex-native-semantic.js +175 -0
  61. package/dist/src/codex-native-semantic.js.map +1 -0
  62. package/dist/src/codex-native-snapshot.d.ts +19 -0
  63. package/dist/src/codex-native-snapshot.js +160 -0
  64. package/dist/src/codex-native-snapshot.js.map +1 -0
  65. package/dist/src/codex-native-state-store.d.ts +61 -0
  66. package/dist/src/codex-native-state-store.js +132 -0
  67. package/dist/src/codex-native-state-store.js.map +1 -0
  68. package/dist/src/codex-native-task-service.d.ts +71 -0
  69. package/dist/src/codex-native-task-service.js +503 -0
  70. package/dist/src/codex-native-task-service.js.map +1 -0
  71. package/dist/src/codex-native-types.d.ts +92 -0
  72. package/dist/src/codex-native-types.js +15 -0
  73. package/dist/src/codex-native-types.js.map +1 -0
  74. package/dist/src/conversation-list.d.ts +12 -0
  75. package/dist/src/conversation-list.js +30 -0
  76. package/dist/src/conversation-list.js.map +1 -0
  77. package/dist/src/conversation-route-dispatch.d.ts +13 -0
  78. package/dist/src/conversation-route-dispatch.js +66 -0
  79. package/dist/src/conversation-route-dispatch.js.map +1 -0
  80. package/dist/src/conversation-route-legacy.d.ts +18 -0
  81. package/dist/src/conversation-route-legacy.js +54 -0
  82. package/dist/src/conversation-route-legacy.js.map +1 -0
  83. package/dist/src/conversation-route-store.d.ts +51 -0
  84. package/dist/src/conversation-route-store.js +126 -0
  85. package/dist/src/conversation-route-store.js.map +1 -0
  86. package/dist/src/conversation-routing-cli-adapter.d.ts +12 -0
  87. package/dist/src/conversation-routing-cli-adapter.js +211 -0
  88. package/dist/src/conversation-routing-cli-adapter.js.map +1 -0
  89. package/dist/src/conversation-routing-commands.d.ts +11 -0
  90. package/dist/src/conversation-routing-commands.js +85 -0
  91. package/dist/src/conversation-routing-commands.js.map +1 -0
  92. package/dist/src/conversation-routing-home.d.ts +26 -0
  93. package/dist/src/conversation-routing-home.js +105 -0
  94. package/dist/src/conversation-routing-home.js.map +1 -0
  95. package/dist/src/conversation-routing-identity.d.ts +40 -0
  96. package/dist/src/conversation-routing-identity.js +174 -0
  97. package/dist/src/conversation-routing-identity.js.map +1 -0
  98. package/dist/src/conversation-runtime-route-store.d.ts +11 -0
  99. package/dist/src/conversation-runtime-route-store.js +118 -0
  100. package/dist/src/conversation-runtime-route-store.js.map +1 -0
  101. package/dist/src/desktop-async-interactions.d.ts +15 -0
  102. package/dist/src/desktop-async-interactions.js +88 -0
  103. package/dist/src/desktop-async-interactions.js.map +1 -0
  104. package/dist/src/desktop-async-state.d.ts +5 -0
  105. package/dist/src/desktop-async-state.js +53 -0
  106. package/dist/src/desktop-async-state.js.map +1 -0
  107. package/dist/src/desktop-cli-adapter.d.ts +7 -0
  108. package/dist/src/desktop-cli-adapter.js +343 -0
  109. package/dist/src/desktop-cli-adapter.js.map +1 -0
  110. package/dist/src/desktop-cli-controls.d.ts +9 -0
  111. package/dist/src/desktop-cli-controls.js +45 -0
  112. package/dist/src/desktop-cli-controls.js.map +1 -0
  113. package/dist/src/desktop-command-presentation.d.ts +2 -0
  114. package/dist/src/desktop-command-presentation.js +31 -0
  115. package/dist/src/desktop-command-presentation.js.map +1 -0
  116. package/dist/src/desktop-control-semantic.d.ts +8 -0
  117. package/dist/src/desktop-control-semantic.js +68 -0
  118. package/dist/src/desktop-control-semantic.js.map +1 -0
  119. package/dist/src/desktop-identity.d.ts +5 -0
  120. package/dist/src/desktop-identity.js +40 -0
  121. package/dist/src/desktop-identity.js.map +1 -0
  122. package/dist/src/desktop-interaction-projection.d.ts +57 -0
  123. package/dist/src/desktop-interaction-projection.js +196 -0
  124. package/dist/src/desktop-interaction-projection.js.map +1 -0
  125. package/dist/src/desktop-interaction-state.d.ts +3 -0
  126. package/dist/src/desktop-interaction-state.js +48 -0
  127. package/dist/src/desktop-interaction-state.js.map +1 -0
  128. package/dist/src/desktop-ipc-async-answer.d.ts +9 -0
  129. package/dist/src/desktop-ipc-async-answer.js +71 -0
  130. package/dist/src/desktop-ipc-async-answer.js.map +1 -0
  131. package/dist/src/desktop-ipc-client.d.ts +47 -0
  132. package/dist/src/desktop-ipc-client.js +400 -0
  133. package/dist/src/desktop-ipc-client.js.map +1 -0
  134. package/dist/src/desktop-ipc-native-operations.d.ts +11 -0
  135. package/dist/src/desktop-ipc-native-operations.js +126 -0
  136. package/dist/src/desktop-ipc-native-operations.js.map +1 -0
  137. package/dist/src/desktop-ipc-transport.d.ts +13 -0
  138. package/dist/src/desktop-ipc-transport.js +123 -0
  139. package/dist/src/desktop-ipc-transport.js.map +1 -0
  140. package/dist/src/desktop-list.d.ts +25 -0
  141. package/dist/src/desktop-list.js +55 -0
  142. package/dist/src/desktop-list.js.map +1 -0
  143. package/dist/src/desktop-metadata-reader.d.ts +30 -0
  144. package/dist/src/desktop-metadata-reader.js +182 -0
  145. package/dist/src/desktop-metadata-reader.js.map +1 -0
  146. package/dist/src/desktop-monitor.d.ts +4 -0
  147. package/dist/src/desktop-monitor.js +101 -0
  148. package/dist/src/desktop-monitor.js.map +1 -0
  149. package/dist/src/desktop-public-projection.d.ts +6 -0
  150. package/dist/src/desktop-public-projection.js +134 -0
  151. package/dist/src/desktop-public-projection.js.map +1 -0
  152. package/dist/src/desktop-request-interactions.d.ts +14 -0
  153. package/dist/src/desktop-request-interactions.js +144 -0
  154. package/dist/src/desktop-request-interactions.js.map +1 -0
  155. package/dist/src/desktop-response-dispatch.d.ts +14 -0
  156. package/dist/src/desktop-response-dispatch.js +19 -0
  157. package/dist/src/desktop-response-dispatch.js.map +1 -0
  158. package/dist/src/desktop-response-evidence.d.ts +4 -0
  159. package/dist/src/desktop-response-evidence.js +19 -0
  160. package/dist/src/desktop-response-evidence.js.map +1 -0
  161. package/dist/src/desktop-response-service.d.ts +11 -0
  162. package/dist/src/desktop-response-service.js +188 -0
  163. package/dist/src/desktop-response-service.js.map +1 -0
  164. package/dist/src/desktop-response-store.d.ts +35 -0
  165. package/dist/src/desktop-response-store.js +58 -0
  166. package/dist/src/desktop-response-store.js.map +1 -0
  167. package/dist/src/desktop-response-types.d.ts +20 -0
  168. package/dist/src/desktop-response-types.js +2 -0
  169. package/dist/src/desktop-response-types.js.map +1 -0
  170. package/dist/src/desktop-response-value.d.ts +6 -0
  171. package/dist/src/desktop-response-value.js +31 -0
  172. package/dist/src/desktop-response-value.js.map +1 -0
  173. package/dist/src/desktop-runtime.d.ts +153 -0
  174. package/dist/src/desktop-runtime.js +88 -0
  175. package/dist/src/desktop-runtime.js.map +1 -0
  176. package/dist/src/desktop-semantic.d.ts +21 -0
  177. package/dist/src/desktop-semantic.js +140 -0
  178. package/dist/src/desktop-semantic.js.map +1 -0
  179. package/dist/src/desktop-session-catalog.d.ts +68 -0
  180. package/dist/src/desktop-session-catalog.js +225 -0
  181. package/dist/src/desktop-session-catalog.js.map +1 -0
  182. package/dist/src/desktop-session-controls.d.ts +145 -0
  183. package/dist/src/desktop-session-controls.js +176 -0
  184. package/dist/src/desktop-session-controls.js.map +1 -0
  185. package/dist/src/desktop-sidebar-metadata.d.ts +27 -0
  186. package/dist/src/desktop-sidebar-metadata.js +83 -0
  187. package/dist/src/desktop-sidebar-metadata.js.map +1 -0
  188. package/dist/src/desktop-sidebar-projects.d.ts +10 -0
  189. package/dist/src/desktop-sidebar-projects.js +31 -0
  190. package/dist/src/desktop-sidebar-projects.js.map +1 -0
  191. package/dist/src/desktop-sidebar-selection.d.ts +28 -0
  192. package/dist/src/desktop-sidebar-selection.js +85 -0
  193. package/dist/src/desktop-sidebar-selection.js.map +1 -0
  194. package/dist/src/desktop-snapshot-details.d.ts +4 -0
  195. package/dist/src/desktop-snapshot-details.js +116 -0
  196. package/dist/src/desktop-snapshot-details.js.map +1 -0
  197. package/dist/src/desktop-snapshot.d.ts +11 -0
  198. package/dist/src/desktop-snapshot.js +281 -0
  199. package/dist/src/desktop-snapshot.js.map +1 -0
  200. package/dist/src/desktop-state-store.d.ts +72 -0
  201. package/dist/src/desktop-state-store.js +269 -0
  202. package/dist/src/desktop-state-store.js.map +1 -0
  203. package/dist/src/desktop-task-interactions.d.ts +10 -0
  204. package/dist/src/desktop-task-interactions.js +93 -0
  205. package/dist/src/desktop-task-interactions.js.map +1 -0
  206. package/dist/src/desktop-task-recovery.d.ts +38 -0
  207. package/dist/src/desktop-task-recovery.js +172 -0
  208. package/dist/src/desktop-task-recovery.js.map +1 -0
  209. package/dist/src/desktop-task-service.d.ts +54 -0
  210. package/dist/src/desktop-task-service.js +442 -0
  211. package/dist/src/desktop-task-service.js.map +1 -0
  212. package/dist/src/desktop-types.d.ts +283 -0
  213. package/dist/src/desktop-types.js +13 -0
  214. package/dist/src/desktop-types.js.map +1 -0
  215. package/dist/src/host-monitor-reconciliation.js +36 -4
  216. package/dist/src/host-monitor-reconciliation.js.map +1 -1
  217. package/dist/src/host-profile-runtime.js +7 -3
  218. package/dist/src/host-profile-runtime.js.map +1 -1
  219. package/dist/src/local-codex-cli-adapter.d.ts +7 -0
  220. package/dist/src/local-codex-cli-adapter.js +13 -0
  221. package/dist/src/local-codex-cli-adapter.js.map +1 -0
  222. package/dist/src/monitor-deadline-policy.d.ts +8 -0
  223. package/dist/src/monitor-deadline-policy.js +16 -0
  224. package/dist/src/monitor-deadline-policy.js.map +1 -0
  225. package/dist/src/openclaw-callback-transport.js +2 -1
  226. package/dist/src/openclaw-callback-transport.js.map +1 -1
  227. package/dist/src/semantic-conversation-target.d.ts +4 -0
  228. package/dist/src/semantic-conversation-target.js +20 -0
  229. package/dist/src/semantic-conversation-target.js.map +1 -0
  230. package/dist/src/semantic-permission-control.js +47 -9
  231. package/dist/src/semantic-permission-control.js.map +1 -1
  232. package/dist/src/semantic-private-authority-offers.d.ts +1 -1
  233. package/dist/src/semantic-private-authority-offers.js +3 -1
  234. package/dist/src/semantic-private-authority-offers.js.map +1 -1
  235. package/dist/src/semantic-tool-command-helpers.d.ts +6 -0
  236. package/dist/src/semantic-tool-command-helpers.js +199 -78
  237. package/dist/src/semantic-tool-command-helpers.js.map +1 -1
  238. package/dist/src/semantic-tool-descriptions.d.ts +2 -1
  239. package/dist/src/semantic-tool-descriptions.js +84 -35
  240. package/dist/src/semantic-tool-descriptions.js.map +1 -1
  241. package/dist/src/semantic-tool-list-projection.js +66 -2
  242. package/dist/src/semantic-tool-list-projection.js.map +1 -1
  243. package/dist/src/semantic-tool-presentation.js +76 -7
  244. package/dist/src/semantic-tool-presentation.js.map +1 -1
  245. package/dist/src/semantic-tool-runtime.js +129 -29
  246. package/dist/src/semantic-tool-runtime.js.map +1 -1
  247. package/dist/src/semantic-tool-schemas.d.ts +410 -27
  248. package/dist/src/semantic-tool-schemas.js +176 -88
  249. package/dist/src/semantic-tool-schemas.js.map +1 -1
  250. package/dist/src/terminal-action-contracts.js +10 -6
  251. package/dist/src/terminal-action-contracts.js.map +1 -1
  252. package/dist/src/terminal-command-cli-adapter.js +4 -4
  253. package/dist/src/terminal-command-cli-adapter.js.map +1 -1
  254. package/dist/src/terminal-command-dispatch-preparation.js +2 -1
  255. package/dist/src/terminal-command-dispatch-preparation.js.map +1 -1
  256. package/dist/src/terminal-list-cli-adapter.d.ts +1 -0
  257. package/dist/src/terminal-list-cli-adapter.js +6 -3
  258. package/dist/src/terminal-list-cli-adapter.js.map +1 -1
  259. package/dist/src/terminal-monitor-decision-policy.d.ts +1 -1
  260. package/dist/src/terminal-monitor-launch-plan.js +3 -2
  261. package/dist/src/terminal-monitor-launch-plan.js.map +1 -1
  262. package/dist/src/terminal-monitor-supervision-cli-adapter.js +2 -2
  263. package/dist/src/terminal-monitor-supervision-cli-adapter.js.map +1 -1
  264. package/dist/src/terminal-submission-retry-reconciliation.js +2 -2
  265. package/dist/src/terminal-submission-retry-reconciliation.js.map +1 -1
  266. package/dist/src/terminal-user-send-intent.d.ts +2 -0
  267. package/dist/src/terminal-user-send-intent.js +11 -3
  268. package/dist/src/terminal-user-send-intent.js.map +1 -1
  269. package/dist/src/terminal-watch-cli-adapter.js +4 -4
  270. package/dist/src/terminal-watch-cli-adapter.js.map +1 -1
  271. package/docs/architecture/current-architecture.md +313 -0
  272. package/docs/architecture/interactive-terminal-response.md +276 -0
  273. package/docs/architecture/issue-126-final-report.md +248 -0
  274. package/docs/architecture/orchestration-refactor-history.md +2987 -0
  275. package/docs/architecture/orchestration-refactor.md +21 -0
  276. package/docs/backend-task-recovery.md +98 -0
  277. package/docs/bidirectional-agent-protocol.md +260 -0
  278. package/docs/codex-cli-native-compatibility.md +246 -0
  279. package/docs/codex-desktop-compatibility.md +414 -0
  280. package/docs/openclaw-operations.md +281 -0
  281. package/docs/openclaw-session-turn-delivery-requirement.md +45 -0
  282. package/docs/operator-guide.md +572 -0
  283. package/docs/storage-and-logging.md +91 -0
  284. package/docs/test-performance-issue-108.md +80 -0
  285. package/docs/test-performance-issue-120.md +226 -0
  286. package/docs/testing.md +628 -0
  287. package/openclaw.plugin.json +8 -4
  288. package/package.json +6 -13
  289. package/templates/openclaw-skills/agent-knock-knock/SKILL.md +66 -15
@@ -0,0 +1,246 @@
1
+ # Codex CLI shared-backend control
2
+
3
+ AKK can control an existing Codex CLI conversation through its local shared
4
+ app-server. This route needs neither tmux nor Herdr, and does not type into the
5
+ terminal. The original CLI displays the same tasks, questions, approvals and
6
+ answers.
7
+
8
+ AKK 0.14.0 introduces this direct adapter. See the [README](../README.md) for
9
+ the first-task workflow and [OpenClaw installation](openclaw-operations.md#choose-one-installation-path)
10
+ for packaged and optional source installation.
11
+
12
+ ## Discovery and use
13
+
14
+ Ask your controller to call AKK List. Its `conversations[]` collection includes
15
+ loaded main CLI threads from configured local Codex homes, supported physical
16
+ terminals, and Desktop candidates. Choose the returned `conversation_id` by
17
+ its title and working directory. Raw CLI output retains `codex_cli_sessions[]`
18
+ and the other provider arrays for diagnostics; they are not extra conversations
19
+ to present again. The opaque ID includes
20
+ the backend home and exact thread ID; a directory or title alone is never a
21
+ target identity. Child-agent threads and unloaded histories are excluded.
22
+
23
+ The existing tools accept a listed native conversation ID. The table describes
24
+ the shared-backend capabilities; terminal fallback retains its own evidence
25
+ and limitations:
26
+
27
+ | Tool | Native CLI behavior |
28
+ | --- | --- |
29
+ | List | Discover currently loaded main CLI threads, with backend version and activity flags |
30
+ | Status / native Status | Read exact task state and results; refresh pending approvals and questions |
31
+ | Send | Send one task to an idle thread, persist its submission, and create an exact task Watch |
32
+ | Watch | Attach to the uniquely active native task, including a task started manually in the CLI |
33
+ | Watch Status / Unwatch | Refresh the original task, or stop observation without stopping Codex |
34
+ | Approve | Accept once or reject a current command or file approval by its interaction ID |
35
+ | Respond Interaction | Answer blocking or asynchronous questions using advertised question and option IDs |
36
+ | Permission Options / Set Permissions | Read or set Read Only, Default, or Full Access for the current thread |
37
+
38
+ No additional confirmation is required by AKK for Full Access. Permission
39
+ updates use `thread/settings/update`, then check the effective setting. They
40
+ do not create a new task or modify global defaults. Send itself does not change
41
+ permissions.
42
+
43
+ For example, in a controller chat: “Find my Codex conversation for this project,
44
+ set its permissions to Default, then send this task and tell me when it finishes.”
45
+ The controller uses List, Permission Options, Set Permissions, then Send with
46
+ the returned native ID. Existing terminal and Desktop IDs retain their own
47
+ adapters and capabilities; callers use the advertised operation targets.
48
+
49
+ Operators can inspect only this inventory with:
50
+
51
+ ```sh
52
+ agent-knock-knock codex-cli-list
53
+ agent-knock-knock status --conversation '<conversation_id from List>'
54
+ ```
55
+
56
+ For native Watch and response commands, use the exact returned Watch or
57
+ interaction ID. Watch IDs can be UUIDs or deterministic submission hashes;
58
+ they are opaque, not values to construct.
59
+
60
+ ## Automatic conversation routing (2026-10-10)
61
+
62
+ For conversation operations, select the conversation and requested action,
63
+ not a transport. The shared routing policy covers Status, Send, Watch,
64
+ native inspection, permissions, approvals and questions, and capability checks
65
+ for model and lifecycle operations. AKK prefers a compatible, reachable shared backend when it
66
+ proves that backend thread is the selected live conversation. Existing opaque
67
+ `codex-cli:v1:...` and `terminal:v...` IDs remain accepted; the Host tools also
68
+ accept a terminal ID as `conversation_id` for these operations.
69
+
70
+ A physical terminal and a backend thread are coalesced only with exact current
71
+ thread identity, the verified Codex home of the live process, and the physical
72
+ terminal/process incarnation. A configured default home, matching cwd, title,
73
+ launch `resume` UUID or frontend version alone does not establish that link.
74
+ Home evidence comes from the observed process and its open resources, including
75
+ the Codex arg0 lock when available. Missing or conflicting evidence leaves the
76
+ representations separate. `terminal_aliases[]` records proven associations;
77
+ `terminal_controls[]` retains their managed Turns, recovery and terminal-only
78
+ actions inside the same conversation row. These nested controls are not extra
79
+ tasks or permission to bypass their existing checks.
80
+
81
+ List does not type into terminals. A targeted conversation operation, including
82
+ ordinary Status, can use the existing advertised idle-only `/status` inspection
83
+ to discover a missing paginated-thread identity before choosing the backend.
84
+ Codex renders this as a visible native status card; it creates no user task.
85
+ The inspection must retain the same exact pane, process, home and thread and
86
+ pass its existing empty-Composer and prompt checks. It never interrupts a
87
+ working or blocked terminal to discover identity. Without fresh proof, AKK
88
+ retains the eligible terminal route rather than guessing a backend thread.
89
+ No cached UUID, startup command or latest same-directory history can replace
90
+ fresh proof. The public backend currently exposes loaded thread IDs but no
91
+ terminal PID-to-current-thread mapping. This inspection is not an arbitrary
92
+ slash-command interface and cannot target another pane.
93
+
94
+ Backend unavailability established before dispatch may select an eligible
95
+ terminal route. A native ID requires a unique, freshly proven physical alias
96
+ for fallback; AKK does not choose arbitrarily between multiple matching panes.
97
+ A busy thread, pending approval/question, identity conflict or invalid protocol
98
+ response is not treated as permission to bypass the backend through terminal
99
+ input. A send's stable message identity pins its selected route; failures or
100
+ uncertain outcomes after selection never trigger another transport attempt.
101
+ Existing submission ledgers also retain their original route across upgrade.
102
+ A replayed Send receipt is the original submission observation, not a fresh
103
+ completion check. Use Status with the returned task/Watch ID for current state.
104
+ Read the returned routing and delivery fields: physical Enter dispatch still
105
+ does not prove native task acceptance or an exact completion callback.
106
+
107
+ Backend task recovery supports `recover`, `renew`, `close`, `unwatch`, and
108
+ `retry_callback` using the exact returned task/Watch ID. Close releases Send
109
+ management; Unwatch only stops observation. See [backend task recovery](backend-task-recovery.md)
110
+ for ownership, original-task reconciliation and callback delivery boundaries.
111
+
112
+ An existing `watch_id` stays bound to its original native task or terminal
113
+ observation. Answers and approvals use the exact current action from that
114
+ Watch or conversation's Status; they are not migrated between transports.
115
+ Permission reads and changes prefer the backend. Approval and question replies
116
+ use the exact interaction advertised by fresh Status; terminal request IDs and
117
+ fingerprints are not translated into backend requests. Model inspection/change,
118
+ Ctrl-C cancellation, and terminal binding/menu recovery can retain their
119
+ terminal path only where that exact terminal advertises the capability.
120
+ New/clear/resume and resumable-thread listing for paginated Codex 0.158+ remain
121
+ unsupported by both paths; switching to a terminal does not enable them.
122
+ An unsupported backend operation is not a reason to create a replacement CLI
123
+ or mutate another thread. Desktop continues to use its original IPC owner.
124
+
125
+ The routing changes have isolated regression coverage for exact association,
126
+ rejected weak identities, preflight fallback, pinned send routes, receipt
127
+ normalization, and actual unified List output passing through compact Host
128
+ projection into semantic conversation operations. These use fixtures and local
129
+ recording relays. They are distinct from the real backend tests dated
130
+ 2026-10-09 below: this change does not claim a new live Send, Watch or callback
131
+ verification. Normal development validation uses only the repository's fast
132
+ test tier; full/release suites remain publication gates.
133
+
134
+ ## What the evidence means
135
+
136
+ List uses read-only discovery. `active_flags` can report waiting for approval or
137
+ input, but List does not subscribe to every conversation's requests. Its
138
+ `interaction_requests_scanned=false` and null pending count are not proof that
139
+ there are no questions. Status subscribes to the selected, already loaded thread
140
+ to retrieve current requests without terminal input.
141
+
142
+ A successful send is confirmed by the native thread, accepted turn and exact
143
+ client-message ID. An RPC acknowledgement alone is insufficient. AKK briefly
144
+ waits for newly accepted history to materialize; if still uncertain, the
145
+ persisted Watch continues observation and the send is never automatically
146
+ replayed. A repeated message ID returns the same durable task.
147
+
148
+ Completion means the specific native turn has settled and its items have been
149
+ read completely. It does not mean that the latest terminal screen looks idle,
150
+ or that another later task has finished. The callback outbox records delivery
151
+ attempts and does not blindly retry an ambiguous transport result.
152
+
153
+ Approvals and answers bind to the current thread, turn, item and stable
154
+ interaction ID. A reconnect refreshes connection-local request IDs. Responses
155
+ are persisted before dispatch. `sent` means the response was dispatched;
156
+ `confirmed` includes the returned evidence of exact asynchronous answer history
157
+ or subsequent native task progress. These evidence labels do not imply that
158
+ every response has an independent server acknowledgement.
159
+
160
+ A response proved `not_sent` may be explicitly requested again after refreshing
161
+ the same question; AKK revalidates it and records the new attempt. This does not
162
+ permit automatic replay of `sent` or `uncertain` responses.
163
+
164
+ ## Compatibility and limits
165
+
166
+ | Evidence | Scope |
167
+ | --- | --- |
168
+ | Live-tested combination, 2026-10-09 | **macOS: Codex CLI 0.160.0 + shared app-server 0.162.0**; production-adapter operations and limits are recorded below. |
169
+ | Additional targeted live proof, 2026-10-10 | **macOS: Codex CLI 0.162.1 + shared app-server 0.162.1**. Verified public Status progress while a task was in progress through the running OpenClaw plugin, an actual 720-minute Send deadline, one isolated local completion acknowledgement, and repeated Send retaining the original task/deadline. No new WeChat delivery or full native-operation matrix is claimed. |
170
+ | Runtime admission | A loaded main CLI thread, the selected local Codex home, valid stable `x.y.z` backend metadata, and the required live protocol shapes/methods. There is **no established numeric minimum** or exact version allowlist for direct control. |
171
+ | Platform evidence | The live proof was on macOS. It does not establish a Linux/Windows direct-control validation matrix. |
172
+
173
+ The [native RPC adapter](../src/codex-native-client-rpc.ts) selects
174
+ `read_contract` compatibility in the [app-server client](../src/codex-app-server-read-client.ts).
175
+ AKK checks backend identity and each operation's protocol contract instead of
176
+ requiring frontend/backend version equality. A valid version string alone does
177
+ not establish support. Unsupported methods or changed response shapes fail for
178
+ that operation with a diagnostic; unknown state never becomes task completion.
179
+ Prerelease version suffixes do not meet the stable version syntax check.
180
+
181
+ The **0.162.1** installation is an observation, not a minimum requirement or a
182
+ newly verified combination. No separate 0.162.1 end-to-end evidence was found in
183
+ this audit. A thread's `cliVersion` is creation metadata, not proof of the
184
+ currently attached frontend's executable version. The terminal TUI's
185
+ [audited version pairs](codex-0.160.0-compatibility.md) govern a different
186
+ adapter and must not be used as the direct-control version matrix.
187
+
188
+ The permission update API is experimental. Backends may evolve, so action-time
189
+ contract checks and the actual effective settings remain necessary.
190
+
191
+ ### Implementation verification (2026-10-09)
192
+
193
+ The production CLI adapter, native monitor and durable callback outbox were
194
+ exercised against the version combination above in one isolated CLI launched
195
+ with the user's existing `mycodes --remote` wrapper. The shared daemon and
196
+ other working conversations were not restarted. Raw protocol calls were used
197
+ only to prepare the test thread's workspace, model and Plan mode; the actions
198
+ below used AKK's public CLI commands.
199
+ The original CLI display contained all seven task-result markers, confirming
200
+ that these were tasks in the attached CLI conversation.
201
+
202
+ The 2026-10-10 documentation audit rechecked the retained local evidence
203
+ manifest and all seven proof-file hashes. It confirmed the version pair above;
204
+ those private artifacts are not shipped with the package. The native
205
+ RPC/client/snapshot source hashes still matched; task-service and CLI routing
206
+ code have since changed. These historical proofs therefore do not certify the
207
+ new Recover/Renew/Close/Retry Callback implementation. Its current validation
208
+ boundary is recorded in [backend Recovery](backend-task-recovery.md#validation-boundary).
209
+
210
+ | Path | Observed result |
211
+ | --- | --- |
212
+ | Discovery and Status | Selected the dedicated main thread by exact ID and read its real task state |
213
+ | Send and automatic Watch | Accepted client-message ID bound to the exact native turn; repeated message ID did not create another turn |
214
+ | Completion and interaction callbacks | Production Host-profile transport acknowledged durable notifications; each tested completion delivered once |
215
+ | Explicit Watch / Unwatch | Attached to the already active turn; stopping that Watch left the native task running |
216
+ | Command and file approval | Exposed exact pending request, accepted it, and observed the same task finish |
217
+ | Blocking / asynchronous question | Exposed native question and option IDs, sent the chosen answer, and observed the same task finish with that answer |
218
+ | Permissions | All three presets read back correctly without a new turn; Full Access executed a write outside the test workspace |
219
+ | Monitor interruption | Stopped only the test monitor; host reconciliation recovered the original task's completion and delivered its callback once |
220
+
221
+ These implementation tests used a local Host-profile callback receiver. The
222
+ earlier PoC separately verified the existing OpenClaw transport through WeChat,
223
+ including user confirmation; a new WeChat delivery is not claimed by this run.
224
+ Protocol rejection, uncertain sends/responses, reconnect behavior and callback
225
+ lease recovery are also covered by fast regression tests. Network approvals,
226
+ multiline answers and rejection decisions have contract-level coverage; they
227
+ were not separately repeated against the live backend in this run. The full
228
+ and release test tiers are deferred to an actual publication under repository
229
+ policy. Final `npm run test:fast` passed **2,588/2,588** tests, including the build
230
+ and skill consistency check. `npm run validate:architecture` passed with no
231
+ import cycles, no hard-limit violations and no increase to the existing
232
+ complexity budget.
233
+
234
+ Only a CLI actually connected to a compatible shared backend appears in this
235
+ inventory. An embedded CLI backend does not become discoverable merely because
236
+ its history is readable. AKK does not restart Codex, switch a running CLI to a
237
+ different backend, or load an absent thread as a replacement session. The
238
+ existing tmux/Herdr route remains available for applicable terminal sessions.
239
+
240
+ This adapter does not add new-thread, resume-thread, model-change or interrupt
241
+ operations. Async answers target the still-active task; queued answers after
242
+ that task ends are not supported. Standard command/file approvals, Plan-mode
243
+ blocking questions and active-turn async questions are covered; specialized
244
+ MCP ownership verification is outside this adapter.
245
+
246
+ Official protocol reference: [Codex app-server](https://learn.chatgpt.com/docs/app-server).
@@ -0,0 +1,414 @@
1
+ # Codex Desktop support in AKK 0.14.0
2
+
3
+ AKK can discover an existing local Codex Desktop conversation, send a task to
4
+ its original Desktop owner, and monitor the exact native task for completion
5
+ or attention. It can notify and answer asynchronous questions in the same active
6
+ native task. It does not open a second CLI conversation from the same history.
7
+ Command/file approvals, blocking questions, session settings, and exact task interruption use that same original owner. Unsupported native request forms remain manual.
8
+
9
+ AKK 0.14.0 introduces these Desktop controls. See the [README](../README.md)
10
+ for the first-task workflow and [OpenClaw installation](openclaw-operations.md#choose-one-installation-path)
11
+ for packaged and optional source installation.
12
+
13
+ ## Version and platform evidence
14
+
15
+ The reviewed application is macOS Codex Desktop `26.1002.52244`, build `13536`,
16
+ bundle ID `com.openai.codex`, installed as `/Applications/ChatGPT.app`. These
17
+ values come from the app's `Info.plist`, not the globally installed Codex CLI.
18
+ Its bundled Codex metadata identifies `0.162.0-alpha.2`; that embedded metadata
19
+ is not an app-server runtime handshake or a claim that every running process
20
+ uses that version.
21
+
22
+ A read-only audit on 2026-10-10 reconfirmed those installed bundle values.
23
+ [The runtime](../src/desktop-runtime.ts) currently reads that fixed application
24
+ path on Darwin and requires the correct bundle ID.
25
+ [The IPC client's write profile](../src/desktop-ipc-client.ts) requires both
26
+ the version and build to match exactly. This is **not a minimum version** or a
27
+ promise of compatibility with later builds. An unreviewed build may still
28
+ return a compatible read-only snapshot; that does not authorize native writes.
29
+
30
+ The app's own `LSMinimumSystemVersion=13.0` metadata is not an AKK-verified
31
+ minimum macOS version. No Desktop Linux/Windows or alternate installation-path
32
+ support is established. The private IPC handshake does not attest the running
33
+ owner's build, so an updated disk bundle with an older app still running remains
34
+ a compatibility limitation. The real task/interaction evidence below is dated
35
+ 2026-10-09; the new [backend Recovery work](backend-task-recovery.md#validation-boundary)
36
+ has fast-regression coverage, not a new live Desktop proof.
37
+
38
+ ## Capability boundary
39
+
40
+ | Operation | AKK 0.14.0 behavior |
41
+ | --- | --- |
42
+ | List | Default to persisted expanded sidebar membership; offer the broader saved catalog with explicit `desktop_view: "history"`; retain unconnected rows and support search, project filtering, and pagination |
43
+ | Status | Read a fresh snapshot from the exact local Desktop owner when available; report unknown live state when only metadata is available |
44
+ | Send | Verify a live, idle thread, persist a send intent, submit once to its original owner, and correlate native acceptance |
45
+ | Automatic monitoring | Retain a durable Watch for the accepted native task and reconcile uncertain acceptance without resending |
46
+ | Explicit Watch | Bind to one exact task already running in the selected Desktop conversation |
47
+ | Completion | Settle from the bound native task's terminal state and retain its result even if a later task starts |
48
+ | Asynchronous questions | Expose the question and options, notify the controller, and submit its explicit answer to the same active task |
49
+ | Blocking questions | Notify with all native questions and submit one complete typed answer to the exact pending request |
50
+ | Command/file approvals | Notify with the available current command or file preview; submit explicit accept-once or reject and confirm native item progression |
51
+ | Permissions | Apply Read Only, Default, or Full Access to this idle conversation and verify the effective policy |
52
+ | Model and mode | Read current settings; apply an explicitly requested model/effort and optional Plan/default mode; no model catalog is exposed |
53
+ | Cancellation | Interrupt the exact selected native task; an old task ID never cancels a newer task |
54
+ | Unwatch | Stop observation without cancelling or changing the Desktop task |
55
+ | Cold loading, resume, new conversation | Not supported by the Desktop adapter |
56
+
57
+ No Desktop operation types a slash command or uses terminal activity as exact
58
+ completion evidence. Existing terminal capabilities remain separate and retain
59
+ their previous checks.
60
+
61
+ ## Find and select a conversation
62
+
63
+ Use `agent_knock_knock_list` through the controller Host. Select Desktop rows
64
+ from `conversations[]` using their title, project, and `conversation_id`;
65
+ `desktop_scan` carries catalog/pagination diagnostics. Raw CLI output also
66
+ retains `desktop_sessions[]` for operator compatibility. Desktop continues to
67
+ use its original IPC owner; backend-first CLI routing does not turn saved
68
+ Desktop history into a replacement CLI conversation.
69
+ The default `desktop_view: "sidebar"` follows persisted expanded sidebar
70
+ membership (`persisted_expanded_membership`): eligible pinned conversations
71
+ and members of expanded project groups, respecting supported saved layout
72
+ settings. It does not inspect the rendered screen, scrolling, per-window
73
+ temporary state, or a group's live Show More pagination. If the saved layout
74
+ is unsupported or unavailable, inspect the returned limitations; AKK does not
75
+ silently replace this view with all historical candidates.
76
+
77
+ Use `desktop_view: "history"` explicitly for the broader saved catalog,
78
+ including older or hidden conversations. Sidebar discovery and historical
79
+ discovery both retain unconnected candidates. Show those rows with their
80
+ connection state instead of reporting only conversations with Send enabled.
81
+
82
+ Narrow the result using `desktopSearch` for a title or path and
83
+ `desktopProject` for an exact project ID or absolute project directory.
84
+ `desktopLimit` bounds a page; pass the returned cursor as `desktopCursor` to
85
+ continue the same view and filters. A page is not the complete catalog.
86
+ `view` identifies the selected scope; `total_candidates` describes that view
87
+ after filtering. `history_candidates` counts the broader saved pool before
88
+ search filters. `sidebar_selection_scope: "persisted_expanded_membership"` identifies
89
+ the sidebar reconstruction; `sidebar_status` and `limitations` describe its
90
+ evidence boundary. `returned` and `live_count` describe only the returned page
91
+ (`live_probe_scope: "returned_page"`). Four live rows out of thirty
92
+ returned rows means twenty-six candidates are not proven live, not that only
93
+ four Desktop conversations were discovered.
94
+
95
+ Select the conversation using its title and project, then copy its complete
96
+ `desktop:v1:...` ID from List. This identity encodes the Codex home, host, and
97
+ native thread; it is independent of window position, display title, and the
98
+ current owner's temporary client ID. Do not construct it from a title, use a
99
+ terminal selector, or substitute a conversation with the same project.
100
+
101
+ Sidebar or historical membership does not mean a conversation is currently
102
+ loaded in Desktop. Some entries were created in CLI, some have an unknown
103
+ creator, and some no longer have a live owner. Membership uses saved Desktop
104
+ project and sidebar state, not an original-creator filter. Live capabilities
105
+ are checked separately.
106
+
107
+ If the chosen row has no verified live owner, open that exact conversation in
108
+ Desktop and refresh List. AKK does not load it implicitly or resume it through
109
+ CLI. Remote/cloud entries do not gain local write capability from catalog
110
+ metadata.
111
+
112
+ ## Send and monitor
113
+
114
+ The structured tools use the Desktop conversation ID for selection and the
115
+ returned Watch ID for exact task monitoring:
116
+
117
+ ```json
118
+ { "tool": "agent_knock_knock_send", "arguments": {
119
+ "conversation_id": "desktop:v1:...", "request": "Summarize this project's test setup."
120
+ } }
121
+ ```
122
+
123
+ The controller supplies a stable message identity. Retain the returned
124
+ `desktop-watch:...` ID and query it with
125
+ `agent_knock_knock_status({watch_id})` if a callback is delayed. For a task
126
+ already running, use `agent_knock_knock_watch({conversation_id})`. Explicit
127
+ Watch requires an exact active native task; an idle or unknown conversation
128
+ does not create a best-effort activity Watch.
129
+
130
+ Equivalent CLI commands are:
131
+
132
+ ```bash
133
+ agent-knock-knock list --desktop-view sidebar
134
+ agent-knock-knock list --desktop-view history --desktop-search 'older title'
135
+ agent-knock-knock status --conversation 'desktop:v1:...'
136
+ agent-knock-knock send --conversation 'desktop:v1:...' \
137
+ --message 'Summarize this project.' --message-id 'one-stable-request-id' \
138
+ --openclaw-session 'initiating-controller-session' --background
139
+ agent-knock-knock watch-terminal --conversation 'desktop:v1:...' \
140
+ --openclaw-session 'initiating-controller-session'
141
+ agent-knock-knock watch-status --watch 'desktop-watch:...'
142
+ agent-knock-knock unwatch-terminal --watch 'desktop-watch:...' \
143
+ --openclaw-session 'initiating-controller-session'
144
+ ```
145
+
146
+ The examples contain placeholders: copy real IDs from List and Send/Watch.
147
+ Use a new message ID only for a genuinely new task. Repeating an ID recovers
148
+ its existing record rather than sending another task. A lost response or
149
+ uncertain receipt is not permission to retry with a different ID.
150
+
151
+ Conversation Status and task Status answer different questions. The former
152
+ reports the live conversation; the latter follows the original native task.
153
+ An idle conversation, a newer message, or a callback transport acknowledgement
154
+ does not by itself prove the selected task succeeded. A completion result may
155
+ be `completed`, `failed`, or `interrupted`; inspect the recorded outcome.
156
+
157
+ Asynchronous questions appear in `interaction_state` on fresh conversation or
158
+ Watch Status. The Watch sends a durable notification with the question and
159
+ options while the task continues working. A notification is not permission to
160
+ choose an answer: the controller refreshes Status, presents the question to the
161
+ user, and waits for their reply. It then refreshes Status and calls
162
+ `agent_knock_knock_respond_interaction` with the exact conversation or Watch,
163
+ interaction ID, and the advertised question/option IDs. Free-text answers are
164
+ also supported. Only `steer_current_turn` is supported; a completed task's
165
+ question cannot start another task.
166
+
167
+ The response is recorded before dispatch. Inspect later Status `response_state`
168
+ to recover its receipt without resending. The durable dispatcher deduplicates
169
+ repeated identical answers, but an expired or consumed Host offer does not
170
+ authorize another Respond call. A native acknowledgement is `sent`, not
171
+ `confirmed`; confirmation requires the matching accepted native answer in the
172
+ original task. An uncertain outcome is observed, never automatically replayed. Later Status
173
+ returns `response_state` so receipt recovery does not require resending an answer.
174
+ Answered questions disappear from the pending list. Undelivered reminders are
175
+ withdrawn when the question is answered or its task ends; an already delivered
176
+ notification cannot be recalled.
177
+
178
+ Blocking questions use the same response tool, with all advertised questions
179
+ answered together and no `delivery_mode`. Command/file approvals use
180
+ `agent_knock_knock_approve` with the exact conversation or Watch,
181
+ `interaction_id`, and `decision: "approve_once"` or `"reject"`. Refresh Status in
182
+ the same controller conversation before acting. Approval confirmation requires
183
+ the exact native command/file item to advance; a missing request or a completed
184
+ task alone is insufficient. Other native request forms remain manual.
185
+
186
+ ## Settings and cancellation
187
+
188
+ `permission_options({conversation_id})` exposes `read-only`, `default`, and
189
+ `full-access`. `set_permissions({conversation_id,mode})` changes only this idle
190
+ conversation. Full Access is an ordinary option with no extra confirmation.
191
+ AKK verifies the effective permission profile, approval policy, reviewer, and
192
+ sandbox type before reporting `applied: true`; global defaults are unchanged.
193
+ For an idle conversation, `applies_to: "next_task"` reads resolved
194
+ `latestThreadSettings`. The app keeps `currentPermissions` from the last task
195
+ until another starts; during active work, permission inspection reports that
196
+ current task's actual policy instead.
197
+
198
+ `model_options({conversation_id})` reports the current model, reasoning effort,
199
+ and collaboration mode. The reviewed follower API has no model-list method:
200
+ `catalog_available` is false, not an empty or fabricated available-model list.
201
+ `set_model({conversation_id,model,reasoning_effort,collaboration_mode?})` accepts
202
+ an explicitly requested model ID. Optional mode is `plan` or `default`; omitting
203
+ it preserves the existing mode and custom instructions. Readback confirms the
204
+ effective settings, not model availability or account entitlement. Settings
205
+ changes require an idle conversation. Unknown outcomes are inspected, never
206
+ automatically replayed.
207
+
208
+ `cancel({watch_id})` targets the Watch's original native task.
209
+ `cancel({conversation_id,expected_native_turn_id})` uses the exact task ID from
210
+ fresh Status. Both use the native expected-turn interruption contract. An old
211
+ settled task returns its existing outcome without interrupting a newer task.
212
+ Cancellation may race with completion: report the observed native outcome,
213
+ not a promised interruption. `unwatch` only stops monitoring.
214
+
215
+ Desktop backend tasks also support `recover`, `renew`, managed `close`, and
216
+ manual `retry_callback` using their exact persisted task IDs, without terminal
217
+ fallback. Close ends Send management, while Unwatch leaves that management
218
+ intact. See [backend task recovery](backend-task-recovery.md) for deadline,
219
+ identity, callback retry and stopped-observation semantics.
220
+
221
+ ## Protocol and persistence
222
+
223
+ OpenAI documents app-server threads, turns, and completion notifications in
224
+ its [app-server reference](https://learn.chatgpt.com/docs/app-server).
225
+ Those shared concepts explain the native task identifiers; the documented
226
+ app-server interface alone does not establish ownership of a conversation
227
+ already open in Desktop.
228
+
229
+ This adapter uses the app's private local IPC socket under the selected Codex
230
+ home. The reviewed route discovers the current thread owner, follows its
231
+ state stream, and submits through that owner. It validates socket ownership,
232
+ message shapes, peer identity, thread identity, revision freshness, pending
233
+ interactions, and the send receipt. Writes require the reviewed Desktop
234
+ version/build. This IPC surface is not an official stable third-party API;
235
+ an app upgrade may require another compatibility review.
236
+
237
+ Catalog reads copy supported SQLite database/WAL files to a private temporary
238
+ directory, validate the copy, and query it without opening the user's source
239
+ database through SQLite. AKK does not edit session databases or rely on an old
240
+ JSONL path for Desktop task state. Failed or changed catalog snapshots are
241
+ reported as incomplete evidence, not silently treated as an empty catalog.
242
+
243
+ Before sending, AKK persists the controller, target, request identity, and
244
+ submission intent. It then attempts one native submission. Recovery observes
245
+ native user-message/task evidence; it never replays a possibly sent request.
246
+ Watch state and callback outbox records survive an AKK process restart.
247
+ Callback retries use stable notification identity and bounded delivery
248
+ handling; an uncertain transport outcome remains uncertain rather than being
249
+ reported as delivery success.
250
+
251
+ The native send API has no atomic idle-and-send precondition. AKK checks a
252
+ fresh idle snapshot immediately before dispatch, but a human can start work
253
+ between that check and the app accepting input. This race can yield uncertain
254
+ task attribution. Do not operate the same conversation simultaneously when
255
+ you need an unambiguous handoff; inspect the native conversation and the saved
256
+ Watch instead of sending again. Reconnecting a follower may legitimately
257
+ advance the stream revision, so revision changes alone do not prove a new
258
+ task; owner, native task, input, and current state must agree.
259
+
260
+ ## Evidence and limits
261
+
262
+ The implementation follows local read-only app/source inspection and a
263
+ dedicated Desktop proof on 2026-10-09. The proof sent a uniquely identified
264
+ benign message to the exact test thread, observed its native completion, and
265
+ the user confirmed the reply appeared in that same Desktop conversation.
266
+ A separate discovery pass retained previously missed unloaded/creator-unknown
267
+ candidates; the user confirmed the resulting five relevant conversations.
268
+ These observations establish the route and discovery strategy, not universal
269
+ support for every Desktop build, platform, or remote host.
270
+
271
+ The reviewed boundary does not cover Windows/Linux Desktop, cloud-hosted
272
+ threads, arbitrary installations of the app, automatic conversation loading,
273
+ automatic model catalog discovery, unsupported approval forms, or atomic
274
+ coordination with simultaneous human input. Completion generation and durable
275
+ delivery state must also be distinguished from successful delivery through an
276
+ external chat provider.
277
+
278
+ Development verification uses `npm run test:fast` plus relevant build and
279
+ architecture checks. The repository reserves full/release suites for an
280
+ actual publication gate; local development and installation do not authorize
281
+ those suites.
282
+
283
+ ## Production-adapter verification — 2026-10-09
284
+
285
+ The 0.14.0 implementation was exercised against the reviewed macOS build,
286
+ using only the user's dedicated Desktop test conversation:
287
+
288
+ - The normal `list` command returned the live Desktop conversation alongside
289
+ terminal rows. Exact thread selection and read-only conversation Status agreed.
290
+ - Two benign tasks were submitted to that same original Desktop conversation.
291
+ One initially had unproven acceptance; its detached monitor later correlated
292
+ the persisted client message with the native task and observed completion,
293
+ without another submission.
294
+ - An explicit Watch added during the second task bound to the same native turn
295
+ as the automatic Watch. Both retained the exact completed result.
296
+ - Repeating the first task's stable message ID returned the original Watch;
297
+ the native latest-turn ID did not change.
298
+ - A local callback receiver exercised the existing OpenClaw `chat.send`
299
+ transport path and acknowledged each Watch's stable idempotency key. Each
300
+ Watch delivered one completion notification; subsequent reconciliation added
301
+ none. This verifies local callback creation, dispatch, acknowledgement, and
302
+ durable settlement. Real Gateway/WeChat delivery was not exercised.
303
+
304
+ `npm run test:fast` passed **2529 tests**, including Desktop protocol,
305
+ correlation, CLI/tool routing, persistence, manual-attention fixtures, and
306
+ existing terminal regressions. Build, architecture and refactor-evidence
307
+ validators passed without increasing architecture budgets. Full/release tests
308
+ were not run because this was an implementation round, not publication.
309
+ Those initial implementation tests did not exercise manual questions/approvals,
310
+ app restart during a task, unloaded-thread activation, or alternate app builds.
311
+ Later verification and the asynchronous-question change are recorded below.
312
+
313
+ The installed app bundle identifies the reviewed version. The private IPC
314
+ handshake does not attest the live owner's build; installations where the
315
+ running app and its on-disk bundle differ remain a compatibility boundary.
316
+
317
+ ## Asynchronous-question repair — 2026-10-09
318
+
319
+ A dedicated-thread reproduction confirmed that Desktop stores asynchronous
320
+ questions on `agentMessage.delivery = "async"` with `questions`, while
321
+ `requests` can remain empty. The original adapter dropped these fields and
322
+ missed the notification. The repaired adapter reads both structures and
323
+ recognizes accepted native replies, including steering messages that later
324
+ materialize as canonical user messages.
325
+
326
+ The changed production semantic tools and compiled CLI were exercised against
327
+ the same reviewed Desktop build, without installing the patch:
328
+
329
+ - A choice question appeared in Watch Status and delivered one durable
330
+ question notification. The advertised Green option was submitted through
331
+ `respond_interaction`; exact native answer evidence confirmed the response,
332
+ and the original task completed with Green.
333
+ - A free-text question appeared in conversation Status. Orchid was submitted
334
+ to that exact conversation through the same tool, and the original task
335
+ completed with Orchid. Later Status exposed the confirmed `response_state`.
336
+ - Repeating each answer recovered the same confirmed response record, with no
337
+ additional task. Answered questions disappeared, and each task delivered one
338
+ completion callback.
339
+
340
+ These two repair proofs used the production Host-profile callback transport
341
+ with a local receiver; this patch was not installed into the running Gateway
342
+ and no new WeChat delivery is claimed. The earlier Desktop completion proof
343
+ separately reached WeChat and was confirmed by the user. A preliminary native
344
+ PoC was also repeated before implementing the repair.
345
+
346
+ Fast regressions cover incomplete history, stale questions, owner/turn changes,
347
+ unknown dispatch outcomes, explicit retries after proven non-dispatch, response
348
+ recovery through Status, cross-Watch deduplication, and retirement of unsent
349
+ obsolete notifications. Partial history is unknown, not proof that a question
350
+ was answered. Native async-answer acknowledgement and exact answer confirmation
351
+ remain separate states. That repair alone did not enable approvals, blocking responses, or settings.
352
+ The subsequent implementation below adds those controls; cold loading remains unsupported.
353
+
354
+ The final repair check passed `npm run test:fast` (**2622/2622**), including its
355
+ build, plus `npm run validate:architecture`, `npm run validate:refactor-evidence`
356
+ and `git diff --check`. Architecture budgets were unchanged. Full/integration
357
+ and release suites were not run under the repository's development test policy.
358
+
359
+ ## Native controls implementation — 2026-10-09
360
+
361
+ The production semantic tools, compiled CLI, durable response store, and Watch
362
+ monitor were exercised against the same reviewed Desktop build in the dedicated
363
+ test conversation. This round did not rely on direct proof-script responses:
364
+ all task sends, answers, approvals, settings changes, and cancellation used the
365
+ AKK product entry points.
366
+
367
+ Eight native tasks verified:
368
+
369
+ - Read Only command approval accepted and execution observed; a separate command
370
+ rejected, with its proposed file demonstrably absent.
371
+ - File approval accepted and the exact expected file contents observed.
372
+ - Plan-mode blocking input answered both native questions in one typed response;
373
+ native answer records and the original task's final result agreed.
374
+ - Default-mode asynchronous input answered in the same running task, preserving
375
+ the earlier async-question repair.
376
+ - Default permission mode allowed a benign workspace write; Full Access allowed
377
+ a benign write to a dedicated directory outside that workspace. Native task
378
+ permissions and file contents confirmed both effects.
379
+ - An exact Watch cancelled its own active task. The native state and callback
380
+ reported `interrupted`; repeating cancellation for that settled native ID
381
+ returned its existing outcome without issuing another interruption.
382
+
383
+ Seven tasks completed and one was intentionally interrupted. Each produced one
384
+ settlement callback; all five approval/question interactions also produced
385
+ attention notifications and confirmed response records. This round used the
386
+ production Host-profile callback transport with a local receiver, not a new
387
+ Gateway/WeChat delivery test. Earlier user-confirmed WeChat evidence remains
388
+ separate.
389
+
390
+ The same product controls changed the model and reasoning effort, switched
391
+ Plan/default mode, and verified the effective collaboration settings. They then
392
+ restored the original model, effort, mode, and permission preset. Test files were
393
+ removed after verifying their exact contents; the conversation was left idle
394
+ and its test monitors exited. No unrelated conversation was used.
395
+
396
+ One real readback issue was corrected during this verification: idle setting
397
+ updates replace `latestThreadSettings`, while `currentPermissions` remains the
398
+ last task's applied policy. AKK now distinguishes next-task settings from active
399
+ task permissions instead of incorrectly timing out on an already-applied change.
400
+ Regression coverage preserves both native fields and rejects partial preset
401
+ matches. Model confirmation likewise uses the effective collaboration tuple,
402
+ not only a top-level model cache.
403
+
404
+ Limitations still include automatic new/cold-resume operations, model catalog
405
+ and account-availability discovery, unsupported native request forms, alternate
406
+ Desktop builds/platforms, and atomic coordination with simultaneous human input.
407
+ No package publication or local installation was performed in this round.
408
+
409
+ Final checks passed `npm run test:fast` (**2662/2662**, including the build),
410
+ `npm run validate:architecture`, `npm run validate:refactor-evidence`, Skill
411
+ synchronization/validation, and `git diff --check`. Architecture budgets were
412
+ unchanged. Full/integration/release suites were skipped under the development
413
+ test policy. An additional native settings check confirmed that changing only
414
+ model/effort preserves the current mode, then restored the original settings.