humanish 0.106.0 → 0.107.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 (459) hide show
  1. package/AGENTS.md +4 -2
  2. package/ARCHITECTURE.md +17 -16
  3. package/CHANGELOG.md +24 -0
  4. package/CONTEXT.md +42 -39
  5. package/CONTRIBUTING.md +8 -6
  6. package/README.md +8 -3
  7. package/dist/actors/codex/app-server-client.js +2 -1
  8. package/dist/actors/codex/app-server-trace.d.ts +0 -1
  9. package/dist/actors/codex/app-server-trace.js +1 -3
  10. package/dist/actors/codex/app-server.js +2 -1
  11. package/dist/actors/codex/protocol-compat.d.ts +27 -0
  12. package/dist/actors/codex/protocol-compat.js +357 -0
  13. package/dist/actors/codex/protocol-contract.d.ts +61 -0
  14. package/dist/actors/codex/protocol-contract.js +471 -0
  15. package/dist/actors/codex/qualified-versions.d.ts +31 -4
  16. package/dist/actors/codex/qualified-versions.js +51 -6
  17. package/dist/actors/codex/restricted-executable.d.ts +24 -0
  18. package/dist/actors/codex/restricted-executable.js +97 -22
  19. package/dist/actors/codex/restricted-launch.d.ts +7 -1
  20. package/dist/actors/codex/restricted-launch.js +42 -3
  21. package/dist/actors/codex/restricted-notifications.d.ts +101 -0
  22. package/dist/actors/codex/restricted-notifications.js +277 -0
  23. package/dist/actors/codex/restricted-participant.d.ts +30 -0
  24. package/dist/actors/codex/restricted-participant.js +60 -2
  25. package/dist/actors/codex/restricted-policy.d.ts +9 -1
  26. package/dist/actors/codex/restricted-session.d.ts +14 -1
  27. package/dist/actors/codex/restricted-session.js +50 -17
  28. package/dist/actors/codex/restricted-transport.d.ts +29 -0
  29. package/dist/actors/codex/restricted-transport.js +139 -27
  30. package/dist/actors/codex/restricted-turn.d.ts +19 -4
  31. package/dist/actors/codex/restricted-turn.js +43 -30
  32. package/dist/actors/computer-use/actor.d.ts +1 -1
  33. package/dist/actors/computer-use/actor.js +4 -4
  34. package/dist/actors/computer-use/loop/backstop.js +1 -1
  35. package/dist/actors/computer-use/loop/ending.d.ts +2 -2
  36. package/dist/actors/computer-use/loop/ending.js +2 -2
  37. package/dist/actors/computer-use/loop/spend.d.ts +1 -1
  38. package/dist/actors/computer-use/loop/spend.js +3 -3
  39. package/dist/actors/computer-use/loop/trace.js +2 -2
  40. package/dist/actors/computer-use/loop/types.d.ts +14 -5
  41. package/dist/actors/computer-use/loop.js +4 -4
  42. package/dist/actors/computer-use/openai-provider.d.ts +1 -1
  43. package/dist/actors/computer-use/openai-provider.js +2 -2
  44. package/dist/actors/contract.d.ts +10 -8
  45. package/dist/actors/contract.js +7 -1
  46. package/dist/actors/local-agent/cli.js +1 -1
  47. package/dist/actors/scripted-browser/actor.d.ts +2 -2
  48. package/dist/actors/scripted-browser/journey.js +15 -4
  49. package/dist/actors/scripted-browser/steps.js +18 -0
  50. package/dist/actors/scripted-browser/types.d.ts +11 -1
  51. package/dist/actors/stop-conditions.js +1 -3
  52. package/dist/analysis/automatic-completion.d.ts +13 -8
  53. package/dist/analysis/automatic-completion.js +14 -8
  54. package/dist/analysis/automatic-config.d.ts +1 -1
  55. package/dist/analysis/automatic-config.js +2 -2
  56. package/dist/analysis/automatic.d.ts +10 -4
  57. package/dist/analysis/automatic.js +17 -13
  58. package/dist/analysis/diagnostics.d.ts +23 -0
  59. package/dist/analysis/diagnostics.js +112 -0
  60. package/dist/analysis/evidence-sources.js +2 -2
  61. package/dist/analysis/evidence.js +6 -6
  62. package/dist/analysis/execute.d.ts +7 -1
  63. package/dist/analysis/execute.js +39 -12
  64. package/dist/analysis/job.d.ts +8 -5
  65. package/dist/analysis/job.js +15 -14
  66. package/dist/analysis/load.d.ts +1 -1
  67. package/dist/analysis/load.js +5 -5
  68. package/dist/analysis/provider.d.ts +9 -1
  69. package/dist/analysis/restricted-codex.d.ts +2 -0
  70. package/dist/analysis/restricted-codex.js +10 -1
  71. package/dist/analysis/service.d.ts +2 -0
  72. package/dist/analysis/service.js +31 -12
  73. package/dist/analysis/sharing.d.ts +2 -2
  74. package/dist/analysis/sharing.js +5 -5
  75. package/dist/analysis/store-executions.d.ts +5 -5
  76. package/dist/analysis/store-executions.js +12 -12
  77. package/dist/analysis/store.d.ts +4 -4
  78. package/dist/analysis/store.js +13 -13
  79. package/dist/cli/commands/analysis-signals.d.ts +2 -1
  80. package/dist/cli/commands/analysis-signals.js +4 -1
  81. package/dist/cli/commands/analyze.js +4 -2
  82. package/dist/cli/commands/comms.js +8 -1
  83. package/dist/cli/commands/lab-route-computer-use.d.ts +0 -2
  84. package/dist/cli/commands/lab-route-computer-use.js +26 -14
  85. package/dist/cli/commands/lab-route-preview.d.ts +1 -3
  86. package/dist/cli/commands/lab-route-preview.js +3 -4
  87. package/dist/cli/commands/lab-route-run.d.ts +6 -4
  88. package/dist/cli/commands/lab-route-run.js +6 -2
  89. package/dist/cli/commands/lab-route-scripted.d.ts +0 -2
  90. package/dist/cli/commands/lab-route-scripted.js +0 -1
  91. package/dist/cli/commands/lab-route-shared-world.d.ts +0 -2
  92. package/dist/cli/commands/lab-route-shared-world.js +0 -1
  93. package/dist/cli/commands/lab-route-terminal.d.ts +0 -2
  94. package/dist/cli/commands/lab-route-terminal.js +0 -1
  95. package/dist/cli/commands/lab-run.js +76 -45
  96. package/dist/cli/commands/lab-scorer.d.ts +0 -2
  97. package/dist/cli/commands/lab.js +12 -6
  98. package/dist/cli/commands/observe.js +22 -0
  99. package/dist/cli/commands/run-signals.d.ts +30 -0
  100. package/dist/cli/commands/run-signals.js +146 -0
  101. package/dist/cli/commands/runs.js +10 -8
  102. package/dist/cli/commands/watch.js +12 -10
  103. package/dist/cli/doctor.d.ts +3 -0
  104. package/dist/cli/doctor.js +10 -2
  105. package/dist/cli/io.d.ts +5 -4
  106. package/dist/cli/io.js +12 -8
  107. package/dist/cli/program.js +3 -3
  108. package/dist/cli/renamed-options.d.ts +11 -0
  109. package/dist/cli/renamed-options.js +18 -0
  110. package/dist/cli/telemetry.d.ts +2 -2
  111. package/dist/cli/telemetry.js +1 -1
  112. package/dist/comms/capture-surface.d.ts +1 -1
  113. package/dist/comms/catch-host.d.ts +1 -1
  114. package/dist/comms/connections.js +4 -4
  115. package/dist/comms/external-evidence.d.ts +27 -0
  116. package/dist/comms/external-evidence.js +93 -0
  117. package/dist/comms/lease-store.js +7 -7
  118. package/dist/comms/types.js +1 -1
  119. package/dist/evidence/browser-hygiene.d.ts +1 -1
  120. package/dist/evidence/browser-hygiene.js +1 -1
  121. package/dist/evidence/redaction.js +1 -1
  122. package/dist/evidence/secret-scrub.d.ts +9 -0
  123. package/dist/evidence/secret-scrub.js +96 -0
  124. package/dist/feedback/draft.js +7 -9
  125. package/dist/feedback/export-bundle.js +4 -4
  126. package/dist/feedback/export.js +9 -9
  127. package/dist/feedback/feedback.d.ts +1 -1
  128. package/dist/index.d.ts +3 -6
  129. package/dist/index.js +3 -6
  130. package/dist/keys/key-resolution.d.ts +3 -1
  131. package/dist/keys/key-resolution.js +18 -16
  132. package/dist/lab/adapter-extension.d.ts +28 -6
  133. package/dist/lab/adapter-extension.js +65 -126
  134. package/dist/lab/adapter-scorer-loader.d.ts +25 -5
  135. package/dist/lab/adapter-scorer-loader.js +24 -0
  136. package/dist/lab/composition-rules.d.ts +2 -0
  137. package/dist/lab/composition-rules.js +35 -26
  138. package/dist/lab/config.js +28 -26
  139. package/dist/lab/device-presets.d.ts +2 -2
  140. package/dist/lab/discover.js +1 -3
  141. package/dist/lab/doctor.d.ts +44 -9
  142. package/dist/lab/doctor.js +149 -41
  143. package/dist/lab/init-plan.js +1 -3
  144. package/dist/lab/keys.js +1 -1
  145. package/dist/lab/lab-deps.d.ts +85 -0
  146. package/dist/lab/lab-deps.js +4 -0
  147. package/dist/lab/parse/actors.js +8 -7
  148. package/dist/lab/parse/comms.js +3 -2
  149. package/dist/lab/parse/execution.js +3 -2
  150. package/dist/lab/parse/subject-state.js +2 -1
  151. package/dist/lab/parse/subject.js +2 -1
  152. package/dist/lab/parse/values.d.ts +0 -1
  153. package/dist/lab/parse/values.js +0 -3
  154. package/dist/lab/persona-resolve.d.ts +3 -3
  155. package/dist/lab/persona-resolve.js +4 -4
  156. package/dist/lab/persona.js +1 -3
  157. package/dist/lab/plan-base.d.ts +6 -2
  158. package/dist/lab/plan-base.js +22 -7
  159. package/dist/lab/plan-participants.d.ts +5 -5
  160. package/dist/lab/plan-participants.js +2 -2
  161. package/dist/lab/plan-types.d.ts +33 -7
  162. package/dist/lab/plan.d.ts +3 -11
  163. package/dist/lab/plan.js +18 -42
  164. package/dist/lab/preflight-result.js +0 -2
  165. package/dist/lab/preflight.d.ts +0 -3
  166. package/dist/lab/preflight.js +1 -1
  167. package/dist/lab/requirements.d.ts +20 -0
  168. package/dist/lab/requirements.js +54 -0
  169. package/dist/lab/route-inputs.d.ts +23 -12
  170. package/dist/lab/route-inputs.js +48 -51
  171. package/dist/lab/routing.d.ts +19 -24
  172. package/dist/lab/routing.js +14 -47
  173. package/dist/lab/run-lab-events.d.ts +6 -11
  174. package/dist/lab/run-lab-events.js +3 -11
  175. package/dist/lab/run-lab-homes.d.ts +64 -0
  176. package/dist/lab/run-lab-homes.js +3 -0
  177. package/dist/lab/run-lab-options.d.ts +12 -66
  178. package/dist/lab/run-lab-options.js +45 -275
  179. package/dist/lab/summary.d.ts +9 -4
  180. package/dist/lab/summary.js +15 -8
  181. package/dist/lab/types.d.ts +132 -132
  182. package/dist/lab/validation.d.ts +15 -15
  183. package/dist/lab/validation.js +28 -28
  184. package/dist/lab/warnings.js +20 -19
  185. package/dist/observer/artifact.d.ts +1 -1
  186. package/dist/observer/artifact.js +3 -3
  187. package/dist/observer/data.js +2 -2
  188. package/dist/observer/render.js +2 -2
  189. package/dist/observer/run-routes.d.ts +1 -1
  190. package/dist/observer/run-routes.js +5 -5
  191. package/dist/observer/serve.d.ts +17 -0
  192. package/dist/observer/serve.js +34 -3
  193. package/dist/observer-app.html +1 -1
  194. package/dist/routes/computer-use/bundle-parts.d.ts +1 -1
  195. package/dist/routes/computer-use/bundle-parts.js +10 -3
  196. package/dist/routes/computer-use/bundle.d.ts +4 -11
  197. package/dist/routes/computer-use/bundle.js +9 -15
  198. package/dist/routes/computer-use/diagnostics.d.ts +1 -1
  199. package/dist/routes/computer-use/diagnostics.js +1 -1
  200. package/dist/routes/computer-use/e2b-desktop/comms.d.ts +10 -10
  201. package/dist/routes/computer-use/e2b-desktop/comms.js +11 -14
  202. package/dist/routes/computer-use/e2b-desktop/desktop.d.ts +2 -2
  203. package/dist/routes/computer-use/e2b-desktop/desktop.js +4 -7
  204. package/dist/routes/computer-use/e2b-desktop/fidelity.d.ts +13 -13
  205. package/dist/routes/computer-use/e2b-desktop/fidelity.js +11 -11
  206. package/dist/routes/computer-use/e2b-desktop/prepare.d.ts +3 -3
  207. package/dist/routes/computer-use/e2b-desktop/prepare.js +33 -36
  208. package/dist/routes/computer-use/e2b-desktop/start.d.ts +1 -1
  209. package/dist/routes/computer-use/e2b-desktop/start.js +24 -23
  210. package/dist/routes/computer-use/e2b-desktop/state.d.ts +5 -4
  211. package/dist/routes/computer-use/e2b-desktop/state.js +5 -3
  212. package/dist/routes/computer-use/e2b-desktop/teardown.d.ts +1 -1
  213. package/dist/routes/computer-use/e2b-desktop/teardown.js +29 -17
  214. package/dist/routes/computer-use/external-comms.d.ts +4 -4
  215. package/dist/routes/computer-use/external-comms.js +19 -43
  216. package/dist/routes/computer-use/fanout-bundle.d.ts +3 -3
  217. package/dist/routes/computer-use/fanout-bundle.js +25 -29
  218. package/dist/routes/computer-use/{fanout-lanes.js → fanout-records.js} +25 -19
  219. package/dist/routes/computer-use/in-process-desktop.d.ts +3 -10
  220. package/dist/routes/computer-use/in-process-desktop.js +3 -9
  221. package/dist/routes/computer-use/live-flush.d.ts +7 -5
  222. package/dist/routes/computer-use/live-flush.js +19 -27
  223. package/dist/routes/computer-use/{run-lanes.js → live-phase.js} +14 -13
  224. package/dist/routes/computer-use/local-tree-pack.d.ts +3 -3
  225. package/dist/routes/computer-use/local-tree-pack.js +4 -5
  226. package/dist/routes/computer-use/local-vm.d.ts +11 -8
  227. package/dist/routes/computer-use/local-vm.js +39 -66
  228. package/dist/routes/computer-use/participant-desktop.d.ts +8 -23
  229. package/dist/routes/computer-use/participant-desktop.js +5 -25
  230. package/dist/routes/computer-use/{lanes.d.ts → participant-execution.d.ts} +10 -10
  231. package/dist/routes/computer-use/{lanes.js → participant-execution.js} +35 -22
  232. package/dist/routes/computer-use/participant-facts.d.ts +7 -1
  233. package/dist/routes/computer-use/participant-facts.js +12 -1
  234. package/dist/routes/computer-use/participant-model.d.ts +19 -11
  235. package/dist/routes/computer-use/participant-model.js +58 -33
  236. package/dist/routes/computer-use/participant-prompt.d.ts +3 -3
  237. package/dist/routes/computer-use/participant-prompt.js +4 -4
  238. package/dist/routes/computer-use/participant-runs.d.ts +6 -6
  239. package/dist/routes/computer-use/participant-runs.js +8 -8
  240. package/dist/routes/computer-use/plan.d.ts +21 -29
  241. package/dist/routes/computer-use/plan.js +59 -65
  242. package/dist/routes/computer-use/preflight.d.ts +6 -11
  243. package/dist/routes/computer-use/preflight.js +26 -18
  244. package/dist/routes/computer-use/rerun-selection.js +10 -6
  245. package/dist/routes/computer-use/result.d.ts +1 -1
  246. package/dist/routes/computer-use/result.js +40 -30
  247. package/dist/routes/computer-use/route.d.ts +3 -4
  248. package/dist/routes/computer-use/route.js +21 -19
  249. package/dist/routes/computer-use/self-report.d.ts +2 -2
  250. package/dist/routes/computer-use/self-report.js +4 -4
  251. package/dist/routes/computer-use/setup.d.ts +8 -17
  252. package/dist/routes/computer-use/setup.js +98 -86
  253. package/dist/routes/computer-use/single-bundle.d.ts +8 -11
  254. package/dist/routes/computer-use/single-bundle.js +20 -25
  255. package/dist/routes/computer-use/subject-projection.d.ts +5 -7
  256. package/dist/routes/computer-use/subject-projection.js +20 -19
  257. package/dist/routes/computer-use/types.d.ts +169 -211
  258. package/dist/routes/computer-use/types.js +13 -6
  259. package/dist/routes/preview.js +0 -1
  260. package/dist/routes/scripted/bundle.d.ts +3 -6
  261. package/dist/routes/scripted/bundle.js +11 -16
  262. package/dist/routes/scripted/plan.d.ts +5 -7
  263. package/dist/routes/scripted/plan.js +6 -4
  264. package/dist/routes/scripted/result.d.ts +4 -1
  265. package/dist/routes/scripted/result.js +10 -6
  266. package/dist/routes/scripted/route.js +10 -11
  267. package/dist/routes/scripted/scenario.d.ts +1 -1
  268. package/dist/routes/scripted/scenario.js +1 -1
  269. package/dist/routes/scripted/setup.d.ts +3 -2
  270. package/dist/routes/scripted/setup.js +22 -21
  271. package/dist/routes/scripted/subject.d.ts +8 -3
  272. package/dist/routes/scripted/subject.js +11 -6
  273. package/dist/routes/scripted/surface-records.js +1 -1
  274. package/dist/routes/scripted/surface-sessions.d.ts +2 -2
  275. package/dist/routes/scripted/surface-sessions.js +4 -4
  276. package/dist/routes/scripted/types.d.ts +19 -36
  277. package/dist/routes/scripted/types.js +1 -2
  278. package/dist/routes/shared-world/{seat-records.js → bundle-records.js} +8 -8
  279. package/dist/routes/shared-world/bundle.d.ts +2 -2
  280. package/dist/routes/shared-world/bundle.js +22 -26
  281. package/dist/routes/shared-world/checkpoints.d.ts +4 -4
  282. package/dist/routes/shared-world/checkpoints.js +4 -4
  283. package/dist/routes/shared-world/comms.d.ts +5 -4
  284. package/dist/routes/shared-world/comms.js +28 -41
  285. package/dist/routes/shared-world/external-public.d.ts +5 -5
  286. package/dist/routes/shared-world/external-public.js +19 -20
  287. package/dist/routes/shared-world/handoff.d.ts +4 -4
  288. package/dist/routes/shared-world/handoff.js +50 -50
  289. package/dist/routes/shared-world/lobby-code.d.ts +5 -5
  290. package/dist/routes/shared-world/lobby-code.js +13 -13
  291. package/dist/routes/shared-world/{seats.d.ts → participant-specs.d.ts} +8 -6
  292. package/dist/routes/shared-world/{seats.js → participant-specs.js} +46 -51
  293. package/dist/routes/shared-world/plan.d.ts +2 -6
  294. package/dist/routes/shared-world/plan.js +1 -2
  295. package/dist/routes/shared-world/provenance.d.ts +4 -4
  296. package/dist/routes/shared-world/provenance.js +4 -4
  297. package/dist/routes/shared-world/provisioned.d.ts +3 -2
  298. package/dist/routes/shared-world/provisioned.js +48 -41
  299. package/dist/routes/shared-world/result.js +31 -19
  300. package/dist/routes/shared-world/route.js +37 -41
  301. package/dist/routes/shared-world/setup.d.ts +5 -4
  302. package/dist/routes/shared-world/setup.js +12 -14
  303. package/dist/routes/shared-world/types.d.ts +53 -126
  304. package/dist/routes/shared-world/types.js +2 -2
  305. package/dist/routes/terminal/adapter.d.ts +8 -8
  306. package/dist/routes/terminal/adapter.js +28 -125
  307. package/dist/routes/terminal/bundle.d.ts +7 -12
  308. package/dist/routes/terminal/bundle.js +24 -34
  309. package/dist/routes/terminal/credentials.d.ts +2 -2
  310. package/dist/routes/terminal/credentials.js +16 -16
  311. package/dist/routes/terminal/dry-run.d.ts +1 -1
  312. package/dist/routes/terminal/dry-run.js +9 -11
  313. package/dist/routes/terminal/encoding.d.ts +1 -1
  314. package/dist/routes/terminal/encoding.js +2 -2
  315. package/dist/routes/terminal/ledger.d.ts +6 -6
  316. package/dist/routes/terminal/ledger.js +9 -9
  317. package/dist/routes/terminal/live-finish.d.ts +1 -2
  318. package/dist/routes/terminal/live-finish.js +21 -20
  319. package/dist/routes/terminal/live-sandbox.d.ts +4 -2
  320. package/dist/routes/terminal/live-sandbox.js +25 -21
  321. package/dist/routes/terminal/participant-text.d.ts +23 -0
  322. package/dist/routes/terminal/participant-text.js +165 -0
  323. package/dist/routes/terminal/plan.d.ts +2 -6
  324. package/dist/routes/terminal/plan.js +13 -9
  325. package/dist/routes/terminal/recorder.d.ts +6 -1
  326. package/dist/routes/terminal/recorder.js +12 -4
  327. package/dist/routes/terminal/result.js +4 -4
  328. package/dist/routes/terminal/route.js +26 -26
  329. package/dist/routes/terminal/runtime.d.ts +3 -2
  330. package/dist/routes/terminal/runtime.js +3 -3
  331. package/dist/routes/terminal/sandbox.d.ts +5 -3
  332. package/dist/routes/terminal/sandbox.js +13 -16
  333. package/dist/routes/terminal/session.js +16 -14
  334. package/dist/routes/terminal/token-usage.js +5 -5
  335. package/dist/routes/terminal/trace.d.ts +5 -8
  336. package/dist/routes/terminal/trace.js +9 -64
  337. package/dist/routes/terminal/types.d.ts +85 -93
  338. package/dist/routes/terminal/types.js +9 -4
  339. package/dist/run/active-runs.d.ts +13 -0
  340. package/dist/run/active-runs.js +12 -0
  341. package/dist/run/bundle-shape.d.ts +2 -1
  342. package/dist/run/bundle-shape.js +4 -4
  343. package/dist/run/bundle.d.ts +63 -56
  344. package/dist/run/bundle.js +9 -8
  345. package/dist/run/cost-summary.js +3 -2
  346. package/dist/run/costs.d.ts +6 -6
  347. package/dist/run/costs.js +10 -10
  348. package/dist/run/detail.d.ts +5 -5
  349. package/dist/run/detail.js +6 -6
  350. package/dist/run/dry-run.js +5 -12
  351. package/dist/run/{study-files.d.ts → evidence-files.d.ts} +4 -4
  352. package/dist/run/{study-files.js → evidence-files.js} +5 -5
  353. package/dist/run/feedback-shape.js +1 -1
  354. package/dist/run/judge.d.ts +16 -4
  355. package/dist/run/judge.js +24 -7
  356. package/dist/run/locate.d.ts +2 -0
  357. package/dist/run/locate.js +3 -1
  358. package/dist/run/outcomes.d.ts +3 -3
  359. package/dist/run/outcomes.js +3 -3
  360. package/dist/run/participant-records.d.ts +2 -2
  361. package/dist/run/participant-records.js +2 -2
  362. package/dist/run/paths.js +1 -1
  363. package/dist/run/pricing.d.ts +19 -9
  364. package/dist/run/pricing.js +30 -18
  365. package/dist/run/projection.d.ts +13 -13
  366. package/dist/run/projection.js +8 -8
  367. package/dist/run/reclaim.d.ts +7 -1
  368. package/dist/run/reclaim.js +24 -4
  369. package/dist/run/results.d.ts +1 -1
  370. package/dist/run/run-index.d.ts +1 -1
  371. package/dist/run/run-index.js +11 -11
  372. package/dist/run/run.d.ts +4 -2
  373. package/dist/run/run.js +9 -5
  374. package/dist/run/sandbox-receipts.d.ts +4 -4
  375. package/dist/run/sandbox-receipts.js +4 -4
  376. package/dist/run/shared-world-evidence.d.ts +47 -47
  377. package/dist/run/shared-world-shape.d.ts +3 -3
  378. package/dist/run/shared-world-shape.js +11 -11
  379. package/dist/run/stats.d.ts +5 -5
  380. package/dist/run/stats.js +8 -8
  381. package/dist/run/status.d.ts +16 -6
  382. package/dist/run/status.js +31 -8
  383. package/dist/run/streams.d.ts +26 -19
  384. package/dist/run/terminal-contract.d.ts +5 -5
  385. package/dist/run/terminal-contract.js +4 -4
  386. package/dist/run/transient-comms-secrets.d.ts +5 -0
  387. package/dist/run/transient-comms-secrets.js +12 -0
  388. package/dist/run-lab.d.ts +36 -34
  389. package/dist/run-lab.js +41 -37
  390. package/dist/subject/desktop-cli.d.ts +1 -1
  391. package/dist/subject/desktop-cli.js +1 -1
  392. package/dist/subject/local-tree-archive.d.ts +1 -1
  393. package/dist/subject/local-tree-archive.js +4 -4
  394. package/dist/subject/local-tree.d.ts +2 -2
  395. package/dist/subject/local-tree.js +1 -1
  396. package/dist/subject/node-bootstrap.d.ts +1 -1
  397. package/dist/subject/node-bootstrap.js +4 -4
  398. package/dist/subject/runtime.js +5 -5
  399. package/dist/subject/serve.js +1 -1
  400. package/dist/subject/steps.d.ts +4 -4
  401. package/dist/subject/steps.js +5 -5
  402. package/dist/substrates/desktop-session.d.ts +2 -0
  403. package/dist/substrates/e2b/cdp-probe.d.ts +2 -2
  404. package/dist/substrates/e2b/cdp-probe.js +1 -1
  405. package/dist/substrates/e2b/desktop-browser.d.ts +3 -3
  406. package/dist/substrates/e2b/desktop-browser.js +4 -4
  407. package/dist/substrates/e2b/desktop-cdp.d.ts +7 -7
  408. package/dist/substrates/e2b/desktop-cdp.js +4 -4
  409. package/dist/substrates/e2b/desktop-geometry.d.ts +4 -4
  410. package/dist/substrates/e2b/desktop-geometry.js +3 -3
  411. package/dist/substrates/e2b/desktop-media.js +2 -2
  412. package/dist/substrates/e2b/sandbox.d.ts +2 -0
  413. package/dist/substrates/e2b/sandbox.js +22 -8
  414. package/dist/substrates/e2b/sdk.d.ts +12 -1
  415. package/dist/substrates/e2b/sdk.js +30 -9
  416. package/dist/substrates/local/runtime-host.d.ts +2 -0
  417. package/dist/substrates/local/runtime-host.js +6 -0
  418. package/dist/tui/actions.d.ts +7 -5
  419. package/dist/tui/actions.js +18 -9
  420. package/dist/tui-app.js +42 -42
  421. package/dist/verify/actor.d.ts +10 -10
  422. package/dist/verify/actor.js +15 -15
  423. package/dist/verify/artifacts.d.ts +1 -1
  424. package/dist/verify/artifacts.js +3 -3
  425. package/dist/verify/costs.d.ts +2 -2
  426. package/dist/verify/costs.js +2 -2
  427. package/dist/verify/liveness.d.ts +1 -1
  428. package/dist/verify/liveness.js +4 -1
  429. package/dist/verify/rerun.d.ts +1 -1
  430. package/dist/verify/rerun.js +1 -1
  431. package/dist/verify/shared-world.js +2 -2
  432. package/dist/verify/verify.js +6 -6
  433. package/docs/README.md +1 -1
  434. package/docs/architecture/actor-contract.md +60 -22
  435. package/docs/architecture/desktop-sessions.md +9 -9
  436. package/docs/architecture/external-public-shared-world.md +5 -0
  437. package/docs/architecture/observer.md +4 -4
  438. package/docs/architecture/restricted-codex-analysis.md +40 -4
  439. package/docs/architecture/state-driven-executor.md +4 -5
  440. package/docs/architecture/task-protocol-support.md +3 -5
  441. package/docs/architecture/{terminal-product-lane.md → terminal-product-route.md} +24 -16
  442. package/docs/contracts/run-bundle.md +10 -8
  443. package/docs/contracts/schemas.md +109 -53
  444. package/docs/contracts/study-analysis.md +24 -0
  445. package/docs/decisions/0004-participant-desktops-stay-in-the-route.md +2 -1
  446. package/docs/product/automatic-analysis.md +1 -0
  447. package/docs/ramp/README.md +2 -1
  448. package/package.json +4 -4
  449. package/skills/humanish/SKILL.md +3 -2
  450. package/skills/humanish/agents/openai.yaml +1 -1
  451. package/dist/deprecated.d.ts +0 -90
  452. package/dist/deprecated.js +0 -106
  453. package/dist/lab/bag-overrides.d.ts +0 -18
  454. package/dist/lab/bag-overrides.js +0 -121
  455. package/dist/routes/computer-use/legacy-lane-spec.d.ts +0 -62
  456. package/dist/routes/computer-use/legacy-lane-spec.js +0 -39
  457. /package/dist/routes/computer-use/{fanout-lanes.d.ts → fanout-records.d.ts} +0 -0
  458. /package/dist/routes/computer-use/{run-lanes.d.ts → live-phase.d.ts} +0 -0
  459. /package/dist/routes/shared-world/{seat-records.d.ts → bundle-records.d.ts} +0 -0
