@staix/agent-hub 0.38.0 → 0.40.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 (195) hide show
  1. package/CHANGELOG.md +84 -0
  2. package/README.md +28 -12
  3. package/docs/adding-an-ai-tool.md +7 -5
  4. package/docs/agent-notes/README.md +23 -0
  5. package/docs/agent-notes/adapters.md +9 -5
  6. package/docs/agent-notes/benchmarks.md +2 -0
  7. package/docs/agent-notes/budget.md +9 -0
  8. package/docs/agent-notes/bus.md +1 -0
  9. package/docs/agent-notes/daemon.md +21 -9
  10. package/docs/agent-notes/local-worker.md +4 -2
  11. package/docs/agent-notes/security-review.md +56 -0
  12. package/docs/agent-notes/tasks.md +22 -6
  13. package/docs/agent-notes/tests.md +10 -9
  14. package/docs/contracts/companion-cli-v1.json +4 -0
  15. package/docs/design/adapters.md +142 -0
  16. package/docs/design/agent-hub-architecture.md +46 -1
  17. package/docs/design/agent-hub.md +10 -0
  18. package/docs/design/bus.md +7 -0
  19. package/docs/design/cli-output.md +183 -0
  20. package/docs/design/execution-reference.md +6 -1
  21. package/docs/design/roadmap.md +191 -0
  22. package/docs/design/task-board.md +185 -5
  23. package/docs/dogfood.md +30 -9
  24. package/docs/events.md +7 -7
  25. package/docs/memory.md +5 -5
  26. package/docs/operations.md +315 -54
  27. package/docs/profiles.md +101 -8
  28. package/docs/quickstart.md +47 -6
  29. package/docs/research.md +6 -3
  30. package/docs/roles.md +52 -0
  31. package/docs/sdlc.md +190 -2
  32. package/docs/security.md +90 -15
  33. package/docs/text-projection.md +1 -0
  34. package/docs/verification/2026-11-13-claude-implementer-2.1.323.md +59 -0
  35. package/docs/verification/2026-11-13-codex-01672-reviewer-isolation.md +69 -0
  36. package/docs/verification/2026-11-14-0.39.0.md +51 -0
  37. package/docs/verification/2026-11-14-codex-0169-reviewer-isolation.md +70 -0
  38. package/docs/verification/2026-11-14-codex-0169-reviewer-tool-call.md +48 -0
  39. package/docs/verification/2026-11-14-pi-152-compat.md +45 -0
  40. package/docs/verification/2026-11-15-0.40.0.md +39 -0
  41. package/docs/verification/2026-11-16-pi-loopback-1447.md +39 -0
  42. package/docs/verification/pi-152-model-free.ts +57 -0
  43. package/docs/verification/pi-152-native.mjs +21 -0
  44. package/docs/verified.json +48 -25
  45. package/package.json +4 -4
  46. package/plugins/agent-hub/.claude-plugin/plugin.json +1 -1
  47. package/plugins/agent-hub/kimi-hook.js +2266 -530
  48. package/plugins/agent-hub/kimi-review-policy-worker.js +16 -11
  49. package/plugins/agent-hub/server.js +2423 -645
  50. package/src/adapters/acp-model-policy.ts +1 -1
  51. package/src/adapters/acp-session-model.ts +35 -0
  52. package/src/adapters/acp.ts +14 -0
  53. package/src/adapters/agy/definition.ts +2 -2
  54. package/src/adapters/agy/hooks.ts +7 -0
  55. package/src/adapters/claude-channel.ts +1 -1
  56. package/src/adapters/claude-implementer.ts +8 -0
  57. package/src/adapters/claude-print-child.ts +26 -2
  58. package/src/adapters/claude-print.ts +4 -0
  59. package/src/adapters/codex-appserver.ts +90 -16
  60. package/src/adapters/codex-review-isolation.ts +63 -17
  61. package/src/adapters/compat.ts +10 -10
  62. package/src/adapters/conformance/fakes/acp-server.ts +11 -2
  63. package/src/adapters/conformance/fakes/app-server.ts +5 -1
  64. package/src/adapters/conformance/fakes/pi-rpc.ts +1 -1
  65. package/src/adapters/definitions/builtin-metadata.ts +12 -12
  66. package/src/adapters/definitions/native-cli-jcode-mcp.ts +18 -3
  67. package/src/adapters/definitions/native-config-defaults.ts +1 -1
  68. package/src/adapters/definitions/native-config-policy.ts +1 -1
  69. package/src/adapters/definitions/native-quota.ts +122 -0
  70. package/src/adapters/definitions/native-recovery.ts +3 -0
  71. package/src/adapters/definitions/qwen.ts +2 -2
  72. package/src/adapters/kimi-review.ts +23 -0
  73. package/src/adapters/kimi-wire-usage.ts +39 -16
  74. package/src/adapters/local-worker.ts +9 -4
  75. package/src/adapters/pi-state-model.ts +12 -0
  76. package/src/adapters/pi.ts +76 -11
  77. package/src/adapters/print-result-model.ts +24 -0
  78. package/src/adapters/registry-types.ts +12 -2
  79. package/src/adapters/registry.ts +19 -2
  80. package/src/adapters/reviewer-print.ts +132 -16
  81. package/src/adapters/role-eligibility.ts +99 -0
  82. package/src/adapters/same-directory.ts +16 -0
  83. package/src/cli/agy-mcp.ts +18 -7
  84. package/src/cli/answer-args.ts +11 -3
  85. package/src/cli/console-question.ts +1 -1
  86. package/src/cli/console-state.ts +98 -11
  87. package/src/cli/console.ts +6 -2
  88. package/src/cli/error-format.ts +19 -0
  89. package/src/cli/free-text.ts +20 -0
  90. package/src/cli/handoff-args.ts +1 -1
  91. package/src/cli/help.ts +350 -30
  92. package/src/cli/identity-audit.ts +8 -7
  93. package/src/cli/identity.ts +27 -4
  94. package/src/cli/init-prompt.ts +31 -2
  95. package/src/cli/init-roles.ts +156 -0
  96. package/src/cli/init-settings.ts +24 -2
  97. package/src/cli/init.ts +232 -17
  98. package/src/cli/main.js +2 -2
  99. package/src/cli/main.ts +250 -69
  100. package/src/cli/model.ts +1 -1
  101. package/src/cli/output-standard.ts +56 -0
  102. package/src/cli/output.ts +199 -9
  103. package/src/cli/preview.ts +1 -1
  104. package/src/cli/recovery-launch.ts +114 -0
  105. package/src/cli/recovery-package.ts +14 -7
  106. package/src/cli/recovery-version-preflight.ts +104 -0
  107. package/src/cli/roadmap.ts +215 -0
  108. package/src/cli/role-doctor.ts +39 -0
  109. package/src/cli/sdlc-output.ts +66 -1
  110. package/src/cli/smoke-pty-bridge.ts +7 -24
  111. package/src/cli/study-output.ts +54 -0
  112. package/src/cli/study.ts +14 -1
  113. package/src/cli/task-output.ts +3 -1
  114. package/src/cli/terminal-recovery.ts +14 -0
  115. package/src/cli/upgrade-presentation-flags.ts +2 -2
  116. package/src/cli/upgrade-presentation.ts +4 -0
  117. package/src/cli/upgrade-restore-state.ts +12 -3
  118. package/src/cli/upgrade-runtime.ts +40 -2
  119. package/src/cli/upgrade.ts +8 -4
  120. package/src/hub/advisor-survey.ts +139 -0
  121. package/src/hub/audit-source.ts +66 -0
  122. package/src/hub/board.ts +677 -15
  123. package/src/hub/budget.ts +54 -4
  124. package/src/hub/bus.ts +9 -0
  125. package/src/hub/check-runner.ts +3 -4
  126. package/src/hub/ci-watch.ts +19 -4
  127. package/src/hub/conductor.ts +14 -8
  128. package/src/hub/config-apply.ts +2 -1
  129. package/src/hub/config-edit-host.ts +77 -5
  130. package/src/hub/considered-findings.ts +47 -0
  131. package/src/hub/control-client.ts +1 -1
  132. package/src/hub/daemon.ts +585 -98
  133. package/src/hub/deliverable-files.ts +17 -1
  134. package/src/hub/dogfood-profile.ts +3 -2
  135. package/src/hub/events.ts +25 -4
  136. package/src/hub/execution-reference.ts +1 -1
  137. package/src/hub/folder-trigger.ts +11 -4
  138. package/src/hub/github-import.ts +81 -0
  139. package/src/hub/hub-tools.ts +117 -20
  140. package/src/hub/install-policy.ts +23 -0
  141. package/src/hub/kimi-usage.ts +34 -2
  142. package/src/hub/lifecycle-schema.ts +3 -3
  143. package/src/hub/memory-profile.ts +9 -1
  144. package/src/hub/memory-sync-state.ts +1 -0
  145. package/src/hub/model-overrides.ts +2 -1
  146. package/src/hub/no-writes.ts +5 -0
  147. package/src/hub/operational-authority.ts +8 -1
  148. package/src/hub/operational-view.ts +6 -2
  149. package/src/hub/peers.ts +2 -0
  150. package/src/hub/pi-failure.ts +7 -0
  151. package/src/hub/plan-conformance.ts +20 -2
  152. package/src/hub/question-desk.ts +26 -7
  153. package/src/hub/questions.ts +33 -5
  154. package/src/hub/quota-account.ts +34 -0
  155. package/src/hub/recovery-policy.ts +18 -4
  156. package/src/hub/research-evidence.ts +51 -3
  157. package/src/hub/research.ts +77 -13
  158. package/src/hub/restart.ts +21 -0
  159. package/src/hub/review-budget.ts +88 -0
  160. package/src/hub/review-findings.ts +93 -12
  161. package/src/hub/reviewer-pool-config.ts +6 -2
  162. package/src/hub/reviewer-pool.ts +39 -6
  163. package/src/hub/roadmap-triage.ts +86 -0
  164. package/src/hub/roadmap-unplaced.ts +169 -0
  165. package/src/hub/roadmap-view.ts +83 -0
  166. package/src/hub/roadmap.ts +127 -0
  167. package/src/hub/routing.ts +7 -3
  168. package/src/hub/sdlc-merge.ts +6 -5
  169. package/src/hub/sdlc-queue.ts +17 -7
  170. package/src/hub/sdlc-release.ts +1 -1
  171. package/src/hub/sdlc.ts +47 -8
  172. package/src/hub/security-audit.ts +178 -0
  173. package/src/hub/security-pass.ts +115 -0
  174. package/src/hub/settings.ts +11 -5
  175. package/src/hub/source-read.ts +80 -2
  176. package/src/hub/sources.ts +57 -9
  177. package/src/hub/specs-task.ts +7 -0
  178. package/src/hub/startup-event-seeds.ts +5 -3
  179. package/src/hub/startup-timing.ts +1 -0
  180. package/src/hub/synthesis-readiness.ts +279 -0
  181. package/src/hub/task-sweep.ts +29 -2
  182. package/src/hub/task-worktree.ts +37 -0
  183. package/src/hub/tasks.ts +1464 -76
  184. package/src/hub/text-projection.ts +11 -1
  185. package/src/memory/capture.ts +2 -1
  186. package/src/pi/dependency-publish.ts +50 -0
  187. package/src/pi/extension.ts +1 -1
  188. package/src/pi/launch.ts +1 -1
  189. package/src/pi/task-dependencies.ts +249 -0
  190. package/src/ui/index.html +56 -13
  191. package/src/ui/office-model.ts +11 -3
  192. package/src/ui/office-space.ts +50 -30
  193. package/src/ui/plugin-questions.ts +5 -0
  194. package/src/ui/plugin.ts +27 -12
  195. package/templates/config.json +1 -1
