@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.
Files changed (270) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/CONTRIBUTING.md +212 -0
  3. package/README.md +105 -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-recovery-semantic.d.ts +16 -0
  9. package/dist/src/backend-recovery-semantic.js +113 -0
  10. package/dist/src/backend-recovery-semantic.js.map +1 -0
  11. package/dist/src/backend-task-recovery.d.ts +103 -0
  12. package/dist/src/backend-task-recovery.js +142 -0
  13. package/dist/src/backend-task-recovery.js.map +1 -0
  14. package/dist/src/callback-transport.d.ts +8 -0
  15. package/dist/src/callback-transport.js +14 -0
  16. package/dist/src/callback-transport.js.map +1 -1
  17. package/dist/src/cli-core.js +18 -8
  18. package/dist/src/cli-core.js.map +1 -1
  19. package/dist/src/cli-runtime-context.d.ts +5 -0
  20. package/dist/src/cli-runtime-context.js.map +1 -1
  21. package/dist/src/codex-native-cli-adapter.d.ts +6 -0
  22. package/dist/src/codex-native-cli-adapter.js +273 -0
  23. package/dist/src/codex-native-cli-adapter.js.map +1 -0
  24. package/dist/src/codex-native-client-interactions.d.ts +6 -0
  25. package/dist/src/codex-native-client-interactions.js +124 -0
  26. package/dist/src/codex-native-client-interactions.js.map +1 -0
  27. package/dist/src/codex-native-client-rpc.d.ts +21 -0
  28. package/dist/src/codex-native-client-rpc.js +137 -0
  29. package/dist/src/codex-native-client-rpc.js.map +1 -0
  30. package/dist/src/codex-native-client.d.ts +42 -0
  31. package/dist/src/codex-native-client.js +326 -0
  32. package/dist/src/codex-native-client.js.map +1 -0
  33. package/dist/src/codex-native-identity.d.ts +6 -0
  34. package/dist/src/codex-native-identity.js +42 -0
  35. package/dist/src/codex-native-identity.js.map +1 -0
  36. package/dist/src/codex-native-monitor.d.ts +4 -0
  37. package/dist/src/codex-native-monitor.js +92 -0
  38. package/dist/src/codex-native-monitor.js.map +1 -0
  39. package/dist/src/codex-native-outbox.d.ts +16 -0
  40. package/dist/src/codex-native-outbox.js +120 -0
  41. package/dist/src/codex-native-outbox.js.map +1 -0
  42. package/dist/src/codex-native-public-projection.d.ts +545 -0
  43. package/dist/src/codex-native-public-projection.js +182 -0
  44. package/dist/src/codex-native-public-projection.js.map +1 -0
  45. package/dist/src/codex-native-record-store.d.ts +27 -0
  46. package/dist/src/codex-native-record-store.js +111 -0
  47. package/dist/src/codex-native-record-store.js.map +1 -0
  48. package/dist/src/codex-native-response-service.d.ts +69 -0
  49. package/dist/src/codex-native-response-service.js +244 -0
  50. package/dist/src/codex-native-response-service.js.map +1 -0
  51. package/dist/src/codex-native-runtime.d.ts +46 -0
  52. package/dist/src/codex-native-runtime.js +112 -0
  53. package/dist/src/codex-native-runtime.js.map +1 -0
  54. package/dist/src/codex-native-semantic.d.ts +17 -0
  55. package/dist/src/codex-native-semantic.js +175 -0
  56. package/dist/src/codex-native-semantic.js.map +1 -0
  57. package/dist/src/codex-native-snapshot.d.ts +19 -0
  58. package/dist/src/codex-native-snapshot.js +160 -0
  59. package/dist/src/codex-native-snapshot.js.map +1 -0
  60. package/dist/src/codex-native-state-store.d.ts +61 -0
  61. package/dist/src/codex-native-state-store.js +132 -0
  62. package/dist/src/codex-native-state-store.js.map +1 -0
  63. package/dist/src/codex-native-task-service.d.ts +71 -0
  64. package/dist/src/codex-native-task-service.js +502 -0
  65. package/dist/src/codex-native-task-service.js.map +1 -0
  66. package/dist/src/codex-native-types.d.ts +92 -0
  67. package/dist/src/codex-native-types.js +15 -0
  68. package/dist/src/codex-native-types.js.map +1 -0
  69. package/dist/src/conversation-list.d.ts +12 -0
  70. package/dist/src/conversation-list.js +30 -0
  71. package/dist/src/conversation-list.js.map +1 -0
  72. package/dist/src/conversation-route-dispatch.d.ts +13 -0
  73. package/dist/src/conversation-route-dispatch.js +66 -0
  74. package/dist/src/conversation-route-dispatch.js.map +1 -0
  75. package/dist/src/conversation-route-legacy.d.ts +18 -0
  76. package/dist/src/conversation-route-legacy.js +54 -0
  77. package/dist/src/conversation-route-legacy.js.map +1 -0
  78. package/dist/src/conversation-route-store.d.ts +51 -0
  79. package/dist/src/conversation-route-store.js +126 -0
  80. package/dist/src/conversation-route-store.js.map +1 -0
  81. package/dist/src/conversation-routing-cli-adapter.d.ts +12 -0
  82. package/dist/src/conversation-routing-cli-adapter.js +211 -0
  83. package/dist/src/conversation-routing-cli-adapter.js.map +1 -0
  84. package/dist/src/conversation-routing-commands.d.ts +11 -0
  85. package/dist/src/conversation-routing-commands.js +85 -0
  86. package/dist/src/conversation-routing-commands.js.map +1 -0
  87. package/dist/src/conversation-routing-home.d.ts +26 -0
  88. package/dist/src/conversation-routing-home.js +105 -0
  89. package/dist/src/conversation-routing-home.js.map +1 -0
  90. package/dist/src/conversation-routing-identity.d.ts +40 -0
  91. package/dist/src/conversation-routing-identity.js +174 -0
  92. package/dist/src/conversation-routing-identity.js.map +1 -0
  93. package/dist/src/conversation-runtime-route-store.d.ts +11 -0
  94. package/dist/src/conversation-runtime-route-store.js +118 -0
  95. package/dist/src/conversation-runtime-route-store.js.map +1 -0
  96. package/dist/src/desktop-async-interactions.d.ts +15 -0
  97. package/dist/src/desktop-async-interactions.js +88 -0
  98. package/dist/src/desktop-async-interactions.js.map +1 -0
  99. package/dist/src/desktop-async-state.d.ts +5 -0
  100. package/dist/src/desktop-async-state.js +53 -0
  101. package/dist/src/desktop-async-state.js.map +1 -0
  102. package/dist/src/desktop-cli-adapter.d.ts +7 -0
  103. package/dist/src/desktop-cli-adapter.js +322 -0
  104. package/dist/src/desktop-cli-adapter.js.map +1 -0
  105. package/dist/src/desktop-cli-controls.d.ts +9 -0
  106. package/dist/src/desktop-cli-controls.js +45 -0
  107. package/dist/src/desktop-cli-controls.js.map +1 -0
  108. package/dist/src/desktop-command-presentation.d.ts +2 -0
  109. package/dist/src/desktop-command-presentation.js +31 -0
  110. package/dist/src/desktop-command-presentation.js.map +1 -0
  111. package/dist/src/desktop-control-semantic.d.ts +8 -0
  112. package/dist/src/desktop-control-semantic.js +68 -0
  113. package/dist/src/desktop-control-semantic.js.map +1 -0
  114. package/dist/src/desktop-identity.d.ts +5 -0
  115. package/dist/src/desktop-identity.js +40 -0
  116. package/dist/src/desktop-identity.js.map +1 -0
  117. package/dist/src/desktop-interaction-projection.d.ts +57 -0
  118. package/dist/src/desktop-interaction-projection.js +196 -0
  119. package/dist/src/desktop-interaction-projection.js.map +1 -0
  120. package/dist/src/desktop-interaction-state.d.ts +3 -0
  121. package/dist/src/desktop-interaction-state.js +48 -0
  122. package/dist/src/desktop-interaction-state.js.map +1 -0
  123. package/dist/src/desktop-ipc-async-answer.d.ts +9 -0
  124. package/dist/src/desktop-ipc-async-answer.js +71 -0
  125. package/dist/src/desktop-ipc-async-answer.js.map +1 -0
  126. package/dist/src/desktop-ipc-client.d.ts +47 -0
  127. package/dist/src/desktop-ipc-client.js +400 -0
  128. package/dist/src/desktop-ipc-client.js.map +1 -0
  129. package/dist/src/desktop-ipc-native-operations.d.ts +11 -0
  130. package/dist/src/desktop-ipc-native-operations.js +126 -0
  131. package/dist/src/desktop-ipc-native-operations.js.map +1 -0
  132. package/dist/src/desktop-ipc-transport.d.ts +13 -0
  133. package/dist/src/desktop-ipc-transport.js +123 -0
  134. package/dist/src/desktop-ipc-transport.js.map +1 -0
  135. package/dist/src/desktop-list.d.ts +25 -0
  136. package/dist/src/desktop-list.js +55 -0
  137. package/dist/src/desktop-list.js.map +1 -0
  138. package/dist/src/desktop-metadata-reader.d.ts +30 -0
  139. package/dist/src/desktop-metadata-reader.js +182 -0
  140. package/dist/src/desktop-metadata-reader.js.map +1 -0
  141. package/dist/src/desktop-monitor.d.ts +4 -0
  142. package/dist/src/desktop-monitor.js +101 -0
  143. package/dist/src/desktop-monitor.js.map +1 -0
  144. package/dist/src/desktop-public-projection.d.ts +6 -0
  145. package/dist/src/desktop-public-projection.js +134 -0
  146. package/dist/src/desktop-public-projection.js.map +1 -0
  147. package/dist/src/desktop-request-interactions.d.ts +14 -0
  148. package/dist/src/desktop-request-interactions.js +144 -0
  149. package/dist/src/desktop-request-interactions.js.map +1 -0
  150. package/dist/src/desktop-response-dispatch.d.ts +14 -0
  151. package/dist/src/desktop-response-dispatch.js +19 -0
  152. package/dist/src/desktop-response-dispatch.js.map +1 -0
  153. package/dist/src/desktop-response-evidence.d.ts +4 -0
  154. package/dist/src/desktop-response-evidence.js +19 -0
  155. package/dist/src/desktop-response-evidence.js.map +1 -0
  156. package/dist/src/desktop-response-service.d.ts +11 -0
  157. package/dist/src/desktop-response-service.js +188 -0
  158. package/dist/src/desktop-response-service.js.map +1 -0
  159. package/dist/src/desktop-response-store.d.ts +35 -0
  160. package/dist/src/desktop-response-store.js +58 -0
  161. package/dist/src/desktop-response-store.js.map +1 -0
  162. package/dist/src/desktop-response-types.d.ts +20 -0
  163. package/dist/src/desktop-response-types.js +2 -0
  164. package/dist/src/desktop-response-types.js.map +1 -0
  165. package/dist/src/desktop-response-value.d.ts +6 -0
  166. package/dist/src/desktop-response-value.js +31 -0
  167. package/dist/src/desktop-response-value.js.map +1 -0
  168. package/dist/src/desktop-runtime.d.ts +153 -0
  169. package/dist/src/desktop-runtime.js +88 -0
  170. package/dist/src/desktop-runtime.js.map +1 -0
  171. package/dist/src/desktop-semantic.d.ts +21 -0
  172. package/dist/src/desktop-semantic.js +140 -0
  173. package/dist/src/desktop-semantic.js.map +1 -0
  174. package/dist/src/desktop-session-catalog.d.ts +68 -0
  175. package/dist/src/desktop-session-catalog.js +225 -0
  176. package/dist/src/desktop-session-catalog.js.map +1 -0
  177. package/dist/src/desktop-session-controls.d.ts +145 -0
  178. package/dist/src/desktop-session-controls.js +176 -0
  179. package/dist/src/desktop-session-controls.js.map +1 -0
  180. package/dist/src/desktop-sidebar-metadata.d.ts +27 -0
  181. package/dist/src/desktop-sidebar-metadata.js +83 -0
  182. package/dist/src/desktop-sidebar-metadata.js.map +1 -0
  183. package/dist/src/desktop-sidebar-projects.d.ts +10 -0
  184. package/dist/src/desktop-sidebar-projects.js +31 -0
  185. package/dist/src/desktop-sidebar-projects.js.map +1 -0
  186. package/dist/src/desktop-sidebar-selection.d.ts +28 -0
  187. package/dist/src/desktop-sidebar-selection.js +85 -0
  188. package/dist/src/desktop-sidebar-selection.js.map +1 -0
  189. package/dist/src/desktop-snapshot-details.d.ts +4 -0
  190. package/dist/src/desktop-snapshot-details.js +116 -0
  191. package/dist/src/desktop-snapshot-details.js.map +1 -0
  192. package/dist/src/desktop-snapshot.d.ts +11 -0
  193. package/dist/src/desktop-snapshot.js +276 -0
  194. package/dist/src/desktop-snapshot.js.map +1 -0
  195. package/dist/src/desktop-state-store.d.ts +72 -0
  196. package/dist/src/desktop-state-store.js +269 -0
  197. package/dist/src/desktop-state-store.js.map +1 -0
  198. package/dist/src/desktop-task-interactions.d.ts +10 -0
  199. package/dist/src/desktop-task-interactions.js +93 -0
  200. package/dist/src/desktop-task-interactions.js.map +1 -0
  201. package/dist/src/desktop-task-recovery.d.ts +38 -0
  202. package/dist/src/desktop-task-recovery.js +171 -0
  203. package/dist/src/desktop-task-recovery.js.map +1 -0
  204. package/dist/src/desktop-task-service.d.ts +54 -0
  205. package/dist/src/desktop-task-service.js +441 -0
  206. package/dist/src/desktop-task-service.js.map +1 -0
  207. package/dist/src/desktop-types.d.ts +281 -0
  208. package/dist/src/desktop-types.js +13 -0
  209. package/dist/src/desktop-types.js.map +1 -0
  210. package/dist/src/host-monitor-reconciliation.js +36 -4
  211. package/dist/src/host-monitor-reconciliation.js.map +1 -1
  212. package/dist/src/host-profile-runtime.js +7 -3
  213. package/dist/src/host-profile-runtime.js.map +1 -1
  214. package/dist/src/local-codex-cli-adapter.d.ts +7 -0
  215. package/dist/src/local-codex-cli-adapter.js +13 -0
  216. package/dist/src/local-codex-cli-adapter.js.map +1 -0
  217. package/dist/src/openclaw-callback-transport.js +2 -1
  218. package/dist/src/openclaw-callback-transport.js.map +1 -1
  219. package/dist/src/semantic-conversation-target.d.ts +4 -0
  220. package/dist/src/semantic-conversation-target.js +20 -0
  221. package/dist/src/semantic-conversation-target.js.map +1 -0
  222. package/dist/src/semantic-permission-control.js +47 -9
  223. package/dist/src/semantic-permission-control.js.map +1 -1
  224. package/dist/src/semantic-private-authority-offers.d.ts +1 -1
  225. package/dist/src/semantic-private-authority-offers.js +3 -1
  226. package/dist/src/semantic-private-authority-offers.js.map +1 -1
  227. package/dist/src/semantic-tool-command-helpers.d.ts +6 -0
  228. package/dist/src/semantic-tool-command-helpers.js +199 -78
  229. package/dist/src/semantic-tool-command-helpers.js.map +1 -1
  230. package/dist/src/semantic-tool-descriptions.d.ts +2 -1
  231. package/dist/src/semantic-tool-descriptions.js +81 -35
  232. package/dist/src/semantic-tool-descriptions.js.map +1 -1
  233. package/dist/src/semantic-tool-list-projection.js +66 -2
  234. package/dist/src/semantic-tool-list-projection.js.map +1 -1
  235. package/dist/src/semantic-tool-presentation.js +76 -7
  236. package/dist/src/semantic-tool-presentation.js.map +1 -1
  237. package/dist/src/semantic-tool-runtime.js +129 -29
  238. package/dist/src/semantic-tool-runtime.js.map +1 -1
  239. package/dist/src/semantic-tool-schemas.d.ts +410 -27
  240. package/dist/src/semantic-tool-schemas.js +176 -88
  241. package/dist/src/semantic-tool-schemas.js.map +1 -1
  242. package/dist/src/terminal-action-contracts.js +10 -6
  243. package/dist/src/terminal-action-contracts.js.map +1 -1
  244. package/dist/src/terminal-list-cli-adapter.d.ts +1 -0
  245. package/dist/src/terminal-list-cli-adapter.js +6 -3
  246. package/dist/src/terminal-list-cli-adapter.js.map +1 -1
  247. package/dist/src/terminal-monitor-decision-policy.d.ts +1 -1
  248. package/dist/src/terminal-permission-control-list-projection.d.ts +1 -1
  249. package/dist/src/terminal-user-send-intent.d.ts +2 -0
  250. package/dist/src/terminal-user-send-intent.js +11 -3
  251. package/dist/src/terminal-user-send-intent.js.map +1 -1
  252. package/docs/architecture/current-architecture.md +313 -0
  253. package/docs/architecture/interactive-terminal-response.md +276 -0
  254. package/docs/architecture/issue-126-final-report.md +248 -0
  255. package/docs/architecture/orchestration-refactor-history.md +2987 -0
  256. package/docs/architecture/orchestration-refactor.md +21 -0
  257. package/docs/backend-task-recovery.md +89 -0
  258. package/docs/bidirectional-agent-protocol.md +260 -0
  259. package/docs/codex-cli-native-compatibility.md +246 -0
  260. package/docs/codex-desktop-compatibility.md +414 -0
  261. package/docs/openclaw-operations.md +281 -0
  262. package/docs/openclaw-session-turn-delivery-requirement.md +45 -0
  263. package/docs/operator-guide.md +543 -0
  264. package/docs/storage-and-logging.md +91 -0
  265. package/docs/test-performance-issue-108.md +80 -0
  266. package/docs/test-performance-issue-120.md +226 -0
  267. package/docs/testing.md +628 -0
  268. package/openclaw.plugin.json +7 -3
  269. package/package.json +6 -13
  270. package/templates/openclaw-skills/agent-knock-knock/SKILL.md +66 -15
