@staix/agent-hub 0.50.0 → 0.52.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 (350) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/README.md +1 -1
  3. package/docs/adding-an-ai-tool.md +26 -4
  4. package/docs/agent-notes/README.md +1 -0
  5. package/docs/agent-notes/adapters.md +4 -3
  6. package/docs/agent-notes/budget.md +8 -2
  7. package/docs/agent-notes/daemon.md +13 -8
  8. package/docs/agent-notes/local-worker.md +3 -3
  9. package/docs/agent-notes/security-review.md +6 -5
  10. package/docs/agent-notes/tasks.md +10 -3
  11. package/docs/agent-notes/tests.md +4 -3
  12. package/docs/cooperbench.md +1 -1
  13. package/docs/design/adapters.md +21 -0
  14. package/docs/design/cli-output-inventory.md +165 -150
  15. package/docs/design/cli-output.md +4 -3
  16. package/docs/design/guidance-probes.md +1 -0
  17. package/docs/design/roadmap.md +3 -1
  18. package/docs/design/task-board.md +35 -0
  19. package/docs/dogfood.md +21 -3
  20. package/docs/events.md +4 -2
  21. package/docs/memory.md +5 -3
  22. package/docs/operations.md +259 -19
  23. package/docs/quickstart.md +29 -2
  24. package/docs/roadmap.json +20 -20
  25. package/docs/roadmap.md +2 -2
  26. package/docs/roles.md +1 -1
  27. package/docs/sdlc.md +29 -5
  28. package/docs/security.md +11 -5
  29. package/docs/specs/2026-09-19-agent-hub-design.md +44 -0
  30. package/docs/specs/2026-09-19-multi-project-design.md +4 -0
  31. package/docs/specs/2026-09-20-upgrade-recovery-design.md +17 -0
  32. package/docs/specs/mcp-endpoint.md +63 -0
  33. package/docs/verification/2026-11-29-agy-1.5.20.md +33 -0
  34. package/docs/verification/2026-11-29-claude-profile-hook.md +12 -0
  35. package/docs/verification/2026-11-29-idle-daemon-footprint.md +75 -0
  36. package/docs/verification/2026-11-29-kimi-281-reviewer-compat.md +38 -0
  37. package/docs/verification/2026-11-29-kimi-tui-281.md +12 -0
  38. package/docs/verification/2026-11-30-0.51.0.md +91 -0
  39. package/docs/verification/2026-11-30-account-switch-1806.md +445 -0
  40. package/docs/verification/2026-11-30-capability-listing-shape-1808.md +45 -0
  41. package/docs/verification/2026-11-30-upgrade-keep-1807.md +174 -0
  42. package/docs/verification/2026-12-01-1811-confirmation-receipt.md +19 -0
  43. package/docs/verification/2026-12-01-1811-orca-agent-list.md +20 -0
  44. package/docs/verification/2026-12-01-1811-orca-pane-key.md +21 -0
  45. package/docs/verification/2026-12-02-1819-claude-process-after-renewal.md +54 -0
  46. package/docs/verification/2026-12-02-agy-1.5.21.md +74 -0
  47. package/docs/verification/2026-12-02-claude-implementer-2.1.334.md +44 -0
  48. package/docs/verification/2026-12-02-cli-import-graph.md +33 -0
  49. package/docs/verification/2026-12-03-0.52.0.md +150 -0
  50. package/docs/verification/2026-12-03-codex-0173-reviewer-isolation.md +53 -0
  51. package/docs/verification/2026-12-03-codex-0173-reviewer-tool-call.md +34 -0
  52. package/docs/verification/2026-12-03-jcode-1.3.0.md +25 -0
  53. package/docs/verification/agy/README.md +17 -0
  54. package/docs/verification/agy/cli-surface.ts +68 -0
  55. package/docs/verification/agy/interactive-bridge.ts +92 -0
  56. package/docs/verification/agy/interactive-session.ts +131 -0
  57. package/docs/verification/agy/launcher-nonce.ts +215 -0
  58. package/docs/verification/agy/native-hooks.ts +210 -0
  59. package/docs/verification/agy/originals/agent-hub-681/cli-surface.ts +87 -0
  60. package/docs/verification/agy/originals/agent-hub-681/native-hooks-adapted.ts +91 -0
  61. package/docs/verification/agy/originals/agent-hub-681/tui-actual.ts +200 -0
  62. package/docs/verification/agy/originals/agent-hub-684/probe.ts +107 -0
  63. package/docs/verification/agy/originals.json +25 -0
  64. package/docs/verification/agy/permission-new-functions.ts +128 -0
  65. package/docs/verification/agy/run-probe.py +108 -0
  66. package/docs/verification/agy/runtime.ts +171 -0
  67. package/docs/verification/agy/tmux-helper-control.ts +6 -0
  68. package/docs/verification/agy/tmux-session.ts +235 -0
  69. package/docs/verified.json +87 -42
  70. package/package.json +3 -3
  71. package/plugins/agent-hub/.claude-plugin/plugin.json +1 -1
  72. package/plugins/agent-hub/compat.json +157 -0
  73. package/plugins/agent-hub/kimi-hook.js +1416 -24985
  74. package/plugins/agent-hub/server.js +17415 -32755
  75. package/scripts/check-docs.mjs +1 -1
  76. package/src/adapters/acp.ts +13 -13
  77. package/src/adapters/agy/definition.ts +9 -26
  78. package/src/adapters/agy/entry.ts +2 -0
  79. package/src/adapters/channel-peer.ts +3 -1
  80. package/src/adapters/claude-channel-evidence.ts +7 -3
  81. package/src/adapters/claude-channel.ts +38 -257
  82. package/src/adapters/claude-implementer.ts +3 -1
  83. package/src/adapters/codex-appserver.ts +77 -15
  84. package/src/adapters/compat.ts +78 -14
  85. package/src/adapters/configured-acp.ts +23 -163
  86. package/src/adapters/configured-adapter-policy.ts +160 -0
  87. package/src/adapters/configured-pull-entry.ts +53 -0
  88. package/src/adapters/configured-pull.ts +38 -0
  89. package/src/adapters/conformance/fakes/app-server.ts +9 -2
  90. package/src/adapters/declaration-catalog.ts +25 -0
  91. package/src/adapters/declaration-data.ts +342 -0
  92. package/src/adapters/declaration-resolution.ts +53 -0
  93. package/src/adapters/definitions/builtin-metadata.ts +62 -84
  94. package/src/adapters/definitions/jcode-launch.ts +13 -0
  95. package/src/adapters/definitions/native-adapter-policy.ts +390 -0
  96. package/src/adapters/definitions/native-cli-claude-launch.ts +6 -3
  97. package/src/adapters/definitions/native-cli-codex-launch.ts +2 -1
  98. package/src/adapters/definitions/native-cli-entry-claude.ts +17 -2
  99. package/src/adapters/definitions/native-cli-entry-codex.ts +2 -0
  100. package/src/adapters/definitions/native-cli-entry-jcode.ts +6 -2
  101. package/src/adapters/definitions/native-cli-entry-kimi.ts +2 -0
  102. package/src/adapters/definitions/native-cli-entry-pi.ts +2 -0
  103. package/src/adapters/definitions/native-cli-entry-qwen.ts +2 -0
  104. package/src/adapters/definitions/native-cli-entry-types.ts +12 -3
  105. package/src/adapters/definitions/native-cli-jcode-home-init.ts +1 -1
  106. package/src/adapters/definitions/native-cli-launch-common.ts +2 -2
  107. package/src/adapters/definitions/native-cli-preview-common.ts +1 -1
  108. package/src/adapters/definitions/native-cli-retained.ts +1 -1
  109. package/src/adapters/definitions/native-config-defaults.ts +1 -1
  110. package/src/adapters/definitions/native-configuration.ts +18 -0
  111. package/src/adapters/definitions/native-help.ts +24 -0
  112. package/src/adapters/definitions/native-launch-declarations.ts +34 -0
  113. package/src/adapters/definitions/native-launch-policy.ts +4 -0
  114. package/src/adapters/definitions/native-launch-settings.ts +72 -0
  115. package/src/adapters/definitions/native-light-cli.ts +18 -0
  116. package/src/adapters/definitions/native-light-preview.ts +10 -0
  117. package/src/adapters/definitions/native-wrapper-launch.ts +10 -0
  118. package/src/adapters/definitions/qwen.ts +6 -29
  119. package/src/adapters/definitions/reviewer-variants.ts +7 -8
  120. package/src/adapters/external-declarations.ts +31 -0
  121. package/src/adapters/external-modules.ts +4 -29
  122. package/src/adapters/jcode.ts +19 -12
  123. package/src/adapters/native-capabilities.ts +18 -8
  124. package/src/adapters/native-facts-hooks.ts +12 -0
  125. package/src/adapters/native-proof-ports.ts +1 -1
  126. package/src/adapters/presets.ts +136 -0
  127. package/src/adapters/qwen-dual.ts +2 -2
  128. package/src/adapters/registry-types.ts +3 -0
  129. package/src/adapters/registry.ts +20 -81
  130. package/src/adapters/reviewer-print.ts +26 -9
  131. package/src/adapters/role-eligibility.ts +2 -1
  132. package/src/cli/accounts-import.ts +72 -0
  133. package/src/cli/agents-latest-table.ts +88 -0
  134. package/src/cli/agents-latest.ts +22 -0
  135. package/src/cli/agents-output.ts +10 -0
  136. package/src/cli/agents-presets.ts +100 -0
  137. package/src/cli/agents.ts +1 -1
  138. package/src/cli/attention.ts +3 -2
  139. package/src/cli/autonomy-homes.ts +7 -2
  140. package/src/cli/autonomy-offline.ts +1 -1
  141. package/src/cli/bench.ts +1 -1
  142. package/src/cli/budget-renew-guidance.ts +129 -0
  143. package/src/cli/claude-homes.ts +9 -5
  144. package/src/cli/claude-profile-hook.ts +31 -11
  145. package/src/cli/command-context.ts +3 -0
  146. package/src/cli/command-table.ts +123 -0
  147. package/src/cli/commands/accounts.ts +8 -0
  148. package/src/cli/commands/agents.ts +18 -0
  149. package/src/cli/commands/answer.ts +28 -0
  150. package/src/cli/commands/ask.ts +17 -0
  151. package/src/cli/commands/autonomy.ts +83 -0
  152. package/src/cli/commands/backlog.ts +46 -0
  153. package/src/cli/commands/bench.ts +60 -0
  154. package/src/cli/commands/board.ts +48 -0
  155. package/src/cli/commands/broker.ts +9 -0
  156. package/src/cli/commands/budget.ts +96 -0
  157. package/src/cli/commands/capabilities.ts +12 -0
  158. package/src/cli/commands/check-path.ts +55 -0
  159. package/src/cli/commands/completion.ts +8 -0
  160. package/src/cli/commands/console.ts +12 -0
  161. package/src/cli/commands/daemon.ts +8 -0
  162. package/src/cli/commands/deliverables.ts +25 -0
  163. package/src/cli/commands/doctor.ts +249 -0
  164. package/src/cli/commands/down.ts +3 -0
  165. package/src/cli/commands/export.ts +15 -0
  166. package/src/cli/commands/facts.ts +15 -0
  167. package/src/cli/commands/goal.ts +22 -0
  168. package/src/cli/commands/guidance.ts +102 -0
  169. package/src/cli/commands/help.ts +17 -0
  170. package/src/cli/commands/host.ts +45 -0
  171. package/src/cli/commands/init.ts +121 -0
  172. package/src/cli/commands/instructed.ts +19 -0
  173. package/src/cli/commands/instruction-hook.ts +15 -0
  174. package/src/cli/commands/intake.ts +24 -0
  175. package/src/cli/commands/kill.ts +15 -0
  176. package/src/cli/commands/learn.ts +23 -0
  177. package/src/cli/commands/lineage.ts +30 -0
  178. package/src/cli/commands/logs.ts +21 -0
  179. package/src/cli/commands/manager.ts +15 -0
  180. package/src/cli/commands/memory.ts +21 -0
  181. package/src/cli/commands/model.ts +25 -0
  182. package/src/cli/commands/models.ts +40 -0
  183. package/src/cli/commands/native.ts +39 -0
  184. package/src/cli/commands/pause.ts +5 -0
  185. package/src/cli/commands/peer.ts +32 -0
  186. package/src/cli/commands/permission.ts +26 -0
  187. package/src/cli/commands/permit.ts +12 -0
  188. package/src/cli/commands/pet.ts +24 -0
  189. package/src/cli/commands/projects.ts +49 -0
  190. package/src/cli/commands/queue.ts +70 -0
  191. package/src/cli/commands/recovery-run.ts +13 -0
  192. package/src/cli/commands/recovery.ts +130 -0
  193. package/src/cli/commands/release.ts +23 -0
  194. package/src/cli/commands/releases.ts +91 -0
  195. package/src/cli/commands/remember.ts +6 -0
  196. package/src/cli/commands/report.ts +27 -0
  197. package/src/cli/commands/research.ts +53 -0
  198. package/src/cli/commands/reset.ts +89 -0
  199. package/src/cli/commands/restart.ts +5 -0
  200. package/src/cli/commands/results.ts +31 -0
  201. package/src/cli/commands/resume.ts +5 -0
  202. package/src/cli/commands/review.ts +24 -0
  203. package/src/cli/commands/roadmap.ts +21 -0
  204. package/src/cli/commands/role.ts +34 -0
  205. package/src/cli/commands/roles.ts +30 -0
  206. package/src/cli/commands/room.ts +14 -0
  207. package/src/cli/commands/roster.ts +48 -0
  208. package/src/cli/commands/route.ts +9 -0
  209. package/src/cli/commands/say.ts +21 -0
  210. package/src/cli/commands/schedule.ts +17 -0
  211. package/src/cli/commands/sdlc.ts +321 -0
  212. package/src/cli/commands/settings.ts +148 -0
  213. package/src/cli/commands/setup.ts +89 -0
  214. package/src/cli/commands/shared-refusals.ts +25 -0
  215. package/src/cli/commands/smoke.ts +44 -0
  216. package/src/cli/commands/source.ts +64 -0
  217. package/src/cli/commands/specs.ts +13 -0
  218. package/src/cli/commands/status.ts +28 -0
  219. package/src/cli/commands/stop.ts +17 -0
  220. package/src/cli/commands/structure.ts +60 -0
  221. package/src/cli/commands/study.ts +39 -0
  222. package/src/cli/commands/tail.ts +19 -0
  223. package/src/cli/commands/task.ts +114 -0
  224. package/src/cli/commands/title.ts +17 -0
  225. package/src/cli/commands/turns.ts +10 -0
  226. package/src/cli/commands/ui.ts +47 -0
  227. package/src/cli/commands/undo.ts +77 -0
  228. package/src/cli/commands/up.ts +39 -0
  229. package/src/cli/commands/upgrade.ts +5 -0
  230. package/src/cli/commands/usage.ts +33 -0
  231. package/src/cli/commands/version.ts +5 -0
  232. package/src/cli/commands/watch.ts +30 -0
  233. package/src/cli/commands/worktrees.ts +31 -0
  234. package/src/cli/conductor-recovery.ts +1 -1
  235. package/src/cli/console-state.ts +5 -138
  236. package/src/cli/console-versions.ts +1 -1
  237. package/src/cli/facts-hook.ts +11 -4
  238. package/src/cli/help.ts +44 -20
  239. package/src/cli/identity.ts +27 -4
  240. package/src/cli/init-prompt.ts +1 -1
  241. package/src/cli/init-settings.ts +4 -35
  242. package/src/cli/init.ts +1 -1
  243. package/src/cli/json-text-spans.ts +57 -0
  244. package/src/cli/launch-check.ts +156 -0
  245. package/src/cli/launch.ts +19 -70
  246. package/src/cli/light-dispatch.ts +29 -0
  247. package/src/cli/main.js +8 -1
  248. package/src/cli/main.ts +257 -2799
  249. package/src/cli/memory.ts +1 -1
  250. package/src/cli/orca-probe.ts +119 -0
  251. package/src/cli/output.ts +45 -3
  252. package/src/cli/preview.ts +11 -6
  253. package/src/cli/recovery-launch.ts +1 -1
  254. package/src/cli/recovery-version-preflight.ts +28 -9
  255. package/src/cli/replace-process.ts +22 -0
  256. package/src/cli/report-layout.ts +142 -0
  257. package/src/cli/roadmap-usage.ts +16 -0
  258. package/src/cli/roadmap.ts +3 -16
  259. package/src/cli/sdlc-doctor.ts +27 -0
  260. package/src/cli/sdlc-output.ts +55 -1
  261. package/src/cli/setup-homes.ts +2 -2
  262. package/src/cli/start-agents-run.ts +85 -7
  263. package/src/cli/start-check.ts +28 -0
  264. package/src/cli/statusline-tee.ts +25 -4
  265. package/src/cli/terminal-recovery.ts +53 -10
  266. package/src/cli/upgrade-interactive.ts +1 -0
  267. package/src/cli/upgrade-runtime.ts +12 -1
  268. package/src/cli/upgrade.ts +4 -15
  269. package/src/cli/warn-line.ts +1 -1
  270. package/src/hub/accounts.ts +148 -0
  271. package/src/hub/addons.ts +20 -0
  272. package/src/hub/agent-drift.ts +2 -1
  273. package/src/hub/budget-projection.ts +39 -7
  274. package/src/hub/budget.ts +231 -16
  275. package/src/hub/channel-project.ts +3 -3
  276. package/src/hub/ci-watch.ts +311 -79
  277. package/src/hub/conductor-peer.ts +24 -0
  278. package/src/hub/conductor.ts +2 -21
  279. package/src/hub/config-apply.ts +25 -14
  280. package/src/hub/config-edit.ts +1 -1
  281. package/src/hub/config-tier.ts +2 -0
  282. package/src/hub/config.ts +535 -0
  283. package/src/hub/control-client.ts +49 -1
  284. package/src/hub/daemon.ts +492 -569
  285. package/src/hub/delivery-public.ts +11 -0
  286. package/src/hub/events.ts +3 -0
  287. package/src/hub/home-tag.ts +12 -0
  288. package/src/hub/host.ts +217 -0
  289. package/src/hub/hub-check.ts +125 -0
  290. package/src/hub/hub-tools.ts +2 -1
  291. package/src/hub/instance-budget.ts +2 -2
  292. package/src/hub/instance-config.ts +15 -126
  293. package/src/hub/instances.ts +22 -6
  294. package/src/hub/instruction-receipt.ts +2 -2
  295. package/src/hub/kimi-usage.ts +38 -11
  296. package/src/hub/lifecycle.ts +86 -4
  297. package/src/hub/mcp-bridge-core.ts +98 -0
  298. package/src/hub/mcp-channel-push.ts +20 -0
  299. package/src/hub/mcp-endpoint-serve.ts +178 -0
  300. package/src/hub/mcp-endpoint.ts +226 -0
  301. package/src/hub/mcp-tool-call.ts +181 -0
  302. package/src/hub/operational-settings.ts +2 -0
  303. package/src/hub/orca-env.ts +6 -0
  304. package/src/hub/orca-state.ts +84 -0
  305. package/src/hub/path-policy.ts +1 -1
  306. package/src/hub/peers.ts +5 -1
  307. package/src/hub/permission-mode.ts +5 -41
  308. package/src/hub/permission-paths.ts +41 -0
  309. package/src/hub/project.ts +20 -0
  310. package/src/hub/protocol-window.ts +58 -0
  311. package/src/hub/quota-origin.ts +20 -0
  312. package/src/hub/recovery-policy.ts +1 -1
  313. package/src/hub/registry.ts +36 -2
  314. package/src/hub/releases-inventory.ts +198 -0
  315. package/src/hub/report.ts +1 -1
  316. package/src/hub/research.ts +1 -1
  317. package/src/hub/review-brief.ts +47 -2
  318. package/src/hub/roster.ts +6 -3
  319. package/src/hub/routing.ts +9 -2
  320. package/src/hub/runtime-capture-prune.ts +25 -3
  321. package/src/hub/runtime-prune-health.ts +8 -1
  322. package/src/hub/sdlc-check.ts +205 -0
  323. package/src/hub/sdlc-release-authorization.ts +42 -21
  324. package/src/hub/sdlc-release-diagnostics.ts +5 -0
  325. package/src/hub/sdlc-release-policy.ts +21 -7
  326. package/src/hub/sdlc-release.ts +80 -20
  327. package/src/hub/sdlc-sync.ts +146 -0
  328. package/src/hub/sdlc.ts +38 -5
  329. package/src/hub/settings.ts +7 -4
  330. package/src/hub/start-agents.ts +1 -1
  331. package/src/hub/start-mode.ts +11 -4
  332. package/src/hub/structure-budget.ts +131 -0
  333. package/src/hub/structure-scan.ts +149 -0
  334. package/src/hub/tasks-experiment.ts +455 -0
  335. package/src/hub/tasks-guidance.ts +606 -0
  336. package/src/hub/tasks-roadmap-plan.ts +419 -0
  337. package/src/hub/tasks-roadmap.ts +491 -0
  338. package/src/hub/tasks-study.ts +661 -0
  339. package/src/hub/tasks-survey.ts +192 -0
  340. package/src/hub/tasks.ts +457 -2584
  341. package/src/hub/terminal-open.ts +5 -3
  342. package/src/hub/tooling.ts +3 -19
  343. package/src/hub/usage-rollup.ts +9 -3
  344. package/src/local/tools.ts +5 -0
  345. package/src/ui/index.html +1 -1
  346. package/src/ui/needs.ts +17 -5
  347. package/src/ui/peer-palette.ts +2 -4
  348. package/src/ui/plugin.ts +1 -1
  349. package/templates/presets/agents.json +60 -0
  350. package/templates/presets/confirmation-matrix.json +8 -8
