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
package/dist/run-lab.d.ts CHANGED
@@ -1,13 +1,14 @@
1
- import type { AutomaticAnalysisHooks } from "./analysis/automatic-completion.js";
1
+ import type { LocalVmInput } from "./routes/computer-use/types.js";
2
2
  import { type LateScorer } from "./lab/route-inputs.js";
3
- import { type LabBackend, type LabRoute } from "./lab/plan.js";
4
- import { type RunLabDriving, type RunLabHomes } from "./lab/run-lab-options.js";
3
+ import { type LabRoute } from "./lab/plan.js";
4
+ import type { LabDeps } from "./lab/lab-deps.js";
5
+ import type { RunLabDriving, RunLabHomes } from "./lab/run-lab-homes.js";
5
6
  import { type LabConfig } from "./lab/types.js";
6
7
  import type { ObserverResult } from "./observer/render.js";
7
- import { type CuaActorLabHooks, type CuaActorLabResult } from "./routes/computer-use/types.js";
8
- import { type ScriptedBrowserLabHooks, type ScriptedBrowserLabResult } from "./routes/scripted/types.js";
9
- import { type ConcurrentSharedWorldLabResult, type SharedWorldLabHooks } from "./routes/shared-world/types.js";
10
- import { type TerminalProductLabHooks, type TerminalProductLabResult } from "./routes/terminal/types.js";
8
+ import { type CuaActorLabResult } from "./routes/computer-use/types.js";
9
+ import { type ScriptedBrowserLabResult } from "./routes/scripted/types.js";
10
+ import { type ConcurrentSharedWorldLabResult } from "./routes/shared-world/types.js";
11
+ import { type TerminalProductLabResult } from "./routes/terminal/types.js";
11
12
  import { type RunScorerProvenance } from "./run/bundle.js";
12
13
  import { type RunResult } from "./run/results.js";
13
14
  import { type RunLabProvenance } from "./run/status.js";
@@ -16,7 +17,13 @@ import { type RunLabProvenance } from "./run/status.js";
16
17
  * hook bags before anything runs. Each route closes the run it started on every exit through its
17
18
  * own run scope (`src/run/run.ts`).
18
19
  */
19
- export declare function runLab(config: LabConfig, options: RunLabOptions): Promise<LabOutcome>;
20
+ export declare function runLab(config: LabConfig, options: InternalRunLabOptions, deps?: LabDeps): Promise<LabOutcome>;
21
+ /**
22
+ * runLab as the package exports it (`src/index.ts`): the public options only. A JavaScript caller
23
+ * that passes a field RunLabOptions no longer has is refused in the route's own result envelope
24
+ * before anything runs.
25
+ */
26
+ export declare function runPackageLab(config: LabConfig, options: RunLabOptions): Promise<LabOutcome>;
20
27
  /** A lab planned once: the route's refusal, or the run of its plan. */