@@ -0,0 +1,313 @@
1
+ # Current architecture and health budget
2
+
3
+ Status: authoritative current architecture through the `0.13.17` refactor closeout.
4
+
5
+ Historical opening snapshot: `main@0667537ac6efe116c5261fa33370a4190f2d2226`, package
6
+ `0.13.3`, measured 2026-09-15. The machine-readable baseline and budgets are
7
+ in [`config/architecture-health-budget.json`](../../config/architecture-health-budget.json).
8
+ Run `npm run architecture:dashboard` to validate the budgets and print the
9
+ current JSON dashboard. The `0.13.17` closeout below supersedes the earlier
10
+ ratchet values; the opening and P2 measurements remain historical evidence.
11
+
12
+ The stable [orchestration architecture index](./orchestration-refactor.md)
13
+ routes readers to this current document or the immutable
14
+ [Issue #126 historical ledger](./orchestration-refactor-history.md). That
15
+ ledger and the [Issue #126 closeout report](./issue-126-final-report.md) are
16
+ historical evidence; they do not describe current module sizes, protocols, or
17
+ the current health budget.
18
+
19
+ ## Shape of the system
20
+
21
+ Production dependencies flow inward:
22
+
23
+ ```text
24
+ CLI / OpenClaw / Host connectors
25
+ -> typed command facades and composition
26
+ -> dispatch / lifecycle / callback / monitor / watch application services
27
+ -> pure authority, policy, and state-transition modules
28
+ -> domain records and ports
29
+
30
+ tmux / Herdr / Codex / Claude / Store / Gateway adapters implement ports
31
+ and point back toward the application boundary.
32
+ ```
33
+
34
+ `src/cli.ts` is the sole production importer of `src/cli-core.ts`. The core is
35
+ a compatibility command facade, not an owner of terminal, lifecycle, monitor,
36
+ Watch, callback, or persistence state machines. Every production module has one
37
+ domain owner in `config/production-module-ownership.json`; the compiler-AST
38
+ architecture gate rejects missing ownership, computed production imports,
39
+ dependency cycles, duplicated canonical status policies, and unapproved reverse
40
+ imports into `cli-core.ts`.
41
+
42
+ The canonical mutation lock order remains:
43
+
44
+ ```text
45
+ terminal dispatch lock -> Store writer lease -> conversation state lock
46
+ ```
47
+
48
+ Refactoring must preserve durable reservation before terminal input, exact
49
+ terminal/process/cwd authority, execution-time revalidation, reverse-order lock
50
+ release, and `uncertain + do_not_retry` after possible input with an unproven
51
+ postcondition.
52
+
53
+ ## Issue #320 opening snapshot
54
+
55
+ | Metric | Snapshot | Gate |
56
+ | --- | ---: | --- |
57
+ | Production modules | 155 | observed |
58
+ | Production physical LOC | 144,726 | observed only |
59
+ | Production functions | 5,926 | observed |
60
+ | Production import edges | 1,004 | observed |
61
+ | Production import cycles | 0 | must remain 0 |
62
+ | Hard function violations (`>=500` LOC or `>=50` approximate complexity) | 0 | must remain 0 |
63
+ | Default function violations (`>=100` LOC or `>=20` approximate complexity) | 338 | must not increase |
64
+ | Production files over 2,000 LOC | 19 | must not increase |
65
+ | OpenClaw / Host Bridge semantic tools | 24 each | must stay synchronized |
66
+ | Pi / DSH catalog parity | Host Adapter capability handshake v1 | fail closed on catalog, registration, or Skill drift |
67
+ | Canonical / generated Pi / generated DSH Skill documents | byte-identical | generated by a hash-gated sync step |
68
+
69
+ Total production LOC is deliberately not a pass/fail budget. Typed safety
70
+ checks, compatibility profiles, and evidence may legitimately add source. It is
71
+ still reported with a delta from this snapshot so growth remains visible. The
72
+ gate instead targets concentration, complexity, cycles, and duplicated public
73
+ artifacts.
74
+
75
+ The `cli-core.ts` ceiling is 1,839 LOC and can move downward without editing a
76
+ manifest. Eight opening concentration paths have individual ratcheting budgets:
77
+
78
+ | Path | Maximum physical LOC |
79
+ | --- | ---: |
80
+ | `src/terminal-command-cli-adapter.ts` | 10,421 |
81
+ | `src/terminal-agent-bridge.ts` | 7,409 |
82
+ | `src/terminal-list-cli-adapter.ts` | 5,093 |
83
+ | `src/openclaw-plugin-command-adapter.ts` | 3,817 |
84
+ | `src/terminal-watch-cli-adapter.ts` | 3,683 |
85
+ | `src/claude-local-transcript-provider.ts` | 3,534 |
86
+ | `src/terminal-monitor-state-cli-adapter.ts` | 3,478 |
87
+ | `src/terminal-watch-store.ts` | 3,191 |
88
+
89
+ These are ceilings, not desired final sizes. Removing or splitting a hotspot is
90
+ allowed without changing its historical budget; the dashboard reports a removed
91
+ path as `retired: true` with zero current LOC. Reusing that same path later still
92
+ subjects it to its historical ceiling. Raising a baseline ceiling is rejected
93
+ by the validator rather than normalized away in a routine feature PR.
94
+
95
+ ## P2 closeout ratchets
96
+
97
+ Measured on 2026-09-15 at `main@9b4b007` before the closeout-budget commit:
98
+
99
+ | Metric | P2 closeout | Opening delta |
100
+ | --- | ---: | ---: |
101
+ | Production modules | 212 | +57 responsibility-focused modules |
102
+ | Production physical LOC | 150,684 | +5,958 observed-only LOC |
103
+ | Production functions | 6,210 | +284 |
104
+ | Production import edges | 1,382 | +378 |
105
+ | Import cycles / hard function violations | 0 / 0 | unchanged |
106
+ | Default function violations | 332 | -6 |
107
+ | Production files over 2,000 LOC | 9 | -10 |
108
+ | Largest production file | 3,635 LOC | below the new 5,000-LOC gate |
109
+
110
+ The P2 closeout converted the achieved concentration reductions into executable
111
+ non-regression gates. At that milestone the budget permitted no more than nine
112
+ production files over 2,000 physical LOC, rejected every production file at
113
+ 5,000 LOC or larger, and lowered each tracked hotspot ceiling to its
114
+ post-refactor size. The default function-violation ceiling was likewise lowered
115
+ from the opening 338 to the measured closeout value. The `0.13.17` milestone
116
+ tightens these ratchets again; it does not raise them to absorb feature growth.
117
+
118
+ The separate 90-day goal of at most 250 default-threshold violations is not a
119
+ claim about this P2 milestone. Reaching it requires function-level decomposition
120
+ across callback, Watch, identity, transcript, and terminal-input policies rather
121
+ than mechanical file movement. It remains visible follow-up work; the current
122
+ ratchet neither weakens the `>=100` LOC / `>=20` approximate-complexity
123
+ definition nor labels that longer-horizon target complete.
124
+
125
+ Two other 90-day measures are longitudinal rather than static source gates:
126
+ the typical production-file touch count for a new agent/version profile and
127
+ `test:fast` p50/p95. They require evidence across multiple future changes or
128
+ runs and are not inferred from a single P2 checkout.
129
+
130
+ ## 0.13.17 refactor closeout
131
+
132
+ Measured on 2026-10-02 against the released `0.13.16` source at `d9e6b3f`.
133
+ This phase covers the published backend, its test support, and release
134
+ verification scripts. Uncommitted Control UI work from another checkout is
135
+ outside this comparison.
136
+
137
+ | Metric | 0.13.16 baseline | 0.13.17 closeout | Delta |
138
+ | --- | ---: | ---: | ---: |
139
+ | Production modules | 248 | 281 | +33 |
140
+ | Production physical LOC | 161,601 | 163,877 | +2,276 |
141
+ | Production functions | 6,922 | 6,965 | +43 |
142
+ | Production import edges | 1,590 | 1,821 | +231 |
143
+ | Import cycles / hard function violations | 0 / 0 | 0 / 0 | unchanged |
144
+ | Default function violations | 332 | 330 | -2 |
145
+ | Production files over 2,000 LOC | 9 | 4 | -5 |
146
+ | Largest production file | 3,631 LOC | 3,534 LOC | -97 LOC |
147
+
148
+ The decomposition gives Watch capture, fallback observation, interaction
149
+ authority, and response execution separate owners; Monitor reconciliation and
150
+ recovery likewise leave its CLI facade. Legacy Codex rollout file access,
151
+ record parsing, human-started task observation, interaction evidence, and bound
152
+ completion now have distinct modules. Native model-control execution and
153
+ surface/input handling, Codex inventory, and native inspection proof are also
154
+ separated from their existing public entry points.
155
+
156
+ | Existing production entry point | Before LOC | After LOC |
157
+ | --- | ---: | ---: |
158
+ | `src/terminal-watch-cli-adapter.ts` | 3,631 | 651 |
159
+ | `src/terminal-monitor-state-cli-adapter.ts` | 3,476 | 1,119 |
160
+ | `src/terminal-submission-acceptance.ts` | 3,414 | 771 |
161
+ | `src/native-thread-lifecycle-cli-adapter.ts` | 2,852 | 1,764 |
162
+ | `src/terminal-model-control.ts` | 2,658 | 1,151 |
163
+ | `src/codex-store-adapter.ts` | 1,795 | 744 |
164
+ | `src/terminal-native-inspection-bridge.ts` | 1,956 | 1,080 |
165
+
166
+ These are physical line counts, including comments and blank lines. Splitting
167
+ modules and wrapping long descriptions adds explicit imports, interfaces, and
168
+ lines: total production LOC increases about 1.4%. That growth is reported,
169
+ not presented as code removal. The improvement is reduced responsibility
170
+ concentration with unchanged dependency direction and public behavior.
171
+ Production lines over 160, 200, and 300 characters fall from 192/118/63 to
172
+ 87/36/9 respectively; script lines over 160 characters fall from six to zero.
173
+ This is targeted readability work, not a repository-wide formatting rewrite.
174
+
175
+ Test and maintenance boundaries are preserved too. The 4,970-line Watch test
176
+ file becomes a 9-line registration entry over eight behavior groups and shared
177
+ fixtures; its 42 test definitions and 352 assertion calls are unchanged in
178
+ static AST comparison. The 3,080-line no-rollout support file becomes a
179
+ 112-line export facade over 14 modules; all 62 functions and 86 assertions are
180
+ retained, including the deliberate subprocess and crash/exit cases. The
181
+ affected-test map records the new direct consumers without changing test-tier
182
+ entry points. The 1,744-line refactor-evidence script and 1,339-line OpenClaw
183
+ compatibility script become 50-line and 90-line entry points over domain
184
+ modules. The compatibility flow retains all 72 assertions and the same
185
+ Gateway cleanup boundary. Its full-host function now delegates lifecycle
186
+ stages rather than owning the entire scenario inline.
187
+
188
+ The bound-completion detector preserves acceptance and identity error
189
+ precedence, diagnostic fields, the same open descriptor for reads and stat
190
+ checks, and its `finally` close on every post-open return. Public facades retain
191
+ their exports. Compiled comparison against the immutable `0.13.16` package
192
+ confirms equal action-contract values, fresh nested contract objects, equal
193
+ schema exports, and the same complete 24-tool catalog. Extracted descriptions
194
+ and guidance retain their exact text; native approval and input checks are not
195
+ relaxed. Long captured ANSI fixture data remains intact.
196
+
197
+ The current executable ratchets now permit at most **330 default function
198
+ violations** and **four production files over 2,000 LOC**. Watch, Monitor, and
199
+ List hotspot ceilings are **651**, **1,119**, and **2,616** LOC respectively.
200
+ The other hotspot ceilings remain as recorded in the budget manifest. Import
201
+ cycles and hard function violations must remain zero, and the 4,999-LOC
202
+ production-file ceiling remains unchanged. These values replace the earlier
203
+ P2 allowances; the historical snapshot is not rewritten.
204
+
205
+ Four production files still exceed 2,000 physical lines:
206
+
207
+ | Remaining concentration | Physical LOC |
208
+ | --- | ---: |
209
+ | `src/claude-local-transcript-provider.ts` | 3,534 |
210
+ | `src/terminal-agent-bridge.ts` | 2,641 |
211
+ | `src/terminal-list-cli-adapter.ts` | 2,616 |
212
+ | `src/terminal-acceptance-cli-adapter.ts` | 2,272 |
213
+
214
+ Those files and the remaining 330 default-threshold function violations remain
215
+ follow-up work. This closeout does not claim that all complexity is eliminated
216
+ or that the longer-horizon 250-violation goal has been reached.
217
+
218
+ Validation completed for publication: `npm run test:fast` passed all 2,434
219
+ tests; `npm run test:release` passed all 2,949 full-suite tests, the isolated
220
+ OpenClaw 2026.9.1 install/callback/update/uninstall scenario, ClawHub runtime
221
+ inspection (zero breakages or warnings), and publication dry run. TypeScript
222
+ no-emit checking, JavaScript syntax/module-link checking, architecture and
223
+ refactor-evidence validators, static preservation review, and compiled
224
+ public-contract parity also passed. All 27 changed production modules retain
225
+ their previous runtime exports. No live terminal scenarios were executed;
226
+ fixture coverage and package comparisons do not substitute for live verification.
227
+
228
+ ## Contract synchronization
229
+
230
+ The canonical semantic tool contract remains
231
+ `config/public-contract-witnesses.json`. Existing contract validation proves
232
+ the exact OpenClaw list and the Host Bridge count. Pi and DeepSeek Harness no
233
+ longer repeat that count or expose a source constant for the architecture gate
234
+ to scrape. At startup they verify Host Adapter capability handshake v1: the
235
+ contract version, ordered tool names and derived count, canonical catalog
236
+ SHA-256, bundled Skill SHA-256, and their completed registration names must all
237
+ agree. Missing, unknown, or drifted handshakes fail before AKK becomes ready.
238
+
239
+ The only editable Skill source is:
240
+
241
+ ```text
242
+ templates/openclaw-skills/agent-knock-knock/SKILL.md
243
+ ```
244
+
245
+ The Pi and DeepSeek Harness package copies are generated artifacts and must not
246
+ be edited directly. `npm run skill:sync` atomically regenerates both copies;
247
+ `npm run skill:check` fails on a missing or byte-different artifact and reports
248
+ the canonical SHA-256. Connector builds regenerate only their allowlisted copy,
249
+ and build/prepack checks keep the packaged Skill byte-identical. The dashboard
250
+ continues to report the canonical SHA-256 and every generated replica result.
251
+
252
+ The architecture dashboard therefore reports only its directly witnessed
253
+ OpenClaw/Host Bridge parity; connector parity is executable conformance rather
254
+ than a regex over connector source. Connector release policy also has one
255
+ engine. `npm run connectors:verify`
256
+ runs its deterministic offline mode for Pi and DeepSeek Harness independently;
257
+ the connector-local `release:check` wrappers add clean-main, upstream, unused
258
+ npm version/tag, and explicit publish-confirmation checks. Ordinary root
259
+ validation never queries published registry state.
260
+
261
+ Host connectors and the shared semantic runtime depend only on the neutral
262
+ `semantic-tool-*`, `semantic-private-authority-offers`, and
263
+ `host-monitor-reconciliation` modules. OpenClaw's command, schema, helper,
264
+ private-offer, and supervisor filenames are compatibility adapters over those
265
+ owners; no Host or semantic-core module imports an `openclaw-*` implementation.
266
+ This keeps the 24-tool schema/order/digest, owner-local offers, asynchronous
267
+ relay, and one Host-owned lifecycle byte-compatible while making dependency
268
+ direction executable in the fast contract tests and architecture evidence.
269
+
270
+ ## Refactor boundaries
271
+
272
+ The Issue #320 sequence uses narrow strangler changes:
273
+
274
+ 1. P0 makes model-control availability and execution consume one decision and
275
+ makes managed Turn and Watch native-interaction responses consume one
276
+ transaction kernel.
277
+ 2. P1 decomposes the terminal command, List, and Bridge adapters along existing
278
+ use-case boundaries while retaining their public facades and single input
279
+ ledger boundary.
280
+ 3. P2 extracts reusable callback/Store kernels, makes the Host tool and Skill
281
+ catalogs single-source, and splits oversized tests and historical documents.
282
+
283
+ Monitor and Watch share terminal observation and native-interaction execution,
284
+ including blocking `questionnaire` and working-parallel Codex `async_question`
285
+ offers. An async response defaults to advertised `steer_current_turn` or explicitly
286
+ selects advertised `queue_next_turn`; a blocking questionnaire carries none. Both
287
+ public paths remain semantic-ID-only and never expose raw keys or menu indexes.
288
+ They do not share task-completion semantics or persistence ownership. Model
289
+ control ordinary, residual-continuation, and repair authorities remain separate
290
+ domains. Refactoring must not use file movement to collapse those distinctions.
291
+
292
+ ## Updating the dashboard
293
+
294
+ Use the gate during each small refactor PR:
295
+
296
+ ```bash
297
+ npm run test:fast
298
+ npm run typecheck
299
+ npm run build
300
+ npm run validate:architecture
301
+ npm run validate:refactor-evidence
302
+ git diff --check
303
+ ```
304
+
305
+ The architecture command exits nonzero before printing a successful dashboard
306
+ when a budget or synchronization invariant fails. Normal P0/P1/P2 development
307
+ uses only the fast test tier. Full/release tests follow repository policy and
308
+ are not implied by updating this dashboard.
309
+
310
+ Snapshot observation values are historical and are not rewritten after every
311
+ feature. A hotspot or soft-complexity ceiling may be lowered after a completed
312
+ refactor milestone. It must not be raised to make a regression green. New
313
+ production modules still require an explicit owner and affected-test mapping.
@@ -0,0 +1,276 @@
1
+ # Interactive terminal response design
2
+
3
+ Status: implemented public package contract
4
+
5
+ ## Problem
6
+
7
+ AKK's terminal approval boundary historically exposes one operation: approve
8
+ the adapter-proven first, one-time `Yes` choice. `cancel` interrupts the Turn;
9
+ it is not a semantic `No` selection. Modern Claude Code and Codex TUI surfaces
10
+ also ask ordinary questions with choices, optional free-form input, multiple
11
+ steps, and a final confirmation. Treating every such surface as approval would
12
+ conflate permission authority with task input and would make safe replay and
13
+ auditing impossible.
14
+
15
+ This design therefore keeps two boundaries:
16
+
17
+ - **Permission decision**: a closed adapter-owned decision such as
18
+ `approve_once` or `reject`. Persistent authorization choices are never
19
+ offered. The caller never supplies terminal keys, menu indexes, or labels.
20
+ - **Questionnaire response**: a versioned public projection containing opaque
21
+ question and option ids, plus typed answers. The terminal key plan and all
22
+ mutation authority remain owner-private.
23
+
24
+ ## Public model-facing contract
25
+
26
+ AKK projects one currently visible interaction:
27
+
28
+ ```json
29
+ {
30
+ "schema": "agent-knock-knock/terminal-interaction",
31
+ "version": 1,
32
+ "interaction_id": "opaque-id",
33
+ "turn_id": "turn-...",
34
+ "agent": "claude",
35
+ "kind": "questionnaire",
36
+ "state": "pending",
37
+ "step": { "index": 1, "total": 2 },
38
+ "questions": [
39
+ {
40
+ "question_id": "opaque-question-id",
41
+ "header": "Color",
42
+ "prompt": "Which color do you prefer?",
43
+ "required": true,
44
+ "response_kind": "single_select",
45
+ "options": [
46
+ { "option_id": "opaque-red-id", "label": "Red" },
47
+ { "option_id": "opaque-blue-id", "label": "Blue" }
48
+ ]
49
+ }
50
+ ],
51
+ "capabilities": {
52
+ "batch_response": false,
53
+ "free_text": false,
54
+ "multi_select": false
55
+ }
56
+ }
57
+ ```
58
+
59
+ The corresponding mutation accepts only the advertised semantic ids and typed
60
+ answer shape:
61
+
62
+ ```json
63
+ {
64
+ "interaction_id": "opaque-id",
65
+ "turn_id": "turn-...",
66
+ "answers": [
67
+ {
68
+ "question_id": "opaque-question-id",
69
+ "response_kind": "single_select",
70
+ "selected_option_ids": ["opaque-blue-id"]
71
+ }
72
+ ]
73
+ }
74
+ ```
75
+
76
+ The OpenClaw tool should be named
77
+ `agent_knock_knock_respond_interaction`. It is deliberately separate from
78
+ ordinary `respond({turn_id, request})`, which injects a new composer message,
79
+ and from `approve({turn_id, decision})`, which resolves a permission prompt.
80
+
81
+ The public implementation is step-oriented: one response call resolves only
82
+ the currently projected step. The managed monitor recaptures the next native
83
+ question, publishes a new `interaction_id`, and emits a new
84
+ `interaction_required` callback for each supported actionable step. This makes
85
+ multi-question and final-confirm flows explicit and avoids a blind batch of
86
+ terminal input.
87
+
88
+ The callback is a durable wake-up signal, not response authority. It contains
89
+ only the public interaction projection and never the private prompt
90
+ fingerprint or key plan. The owning OpenClaw conversation must call Status for
91
+ the exact `turn_id`; displaying that fresh result creates the short-lived,
92
+ conversation-bound private offer required by `respond_interaction`. A delayed
93
+ or replayed callback therefore cannot authorize input by itself.
94
+
95
+ ## Private authority
96
+
97
+ The Store may retain a private authority record binding all of the following:
98
+
99
+ - exact Turn and owning OpenClaw session;
100
+ - terminal endpoint, process incarnation, native thread, and binding
101
+ generation;
102
+ - transcript/rollout source identity and bounded observation point when
103
+ available;
104
+ - an exact unredacted prompt-region fingerprint;
105
+ - the current native step and the adapter-owned semantic-id-to-input plan;
106
+ - expiry, reservation, last proven stage, and uncertain-outcome state.
107
+
108
+ None of those mutation fields are copied into the public projection. Labels
109
+ and redacted excerpts are presentation only and never mutation authority.
110
+
111
+ ## Recognition and dispatch
112
+
113
+ Every supported surface has a closed adapter/version profile. Detection must
114
+ isolate one bottom-most complete prompt, prove its footer and frame, reject
115
+ duplicate/out-of-order choices, and produce a digest before redaction.
116
+
117
+ For each response AKK:
118
+
119
+ 1. acquires terminal, Store-writer, and Turn-state locks in canonical order;
120
+ 2. revalidates owner, Turn status, binding generation, process/native identity,
121
+ and the current private interaction offer; an elapsed displayed expiry
122
+ forces this live revalidation but does not claim the native prompt died;
123
+ 3. recaptures the screen and requires the same exact prompt fingerprint;
124
+ 4. resolves opaque semantic ids to an adapter-owned input plan;
125
+ 5. reserves the response durably before possible terminal input;
126
+ 6. dispatches one bounded native step;
127
+ 7. records an audit receipt without raw answer content and resumes the monitor;
128
+ and
129
+ 8. resumes the managed monitor, which recaptures the next native state, rotates
130
+ the interaction id when the exact prompt changes, and emits the next
131
+ supported-step callback. Status can always refresh the same projection
132
+ explicitly.
133
+
134
+ If a failure occurs before terminal input, the response is safely rejected.
135
+ If input may have occurred, the Turn becomes `response_uncertain`; AKK sends no
136
+ automatic retry. Unknown versions, secret-input questions, ambiguous screens,
137
+ unsupported option counts, changed prompts, or unprovable postconditions are
138
+ `manual_required` and send zero input.
139
+
140
+ ## Native behavior profiles
141
+
142
+ ### Claude Code 2.1.263, 2.1.266, and 2.1.267
143
+
144
+ Claude Code 2.1.263 was observed locally in an isolated tmux session; the
145
+ versioned profiles retain this exact behavior contract:
146
+
147
+ - single-select: digit selects and advances/submits;
148
+ - multi-select: digits toggle checkboxes, then `Tab` advances to review;
149
+ - Other/free text: select `Type something`, enter a single-line response below
150
+ Claude's 800-character paste-collapse threshold, then Enter;
151
+ - multi-question: a tab header shows checked/unanswered sections;
152
+ - final review: `Submit answers` / `Cancel` is a distinct confirmation step;
153
+ - Bash permission prompt: the exact four-row form has one-time Yes as the
154
+ current row and `4. No`; `Escape` cancels the dialog and is not modeled as
155
+ semantic reject.
156
+
157
+ The installed 2.1.266 binary and Anthropic's official 2.1.267 Darwin arm64
158
+ artifact retain the same bounded questionnaire, collapsed-paste, and Status
159
+ anchors. Each version has a distinct interaction profile so a durable offer
160
+ cannot cross a client-version change. Claude Code 2.1.261 also introduced an
161
+ optional `Organization policy` Status row when managed policy loading fails;
162
+ the 2.1.263/2.1.266/2.1.267 profiles allow that exact field and redact its
163
+ value.
164
+
165
+ The initial public implementation executes exact single-select rows (including the transition into
166
+ `Type something`), the recaptured single-line custom-text editor, and the
167
+ separate final Submit/Cancel review. Custom text is capped at 799 characters;
168
+ larger answers fail before dispatch reservation until the editor gains the
169
+ same collapsed-paste proof as managed Send. It detects multi-select screens
170
+ but keeps them `manual_required`: safely toggling several checkboxes requires
171
+ a recapture after every toggle and is intentionally deferred. `Tab to amend`,
172
+ persistent Yes, auto mode, resized/wrapped variants, and any changed menu shape
173
+ also remain manual.
174
+
175
+ ### Codex 0.153.4, 0.154.0, and 0.155.1
176
+
177
+ The installed client matches the current official TUI protocol:
178
+
179
+ - `RequestUserInput` contains 1-3 questions with 2-3 options and automatic
180
+ Other;
181
+ - numeric selection advances an ordinary choice question, but would bypass
182
+ Notes and submit the literal label for the native Other row;
183
+ - the client-generated `None of the above` row is Codex's canonical Notes
184
+ carrier; when the model did not supply a `Type something.` alias, AKK derives
185
+ that separate semantic free-text choice beside the proven native row;
186
+ - choosing the guarded or derived free-text choice moves to native Other with
187
+ bounded cursor movement and invokes Codex's native Accept action, which
188
+ opens Notes without submitting a literal label; choosing native Other itself
189
+ retains its distinct numeric direct-submit behavior;
190
+ - the recaptured empty `Add notes` composer becomes a separate free-text
191
+ interaction step;
192
+ - Codex submits that text as `user_note: ...` alongside `None of the above`;
193
+ it does not expose a Claude-style bare custom-answer value;
194
+ - semantic free-text dispatch crosses the verified 121ms paste-suppression
195
+ window before its sole Enter;
196
+ - the exact multi-question free-form footer is handled one current step at a
197
+ time;
198
+ - unanswered-question confirmation is its own `Proceed` / `Go back` step.
199
+
200
+ Codex does not currently expose a native multi-select question in this
201
+ protocol. Any future or unrecognized shape remains manual until a new profile
202
+ and tests are added.
203
+
204
+ Codex 0.154.0 and 0.155.1 preserve those blocking `request_user_input` frames
205
+ under separate version-bound profiles. Codex 0.154.0 also adds
206
+ `request_user_input_async`; unlike a blocking `questionnaire`, its question is
207
+ projected as `kind="async_question"` while the agent Turn remains `working`.
208
+ The projection advertises semantic `delivery_modes`. A typed response defaults
209
+ to advertised `steer_current_turn` or explicitly selects advertised `queue_next_turn`: `steer_current_turn` delivers the answer to
210
+ the running turn, while `queue_next_turn` queues it for the next turn. Blocking
211
+ questionnaires do not advertise and must reject that field.
212
+
213
+ For async questions, the advertised native Other option opens a separate
214
+ `free_text` step; it is not the blocking questionnaire's Notes workflow.
215
+ An answer queued for the next turn uses the same exact question editor and
216
+ must verify the injected answer before the final submit/queue key. If that
217
+ editor closes or changes, input stops with an uncertain result and no retry.
218
+
219
+ Collapsed async countdown redraws are not question changes: dispatch compares
220
+ the independently parsed question, pending count, opening binding, subject and
221
+ terminal identity, while retaining the rendered digest for evidence. A different
222
+ question, count, input mode or binding still rejects before input.
223
+
224
+ For managed user Send on profiled Codex 0.154.0/0.155.1 using Astra, animated
225
+ empty Composer proof requires the full dim placeholder, styled marker and shared painted
226
+ background, only the known decorated cells, and a complete supported footer.
227
+ Activity, approval and input-owner checks run first. This proof does not grant
228
+ native lifecycle or model-control authority. After the managed pre-text proof,
229
+ user-explicit Send retains its one-paste/one-Enter contract without a post-text
230
+ Composer veto.
231
+
232
+ AKK still treats input ownership independently: an exact collapsed question
233
+ summary leaves the main Composer sendable, while an expanded, clipped, or
234
+ ambiguous async editor is a zero-input boundary so an explicit task cannot
235
+ become a question answer. Response execution uses only semantic question and
236
+ option identities; raw shortcut keys and menu indexes never cross the public
237
+ contract. Codex 0.154.0 and 0.155.1 rely on exact version-bound TUI and durable
238
+ task evidence. Notification and stable-question-identity response wrappers
239
+ added on Codex main after 0.155.1 must not be assumed to exist in either
240
+ release. The 0.154/0.155 active-writer `/resume` viewer is likewise read-only
241
+ and receives no AKK terminal input.
242
+
243
+ Codex 0.155.1 can also display native user-verification prompts for MCP
244
+ requests. AKK classifies the exact prompt and waiting surfaces as blocked but
245
+ never exposes them as approvable: completing platform user verification
246
+ requires direct user presence and is outside terminal approval automation.
247
+
248
+ ## Delivery stages
249
+
250
+ 1. **Permission parity (implemented)**: expose `reject` only when an
251
+ adapter proves an exact safe native reject action; retain `approve_once`
252
+ compatibility.
253
+ 2. **Read-only projection (implemented)**: detect and report supported
254
+ questionnaire steps while changed or unsupported shapes remain manual.
255
+ 3. **Initial public response contract (implemented)**: enable one current
256
+ single-select, free-text, or confirmation step with pre-input fencing,
257
+ durable one-shot reservation, and uncertain-result audit.
258
+ 4. **Managed interaction callback (implemented)**: durably notify the owning
259
+ controller about each actionable current step, require a fresh Status call
260
+ before response, permanently fence a consumed prompt fingerprint from
261
+ replay, and notify the next distinct questionnaire step independently.
262
+ 5. **Expanded native coverage (not implemented)**: multi-select (tracked in
263
+ [#292](https://github.com/scotthuang/agent-knock-knock/issues/292)),
264
+ arbitrary per-option Notes, broader navigation, and more version profiles
265
+ only with captured fixtures and live regression evidence.
266
+ 6. **Host-native UX**: OpenClaw may render the projection using a future public
267
+ session-bound `requestUserInput` API. Until then, the structured AKK tool is
268
+ the authority boundary; a plugin must not use private Gateway methods.
269
+
270
+ ## Non-goals
271
+
272
+ - no raw tmux keys, numeric menu indexes, or arbitrary labels in public tools;
273
+ - no automatic permission decisions or persistent authorization grants;
274
+ - no secret/password response relay;
275
+ - no blind retry after possible input;
276
+ - no attempt to emulate an arbitrary terminal UI.