@@ -2,7 +2,7 @@ import { type PreparedRunArtifactPaths } from "../run/paths.js";
2
2
  import { type RunBundle } from "../run/bundle.js";
3
3
  export declare function isZeroEventTerminalTrace(value: unknown): boolean;
4
4
  /**
5
- * Verifier for the terminal-product real-agent lane (the in-sandbox command-scoped key route). A
5
+ * Verifier for the terminal-product real-agent route (the in-sandbox command-scoped key route). A
6
6
  * LIVE terminal stream must carry the durable proof the safety contract requires, and must FAIL
7
7
  * CLOSED when any of it is missing — a blocked/failed agent run stays structurally verifiable (the
8
8
  * failure is the evidence) ONLY when the substrate/cleanup/interventions ledgers are present; it
@@ -13,15 +13,15 @@ export declare function isZeroEventTerminalTrace(value: unknown): boolean;
13
13
  export declare function validateTerminalProductEvidence(runPaths: PreparedRunArtifactPaths, bundle: RunBundle): Promise<string[]>;
14
14
  export declare function validateCodexAppServerEvidence(runPaths: PreparedRunArtifactPaths, bundle: RunBundle): Promise<string[]>;
15
15
  /**
16
- * Independent mirror of the producer-side no-engagement guard (routes/computer-use/lanes.ts): a
17
- * LIVE actor trace claiming goal_satisfied while carrying zero action-bearing items AND zero
18
- * message items is a hollow run — the actor neither did nor said anything — and must not verify as
19
- * evidence (invariant 4: evidence verifies fail-closed). Live-vs-dry-run is judged exactly as the
20
- * producer judges it, from bundle.mode alone; dry-run/contract bundles legitimately carry no
21
- * actions and stay exempt. Engagement is accepted from EITHER surface — itemized trace items or the
22
- * producer's counts — because providers differ in what they itemize; a hollow run reports zero on
23
- * both. The trace is read defensively: isRunStream does not validate the actor seam, and verify
24
- * must not throw on a malformed one.
16
+ * Independent mirror of the producer-side no-engagement guard
17
+ * (routes/computer-use/participant-execution.ts): a LIVE actor trace claiming goal_satisfied while
18
+ * carrying zero action-bearing items AND zero message items is a hollow run — the actor neither did
19
+ * nor said anything — and must not verify as evidence (invariant 4: evidence verifies fail-closed).
20
+ * Live-vs-dry-run is judged exactly as the producer judges it, from bundle.mode alone;
21
+ * dry-run/contract bundles legitimately carry no actions and stay exempt. Engagement is accepted
22
+ * from EITHER surface — itemized trace items or the producer's counts — because providers differ in
23
+ * what they itemize; a hollow run reports zero on both. The trace is read defensively: isRunStream
24
+ * does not validate the actor seam, and verify must not throw on a malformed one.
25
25
  */