@@ -0,0 +1,150 @@
1
+ # 0.52.0 release verification
2
+
3
+ This record covers release preparation and source review. It claims no installation, no running-hub upgrade to 0.52.0 and no live TUI launch.
4
+
5
+ ## Candidate
6
+
7
+ Version 0.52.0, prepared from main 6cf1def10 (75 commits since v0.51.0, 25 of them `feat`; bump rule: minor). The release commits carry the version, the CHANGELOG section, the bundle and the documentation stamps.
8
+
9
+ ## Reviews
10
+
11
+ Pull requests named by the commits since v0.51.0: #1899, #1897, #1896, #1892, #1893, #1894, #1895, #1891, #1890, #1889, #1888, #1887, #1886, #1882, #1884, #1885, #1883, #1881, #1880, #1871, #1878, #1877, #1876, #1873, #1870, #1869, #1868, #1867, #1863, #1866, #1865, #1862, #1864, #1861, #1860, #1859, #1858, #1857, #1854, #1855, #1853, #1851, #1852, #1845, #1848, #1847, #1812, #1846, #1843, #1842, #1841, #1840, #1839, #1838, #1837, #1835, #1836, #1832, #1834, #1833, #1828, #1831, #1825, #1824, #1821, #1827, #1826, #1822, #1820, #1817, #1818.
12
+
13
+ Each of the 71 merged after `check (ubuntu-latest)`, `check (macos-latest)` and `seeded guards` passed in full CI at its merged head; every run below finished before its merge, and none reused an earlier tree's gate. 70 merged after a Claude hub review approved the task. #1852 had no hub review (below). On a draft-first PR, the draft run's deliberate `check (macos-latest)` failure ("macOS deferred") is still visible beside the full run.
14
+
15
+ Five merges are bound to an approval at an earlier head. In each, the approved and merged heads carry the same patch outside `CHANGELOG.md` (`git patch-id --stable` of each PR's own commits, CHANGELOG excluded); the later head only resolved a CHANGELOG conflict or dropped the stacked base that had merged first:
16
+ - #1858 (approved 0eaf53406), #1860 (approved e58c1d453) and #1896 (approved c87ab9350): CHANGELOG conflict rebase.
17
+ - #1863 (approved 4d03bbdec) and #1890 (approved 374dcaf6c): rebased off their merged stack base (#1862 and #1888), plus the CHANGELOG conflict.
18
+
19
+ #1852 is the docs-only receipt of the person's own #1807 rows 2 and 3 run (hub task 1254, a person task, cancelled after the run). Claude wrote it from the person's run and merged it after full CI at its head, without a hub or AREV review. It adds no code.
20
+
21
+ | PR | Work | Hub task, owner | Merged head | Full CI run (attempts) |
22
+ | --- | --- | --- | --- | --- |
23
+ | #1812 | #1807 AC1 receipt, tools/call while the daemon is replaced | 1219, jcode | b1ab00b55 | 46807144283 (1) |
24
+ | #1817 | keep the conductor, task board and tooling out of the Claude channel bundle (Refs #1778) | 1211, jcode | d09f73777 | 46426091490 (2) |
25
+ | #1818 | lazily dispatch commands from a shared loader (Refs #1778) | 1190, codex | cd2948833 | 46421266237 (1) |
26
+ | #1820 | renew quota and warn before exhaustion | 1218, codex | ebc276f93 | 46500877484 (2) |
27
+ | #1821 | refresh macOS shard weights | 1235, codex | f72ba9244 | 46558550784 (1) |
28
+ | #1822 | reduce imports for light entries | 1191, codex | a29b9ce28 | 46523439878 (1) |
29
+ | #1824 | retain bridges and configure the protocol window | 1220, codex | 1c90aa033 | 46559328588 (1) |
30
+ | #1825 | clarify layout and help verification ownership | 1237, codex | 74d06c486 | 46561831276 (1) |
31
+ | #1826 | warm gh before hosted shard tests | 1238, codex | fca5ac310 | 46555073379 (1) |
32
+ | #1827 | watch-only codex-appserver, kimi-acp and claude-channel entries with handshake and flag-parse legs (T1-T3, Refs #1808) | 1222, jcode | 0792211ce | 46555679256 (1) |
33
+ | #1828 | refresh macOS shard weights | 1239, codex | 5176afcaa | 46572332714 (2) |
34
+ | #1831 | separate native policy data from drivers | 1231, codex | 138a27b97 | 46573938701 (1) |
35
+ | #1832 | watch the Orca CLI in doctor and the upgrade preflight, publish compat.json and add ahub agents --latest (T4, T5, Refs #1808) | 1223, jcode | e89633626 | 46634023509 (1) |
36
+ | #1833 | run macOS checks on five shards (Refs #1257) | 1240, codex | acaef4718 | 46596731073 (1) |
37
+ | #1834 | add project structure budget checks (Refs #1829) | 1241, codex | 49f745fd2 | 46612534066 (2) |
38
+ | #1835 | #1811 T1+T3, pane-keyed launch record and opener for instance worktrees | 1228, jcode | c74dfe4a6 | 46658243310 (2) |
39
+ | #1836 | refresh macOS shard weights from the five-shard run (Refs #1257) | 1242, jcode | f5310cd31 | 46658871095 (1) |
40
+ | #1837 | name the recovery step for a corrupt renewal marker, list the quota ports in the adapters spec | 1234, jcode | 07378072b | 46661271230 (2) |
41
+ | #1838 | #1811 T2, blocked-pane Attention item from a bounded orca agent list read | 1229, jcode | 11951ad7e | 46672170970 (1) |
42
+ | #1839 | agent presets and agents add | 1224, jcode | e710f9d62 | 46688763192 (1) |
43
+ | #1840 | configured pull kind, launcher and registration check | 1225, jcode | 10ae86fef | 46715379163 (1) |
44
+ | #1841 | defer native wrapper entry loading (Refs #1778) | 1232, codex | fdcc81ed9 | 46729511833 (1) |
45
+ | #1842 | declared accounts, label routing and per-label budget (#1810 T1-T3) | 1226, jcode | ac09b8026 | 46750351805 (1) |
46
+ | #1843 | ahub accounts import --from orca and confirmation receipt (#1811 T4+T6) | 1230, jcode | d9575d603 | 46783783228 (1) |
47
+ | #1845 | add plan and review notices (Refs #1829) | 1243, codex | 4bdec9a61 | 46821470017 (2) |
48
+ | #1846 | instance accounts, setup homes and cross-account handoff (#1810 T4-T6) | 1227, jcode | 58c41f059 | 46799724347 (3) |
49
+ | #1847 | hold project-config keys the installed release does not know until the release PR | 1244, jcode | 6e5fadeb2 | 46809511662 (1) |
50
+ | #1848 | receipt for process start after quota renewal | 1233, jcode | a7c980161 | 46819059653 (1) |
51
+ | #1851 | explicit project context through startDaemon (#1779 T2) | 1202, jcode | df2591b33 | 46837291161 (1) |
52
+ | #1852 | #1807 rows 2 and 3 and the two decisions (Refs #1807) | none | ecc7e53d7 | 46835064117 (1) |
53
+ | #1853 | pin @staix/cli-output 0.1.5 with agent-mem 0.45.0 | 1253, jcode | cb6be6c27 | 46845420141 (2) |
54
+ | #1854 | separate declaration policy from adapter runtime (Refs #1778) | 1252, codex | 695c915e6 | 46866186360 (1) |
55
+ | #1855 | ahub host process with per-project listeners behind host.shared (#1779 T3a) | 1260, jcode | ae17ce4ea | 46859160231 (1) |
56
+ | #1857 | ahub sdlc status lists unsettled tasks by default (#1856 T1) | 1262, jcode | bf849c265 | 46867102881 (1) |
57
+ | #1858 | qualify Claude Code 2.1.334 for the headless implementer | 1266, jcode | 858dda1f8 | 46874833693 (2) |
58
+ | #1859 | verify agy 1.5.21 and move the agy producers into the repository | 1268, jcode | bb0810aec | 46882639655 (1) |
59
+ | #1860 | ahub sdlc check and doctor row (#1856 T2) | 1263, jcode | bb012996b | 46887305092 (1) |
60
+ | #1861 | keep adapter runtimes out of the channel bundle (Refs #1778) | 1192, codex | 05665743e | 46890091555 (1) |
61
+ | #1862 | ahub sdlc sync preview and apply (#1856 T3) | 1264, jcode | 9345af03d | 46897587236 (1) |
62
+ | #1863 | sync roadmap refresh and close-settled-issues (#1856 T4) | 1265, jcode | 21d104ebe | 46925135388 (1) |
63
+ | #1864 | shared until helper for byte-identical copies (#1830 S5a) | 1256, jcode | 213b10d3d | 46890666319 (1) |
64
+ | #1865 | light commands dispatch without main.ts (#1778 T7) | 1269, jcode | a1c603684 | 46898981028 (1) |
65
+ | #1866 | shared tick and git helpers for byte-identical copies (#1830 S5b) | 1257, jcode | 49bcba257 | 46922718774 (1) |
66
+ | #1867 | per-project MCP endpoint socket (T1) | 1270, jcode | 9124d9801 | 46928597014 (1) |
67
+ | #1868 | jcode wrapper replaces itself with execve (#1778 T6a) | 1274, jcode | ee99a9ac2 | 46927002312 (2) |
68
+ | #1869 | shared CLI and console rigs for byte-identical copies (#1830 S5c) | 1258, jcode | f1c6da667 | 46945378561 (1) |
69
+ | #1870 | study, synthesis and survey methods of Tasks into domain modules (#1830 S4a) | 1276, jcode | 254532ecd | 46948230818 (2) |
70
+ | #1871 | MCP endpoint T1 review findings (#1780 T2a, part 1) | 1280, jcode | 577498350 | 46987312431 (1) |
71
+ | #1873 | reuse counted until helpers without changing assertions (Refs #1830) | 1285, codex | 986856bf8 | 46955602979 (2) |
72
+ | #1876 | record Jcode 1.3.0 verification results (Refs #1872) | 1284, codex | 753dfe39a | 46974548578 (1) |
73
+ | #1877 | consolidate counted aliases and deadline waits (Refs #1830) | 1287, codex | 2cc2ba16a | 46981723443 (1) |
74
+ | #1878 | roadmap and milestone methods of Tasks into domain modules (Refs #1830) | 1277, jcode | 5d7a47a37 | 46981798056 (1) |
75
+ | #1880 | guidance and experiment methods of Tasks into domain modules (#1830 S4c) | 1278, jcode | a8ceca3c0 | 47002535987 (1) |
76
+ | #1881 | carry the 1280 review nits ahead of the endpoint session work (Refs #1780 T2a-2) | 1282, jcode | 55edff4c8 | 47006214711 (1) |
77
+ | #1882 | stabilize probe hardlink refusal (Refs #541) | 1286, codex | e4903e072 | 47019145421 (1) |
78
+ | #1883 | extract the bridge's tools/call translation into mcp-tool-call.ts (Refs #1780 T2a-2b) | 1290, jcode | c9779460d | 47018780263 (1) |
79
+ | #1884 | record Codex 0.173.0 reviewer preparation | 1294, codex | c404e4877 | 47024016555 (1) |
80
+ | #1885 | #1780 T2a-2c, the MCP endpoint serves initialize, tools/list and tools/call per session (Refs #1780) | 1291, jcode | 2f824f4a5 | 47023505579 (1) |
81
+ | #1886 | #1780 T2b, channel pushes routed to one endpoint session, receipts and the 200-entry buffer (Refs #1780) | 1281, jcode | e5c77c261 | 47036073103 (2) |
82
+ | #1887 | record Codex 0.173.0 account preflight | 1295, codex | 92dd0d7c6 | 47040366691 (1) |
83
+ | #1888 | #1830 S5f batch 1, the remaining until declarations onto test/helpers (Refs #1830) | 1288, jcode | e189f5e5e | 47052486521 (1) |
84
+ | #1889 | #1780 T2 closer, the endpoint serves the pending-count footer and re-announces a changed tool list (Refs #1780) | 1271, jcode | 22b005040 | 47069517028 (2) |
85
+ | #1890 | #1830 S5g batch 1, the 1288 carry-overs and nested until declarations (Refs #1830) | 1296, jcode | 3e49452e5 | 47071988164 (2) |
86
+ | #1891 | #1830 S5h family 1, research recovery fixtures share their prelude and draft seeding (Refs #1830) | 1297, jcode | c68442707 | 47069520554 (3) |
87
+ | #1892 | share identical top-level test helpers (refs #1830 S5i) | 1298, jcode | 4f4419156 | 47099871365 (1) |
88
+ | #1893 | attribute hub notes to writer sessions | 1289, codex | b00475bd2 | 47084688916 (3) |
89
+ | #1894 | record Codex 0.173.0 account review result | 1299, codex | 80297c6b2 | 47087538038 (2) |
90
+ | #1895 | allow headroom for the cold registry scan | 1300, codex | 78e403f03 | 47088015605 (1) |
91
+ | #1896 | report safe admission refusal reasons | 1301, codex | aab37ceb1 | 47100006098 (1) |
92
+ | #1897 | descriptive shared-fns names, mcp-endpoint and review-findings rigs onto test/helpers (#1830 S5j) | 1303, jcode | 597abe9a1 | 47107064972 (2) |
93
+ | #1899 | raise the agent-mem floor to 0.47.0 | 1302, codex | f537426c4 | 47110423566 (2) |
94
+
95
+ 21 runs passed only after same-head reruns. Their earlier attempts failed as follows:
96
+ - The `decision` job only: #1868, #1889, #1890, and #1893's attempt 1.
97
+ - One Ubuntu shard: #1845 (shard 2/6).
98
+ - One or two macOS shards: #1817, #1820 (2/4); #1828 (3/4); #1834, #1870, #1894, #1897, #1899 (2/5); #1835 (3/5); #1853 (1/5); #1858, #1886 (4/5); #1837 (3/5 and 4/5); #1873 (4/5 and 5/5); #1891 (4/5, twice); #1846 (2/5 and 4/5, then 4/5); #1893's attempt 2 (1/5).
99
+ The macOS failures whose logs were read during review were the known flakes #733 (AC2 handoff) and #1281 (AC2 and AC4 in `daemon-kimi-delayed-usage`). The other failed attempts were rerun without reading their logs, so their causes are unconfirmed.
100
+
101
+ ## Native acceptance receipts
102
+
103
+ Receipts added under `docs/verification/` since v0.51.0: `docs/verification/2026-11-30-capability-listing-shape-1808.md`, `docs/verification/2026-11-30-upgrade-keep-1807.md`, `docs/verification/2026-12-01-1811-confirmation-receipt.md`, `docs/verification/2026-12-01-1811-orca-agent-list.md`, `docs/verification/2026-12-01-1811-orca-pane-key.md`, `docs/verification/2026-12-02-1819-claude-process-after-renewal.md`, `docs/verification/2026-12-02-agy-1.5.21.md`, `docs/verification/2026-12-02-claude-implementer-2.1.334.md`, `docs/verification/2026-12-02-cli-import-graph.md`, `docs/verification/2026-12-03-codex-0173-reviewer-isolation.md`, `docs/verification/2026-12-03-codex-0173-reviewer-tool-call.md`, `docs/verification/2026-12-03-jcode-1.3.0.md`, `docs/verification/agy/README.md`, `docs/verification/agy/cli-surface.ts`, `docs/verification/agy/interactive-bridge.ts`, `docs/verification/agy/interactive-session.ts`, `docs/verification/agy/launcher-nonce.ts`, `docs/verification/agy/native-hooks.ts`, `docs/verification/agy/originals.json`, `docs/verification/agy/originals/agent-hub-681/cli-surface.ts`, `docs/verification/agy/originals/agent-hub-681/native-hooks-adapted.ts`, `docs/verification/agy/originals/agent-hub-681/tui-actual.ts`, `docs/verification/agy/originals/agent-hub-684/probe.ts`, `docs/verification/agy/permission-new-functions.ts`, `docs/verification/agy/run-probe.py`, `docs/verification/agy/runtime.ts`, `docs/verification/agy/tmux-helper-control.ts`, `docs/verification/agy/tmux-session.ts`.
104
+
105
+ This list is read from the repository, never written by hand. Native acceptance and the person's release consent are separate records: consent is `ahub sdlc authorize-release 0.52.0`, recorded by the person or the unique configured conductor only on the person's explicit release instruction naming the release in its own session (never a hub/task/review/file/peer relay), and is not recorded in this file. The tag run refuses without it.
106
+
107
+ ## Document review
108
+
109
+ `node scripts/check-docs.mjs` reported 33 stale documents after release-prepare. The review compared the source changes since each stamp with the statements they affect, using targeted searches of every stale document and reading the passages they found. It was not a line-by-line reread of the long documents. Every `src/`, `scripts/`, `test/`, `plugins/` and `templates/` path the 33 documents name was checked to exist; the ones that do not are examples or files outside this repository.
110
+ - **Behavior (#1779, #1780, #1806, #1807, #1808, #1810, #1811, #1829, #1856, #1879):** README.md, docs/agent-notes/{adapters,budget,bus,daemon,security-review,tasks}.md, docs/dogfood.md, docs/events.md, docs/memory.md, docs/operations.md, docs/quickstart.md, docs/roles.md, docs/sdlc.md, docs/security.md, src/cli/help.ts.
111
+ - **Imports, moved code or version only (#1778 T2b to T7, #1831, #1853, #1899 and this release):** docs/adding-an-ai-tool.md, docs/addons/{claude-mem,codex-plugin,dot-admit,open-code-review,ponytail,ripwire}.md, docs/agent-notes/local-worker.md, docs/bench.md, docs/cooperbench.md, docs/data-policy.md, docs/research.md, docs/text-projection.md. #1817 moved the add-on list into `src/hub/addons.ts`, which `tooling.ts` re-exports; no add-on document names either file.
112
+ - **One narrow change:** docs/agent-notes/benchmarks.md (#1812's receipt test and #1882's probe hardlink guard, neither described there), docs/influences.md (the quota renewal paragraph added to the design spec by #1820).
113
+ - **Tests and CI:** docs/agent-notes/tests.md (five macOS shards, shared `test/helpers`, the N-1 fixture at 0.51.0). Its shard, rerun and fixture rules still hold.
114
+ - **Edited note only:** docs/agent-notes/README.md.
115
+
116
+ Corrected at 62afff50a (before the restamp):
117
+ - The MCP endpoint socket, the shared host (`host.shared`), declared accounts, `transport: "pull"` kinds, `ahub sdlc check` and `sync` and the structure budgets were added where each document's scope covers them.
118
+ - Statements made false since 0.51.0 were fixed in the operations, SDLC, security, dogfood, events, roles and CooperBench documents and the budget, daemon, security-review, tasks and tests notes.
119
+ - The area-note paths in AGENTS.md and the matching paths in docs/verified.json were extended to the files split out since 0.51.0.
120
+ - Four `ahub help` entries in src/cli/help.ts were corrected against `src/cli/main.ts` and the command table.
121
+
122
+ The 14 commits merged after that correction (#1882 to #1899) needed no further edit: the MCP endpoint stays unwired in production (`mcpServe` has no caller), #1882 changes only a refusal's classification, #1884 is a compatibility record and #1893 updated its own documents.
123
+
124
+ Checks of the new user-facing text: the commands the quickstart's "Upgrading to 0.52.0" note and the CHANGELOG N-1 statement name are absent from 0.51.0 (`host` and `structure` are unknown commands to the N-1 fixture's 0.51.0 CLI, and 0.51.0's help has no `accounts`, `agents presets`/`add` or `sdlc check`/`sync` rows). That 0.51.0 refuses the new settings rests on its refusal of unknown fields, which AGENTS.md records from #1834; it was not run here. The agent-mem lines were checked against agent-mem 0.47.0's release notes (writer-inventory renewal, the note `session` field).
125
+
126
+ All 33 documents were restamped at 69aac611a with `restamp --reviewed`. No spec's `verified-against` was edited.
127
+
128
+ ## Checks
129
+
130
+ Run locally on the release branch at 7b603a698 (after the restamp and the inventory regeneration). This report is the only later change:
131
+ - `node scripts/check-docs.mjs --require-fresh --committed`: `docs: OK (0 stale documents)`.
132
+ - `bun x tsc --noEmit`: exit 0. `bun scripts/build.mjs --check` (Bun 1.4.4): exit 0; `plugins/agent-hub/server.js` is 1,130,786 bytes.
133
+ - `inventory-hardcoded-values`, `unused-exports`, `check-import-graph`, `cli-output-inventory` and `refusal-inventory`, each with `--check`: exit 0. `cli-output-inventory` first failed: the four help rows corrected at 62afff50a had aged its snapshot, which was regenerated at 7b603a698. `bun scripts/readme-facts.ts --check`: `facts: OK`.
134
+ - `node scripts/check-roadmap.mjs --warn-drift`: `roadmap: OK (7 milestones)`.
135
+ - `node scripts/check-package.mjs` with npm 11.20.0 (the CI pin): `package: OK (1243 files, @staix/agent-hub@0.52.0)`.
136
+ - 90 tests pass and 0 fail in `published-protocol-compat`, `broker-server`, `release-prepare`, `release-tag`, `check-docs` and `readme-facts`. The N-1 fixture was installed from its frozen lock (0.51.0, agent-mem 0.43.0).
137
+ - The help and completion suites: 103 pass, 0 fail.
138
+ - Main CI at 6cf1def10 (run 47116259482) was still running when this was written; the release PR's exact-head CI run is recorded on the release PR.
139
+
140
+ ## Known gaps, not blocking
141
+
142
+ - **Not run live:** no running hub was upgraded to 0.52.0, and no real Claude, Codex or Jcode session was restarted on it. The person's upgrade is the live leg.
143
+ - **The MCP endpoint (#1780) ships unwired:** `mcpServe` has no production caller, so per-session serving, push routing and the pending-count footer are covered by tests only. #1780 stays open.
144
+ - **Opt-in features not dogfooded here:** `host.shared`, declared accounts and `transport: "pull"` kinds are off in this repository and were exercised by tests and their receipts only.
145
+ - **0.51.0 refusing the new settings was not run;** see Document review.
146
+ - **agent-mem 0.47.0 asks a person step:** an active placement home renews its writer inventory (`amem migrate --sync-placement`, docs/memory.md). The hub does not run it.
147
+ - **Codex 0.173.0 remains unverified for `codex-review`** (docs/verification/2026-12-03-codex-0173-reviewer-tool-call.md): the live account turn failed its assertion and the served model ID was not recorded. **Jcode 1.3.0 also stays unverified** (docs/verification/2026-12-03-jcode-1.3.0.md).
148
+ - **Rerun causes:** 18 of the 21 rerun CI runs failed first on macOS or Ubuntu shards whose logs were not all read; see Reviews.
149
+ - **#1852 merged without a hub review;** see Reviews.
150
+ - **No remote full suite:** exact-head CI on both OSes is the full gate for this release PR.
@@ -0,0 +1,53 @@
1
+ # Codex 0.173.0 fresh-reviewer model-free receipt
2
+
3
+ Date 2026-12-03 KST. Refs #888, hub task 1294. The [0.172.0 preparation procedure](2026-11-25-codex-0172-reviewer-isolation.md) ran on macOS arm64 with Bun 1.4.4 at hub commit `79ed41ee54ec983f4991c0f4e51505907160ae70`.
4
+
5
+ The 0.173.0 candidate passed all 17 runnable preparation legs. The verified 0.169.0 control passed all 16 applicable legs. **0.173.0 remains unverified for `codex-review` pending a separately person-authorized model-backed hub tool-call receipt.** This run leaves both failures from the [0.172.0 model-backed receipt](2026-11-26-codex-0172-reviewer-tool-call.md) open. Persisting the synthetic marker in the verdict and observing the served model ID both require model-turn evidence.
6
+
7
+ ## Artifact and preparation
8
+
9
+ The exact macOS arm64 platform packages were installed serially with `npm install --prefix` into separate private prefixes. For each package, the registry's `dist.integrity`, npm's installed lock record and the downloaded archive's computed SHA-512 matched. The installed native executable matched the archive member, reported the exact version and retained its hash through preparation and schema generation. The control hash matches the earlier receipt.
10
+
11
+ | Version | Platform archive SHA-512 | Native binary SHA-256 |
12
+ | --- | --- | --- |
13
+ | 0.169.0 control | `sha512-5WsWFBbVP78D+6FvNo1MMVxLPZdmcoQlqVJFrF4qx/TmvneLnMQKtLyXkUo54XOTDfoYKpNouTJ/F7gTVA8FnQ==` | `739cda86e15d30a6e2b40cf8dcbbfb988aaf48b305b27065573bb8e9fd41d002` |
14
+ | 0.173.0 candidate | `sha512-9Xiqrm1bVDOBQUfJudKTVQZDVZeCtiDUuShI0donyHGffi6aGMZZsf/FnSkvLyg6sL5SoVCBXpQ4dKremESHPw==` | `c1b28ffe0db1902e6b4e0c8c7df8c028cd0f4509e248ed13e0008bd3923df6f2` |
15
+
16
+ The committed proof worker called `runReviewerProofs` and the production `codexReviewerBackend.prepare` in empty inherited environments with separate `HOME`, `AGENTHUB_HOME`, `CODEX_HOME`, `AMEM_HOME`, XDG directories and `TMPDIR`. The unmodified version gate refused the candidate before the worker created temporary exact-version trust in its scratch hub home. Both trust files were absent after cleanup.
17
+
18
+ Both binaries passed empty-home and ambient preparation and all 14 attestation markers, covering effective MCP inventory, disabled Apps, plugins, hooks, legacy notify and web search, ephemeral and untrusted project settings, and native read/write canaries. The model-backed leg was recorded as `not-run` with cause `model-required`. App-server attachment and verdict delivery remain outside this evidence.
19
+
20
+ ## Upstream source comparison
21
+
22
+ | Tag | Annotated tag object | Peeled commit |
23
+ | --- | --- | --- |
24
+ | `rust-v0.169.0` | `a41fe5b443652cbdbee57717fbb9fd78d8d8b32a` | `d32063f96c2dff1dc96af839b3952abb6acfeda4` |
25
+ | `rust-v0.172.0` | `fc3036dba44468096953f0e832f3fecd3adc0228` | `3d86e43b075adeba2193ec5c22ac92f55afd82e6` |
26
+ | [`rust-v0.173.0`](https://github.com/openai/codex/releases/tag/rust-v0.173.0) | `1920a2494b8717bb64337a9b49a3fac4af586109` | `fcff6f6317b59220fa4a928b10c8f75cc706960d` |
27
+
28
+ SHA-256 comparison of the seven tracked files at the peeled commits found all seven changed since 0.169.0 and three changed since 0.172.0.
29
+
30
+ | File under `codex-rs/` | 0.173.0 SHA-256 | Versus 0.172.0 |
31
+ | --- | --- | --- |
32
+ | `hooks/src/registry.rs` | `1875149dc3fbe79ecf667009f3fcde7b655961b0451840aec85dcb7879e58a8e` | Same |
33
+ | `exec/src/cli.rs` | `dc36955d295470e542e9677dddf8b757f8d3bbcd6530a601dbb908aeec2d1668` | Same |
34
+ | `config/src/mcp_types.rs` | `f9f4c78f71356114ff8286a88404d6426d0ba9ae5c71785da9d66437870839b6` | Same |
35
+ | `core/src/mcp.rs` | `08773c9073529e24b069acf0a9fac6593e473ea9036345855dfef2bafa2d3795` | Changed |
36
+ | `sandboxing/src/seatbelt.rs` | `f9f3ea86088ff3787ad7fdd5a746e79243851fb17fd38ef386388e849d171625` | Same |
37
+ | `core/src/session/mod.rs` | `20bec4bb1d6573d49e75c511d0a18de726a7d9562f106431ad9cc6dd8f67b422` | Changed |
38
+ | `core-plugins/src/manager.rs` | `449dcb1a5237e5b5769c0f4486ce063eb9785455d93493b254bfbbd0b75197f7` | Changed |
39
+
40
+ The source review covered the hook, CLI and MCP diffs and the reviewer-relevant regions of Seatbelt, session and plugin changes. The MCP runtime projection adds executor discovery results while still passing the disabled plugin IDs into runtime configuration. The session removes cumulative MCP attribution checkpoints and derives plugin configuration from the projected MCP config. Legacy notify still comes from `config.notify`, and the plugin manager retains its disable guards while changing recommendation caching. The prior Seatbelt and exec CLI changes are byte-identical to 0.172.0.
41
+
42
+ The additional comparison covered `features/src/lib.rs`, `exec/src/lib.rs` and `cli/src/mcp_cmd.rs` against both baselines. Since 0.172.0, MCP connection sharing became stable and enabled by default, hosted search policy was removed, and daemon updates gained a requirements-level gate. Exec now ignores cloud inventory change stream events. The MCP management CLI source is byte-identical to 0.172.0. The native inventory checks exercised preparation with these defaults. Connection sharing and attribution changes during model turns remain unmeasured.
43
+
44
+ ## App-server schemas
45
+
46
+ Both binaries generated stable and experimental JSON schemas in their isolated homes. The comparison covers JSON files and top-level v2 definitions with direct properties, required fields and enums.
47
+
48
+ | View | Files | Shared files changed | v2 definitions |
49
+ | --- | --- | --- | --- |
50
+ | Stable | 329 to 332 | 40 | 700 to 718 |
51
+ | Experimental | 479 to 484 | 60 | 864 to 887 |
52
+
53
+ The stable set removed zero files. The experimental set removed `CurrentTimeReadParams.json` and `CurrentTimeReadResponse.json`. Both v2 bundles removed `WebSearchProvider` and the direct properties `AgentMessageDisplay.action`, `blockType`, `checkTrustedContacts`, `cyberTrustedAccess`, `Config.client_search_provider` and `Project.position`. The experimental `ThreadGuardianReviewResponse` newly requires `assessment`. The shared top-level definitions lost zero direct enum values.
@@ -0,0 +1,34 @@
1
+ # Codex 0.173.0 reviewer tool-call preflight
2
+
3
+ Date 2026-12-03 KST. Refs #888, hub task 1295. The [model-free receipt](2026-12-03-codex-0173-reviewer-isolation.md) qualified native preparation. Hub task 1295 stopped at the credential-isolation preflight before using the account. Hub task 1299 records the subsequent account turn below. Codex 0.173.0 remains unverified for `codex-review`.
4
+
5
+ ## Account-free results
6
+
7
+ The private macOS arm64 binary reported `codex-cli 0.173.0`. Its SHA-256 matched the model-free receipt: `c1b28ffe0db1902e6b4e0c8c7df8c028cd0f4509e248ed13e0008bd3923df6f2`. The hub baseline was `6d2f283c4ec0212536e557e302166ea99434707c` with Bun 1.4.4.
8
+
9
+ - **Verdict marker and head.** The [0.172.0 receipt](2026-11-26-codex-0172-reviewer-tool-call.md) shows its marker was present in the review envelope. The failure was in the persisted verdict. For this preflight, the fixture placed the marker and verdict instruction in the public task title, asserted the marker and Git head in the review request and checked that the builder's done summary was withheld. The fake reviewer called the real hub tool. Read-only board inspection found one approval with the marker and the exact fixture head. This establishes delivery and storage with the scripted fixture. Live model behavior remains unmeasured.
10
+ - **Served model ID.** The exact native binary made one request to a loopback fake Responses endpoint. The endpoint supplied `openai-model`. With `RUST_LOG=error,codex_core::session=info`, bounded stderr contained `server reported model … (matches requested model)`. The native JSON completion contained usage only. The integrated fake review exercised collection of that diagnostic after the owned child exited and extracted the synthetic served ID alongside the stored verdict. The production request alias was never used as served-model evidence. [Codex 0.173.0 response handling](https://github.com/openai/codex/blob/rust-v0.173.0/codex-rs/core/src/session/mod.rs#L4858)
11
+
12
+ ## Credential isolation preflight
13
+
14
+ The authorized default account requires a read-only link and unchanged source metadata. Codex 0.173.0 resolves credential symlinks when saving refreshed credentials and checks write permission on the resolved destination. A plain symlink would expose the account file to writes by the native client. [Credential path resolution](https://github.com/openai/codex/blob/rust-v0.173.0/codex-rs/login/src/auth/storage_file.rs) · [Credential save path](https://github.com/openai/codex/blob/rust-v0.173.0/codex-rs/login/src/auth/storage.rs#L274)
15
+
16
+ A Seatbelt profile allowed reads and denied writes through a symlink to a synthetic account file. With no outer profile, exact Codex ran `codex sandbox -- /usr/bin/true` and exited 0. Under the write-denying outer profile, the same command failed with exit 71 and `sandbox_apply: Operation not permitted`. The proposed restriction therefore could not preserve the production native sandbox on this host. No account symlink was created and no credential contents were opened or copied. The isolated procedure stopped before the live verdict and model checks.
17
+
18
+ ## One account-backed review
19
+
20
+ Hub task 1299 used the one authorized review turn after the person chose to run with the default Codex home. The native process used the real Codex home without credential isolation. The harness used separate scratch `HOME`, `AGENTHUB_HOME`, `AMEM_HOME`, `XDG_CONFIG_HOME` and `TMPDIR`, and recorded exact-version trust only in the scratch hub. It created no auth link or copy and applied no outer sandbox. Codex used the production native reviewer preparation and sandbox. The harness read only the size and modification time of the account file, and both matched after cleanup.
21
+
22
+ | Evidence | Observed |
23
+ | --- | --- |
24
+ | Hub source head | `1e06372ba70d7068e994396a19650f1891e5fa5d` |
25
+ | Native executable | Exact 0.173.0, SHA-256 matched the model-free receipt before and after |
26
+ | Fixture head | `81a7142ae78dd7afd45c70309ea66942681db863` |
27
+ | Review envelope | Expected marker and exact head present, builder summary withheld |
28
+ | Authorized turns used / native exit | 1 of 1 / 0 |
29
+ | Tool call and verdict | One successful `hub_review`, one persisted approval |
30
+ | Stored marker and head | Both matched |
31
+ | Served model ID | Unavailable in the complete native diagnostic stream |
32
+ | Cleanup | Fixture source unchanged, account size and mtime unchanged, no fixture processes remained |
33
+
34
+ The live review resolved the missing verdict marker from 0.172.0. The scoped diagnostic worked with an account-free response carrying the model header, but the live run yielded no matching server-model diagnostic. Its absence does not establish what the server reported. The harness stored no requested alias in its place. The account-turn assertion failed on this leg, and there was no retry. **0.173.0 remains unverified for `codex-review`.**
@@ -0,0 +1,25 @@
1
+ # Jcode 1.3.0 verification
2
+
3
+ Date: 2026-12-03 KST. Refs #1872. Jcode 1.3.0 stays unverified. The installed macOS arm64 binary reported `v1.3.0 (ce35c1c53)`. Its scratch copy was byte-identical to the installed binary.
4
+
5
+ ## Isolation
6
+
7
+ The repository Jcode proof worker ran under `dot admit` with a fresh work directory, HOME, JCODE_HOME, AGENTHUB_HOME, AMEM_HOME, TMPDIR and XDG directories. Before the worker started, a separate check confirmed that `hubHome()` resolved to the scratch AGENTHUB_HOME. No trust record was written. The provider was a loopback fixture with no credentials. The native environment included `JCODE_NO_TELEMETRY=1` and `JCODE_DISABLE_CLAUDE_MCP=1`.
8
+
9
+ The before and after SHA-256 fingerprints of the real Jcode `auth.json`, `auth-refresh-state.json`, `config.toml`, and `mcp.json`, and the real hub's `agent-compat.json`, matched. An initial invocation was refused by the worker's scratch-directory name guard before launching a native process. The recorded run used the required directory prefix.
10
+
11
+ ## Results
12
+
13
+ | Leg | Result | Observation |
14
+ | --- | --- | --- |
15
+ | Release identity and isolation | Pass | The scratch binary returned semver 1.3.0 through the worker's version query. |
16
+ | Serve and cleanup | Pass | The proof worker confirmed private socket readiness and cleanup of its owned processes. |
17
+ | ACP initialize, new, load and mode ceilings | Pass | The worker's existing protocol assertions passed. |
18
+ | Owned MCP environment | Pass | The eager MCP observer passed the worker's environment checks. |
19
+ | Telemetry | Fail | The scratch JCODE_HOME contained an artifact the existing proof classifies as `telemetry-id` despite `JCODE_NO_TELEMETRY=1`. This is filesystem evidence only. No network transmission was established. |
20
+ | Running-turn steering | Fail | `soft_interrupt_ids`, subscribe, idle and active state, acknowledgement, and `end_turn` were observed. The loopback provider received two requests. The first conversation failed the existing assertion that the normalized conversation must contain exactly the original user message, even though the shape diagnostic recognized the original prompt. |
21
+ | Production peer delivery | Unmeasured | Stopped after the steering and telemetry checks failed. |
22
+
23
+ The failed checks are differences from the preceding receipt's passing results. The run does not identify why the first conversation failed normalization or whether the telemetry marker was used. The compatibility table, version range and tests remain unchanged.
24
+
25
+ Follow-up: [Jcode 1.3.0 telemetry and steering compatibility](https://github.com/STAIxBWLB/agent-hub/issues/1875).
@@ -0,0 +1,17 @@
1
+ # agy compatibility producers
2
+
3
+ The producers behind the agy receipts (`docs/verification/*-agy-*.md`), moved into the repository for hub task 1268. They are controlled by `run-probe.py`, which builds a fresh owned root, runs one native job and compares the real Gemini config entries and the binary before and after. Run it only on a scratch copy of the candidate binary, never on `~/.local/bin/agy`, and through the machine's admission tool (`dot admit`).
4
+
5
+ ```
6
+ env -i PATH=/usr/bin:/bin:/opt/homebrew/bin HOME=<scratch>/home TMPDIR=<scratch>/tmp/ \
7
+ XDG_CONFIG_HOME=<scratch>/home/.config XDG_CACHE_HOME=<scratch>/cache XDG_DATA_HOME=<scratch>/data \
8
+ XDG_STATE_HOME=<scratch>/state AGENTHUB_HOME=<scratch>/hub AGY_CLI_DISABLE_AUTO_UPDATE=1 \
9
+ python3 docs/verification/agy/run-probe.py --leg <leg> --bun <bun> --agy <scratch>/bin/agy \
10
+ --expected-sha256 <sha256 of the copy> --version <exact version> --results-dir <scratch>/results --execute
11
+ ```
12
+
13
+ Legs: `cli`, `hooks`, `permission` (the provider declarations `run_workflow`, `swarm` and `update_steps` must be seen by the PreToolUse hook or refused, with no effect), `helper` (tmux normal close) and `launcher` (actual `ahub agy` nonce). `--results-dir` must be outside the repository: the producers write their JSON there, and the launcher also writes `launcher-screen.txt` (raw screen text, never part of a receipt).
14
+
15
+ - The hooks leg compares the provider declarations against an exact list of 18 functions. An unknown name fails the leg and is reported by name in the result.
16
+ - The launcher leg checks that the stock gate still refuses the candidate, so run it before the version is added to `COMPAT.agy.verified`. It also pins the hash of `native-hooks.ts`: change both together.
17
+ - `originals/` holds the four historical producers with personal paths replaced by placeholders. `originals.json` records the original and the committed hash of each.
@@ -0,0 +1,68 @@
1
+ // Private task801 adaptation. Do not run outside the reviewed run-probe.py environment.
2
+ import { assertEnvironment, guardPolicy, runOwned, runOwnedTty, safeReceipt, removeOwnedRoot } from "./runtime.ts";
3
+ assertEnvironment();
4
+ import { createHash } from "node:crypto";
5
+ import { spawn } from "node:child_process";
6
+ import { existsSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
7
+ import { homedir, tmpdir, userInfo } from "node:os";
8
+ import { join } from "node:path";
9
+ import { DEFAULT_CONFIG, startDaemon } from "../../../src/hub/daemon.ts";
10
+ import { profile } from "../../../src/local/sandbox.ts";
11
+ import { sbplString as q } from "../../../src/local/deny.ts";
12
+ import { realPath } from "../../../src/hub/project.ts";
13
+ import { peerChildEnv, stopOwnedProcess, trackGroup } from "../../../src/hub/child-process.ts";
14
+
15
+ const out = process.env.TASK801_RESULTS!;
16
+ const bun = process.env.TASK801_BUN!;
17
+ const agyPath = process.env.TASK801_AGY!;
18
+ const bundle = join(process.env.TASK801_WT!, "plugins/agent-hub/server.js");
19
+ const digest = (value: Buffer | string) => createHash("sha256").update(value).digest("hex");
20
+ const personHome = process.env.TASK801_REAL_HOME!; // Real controller home; Bun userInfo follows the isolated HOME.
21
+ const realConfigs: [string, string][] = [
22
+ ["agy-settings", join(personHome, ".gemini/antigravity-cli/settings.json")],
23
+ ["agy-config", join(personHome, ".gemini/config/config.json")],
24
+ ["agy-mcp", join(personHome, ".gemini/config/mcp_config.json")],
25
+ ["agy-imports", join(personHome, ".gemini/config/import_manifest.json")],
26
+ ["gemini-legacy-settings", join(personHome, ".gemini/settings.json")],
27
+ ];
28
+
29
+ function hashes() {
30
+ return Object.fromEntries(realConfigs.map(([id, file]) => {
31
+ try {
32
+ const stat = lstatSync(file);
33
+ if (!stat.isFile() && !stat.isSymbolicLink()) throw new Error("not a config file");
34
+ const bytes = readFileSync(file);
35
+ if (bytes.length > 524288) throw new Error("config bound");
36
+ return [id, { present: true, sha256: digest(bytes) }];
37
+ } catch (error) {
38
+ if ((error as NodeJS.ErrnoException).code === "ENOENT") return [id, { present: false }];
39
+ throw new Error(`config hash unavailable: ${id}`);
40
+ }
41
+ }));
42
+ }
43
+
44
+ const run = runOwned;
45
+
46
+
47
+ const before = hashes();
48
+ const root = realPath(mkdtempSync(join(tmpdir(), "ahub-681-cli-")));
49
+ const home = join(root,"home"), cwd = join(root,"project");
50
+ for (const dir of [home,cwd]) mkdirSync(dir,{recursive:true});
51
+ const executable=realPath(agyPath);
52
+ const realHomes = [...new Set([personHome, process.env.TASK801_REAL_HOME_TYPED!].flatMap(home => [home, realPath(home)]))];
53
+ const policy=[profile(cwd,false,[home,executable],[],["."]),
54
+ `(deny file-read* file-write* ${realHomes.map(home => `(subpath ${q(home)})`).join(" ")})`,
55
+ `(allow file-read* process-exec (literal ${q(executable)}))`,
56
+ `(allow file-read* file-write* process-exec (subpath ${q(home)}) (subpath ${q(root)}))`].join("\n");
57
+ const env=peerChildEnv("agy-cli-probe",{PATH:"/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin",HOME:home,TMPDIR:root+"/",USER:"agy-probe",LANG:"en_US.UTF-8",TERM:"dumb",AGY_CLI_DISABLE_AUTO_UPDATE:"1",AGENTHUB_HOME:join(home,".agenthub"),AGENTHUB_PROJECT_DIR:cwd,AGENTHUB_STATE_DIR:join(root,"state"),AMEM_HOME: process.env.AMEM_HOME!, XDG_CACHE_HOME: process.env.XDG_CACHE_HOME!, XDG_DATA_HOME: process.env.XDG_DATA_HOME!, XDG_STATE_HOME: process.env.XDG_STATE_HOME!, XDG_CONFIG_HOME:join(home,".config")});
58
+ const result:Record<string,unknown>={};
59
+ try {
60
+ result.profileGuards = await guardPolicy(policy,cwd,env);
61
+
62
+ result.realHomeReadGuard = await run(["/bin/sh","-c",`exec 3<${q(join(personHome,".gemini/antigravity-cli/settings.json"))}`],cwd,env,policy);
63
+ result.binaryWriteOpenGuard = await run(["/usr/bin/python3","-c",`import os; fd=os.open(${JSON.stringify(executable)},os.O_WRONLY); os.close(fd)`],cwd,env,policy);
64
+ // O_WRONLY without O_TRUNC or writes: even an unexpected guard failure cannot change binary bytes.
65
+ if ((result.realHomeReadGuard as any).code===0 || (result.binaryWriteOpenGuard as any).code===0) throw new Error("sandbox guard failed");
66
+ for (const [label,args] of [["version",["--version"]],["help",["--help"]],["acp",["--acp"]],["new",["--new"]],["subcommands",["help"]],["mcpList",["mcp","list"]]] as const) result[label]=await run([executable,...args],cwd,env,policy);
67
+ } finally {result.realConfigUnchanged=JSON.stringify(hashes())===JSON.stringify(before);removeOwnedRoot(root);result.temporaryRootRemoved=!existsSync(root);writeFileSync(join(out,"cli-surface.json"),JSON.stringify(safeReceipt(result),null,2)+"\n");}
68
+ console.log(JSON.stringify(safeReceipt(result)));
@@ -0,0 +1,92 @@
1
+ // macOS script(1) requires a terminal on its own stdin, including when its child gets a PTY.
2
+ // Keep a real PTY in this owned bridge instead; the outer Node child remains tracked by stopOwnedProcess.
3
+ import { mkdtempSync, rmSync, writeFileSync, writeSync } from "node:fs";
4
+ import { tmpdir } from "node:os";
5
+ import { join } from "node:path";
6
+
7
+ /**
8
+ * #560: Bun up to 1.4.3 can hang for good inside `Bun.spawn({ terminal })` on macOS when the child writes and starts exiting before the call returns (oven-sh/bun#45300, fixed in 1.4.4): the
9
+ * event loop thread blocks in wait4 while the exiting session leader waits for that same thread to drain its pty. Measured here with a bare Bun script and no agent-hub code: 26 of 96 runs hung
10
+ * at 12 in parallel on 1.4.3 and 0 of 180 on 1.4.4. The child therefore starts behind a gate: a shell that waits for a file the bridge writes right after `Bun.spawn` has returned, then `exec`s the
11
+ * real command (same pid, same session, same terminal). The wait has no bound of its own: a bridge that dies before it opens the gate closes the pty, which hangs the shell up (the trap below), and a bridge
12
+ * that is alive but never opens it is a hung bridge, which `runPty` stops with its group.
13
+ * ponytail: ceiling and upgrade path. The gate exists only because of oven-sh/bun#45300 on Bun up to 1.4.3 (this repo pins 1.4.2 in `.bun-version`); the upgrade path is to delete GATE_SCRIPT, `gate` and `gateDir` once the pinned Bun is 1.4.4 or newer, which is its own task because it
14
+ * touches CI and every OS leg. The parent-death stop below stays whatever the Bun version: an orphaned bridge is this repository's bug, not Bun's. The gate costs about one shell start (a few ms).
15
+ */
16
+ // The shell removes its own gate (file, then directory) once released and when it is hung up or terminated (a bridge killed with SIGKILL runs no cleanup, and the pty closing
17
+ // sends the shell SIGHUP), so no path leaves a directory behind. `exec` resets the traps for the real command.
18
+ const GATE_SCRIPT = 'd=${0%/*}; trap "rm -f \\"$0\\"; rmdir \\"$d\\" 2>/dev/null; exit 125" HUP TERM INT; while [ ! -e "$0" ]; do sleep 0.01; done; rm -f "$0"; rmdir "$d" 2>/dev/null; exec "$@"';
19
+ /** A bridge whose caller died is stopped instead of running on: its child holds a terminal nobody reads and, under launchd, nothing else would ever stop it. */
20
+ const PARENT_POLL_MS = 250;
21
+ const PARENT_TERM_GRACE_MS = 1_000;
22
+ const PARENT_HARD_EXIT_MS = 3_000;
23
+
24
+ // The caller is whoever started this bridge, read before anything that can take time: a caller that dies while `Bun.spawn` runs (the window #45300 widens) has already reparented this process by the
25
+ // time the call returns, and a parent read after it would be launchd and never change.
26
+ if (process.env.TASK801_EXECUTE !== "root-approved") throw new Error("task801 reviewed environment required");
27
+ const send = (value: { type: "started"; pid: number } | { type: "native-exit"; code: number } | { type: "failed" }) => writeSync(3, JSON.stringify(value) + "\n");
28
+ const parent = process.ppid;
29
+ const callerGone = (): boolean => process.ppid !== parent;
30
+ const argv = process.argv.slice(2);
31
+ if (!argv.length) {
32
+ process.exitCode = 125;
33
+ } else {
34
+ let streamClosed!: () => void;
35
+ const eof = new Promise<void>(resolve => { streamClosed = resolve; });
36
+ const gateDir = process.platform === "darwin" ? mkdtempSync(join(tmpdir(), "ahub-pty-gate-")) : undefined;
37
+ const gate = gateDir ? join(gateDir, "open") : undefined;
38
+ let watch: ReturnType<typeof setInterval> | undefined;
39
+ try {
40
+ const child = Bun.spawn(gate ? ["/bin/sh", "-c", GATE_SCRIPT, gate, ...argv] : argv, {
41
+ cwd: process.cwd(), env: process.env,
42
+ terminal: {
43
+ cols: 120, rows: 40, name: "xterm-256color",
44
+ data: (_terminal, data) => { process.stdout.write(data); },
45
+ exit: () => streamClosed(),
46
+ },
47
+ });
48
+ const input = (bytes: Buffer) => { try { child.terminal?.write(bytes); } catch { /* native exit decides */ } };
49
+ process.stdin.on("data", input);
50
+ send({ type: "started", pid: child.pid });
51
+ const stop = () => { try { child.kill("SIGTERM"); } catch { /* exit readback decides */ } };
52
+ process.on("SIGINT", stop); process.on("SIGTERM", stop);
53
+ /** The caller is gone: stop the child now, kill it after a grace period, and exit even if its exit is never reported. */
54
+ const abandon = () => {
55
+ clearInterval(watch);
56
+ stop();
57
+ setTimeout(() => { try { child.kill("SIGKILL"); } catch { /* already gone */ } }, PARENT_TERM_GRACE_MS).unref();
58
+ setTimeout(() => process.exit(129), PARENT_HARD_EXIT_MS).unref();
59
+ };
60
+ // A caller that died while Bun.spawn ran never gets its command run: the gate stays shut and the gate shell takes the SIGTERM (its trap removes the gate and exits).
61
+ // Abandoning once is enough: the interval below exists only while the caller is still there, and clears itself the first time it is not.
62
+ if (callerGone()) abandon();
63
+ else {
64
+ if (gate) writeFileSync(gate, "");
65
+ watch = setInterval(() => { if (callerGone()) abandon(); }, PARENT_POLL_MS);
66
+ }
67
+ try {
68
+ const code = await child.exited;
69
+ // Drain the PTY before closing it; a descendant holding a slave cannot make the bridge wait forever.
70
+ let timer: ReturnType<typeof setTimeout> | undefined;
71
+ await Promise.race([eof, new Promise<void>(resolve => { timer = setTimeout(resolve, 250); })]);
72
+ if (timer) clearTimeout(timer);
73
+ send({ type: "native-exit", code });
74
+ process.exitCode = code;
75
+ } catch {
76
+ process.exitCode = 125;
77
+ } finally {
78
+ process.stdin.removeListener("data", input);
79
+ process.stdin.pause();
80
+ process.stdin.destroy();
81
+ child.terminal?.close();
82
+ process.removeListener("SIGINT", stop); process.removeListener("SIGTERM", stop);
83
+ }
84
+ } catch {
85
+ try { send({ type: "failed" }); } catch { /* parent sees missing control */ }
86
+ process.exitCode = 125;
87
+ } finally {
88
+ if (watch) clearInterval(watch);
89
+ if (gateDir) rmSync(gateDir, { recursive: true, force: true });
90
+ }
91
+ }
92
+ export {};
@@ -0,0 +1,131 @@
1
+ // Private host test helper. Uses the existing owned-process teardown, not PID-derived signals.
2
+ import { spawn, type ChildProcess } from "node:child_process";
3
+ import { createHash } from "node:crypto";
4
+ import { join } from "node:path";
5
+ import type { Readable } from "node:stream";
6
+ import { assertEnvironment } from "./runtime.ts";
7
+ assertEnvironment();
8
+ const { trackGroup, stopOwnedProcess, readProcessTable, descendantsOf } = await import(join(process.env.TASK801_WT!, "src/hub/child-process.ts"));
9
+ const hash = (text: string) => createHash("sha256").update(text).digest("hex");
10
+ const ESC = String.fromCharCode(27);
11
+ const ansi = new RegExp(ESC + "\\[[0-9;?<>]*[ -/]*[@-~]", "g");
12
+ const osc = new RegExp(ESC + "\\][^" + String.fromCharCode(7) + "]*" + String.fromCharCode(7), "g");
13
+ export const cleanTerminal = (text: string) => text.replace(ansi, "").replace(osc, "").replaceAll("\r", "\n");
14
+ export interface InteractiveBirth { pid: number; pgid: number; started: string; commandHash: string }
15
+ export class OwnedInteractive {
16
+ private child: ChildProcess;
17
+ private output = "";
18
+ private controls = "";
19
+ private listeners = new Set<() => void>();
20
+ private closed = false;
21
+ private exitCode: number | null = null;
22
+ private failure: string | undefined;
23
+ private stopWork: Promise<void> | undefined;
24
+ private timer: ReturnType<typeof setTimeout>;
25
+ readonly deadline: number;
26
+ readonly births: InteractiveBirth[] = [];
27
+ outputBytes = 0;
28
+ stderrBytes = 0;
29
+ nativePid: number | undefined;
30
+ nativeExitCode: number | undefined;
31
+ fallback = false;
32
+ cleanupConfirmed = false;
33
+ constructor(argv: readonly string[], cwd: string, env: NodeJS.ProcessEnv, totalMs = 80000) {
34
+ this.deadline = performance.now() + totalMs;
35
+ this.child = spawn(process.env.TASK801_BUN!, ["--no-install", join(process.env.TASK801_OUTPUT!, "interactive-bridge.ts"), ...argv], {
36
+ cwd, env: { ...env, AGY_CLI_DISABLE_AUTO_UPDATE: "1" }, detached: true, stdio: ["pipe", "pipe", "pipe", "pipe"],
37
+ });
38
+ trackGroup(this.child);
39
+ const interrupt = () => { this.failure = "interactive_cancelled"; this.notify(); void this.stop().catch(() => {}); };
40
+ process.once("SIGTERM", interrupt); process.once("SIGINT", interrupt);
41
+ this.child.once("close", () => { process.removeListener("SIGTERM", interrupt); process.removeListener("SIGINT", interrupt); });
42
+ const notify = () => { for (const listener of [...this.listeners]) listener(); };
43
+ this.child.stdout!.on("data", (bytes: Buffer) => {
44
+ this.outputBytes += bytes.length;
45
+ if (this.outputBytes > 400000) this.failure = "pty_output_bound";
46
+ else this.output += bytes.toString();
47
+ notify();
48
+ });
49
+ this.child.stderr!.on("data", (bytes: Buffer) => { this.stderrBytes += bytes.length; if (this.stderrBytes > 65536) this.failure = "bridge_error_bound"; notify(); });
50
+ const streamFailure = () => { if (!this.closed && this.nativeExitCode === undefined) { this.failure = "interactive_stream_failed"; notify(); } };
51
+ this.child.stdin!.on("error", streamFailure); this.child.stdout!.on("error", streamFailure); this.child.stderr!.on("error", streamFailure);
52
+ const control = this.child.stdio[3] as Readable;
53
+ control.on("error", streamFailure);
54
+ control.on("data", (bytes: Buffer) => {
55
+ this.controls += bytes.toString();
56
+ if (this.controls.length > 4096) { this.failure = "bridge_control_bound"; notify(); return; }
57
+ let end: number;
58
+ while ((end = this.controls.indexOf("\n")) >= 0) {
59
+ const line = this.controls.slice(0, end); this.controls = this.controls.slice(end + 1);
60
+ try {
61
+ const value = JSON.parse(line);
62
+ if (value.type === "started" && Object.keys(value).sort().join() === "pid,type" && Number.isSafeInteger(value.pid) && value.pid > 1 && this.nativePid === undefined) this.nativePid = value.pid;
63
+ else if (value.type === "native-exit" && Object.keys(value).sort().join() === "code,type" && Number.isSafeInteger(value.code) && this.nativeExitCode === undefined) this.nativeExitCode = value.code;
64
+ else this.failure = "bridge_control_invalid";
65
+ } catch { this.failure = "bridge_control_invalid"; }
66
+ }
67
+ notify();
68
+ });
69
+ this.child.once("error", () => { this.failure = "bridge_start_failed"; this.closed = true; notify(); });
70
+ this.child.once("close", code => { this.closed = true; this.exitCode = code; notify(); });
71
+ this.timer = setTimeout(() => { this.failure = "tui_total_bound"; notify(); void this.stop().catch(() => {}); }, totalMs);
72
+ }
73
+ notify(): void { for (const listener of [...this.listeners]) listener(); }
74
+ checkpoint(): number { return this.output.length; }
75
+ text(after = 0): string { return cleanTerminal(this.output.slice(after)); }
76
+ write(keys: string): void {
77
+ if (this.closed || this.nativeExitCode !== undefined || this.failure || performance.now() >= this.deadline) throw new Error("task801 interactive input is no longer admitted");
78
+ this.child.stdin!.write(keys);
79
+ }
80
+ async wait(check: () => boolean, timeoutMs = this.deadline - performance.now(), allowClosed = false): Promise<void> {
81
+ return new Promise((accept, reject) => {
82
+ let done = false;
83
+ const finish = (failure?: string) => { if (done) return; done = true; clearTimeout(timer); this.listeners.delete(inspect); failure ? reject(new Error(`task801 ${failure}`)) : accept(); };
84
+ const inspect = () => {
85
+ if (this.failure || performance.now() >= this.deadline) return finish(this.failure ?? "tui_total_bound");
86
+ try { if (check()) return finish(); } catch { return finish("interactive_predicate_failed"); }
87
+ if (this.closed && !allowClosed) finish("interactive_ended_before_barrier");
88
+ };
89
+ const timer = setTimeout(() => finish("setup_barrier_unobserved"), Math.max(1, Math.min(timeoutMs, this.deadline - performance.now())));
90
+ this.listeners.add(inspect); inspect();
91
+ });
92
+ }
93
+ async observeOwnership(): Promise<void> {
94
+ const rows = await readProcessTable();
95
+ if (!rows) throw new Error("task801 interactive ownership inventory unavailable");
96
+ const own = rows.find(row => row.pid === this.child.pid);
97
+ for (const row of [...(own ? [own] : []), ...(this.child.pid ? descendantsOf(rows, this.child.pid) : [])]) {
98
+ if (!this.births.some(value => value.pid === row.pid && value.started === row.started && value.commandHash === hash(row.command))) this.births.push({ pid: row.pid, pgid: row.pgid, started: row.started, commandHash: hash(row.command) });
99
+ }
100
+ }
101
+ async normalExit(): Promise<boolean> {
102
+ const closeDeadline = performance.now() + 45000;
103
+ await this.wait(() => this.nativeExitCode !== undefined, closeDeadline - performance.now());
104
+ await this.wait(() => this.closed, closeDeadline - performance.now());
105
+ return this.nativeExitCode === 0 && this.exitCode === 0 && !this.fallback;
106
+ }
107
+ stop(): Promise<void> {
108
+ if (this.stopWork) return this.stopWork;
109
+ this.fallback ||= !this.closed;
110
+ this.stopWork = (async () => {
111
+ await stopOwnedProcess(this.child, { group: true });
112
+ const rows = await readProcessTable();
113
+ if (!rows) throw new Error("task801 interactive final inventory unavailable");
114
+ if (this.births.some(birth => rows.some(row => row.pid === birth.pid && row.pgid === birth.pgid && row.started === birth.started && hash(row.command) === birth.commandHash))) throw new Error("task801 tracked interactive process remains");
115
+ this.cleanupConfirmed = true; clearTimeout(this.timer);
116
+ })();
117
+ return this.stopWork;
118
+ }
119
+ }
120
+
121
+ /** Root-run positive helper control only; it is not native agy or compatibility evidence. */
122
+ export async function verifyInteractiveHelper(): Promise<Record<string, boolean | number>> {
123
+ const source = "process.stdout.write('TASK801_INTERACTIVE_READY'); for await(const chunk of Bun.stdin.stream()){if(new TextDecoder().decode(chunk).includes('q')){process.stdout.write('TASK801_INTERACTIVE_CLOSED');process.exit(0);}}";
124
+ const session = new OwnedInteractive([process.env.TASK801_BUN!, "-e", source], process.env.AGENTHUB_PROJECT_DIR!, process.env, 25000);
125
+ try {
126
+ await session.wait(() => session.nativePid !== undefined && session.text().includes("TASK801_INTERACTIVE_READY"));
127
+ await session.observeOwnership(); session.write("q\r");
128
+ const normal = await session.normalExit();
129
+ return { ready: true, normalExit: normal, closedMarker: session.text().includes("TASK801_INTERACTIVE_CLOSED"), outputBytes: session.outputBytes };
130
+ } finally { await session.stop(); }
131
+ }