21
28
  export type PreparedLab = {
22
29
  readonly ok: false;
@@ -28,46 +35,41 @@ export type PreparedLab = {
28
35
  };
29
36
  /**
30
37
  * Normalizes the options and plans the lab once, so a caller can present a refusal before it loads
31
- * anything the run needs. A local browser study's desktop lane and provider are bound first, so the
32
- * plan is made with them; with createDesktopLane the caller provides the desktop, and with
33
- * buildExecutor it drives the app in process and needs none.
38
+ * anything the run needs. A local browser study's provider is bound first, so the plan is made with
39
+ * it, and its desktop goes to the computer-use run as `localVm`; with inProcess the caller drives
40
+ * the app in process and needs no desktop.
34
41
  */
35
- export declare function prepareLab(config: LabConfig, options: RunLabOptions): Promise<PreparedLab>;
42
+ export declare function prepareLab(config: LabConfig, options: InternalRunLabOptions, deps?: LabDeps): Promise<PreparedLab>;
36
43
  /**
37
- * Runtime overrides from CLI flags, the typed homes (`RunLabHomes`, `RunLabDriving`) and the older
38
- * route hook bags they replace. Each wins over the config when provided.
44
+ * What a package caller passes to runLab: the run's settings and the typed homes (`RunLabHomes`,
45
+ * `RunLabDriving`). Each wins over the config when provided.
39
46
  */
40
47
  export type RunLabOptions = RunLabBase & RunLabHomes & RunLabDriving;
41
48
  interface RunLabBase {
42
- automaticAnalysis?: AutomaticAnalysisHooks;
43
49
  cwd: string;
44
50
  runId?: string;
45
- /** Which manifest this run came from (#455): threaded to the route so the run's own
46
- * status record and bundle can say which lab produced it. Absent for library callers who
47
- * hand a LabConfig directly — the run is then honestly lab-less rather than guessed. */
48
- lab?: RunLabProvenance;
49
51
  dryRun?: boolean;
50
52
  open?: boolean;
51
53
  /** Participant count override: preview participants or computer-use desktops. */
52
54
  count?: number;
53
- /** CUA fan-out only: create a new run for failed/selected lanes from a prior run. */
55
+ /** CUA fan-out only: create a new run for failed/selected participants from a prior run. */
54
56
  rerun?: {
55
57
  sourceRunId: string;
56
58
  participantIds?: string[];
57
- /** @deprecated The older name of `participantIds`. */
58
- laneIds?: string[];
59
59
  };
60
60
  onObserverReady?: (observer: ObserverResult & {
61
61
  ok: true;
62
62
  }) => Promise<void> | void;
63
- /** Computer-use route hooks: subject provisioning (library callers) + test DI seams. */
64
- cuaHooks?: CuaActorLabHooks;
65
- /** Scripted-browser route hooks: browser injection + test DI seams (mirror of cuaHooks). */
66
- scriptedHooks?: ScriptedBrowserLabHooks;
67
- /** Terminal-product route hooks: sandbox/runtime-auth DI seams (mirror of cuaHooks). */
68
- terminalHooks?: TerminalProductLabHooks;
69
- /** Shared-world route hooks: sandbox / runSession / checkpoint DI seams (mirror of cuaHooks). */
70
- sharedWorldHooks?: SharedWorldLabHooks;
63
+ }
64
+ /** runLab's options inside the package: the public ones plus what only the CLI and tests set. */
65
+ export type InternalRunLabOptions = RunLabOptions & RunLabInternals;
66
+ interface RunLabInternals {
67
+ /**
68
+ * Which manifest this run came from (#455). planLab puts it on the plan, and the route reads
69
+ * plan.lab for the run's status record and bundle. Absent for a library caller that passes a
70
+ * LabConfig directly; that run records no lab.
71
+ */
72
+ lab?: RunLabProvenance;
71
73
  /**
72
74
  * CONFIG-DECLARED scorer provenance (#316), forwarded alongside whichever hooks bag carries the
73
75
  * loaded scorer. Its presence is the "declared" marker the terminal route reads to flip a
@@ -75,15 +77,15 @@ interface RunLabBase {
75
77
  * (path + digest), never adopter-supplied; absent for library callers.
76
78
  */
77
79
  scorerProvenance?: RunScorerProvenance;
80
+ /** The local VM study's desktop, analysis gate and signal, for a local browser lab. */
81
+ localVm?: LocalVmInput;
78
82
  }
79
83
  /** A run's result and the route it ran on. */
80
- interface RouteOutcome<R extends LabRoute, B extends LabBackend, T> {
84
+ interface RouteOutcome<R extends LabRoute, T> {
81
85
  route: R;
82
- /** @deprecated The route's older name. Use `route`; this field goes in the next minor. */
83
- backend: B;
84
86
  result: T;
85
87
  }
86
- export type LabOutcome = RouteOutcome<"preview", "synthetic", RunResult> | RouteOutcome<"computer-use", "cua", CuaActorLabResult> | RouteOutcome<"scripted", "scripted", ScriptedBrowserLabResult> | RouteOutcome<"terminal", "terminal", TerminalProductLabResult> | RouteOutcome<"shared-world", "concurrent-shared-world", ConcurrentSharedWorldLabResult>;
88
+ export type LabOutcome = RouteOutcome<"preview", RunResult> | RouteOutcome<"computer-use", CuaActorLabResult> | RouteOutcome<"scripted", ScriptedBrowserLabResult> | RouteOutcome<"terminal", TerminalProductLabResult> | RouteOutcome<"shared-world", ConcurrentSharedWorldLabResult>;
87
89
  /**
88
90
  * A plan past its route's local checks that need no scorer: the refusal they returned, or the
89
91
  * route's run, which takes a scorer loaded after them.
package/dist/run-lab.js CHANGED
@@ -6,10 +6,9 @@
6
6
  // refusal before it loads a declared review scorer.
7
7
  import { computerUseInput, scriptedInput, sharedWorldInput, terminalInput, } from "./lab/route-inputs.js";
8
8
  import { planLab, resolveLabDryRun, routeOf } from "./lab/plan.js";
9
- import { normalizeRunLabOptions, optionRefusalOutcome, } from "./lab/run-lab-options.js";
9
+ import { normalizeRunLabOptions, optionRefusalOutcome, removedOptionRefusal, } from "./lab/run-lab-options.js";
10
10
  import {} from "./lab/types.js";
11
11
  import { admitComputerUsePlan, computerUseLabRefusal } from "./routes/computer-use/route.js";
12
- import { participantDesktopOf } from "./routes/computer-use/participant-desktop.js";
13
12
  import {} from "./routes/computer-use/types.js";
14
13
  import { admitPreviewPlan, previewLabRefusal } from "./routes/preview.js";
15
14
  import { admitScriptedPlan, scriptedLabRefusal } from "./routes/scripted/route.js";
@@ -27,40 +26,51 @@ import { isLocalBrowserLab, localBrowserDefaults } from "./substrates/local/runt
27
26
  * hook bags before anything runs. Each route closes the run it started on every exit through its
28
27
  * own run scope (`src/run/run.ts`).
29
28
  */
30
- export async function runLab(config, options) {
31
- const prepared = await prepareLab(config, options);
29
+ export async function runLab(config, options, deps = {}) {
30
+ const prepared = await prepareLab(config, options, deps);
32
31
  return prepared.ok ? prepared.run() : prepared.outcome;
33
32
  }
33
+ /**
34
+ * runLab as the package exports it (`src/index.ts`): the public options only. A JavaScript caller
35
+ * that passes a field RunLabOptions no longer has is refused in the route's own result envelope
36
+ * before anything runs.
37
+ */
38
+ export async function runPackageLab(config, options) {
39
+ const removed = removedOptionRefusal(options);
40
+ if (removed === undefined)
41
+ return runLab(config, options);
42
+ const lab = localBrowserDefaults(config);
43
+ return optionRefusalOutcome(lab, routeOf(lab), options, removed);
44
+ }
34
45
  /**
35
46
  * Normalizes the options and plans the lab once, so a caller can present a refusal before it loads
36
- * anything the run needs. A local browser study's desktop lane and provider are bound first, so the
37
- * plan is made with them; with createDesktopLane the caller provides the desktop, and with
38
- * buildExecutor it drives the app in process and needs none.
47
+ * anything the run needs. A local browser study's provider is bound first, so the plan is made with
48
+ * it, and its desktop goes to the computer-use run as `localVm`; with inProcess the caller drives
49
+ * the app in process and needs no desktop.
39
50
  */
40
- export async function prepareLab(config, options) {
51
+ export async function prepareLab(config, options, deps = {}) {
41
52
  const lab = localBrowserDefaults(config);
42
53
  const route = routeOf(lab);
43
54
  const normalized = normalizeRunLabOptions(lab, route, options);
44
55
  if (!normalized.ok)
45
56
  return { ok: false, outcome: optionRefusalOutcome(lab, route, options, normalized) };
46
- const hooks = normalized.options.cuaHooks;
47
- const localVm = isLocalBrowserLab(lab) &&
48
- (hooks === undefined || participantDesktopOf(hooks) === undefined) &&
49
- hooks?.buildExecutor === undefined
50
- ? (await import("./routes/computer-use/local-vm.js")).prepareLocalVmStudy
57
+ // An in-process executor needs no desktop, and a caller that already prepared the study passes
58
+ // its localVm, which a second study would replace.
59
+ const prepareLocalVm = isLocalBrowserLab(lab) && options.inProcess === undefined && options.localVm === undefined
60
+ ? (await import("./routes/computer-use/local-vm.js")).prepareLocalVmRun
51
61
  : undefined;
52
- const study = localVm?.({ ...normalized.options, config: lab });
53
- const planning = study?.options ?? normalized.options;
54
- const planned = planLab(lab, planning);
62
+ const vm = prepareLocalVm?.({ ...normalized.options, config: lab });
63
+ const planning = vm === undefined ? normalized.options : { ...vm.options, localVm: vm.localVm };
64
+ const planned = planLab(lab, planning, deps);
55
65
  if (!planned.ok) {
56
- await study?.close();
57
- const outcome = await refusalOutcome(lab, planning, planned.refusal);
66
+ await vm?.close();
67
+ const outcome = await refusalOutcome(lab, planning, planned.refusal, deps, normalized.emit);
58
68
  outcome.result.warnings.push(...normalized.warnings);
59
69
  return { ok: false, outcome };
60
70
  }
61
- const admitted = await admitPlan(lab, planning, planned.planned.plan);
71
+ const admitted = await admitPlan(lab, planning, planned.planned.plan, deps, normalized.emit);
62
72
  if (!admitted.ok) {
63
- await study?.close();
73
+ await vm?.close();
64
74
  admitted.outcome.result.warnings.push(...normalized.warnings);
65
75
  return { ok: false, outcome: admitted.outcome };
66
76
  }
@@ -88,61 +98,55 @@ export async function prepareLab(config, options) {
88
98
  return outcome;
89
99
  }
90
100
  finally {
91
- await study?.close();
101
+ await vm?.close();
92
102
  }
93
103
  },
94
104
  };
95
105
  }
96
106
  /** The route's admit function for a plan, with the route's input from the run's options. */
97
- async function admitPlan(config, options, plan) {
107
+ async function admitPlan(config, options, plan, deps, emit) {
98
108
  switch (plan.route) {
99
109
  case "preview":
100
110
  return admitPreviewPlan(plan, options);
101
111
  case "computer-use":
102
- return admitComputerUsePlan(plan, computerUseInput(options), config);
112
+ return admitComputerUsePlan(plan, computerUseInput(options, deps, emit), config);
103
113
  case "scripted":
104
- return admitScriptedPlan(plan, scriptedInput(options));
114
+ return admitScriptedPlan(plan, scriptedInput(options, deps, emit));
105
115
  case "terminal":
106
- return admitTerminalPlan(plan, terminalInput(options));
116
+ return admitTerminalPlan(plan, terminalInput(options, deps, emit));
107
117
  case "shared-world":
108
- return admitSharedWorldPlan(plan, sharedWorldInput(options), config);
118
+ return admitSharedWorldPlan(plan, sharedWorldInput(options, deps, emit), config);
109
119
  }
110
120
  }
111
121
  /** The refused route's own result, with the envelope and analysis record its runner returns. */
112
- async function refusalOutcome(config, options, refusal) {
122
+ async function refusalOutcome(config, options, refusal, deps, emit) {
113
123
  // Spend-safe default: a lab goes live only when the config (or CLI) says so.
114
124
  const dryRun = resolveLabDryRun(config, options.dryRun, true) ?? true;
115
- const lab = options.lab === undefined ? {} : { lab: options.lab };
116
125
  switch (refusal.route) {
117
126
  case "preview":
118
127
  return {
119
128
  route: "preview",
120
- backend: "synthetic",
121
129
  result: previewLabRefusal(options.cwd, refusal),
122
130
  };
123
131
  case "computer-use":
124
132
  return {
125
133
  route: "computer-use",
126
- backend: "cua",
127
- result: await computerUseLabRefusal({ ...computerUseInput(options), ...lab, config, dryRun }, refusal),
134
+ result: await computerUseLabRefusal({ ...computerUseInput(options, deps, emit), config, dryRun }, refusal),
128
135
  };
129
136
  case "scripted":
130
137
  return {
131
138
  route: "scripted",
132
- backend: "scripted",
133
- result: await scriptedLabRefusal({ ...scriptedInput(options), ...lab, config, dryRun }, refusal),
139
+ result: await scriptedLabRefusal({ ...scriptedInput(options, deps, emit), config, dryRun }, refusal),
134
140
  };
135
141
  case "terminal":
136
142
  return {
137
143
  route: "terminal",
138
- backend: "terminal",
139
- result: await terminalLabRefusal({ ...terminalInput(options), ...lab, config, dryRun }, refusal),
144
+ result: await terminalLabRefusal({ ...terminalInput(options, deps, emit), config, dryRun }, refusal),
140
145
  };
141
146
  case "shared-world":
142
147
  return {
143
148
  route: "shared-world",
144
- backend: "concurrent-shared-world",
145
- result: await sharedWorldLabRefusal({ ...sharedWorldInput(options), ...lab, config, dryRun }, refusal),
149
+ result: await sharedWorldLabRefusal({ ...sharedWorldInput(options, deps, emit), config, dryRun }, refusal),
146
150
  };
147
151
  }
148
152
  }
@@ -3,7 +3,7 @@ import { type SubjectPhaseEvent } from "./steps.js";
3
3
  /**
4
4
  * Prepare a CLI study's runtime and, only when declared, its product (#495, #515).
5
5
  *
6
- * The install runs UNKEYED and before the session starts, for the same reason the clone route
6
+ * The install runs unkeyed and before the session starts, for the same reason the clone route
7
7
  * provisions its subject first: what is being studied begins when the participant looks at the
8
8
  * screen. Omitting install deliberately studies product installation; Node/npm remain a
9
9
  * harness prerequisite so the participant can follow the product's public npm instructions.
@@ -6,7 +6,7 @@ import { emitPhaseCompleted, emitPhaseStarted, INSTALL_TIMEOUT_MS, } from "./ste
6
6
  /**
7
7
  * Prepare a CLI study's runtime and, only when declared, its product (#495, #515).
8
8
  *
9
- * The install runs UNKEYED and before the session starts, for the same reason the clone route
9
+ * The install runs unkeyed and before the session starts, for the same reason the clone route
10
10
  * provisions its subject first: what is being studied begins when the participant looks at the
11
11
  * screen. Omitting install deliberately studies product installation; Node/npm remain a
12
12
  * harness prerequisite so the participant can follow the product's public npm instructions.
@@ -74,7 +74,7 @@ export declare function createLocalTreeArchive(root: string, options?: CreateLoc
74
74
  /**
75
75
  * Normalize an author-supplied exclude entry to the relPath shape enumeration
76
76
  * produces (no leading "./", no trailing "/"). Absolute paths and glob syntax
77
- * are REJECTED, not silently no-op'd: an exclude the author believed in but
77
+ * are rejected instead of silently ignored: an exclude the author believed in but
78
78
  * that never matches anything is a leak vector, so unusable shapes fail
79
79
  * closed at the packing boundary (and, for lab manifests, already at parse
80
80
  * time in src/lab/parse/subject.ts).
@@ -1,6 +1,6 @@
1
1
  // Local working-tree packaging for `subject.source: local-tree`.
2
2
  //
3
- // Enumeration produces ONE file list that drives BOTH the tar archive and the
3
+ // Enumeration produces one file list that drives both the tar archive and the
4
4
  // content digest (archiveSha256), so the digest can never diverge from what
5
5
  // actually gets packed. A prior in-house harness reimplemented exclusion in a
6
6
  // second, independent digest walker that could drift from what its tar
@@ -113,7 +113,7 @@ export function createLocalTreeArchive(root, options = {}) {
113
113
  (extraExclude.length > 0 ? " and extraExclude" : "") +
114
114
  "; local-tree packing requires at least one non-denylisted file or symlink. (Paths in this message are basenames only; the packed root is the lab resolution cwd.)");
115
115
  }
116
- // Check the cap from enumerated sizes BEFORE reading/hashing file bytes, so
116
+ // Check the cap from enumerated sizes before reading/hashing file bytes, so
117
117
  // an oversized tree fails closed without the cost of hashing all of it.
118
118
  const enumeratedBytes = entries.reduce((sum, entry) => (entry.kind === "file" ? sum + entry.size : sum), 0);
119
119
  if (enumeratedBytes > maxArchiveBytes) {
@@ -200,7 +200,7 @@ function captureGitInfo(root) {
200
200
  return undefined;
201
201
  }
202
202
  // Pathspec-scoped to the packed root: `git status --porcelain` without a
203
- // pathspec reports the WHOLE enclosing repository, which would report a
203
+ // pathspec reports the whole enclosing repository, which would report a
204
204
  // clean packed subtree as dirty whenever an unrelated sibling package in a
205
205
  // monorepo has in-progress changes.
206
206
  const status = execFileSync("git", ["status", "--porcelain", "--", "."], {
@@ -290,7 +290,7 @@ function isDenylistedSegment(relPath) {
290
290
  /**
291
291
  * Normalize an author-supplied exclude entry to the relPath shape enumeration
292
292
  * produces (no leading "./", no trailing "/"). Absolute paths and glob syntax
293
- * are REJECTED, not silently no-op'd: an exclude the author believed in but
293
+ * are rejected instead of silently ignored: an exclude the author believed in but
294
294
  * that never matches anything is a leak vector, so unusable shapes fail
295
295
  * closed at the packing boundary (and, for lab manifests, already at parse
296
296
  * time in src/lab/parse/subject.ts).
@@ -5,14 +5,14 @@ import type { Shell } from "../substrates/shell.js";
5
5
  import { type SubjectPhaseEvent } from "./steps.js";
6
6
  /**
7
7
  * Provision a local-tree subject inside the sandbox: upload the once-per-run packed archive
8
- * (identical bytes across every fan-out lane) → extract it into SUBJECT_DIR → the
8
+ * (identical bytes across every fan-out participant) → extract it into SUBJECT_DIR → the
9
9
  * same shared serve pipeline provisionCloneSubject uses. Unlike the clone route there is no
10
10
  * in-sandbox git refresh: the archive excludes .git entirely (see local-tree-archive.ts), so
11
11
  * subject identity is the host-side LocalTreeArchive captured at pack time, never anything
12
12
  * resolved in-sandbox.
13
13
  */
14
14
  export declare function provisionLocalTreeSubject(shell: Shell, args: {
15
- /** The once-per-run packed archive bytes (shared byte-identically across every lane). */
15
+ /** The once-per-run packed archive bytes (shared byte-identically across every participant). */
16
16
  archiveBuffer: ArrayBuffer;
17
17
  serve: LabSubjectServe;
18
18
  /** Declared subject state (seed steps; external declaration is provenance-only). */
@@ -7,7 +7,7 @@ import { SOURCE_TIMEOUT_MS, emitPhaseCompleted, emitPhaseStarted, SUBJECT_DIR, }
7
7
  const LOCAL_TREE_REMOTE_ARCHIVE_PATH = "/home/user/.humanish-source.tar.gz";
8
8
  /**
9
9
  * Provision a local-tree subject inside the sandbox: upload the once-per-run packed archive
10
- * (identical bytes across every fan-out lane) → extract it into SUBJECT_DIR → the
10
+ * (identical bytes across every fan-out participant) → extract it into SUBJECT_DIR → the
11
11
  * same shared serve pipeline provisionCloneSubject uses. Unlike the clone route there is no
12
12
  * in-sandbox git refresh: the archive excludes .git entirely (see local-tree-archive.ts), so
13
13
  * subject identity is the host-side LocalTreeArchive captured at pack time, never anything
@@ -6,7 +6,7 @@ export declare const NODE_NPM_PREFIX_SCRIPT: string;
6
6
  export declare const NODE_BOOTSTRAP_TIMEOUT_MS: number;
7
7
  /**
8
8
  * Install Node from the pinned official archive when the desktop has no working Node >=20 and
9
- * npm. The terminal lane, desktop CLI studies and the subject serve pipeline share it. It needs no
9
+ * npm. The terminal route, desktop CLI studies and the subject serve pipeline share it. It needs no
10
10
  * apt: every network call is one bounded curl, so a stalled mirror fails the step within minutes.
11
11
  */
12
12
  export declare const NODE_BOOTSTRAP_COMMAND: string;
@@ -20,7 +20,7 @@ export const NODE_NPM_PREFIX_SCRIPT = [
20
20
  export const NODE_BOOTSTRAP_TIMEOUT_MS = 5 * 60_000;
21
21
  /**
22
22
  * Install Node from the pinned official archive when the desktop has no working Node >=20 and
23
- * npm. The terminal lane, desktop CLI studies and the subject serve pipeline share it. It needs no
23
+ * npm. The terminal route, desktop CLI studies and the subject serve pipeline share it. It needs no
24
24
  * apt: every network call is one bounded curl, so a stalled mirror fails the step within minutes.
25
25
  */
26
26
  export const NODE_BOOTSTRAP_COMMAND = [
@@ -54,13 +54,13 @@ export const NODE_BOOTSTRAP_COMMAND = [
54
54
  "for executable in node npm npx; do",
55
55
  ` sudo -n ln -sfn "$node_target/bin/$executable" "/usr/local/bin/$executable"`,
56
56
  "done",
57
- // Keep global product executables on the existing ordinary/sudo PATH (#679). The new
57
+ // Keep global product executables on the existing ordinary/sudo `PATH` (#679). The new
58
58
  // versioned distribution is the only config we modify; no user/global npmrc or profile.
59
59
  `sudo -n "$node_target/bin/node" -e '${NODE_NPM_PREFIX_SCRIPT}' "$node_target/lib/node_modules/npm/npmrc"`,
60
60
  "hash -r",
61
61
  `node -e 'process.exit(Number(process.versions.node.split(".")[0]) >= 20 ? 0 : 1)' && npm --version >/dev/null`,
62
- // Product installation already uses sudo; detect a template whose sudo PATH cannot see Node
63
- // rather than changing global PATH or permissions to make it look supported.
62
+ // Product installation already uses sudo; detect a template whose sudo `PATH` cannot see Node
63
+ // rather than changing global `PATH` or permissions to make it look supported.
64
64
  `sudo -n node -e 'process.exit(Number(process.versions.node.split(".")[0]) >= 20 ? 0 : 1)' && sudo -n npm --version >/dev/null`,
65
65
  "fi",
66
66
  ].join("\n");
@@ -1,18 +1,18 @@
1
1
  // Provide the runtime a subject's serve pipeline needs, instead of failing at exit 127 (#371).
2
2
  //
3
- // The stock E2B `desktop` template ships python3 and curl but NO Node. That fact has now been
3
+ // The stock E2B `desktop` template ships python3 and curl but no Node. That fact has now been
4
4
  // rediscovered three times: the in-sandbox comms catch was rewritten from node to python3 in 0.29.0
5
- // for exactly this reason, the terminal lane bootstraps Node explicitly, and the computer-use
5
+ // for exactly this reason, the terminal route bootstraps Node explicitly, and the computer-use
6
6
  // clone/local-tree route did neither — so any lab whose `serve.install` runs npm or pnpm died with
7
- // `pnpm: command not found` AFTER a sandbox had been created and paid for.
7
+ // `pnpm: command not found` after a sandbox had been created and paid for.
8
8
  //
9
9
  // It failed invisibly up front: `lab inspect` was clean, the plan printed normally, the sandbox
10
10
  // provisioned, and the first signal was a shell exit code attributed to "subject install failed".
11
11
  // Nobody can debug that from the outside.
12
12
  //
13
- // The posture here is PROVIDE, not warn. An adopter writing a lab for a Node app should not have to
13
+ // The harness provides the runtime instead of warning about it. An adopter writing a lab for a Node app should not have to
14
14
  // know which binaries the template happens to carry — that is the harness's job, and the terminal
15
- // lane already treats it that way. Detection is conservative and the bootstrap is skipped whenever
15
+ // route already treats it that way. Detection is conservative and the bootstrap is skipped whenever
16
16
  // a runtime is already present, so a custom template that ships Node pays nothing.
17
17
  /** Package managers and runtimes whose absence on the stock template breaks a serve pipeline. */
18
18
  const NODE_COMMANDS = ["npm", "npx", "pnpm", "yarn", "bun", "node", "vite", "next", "tsx"];
@@ -114,7 +114,7 @@ export async function runSubjectServePipeline(shell, args) {
114
114
  await refresh();
115
115
  await startSubject(step);
116
116
  await waitForSubjectReady(step);
117
- // after-ready: fixture loading through the RUNNING app (loopback curl from in-sandbox:
117
+ // after-ready: fixture loading through the running app (loopback curl from in-sandbox:
118
118
  // steps are author-trusted provisioning, not actors, so no new URL policy surface). These
119
119
  // complete before the caller opens the browser and the session timer starts.
120
120
  await runState("after-ready");
@@ -24,14 +24,14 @@ export declare function isoNow(now: () => number): string;
24
24
  export declare function emitPhaseStarted(onPhase: ((event: SubjectPhaseEvent) => void) | undefined, now: () => number, phase: string, message: string): void;
25
25
  /** Emit the matching phase-completed event: always carries ok and durationMs (>= 0). */
26
26
  export declare function emitPhaseCompleted(onPhase: ((event: SubjectPhaseEvent) => void) | undefined, now: () => number, startedAt: number, phase: string, ok: boolean, message: string): void;
27
- /** Default phase-boundary sink (stderr): one line per event, prefixed with the lane id ONLY
28
- * when laneCount > 1. Single-lane emission is unconditional: total single-lane silence for the
27
+ /** Default phase-boundary sink (stderr): one line per event, prefixed with the participant id
28
+ * only when laneCount > 1. Single-participant emission is unconditional: total single-participant silence for the
29
29
  * whole clone/install/build/ready boot is the bug this event stream exists to close.
30
- * Overridable via CuaActorLabHooks.onPhase so deterministic tests capture instead of writing to
30
+ * Overridable via LabDeps.subjectPhaseSink so deterministic tests capture instead of writing to
31
31
  * the real stderr. */
32
32
  export declare function defaultSubjectPhaseSink(event: SubjectPhaseEvent, ctx: {
33
33
  laneId: string;
34
34
  laneCount: number;
35
35
  }): void;
36
- /** The shared-world subject's phase line: one shared plane, so no lane prefix. */
36
+ /** The shared-world subject's phase line: one shared plane, so no participant prefix. */
37
37
  export declare function defaultSharedWorldPhaseSink(event: SubjectPhaseEvent): void;
@@ -22,17 +22,17 @@ export function emitPhaseCompleted(onPhase, now, startedAt, phase, ok, message)
22
22
  message,
23
23
  });
24
24
  }
25
- /** Default phase-boundary sink (stderr): one line per event, prefixed with the lane id ONLY
26
- * when laneCount > 1. Single-lane emission is unconditional: total single-lane silence for the
25
+ /** Default phase-boundary sink (stderr): one line per event, prefixed with the participant id
26
+ * only when laneCount > 1. Single-participant emission is unconditional: total single-participant silence for the
27
27
  * whole clone/install/build/ready boot is the bug this event stream exists to close.
28
- * Overridable via CuaActorLabHooks.onPhase so deterministic tests capture instead of writing to
28
+ * Overridable via LabDeps.subjectPhaseSink so deterministic tests capture instead of writing to
29
29
  * the real stderr. */
30
30
  export function defaultSubjectPhaseSink(event, ctx) {
31
31
  const durationSuffix = event.durationMs === undefined ? "" : ` (${event.durationMs}ms)`;
32
- const prefix = ctx.laneCount > 1 ? `humanish cua [${ctx.laneId}]` : "humanish cua";
32
+ const prefix = ctx.laneCount > 1 ? `humanish computer-use [${ctx.laneId}]` : "humanish computer-use";
33
33
  process.stderr.write(`${prefix}: ${event.message}${durationSuffix}\n`);
34
34
  }
35
- /** The shared-world subject's phase line: one shared plane, so no lane prefix. */
35
+ /** The shared-world subject's phase line: one shared plane, so no participant prefix. */
36
36
  export function defaultSharedWorldPhaseSink(event) {
37
37
  const durationSuffix = event.durationMs === undefined ? "" : ` (${event.durationMs}ms)`;
38
38
  process.stderr.write(`humanish shared-world (concurrent): ${event.message}${durationSuffix}\n`);
@@ -10,6 +10,8 @@ export type DesktopReleaseResult = {
10
10
  status: "unconfirmed";
11
11
  reason: "release_unavailable" | "invalid_result" | "release_failed";
12
12
  error?: unknown;
13
+ /** Why release is unavailable, when it is not the missing kill method. */
14
+ detail?: string;
13
15
  };
14
16
  export interface DesktopSession {
15
17
  readonly resourceId: string;
@@ -5,7 +5,7 @@ export interface ChromeCdpProbeArgs {
5
5
  cdpPort?: number;
6
6
  /** The launched profile dir; the probe re-reads DevToolsActivePort at observe time. */
7
7
  profileDir?: string;
8
- /** The URL this lane opened; attributes the page when no target id is pinned yet. */
8
+ /** The URL this participant opened; attributes the page when no target id is pinned yet. */
9
9
  targetUrl: string;
10
10
  /** The pinned page target id from the launch-time geometry capture. */
11
11
  targetId?: string;
@@ -24,7 +24,7 @@ export interface ChromeCdpProbeArgs {
24
24
  * "state": url/title/text/scrollY. "geometry": outer window + CSS viewport. "port": resolution
25
25
  * only. "emulate": apply mobile emulation (#221) to the selected page and exit (the overrides that
26
26
  * are session-scoped, UA / touch / DPR, lapse when the socket closes). "hold": the same over a browser-level
27
- * socket, then stay attached until killed (how a lane keeps them for its whole life) and attach
27
+ * socket, then stay attached until killed (how a participant keeps them for its whole life) and attach
28
28
  * to every page target Chrome opens later, sending it the same overrides and a reload the moment
29
29
  * it exists, never pausing it (#623). "fidelity": read
30
30
  * back what the page reports about itself (UA, DPR, viewport, touch), the proof for the bundle.
@@ -15,7 +15,7 @@
15
15
  //
16
16
  // The script takes ONE JSON argument and prints ONE JSON line. Failures print
17
17
  // `{"unavailable": "<reason>"}` with exit 0 so the caller can say WHY the channel is dark instead
18
- // of swallowing an exit code; the TypeScript side turns that into a lane warning that names the
18
+ // of swallowing an exit code; the TypeScript side turns that into a participant warning that names the
19
19
  // consequence ("url/text criteria will read as NEVER MEASURED").
20
20
  import { shellQuote } from "../shell.js";
21
21
  /**
@@ -2,12 +2,12 @@ import type { LabDesktopBrowser } from "../../lab/types.js";
2
2
  import type { E2BDesktopSandbox } from "./sdk.js";
3
3
  import type { DesktopMediaEvidence } from "./desktop-media.js";
4
4
  export declare const DESKTOP_SETTLE_MS = 8000;
5
- /** The DevTools port every Chromium lane launches with; see `chrome_debug_flags` below. */
5
+ /** The DevTools port every Chromium participant launches with; see `chrome_debug_flags` below. */
6
6
  export declare const CHROME_DEVTOOLS_PORT = 9222;
7
7
  /**
8
8
  * The shell step that waits for DevTools after a Chromium launch. `pid` is a shell word (the
9
9
  * launch script passes "$launch_pid"). Without python3 it prints nothing, which reads as no
10
- * readiness evidence: the lane keeps its previous behavior.
10
+ * readiness evidence: the participant keeps its previous behavior.
11
11
  */
12
12
  export declare function chromeDevToolsReadinessCommand(args: {
13
13
  pid: string;
@@ -33,7 +33,7 @@ export interface DesktopBrowserEvidence {
33
33
  media?: DesktopMediaEvidence;
34
34
  }
35
35
  export type DesktopBrowserFamily = "chromium" | "firefox" | "unknown";
36
- /** Runtime-only identity for the exact browser process started by this lane. */
36
+ /** Runtime-only identity for the exact browser process started for this participant. */
37
37
  export interface DesktopBrowserLaunchIdentity {
38
38
  processId: string;
39
39
  profileDir: string;
@@ -9,11 +9,11 @@ import { e2bShell } from "./shell.js";
9
9
  // Settle after opening the browser or the terminal, before the first screenshot: long enough for
10
10
  // a cold browser and page load to paint (2 s captured a blank desktop; the render needs 6-9 s).
11
11
  export const DESKTOP_SETTLE_MS = 8_000;
12
- /** The DevTools port every Chromium lane launches with; see `chrome_debug_flags` below. */
12
+ /** The DevTools port every Chromium participant launches with; see `chrome_debug_flags` below. */
13
13
  export const CHROME_DEVTOOLS_PORT = 9222;
14
14
  /**
15
15
  * How long the launch command waits for Chrome's DevTools port to answer. Six live launches on the
16
- * stock desktop answered in 4.8-7.7 s; two device-emulated lanes failed when it had not answered
16
+ * stock desktop answered in 4.8-7.7 s; two device-emulated participants failed when it had not answered
17
17
  * about 11 s after launch, and a CI leg once waited 20 s for the port marker.
18
18
  */
19
19
  const CHROME_DEVTOOLS_READY_MS = 30_000;
@@ -85,7 +85,7 @@ while True:
85
85
  /**
86
86
  * The shell step that waits for DevTools after a Chromium launch. `pid` is a shell word (the
87
87
  * launch script passes "$launch_pid"). Without python3 it prints nothing, which reads as no
88
- * readiness evidence: the lane keeps its previous behavior.
88
+ * readiness evidence: the participant keeps its previous behavior.
89
89
  */
90
90
  export function chromeDevToolsReadinessCommand(args) {
91
91
  return [
@@ -113,7 +113,7 @@ export async function findVisibleBrowserWindowId(desktop, requestTimeoutMs, brow
113
113
  return undefined;
114
114
  // The candidate loop keeps the LAST identity match: with a launch identity the match is
115
115
  // unique anyway, and without one every family candidate matches, so the newest visible
116
- // window of the launched family wins (the window this lane just opened).
116
+ // window of the launched family wins (the window this participant just opened).
117
117
  const finder = browserFamily === "firefox"
118
118
  ? [
119
119
  "find_firefox_window() {",