26
26
  export declare function noEngagementActorFindings(bundle: RunBundle): string[];
27
27
  export declare function actorVerdictConsistencyFindings(bundle: RunBundle): string[];
@@ -14,7 +14,7 @@ export function isZeroEventTerminalTrace(value) {
14
14
  value.counts.terminalEvents === 0);
15
15
  }
16
16
  /**
17
- * Verifier for the terminal-product real-agent lane (the in-sandbox command-scoped key route). A
17
+ * Verifier for the terminal-product real-agent route (the in-sandbox command-scoped key route). A
18
18
  * LIVE terminal stream must carry the durable proof the safety contract requires, and must FAIL
19
19
  * CLOSED when any of it is missing — a blocked/failed agent run stays structurally verifiable (the
20
20
  * failure is the evidence) ONLY when the substrate/cleanup/interventions ledgers are present; it
@@ -27,14 +27,14 @@ export async function validateTerminalProductEvidence(runPaths, bundle) {
27
27
  return [];
28
28
  }
29
29
  const findings = [];
30
- // Detect the terminal-PRODUCT lane by its unique actor-trace protocol ("terminal-exec"), NOT by
31
- // the broad stream.kind "terminal" — the existing local codex-exec/TUI lanes also use terminal
32
- // streams (with a different protocol) and must not be held to this lane's ledger contract.
30
+ // Detect the terminal-PRODUCT route by its unique actor-trace protocol ("terminal-exec"), NOT by
31
+ // the broad stream.kind "terminal" — the existing local codex-exec/TUI routes also use terminal
32
+ // streams (with a different protocol) and must not be held to this route's ledger contract.
33
33
  const terminalStreams = bundle.streams.filter((stream) => stream.actor?.protocol === "terminal-exec" && stream.status !== "contract_proof_only");
34
34
  if (terminalStreams.length === 0) {
35
35
  return findings;
36
36
  }
37
- // The lane writes exactly one terminal run's ledgers/evidence at fixed paths in the run root.
37
+ // The route writes exactly one terminal run's ledgers/evidence at fixed paths in the run root.
38
38
  const ledgers = await readSafeRunArtifactJson(runPaths, TERMINAL_LEDGERS_ARTIFACT);
39
39
  if (!isRecord(ledgers) || ledgers.schema !== "humanish.terminal-ledgers.v1") {
40
40
  findings.push(`missing or malformed ${TERMINAL_LEDGERS_ARTIFACT} (humanish.terminal-ledgers.v1)`);
@@ -76,7 +76,7 @@ export async function validateTerminalProductEvidence(runPaths, bundle) {
76
76
  if (!(await readSafeRunArtifactBytes(runPaths, TERMINAL_TRANSCRIPT_ARTIFACT))) {
77
77
  findings.push(`missing normalized terminal transcript artifact (${TERMINAL_TRANSCRIPT_ARTIFACT})`);
78
78
  }
79
- // The provider-neutral actor trace must be on the terminal lane with redaction passed.
79
+ // The provider-neutral actor trace must have `lane: "terminal"` with redaction passed.
80
80
  for (const stream of terminalStreams) {
81
81
  const traceArtifact = stream.artifacts.find((artifact) => artifact.kind === "trace");
82
82
  const tracePath = traceArtifact?.path ?? "actor.json";
@@ -214,15 +214,15 @@ const ACTION_BEARING_ACTOR_ITEM_KINDS = new Set([
214
214
  "file_change",
215
215
  ]);
216
216
  /**
217
- * Independent mirror of the producer-side no-engagement guard (routes/computer-use/lanes.ts): a
218
- * LIVE actor trace claiming goal_satisfied while carrying zero action-bearing items AND zero
219
- * message items is a hollow run — the actor neither did nor said anything — and must not verify as
220
- * evidence (invariant 4: evidence verifies fail-closed). Live-vs-dry-run is judged exactly as the
221
- * producer judges it, from bundle.mode alone; dry-run/contract bundles legitimately carry no
222
- * actions and stay exempt. Engagement is accepted from EITHER surface — itemized trace items or the
223
- * producer's counts — because providers differ in what they itemize; a hollow run reports zero on
224
- * both. The trace is read defensively: isRunStream does not validate the actor seam, and verify
225
- * must not throw on a malformed one.
217
+ * Independent mirror of the producer-side no-engagement guard
218
+ * (routes/computer-use/participant-execution.ts): a LIVE actor trace claiming goal_satisfied while
219
+ * carrying zero action-bearing items AND zero message items is a hollow run — the actor neither did
220
+ * nor said anything — and must not verify as evidence (invariant 4: evidence verifies fail-closed).
221
+ * Live-vs-dry-run is judged exactly as the producer judges it, from bundle.mode alone;
222
+ * dry-run/contract bundles legitimately carry no actions and stay exempt. Engagement is accepted
223
+ * from EITHER surface — itemized trace items or the producer's counts — because providers differ in
224
+ * what they itemize; a hollow run reports zero on both. The trace is read defensively: isRunStream
225
+ * does not validate the actor seam, and verify must not throw on a malformed one.
226
226
  */