@@ -0,0 +1,59 @@
1
+ # Claude Code 2.1.323 headless implementer receipt
2
+
3
+ Date: 2026-11-13 UTC. Scope: #888, hub task 921. This repeats the [2.1.322 procedure](2026-11-10-claude-implementer-2.1.322.md), using installed 2.1.322 as control and installed 2.1.323 as candidate. Source base: `7458f87f5db0bc2bdbaefaa32440fcd29dcb27a3`. Platform: macOS arm64, Bun 1.4.4.
4
+
5
+ Result: all 44 cases passed, 22 on each binary. Add only exact `2.1.323` to `COMPAT["claude-implementer"].verified`. No producer or allow-list change was needed: both producers already accept `--expected-version`, which bound each separate invocation to its exact version.
6
+
7
+ ## Identity and unchanged producers
8
+
9
+ Every value below was hashed before the first leg and again after the last leg; all hashes were unchanged. The control hash also matches the earlier 2.1.322 receipt.
10
+
11
+ | File | SHA-256 before and after |
12
+ | --- | --- |
13
+ | Claude Code 2.1.322 control | `a9d237949db816a0b7afd88a9a8e1df36b3a597a30f5a41d1c0539eb180a3450` |
14
+ | Claude Code 2.1.323 candidate | `5432918d904a9b6afef7bb79d20df24d76052eabc1f41bceb84091d21f8889a7` |
15
+ | `claude-permission-transport-native.py` | `c8e82c66a8cf2faf4f4930da21ca81e36166381fd932219cb60e3cec541af10b` |
16
+ | `claude-shell-wrapper-native.py` | `ad891f5b9663e14e3f44febd787500a8ced815125c489adadddcdeb279f64826` |
17
+ | `claude-shell-wrapper-host.ts` | `616e6711e392f0eee7e3fa1c7bdc47a537dfa86bcc8ffb30e549ca94e5a71cef` |
18
+
19
+ ## Relevant upstream changes
20
+
21
+ The official [2.1.323 changelog](https://github.com/anthropics/claude-code/blob/89eb88e3357be13ae7fcf8966144ad32f44def33/CHANGELOG.md#21323) describes Bash permission-check fixes involving wrappers, wildcard rules, working directories and commands whose execution differed from their checked form. It also changes error handling after hook allow decisions and permission-hook rewrites, adds long-hook progress heartbeats for print/SDK runs, and fixes several headless MCP edge cases. Experimental opt-in Code Mode adds another tool-calling surface.
22
+
23
+ These entries motivate repeating the existing transport and wrapper cases. They do not establish that those cases exercise every changed path; Code Mode, long-hook heartbeats and the broader sandbox changes were not exercised.
24
+
25
+ ## Serial model-free runs
26
+
27
+ Each leg ran through resource admission on the Mac, with only one native job at a time. The producer parent received an empty inherited environment plus an isolated HOME, config directory and fixed PATH. Each native child received its own fresh fake HOME and `CLAUDE_CONFIG_DIR`, strict fixture MCP configuration, a deterministic loopback provider and the literal key `synthetic-probe-not-a-credential`. Ambient agent markers and real credentials were absent. Nonessential traffic and native auto-update were disabled. No account authentication, external provider inference, installation or update occurred.
28
+
29
+ Both versions ran each leg separately with `--claude` naming its absolute installed binary and `--expected-version` naming that exact version:
30
+
31
+ | Producer leg | Additional arguments | 2.1.322 | 2.1.323 |
32
+ | --- | --- | --- | --- |
33
+ | Write transport | default Write case table | 9/9 pass | 9/9 pass |
34
+ | Production-name Bash transport | `--tool Bash --server-name agent-hub --permission-tool hub_permission_request --require-tool-use-id` | 9/9 pass | 9/9 pass |
35
+ | Bash command replacement | Bash arguments above plus `--rewrite-bash` | 2/2 pass | 2/2 pass |
36
+ | Host shell wrapper | `--bun` naming the resolved Bun 1.4.4 binary | 2/2 pass | 2/2 pass |
37
+
38
+ The nine transport cases cover allow, deny, missing tool, hook deny/allow, MCP error, disconnect, pending and deadline. Both pending cases reached their bounded external stop without writing a file. The rewrite cases never executed the original command. Wrapper control observed three requests/two permission calls and persistent cwd; normalized execution observed four requests/three permission calls, correct host cwd/environment and quoted paths, replay refusal, and exactly one effect.
39
+
40
+ Every one of the 44 native process groups was confirmed empty by the producer. Both wrapper helpers stopped successfully; independent readback also confirmed both observed host execution temporary directories had been removed. The producers signal only their owned unreaped process groups. No unrelated process was stopped.
41
+
42
+ ## Local artifact hashes
43
+
44
+ The JSON artifacts and before/after identity records remain in the owned local diagnostic directory. Their local paths and native output are not committed.
45
+
46
+ | Receipt JSON | SHA-256 |
47
+ | --- | --- |
48
+ | Write, control | `be977fddc44506069098aa38cf7779bd85c784b48e382d454ceb0ab3ea3cb5b8` |
49
+ | Write, candidate | `4eb1c96f30d6dca9f211e18f55320061d9beb9e9cbabd7bb0ce835e25c0c3335` |
50
+ | Bash, control | `f114c3df3d63e56407336e58adebac00e3482fd5bf54ac3d40e38facbbe0554d` |
51
+ | Bash, candidate | `90c129baaaa49bac6890ddcfaa62ed4da9cc0057eadcd71439570f57d6a225bf` |
52
+ | Rewrite, control | `7f0a4d84d27ad4364305cb3f43640607cde3a2895bec71eb27d88b0ba41ca5e4` |
53
+ | Rewrite, candidate | `b30656074cf0f9bd4c3642528d9c47a2bcbc2d0c927b5720d8ec53d001a3b7e7` |
54
+ | Wrapper, control | `0a8db5c053774c4b19229db9cc5ec5de9a0bbdce60d6976190dd07f8d79d15ed` |
55
+ | Wrapper, candidate | `1d11519cb14758c072f0467d609434752e2eddec4ee2e9522767e5564e0650b9` |
56
+
57
+ ## Evidence boundaries
58
+
59
+ This is isolated native transport and host-wrapper evidence. It does not prove real provider authentication, model-selected tools, person approval interaction, task-session resume, production-daemon task binding or complete native sandbox confinement. Monitor, mod-initiated calls and opt-in Code Mode were not exercised. This is not a runtime receipt gate. Binary fencing and the existing exact-version admission policy remain required; versions outside the verified list receive no qualification from this receipt.
@@ -0,0 +1,69 @@
1
+ # Codex 0.167.2 fresh-reviewer isolation receipt
2
+
3
+ Date: 2026-11-13. Platform: macOS arm64, Bun 1.4.4. This repeats the [0.167.0 model-free production preparation](2026-11-06-codex-0167-reviewer-isolation.md) for 0.167.2, the version installed on the machine where `ahub agents` reported `codex-review 0.167.2 refused`. Controls: 0.166.0 (verified, run on the committed tree) and 0.167.0 (model-free only, run beside 0.167.2 under the same provisional entry). Source base: `08d4b893` on main, with the exact-pinned `@staix/agent-mem@0.24.0` from a frozen install. No `codex exec`, `codex app-server`, model request, login, credential copy or live reviewer run was performed. The returned launch was inspected, never started. The person's real HOME, `~/.codex` and the global Codex install were never supplied to a Codex process or modified, and no running hub or hub home was touched.
4
+
5
+ Result: all model-free legs returned the expected outcome. 0.167.2 passed the model-free procedure. It is not added to `verified`: `docs/agent-notes/adapters.md` requires a successful, separately authorized model-backed hub tool call before a reviewer version is marked verified, and that run was not performed. It is unverified for 0.167.2, as is everything a model turn would show (tool selection, verdict delivery, the synthetic marker readback, real account authentication). Until then the person can run `ahub agents trust codex-review 0.167.2`, and every runtime proof still runs.
6
+
7
+ ## Source identity and re-read regions
8
+
9
+ `git ls-remote https://github.com/openai/codex.git` returned, for 0.167.2 (`rust-v0.167.2`), annotated tag object `08a3b12b3298577534a28b62ed976acf8de66eda` and peeled commit `ce21072c90d32c40af7a55b60b2fb35c84a43a6a`. The same readback returned the 0.167.0 tag object `cb41599ccbe371272892f156286a236aa097bada` and peeled commit `086ccc833bc9cf01024ad2dd6af7dbd421b6bf9a`, matching its receipt.
10
+
11
+ Each of the seven files read for 0.167.0 was fetched at both peeled commits and compared by SHA-256. All seven are byte-identical between the tags, so every region the 0.167.0 receipt read is the same code at the same line numbers:
12
+
13
+ | File (under `codex-rs/`) | SHA-256 at both tags |
14
+ | --- | --- |
15
+ | `exec/src/cli.rs` | `66643e8b3d5964b70cb8f231fb309312376272fb3ea87bcb6849f44cf112f8f6` |
16
+ | `config/src/mcp_types.rs` | `af5fb824c092cd74e3a42297979a4d250c332008f5409e14890253728747e71a` |
17
+ | `core/src/mcp.rs` | `2ae5ed00a6e26a46f62be65136047850aaa11a8e2ff849d7323eeea5bbc0f4c9` |
18
+ | `hooks/src/registry.rs` | `06e349e62e53eee6c3a7418667868d57119cbf52be99271137b7f8c14dea4d85` |
19
+ | `sandboxing/src/seatbelt.rs` | `ebd230e96ce456d95466406137995dc055cc8116ec32879b3ff4e8ddff5c65a3` |
20
+ | `core/src/session/mod.rs` | `c04716274b5ecfc91730908bf25159bc6498a368d10352a0fc311aae7182df62` |
21
+ | `core-plugins/src/manager.rs` | `9719bccd786891686ff2c6e2194aff4c6adc0065e75c41509ec4fe4dc1430ab9` |
22
+
23
+ - [Exec switches, lines 40-50](https://github.com/openai/codex/blob/ce21072c90d32c40af7a55b60b2fb35c84a43a6a/codex-rs/exec/src/cli.rs#L40): `--ephemeral`, `--ignore-user-config` and `--ignore-rules` remain independent global switches.
24
+ - [Apps projection, lines 279-285](https://github.com/openai/codex/blob/ce21072c90d32c40af7a55b60b2fb35c84a43a6a/codex-rs/core/src/mcp.rs#L279) and [registration, lines 464-485](https://github.com/openai/codex/blob/ce21072c90d32c40af7a55b60b2fb35c84a43a6a/codex-rs/core/src/mcp.rs#L464): unchanged, so effective feature readback stays required.
25
+ - [MCP schema, lines 243-245](https://github.com/openai/codex/blob/ce21072c90d32c40af7a55b60b2fb35c84a43a6a/codex-rs/config/src/mcp_types.rs#L243) and [291-297](https://github.com/openai/codex/blob/ce21072c90d32c40af7a55b60b2fb35c84a43a6a/codex-rs/config/src/mcp_types.rs#L291): a disabled server is not initialized; `enabled_tools` restricts, `disabled_tools` filters afterwards.
26
+ - [Registry, lines 179-197](https://github.com/openai/codex/blob/ce21072c90d32c40af7a55b60b2fb35c84a43a6a/codex-rs/hooks/src/registry.rs#L179): a non-empty legacy notify argv still becomes an after-agent hook independently of the hooks feature flag.
27
+ - [Session hook configuration, line 5822](https://github.com/openai/codex/blob/ce21072c90d32c40af7a55b60b2fb35c84a43a6a/codex-rs/core/src/session/mod.rs#L5822) and the [session-static comment, lines 2407-2410](https://github.com/openai/codex/blob/ce21072c90d32c40af7a55b60b2fb35c84a43a6a/codex-rs/core/src/session/mod.rs#L2407): `legacy_notify_argv: config.notify.clone()` and the session-static legacy notify comment are unchanged, so the host still pins `notify=[]`.
28
+ - [Plugin manager, lines 836-841](https://github.com/openai/codex/blob/ce21072c90d32c40af7a55b60b2fb35c84a43a6a/codex-rs/core-plugins/src/manager.rs#L836): the plugin-disabled early return of the default load outcome is unchanged.
29
+ - [Seatbelt glob compiler, lines 624-705](https://github.com/openai/codex/blob/ce21072c90d32c40af7a55b60b2fb35c84a43a6a/codex-rs/sandboxing/src/seatbelt.rs#L624): the anchored read/write denies, static-prefix variants and ancestor unlink denies are the same code.
30
+
31
+ Outside those seven files, the GitHub compare of `rust-v0.167.0...rust-v0.167.2` lists five commits and thirteen files, all read. Apart from the workspace version in `Cargo.toml`, tests and snapshots, the change is the incremental tool-declaration layout: two new features, `incremental_tools_legacy` (Amazon Bedrock, default off) and `incremental_tools_legacy_gcp` (GCP, default on), a `StepContext::incremental_tools_feature()` that selects the layout per provider, and, in incremental mode, top-level hosted web-search specs kept in the request while the other tool declarations move to world state (`core/src/session/{step_context,turn,world_state}.rs`, `core/src/compact_remote_v2_attempt.rs`, `core/config.schema.json`, `features/src/lib.rs`). Tool declarations are still taken from `model_visible_specs()`, so the set of tools offered is unchanged; only where they are declared changes. None of it touches MCP server registration, the Apps, plugins or hooks gates, legacy notify, `--ephemeral`, project trust or Seatbelt. The production preparation below still proved effective Apps, plugins and hooks disablement through its `features list` readback on 0.167.2.
32
+
33
+ ## Native production preparation
34
+
35
+ A throwaway producer outside the source checkout, in a private scratch directory, invoked the actual `codexReviewerBackend.prepare` from a worktree of main at the source base. Each leg used its own fresh root holding project, HOME, CODEX_HOME and TMPDIR. The child ran under `env -i` with only PATH, LANG, HOME, CODEX_HOME, TMPDIR and two fixture markers; PATH held a private directory with only a `node` link plus the system directories, so no global Codex was reachable. Before importing the backend, it rejected any extra variable, a `os.homedir()` that differed from HOME, and any home, CODEX_HOME or temp directory outside the root. The MCP transport was inert `/usr/bin/false` with no control token, and the private paths were `**/*.env`, `.private`, `nested/secret` and `~/private-proof`.
36
+
37
+ Three Codex versions were installed with `npm install --prefix` into separate private prefixes, with scratch HOME and cache and empty user and global npm configs. Each lockfile's integrity equals the registry's exact-version `dist.integrity`: 0.167.2 `sha512-6OFkr2ndzTdFb32OEiUlM9BgpeY8+wnMe8vRhuvt+22TnxVR39KnJ22Ghay98IY9OmEltoNgFN4GALUkxFQCOw==`, 0.167.0 `sha512-1FSQgbTIKAdTub5Ln6z36NT4eXDmBRkinfigzycbgn9yLZdJ3UdkQZqr0N7jnl8/D1xxT/Pz3Fl2l7S2dmRaFA==` (the manifest's reference value). The command was each prefix's `codex.js` launcher, resolved by production to its native arm64 binary. Temporary roots were removed after each leg, and the returned exec launch was never executed.
38
+
39
+ | Leg | Outcome | Elapsed |
40
+ | --- | --- | --- |
41
+ | Committed tree, 0.167.2, empty homes | Refused only at version admission, `causeClass: version`; verified set 0.146.0, 0.163.0, 0.164.0, 0.166.0 | 1801.18 ms |
42
+ | Control 0.166.0 on the committed tree, empty homes | All production preparation legs pass | 1753.76 ms |
43
+ | Control 0.166.0 on the committed tree, synthetic ambient config | All production preparation legs pass | 298.60 ms |
44
+ | With 0.167.2 provisionally in the local verified array (a stand-in for the person's machine trust), empty homes | All production preparation legs pass | 291.75 ms |
45
+ | Same provisional entry, synthetic ambient config | All production preparation legs pass | 284.51 ms |
46
+ | Control 0.167.0 under the same provisional entry, empty homes | All production preparation legs pass | 1796.99 ms |
47
+ | Control 0.167.0 under the same provisional entry, synthetic ambient config | All production preparation legs pass | 285.34 ms |
48
+
49
+ The first preparation against each freshly installed binary took about 1.8 s and the later ones about 0.3 s, consistent with a first-launch cost of the new native binary; all stayed inside the production limits. The provisional array held 0.167.0 and 0.167.2 for the four provisional legs and was reverted before any edit below; the committed tree refuses both.
50
+
51
+ The ambient file enabled Apps, plugins and hooks, set a legacy notify command and declared one stdio and one HTTP MCP server. Metadata preparation disabled the ambient servers, kept only the hub server with exactly `hub_review` and `hub_task_show`, and proved effective Apps, plugins and hooks disablement. Per-tool approval stays configured only for those two hub tools; actual MCP tool execution is outside this receipt.
52
+
53
+ | Version | Native binary SHA-256 | Production binary identity |
54
+ | --- | --- | --- |
55
+ | 0.167.2 | `97bc82fd46f117cf10efb95e6ff0c81dc4784f5797bcdc2cb75093ba09e4def0` | `sha256:28596b8867646e50ef492bc036a751fd63113c8d4360803f435fec69d2fbdbc2` |
56
+ | 0.167.0 (control) | `030316ecfbb41f4e7946e584b0063ef333b7a36cd312ba349f2f6869e39b62cc` | `sha256:213f7a2c8109c5f5158151b829bfc561bc76bbcdcce0b641c1e9a01b8b541e37` |
57
+ | 0.166.0 (control) | `39acf979729dd290f9a24ee38b2914e036c91b65952872e28ae2a6b88a7db7c1` | `sha256:77c2eae1013cec5acaa8a2d980bb760a7ca7657ebb9cb3033550cad787ab2fdd` |
58
+
59
+ Both controls' native digests and production identities equal the values in their receipts, so the procedure reproduces. Every successful launch returned `backend: codex`, `readOnly: true`, `strictMcp: true`, `ephemeral: true`, `current(): true`, an exec argv beginning `exec` and an explicit `-c notify=[]`. The evidence list was identical across all six successful launches and equal to the 0.167.0 list: `model-free-mcp-inventory-disabled-ambient`, `hub-tools-exact-allowlist`, `plugins-and-hooks-disabled`, `legacy-notify-disabled`, `apps-disabled-effective-feature-readback`, `web-search-disabled`, `project-untrusted`, `native-public-read-private-deny-write-deny`, `native-glob-and-symlink-private-deny`, `portable-core-name-and-state-deny`, `standard-host-credential-roots-denied`, `binary-config-stable`, `binary-hash-once-metadata-fence`, `session-ephemeral`.
60
+
61
+ Production's own native canaries passed for 0.167.2 (a returned launch means they ran and passed): public read, denied exact private read, denied nested private glob and symlink alias, denied portable-core `.env` and `.agenthub/state`, denied synthetic gh, kube and docker credential roots and credential alias, and denied creation of a new file with the file remaining absent. Production's metadata commands kept their 2-second command and 12-second overall limits and owned-group cleanup; none failed.
62
+
63
+ ## Compatibility and evidence boundaries
64
+
65
+ The verified reviewer versions stay 0.146.0, 0.163.0, 0.164.0 and 0.166.0. 0.167.2 is not added, and neither is 0.167.0: the area note requires the model-backed hub tool call first. The passing 0.167.2 legs ran with 0.167.2 in a local, uncommitted copy of the verified array, which is the same admission outcome the person's `ahub agents trust codex-review 0.167.2` produces, since trust lifts only the version pin and every proof still runs. The committed tree refuses 0.167.2 at version admission, as the first leg showed. The compat `receipt` pointer and the receipt manifest keep naming the 0.167.0 receipt; the `codex-review` comment in `src/adapters/compat.ts` lists this one as model-free only. The attached Codex adapter's capability pins (`NATIVE_PINS.codex`) are a separate contract and unchanged. No isolation implementation, sandbox ceiling or trust bypass changes. `docs/verified.json` is not restamped.
66
+
67
+ Unverified for 0.167.2: the single model-backed tool-call run (marker, head, verdict and cleanup readback), which needs the person's separate authorization; exec selecting the named default profile; model tool selection; real account authentication; effective web-search mode; and the effect of the new incremental tool-declaration layout on a real model turn. The network setting is configured disabled without a separate probe. No native Linux result is claimed. Same-user mutation after the final metadata check is outside atomic snapshot guarantees, and the bounded credential-root list is not a classifier for every private host file.
68
+
69
+ Source claims apply to the two peeled commits only. Each upgrade repeats the procedure; the throwaway producer is not a supported command and its raw records carry temporary paths, so they stay outside git. Exact-head hosted CI is separate evidence recorded on the PR.
@@ -0,0 +1,51 @@
1
+ # 0.39.0 release verification
2
+
3
+ This record covers release preparation and source review. It claims no installation, no running-hub upgrade to 0.39.0 and no live TUI launch.
4
+
5
+ ## Candidate
6
+
7
+ Version 0.39.0, prepared from main 7f75be57 (45 commits since v0.38.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.38.0: #1471, #1472, #1467, #1470, #1469, #1468, #1465, #1466, #1403, #1464, #1432, #1463, #888, #1462, #1461, #1460, #1459, #1458, #1375, #1457, #1426, #1456, #1455, #1453, #1445, #1450, #1452, #1440, #1451, #931, #1448, #1431, #1442, #1449, #1411, #1443, #1430, #1444, #1441, #1434, #1429, #1427, #1428, #1425, #1417, #1421, #1420, #1419, #1418, #1416, #1415, #1413, #1412, #1410, #1409, #1407, #1405, #1406.
12
+
13
+ - Every one of the 45 pull requests merged at a head whose required checks (`check (ubuntu-latest)`, `check (macos-latest)`, `seeded guards`) were green at that exact head; the conductor re-read each PR's check rollup at its merged head for this report.
14
+ - Each merged through the merge gate after hub approval at that head with no unresolved review thread. The approvals were not re-read one by one for this report; the per-task history on the board is the record. No merge is known to be bound to an approval at an earlier head.
15
+ - The connector and Copilot reviews often did not run (usage limits); where they did not, the hub review was the only review.
16
+
17
+ ## Native acceptance receipts
18
+
19
+ Receipts added under `docs/verification/` since v0.38.0: `docs/verification/2026-11-13-claude-implementer-2.1.323.md`, `docs/verification/2026-11-13-codex-01672-reviewer-isolation.md`.
20
+
21
+ 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.39.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.
22
+
23
+ ## Document review
24
+
25
+ `node scripts/check-docs.mjs` reported 26 stale documents: README.md, docs/adding-an-ai-tool.md, docs/addons/claude-mem.md, the ten notes under docs/agent-notes/ (README, adapters, benchmarks, budget, bus, daemon, local-worker, security-review, tasks, tests), docs/data-policy.md, docs/dogfood.md, docs/events.md, docs/memory.md, docs/operations.md, docs/profiles.md, docs/quickstart.md, docs/research.md, docs/roles.md, docs/sdlc.md, docs/security.md, docs/text-projection.md and src/cli/help.ts. Each was read against `git diff <stamp>..HEAD` of its verified paths; the corrections are in the commit "docs(release): 0.39.0 document review" and the restamp names that commit. The main corrections:
26
+
27
+ - docs/operations.md: command help for subcommands (#1433), the conductor tag in the Peers tab (#1414), `ahub roles` and `ahub study evidence` in the authority table, conductor eligibility (#1408), acon Space groups and 0.2 caps (#1375), the GSD init pointer (#1431), the `task_*` startup sub-phases (#1445), `ahub study evidence|check` (#931), observed-model sources (#1402), paused Codex credit diagnostics (#1440), planner pull refusals (#1430), moved-project MCP entries (#1423), `sdlc configure` (#1432), the sharded not-configured sync state (hub task 930), four stale agent-mem pin mentions, the 2.1.323 receipt, the 0.39.x N-1 line and the protocol table row.
28
+ - docs/security.md: reviewer quota admission and its settings risk, instructed `sdlc configure`, the security finding contract, pass and audit ledger, advisor surveys, plan intent fields, research evidence states, conductor eligibility, restoration launch diagnostics, Space scene data and the 2.1.323 receipt.
29
+ - docs/quickstart.md: the 0.39.0 upgrade note (reviewer quota defaults and opt-outs, the interactive conductor rule, the agent-mem pin with the shared-home upgrade order), the init role and track-config questions and an `ahub roles` row. README.md: roles at init, the security pass and audit, the observed model and reviewer quota admission.
30
+ - docs/events.md (`turn_end` model fields, numeric settings values, `sdlc_config_instruction` and `reviewer_accounting`), docs/memory.md (capture exclusions), docs/text-projection.md (converter fingerprint binding), docs/sdlc.md (positional finding ids), docs/research.md (owner-model backfill exception), docs/dogfood.md (the init roles row, audit settle), docs/profiles.md (inventory-changed origins), docs/roles.md (reviewer quota admission), docs/adding-an-ai-tool.md (role eligibility, `conductorStartText`, `observedModel`, the restamp checklist line).
31
+ - The agent notes gained the rules their areas acquired: role eligibility and observed turn models (adapters), reviewer accounting and deadlines (budget), evidence-read latching (local-worker), the new recovery feature gates, readbacks and help rules (daemon), the security pass, origin and settle (security-review), pull refusals, re-file head, security and evidence flows (tasks), and pin-raise fixture edits and fake knobs (tests).
32
+ - `src/cli/help.ts`: `--json` on `sdlc audit start`, `--color` on the survey, audit and configure forms, and the new doctor and budget rows; every command and flag matches `src/cli/main.ts`.
33
+ - No edit was needed in docs/addons/claude-mem.md, docs/data-policy.md, docs/agent-notes/README.md, benchmarks.md or bus.md.
34
+
35
+ ## Checks
36
+
37
+ - `node scripts/check-docs.mjs --require-fresh`: OK, 0 stale documents.
38
+ - `bun x tsc --noEmit`: clean.
39
+ - `bun scripts/build.mjs --check` (re-runs through the pinned Bun 1.4.2): fresh.
40
+ - `node scripts/check-package.mjs` with the CI-pinned npm 11.20.0: `package: OK (929 files, @staix/agent-hub@0.39.0)`.
41
+ - `bun scripts/readme-facts.ts`: OK.
42
+ - The release PR's exact-head CI run is the full gate; the conductor reads it before the merge.
43
+
44
+ ## Known gaps, not blocking
45
+
46
+ - The full suite was not run locally or on the remote host for this candidate; CI on both operating systems is the gate.
47
+ - No installation, running-hub upgrade or live TUI launch of 0.39.0.
48
+ - The document review checked statements against source only, not live native behavior.
49
+ - `ahub sdlc audit start|show` is classified console-only by the CLI although the daemon admits the configured conductor, and `--live-test` does not refuse `sdlc audit start`; both are follow-up work (hub task 933) after this release. docs/security.md states the daemon rule without claiming the CLI path.
50
+ - Since #1420 a headless Pi peer sends one bounded `get_state` call before each prompt; the Pi/Qwen benchmark driver uses that peer, so turn timing in a later collection may differ from earlier ones.
51
+ - codex-cli 0.167.x stays unverified for the Codex reviewer; 0.169.0 verification is a separate PR merged after this release.
@@ -0,0 +1,70 @@
1
+ # Codex 0.169.0 fresh-reviewer isolation receipt
2
+
3
+ Date: 2026-11-14. Platform: macOS arm64, Bun 1.4.4. Scope: issue #888, hub task 931. This repeats the [0.167.2 model-free procedure](2026-11-13-codex-01672-reviewer-isolation.md) for 0.169.0, with 0.166.0 (verified) and 0.167.2 as controls. The separately authorized [single model-backed review](2026-11-14-codex-0169-reviewer-tool-call.md) is recorded beside it.
4
+
5
+ Result: every model-free leg returned the expected outcome. 0.169.0 passed the committed reviewer proofs, the source and tag legs, and the app-server schema comparison. The global `codex` binary was not touched: all three versions were installed with `npm install --prefix` into private prefixes.
6
+
7
+ ## Source identity and re-read regions
8
+
9
+ `git ls-remote https://github.com/openai/codex.git` returned, for 0.169.0 (`rust-v0.169.0`), annotated tag object `a41fe5b443652cbdbee57717fbb9fd78d8d8b32a` and peeled commit `d32063f96c2dff1dc96af839b3952abb6acfeda4`. The same readback returned the 0.167.2 tag object `08a3b12b3298577534a28b62ed976acf8de66eda` (peeled `ce21072c90d32c40af7a55b60b2fb35c84a43a6a`) and the 0.166.0 tag object `593389380740f7b4762771573c447ccfdc59742f` (peeled `6ff1e1ca3b30fc8b914720681fcf5fe62e95f856`), matching their receipts.
10
+
11
+ The seven files read for 0.167.2 were fetched at both peeled commits and compared by SHA-256. One is byte-identical and six changed, so each changed one was diffed and its re-read region reviewed:
12
+
13
+ | File (under `codex-rs/`) | 0.167.2 SHA-256 | 0.169.0 SHA-256 |
14
+ | --- | --- | --- |
15
+ | `hooks/src/registry.rs` | `06e349e62e53eee6c3a7418667868d57119cbf52be99271137b7f8c14dea4d85` | same |
16
+ | `exec/src/cli.rs` | `66643e8b3d5964b70cb8f231fb309312376272fb3ea87bcb6849f44cf112f8f6` | `7fbc3d9d481513488dcceea2a6c8fdcd045a2b2de6aaa1d30379354cd66b04d6` |
17
+ | `config/src/mcp_types.rs` | `af5fb824c092cd74e3a42297979a4d250c332008f5409e14890253728747e71a` | `3bc2f134d6b9992022f38727d21ce7aeb9bc157788b2d1d1912f88c7d65afe0d` |
18
+ | `core/src/mcp.rs` | `2ae5ed00a6e26a46f62be65136047850aaa11a8e2ff849d7323eeea5bbc0f4c9` | `55640da23629bc9684386e7f76d4365a7dec7dc499c0582e4db1ae4f24956d2f` |
19
+ | `sandboxing/src/seatbelt.rs` | `ebd230e96ce456d95466406137995dc055cc8116ec32879b3ff4e8ddff5c65a3` | `9482cfbb53d624f1421b6e05b231ee567b18ed0973c0547b54196dac351ffcf4` |
20
+ | `core/src/session/mod.rs` | `c04716274b5ecfc91730908bf25159bc6498a368d10352a0fc311aae7182df62` | `6eecc35de03cb80b3ceb1b5e0e43ff0f8e926d75376bec00219fcb967be1afc8` |
21
+ | `core-plugins/src/manager.rs` | `9719bccd786891686ff2c6e2194aff4c6adc0065e75c41509ec4fe4dc1430ab9` | `a7c95dbdbda54e8d3d195be4f5d77cef71619c268cb3b974d9cec40f1e9814b9` |
22
+
23
+ - Exec switches: `--ephemeral`, `--ignore-user-config` and `--ignore-rules` are unchanged. A new global `--trust` switch saves project trust and persists even with `--ephemeral`, and does not override an explicitly untrusted project. The hub never passes `--trust` and pins the project `untrusted`, and the production proof reads `project-untrusted` back.
24
+ - MCP schema: a disabled server is still not initialized. The new `can_defer_stdio_startup` serves the `mcp_lazy_stdio_startup` feature, which is under development and default off.
25
+ - Apps and MCP registration (`core/src/mcp.rs`): plugin-manager and runtime-auth plumbing only. In the session, the Apps server is added as a required MCP server only when `turn_context.apps_enabled()` holds, and the hub disables Apps, which the `features list` readback proves.
26
+ - Registry: identical, so a non-empty legacy notify argv still becomes an after-agent hook independently of the hooks flag. `legacy_notify_argv: config.notify.clone()` is unchanged in the session and only moved (line 5822 to 6167), so the explicit `-c notify=[]` is still required and still passed.
27
+ - Plugin manager: every `plugins_enabled` early return that produced the default load outcome is still present (lines 894, 918, 1105, 1745, 1773 and 2057 in 0.169.0).
28
+ - Seatbelt: the compiler now resolves the policy once (`resolve_for_enforcement`) instead of calling the policy getters one by one, and removed dead legacy helpers. It adds a `ProcessWithInheritedTerminal` profile that denies `TIOCSTI`. The anchored read/write denies, static-prefix variants, ancestor unlink denies and the unreadable-glob compiler read the same inputs. The native sandbox canaries below are the behavioral check.
29
+ - Web search: the session now resolves a model search binding. Hosted search is gated by the `hosted_search_policy` feature (under development, default off) and by `apps_enabled()`. The hub still requests web search disabled. Its effective turn mode is not read back, as for earlier versions.
30
+
31
+ Outside those seven files the compare lists 471 commits, and a blobless clone of both tags lists 2570 changed paths (the GitHub compare API caps at 300 files). Of those, 52 `core`, 27 `exec-server`, 22 `core-plugins`, 14 `rmcp-client`, 14 `login`, 13 `network-proxy`, 12 `state`, 12 `config`, 8 `linux-sandbox`, 8 `cli`, 7 `sandboxing`, 7 `exec`, 4 `app-server` and 3 `features` non-test files sit under isolation-relevant crates. I read the whole `features`, `exec`, `cli/mcp_cmd` and seven-file diffs listed above and did not read the rest line by line. The `features` diff adds under-development flags (`hosted_search_policy`, `agent_message_board_mcp`, `mcp_lazy_stdio_startup`, `command_sessions_world_state`) and moves several to stable and default on (`untrusted_as_tool_output`, `code_mode_host_grpc`, `code_mode_host_output_truncation`, `unified_image_budget`, `retain_client_tool_outputs`, `guardian_include_additional_context`); none gates MCP registration, Apps, plugins, hooks, legacy notify, ephemeral sessions, project trust or Seatbelt. This is scoped source evidence for the two peeled commits, not a claim about the unread files.
32
+
33
+ ## Native production preparation
34
+
35
+ A throwaway producer outside the source checkout, in a private scratch directory, called the committed `runReviewerProofs` (`scripts/compat-receipts/proofs/reviewers.ts`), which runs the actual `codexReviewerBackend.prepare`. Each leg used its own fresh root holding project, HOME, CODEX_HOME and TMPDIR. The child ran with a clean environment: only PATH (a private directory holding `node` and `bun` links, then `/usr/bin:/bin`), LANG, LC_ALL, TZ, TERM and the private homes. The committed worker's own environment allowlist and bounded runner were used.
36
+
37
+ Three Codex versions were installed with `npm install --prefix` into separate private prefixes, with scratch cache and empty user and global npm configs. Each lockfile's integrity for `@openai/codex` equals the registry's exact-version `dist.integrity`: 0.169.0 `sha512-KhzYlkKPxoNssR8CEm45IjqnFWn7UtlF4CiD3tOJPea51xBs7MaHy0UQG9GSbCqk6Lrjn5QdJDV0QD1/FgWlGw==`, 0.167.2 `sha512-6OFkr2ndzTdFb32OEiUlM9BgpeY8+wnMe8vRhuvt+22TnxVR39KnJ22Ghay98IY9OmEltoNgFN4GALUkxFQCOw==` and 0.166.0 `sha512-2Szlp1l1cz5TX1ccpX4Zok3DZrot9xeZe0km+6/1v8JmqxADwyJxKBJah4dBymkwtS25j/u6dipJusTOI97Z8Q==`.
38
+
39
+ | Leg | Outcome | Elapsed |
40
+ | --- | --- | --- |
41
+ | Committed tree, 0.169.0 | Refused at version admission before trust (`version-negative` pass), then 17 of 17 runnable legs pass, including empty-home and ambient prepares and all 14 attested markers | 675 ms |
42
+ | Control 0.167.2 | 17 of 17 runnable legs pass | 669 ms |
43
+ | Control 0.166.0 (verified) | 16 of 16 runnable legs pass; `version-negative` is not applicable | 560 ms |
44
+
45
+ In all three runs the four manifest legs that no model-free producer can prove stayed not-run: `model-backed-hub-call` (`model-required`), `control` (not a per-version leg), `source-impact` (`source-review-required`, answered by the section above) and `tag-binding` (answered by the tag objects above).
46
+
47
+ | Version | Native binary SHA-256 | Production binary identity |
48
+ | --- | --- | --- |
49
+ | 0.169.0 | `739cda86e15d30a6e2b40cf8dcbbfb988aaf48b305b27065573bb8e9fd41d002` | `sha256:5cb2fa931709a799a155da3685c5dcd5be751a26dffdf6d947f4b9d4c5e9d88d` |
50
+ | 0.167.2 (control) | `97bc82fd46f117cf10efb95e6ff0c81dc4784f5797bcdc2cb75093ba09e4def0` | `sha256:28596b8867646e50ef492bc036a751fd63113c8d4360803f435fec69d2fbdbc2` |
51
+ | 0.166.0 (control) | `39acf979729dd290f9a24ee38b2914e036c91b65952872e28ae2a6b88a7db7c1` | `sha256:77c2eae1013cec5acaa8a2d980bb760a7ca7657ebb9cb3033550cad787ab2fdd` |
52
+
53
+ Both controls' native digests and production identities equal the values in their receipts, so the procedure reproduces. A returned launch means production's own native canaries ran and passed: public read, denied exact private read, denied nested private glob and symlink alias, denied portable-core `.env` and `.agenthub/state`, denied synthetic gh, kube and docker credential roots and alias, and denied creation of a new file.
54
+
55
+ ## App-server schema comparison
56
+
57
+ `codex app-server generate-json-schema --out <dir>` (and `--experimental`) ran with the native binaries under a clean environment, for 0.169.0 and 0.167.2:
58
+
59
+ | Bundle | Files | Client request methods | Server requests, notifications | Removed types, removed properties, newly required fields, removed enum values |
60
+ | --- | --- | --- | --- | --- |
61
+ | Stable | 322 to 329 | 106 to 109 (adds `account/securitySetup/read`, `modelProvider/config/write`, `modelProvider/list`) | 10 and 86, unchanged | none (678 to 700 definitions) |
62
+ | Experimental | 470 to 479 | 180 to 184 (adds the three above and `thread/prepareApprovedPlan`) | 11 and 86, unchanged | none (840 to 864 definitions) |
63
+
64
+ Thirty-nine stable and fifty-four experimental files differ in content. The comparison found no removed type, no removed property, no newly required field and no removed enum value in any shared definition; it did not classify other edits (descriptions, new optional fields, widened enums). The methods the hub's `codex-appserver.ts` uses (`thread/start`, `thread/resume`, `thread/revert`, `turn/start`, `turn/steer`, `turn/interrupt`, `skills/list`, `account/rateLimits/read` and the notifications it handles) are all still present. This is a schema comparison, not a run of the attached app-server adapter against 0.169.0: attached Codex compatibility is a different COMPAT entry and is not changed here.
65
+
66
+ ## Compatibility and evidence boundaries
67
+
68
+ The verified reviewer versions become 0.146.0, 0.163.0, 0.164.0, 0.166.0 and 0.169.0 only together with the [model-backed receipt](2026-11-14-codex-0169-reviewer-tool-call.md). 0.167.0 and 0.167.2 stay unverified: their model-backed runs were not performed or did not complete.
69
+
70
+ Source claims apply to the two peeled commits only. Each upgrade repeats the procedure; the throwaway producer is not a supported command, and its raw records carry temporary paths, so they stay outside git. Exact-head hosted CI is separate evidence recorded on the PR.
@@ -0,0 +1,48 @@
1
+ # Codex 0.169.0 reviewer tool-call receipt
2
+
3
+ Result: passed. One authorized native review persisted one approved verdict that carried the required private synthetic marker, with the stored head matching the fixture head. Date: 2026-11-14, macOS arm64, Bun 1.4.4. Scope: issue #888, hub task 931. This supplements the [model-free isolation receipt](2026-11-14-codex-0169-reviewer-isolation.md). No native model retry was made.
4
+
5
+ ## Fixture and model-free proof
6
+
7
+ The fixture follows the [corrected 0.166.0 procedure](2026-11-02-codex-0166-reviewer-tool-call.md): the instruction and the marker sit in one accepted `plan.risks` item, because the production review request omits task detail when an accepted plan exists, and a review-only reviewer receives a withheld done summary. A throwaway harness outside git (private scratch directory, not a supported command) started the production `startDaemon` with `ReviewerPrintPeer`, `codexReviewerBackend`, the stdio plugin and `Tasks`. A temporary builder proposed and accepted a synthetic arithmetic task (`score.ts` returning `a + b`), a temporary inspector was attached, and the builder's completion triggered the native review. The harness neither called `hub_review` on the model's behalf nor substituted a verdict.
8
+
9
+ Before the native run, the same harness ran twice (before and after the root move described below) against the committed `test/fakes/fake-codex-reviewer.ts` (no account, no model) and each time returned one approved verdict, one attempt, the marker and head present in the review envelope and the done summary withheld. The harness wrapped the original `ReviewerPrintPeer.review`: immediately before entering it, it asserted that the review envelope carried the marker and the exact fixture head and withheld the done summary, and only then created its persistent exclusive one-attempt fence (`O_EXCL`). The envelope and the marker value were not retained in the repository.
10
+
11
+ ## Four refused starts, before any model request
12
+
13
+ The native harness was started four times before the run below. Each stopped at `start` with `reviewer isolation unavailable [cause: sandbox_proof]`, before a task existed, so before the fence was created and before any model request. The fence file for the native run did not exist until the fifth start. The cause was the fixture, not 0.169.0:
14
+
15
+ - The fixture's `local.deny` list named `~/.jcode` among the standard credential and tool-home roots. Bisecting model-free with the committed `prepare`, denying that one path alone fails the sandbox proof for the verified 0.166.0 control and for 0.167.2 as well as 0.169.0, and every other path in the list passes (`.codex`, `.ssh`, `.aws`, `.config`, `.gnupg`, `.claude`, `.kimi`, `.kimi-code`, `.agenthub`, `.kube`, `.docker`, `.netrc`, `.git-credentials`, `Library/Keychains`, `.gemini`, `.qwen`). I did not diagnose why that denial fails the canary and I did not change product code. The fixture list is the harness's choice, not the project's `local.deny` default.
16
+ - Two guesses did not help and are recorded so the sequence is complete: moving the per-run root from the scratch directory to the system temp directory (third refusal onward), and running the 0.169.0 prefix from a copy outside `~/.jcode` (fourth refusal; the copy's production binary identity, read model-free, equals the original prefix's).
17
+ - The fifth start dropped `~/.jcode` from the fixture's deny list. It passed and ran the review below, with the root in the system temp directory and the prefix copy.
18
+
19
+ ## One production review
20
+
21
+ | Evidence | Observed |
22
+ | --- | --- |
23
+ | Tested source head | `dcff79a1e26a4f900d845e55d3ab6693d6ea0d4b`; the branch was later rebased on main, which changed only `quietSyncError` in `src/hub/daemon.ts`, so `src/adapters/` and `plugins/agent-hub/server.js` are byte-identical to the tested tree |
24
+ | Native version / binary identity | 0.169.0 / `sha256:5cb2fa931709a799a155da3685c5dcd5be751a26dffdf6d947f4b9d4c5e9d88d` |
25
+ | Isolation at start | `readOnly`, `strictMcp` and `ephemeral` true, 14 model-free evidence markers (read model-free from the same binary; the actual review profile hash was not captured) |
26
+ | Fixture task / reviewer | 1 / `codex-review` |
27
+ | Review envelope before the native call | marker and exact head present, done summary withheld |
28
+ | Persisted state / verdict count | `approved` / 1 |
29
+ | Stored refs commit equals the fixture head | true |
30
+ | Required marker present in the persisted history | true |
31
+ | Marker SHA-256 | `d7260ff3c4a66feaa053c9a115d8bb0ce0ba3182e54aa06d3db894cf878eb10c` |
32
+ | History SHA-256 | `f085f466c7a62f4c823cf540c42461c00c97c28824068f2c9c4df8e1e18be6c7` |
33
+ | Review attempts / final peer state | 1 / idle |
34
+ | Fixture start / verdict readback, UTC | 2026-11-14 01:28:34.062 / 01:28:55.510 |
35
+
36
+ Read-only SQLite readback found exactly one persisted reviewer verdict for the task. The tool trace was not separately recorded for this run, so the receipt rests on the persisted verdict, its marker and its bound head: a verdict stored through `hub_review` bound to the exact head and the marker means the model called `hub_review` with both, which it could only learn from the accepted plan.
37
+
38
+ ## Isolation and cleanup
39
+
40
+ The fixture used exact-version admission only in its fresh temporary hub home and changed no real machine trust record. The child ran with a clean environment and fresh HOME, CODEX_HOME and TMPDIR. One `auth.json` symlink referenced the configured account; no credential value or personal configuration was read or copied. The run was admitted by `dot admit`.
41
+
42
+ Before and after the run the account's auth metadata fingerprint (filesystem metadata, no contents) was unchanged: SHA-256 `3f2633eabf64c4e9451ac2a370de140eedb2d555ed577b7e3b5518d380eb7e6f`. The auth symlink was removed, `score.ts` still held its synthetic source, the daemon stopped, and a process-table scan for the fixture roots and the 0.169.0 prefix found zero remaining processes. The per-run roots and the prefix copy were removed. Account paths, token values, the marker value and model prose remain outside the repository.
43
+
44
+ ## Admission and limits
45
+
46
+ This receipt and the [model-free receipt](2026-11-14-codex-0169-reviewer-isolation.md) together qualify 0.169.0 for `COMPAT["codex-review"].verified` alongside 0.146.0, 0.163.0, 0.164.0 and 0.166.0. It changes neither attached-Codex compatibility nor the exact-version trust path, runtime proofs or isolation boundaries; every launch still runs each proof.
47
+
48
+ This is one synthetic production-boundary receipt on macOS. It does not establish deployment, native Linux behavior, every review workflow, universal orphan detection, or the effective network and web-search mode in a model turn, neither of which was separately measured. 0.167.0 and 0.167.2 remain unverified.
@@ -0,0 +1,45 @@
1
+ # Pi 1.5.2 model-free compatibility receipt
2
+
3
+ Date: 2026-11-14. Hub task 961 (re-file of hub task 950), Refs #888 and #1447 T6. This repeats the [Pi 1.5.0 receipt](2026-11-03-pi-150-compat.md) for the published `@earendil-works/pi-coding-agent@1.5.2`. Same legs, model-free, no account. The person had already trusted 1.5.2 locally (`ahub status` showed "pi 1.5.2 trusted"); this receipt is what lets the verified set carry it.
4
+
5
+ **Decision: add `1.5.2` to Pi `verified`.** Every leg passed. No range is inferred: the Pi entry still has no `line`, so `1.5.1` and any other version need the person's `ahub agents trust pi <version>`. Version `1.5.1` was not tested and stays refused.
6
+
7
+ ## Identity and isolation
8
+
9
+ - Package: `@earendil-works/pi-coding-agent` 1.5.2, installed from the registry into a private npm prefix with a scratch HOME, cache and temporary directory and empty npm user and global config files, with `--ignore-scripts`. The person's `~/.pi` was not touched by the install.
10
+ - npm integrity: `sha512-mUWI04rqF1Vd/m1q+Ps1XeWsTXEVvRUnsmRa83I3Dzua0Tx5bYS93imeqtIfrXf7PkkaR6ERz+AuQhIJlom5yA==`, read from the installed lockfile and equal to the registry's `dist.integrity`. The package carries no `gitHead`.
11
+ - Native `dist/cli.js` SHA-256: `8189b66abc4f9f431dbb70941dcba690d76d040de1fbfff212886be35a53639d`. This is the same value the 1.4.0 and 1.5.0 receipts record, so the launcher entry file did not change across 1.4.0, 1.5.0 and 1.5.2. The changes are in other files of the package and are exercised by the legs below.
12
+ - Host: macOS arm64, Bun 1.4.4, Node 24.18.1, repository at `ef96fa494689770a594bffdf7d3fd110c633c636`.
13
+ - The producer ran with `env -i` and only `HOME` and `TMPDIR` in a scratch directory plus a `PATH` to the Node and Bun binaries. Each native leg used an empty temporary HOME and `PI_CODING_AGENT_DIR`, a temporary cwd and session directory and invented loopback bridge settings (token `fixture`). No account, token, prompt or inference.
14
+ - Real configuration: SHA-256 of every file under the person's `~/.pi/agent` (excluding sessions, logs, caches, installs and `bin`), the `pi` launcher binaries and the listing of installed Pi releases was taken immediately before and after a second producer run: 20 entries, identical. This bracket covers the Pi side only.
15
+
16
+ ### What the whole-home comparison did and did not show
17
+
18
+ A first, wider comparison (23,622 files, the Pi side plus everything under `~/.qwen`) took about four minutes either side of a producer run and was **not** identical: three files under `~/.qwen` differed (a chat transcript, the month's token-usage file and one file-history entry), with modification times 07:51:37 (the chat transcript and the usage file) and 07:40:02 (the file-history entry) on the host's clock. The producer started at 07:50:40, so the 07:40:02 entry was created during the first scan itself, before the producer ran, and the scan listed it only the second time. Two Qwen ACP servers were running on the host (one for 17 hours). The producer never starts or reads Qwen, sets `HOME` to a scratch directory, and the `~/.pi` entries inside that same comparison were identical, so I attribute the three differences to the running Qwen sessions. I cannot prove that from the comparison alone: the scan was not atomic and the producer was not the only thing running. The tight Pi-only bracket above is the evidence this receipt rests on for `~/.pi`. The 1.5.0 receipt's "9551 entries, identical" claim for both directories was not reproduced here for `~/.qwen`.
19
+
20
+ ## Results
21
+
22
+ | Leg | Result | Evidence |
23
+ | --- | --- | --- |
24
+ | Native identity | pass | `--version` returned exactly `1.5.2`, exit 0, empty stderr; package name and version checked independently. |
25
+ | Real CLI extension load and RPC session identity | pass | `--mode rpc` with the hub extension: `get_state` succeeded with a session id and file, `messageCount` 0; the extension emitted `session_start` and `session_shutdown`. |
26
+ | Installed SDK extension registration | pass | The 1.5.2 `DefaultResourceLoader` and `createAgentSession` loaded this checkout's extension and registered exactly `compat_probe` as the active tool, with no builtin tools. |
27
+ | Managed tool callback and receipt replay | pass | The registered callback was invoked without a prompt and posted to the isolated bridge through the real `PiToolReceipts`; two identical calls returned identical success with one effect. |
28
+ | Failed tool result | pass | The bridge fixture denial returned `failed: true` and the extension returned `isError: true`. |
29
+ | Host permission modes | pass (host fixtures) | `test/permission-modes.test.ts` "Pi mode grants edits once, keeps shell on the console, and ask restores the console path": 1 pass, 12 assertions. |
30
+ | Version admission | pass (host fixtures) | `test/pi-compat.test.ts` and `test/compat.test.ts`: 52 pass, 0 fail, 427 assertions. |
31
+ | Provider requests | pass | Zero requests reached the loopback provider; no prompt was submitted. Native and SDK stderr were empty. |
32
+
33
+ Producer result: `pi 1.5.2 model-free receipt: PASS`, on two runs. The producer is the 1.5.0 one with the version constants and driver file name changed (`pi-152-model-free.ts`, `pi-152-native.mjs`, scratch HOME prefix `ahub-961-`); no assertion was relaxed, and `pi-152-native.mjs` is byte-identical to `pi-150-native.mjs`.
34
+
35
+ ```sh
36
+ bun docs/verification/pi-152-model-free.ts <prefix>/node_modules/.bin/pi <prefix>/node_modules/@earendil-works/pi-coding-agent
37
+ env -u AGENTHUB_HOME -u AGENTHUB_PROJECT_DIR -u AGENTHUB_STATE_DIR bun test test/pi-compat.test.ts test/compat.test.ts
38
+ env -u AGENTHUB_HOME -u AGENTHUB_PROJECT_DIR -u AGENTHUB_STATE_DIR bun test test/permission-modes.test.ts --test-name-pattern 'Pi mode grants'
39
+ ```
40
+
41
+ ## Not verified
42
+
43
+ - Account-backed inference, a model-generated tool request, a real provider's quota behavior and interactive TUI coexistence. The SDK callback leg does not claim model-generated tool dispatch.
44
+ - Linux and Intel macOS. No other Pi release is inferred, including 1.5.1.
45
+ - #1447's live-leg acceptance is not recorded here, so #1447 stays open. #1248's producer gaps stay in #1248.
@@ -0,0 +1,39 @@
1
+ # 0.40.0 release verification
2
+
3
+ This record covers release preparation and source review. It claims no installation, no running-hub upgrade to 0.40.0 and no live TUI launch.
4
+
5
+ ## Candidate
6
+
7
+ Version 0.40.0, prepared from main cdbf10b67 (28 commits since v0.39.0, 14 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.39.0: #1526, #1525, #1524, #1521, #1508, #1520, #1509, #1518, #1519, #1507, #1492, #1505, #1506, #1499, #1503, #1502, #1501, #1500, #1498, #1497, #1491, #1494, #1487, #1489, #1485, #1476, #1474. The release-prepare generator also matched #1473 in a commit subject; it is the issue for PR #1485, not a pull request. The generator was not changed in this release.
12
+
13
+ GitHub reported completed successful checks for the final PR heads of all 27 PRs listed above; skipped optional jobs are not treated as successful full-gate evidence. The public board snapshot reports current approvals matching those heads for #1526, #1525, #1524, #1521, #1508, #1520, #1509, #1518, #1519, #1507, #1492, #1505, #1506, #1503, #1502, #1501, #1500, #1498, #1497, #1491, #1494, #1487, #1489, #1485 and #1474. Detailed hub history was readable for ten of those tasks; the remaining approvals are board-snapshot evidence, not a separately inspected history. The other two PRs have the distinct provenance below.
14
+
15
+ PR #1476 (hub task 933) was approved at `633f73a5f5e7fd552b47d145f8b0bcd348f4a399`, then rebased to merged PR head `26452584fe0dc357609bca84fa2bcaf7edf948d6`. The conductor verified on 2026-11-16 that the history contains no second approval. Both one-commit changes touch the same five files and have identical added and removed lines; their full patch bytes and stable patch ids differ with the rebase context. The rebased head was not re-reviewed. PR #1499 is a Dependabot update with no linked hub task. GitHub review submissions and hub verdicts are separate evidence.
16
+
17
+ PR #1527 was merged after the original candidate was prepared. The board reports approval at its final head `231692f446345003e5078b5bb20a44fb32e9be37`, and GitHub reports successful Ubuntu, macOS and seeded-guard aggregates at that head. One watcher finding remains open and is tracked separately as hub task 981: the draft-deferred macOS aggregate can temporarily be reported failed after a PR becomes ready, before its new aggregate appears. It does not change the merge gate.
18
+
19
+ ## Native acceptance receipts
20
+
21
+ Receipts added under `docs/verification/` since v0.39.0: `docs/verification/2026-11-14-codex-0169-reviewer-isolation.md`, `docs/verification/2026-11-14-codex-0169-reviewer-tool-call.md`, `docs/verification/2026-11-14-pi-152-compat.md`, `docs/verification/2026-11-16-pi-loopback-1447.md`, `docs/verification/pi-152-model-free.ts`, `docs/verification/pi-152-native.mjs`.
22
+
23
+ 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.40.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.
24
+
25
+ ## Document review
26
+
27
+ The stale-document review covered README, security, operations, quickstart, dogfood, SDLC, events, memory, profiles, adding-an-ai-tool, the claude-mem add-on and the adapters, benchmarks, budget, bus, daemon, local-worker, security-review, tasks and tests agent notes. Source changes were compared with each document's declared paths. Corrections cover the 0.40 release facts, CLI output and roadmap R3, Pi dependency preparation, checkpoint fencing, question-answer provenance, event fields and CI run selection. After rebase the reviews were reconciled with #1527 and restamped at `1485f322ca22fc2700110d71d7109992a3c276df`. The CLI help audit compared dispatch, subcommands and flags to the CLI and native entries; it found and corrected omitted ASCII, roster-list and retired pet-window forms. The fresh-docs check is rerun on the final candidate.
28
+
29
+ ## Checks
30
+
31
+ On macOS with Bun 1.4.4, `bun test test/published-protocol-compat.test.ts --timeout 20000` passed 5 tests and 55 assertions after installing both exact-locked published fixtures. The first attempt passed the 0.39.0 N-1 cases but failed the two protocol-floor cases because the 0.25.0 fixture had not yet been installed. This is isolated fixture evidence, not live upgrade or shared-home evidence.
32
+
33
+ Before rebase, with the same help corrections, `bun test test/help.test.ts` passed 31 tests and 21499 assertions. It checks command coverage, existing help forms and flags, per-flag descriptions and examples; it is not a native-account run.
34
+
35
+ The full release check and the release PR's exact-head CI remain separate gates; their results belong to the PR evidence at the candidate head.
36
+
37
+ ## Known gaps, not blocking
38
+
39
+ The published-package fixtures establish the named wire cases, not a live upgrade, shared-home file compatibility or native acceptance. This preparation did not install or run 0.40.0 in the person's environment. Publication, registry readback and the GitHub Release body remain pending the release gates and the person's release consent.
@@ -0,0 +1,39 @@
1
+ # Pi localhost listener decision
2
+
3
+ Hub task 967, Refs #1447 T5b. Decision: no listener grant is shipped on the
4
+ evidence available. Pi's existing Seatbelt profile and external egress policy
5
+ remain unchanged. This is a decision about the tested mechanisms, not a claim
6
+ that every possible mechanism is impossible.
7
+
8
+ ## Evidence
9
+
10
+ The native macOS arm64 experiments from hub task 949 used Bun 1.4.2 and no live
11
+ Pi session, model or account. Their source is preserved at commit
12
+ `ad4ae27118a05bdc6283ba8f6bdd621c2848dee2`; the observations are recorded in
13
+ the T5b issue comment on #1447.
14
+
15
+ - Local `localhost` matchers for bind and inbound allowed a wildcard bind. The
16
+ experiment did not prove that a non-loopback peer could not reach it.
17
+ - Local `localhost` bind with remote `localhost` inbound and outbound refused
18
+ the localhost listener positives. The unrestricted control reached the
19
+ fixture-owned non-loopback interface, but the restricted listener did not
20
+ start. This is not evidence of a safe usable listener.
21
+ - The raw socket egress checks reported kernel refusal for non-loopback egress
22
+ under both the existing and experimental profiles. They do not establish
23
+ inbound isolation.
24
+
25
+ No new native run was made for this decision. In particular, the required
26
+ negative connection from a non-loopback interface to a working restricted
27
+ listener remains unproven. The failed second combination is not retried without
28
+ new evidence.
29
+
30
+ ## Available separate check path
31
+
32
+ For an eligible, non-private accepted task, `hub_check_start` can run permitted
33
+ tests on an exact Git ref in the opt-in isolated container runner. Its receipt
34
+ names the platform and outcome; it is Linux evidence, not proof that a listener
35
+ works or is isolated in Pi's macOS sandbox. Availability depends on configured
36
+ runner admission, and no live Pi receipt is claimed here. See `docs/operations.md`
37
+ for the runner's bounds. Listener-dependent tests remain outside Pi-local
38
+ focused checks until a distinct mechanism supplies the native positive and
39
+ non-loopback denial proof required by T5b.
@@ -0,0 +1,57 @@
1
+ import {mkdtempSync, mkdirSync, readFileSync} from 'node:fs';
2
+ import {join, resolve} from 'node:path';
3
+ import {homedir} from 'node:os';
4
+ import {fileURLToPath} from 'node:url';
5
+ import assert from 'node:assert/strict';
6
+ const launcher=resolve(process.argv[2] ?? join(homedir(),'.pi/agent/bin/pi'));
7
+ const packageRoot=resolve(process.argv[3] ?? join(homedir(),'.pi/agent/install/releases/1.5.2/node_modules/@earendil-works/pi-coding-agent'));
8
+ const extension=fileURLToPath(new URL('../../src/pi/extension.ts',import.meta.url));
9
+ const driver=fileURLToPath(new URL('./pi-152-native.mjs',import.meta.url));
10
+ import {PiToolReceipts} from '../../src/pi/tool-receipts.ts';
11
+ const home=mkdtempSync('/tmp/ahub-961-pi-native-home.'); mkdirSync(join(home,'agent'));
12
+ const pkg=JSON.parse(readFileSync(join(packageRoot,'package.json'),'utf8'));
13
+ assert.equal(pkg.name,'@earendil-works/pi-coding-agent');assert.equal(pkg.version,'1.5.2');
14
+ const version=Bun.spawn([launcher,'--version'],{cwd:home,env:{HOME:home,PATH:process.env.PATH!,PI_CODING_AGENT_DIR:join(home,'agent')},stdin:'ignore',stdout:'pipe',stderr:'pipe'});
15
+ const versionTimer=setTimeout(()=>version.kill(),10000);
16
+ const [versionCode,versionOut,versionErr]=await Promise.all([version.exited,new Response(version.stdout).text(),new Response(version.stderr).text()]);clearTimeout(versionTimer);
17
+ assert.equal(versionCode,0);assert.equal(versionOut.trim(),'1.5.2');assert.equal(versionErr,'');
18
+ const ledger=new PiToolReceipts(join(home,'hub.db'));
19
+ let effects=0, providers=0; const events:any[]=[];
20
+ const bridge=Bun.serve({hostname:'127.0.0.1',port:0,async fetch(req){
21
+ const url=new URL(req.url); if(req.headers.get('authorization')!=='Bearer fixture')return new Response('forbidden',{status:403});
22
+ if(url.pathname==='/commands') {await Bun.sleep(25);return Response.json({command:null});}
23
+ const body=await req.json() as any;
24
+ if(url.pathname==='/event'){events.push(body.type);return Response.json({ok:true});}
25
+ if(url.pathname==='/budget')return Response.json({decisions:[]});
26
+ if(url.pathname==='/tool') {
27
+ const text=await ledger.execute(body.sessionId,body.toolCallId,body.name,body.args,async()=>{
28
+ if(body.args.value==='deny')return 'error: fixture permission denied';
29
+ effects++;return 'fixture success';
30
+ });
31
+ return Response.json({text,failed:text.startsWith('error:')});
32
+ }
33
+ providers++;return new Response('provider forbidden',{status:500});
34
+ }});
35
+ const env={HOME:home,PATH:process.env.PATH!,PI_CODING_AGENT_DIR:join(home,'agent'),HUB_EXTENSION:extension,PI_COMPAT_PACKAGE:packageRoot,
36
+ AGENTHUB_PI_BRIDGE_URL:`http://127.0.0.1:${bridge.port}`,AGENTHUB_PI_BRIDGE_TOKEN:'fixture',AGENTHUB_PI_OWNER_TOKEN:'fixture',
37
+ AGENTHUB_PI_TOOLS:JSON.stringify([{name:'compat_probe',description:'model-free fixture',parameters:{type:'object',properties:{value:{type:'string'}},required:['value']}}])};
38
+ const child=Bun.spawn(['node',driver],{cwd:home,env,stdin:'ignore',stdout:'pipe',stderr:'pipe'});
39
+ const timer=setTimeout(()=>child.kill(),10000);
40
+ const [code,stdout,stderr]=await Promise.all([child.exited,new Response(child.stdout).text(),new Response(child.stderr).text()]);clearTimeout(timer);
41
+ console.log(JSON.stringify({code,stdout,stderr,effects,providers,events,isolatedHome:home}));
42
+ const native=Bun.spawn([launcher,'--mode','rpc','--provider','agent-hub-local','--model','fixture','--no-builtin-tools','--no-skills','--no-prompt-templates','--no-extensions','--extension',env.HUB_EXTENSION,'--session-dir',join(home,'native-sessions')],{
43
+ cwd:home,env:{...env,AGENTHUB_PI_RELAY_URL:`http://127.0.0.1:${bridge.port}/v1`,AGENTHUB_PI_RELAY_TOKEN:'fixture',AGENTHUB_PI_MODELS:JSON.stringify([{id:'fixture',name:'fixture'}])},stdin:'pipe',stdout:'pipe',stderr:'pipe'});
44
+ native.stdin.write(JSON.stringify({id:'probe',type:'get_state'})+'\n');
45
+ const nativeTimer=setTimeout(()=>native.kill(),10000);
46
+ let wire='';for await(const chunk of native.stdout){wire+=new TextDecoder().decode(chunk);if(wire.includes('"command":"get_state"')){native.kill();break;}}
47
+ await native.exited;clearTimeout(nativeTimer);const nativeErr=await new Response(native.stderr).text();
48
+ console.log(JSON.stringify({nativeRpc:wire,nativeStderr:nativeErr,providers,events}));
49
+ bridge.stop(true);await ledger.close();
50
+ assert.equal(code,0);assert.equal(stderr,'');
51
+ const result=JSON.parse(stdout);
52
+ assert.equal(result.extension,'loaded');assert.equal(result.first.isError,false);assert.deepEqual(result.first,result.replay);assert.equal(result.denied.isError,true);
53
+ assert.equal(effects,1);assert.equal(providers,0);assert.equal(nativeErr,'');
54
+ const state=wire.trim().split('\n').map(line=>JSON.parse(line)).find(item=>item.command==='get_state');
55
+ assert.equal(state?.success,true);assert.equal(state.data.messageCount,0);assert.ok(state.data.sessionId);assert.ok(state.data.sessionFile);
56
+ assert.ok(events.includes('session_start'));assert.ok(events.includes('session_shutdown'));
57
+ console.log('pi 1.5.2 model-free receipt: PASS');
@@ -0,0 +1,21 @@
1
+ import { pathToFileURL } from 'node:url';
2
+ const { createAgentSession, DefaultResourceLoader, SessionManager, SettingsManager } = await import(pathToFileURL(`${process.env.PI_COMPAT_PACKAGE}/dist/index.js`).href);
3
+ const cwd = process.env.HOME;
4
+ const settingsManager = SettingsManager.create(cwd, process.env.PI_CODING_AGENT_DIR);
5
+ const loader = new DefaultResourceLoader({cwd, agentDir:process.env.PI_CODING_AGENT_DIR, settingsManager,
6
+ noExtensions:true, additionalExtensionPaths:[process.env.HUB_EXTENSION], noSkills:true, noPromptTemplates:true, noThemes:true});
7
+ await loader.reload();
8
+ const {session, extensionsResult} = await createAgentSession({cwd, agentDir:process.env.PI_CODING_AGENT_DIR,
9
+ resourceLoader:loader, settingsManager, sessionManager:SessionManager.create(cwd, `${cwd}/sessions`), noTools:'builtin'});
10
+ if (extensionsResult.errors.length) throw new Error(JSON.stringify(extensionsResult.errors));
11
+ await session.bindExtensions({mode:'rpc'});
12
+ const tool = session.extensionRunner.getAllRegisteredTools().find(t=>t.definition.name==='compat_probe');
13
+ if (!tool) throw new Error('hub extension tool not registered');
14
+ const invoke = async (id, args) => tool.definition.execute(id, args, new AbortController().signal);
15
+ const first = await invoke('same-call', {value:'fixture'});
16
+ const replay = await invoke('same-call', {value:'fixture'});
17
+ const denied = await invoke('denied-call', {value:'deny'});
18
+ console.log(JSON.stringify({extension:'loaded',first,replay,denied,tools:session.getActiveToolNames()}));
19
+ await session.extensionRunner.emit({type:'session_shutdown'});
20
+ session.dispose();
21
+ process.exit(0);