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
@@ -38,15 +38,16 @@ fail-closed cross-validation, and forward-declared warnings.
38
38
  | `execution.terminal` | `{ transport: exec-stream, stdin: disabled }` |
39
39
  | `execution.runtimeAuth` | `openai-env` (default) or opt-in `openai-egress`; names-only durable evidence |
40
40
  | `execution.runtime.version` | Optional exact `@openai/codex` version; observed before keyed execution |
41
- | `actors[0].model` / `reasoningEffort` | Forwarded to Codex; retained as declarations, not observed provider identity |
41
+ | `actors[0].model` / `reasoningEffort` | Passed to Codex as `--model` (default `gpt-5.6-sol`) and `-c model_reasoning_effort`; declarations, not observed provider identity |
42
42
  | `scenario.caps` | `{ maxUsd, maxJobs, maxMinutes }`: the blast-radius budget; `maxUsd > 0` is refused unless a `costProbe` measures spend |
43
43
  | `policies` | `allowPrivateRepoAccess` / `allowProviderCredentials` / `allowPaymentCredentials` / `allowGitHubMutation`, all DEFAULT FALSE |
44
44
  | `actors[0].type` | `codex-exec`: a registered terminal actor (`keyPlacement: in-sandbox-command-scoped`) |
45
- | `LabBackend` | `terminal` → `runTerminalProductLab` ([`src/routes/terminal/route.ts`](https://github.com/danielgwilson/humanish/blob/main/src/routes/terminal/route.ts)) |
45
+ | route | `terminal` → `runTerminalProductLab` ([`src/routes/terminal/route.ts`](https://github.com/danielgwilson/humanish/blob/main/src/routes/terminal/route.ts)) |
46
46
 
47
47
  Routing is `routeOf` (`src/lab/plan.ts`). It sends every `terminal-product` subject to
48
48
  this route, even with an unregistered actor, so this route refuses the actor.
49
- `routesToTerminalProduct(config)` also feeds the forward-declared warnings.
49
+ `isTerminalProductComposition(config)` (`src/lab/routing.ts`) also feeds the forward-declared
50
+ warnings.
50
51
 
51
52
  ## Repeating a terminal study with the same runtime
52
53
 
@@ -70,16 +71,24 @@ and reclaims its owned sandbox. When the version is omitted, the probe resolves
70
71
 
71
72
  `actor.json`, the bundle's terminal actor, and `terminal-ledgers.json` retain
72
73
  `humanish.actor-runtime.v1`: requested and observed versions, verification status,
73
- declared model/effort, and the usage granularity. The observed executable version
74
- also appears as `providerVersion`. An undeclared model stays explicitly
75
- `runtime_default_unobserved`; humanish does not label the runtime name as a model.
74
+ the requested model and where it came from, declared effort, and the usage granularity.
75
+ The observed executable version also appears as `providerVersion`.
76
+
77
+ Codex's `--json` stream does not name the model it used, and its built-in default can change
78
+ with any release. So the route always passes `--model`: the lab's `actors[0].model`
79
+ (`modelStatus: declared`), or humanish's participant default `gpt-5.6-sol`
80
+ (`modelStatus: humanish_default`). Bundles written before 0.107.0 record
81
+ `runtime_default_unobserved` with no requested model.
76
82
  Dry runs record declarations only, in a `terminal-lab.runtime.declared` event.
77
83
 
78
84
  These settings make a study's request reproducible, but do not attest the actual
79
- provider model or add a provider spending limit. Codex `turn.completed` usage can
80
- aggregate several model requests, so humanish does not use a declared model to
81
- infer per-request pricing tiers or fill in unknown costs. Runtime-token costs
82
- and the studied product's no-spend boundary still need separate interpretation.
85
+ provider model or add a provider spending limit. humanish prices the agent's tokens from the
86
+ requested model. Codex `turn.completed` usage sums every request in a turn, so no request's own
87
+ size is known and no per-request long-context tier can be applied. The estimate prices every token
88
+ at the base tier, with cached input at the cached rate, and says so with
89
+ `basis: aggregated_turns_base_rate`. It is an estimate, not a measurement. The cost ledger
90
+ checked against `scenario.caps.maxUsd` keeps the provider line unmeasured, and the studied
91
+ product's no-spend boundary still needs separate interpretation.
83
92
 
84
93
  ## Runtime auth: raw-key placement and remaining provider access
85
94
 
@@ -238,11 +247,10 @@ At SLICE 1, a non-dry-run call returned a structured
238
247
  SLICE 2 implemented the real session.
239
248
 
240
249
  SLICE 1 declared the DI seams SLICE 2 needed (`loadModule`, `buildSandbox`,
241
- `runtimeAuthEnv`, `detachedTimers`) on `TerminalProductLabHooks`; only the dry-run
242
- path was implemented in that slice. The hook bag now carries `loadModule`, `env`,
243
- `renderObserverFn`, `now`, `costProbe`, `score` and `deriveFeedback`
244
- (`src/routes/terminal/types.ts`), and `TerminalProductLabHooks` itself is deprecated
245
- in favor of `RunLabOptions`.
250
+ `runtimeAuthEnv`, `detachedTimers`) on a terminal hook bag; only the dry-run path was
251
+ implemented in that slice. The bag is gone. The route reads `env` and `scorer` from its
252
+ options (`src/routes/terminal/types.ts`), and a test passes its seams (`desktopModule`,
253
+ `renderObserver`, `now`, `costProbe`) as `LabDeps` (`src/lab/lab-deps.ts`).
246
254
 
247
255
  ## SLICE 4: the product-adapter extension seam (layer 6)
248
256
 
@@ -263,7 +271,7 @@ lives in the adopter's repo:
263
271
  `AdapterScorerModule`): `score?(ctx) => RunAdapterScore | Promise<…>` and
264
272
  `deriveFeedback?(ctx) => RunFeedbackCandidate[] | Promise<…>`, where this route's
265
273
  `ctx` is a `TerminalProductScoringContext`. The older `terminalHooks.score` and
266
- `terminalHooks.deriveFeedback` still work and warn as deprecated. The route calls the
274
+ `terminalHooks.deriveFeedback` were removed with the bag. The route calls the
267
275
  hooks over the FULLY-ASSEMBLED, redacted evidence and attaches the results
268
276
  (`bundle.adapterScore`, appended `bundle.feedbackCandidates`) WITHOUT core knowing
269
277
  any product noun. Default (no hook) behavior is unchanged: the mission-based verdict
@@ -267,12 +267,14 @@ A local scripted run (no model request, no hosted desktop) is such a run; a scri
267
267
  a provisioned clone records the clone's desktop as a `laneId: subject` line. A live bundle
268
268
  without `cost` has an unmeasured spend. A live terminal run's `cost` prices the E2B terminal
269
269
  sandbox as a `desktop-minutes` line from its acquired-to-cleanup span and `e2b.getInfo` size.
270
- Its Codex `model-tokens` line stays `null` (`no_rate_for_model` with model `codex`, or
271
- `no_token_usage` when Codex reported none): the participant prices against its provider id `codex`
272
- even when `actors[0].model` is passed as `--model`, and `terminal-ledgers.json` counts those
273
- tokens without a price.
274
- So a terminal total is a lower bound (`fullyEstimated: false`), and the unpriced tokens are
275
- not $0. Each participant's own estimate also rides its
270
+ Its Codex `model-tokens` line prices the agent's tokens from the model passed as `--model`
271
+ (`actors[0].model`, else `gpt-5.6-sol`). Codex reports usage per turn, summed over the turn's
272
+ requests, so the line prices every token at the base tier and carries
273
+ `basis: aggregated_turns_base_rate`. It stays `null` with `no_token_usage` when Codex reported
274
+ none. `terminal-ledgers.json` still counts those tokens without a price, because its provider line
275
+ takes only provider-reported cost. Bundles written before 0.107.0 price against the provider id
276
+ `codex` and record `no_rate_for_model`, so their total is a lower bound
277
+ (`fullyEstimated: false`) and the unpriced tokens are not $0. Each participant's own estimate also rides its
276
278
  `stream.actor.estimatedCost` (`humanish.actor-estimated-cost.v1`), kept distinct
277
279
  from the reserved provider-returned `tokenUsage.costUsd`. See
278
280
  [`schemas.md`](schemas.md) → Run Cost Summary And Estimated Actor Cost.
@@ -532,11 +534,11 @@ in-progress bundle that can pass every check. When the run is not finished,
532
534
  `warnings[]` carries one entry starting with the stable code `RUN_NOT_FINISHED`.
533
535
  `ok` and `shareSafety` do not change. Verify decides "not finished" by the run
534
536
  index's rule, which the TUI and `humanish stats` use: the run's `status.json` when
535
- it is well formed and names the run, else a simulation still `running` in the
537
+ it is well formed and names the run, else a `simulations[]` entry still `running` in the
536
538
  bundle. A `running` record updated within the stale window reads as still
537
539
  writing; an older one reads as interrupted. The warning names what verify saw:
538
540
 
539
- - the record's state and its last `updatedAt`, or the running simulations when
541
+ - the record's state and its last `updatedAt`, or the running `simulations[]` entries when
540
542
  there is no usable record;
541
543
  - how many streams are still `running`;
542
544
  - what `reclaim-receipt.json` records: how many of the run's sandboxes are gone
@@ -3,7 +3,7 @@
3
3
  Date: 2026-06-02 (current-state note updated 2026-07-14)
4
4
 
5
5
  Status: reference map for the major contracts shipped through source version
6
- `0.106.0`; it is not an exhaustive inventory of command/result envelopes. Exported types,
6
+ `0.107.0`; it is not an exhaustive inventory of command/result envelopes. Exported types,
7
7
  schema constants, parsers, and validators in `src/` are authoritative. Rows
8
8
  marked "reserved" name layering intent only; no code emits or validates them
9
9
  yet. Do not emit a reserved schema.
@@ -117,7 +117,7 @@ A lab is a composition over code primitives, not a hardcoded kind:
117
117
  (invariant 5). `serve`/`clone`/`state`/`repos`/`appUrl` are rejected on a
118
118
  terminal-product subject (a field that cannot act on the route is a parse
119
119
  error, not silently dropped). See
120
- [`docs/architecture/terminal-product-lane.md`](../architecture/terminal-product-lane.md);
120
+ [`docs/architecture/terminal-product-route.md`](../architecture/terminal-product-route.md);
121
121
  - `subject.state` (clone or local-tree subjects, computer-use route): the
122
122
  subject's state story. `state.seed[]` declares ordered, bounded
123
123
  seed/migration/fixture steps (`{ name, command, when: before-build |
@@ -172,7 +172,7 @@ dwell? }`. The parser expands it into
172
172
  - `execution.concurrency` (computer-use E2B routes, including shared-world): a
173
173
  CAP on participants in flight at once. When omitted, every participant runs
174
174
  simultaneously: independent participants resolve it from the final participant count,
175
- after any `--count` override, and the parser fills `concurrency = laneCount`
175
+ after any `--count` override, and the parser fills `concurrency = participantCount`
176
176
  for multi-participant shared-world labs. Total sessions and spend are identical either way; only wall-clock
177
177
  and simultaneity differ. Declaring a value below the participant count runs participants in
178
178
  waves and emits a warning saying so, because a green waved run is otherwise
@@ -324,7 +324,12 @@ dwell? }`. The parser expands it into
324
324
  pass for a catch), the teardown drain over `GET /deliveries`, and the same
325
325
  digest-only evidence. `authTokenEnv` names an env var holding a bearer token
326
326
  for the drain read. The NAME is recorded as evidence; the value never
327
- persists. Declaring `external` on a harness-provisioned subject warns: two
327
+ persists. A live run refuses a token shorter than 16 characters, or not
328
+ well-formed Unicode, before it probes the catch
329
+ (`HUMANISH_CUA_LAB_COMMS_TOKEN_INVALID`,
330
+ `HUMANISH_CONCURRENT_SHARED_WORLD_LAB_COMMS_TOKEN_INVALID`), as
331
+ `humanish comms catch --token` does, and scrubs the token and its encoded
332
+ forms from every comms warning. Declaring `external` on a harness-provisioned subject warns: two
328
333
  catches would exist and the app would point at humanish's own. `linkOrigin`
329
334
  is an optional operator-declared origin the app bakes into links when it
330
335
  differs from the serve origin; the harness rewrites captured links through it
@@ -396,13 +401,18 @@ where a dry-run participant is ok as contract evidence and a live participant mu
396
401
  error, engaged, and no self-reported blocker.
397
402
 
398
403
  Explicit failed-participant reruns are supported on the CUA fan-out route via
399
- `humanish lab run <lab> --rerun-failed-from <run-id> [--lanes lane-a,lane-b]`.
404
+ `humanish lab run <lab> --rerun-failed-from <run-id> [--participants <ids>]`, where a
405
+ participant id is a declared `actors[0].lanes[].id`, or `lane-01`, `lane-02`, … by position.
400
406
  The source run must be a live CUA fan-out bundle. humanish creates a NEW run for
401
407
  the selected failed/blocked/timed-out/hollow participants (or explicit participant ids), leaves
402
408
  the source verdict unchanged, and records lineage as `run.rerun` plus a
403
409
  `cua-lab.fanout.rerun` event: source run id, selected participant ids, and previous participant
404
410
  statuses/reasons. This is intentionally not automatic retry; a passing rerun is a
405
411
  nondeterminism candidate for human/product scoring, not a rewrite of the old run.
412
+ Without `--participants`, a participant is selected when its stream's `judgedStatus` is not `passed`.
413
+ That field is the judge's status (`judgedStatus` in `src/run/judge.ts`), so a goal_satisfied
414
+ session that reported a blocker counts as blocked. A source bundle without `judgedStatus` falls back
415
+ to the stream's trace status, its actor status and completion reason, and a zero-action check.
406
416
 
407
417
  Manifests are human-authored `.yaml` source under `humanish/labs/*.yaml` for
408
418
  committed public-safe labs, or ignored `.humanish/labs/*.yaml` /
@@ -558,7 +568,7 @@ feedbackCandidates: []
558
568
  ## Shared-World Evidence
559
569
 
560
570
  The shared-world topology (#164) is the DECLARED override of the `per-lane-worlds`
561
- default: N distinct actor ROLES drive ONE provisioned, mutable service plane (one
571
+ default: N distinct participants drive ONE provisioned, mutable service plane (one
562
572
  app + one seeded DB) so their actions interact through shared state. The ONE
563
573
  subject plane is provisioned via `subject.source: clone` (a fresh `git clone`) or
564
574
  `subject.source: local-tree` (the operator's own working tree, packed on the host
@@ -603,8 +613,8 @@ cause, maxTotalUsd?, estimatedTotalUsd? }`. Each ordered `roles` entry names
603
613
  predecessor must have a matching `harness_error`, explicit `session_error`,
604
614
  `usage_unreported`, or measured `study_spend_limit`. Only the last cause
605
615
  carries budget figures, using the same per-participant estimates as the
606
- tracker. Blocked participants need matching simulation, stream and blocked-event
607
- evidence, with no actor, trace, screenshot or invented timeline turn.
616
+ tracker. Blocked participants need a matching `simulations[]` entry, stream and
617
+ blocked-event evidence, with no actor, trace, screenshot or invented timeline turn.
608
618
  Historical bundles without this field still require every role in the timeline.
609
619
  - `timeline: (checkpoint | turn)[]`: a harness-clocked, strictly alternating
610
620
  timeline that starts `cp-baseline`, alternates checkpoint → turn → checkpoint,
@@ -662,7 +672,7 @@ synthetic-subject gate); stateSeries snapshots are digest-only (allowed-keys tri
662
672
  all laneWindows share ONE plane provenance; and the CONCURRENCY-ON-PASS gate: a PASSED
663
673
  run MUST show ≥2 overlapping laneWindows AND a stateSeries delta whose timestamp is
664
674
  AT/AFTER an overlap interval start (otherwise it was not actually concurrent, or the
665
- world never changed under load). The per-role no-engagement guard applies to both.
675
+ world never changed under load). The per-participant no-engagement guard applies to both.
666
676
  Checkpoints / stateSeries persist digest-only by DEFAULT until the #108 PII/PHI
667
677
  detector lands.
668
678
 
@@ -1076,14 +1086,39 @@ proof claims zero on a `null` line, or when known spend exceeds the declared cap
1076
1086
  `humanish.run-status.v1` is `status.json`, written inside each run directory by
1077
1087
  every backend at run start, refreshed on a fixed cadence while the run is
1078
1088
  alive, and finalized when it ends: `{ schema, runId, state: running |
1079
- finished, mode, lab?, pid, startedAt, updatedAt, completedAt?, outcome? }`.
1089
+ finished | interrupted, mode, lab?, pid, startedAt, updatedAt, completedAt?,
1090
+ signal?, outcome? }`.
1080
1091
  `outcome` carries the bundle's `verdict`, `participants` and `estimatedCostUsd`
1081
1092
  when the run finishes, then the result's `ok` and `execution: { succeeded,
1082
- failures: [{ kind, message }] }` once the Observer has rendered. The verdict is
1083
- what the participants experienced; `execution` is whether the run worked as an
1084
- execution (`kind` is `harness`, `provider-cleanup`, `sandbox-cleanup`,
1085
- `evidence`, `cap` or `run`), and `ok` reads both under the route's policy
1086
- (`OUTCOME_POLICIES` in `src/run/judge.ts`).
1093
+ failures: [{ kind, message }], warnings? }` once the Observer has rendered. The
1094
+ verdict is what the participants experienced; `execution` is whether the run
1095
+ worked as an execution (`kind` is `harness`, `provider-cleanup`,
1096
+ `provider-policy`, `sandbox-cleanup`, `evidence`, `cap` or `run`), and `ok`
1097
+ reads both under the route's policy (`OUTCOME_POLICIES` in `src/run/judge.ts`).
1098
+ `provider-policy` names a computer-use or shared-world participant whose Codex
1099
+ app-server reported a disallowed item at any point in the session, or whose
1100
+ output could not be checked (a byte, frame or event limit, a malformed line, or
1101
+ a last frame cut off by anything but humanish's own signal, which is a run
1102
+ warning with its byte count). It is recorded even when a request already failed for it,
1103
+ because a step that tolerates a failed request (the debrief) would otherwise
1104
+ absorb it, and it fails the run on every route.
1105
+ `warnings`, in the same shape, holds the failures the policy lets warn and is
1106
+ omitted when empty: on computer-use, shared-world and scripted runs, a
1107
+ `sandbox-cleanup` entry for each sandbox whose release was not confirmed, with
1108
+ the participant (or `subject`), the release warning and the
1109
+ `humanish reclaim --run <id>` command. A local VM writes no receipt, so its
1110
+ entry names the container and the `docker rm --force --volumes <container>`
1111
+ command that removes it (through `limactl shell` on a Mac).
1112
+
1113
+ `interrupted` with `signal` (`SIGINT`, `SIGTERM` or `SIGHUP`) is written by
1114
+ the CLI's run command when that signal stops a live run outside post-run
1115
+ analysis. It then kills the E2B sandboxes the run's `sandbox-receipts.ndjson`
1116
+ names, writes `reclaim-receipt.json` as `humanish reclaim` does, and exits
1117
+ 128+n. The bundle is not finished: run.json keeps its last live flush, and no
1118
+ `outcome` is written. A `running` record that stopped refreshing still reads as
1119
+ interrupted once stale. A library caller of `runLab` gets no signal handling. A
1120
+ humanish older than this field rejects the state and falls back to the bundle's
1121
+ own liveness.
1087
1122
 
1088
1123
  It answers two questions the filesystem could not answer before: **which lab**
1089
1124
  a run belongs to, and **whether it is still alive**, including for runs an
@@ -1170,7 +1205,9 @@ never authoritative: every dollar figure is a rate-table multiply, labeled
1170
1205
  - `humanish.actor-estimated-cost.v1` (`ActorTrace.estimatedCost`): one participant's
1171
1206
  token-derived model cost, with `estimatedCostUsd` (or `null` + `reason`
1172
1207
  `no_rate_for_model`/`no_token_usage`/`account_billing_unknown`), `ratesAsOf`, `source`, `modelId`,
1173
- optional `placeholder`, and a `breakdown`.
1208
+ optional `placeholder`, and a `breakdown`. `basis: aggregated_turns_base_rate` marks usage that
1209
+ arrived as turn totals, such as Codex `turn.completed`, priced at the base tier because no single
1210
+ request's size is known; the run summary's `model-tokens` line carries the same `basis`.
1174
1211
  - `humanish.run-cost-summary.v1` (`RunBundle.cost`): the sum of every participant's
1175
1212
  `model-tokens` lines PLUS `desktop-minutes` lines. New independent CUA runs
1176
1213
  price each owned desktop separately; concurrent shared-world runs add one line per participant
@@ -1184,9 +1221,10 @@ never authoritative: every dollar figure is a rate-table multiply, labeled
1184
1221
  unconfirmed allocation adds `desktop_lifetime_incomplete` as a second null line.
1185
1222
  Live terminal-product runs emit the same summary: one `desktop-minutes` line for
1186
1223
  the E2B shell sandbox (its acquired-to-cleanup span and `e2b.getInfo` size) and
1187
- one `model-tokens` line for the Codex participant, which stays `null` with
1188
- `no_rate_for_model` (model `codex`) or `no_token_usage`. The terminal trace
1189
- records that same null `estimatedCost`. The sandbox line is not part of the
1224
+ one `model-tokens` line for the Codex participant, priced from the model the route passed
1225
+ to Codex (`gpt-5.6-sol` unless the lab declares one) with `basis:
1226
+ aggregated_turns_base_rate`, or `null` with `no_token_usage`. Older terminal bundles record
1227
+ `no_rate_for_model` (model `codex`). The terminal trace records the same `estimatedCost`. The sandbox line is not part of the
1190
1228
  terminal cost ledger, whose lines are checked against `scenario.caps.maxUsd`.
1191
1229
 
1192
1230
  The summary follows the SAME null discipline as the terminal cost ledger above.
@@ -1321,9 +1359,9 @@ on, and any failed or stalled request stops the session; both stop with `harness
1321
1359
  `stopCause: usage_unreported`, and the label “provider usage unavailable.” It is not recorded as a
1322
1360
  crossed threshold. `singleDispatch: true` disables the OpenAI adapter's HTTP and
1323
1361
  policy-negotiation retries, so each turn makes at most one request.
1324
- `runCuaActorSession({ requireReportedUsageForSpendCap: true })` sets `singleDispatch` itself and
1325
- is deprecated in this minor. It also attaches `trace.estimatedCost` for an injected
1326
- account-billed provider, which the composition does not. The loop cancels its owned request signal when a
1362
+ This composition replaces `runCuaActorSession`, which set `singleDispatch` itself and was removed
1363
+ in 0.107.0. Unlike `runCuaActorSession`, it attaches no `trace.estimatedCost` for an injected
1364
+ account-billed provider. The loop cancels its owned request signal when a
1327
1365
  request ends or its timeout wins; injected providers must honor cancellation
1328
1366
  and remain responsible for their own internal dispatch. Known usage remains in
1329
1367
  the trace alongside an explicit unknown. Reported zero input and output counts
@@ -1383,7 +1421,7 @@ refusal comes back in the route's own result envelope, with no run directory, re
1383
1421
  | Option | What it does | Routes |
1384
1422
  | ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1385
1423
  | `env` | Keys and subject env for the run. Defaults to `process.env` | all |
1386
- | `scorer` | An `AdapterScorerModule` (`score`, `deriveFeedback`, and `deriveArtifacts` on browser routes) over the finished evidence | computer use, shared world, terminal |
1424
+ | `scorer` | An `AdapterScorerModule` (`score`, `deriveFeedback`, and `deriveArtifacts` on browser routes) over the finished evidence. A scorer written for one context passes through `browserScorer` or `terminalScorer` | computer use, shared world, terminal |
1387
1425
  | `createProvider(ctx)` | The participant's brain. `ctx` is `ProviderContext`: `config`, `participant { id, index, count }` and `executor` | computer use: E2B, local VM or in process |
1388
1426
  | `inProcess.executor({ config, appUrl })` | Drives an `app-url` or `local-app` subject in process, one participant. Requires `createProvider` | computer use |
1389
1427
  | `prepareDesktop(desktop, target)` | Runs on an E2B sandbox before provisioning. `target` is `{ kind: "subject" }` or `{ kind: "participant", participant }` | computer use on E2B (each participant); shared world (provisioned: the subject, then each participant; external-public: each participant); scripted clone (the subject) |
@@ -1410,41 +1448,59 @@ Refusals:
1410
1448
 
1411
1449
  - `HUMANISH_LAB_OPTION_UNSUPPORTED`: the route cannot honor the option, for example `scorer` on
1412
1450
  a preview or scripted lab, `createProvider` off computer use, or `prepareDesktop` where no E2B
1413
- desktop exists. The message names the option and the route.
1414
- - `HUMANISH_LAB_OPTION_CONFLICT`: a new option is set together with the older field it replaces.
1415
-
1416
- The older route hook bags (`cuaHooks`, `scriptedHooks`, `terminalHooks`, `sharedWorldHooks`) and
1417
- `rerun.laneIds` keep their behavior in this minor and are removed in the next. Each old field in
1418
- use emits one `DeprecationWarning` (code `HUMANISH_RUN_LAB_OPTION_DEPRECATED`) per process:
1419
-
1420
- | Old field | New home |
1421
- | -------------------------------------------------------------------------------------------------- | ---------------------- |
1422
- | `score`, `deriveFeedback` on `cuaHooks`, `sharedWorldHooks` or `terminalHooks` | `scorer` |
1423
- | `deriveArtifacts` on `cuaHooks` or `sharedWorldHooks` | `scorer` |
1424
- | `cuaHooks.buildProvider` | `createProvider` |
1425
- | `cuaHooks.buildExecutor` | `inProcess.executor` |
1426
- | `prepareDesktop` on `cuaHooks`, `scriptedHooks` or `sharedWorldHooks` | `prepareDesktop` |
1427
- | `cuaHooks.onPreflight`; `onPhase` on `cuaHooks` or `sharedWorldHooks`; `automaticAnalysis.onStart` | `onEvent` |
1428
- | `onRuntimeStreamReady`, `onRuntimeStreamEnded` on `cuaHooks` or `sharedWorldHooks` | `onStream` |
1429
- | `automaticAnalysis.deps.signal` | `analysisSignal` |
1430
- | `env` on any bag | `env` |
1431
- | `rerun.laneIds` | `rerun.participantIds` |
1432
- | `cuaHooks.createDesktopLane` | none |
1433
-
1434
- `cuaHooks.createDesktopLane` warns and goes in the next minor with no replacement: a run's desktop
1435
- is E2B, the local VM or in process. The bags' other fields are test seams with no public
1436
- replacement, and they do not warn. A
1437
- `scorer` passed through `RunLabOptions` behaves exactly like the same functions in the old bag,
1438
- including the route-specific verdict rules in the next section.
1451
+ desktop exists. The message names the option and the route. The same code refuses a field
1452
+ `RunLabOptions` no longer has (below); that message names the field and where its job went.
1453
+
1454
+ `rerun.laneIds`, the older name of `rerun.participantIds`, was removed in 0.107.0. A caller that
1455
+ still passes it is refused with `HUMANISH_LAB_OPTION_UNSUPPORTED`; use `rerun.participantIds`.
1456
+
1457
+ The route hook bags (`cuaHooks`, `scriptedHooks`, `terminalHooks`, `sharedWorldHooks`,
1458
+ `automaticAnalysis`) were removed from `RunLabOptions`, with the hook bag types and the four route
1459
+ runners that took them (`runCuaActorLab`, `runScriptedBrowserLab`, `runTerminalProductLab`,
1460
+ `runConcurrentSharedWorld`). `lab` and `scorerProvenance` are set only by the humanish CLI. A
1461
+ JavaScript caller that passes any of these fields is refused before anything runs. Where each
1462
+ bag field's job went:
1463
+
1464
+ | Removed field | Use |
1465
+ | -------------------------------------------------------------------------------------------------- | -------------------- |
1466
+ | `score`, `deriveFeedback` on `cuaHooks`, `sharedWorldHooks` or `terminalHooks` | `scorer` |
1467
+ | `deriveArtifacts` on `cuaHooks` or `sharedWorldHooks` | `scorer` |
1468
+ | `cuaHooks.buildProvider` | `createProvider` |
1469
+ | `cuaHooks.buildExecutor` | `inProcess.executor` |
1470
+ | `prepareDesktop` on `cuaHooks`, `scriptedHooks` or `sharedWorldHooks` | `prepareDesktop` |
1471
+ | `cuaHooks.onPreflight`; `onPhase` on `cuaHooks` or `sharedWorldHooks`; `automaticAnalysis.onStart` | `onEvent` |
1472
+ | `onRuntimeStreamReady`, `onRuntimeStreamEnded` on `cuaHooks` or `sharedWorldHooks` | `onStream` |
1473
+ | `automaticAnalysis.deps.signal` | `analysisSignal` |
1474
+ | `env` on any bag | `env` |
1475
+ | `cuaHooks.createDesktopLane` | none |
1476
+
1477
+ `cuaHooks.createDesktopLane` has no replacement: a run's desktop is E2B, the local VM or in
1478
+ process. The bags' other fields were test seams with no public replacement. `scorer` keeps the
1479
+ route-specific verdict rules in the next section.
1480
+
1481
+ 0.107.0 also removed these exports from `humanish`. A removed function no longer warns; an import
1482
+ of it fails.
1483
+
1484
+ | Removed export | Use |
1485
+ | ---------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1486
+ | `runDryRun`, `RunOptions`, `RunResult` | `runLab(config, options)` on a `this-repo` lab; its result is `LabResult<"preview">` |
1487
+ | `runCuaActorSession` | `runComputerUseLoop` with `createOpenAiResponsesProvider({ singleDispatch: true })`, `redaction: defaultRedactionHooks` and `now: Date.now`, which `runCuaActorSession` defaulted (the composition above). A caller that passed `desktop` and `executorOptions` writes its own `CuaExecutor`: the E2B desktop executor is not exported |
1488
+ | `CuaActorLabResult`, `ScriptedBrowserLabResult`, `TerminalProductLabResult`, `ConcurrentSharedWorldLabResult` | `LabResult<"computer-use">`, `LabResult<"scripted">`, `LabResult<"terminal">`, `LabResult<"shared-world">` |
1489
+ | `SubjectPhaseEvent` | the `subject-phase` `LabEvent` through `onEvent`. Its `type` is `"subject-phase"`; the phase that was `type` is `name`, and `target` is `{ kind: "subject" }` or `{ kind: "participant", participant }`. `message`, `at`, `ok` and `durationMs` are unchanged |
1490
+ | `LabOutcome.backend`, `LabBackend` | `outcome.route` |
1491
+ | `selectLabBackend`, the `routesTo*` predicates, `actorResolvesToTerminal` | `routeOf(config)` |
1492
+ | `resolveLabDryRun` | `RunLabOptions.dryRun`; without it, `scenario.mode` decides |
1493
+ | `cuaLaneCount` | the `plan` `LabEvent`, which lists every participant |
1494
+ | `resolveSeatUrl` | `parseLabConfig`, which refuses a participant entry that is not same-origin loopback; build the URL with `new URL(entry, serveUrl)` |
1495
+ | `cuaLaneValidationReason`, `sharedWorldValidationReason`, `concurrentSharedWorldValidationReason`, `externalPublicSharedWorldValidationReason` | `parseLabConfig`, which returns the same reason |
1496
+ | `MAX_CUA_LANES` | none; `parseLabConfig` refuses a roster of more than 16 participants |
1439
1497
 
1440
1498
  ## Product-Adapter Extension Seam
1441
1499
 
1442
1500
  The terminal-product and browser/computer-use routes let an adopter attach
1443
1501
  product-specific scoring + feedback as a THIN in-repo extension WITHOUT forking
1444
1502
  core. The seam is `RunLabOptions.scorer`, an `AdapterScorerModule`, for terminal-product,
1445
- computer-use and shared-world runs; the CLI loads the same module with `--scorer`. The older
1446
- `TerminalProductLabHooks`, `CuaActorLabHooks` and `SharedWorldLabHooks` fields still accept the
1447
- same functions in this minor. This is never a built-in product scorer (the adopter's scorecard
1503
+ computer-use and shared-world runs; the CLI loads the same module with `--scorer`. This is never a built-in product scorer (the adopter's scorecard
1448
1504
  lives in the adopter's repo).
1449
1505
 
1450
1506
  Three product-agnostic carriers keep core's nouns closed while letting the adapter
@@ -1522,7 +1578,7 @@ terminal-agent candidate names its substrate honestly; browser candidates use
1522
1578
  the existing `e2b-desktop` substrate. The routes invoke hooks over FULLY-ASSEMBLED,
1523
1579
  redacted evidence (`TerminalProductScoringContext` or
1524
1580
  `BrowserLabScoringContext`: `bundle`, runtime-only `runDir`, run identifiers,
1525
- actor/backend metadata; all exported public types), scrub+redact returned
1581
+ actor and route metadata; all exported public types), scrub+redact returned
1526
1582
  payloads, and DROP any malformed score, candidate, or artifact reference with a
1527
1583
  warning so a bad extension never poisons a verifiable bundle. On the terminal
1528
1584
  route the context also carries `transcript`: the FULL normalized session
@@ -176,6 +176,30 @@ It never includes provider output, exception text, evidence values or IDs.
176
176
  Historical artifacts with the generic `analysis_validation_failed` code remain
177
177
  valid and unchanged.
178
178
 
179
+ A rejected response is never stored in the run directory or in any shareable
180
+ artifact. For diagnosis, humanish keeps it locally at
181
+ `.humanish/analysis-diagnostics/<run>/<analysis>.json`
182
+ (`humanish.analysis-rejected-output.v1`). The record holds:
183
+
184
+ - the run and analysis IDs, the model and the prompt version;
185
+ - the allowlisted code and every failed rule code;
186
+ - the response, scrubbed. Every string and key loses known transient secret
187
+ values, including their percent-encoded, escaped and base64 forms, and then gets
188
+ shape redaction. A number or boolean equal to a known value is replaced. A
189
+ string with no known value keeps its original spelling.
190
+
191
+ When validation ran, the response is the one validation saw, after the narrative
192
+ scrub. A schema or scrub rejection keeps the parsed response. An unexpected
193
+ validation exception keeps nothing.
194
+
195
+ The directory sits outside every run directory, and export, verify and the
196
+ Observer read only run directories. `humanish analyze` returns the file's path as
197
+ `rejectedOutputPath` and prints it, and so does a lab run's automatic analysis.
198
+ Each write removes all but the newest 20 records across runs. It removes a
199
+ record only while its directory is still the listed one, so a directory
200
+ replaced by a symlink after listing is left alone. The record's
201
+ feedback quotes cite evidence IDs that the run's own `analysis.json` resolves.
202
+
179
203
  Participant reviews cite distinct packet-local evidence IDs belonging only to
180
204
  that participant's stream; source event IDs are not citation IDs. Shared
181
205
  interactions can cite multiple included participants in findings and concern
@@ -22,7 +22,8 @@ only the interface to `src/substrates/` would split one concept across two folde
22
22
  - A reader finds the desktop contract and its implementations in one folder, beside the runner
23
23
  that calls them.
24
24
  - `src/substrates/` stays free of route types; it does not import from `src/routes/`.
25
- - Shared-world seats reach the same desktops through computer-use's participant runner.
25
+ - Shared-world participants reach the same desktops through computer-use's `runCuaParticipant`
26
+ (`src/routes/computer-use/participant-execution.ts`).
26
27
 
27
28
  ## Enforced by
28
29
 
@@ -128,6 +128,7 @@ outcomes and the deterministic review verdict are never rewritten by analysis.
128
128
  | `AUTOMATIC_ANALYSIS_KEY_MISSING` | `skipped` | No OpenAI API key |
129
129
  | `AUTOMATIC_ANALYSIS_NO_PARTICIPANT_EVIDENCE` | `skipped` | A default analysis found no participant evidence |
130
130
  | `AUTOMATIC_ANALYSIS_ACTOR_CANCELLED` | `skipped` | The harness cancelled the participants |
131
+ | `AUTOMATIC_ANALYSIS_CLEANUP_UNCONFIRMED` | `skipped` | A local VM study could not confirm its cleanup; the command exits 2 |
131
132
  | `AUTOMATIC_ANALYSIS_ALREADY_REQUESTED` | `skipped` | Another request already claimed this run's analysis |
132
133
  | `AUTOMATIC_ANALYSIS_BUSY` | `skipped` | Another analysis is running |
133
134
  | `AUTOMATIC_ANALYSIS_ADMISSION_REFUSED` | `skipped` | The configuration or the cost estimate was refused before any request |
@@ -288,7 +288,8 @@ adoption problem we already knew about in words no test could produce.
288
288
 
289
289
  This spends money and needs keys, so it is deliberately NOT part of `release:check`
290
290
  and never runs in CI. The lab's caps hold product spend to `$0`; what it costs is
291
- the agent's own tokens and a few sandbox-minutes. The agent's model key stays outside
291
+ the agent's own tokens (on `gpt-5.6-sol` unless the lab names a model, estimated in `run.json`'s
292
+ `cost`) and a few sandbox-minutes. The agent's model key stays outside
292
293
  the sandbox in an E2B egress rule (`runtimeAuth: openai-egress`), and its `web_search`
293
294
  fetches run on the model provider's side, so an error from one says nothing about the
294
295
  sandbox's network.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "humanish",
3
- "version": "0.106.0",
3
+ "version": "0.107.0",
4
4
  "description": "Open-source-safe CLI for persona simulation, observer review, and public-safe feedback drafts.",
5
5
  "keywords": [
6
6
  "agent-harness",
@@ -90,10 +90,10 @@
90
90
  "comms:agentmail:contract": "node --import tsx scripts/agentmail-contract-check.mjs",
91
91
  "format": "oxfmt",
92
92
  "format:check": "oxfmt --check",
93
- "lint": "node scripts/check-lint-cap.mjs --max-warnings=444",
93
+ "lint": "node scripts/check-lint-cap.mjs --max-warnings=442",
94
94
  "knip": "knip",
95
- "prose:check": "node scripts/check-code-prose.mjs --max-issue-refs=371 --max-fix-tags=23 --max-caps=1743",
96
- "vocabulary:check": "tsx scripts/check-retired-words.ts --max-lane=188 --max-seat=6 --max-role=52 --max-sim=51 --max-study=287"
95
+ "prose:check": "node scripts/check-code-prose.mjs --max-issue-refs=357 --max-fix-tags=0 --max-caps=804 --max-lane-comments=20",
96
+ "vocabulary:check": "tsx scripts/check-retired-words.ts --max-lane=137 --max-seat=4 --max-role=52 --max-sim=33 --max-study=9"
97
97
  },
98
98
  "dependencies": {
99
99
  "commander": "^15.0.0",
@@ -361,7 +361,8 @@ is rejected because it is not wired there.
361
361
  For app-url/operator-provided subjects, run `humanish comms catch` on a reachable
362
362
  host, point the app's email sends at that catch, and declare
363
363
  `comms.email.external.catchBaseUrl` (plus `inboxBaseUrl` if different). A declared
364
- `authTokenEnv` is an environment variable name, never a credential value.
364
+ `authTokenEnv` is an environment variable name, never a credential value; its
365
+ token must be at least 16 characters.
365
366
  The in-sandbox catch
366
367
  needs `python3` (the stock E2B desktop has it).
367
368
  Evidence is digest-only (`humanish.comms-thread.v1` — counts and digests, never
@@ -413,7 +414,7 @@ npx humanish verify --run latest --json
413
414
  npx humanish watch --run latest --detach --no-open --json
414
415
  ```
415
416
 
416
- Do not use `humanish watch --sims ...` as a substitute for a scripted-browser
417
+ Do not use `humanish watch --count ...` as a substitute for a scripted-browser
417
418
  lab. `watch` renders or follows Observer evidence; a live scripted-browser lab
418
419
  captures desktop and mobile browser evidence against a running app.
419
420
 
@@ -1,7 +1,7 @@
1
1
  interface:
2
2
  display_name: "humanish CLI"
3
3
  short_description: "Set up public-safe persona simulation"
4
- default_prompt: "Use $humanish to install humanish in this repo, scaffold synthetic personas and scenarios, run the safe Observer proof, and report the public-safe artifacts. If the app can run locally, start it on loopback and run a live scripted-browser lab (see https://humanish.dev/docs/lab-manifests#scripted-browser-scenarios; set `scenario.mode: live` and keep `review.analysis: false`) before rendering Observer with `humanish watch --run latest`; do not treat `watch --sims` as app behavior proof."
4
+ default_prompt: "Use $humanish to install humanish in this repo, scaffold synthetic personas and scenarios, run the safe Observer proof, and report the public-safe artifacts. If the app can run locally, start it on loopback and run a live scripted-browser lab (see https://humanish.dev/docs/lab-manifests#scripted-browser-scenarios; set `scenario.mode: live` and keep `review.analysis: false`) before rendering Observer with `humanish watch --run latest`; do not treat `watch --count` as app behavior proof."
5
5
 
6
6
  policy:
7
7
  allow_implicit_invocation: true