227
227
  export function noEngagementActorFindings(bundle) {
228
228
  if (bundle.mode !== "live") {
@@ -6,7 +6,7 @@ export declare function missingLocalEvidenceArtifacts(runPaths: PreparedRunArtif
6
6
  /**
7
7
  * The PNG frames that actor traces register as stream screenshots, relative to the run root.
8
8
  * RAW_SCREENSHOTS grades these, so the public-safety scan does not report them as unread. Only
9
- * frames under screenshots/ count: the computer-use lane writer and the scripted-browser steps
9
+ * frames under screenshots/ count: the computer-use frame writer and the scripted-browser steps
10
10
  * write every frame there, and nothing else in the harness does. A trace reference elsewhere (an
11
11
  * adapter's PNG, say) stays required evidence but goes to UNSCANNED_ARTIFACT.
12
12
  */
@@ -1,7 +1,7 @@
1
1
  import { lstat, readdir } from "node:fs/promises";
2
2
  import path from "node:path";
3
3
  import { isRedactedFrameShape, screenshotEvidenceError } from "../evidence/image.js";
4
- import { isStudyAnalysisRecordPath } from "../analysis/sharing.js";
4
+ import { isAnalysisRecordPath } from "../analysis/sharing.js";
5
5
  import { scanEncodedTextCached } from "../evidence/encoded-text.js";
6
6
  import { readPlainText } from "../evidence/plain-text.js";
7
7
  import { containsSensitive } from "../evidence/redaction.js";
@@ -130,7 +130,7 @@ function declaredActorScreenshotReferences(stream) {
130
130
  /**
131
131
  * The PNG frames that actor traces register as stream screenshots, relative to the run root.
132
132
  * RAW_SCREENSHOTS grades these, so the public-safety scan does not report them as unread. Only
133
- * frames under screenshots/ count: the computer-use lane writer and the scripted-browser steps
133
+ * frames under screenshots/ count: the computer-use frame writer and the scripted-browser steps
134
134
  * write every frame there, and nothing else in the harness does. A trace reference elsewhere (an
135
135
  * adapter's PNG, say) stays required evidence but goes to UNSCANNED_ARTIFACT.
136
136
  */
@@ -302,7 +302,7 @@ async function scanRunPublicSafetyDirectory(runPaths, relativeDirectory, finding
302
302
  const relativePath = relativeDirectory ? `${relativeDirectory}/${entryName}` : entryName;
303
303
  const stats = await lstat(path.join(current, entryName), { bigint: true }).catch(() => null);
304
304
  const selectedFindings = !stats?.isDirectory() &&
305
- (relativePath === "observer/study-analysis.json" || isStudyAnalysisRecordPath(relativePath))
305
+ (relativePath === "observer/study-analysis.json" || isAnalysisRecordPath(relativePath))
306
306
  ? derivedFindings
307
307
  : findings;
308
308
  if (isRiskyPublicArtifactPath(relativePath) || containsSensitive(relativePath)) {
@@ -1,5 +1,5 @@
1
1
  import type { RunBundle } from "../run/bundle.js";
2
- /** Account lanes must never acquire a price through an aggregate or ambiguous model line. */
2
+ /** Account-billed participants must never acquire a price through an aggregate or ambiguous model line. */
3
3
  export declare function contradictsAccountBilling(streams: readonly {
4
4
  id?: string;
5
5
  laneId?: string;
@@ -21,7 +21,7 @@ export declare function contradictsAccountBilling(streams: readonly {
21
21
  * Verify the LABELING/provenance of any cost figure a bundle CLAIMS — never its magnitude. Returns
22
22
  * [] (pass) unless a dollar claim lacks its provenance (invariant 6) or a total misreports its
23
23
  * known lines. ABSENCE always passes (fail-open on display, discipline #3): a bundle with no cost,
24
- * a null estimate, or a lane without estimatedCost is fine. A NON-NULL figure must carry its
24
+ * a null estimate, or a participant without estimatedCost is fine. A NON-NULL figure must carry its
25
25
  * ratesAsOf date + source; a NUMBER total must equal round6(sum of ONLY the non-null lines) and a
26
26
  * null line may never be coerced to 0. A null estimate must be declared honestly (a reason + null
27
27
  * ratesAsOf), mirroring the terminal no-spend proof's null-discipline. Account-billed participants
@@ -2,7 +2,7 @@
2
2
  // totals match their known lines, and account-billed participants never acquire a price.
3
3
  import { validActorExecutionProfile, validActorProviderRequests } from "../actors/contract.js";
4
4
  import { round6 } from "../run/pricing.js";
5
- /** Account lanes must never acquire a price through an aggregate or ambiguous model line. */
5
+ /** Account-billed participants must never acquire a price through an aggregate or ambiguous model line. */
6
6
  export function contradictsAccountBilling(streams, cost) {
7
7
  const account = (stream) => (stream.liveActor?.executionProfile ?? stream.actor?.executionProfile)?.billing ===
8
8
  "account-unknown";
@@ -25,7 +25,7 @@ export function contradictsAccountBilling(streams, cost) {
25
25
  * Verify the LABELING/provenance of any cost figure a bundle CLAIMS — never its magnitude. Returns
26
26
  * [] (pass) unless a dollar claim lacks its provenance (invariant 6) or a total misreports its
27
27
  * known lines. ABSENCE always passes (fail-open on display, discipline #3): a bundle with no cost,
28
- * a null estimate, or a lane without estimatedCost is fine. A NON-NULL figure must carry its
28
+ * a null estimate, or a participant without estimatedCost is fine. A NON-NULL figure must carry its
29
29
  * ratesAsOf date + source; a NUMBER total must equal round6(sum of ONLY the non-null lines) and a
30
30
  * null line may never be coerced to 0. A null estimate must be declared honestly (a reason + null
31
31
  * ratesAsOf), mirroring the terminal no-spend proof's null-discipline. Account-billed participants
@@ -2,6 +2,6 @@ import type { RunBundle } from "../run/bundle.js";
2
2
  import type { PreparedRunArtifactPaths } from "../run/paths.js";
3
3
  /**
4
4
  * One warning when the run is not finished, by the run index's rule: its status record when it
5
- * has a usable one, else a simulation still `running` in its bundle. Empty for a finished run.
5
+ * has a usable one, else a participant still `running` in its bundle's `simulations[]`. Empty for a finished run.
6
6
  */
7
7
  export declare function runNotFinishedWarnings(runPaths: PreparedRunArtifactPaths, bundle: RunBundle, nowMs?: number): Promise<string[]>;
@@ -13,7 +13,7 @@ const RUN_NOT_FINISHED = "RUN_NOT_FINISHED";
13
13
  const GONE_STATES = new Set(["killed", "already-gone"]);
14
14
  /**
15
15
  * One warning when the run is not finished, by the run index's rule: its status record when it
16
- * has a usable one, else a simulation still `running` in its bundle. Empty for a finished run.
16
+ * has a usable one, else a participant still `running` in its bundle's `simulations[]`. Empty for a finished run.
17
17
  */
18
18
  export async function runNotFinishedWarnings(runPaths, bundle, nowMs = Date.now()) {
19
19
  const runId = path.basename(runPaths.absoluteRunRoot);
@@ -29,6 +29,9 @@ export async function runNotFinishedWarnings(runPaths, bundle, nowMs = Date.now(
29
29
  else if (liveness === "running") {
30
30
  seen.push(`${RUN_STATUS_FILE} state is ${record.state} and its owner updated it at ${record.updatedAt}, so the run may still be writing`);
31
31
  }
32
+ else if (record.state === "interrupted") {
33
+ seen.push(`${RUN_STATUS_FILE} state is interrupted${record.signal === undefined ? "" : ` by ${record.signal}`} at ${record.updatedAt}`);
34
+ }
32
35
  else {
33
36
  seen.push(`${RUN_STATUS_FILE} state is ${record.state} and its owner stopped updating it at ${record.updatedAt}`);
34
37
  }
@@ -1,3 +1,3 @@
1
1
  import type { RunBundle } from "../run/bundle.js";
2
- /** A rerun bundle must link each selected lane to its prior status and a fan-out rerun event. */
2
+ /** A rerun bundle must link each selected participant to its prior status and a fan-out rerun event. */
3
3
  export declare function rerunLineageFindings(bundle: RunBundle): string[];
@@ -1,4 +1,4 @@
1
- /** A rerun bundle must link each selected lane to its prior status and a fan-out rerun event. */
1
+ /** A rerun bundle must link each selected participant to its prior status and a fan-out rerun event. */
2
2
  export function rerunLineageFindings(bundle) {
3
3
  const rerun = bundle.rerun;
4
4
  if (!rerun) {
@@ -152,7 +152,7 @@ function skippedTailCauseFailures(bundle, turns, tail) {
152
152
  failures.push("usage_unreported requires recorded unavailable usage");
153
153
  }
154
154
  else if (tail.cause === "study_spend_limit") {
155
- if (!studySpendLimitRecorded(bundle, turns, tail)) {
155
+ if (!runSpendLimitRecorded(bundle, turns, tail)) {
156
156
  failures.push("study_spend_limit requires known prefix estimates exceeding the recorded finite threshold");
157
157
  }
158
158
  }
@@ -166,7 +166,7 @@ function skippedTailCauseFailures(bundle, turns, tail) {
166
166
  return failures;
167
167
  }
168
168
  /** Every executed participant's estimate is known, and their sum exceeds the recorded threshold. */
169
- function studySpendLimitRecorded(bundle, turns, tail) {
169
+ function runSpendLimitRecorded(bundle, turns, tail) {
170
170
  const estimates = bundle.streams
171
171
  .slice(0, turns.length)
172
172
  .map((stream) => stream.actor?.estimatedCost?.estimatedCostUsd);
@@ -1,7 +1,7 @@
1
1
  import path from "node:path";
2
- import { listStudyAnalysisExecutions } from "../analysis/store-executions.js";
3
- import { loadStudyAnalysis } from "../analysis/load.js";
4
- import { studyAnalysisSharingProblems } from "../analysis/sharing.js";
2
+ import { listAnalysisExecutions } from "../analysis/store-executions.js";
3
+ import { loadAnalysis } from "../analysis/load.js";
4
+ import { analysisSharingProblems } from "../analysis/sharing.js";
5
5
  import { containsSensitive } from "../evidence/redaction.js";
6
6
  import { validatePreparedRunArtifactPaths } from "../run/paths.js";
7
7
  import { RUN_BUNDLE_FILE, RUN_BUNDLE_SCHEMA } from "../run/bundle.js";
@@ -224,9 +224,9 @@ function bundlePresenceChecks(bundle, reviewArtifactsExist) {
224
224
  * to silently promote stale or malformed derived text into sharing.
225
225
  */
226
226
  async function applyAnalysisSharing(runPaths, warnings, shareSafety) {
227
- const analysis = await loadStudyAnalysis(runPaths);
228
- const analysisSharing = studyAnalysisSharingProblems(analysis);
229
- const executionHistory = await listStudyAnalysisExecutions(runPaths);
227
+ const analysis = await loadAnalysis(runPaths);
228
+ const analysisSharing = analysisSharingProblems(analysis);
229
+ const executionHistory = await listAnalysisExecutions(runPaths);
230
230
  if (!analysisSharing.unverified &&
231
231
  !analysisSharing.sensitive &&
232
232
  executionHistory.warnings.length === 0)
package/docs/README.md CHANGED
@@ -38,7 +38,7 @@ than one kind is split file by file.
38
38
  - [architecture/task-protocol-support.md](architecture/task-protocol-support.md): which routes
39
39
  accept `actors[0].tasks`.
40
40
  - [architecture/external-public-shared-world.md](architecture/external-public-shared-world.md) and
41
- [architecture/terminal-product-lane.md](architecture/terminal-product-lane.md): two routes in
41
+ [architecture/terminal-product-route.md](architecture/terminal-product-route.md): two routes in
42
42
  depth. Both keep dated slice notes beside the current rules.
43
43
  - [architecture/restricted-codex-analysis.md](architecture/restricted-codex-analysis.md) and
44
44
  [product/automatic-analysis.md](product/automatic-analysis.md): study analysis.
@@ -23,8 +23,8 @@ descriptor `runSession` is a fail-closed compatibility entry. Live execution is
23
23
  owned by `runTerminalProductLab`, which coordinates sandbox creation,
24
24
  command-scoped runtime auth, evidence, caps, and by-id cleanup.
25
25
 
26
- The `pi-agent-core` and `claude-agent-sdk` descriptors, the `app` run kind and the
27
- `in-process-sdk` protocol were removed. No lab route dispatched either descriptor, and a
26
+ #955 removed the `pi-agent-core` and `claude-agent-sdk` descriptors, the `app` run kind and
27
+ the `in-process-sdk` protocol. No lab route dispatched either descriptor, and a
28
28
  lab that names one now fails to parse. A signed-in Claude Code drives computer-use studies
29
29
  through `local-agent`, which plugs into the provider-neutral `CuaProvider` port
30
30
  (`src/actors/computer-use/loop/types.ts`, re-exported from `loop.ts`).
@@ -64,13 +64,24 @@ API surface.
64
64
  Agent SDK, Stagehand). The existing Codex app-server integration is the
65
65
  reference adapter. `pi-agent-core` was planned as the first in-process-SDK
66
66
  adapter to prove both shapes early; it shipped only as a trace mapper with no
67
- route and has been removed.
68
-
69
- 2. **One normalized evidence schema: `humanish.actor-trace.v1`.** Codex `item/*`
70
- events, Claude `ToolUse`/`ToolResult` blocks, pi `tool_execution_*` events,
71
- and computer-use `computer_call` cycles all map onto one `ActorTrace` with a
72
- typed `items[]`. `humanish.codex-app-server-trace.v1` remains a back-compat
73
- alias during migration.
67
+ route, and #955 removed it.
68
+
69
+ 2. **One normalized evidence schema: `humanish.actor-trace.v1`.** Four producers map
70
+ their records onto one `ActorTrace` with a typed `items[]`:
71
+ - Codex app-server `item/*` events, protocol `json-rpc`: `codexResultToActorTrace`
72
+ (`src/actors/codex/app-server-actor-trace.ts`).
73
+ - Computer-use loop turns, protocol `cua-loop`, whether the provider returned an OpenAI
74
+ `computer_call` or a local agent's JSON actions: `loopResult`
75
+ (`src/actors/computer-use/loop/trace.ts`).
76
+ - Scripted-browser steps, protocol `scripted-steps`: `projectScriptedActorTrace`
77
+ (`src/actors/scripted-browser/actor.ts`).
78
+ - The terminal route's command log and terminal events, protocol `terminal-exec`:
79
+ `buildTerminalActorTrace` (`src/routes/terminal/trace.ts`).
80
+
81
+ The Codex app-server still writes its own `humanish.codex-app-server-trace.v1` record
82
+ (`CodexAppServerTrace` in `src/actors/codex/app-server-trace.ts`), which
83
+ `codexResultToActorTrace` converts. The Claude Agent SDK `ToolUse`/`ToolResult` and pi
84
+ `tool_execution_*` mappers went with their adapters in #955.
74
85
 
75
86
  3. **A run is multi-turn within one trace; it stops on goal, abandonment, unrecoverable
76
87
  failure, or a wall-clock safety timeout, never on a turn cap.** Turn count is explicitly
@@ -260,7 +271,13 @@ export interface Actor {
260
271
  run-bundle wiring is provider-agnostic. The artifact names differ by route: the Codex
261
272
  app-server adapter writes `events.ndjson`, `summary.json` and `transcript.txt`; a
262
273
  computer-use participant writes its trace to `actor.json` or `actors/<streamId>.json`; the
263
- terminal route writes `terminal-events.ndjson` and `terminal-transcript.txt`.
274
+ terminal route writes `terminal-events.ndjson` and `terminal-transcript.txt`. Analysis quotes
275
+ only `message` and `reasoning` items, so they carry the participant's own words. The terminal
276
+ route reads them from the Codex `agent_message` and `reasoning` items in the raw exec JSON
277
+ stream, in memory, before source redaction can break a line's JSON. It removes verdict marker
278
+ lines, then scrubs and redacts the decoded text. The trace keeps the last 200 items within
279
+ 128 KiB and adds a `notice` item when it leaves older ones out. The stream's last 2000
280
+ characters stay in the `command` item's `outputTail`.
264
281
  - **Approvals.** Call `approval.onRequest`; never embed adapter-local decline
265
282
  strings. Every call is recorded as an `items[kind=approval]`.
266
283
  - **Redaction.** Use the injected `RedactionHooks`. Never re-implement redaction
@@ -374,12 +391,12 @@ attaches product-specific scoring + feedback as a THIN in-repo extension WITHOUT
374
391
  core. The seam is exported contract types (`RunBundle`, `RunFeedbackCandidate`,
375
392
  `RunAdapterScore`, `ActorTrace`, `AdapterScorerModule` and the terminal-route
376
393
  `TerminalProductScoringContext`) plus a registrable scorer module, `RunLabOptions.scorer`,
377
- with optional `score` and `deriveFeedback`. The older `score` / `deriveFeedback` members of
378
- `terminalHooks` and `cuaHooks` are deprecated. The adapter records its product nouns ONLY
394
+ with optional `score` and `deriveFeedback`. The older `terminalHooks` and `cuaHooks` bags were
395
+ removed from `RunLabOptions`. The adapter records its product nouns ONLY
379
396
  under an adapter-NAMESPACED block (`RunFeedbackCandidate.adapter` /
380
397
  `RunAdapterScore.{namespace,data}`), so core's enums stay product-agnostic: no adopter noun
381
398
  is hardcoded into a core enum. Default (no hook) behavior is unchanged. See
382
- [`terminal-product-lane.md`](./terminal-product-lane.md#slice-4-the-product-adapter-extension-seam-layer-6)
399
+ [`terminal-product-route.md`](./terminal-product-route.md#slice-4-the-product-adapter-extension-seam-layer-6)
383
400
  for the full seam and the thin-adapter conformance proof.
384
401
 
385
402
  ## Making personas load-bearing
@@ -419,12 +436,33 @@ traits: { patience, skill, accessibilityNeeds? }, constraints[], sourceDigest }`
419
436
  toward the success predicate) and annotates the abandonment friction as a feedback
420
437
  candidate. The harness imposes no turn cap; its hard stops are the wall-clock
421
438
  `timeoutMs` and declared spend caps.
422
- 4. **Bind the same directives per harness**: pi (`systemPrompt` +
423
- `beforeToolCall` allow rules), Claude (`system_prompt`/`--append-system-prompt`
424
- - `allowedTools`), Codex (prepend to `turn/start` input), Stagehand (agent
425
- context + action policy). Each binds the friction-tolerance, skill, and
426
- accessibility directives identically; none uses a `max_turns`-style cap as the
427
- persona stop condition.
439
+ 4. **Bind the same directives per harness.** `renderPersonaPromptSection`
440
+ (`src/lab/persona.ts`) renders the directives as one prompt section, and each harness puts
441
+ that section where its model reads standing instructions:
442
+ - Computer use: `composeParticipantInstructions`
443
+ (`src/routes/computer-use/participant-prompt.ts`) opens the participant instructions
444
+ with it. `openai-computer-use` sends those instructions as each Responses request's
445
+ `instructions`. A local-agent Codex runs as a restricted app-server participant and
446
+ receives them as thread/start `baseInstructions` (`threadStartParams` in
447
+ `src/actors/codex/restricted-launch.ts`), on an ephemeral read-only thread whose only
448
+ dynamic tool is `humanish_ui`. A local-agent Claude Code runs one `claude -p`
449
+ stream-json session with `--allowedTools Read`; the instructions open its first user
450
+ message (`promptFor` in `src/actors/local-agent/cli.ts`), and later turns rely on the
451
+ session's memory. `HUMANISH_LOCAL_AGENT_ONE_SHOT` instead spawns one `claude -p` per
452
+ turn, which resends the instructions every turn.
453
+ - Terminal: the section opens the `codex exec` prompt (`composeLivePrompt` in
454
+ `src/routes/terminal/session.ts`).
455
+ - The scripted-browser route replays declared steps with no model, so it binds no
456
+ directives and records an empty `traitsApplied`. The Codex app-server session behind
457
+ `humanish codex app-server` and the `codex-app-server` registry descriptor binds none
458
+ either: it sends the operator's prompt to turn/start as given.
459
+ - Stagehand remains roadmap. This rule once planned a pi binding (`systemPrompt` +
460
+ `beforeToolCall`) and a Claude Agent SDK one (`systemPrompt` + `allowedTools`). pi
461
+ shipped only as a trace mapper, the Claude Agent SDK descriptor never had a route, and
462
+ #955 removed both.
463
+
464
+ None of these uses a `max_turns`-style cap as the persona stop condition.
465
+
428
466
  5. **Prove it.** `ActorTrace.persona.traitsApplied` lists the injected directives; a
429
467
  `persona-fidelity` verify check asserts that the friction and accessibility directives
430
468
  reached the actor input and that a `gave_up` run cites a concrete friction reason (not a
@@ -504,10 +542,10 @@ turns as a stop signal.
504
542
  is provider-neutral); then a follow-up live SDK shim behind a DI seam, deferred
505
543
  until the package identity (`@earendil-works/pi-agent-core` vs
506
544
  `@mariozechner/pi-coding-agent`) and the Node `>=22.19` vs engines `>=20` gap
507
- are pinned against an installed build. The live shim never landed, and the
508
- mapper-only descriptor was removed because no route dispatched it.
545
+ are pinned against an installed build. The live shim never landed, and #955
546
+ removed the mapper-only descriptor because no route dispatched it.
509
547
  5. `claude-agent-sdk` adapter (the `app` run kind). It shipped as a descriptor with
510
- a live session but no route, and was removed along with the `app` run kind.
548
+ a live session but no route, and #955 removed it along with the `app` run kind.
511
549
  6. Computer-use route. (Shipped as `openai-computer-use`: registered 0.3.0,
512
550
  lab-dispatched 0.4.0; `stagehand-cua` as a multi-provider front remains
513
551
  not-yet-shipped roadmap.)
@@ -68,11 +68,11 @@ runtime.
68
68
  The runner owns instructions, model execution, spend guards, screenshots, trace
69
69
  persistence and participant outcome interpretation. It does not invoke desktop
70
70
  shell commands or manufacture E2B objects for an alternate executor. A local
71
- Firecracker study supplies its desktops through the `PARTICIPANT_DESKTOP` symbol on
72
- the hook bag (`src/routes/computer-use/participant-desktop.ts`), which no caller
73
- can set by name. The public `cuaHooks.createDesktopLane` is deprecated, warns once,
74
- and goes in the next minor; contract tests still inject a desktop through it. Neither
75
- bypasses CLI admission checks.
71
+ Firecracker run supplies its desktops through the computer-use run's `localVm`
72
+ input (`LocalVmInput` in `src/routes/computer-use/types.ts`). runLab builds that
73
+ input with `prepareLocalVmRun` (`src/routes/computer-use/local-vm.ts`), and no
74
+ package caller can set it. Contract tests pass a `localVm` desktop on a lab with
75
+ `execution.target: local`. Neither bypasses CLI admission checks.
76
76
 
77
77
  Final evidence errors cannot skip desktop release. Existing bundle fields and
78
78
  desktop lifetime accounting retain their meanings; unconfirmed or retained
@@ -85,8 +85,8 @@ described in [local browser studies](local-browser-runtime.md).
85
85
 
86
86
  The `runSession` testing hook for independent participants now receives a constructed
87
87
  `executor` instead of `desktop`/`executorOptions`. A hook should consume the
88
- normal `CuaActorSessionOptions` executor or delegate to `runCuaActorSession`.
89
- Library calls directly using `runCuaActorSession({ desktop, executorOptions })`
90
- still work but warn as deprecated; use `runComputerUseLoop`. A custom in-process
88
+ normal `CuaActorSessionOptions` executor or delegate to the internal
89
+ `runCuaActorSession`. The `runCuaActorSession` export was removed in 0.107.0; a
90
+ library caller uses `runComputerUseLoop`. A custom in-process
91
91
  executor now goes through `RunLabOptions.inProcess`, which replaces the
92
- deprecated `cuaHooks.buildExecutor`.
92
+ removed `cuaHooks.buildExecutor`.
@@ -57,6 +57,11 @@ threaded through `CuaActorSessionOptions` → `CuaParticipantDeps` → the concu
57
57
  code; no lobby-trivia change. The CDP URL read later proved unreliable on E2B desktops, so the
58
58
  host's code can now also come from its narration or its screen (step 2).
59
59
 
60
+ `onObservedUrl`, `onMessage` and `onScreenshot` are deprecated on `CuaLoopOptions`, and the next
61
+ minor removes them. A `runComputerUseLoop` caller that used them wraps the executor's `observe`
62
+ (for `url` and `screenshot`) or the provider's `nextTurn` (for `reasoning` and `message`). The
63
+ handoff still passes all three.
64
+
60
65
  Flow, a host-first barrier inside `runConcurrentSharedWorld`'s fan-out:
61
66
 
62
67
  1. **Designated host.** Exactly one roster entry carries `host: true` (validated). Its mission = create
@@ -46,9 +46,9 @@ regardless of substrate:
46
46
  - `artifact`: artifact-only evidence stream;
47
47
  - `summary`: run-level synthesis stream.
48
48
 
49
- Each stream points back to a simulation and carries its own transport,
50
- terminal tail, UI state, artifact links, event timeline, and public-safe
51
- metadata.
49
+ Each stream points back to its participant's `simulations[]` entry and carries its
50
+ own transport, terminal tail, UI state, artifact links, event timeline, and
51
+ public-safe metadata.
52
52
 
53
53
  ## Live Watch
54
54
 
@@ -243,7 +243,7 @@ Subsequent additions through 2026-06-11 included:
243
243
  registered in `src/actors/registry.ts`);
244
244
  - E2B desktop participants on the computer-use and shared-world routes;
245
245
  - computer-use bundles persist a `screenshots/` directory and the Observer
246
- renders the frames (`src/routes/computer-use/lanes.ts` writes them).
246
+ renders the frames (`src/routes/computer-use/participant-execution.ts` writes them).
247
247
 
248
248
  Intentionally still adapter work:
249
249
 
@@ -13,8 +13,10 @@ Linux x64 accepts 0.154.0, 0.157.1
13
13
  ([receipt](https://github.com/danielgwilson/humanish/blob/main/docs/goals/computer-use-actor/receipts/codex-cli-0.157.1-requalification-2026-09-30.md))
14
14
  0.159.2
15
15
  ([receipt](https://github.com/danielgwilson/humanish/blob/main/docs/goals/computer-use-actor/receipts/codex-cli-0.159.2-qualification-2026-09-30.md))
16
- and 0.159.3
17
- ([receipt](https://github.com/danielgwilson/humanish/blob/main/docs/goals/computer-use-actor/receipts/codex-cli-0.159.3-qualification-2026-10-01.md)).
16
+ 0.159.3
17
+ ([receipt](https://github.com/danielgwilson/humanish/blob/main/docs/goals/computer-use-actor/receipts/codex-cli-0.159.3-qualification-2026-10-01.md))
18
+ and 0.160.0
19
+ ([receipt](https://github.com/danielgwilson/humanish/blob/main/docs/goals/computer-use-actor/receipts/codex-cli-0.160.0-qualification-2026-10-01.md)).
18
20
  Apple Silicon accepts 0.154.0, which passed installed participant/analysis studies and the
19
21
  native dispatch restriction check on an M5 Max; later releases need the same check on a Mac.
20
22
  Hosted participants on Linux arm64 and Intel macOS keep 0.154.0 as a pre-existing admission,
@@ -33,6 +35,31 @@ release stay readable.
33
35
  Readiness validates the installation and effective profile without submitting a
34
36
  model turn; it does not guarantee current quota or model access.
35
37
 
38
+ Each launch also checks the release's app-server schema. After `--version`, the launcher runs
39
+ `codex app-server generate-json-schema --experimental` into its private work directory, bounded
40
+ at 15 seconds and 64 KiB of output. It reads only regular files of at most 16 MiB, waits on the
41
+ request deadline while reading, and removes the schema afterwards.
42
+ [`src/actors/codex/protocol-contract.ts`](https://github.com/danielgwilson/humanish/blob/main/src/actors/codex/protocol-contract.ts)
43
+ lists each method humanish calls with the fields and values it sends and the response fields it
44
+ reads, each notification and server request it consumes, the reply it sends to a tool call, and
45
+ the containers (`items`, `turn.items`, `thread.turns[].items`) its item policy reads in every
46
+ notification, including the consumed ones outside the ServerNotification union. Where the
47
+ baseline carries items (`thread.turns[].items` in `thread/started`, `turn.items` in
48
+ `turn/started` and `turn/completed`), the carrier is required, so a release that renames it
49
+ refuses. The schema does not link a response to its method, so the table names each response
50
+ definition. A read field is checked in every alternative the schema allows, including each
51
+ object or array on its path; a sent field needs one alternative that still accepts it. `allOf`
52
+ members intersect, and `false` allows no value. The launch refuses as
53
+ `codex_incompatible_release` before app-server starts, listing each change, when a read field
54
+ is gone or allows another type, a compared value is no longer allowed, a sent field or value is
55
+ no longer accepted, a field humanish does not send is newly required, or a method or definition
56
+ is missing. A value beyond those the admitted releases offer, such as a new item type, is
57
+ recorded on an admitted launch and reported as a warning; a new item type that arrives is still
58
+ refused by the item allowlist. Values humanish only refuses, such as an asynchronous delivery,
59
+ are listed as known values: their removal does not refuse the launch, since it cannot make
60
+ humanish accept more. The check covers only the listed fields. It does not attest the binary,
61
+ and the `config/read` keys the schema leaves untyped are checked by exact value after launch.
62
+
36
63
  ## Authority and request limits
37
64
 
38
65
  The host creates a private temporary Codex home and links only the existing
@@ -52,8 +79,17 @@ This profile is **not advertised as tool-free**. The CLI retains code-mode
52
79
  descriptions, but the qualified `features.code_mode_host=false` setting rejects
53
80
  their actual dispatch. `agents.enabled=false` removes delegation; the older
54
81
  feature toggle alone did not. humanish also refuses raw tool calls, unexpected
55
- host RPCs and asynchronous question messages before accepting any report. The
56
- actual notification/denial captures and provenance are in
82
+ host RPCs and asynchronous question messages before accepting any report. Every
83
+ item an app-server notification carries (`item`, `items`, `turn.items`,
84
+ `thread.turns[].items`) passes the item allowlist whatever its method, from the
85
+ launch handshake until the app-server exits. Output that arrives after a request
86
+ stopped, or during shutdown, is still read for the item policy. Every refusal, and
87
+ any output that could not be checked, is kept for the session's close: it fails a
88
+ participant's run even when a step that tolerates a failed request absorbed it,
89
+ and it fails an analysis that had completed. A last frame cut off by humanish's
90
+ own signal, delivered to the running app-server and ending it, is a warning with
91
+ its byte count. A method humanish does not know that carries no item is counted
92
+ in the run's warnings and does not refuse. The actual notification/denial captures and provenance are in
57
93
  [`tests/fixtures/restricted-codex`](https://github.com/danielgwilson/humanish/blob/46330116726f74080fa18947c36da4fb4b333805/tests/fixtures/restricted-codex/README.md).
58
94
 
59
95
  Each analyst or readiness request owns a separate child process, temporary home
@@ -195,7 +195,7 @@ to reconstruct them.
195
195
 
196
196
  Pass `inProcess: { executor }` and `createProvider` in `RunLabOptions`. The type requires
197
197
  `createProvider` beside `inProcess`: a state executor returns no frame, so it needs a non-vision
198
- provider. With `inProcess` set, `runCuaActorLab` takes a branch that NEVER
198
+ provider. With `inProcess` set, the computer-use route takes a branch that NEVER
199
199
  loads the E2B module, creates a sandbox, runs `prepareDesktop`, provisions a
200
200
  clone, opens a browser, or starts a stream. `sandboxId`/`streamUrl` stay
201
201
  undefined, so `result.sandbox` is omitted. That omission is the verifiable
@@ -207,8 +207,7 @@ Fail-closed guards, all BEFORE any key check, so a CLI invocation never sees a m
207
207
  - `HUMANISH_LAB_OPTION_UNSUPPORTED`: `inProcess` without `createProvider` (from JavaScript,
208
208
  where the type does not stop it), or on a subject other than `app-url` or `local-app`.
209
209
  `createProvider` alone is allowed; that is a model swap on the normal E2B route.
210
- - `HUMANISH_CUA_LAB_FANOUT_INVALID`: `inProcess`, or the deprecated `cuaHooks.buildExecutor`,
211
- with more than one participant. The planner refuses it, because fan-out gives each participant
210
+ - `HUMANISH_CUA_LAB_FANOUT_INVALID`: `inProcess` with more than one participant. The planner refuses it, because fan-out gives each participant
212
211
  its own E2B desktop and the in-process route has none.
213
212
  - `HUMANISH_CUA_LAB_LOCAL_APP_NO_EXECUTOR`: a `subject.source: local-app` config run
214
213
  without `inProcess` (there is no built-in in-process driver yet). A structured error,
@@ -216,8 +215,8 @@ Fail-closed guards, all BEFORE any key check, so a CLI invocation never sees a m
216
215
  - `HUMANISH_CUA_LAB_LOCAL_DESKTOP_MISSING`: an `app-url` lab with `execution.target: local`
217
216
  and no local desktop. `runLab` gives a local browser study its desktop; a direct route
218
217
  call or an in-process executor on the same lab has none.
219
- - `HUMANISH_CUA_LAB_EXECUTOR_NO_PROVIDER`: the deprecated `cuaHooks.buildExecutor` without
220
- `cuaHooks.buildProvider`.
218
+ - `HUMANISH_CUA_LAB_EXECUTOR_NO_PROVIDER`: the route's internal executor hook without its
219
+ provider hook. A package caller gets `HUMANISH_LAB_OPTION_UNSUPPORTED` above instead.
221
220
 
222
221
  Key gating is route-aware: the in-process route uses the caller's OWN model and
223
222
  executor, so no `OPENAI_API_KEY`/`E2B_API_KEY` is required.
@@ -23,12 +23,10 @@ Custom session hooks remain caller-owned implementations of that same contract;
23
23
  this preflight does not certify arbitrary hook behavior.
24
24
 
25
25
  The parser reports `HUMANISH_LAB_INVALID` with the unsupported field path. `runLab`
26
- and the deprecated direct route runners report `HUMANISH_LAB_TASKS_UNSUPPORTED` in
27
- their failure envelopes, from `planLab` (`src/lab/plan.ts`) and each route's plan.
26
+ reports `HUMANISH_LAB_TASKS_UNSUPPORTED` in the route's failure envelope, from
27
+ `planLab` (`src/lab/plan.ts`) and each route's plan.
28
28
  Refusal precedes run storage, source preparation, user hooks, local processes,
29
- sandbox allocation, and model calls. No task content appears in the error. The
30
- deprecated synthetic API, `runDryRun`, accepts no lab config or tasks. Its lab
31
- declaration boundary is `runLab`.
29
+ sandbox allocation, and model calls. No task content appears in the error.
32
30
 
33
31
  A future route gains support only after proving participant goals, hidden criteria,
34
32
  observation-backed completion, honest missing-input treatment, and per-participant