humanish 0.108.0 → 0.109.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 (455) hide show
  1. package/ARCHITECTURE.md +58 -59
  2. package/CHANGELOG.md +13 -0
  3. package/CONTEXT.md +44 -44
  4. package/README.md +3 -3
  5. package/TELEMETRY.md +2 -2
  6. package/dist/actors/codex/app-server-trace.js +2 -1
  7. package/dist/actors/codex/restricted-participant.js +12 -12
  8. package/dist/actors/codex/restricted-session.d.ts +2 -2
  9. package/dist/actors/computer-use/actor.d.ts +6 -6
  10. package/dist/actors/computer-use/actor.js +2 -2
  11. package/dist/actors/computer-use/admission-limit.d.ts +2 -2
  12. package/dist/actors/computer-use/admission-limit.js +3 -3
  13. package/dist/actors/computer-use/executor-error.d.ts +2 -2
  14. package/dist/actors/computer-use/executor-error.js +3 -3
  15. package/dist/actors/computer-use/loop/actions.js +5 -5
  16. package/dist/actors/computer-use/loop/debrief.js +2 -2
  17. package/dist/actors/computer-use/loop/ending.d.ts +1 -1
  18. package/dist/actors/computer-use/loop/ending.js +12 -11
  19. package/dist/actors/computer-use/loop/observation.js +6 -5
  20. package/dist/actors/computer-use/loop/provider-call.js +11 -11
  21. package/dist/actors/computer-use/loop/session.d.ts +4 -4
  22. package/dist/actors/computer-use/loop/session.js +2 -2
  23. package/dist/actors/computer-use/loop/trace.js +3 -2
  24. package/dist/actors/computer-use/loop/types.d.ts +24 -24
  25. package/dist/actors/computer-use/loop/usage.d.ts +2 -2
  26. package/dist/actors/computer-use/loop.d.ts +6 -1
  27. package/dist/actors/computer-use/loop.js +26 -4
  28. package/dist/actors/computer-use/openai-provider.d.ts +2 -2
  29. package/dist/actors/computer-use/openai-provider.js +8 -8
  30. package/dist/actors/computer-use/provider-error.d.ts +4 -4
  31. package/dist/actors/computer-use/provider-error.js +6 -6
  32. package/dist/actors/contract.d.ts +4 -4
  33. package/dist/actors/contract.js +1 -1
  34. package/dist/actors/local-agent/claude-session.js +3 -3
  35. package/dist/actors/local-agent/cli.d.ts +1 -1
  36. package/dist/actors/local-agent/cli.js +1 -1
  37. package/dist/actors/reasoning-effort.js +3 -3
  38. package/dist/actors/registry.d.ts +2 -2
  39. package/dist/actors/registry.js +3 -3
  40. package/dist/actors/scripted-browser/actor.d.ts +2 -2
  41. package/dist/actors/scripted-browser/actor.js +1 -1
  42. package/dist/analysis/automatic-completion.d.ts +7 -7
  43. package/dist/analysis/automatic-completion.js +1 -1
  44. package/dist/analysis/automatic-config.d.ts +6 -6
  45. package/dist/analysis/automatic-config.js +1 -1
  46. package/dist/analysis/execute.d.ts +1 -1
  47. package/dist/analysis/execute.js +1 -1
  48. package/dist/analysis/types.d.ts +6 -0
  49. package/dist/browser-control/client.js +16 -16
  50. package/dist/browser-control/dispatcher.js +4 -4
  51. package/dist/browser-control/protocol.js +14 -14
  52. package/dist/browser-control/recording-transfer.js +4 -4
  53. package/dist/browser-control/transport.js +7 -7
  54. package/dist/cli/commands/analysis-signals.d.ts +2 -2
  55. package/dist/cli/commands/comms.js +14 -22
  56. package/dist/cli/commands/observe.d.ts +0 -1
  57. package/dist/cli/commands/observe.js +0 -15
  58. package/dist/cli/commands/run-command.d.ts +2 -2
  59. package/dist/cli/commands/run-command.js +3 -3
  60. package/dist/cli/commands/runs.js +3 -5
  61. package/dist/cli/commands/setup.js +5 -7
  62. package/dist/cli/commands/study-format.d.ts +9 -0
  63. package/dist/cli/commands/{lab-format.js → study-format.js} +5 -5
  64. package/dist/cli/commands/{lab-route-computer-use.d.ts → study-route-computer-use.d.ts} +6 -6
  65. package/dist/cli/commands/{lab-route-computer-use.js → study-route-computer-use.js} +12 -12
  66. package/dist/cli/commands/{lab-route-open.d.ts → study-route-open.d.ts} +4 -4
  67. package/dist/cli/commands/{lab-route-open.js → study-route-open.js} +2 -2
  68. package/dist/cli/commands/{lab-route-preview.d.ts → study-route-preview.d.ts} +7 -7
  69. package/dist/cli/commands/{lab-route-preview.js → study-route-preview.js} +3 -3
  70. package/dist/cli/commands/study-route-run.d.ts +19 -0
  71. package/dist/cli/commands/{lab-route-run.js → study-route-run.js} +6 -6
  72. package/dist/cli/commands/study-route-scripted.d.ts +17 -0
  73. package/dist/cli/commands/{lab-route-scripted.js → study-route-scripted.js} +4 -4
  74. package/dist/cli/commands/{lab-route-shared-world.d.ts → study-route-shared-world.d.ts} +5 -5
  75. package/dist/cli/commands/{lab-route-shared-world.js → study-route-shared-world.js} +7 -7
  76. package/dist/cli/commands/study-route-terminal.d.ts +17 -0
  77. package/dist/cli/commands/{lab-route-terminal.js → study-route-terminal.js} +4 -4
  78. package/dist/cli/commands/study-run.d.ts +9 -0
  79. package/dist/cli/commands/{lab-run.js → study-run.js} +34 -34
  80. package/dist/cli/commands/{lab-scorer.d.ts → study-scorer.d.ts} +5 -5
  81. package/dist/cli/commands/{lab-scorer.js → study-scorer.js} +1 -1
  82. package/dist/cli/commands/study.js +13 -49
  83. package/dist/cli/commands/tui.js +12 -12
  84. package/dist/cli/commands/watch.js +30 -65
  85. package/dist/cli/deprecations.d.ts +1 -13
  86. package/dist/cli/deprecations.js +0 -30
  87. package/dist/cli/doctor.d.ts +3 -3
  88. package/dist/cli/doctor.js +16 -16
  89. package/dist/cli/first-run-path.d.ts +4 -4
  90. package/dist/cli/first-run-path.js +7 -7
  91. package/dist/cli/io.d.ts +3 -3
  92. package/dist/cli/io.js +2 -2
  93. package/dist/cli/observer-follow.d.ts +2 -2
  94. package/dist/cli/observer-follow.js +2 -2
  95. package/dist/cli/orientation.d.ts +4 -4
  96. package/dist/cli/orientation.js +58 -20
  97. package/dist/cli/program.js +3 -4
  98. package/dist/cli/telemetry.d.ts +1 -1
  99. package/dist/cli/telemetry.js +14 -20
  100. package/dist/comms/catch-host.d.ts +1 -1
  101. package/dist/comms/catch-host.js +3 -3
  102. package/dist/comms/connections.d.ts +1 -1
  103. package/dist/comms/connections.js +2 -2
  104. package/dist/comms/external-evidence.d.ts +5 -5
  105. package/dist/comms/external-evidence.js +4 -3
  106. package/dist/comms/fake-inbox.d.ts +2 -2
  107. package/dist/comms/fake-inbox.js +2 -2
  108. package/dist/comms/receiving-runtime.d.ts +4 -4
  109. package/dist/comms/sandbox-catch.d.ts +2 -2
  110. package/dist/comms/sandbox-catch.js +2 -2
  111. package/dist/comms/setup.d.ts +2 -2
  112. package/dist/comms/setup.js +29 -32
  113. package/dist/feedback/draft.js +2 -2
  114. package/dist/feedback/export.js +3 -2
  115. package/dist/feedback/proof.d.ts +1 -1
  116. package/dist/feedback/proof.js +2 -2
  117. package/dist/guest/bootstrap.js +6 -6
  118. package/dist/guest/browser-tools.js +8 -8
  119. package/dist/guest/chromium-text.js +17 -17
  120. package/dist/guest/desktop-executor.d.ts +2 -2
  121. package/dist/guest/desktop-executor.js +20 -20
  122. package/dist/guest/desktop-keys.js +4 -4
  123. package/dist/guest/desktop-media.d.ts +2 -2
  124. package/dist/guest/desktop-media.js +16 -16
  125. package/dist/guest/desktop-native.js +10 -10
  126. package/dist/guest/runtime-desktop.js +2 -2
  127. package/dist/guest/runtime-processes.d.ts +2 -2
  128. package/dist/guest/runtime-processes.js +2 -2
  129. package/dist/guest/runtime.js +5 -5
  130. package/dist/index.d.ts +13 -15
  131. package/dist/index.js +6 -8
  132. package/dist/observer/artifact.d.ts +1 -1
  133. package/dist/observer/artifact.js +1 -1
  134. package/dist/observer/data.d.ts +1 -1
  135. package/dist/observer/library.d.ts +2 -0
  136. package/dist/observer/library.js +4 -1
  137. package/dist/observer/render.js +7 -1
  138. package/dist/observer/run-routes.d.ts +1 -0
  139. package/dist/observer/run-routes.js +37 -12
  140. package/dist/observer/serve.d.ts +1 -1
  141. package/dist/observer-app.html +1 -1
  142. package/dist/routes/computer-use/bundle-parts.js +3 -2
  143. package/dist/routes/computer-use/bundle.d.ts +2 -2
  144. package/dist/routes/computer-use/bundle.js +7 -6
  145. package/dist/routes/computer-use/e2b-desktop/comms.d.ts +5 -5
  146. package/dist/routes/computer-use/e2b-desktop/comms.js +5 -4
  147. package/dist/routes/computer-use/e2b-desktop/fidelity.d.ts +1 -1
  148. package/dist/routes/computer-use/e2b-desktop/prepare.d.ts +1 -1
  149. package/dist/routes/computer-use/e2b-desktop/prepare.js +3 -3
  150. package/dist/routes/computer-use/e2b-desktop/start.js +3 -4
  151. package/dist/routes/computer-use/e2b-desktop/state.d.ts +2 -2
  152. package/dist/routes/computer-use/e2b-desktop/teardown.js +2 -3
  153. package/dist/routes/computer-use/external-comms.d.ts +3 -3
  154. package/dist/routes/computer-use/fanout-bundle.js +11 -10
  155. package/dist/routes/computer-use/fanout-records.js +2 -2
  156. package/dist/routes/computer-use/live-flush.d.ts +3 -3
  157. package/dist/routes/computer-use/live-phase.d.ts +2 -3
  158. package/dist/routes/computer-use/live-phase.js +3 -3
  159. package/dist/routes/computer-use/local-tree-pack.d.ts +5 -5
  160. package/dist/routes/computer-use/local-tree-pack.js +1 -1
  161. package/dist/routes/computer-use/local-vm.d.ts +8 -8
  162. package/dist/routes/computer-use/local-vm.js +2 -2
  163. package/dist/routes/computer-use/participant-desktop.d.ts +3 -3
  164. package/dist/routes/computer-use/participant-desktop.js +1 -1
  165. package/dist/routes/computer-use/participant-execution.js +1 -1
  166. package/dist/routes/computer-use/participant-model.js +3 -3
  167. package/dist/routes/computer-use/participant-prompt.d.ts +5 -5
  168. package/dist/routes/computer-use/participant-prompt.js +3 -3
  169. package/dist/routes/computer-use/participant-runs.d.ts +10 -10
  170. package/dist/routes/computer-use/participant-runs.js +14 -13
  171. package/dist/routes/computer-use/plan.d.ts +12 -12
  172. package/dist/routes/computer-use/plan.js +24 -24
  173. package/dist/routes/computer-use/preflight.d.ts +5 -5
  174. package/dist/routes/computer-use/preflight.js +5 -5
  175. package/dist/routes/computer-use/rerun-selection.d.ts +1 -1
  176. package/dist/routes/computer-use/rerun-selection.js +3 -2
  177. package/dist/routes/computer-use/result.d.ts +4 -4
  178. package/dist/routes/computer-use/result.js +13 -12
  179. package/dist/routes/computer-use/route.d.ts +12 -12
  180. package/dist/routes/computer-use/route.js +19 -19
  181. package/dist/routes/computer-use/self-report.js +1 -1
  182. package/dist/routes/computer-use/setup.d.ts +22 -22
  183. package/dist/routes/computer-use/setup.js +15 -15
  184. package/dist/routes/computer-use/single-bundle.d.ts +4 -4
  185. package/dist/routes/computer-use/single-bundle.js +14 -13
  186. package/dist/routes/computer-use/subject-projection.d.ts +3 -3
  187. package/dist/routes/computer-use/types.d.ts +34 -34
  188. package/dist/routes/computer-use/types.js +3 -3
  189. package/dist/routes/preview.d.ts +6 -6
  190. package/dist/routes/preview.js +5 -5
  191. package/dist/routes/scripted/bundle.d.ts +6 -6
  192. package/dist/routes/scripted/bundle.js +10 -9
  193. package/dist/routes/scripted/plan.d.ts +7 -7
  194. package/dist/routes/scripted/plan.js +6 -6
  195. package/dist/routes/scripted/result.d.ts +3 -3
  196. package/dist/routes/scripted/result.js +9 -9
  197. package/dist/routes/scripted/route.d.ts +9 -9
  198. package/dist/routes/scripted/route.js +11 -11
  199. package/dist/routes/scripted/scenario.d.ts +1 -1
  200. package/dist/routes/scripted/scenario.js +3 -3
  201. package/dist/routes/scripted/setup.d.ts +6 -6
  202. package/dist/routes/scripted/setup.js +4 -4
  203. package/dist/routes/scripted/subject.d.ts +5 -5
  204. package/dist/routes/scripted/subject.js +3 -3
  205. package/dist/routes/scripted/surface-records.d.ts +1 -1
  206. package/dist/routes/scripted/surface-records.js +2 -2
  207. package/dist/routes/scripted/surface-sessions.d.ts +3 -3
  208. package/dist/routes/scripted/types.d.ts +17 -17
  209. package/dist/routes/scripted/types.js +1 -1
  210. package/dist/routes/shared-world/bundle-records.js +3 -3
  211. package/dist/routes/shared-world/bundle.js +15 -14
  212. package/dist/routes/shared-world/checkpoints.d.ts +3 -3
  213. package/dist/routes/shared-world/checkpoints.js +1 -1
  214. package/dist/routes/shared-world/comms.d.ts +9 -9
  215. package/dist/routes/shared-world/comms.js +6 -5
  216. package/dist/routes/shared-world/participant-specs.d.ts +3 -3
  217. package/dist/routes/shared-world/participant-specs.js +7 -7
  218. package/dist/routes/shared-world/plan.d.ts +9 -9
  219. package/dist/routes/shared-world/plan.js +9 -9
  220. package/dist/routes/shared-world/provisioned.d.ts +8 -8
  221. package/dist/routes/shared-world/provisioned.js +4 -4
  222. package/dist/routes/shared-world/result.d.ts +6 -6
  223. package/dist/routes/shared-world/result.js +11 -10
  224. package/dist/routes/shared-world/route.d.ts +11 -11
  225. package/dist/routes/shared-world/route.js +19 -19
  226. package/dist/routes/shared-world/setup.d.ts +13 -13
  227. package/dist/routes/shared-world/setup.js +19 -19
  228. package/dist/routes/shared-world/types.d.ts +27 -27
  229. package/dist/routes/terminal/adapter.d.ts +2 -2
  230. package/dist/routes/terminal/adapter.js +4 -4
  231. package/dist/routes/terminal/bundle.d.ts +11 -11
  232. package/dist/routes/terminal/bundle.js +12 -12
  233. package/dist/routes/terminal/credentials.d.ts +4 -4
  234. package/dist/routes/terminal/credentials.js +5 -5
  235. package/dist/routes/terminal/dry-run.d.ts +4 -4
  236. package/dist/routes/terminal/dry-run.js +9 -9
  237. package/dist/routes/terminal/ledger.d.ts +2 -2
  238. package/dist/routes/terminal/lifetime.d.ts +1 -1
  239. package/dist/routes/terminal/lifetime.js +1 -1
  240. package/dist/routes/terminal/live-finish.d.ts +2 -2
  241. package/dist/routes/terminal/live-finish.js +7 -7
  242. package/dist/routes/terminal/live-sandbox.d.ts +2 -2
  243. package/dist/routes/terminal/live-sandbox.js +3 -2
  244. package/dist/routes/terminal/participant-text.js +2 -1
  245. package/dist/routes/terminal/persona.d.ts +2 -2
  246. package/dist/routes/terminal/persona.js +2 -2
  247. package/dist/routes/terminal/plan.d.ts +7 -7
  248. package/dist/routes/terminal/plan.js +5 -5
  249. package/dist/routes/terminal/result.d.ts +5 -5
  250. package/dist/routes/terminal/result.js +7 -7
  251. package/dist/routes/terminal/route.d.ts +9 -9
  252. package/dist/routes/terminal/route.js +14 -14
  253. package/dist/routes/terminal/session.d.ts +5 -5
  254. package/dist/routes/terminal/session.js +7 -7
  255. package/dist/routes/terminal/trace.d.ts +2 -2
  256. package/dist/routes/terminal/types.d.ts +24 -24
  257. package/dist/routes/terminal/types.js +2 -2
  258. package/dist/run/bundle.d.ts +7 -7
  259. package/dist/run/bundle.js +2 -2
  260. package/dist/run/costs.d.ts +23 -0
  261. package/dist/run/costs.js +72 -43
  262. package/dist/run/dry-run-inputs.d.ts +1 -1
  263. package/dist/run/dry-run-inputs.js +1 -1
  264. package/dist/run/dry-run.js +2 -2
  265. package/dist/run/outcomes.d.ts +1 -1
  266. package/dist/run/participant.d.ts +1 -1
  267. package/dist/run/preflight-receipts.js +1 -1
  268. package/dist/run/pricing.js +2 -2
  269. package/dist/run/projection.d.ts +32 -32
  270. package/dist/run/projection.js +44 -44
  271. package/dist/run/reclaim.d.ts +1 -1
  272. package/dist/run/reclaim.js +1 -1
  273. package/dist/run/results.d.ts +2 -2
  274. package/dist/run/run-cost.d.ts +53 -0
  275. package/dist/run/run-cost.js +105 -0
  276. package/dist/run/run-index-analysis.d.ts +15 -0
  277. package/dist/run/run-index-analysis.js +77 -0
  278. package/dist/run/run-index.d.ts +11 -1
  279. package/dist/run/run-index.js +63 -49
  280. package/dist/run/run.d.ts +3 -3
  281. package/dist/run/run.js +2 -2
  282. package/dist/run/shared-world-evidence.d.ts +1 -1
  283. package/dist/run/shared-world-shape.js +1 -1
  284. package/dist/run/stats.d.ts +3 -3
  285. package/dist/run/stats.js +14 -14
  286. package/dist/run/status.d.ts +10 -2
  287. package/dist/run/status.js +6 -3
  288. package/dist/run/streams.d.ts +2 -2
  289. package/dist/run/study-provenance.d.ts +4 -2
  290. package/dist/run/study-provenance.js +7 -4
  291. package/dist/run/study-result.d.ts +0 -5
  292. package/dist/run/study-result.js +1 -1
  293. package/dist/run-study.d.ts +112 -0
  294. package/dist/{run-lab.js → run-study.js} +52 -45
  295. package/dist/{lab → study}/adapter-extension.d.ts +8 -20
  296. package/dist/{lab → study}/adapter-extension.js +2 -14
  297. package/dist/{lab → study}/adapter-scorer-loader.d.ts +10 -10
  298. package/dist/{lab → study}/adapter-scorer-loader.js +3 -3
  299. package/dist/study/composition-rules.d.ts +7 -0
  300. package/dist/{lab → study}/composition-rules.js +12 -12
  301. package/dist/study/config.d.ts +15 -0
  302. package/dist/{lab → study}/config.js +37 -20
  303. package/dist/study/convert.d.ts +1 -1
  304. package/dist/study/convert.js +15 -15
  305. package/dist/{lab → study}/device-presets.d.ts +2 -2
  306. package/dist/{lab → study}/discover.d.ts +29 -23
  307. package/dist/{lab → study}/discover.js +97 -118
  308. package/dist/{lab → study}/doctor.d.ts +11 -11
  309. package/dist/{lab → study}/doctor.js +18 -18
  310. package/dist/study/files.d.ts +2 -2
  311. package/dist/study/files.js +6 -5
  312. package/dist/{lab → study}/init-templates.d.ts +2 -2
  313. package/dist/{lab → study}/init-templates.js +16 -11
  314. package/dist/{lab → study}/init.d.ts +1 -1
  315. package/dist/{lab → study}/init.js +7 -4
  316. package/dist/{lab → study}/keys.d.ts +2 -2
  317. package/dist/{lab → study}/keys.js +10 -10
  318. package/dist/study/migrate.d.ts +1 -1
  319. package/dist/{lab → study}/parse/actors.d.ts +5 -5
  320. package/dist/{lab → study}/parse/actors.js +5 -5
  321. package/dist/study/parse/comms.d.ts +12 -0
  322. package/dist/study/parse/execution.d.ts +19 -0
  323. package/dist/{lab → study}/parse/study-v3.d.ts +3 -5
  324. package/dist/{lab → study}/parse/study-v3.js +3 -3
  325. package/dist/{lab → study}/parse/subject-state.d.ts +8 -8
  326. package/dist/{lab → study}/parse/subject-state.js +4 -4
  327. package/dist/{lab → study}/parse/subject.d.ts +3 -3
  328. package/dist/{lab → study}/parse/subject.js +8 -8
  329. package/dist/{lab → study}/parse/values.d.ts +2 -2
  330. package/dist/{lab → study}/persona-resolve.d.ts +4 -4
  331. package/dist/{lab → study}/persona-resolve.js +2 -2
  332. package/dist/{lab → study}/plan-base.d.ts +7 -7
  333. package/dist/{lab → study}/plan-base.js +1 -1
  334. package/dist/{lab → study}/plan-participants.d.ts +10 -10
  335. package/dist/{lab → study}/plan-participants.js +4 -4
  336. package/dist/{lab → study}/plan-types.d.ts +28 -28
  337. package/dist/{lab → study}/plan-types.js +2 -2
  338. package/dist/study/plan.d.ts +13 -0
  339. package/dist/{lab → study}/plan.js +20 -20
  340. package/dist/study/preflight-probes.d.ts +3 -0
  341. package/dist/{lab → study}/preflight-probes.js +9 -8
  342. package/dist/study/preflight-result.d.ts +8 -0
  343. package/dist/{lab → study}/preflight-result.js +3 -3
  344. package/dist/{lab → study}/preflight.d.ts +31 -31
  345. package/dist/{lab → study}/preflight.js +8 -8
  346. package/dist/{lab → study}/requirements.d.ts +3 -3
  347. package/dist/{lab → study}/requirements.js +1 -1
  348. package/dist/study/route-inputs.d.ts +28 -0
  349. package/dist/{lab → study}/route-inputs.js +1 -1
  350. package/dist/{lab → study}/routing.d.ts +12 -12
  351. package/dist/{lab/run-lab-events.d.ts → study/run-study-events.d.ts} +10 -10
  352. package/dist/{lab/run-lab-events.js → study/run-study-events.js} +3 -3
  353. package/dist/{lab/run-lab-homes.d.ts → study/run-study-homes.d.ts} +8 -17
  354. package/dist/study/run-study-homes.js +3 -0
  355. package/dist/study/run-study-options.d.ts +28 -0
  356. package/dist/{lab/run-lab-options.js → study/run-study-options.js} +13 -12
  357. package/dist/{lab/lab-deps.d.ts → study/study-deps.d.ts} +2 -2
  358. package/dist/{lab/lab-deps.js → study/study-deps.js} +2 -2
  359. package/dist/{lab → study}/summary.d.ts +10 -10
  360. package/dist/{lab → study}/summary.js +15 -15
  361. package/dist/{lab → study}/tasks.d.ts +3 -3
  362. package/dist/{lab → study}/tasks.js +1 -1
  363. package/dist/{lab → study}/types.d.ts +104 -104
  364. package/dist/{lab → study}/types.js +1 -1
  365. package/dist/{lab → study}/validation.d.ts +19 -19
  366. package/dist/{lab → study}/validation.js +13 -13
  367. package/dist/{lab → study}/warnings.d.ts +4 -4
  368. package/dist/{lab → study}/warnings.js +1 -1
  369. package/dist/subject/clone.d.ts +6 -6
  370. package/dist/subject/clone.js +2 -2
  371. package/dist/subject/local-tree-archive.d.ts +2 -2
  372. package/dist/subject/local-tree-archive.js +3 -3
  373. package/dist/subject/local-tree.d.ts +3 -3
  374. package/dist/subject/runtime.js +2 -2
  375. package/dist/subject/serve.d.ts +4 -4
  376. package/dist/subject/state.d.ts +3 -3
  377. package/dist/subject/state.js +1 -1
  378. package/dist/subject/steps.d.ts +1 -1
  379. package/dist/subject/steps.js +1 -1
  380. package/dist/substrates/desktop-session.js +2 -2
  381. package/dist/substrates/detached.d.ts +1 -1
  382. package/dist/substrates/e2b/desktop-browser.d.ts +4 -4
  383. package/dist/substrates/e2b/desktop-browser.js +1 -1
  384. package/dist/substrates/e2b/desktop-cdp.d.ts +1 -1
  385. package/dist/substrates/e2b/desktop-cdp.js +1 -1
  386. package/dist/substrates/e2b/desktop-executor.d.ts +1 -1
  387. package/dist/substrates/e2b/desktop-executor.js +12 -12
  388. package/dist/substrates/e2b/desktop-geometry.d.ts +1 -1
  389. package/dist/substrates/e2b/desktop-geometry.js +1 -1
  390. package/dist/substrates/e2b/desktop-media.d.ts +3 -3
  391. package/dist/substrates/e2b/lifetime.js +1 -1
  392. package/dist/substrates/e2b/sandbox.d.ts +3 -3
  393. package/dist/substrates/e2b/sandbox.js +1 -1
  394. package/dist/substrates/e2b/sdk.d.ts +1 -1
  395. package/dist/substrates/e2b/sdk.js +1 -1
  396. package/dist/substrates/local/runtime-config.d.ts +4 -4
  397. package/dist/substrates/local/runtime-config.js +4 -4
  398. package/dist/tui/contract.d.ts +8 -8
  399. package/dist/tui/contract.js +2 -2
  400. package/dist/tui/launch.d.ts +3 -3
  401. package/dist/tui/launch.js +22 -16
  402. package/dist/tui-app.js +139 -139
  403. package/dist/verify/subject.d.ts +1 -1
  404. package/dist/verify/subject.js +1 -1
  405. package/dist/verify/verify.js +2 -1
  406. package/docs/architecture/actor-contract.md +5 -5
  407. package/docs/architecture/browser-control.md +1 -1
  408. package/docs/architecture/external-public-shared-world.md +8 -7
  409. package/docs/architecture/github-feedback-loop.md +1 -1
  410. package/docs/architecture/task-protocol-support.md +1 -1
  411. package/docs/architecture/terminal-product-route.md +18 -18
  412. package/docs/contracts/adapter-fixtures.md +2 -2
  413. package/docs/contracts/errors.md +8 -8
  414. package/docs/contracts/run-bundle.md +1 -4
  415. package/docs/contracts/schemas.md +61 -42
  416. package/docs/contracts/study-analysis.md +4 -1
  417. package/docs/contracts/study-costs.md +17 -2
  418. package/examples/README.md +1 -1
  419. package/examples/scorer/scorer.mjs +3 -3
  420. package/package.json +1 -1
  421. package/skills/humanish/SKILL.md +8 -6
  422. package/skills/humanish/agents/openai.yaml +1 -1
  423. package/dist/cli/commands/lab-format.d.ts +0 -9
  424. package/dist/cli/commands/lab-route-run.d.ts +0 -19
  425. package/dist/cli/commands/lab-route-scripted.d.ts +0 -17
  426. package/dist/cli/commands/lab-route-terminal.d.ts +0 -17
  427. package/dist/cli/commands/lab-run.d.ts +0 -9
  428. package/dist/lab/composition-rules.d.ts +0 -7
  429. package/dist/lab/config.d.ts +0 -7
  430. package/dist/lab/deprecated-fields.d.ts +0 -10
  431. package/dist/lab/deprecated-fields.js +0 -24
  432. package/dist/lab/parse/comms.d.ts +0 -12
  433. package/dist/lab/parse/execution.d.ts +0 -19
  434. package/dist/lab/plan.d.ts +0 -13
  435. package/dist/lab/preflight-probes.d.ts +0 -3
  436. package/dist/lab/preflight-result.d.ts +0 -8
  437. package/dist/lab/route-inputs.d.ts +0 -28
  438. package/dist/lab/run-lab-homes.js +0 -7
  439. package/dist/lab/run-lab-options.d.ts +0 -28
  440. package/dist/library-aliases.d.ts +0 -56
  441. package/dist/library-aliases.js +0 -22
  442. package/dist/run-lab.d.ts +0 -112
  443. /package/dist/{lab → study}/device-presets.js +0 -0
  444. /package/dist/{lab → study}/init-paths.d.ts +0 -0
  445. /package/dist/{lab → study}/init-paths.js +0 -0
  446. /package/dist/{lab → study}/init-plan.d.ts +0 -0
  447. /package/dist/{lab → study}/init-plan.js +0 -0
  448. /package/dist/{lab → study}/parse/comms.js +0 -0
  449. /package/dist/{lab → study}/parse/execution.js +0 -0
  450. /package/dist/{lab → study}/parse/values.js +0 -0
  451. /package/dist/{lab → study}/participant-assignment.d.ts +0 -0
  452. /package/dist/{lab → study}/participant-assignment.js +0 -0
  453. /package/dist/{lab → study}/persona.d.ts +0 -0
  454. /package/dist/{lab → study}/persona.js +0 -0
  455. /package/dist/{lab → study}/routing.js +0 -0
@@ -1,8 +1,8 @@
1
- import { type LabAnalysis } from "../analysis/automatic-config.js";
2
- import type { LabTask } from "./tasks.js";
1
+ import { type StudyAnalysis } from "../analysis/automatic-config.js";
2
+ import type { StudyTask } from "./tasks.js";
3
3
  import type { DwellWindow, StopWhen } from "../actors/stop-conditions.js";
4
4
  import { type ReasoningEffort } from "../actors/reasoning-effort.js";
5
- export declare const LAB_CONFIG_SCHEMA = "humanish.lab.v2";
5
+ export declare const V2_SCHEMA = "humanish.lab.v2";
6
6
  /** The study format: it declares its route, one actor, its participants and one caps block. */
7
7
  export declare const STUDY_SCHEMA = "humanish.study.v3";
8
8
  export declare const ID_PATTERN: RegExp;
@@ -12,11 +12,11 @@ export declare const ID_PATTERN: RegExp;
12
12
  * CuaExecutor with no clone and no E2B desktop (`local-app`), or the operator's own local
13
13
  * working tree packed and provisioned in-sandbox in place of a clone (`local-tree`).
14
14
  * `local-app` routes to the computer-use route and is library-assisted: a caller supplies
15
- * `RunLabOptions.inProcess` + `createProvider` (no built-in driver exists yet), and the engine
15
+ * `RunStudyOptions.inProcess` + `createProvider` (no built-in driver exists yet), and the engine
16
16
  * fails closed (HUMANISH_COMPUTER_USE_LOCAL_APP_NO_EXECUTOR) when run without them: a structured
17
17
  * error, never a desktop attempt. See docs/architecture/state-driven-executor.md.
18
18
  */
19
- type LabSubjectSource = "this-repo" | "clone" | "app-url" | "local-app" | "terminal-product" | "desktop-cli" | "local-tree";
19
+ type StudySubjectSource = "this-repo" | "clone" | "app-url" | "local-app" | "terminal-product" | "desktop-cli" | "local-tree";
20
20
  /**
21
21
  * How a subject's world relates across participants. `per-lane-worlds` (the default; absent ==
22
22
  * this) is the only fan-out topology the computer-use route ships: N participants, N independent
@@ -26,8 +26,8 @@ type LabSubjectSource = "this-repo" | "clone" | "app-url" | "local-app" | "termi
26
26
  * external-public app-url plane) with a computer-use actor; inert/warned everywhere else
27
27
  * (claims match mechanism).
28
28
  */
29
- type LabSubjectTopology = "per-lane-worlds" | "shared-world";
30
- export interface LabSubjectClone {
29
+ type StudySubjectTopology = "per-lane-worlds" | "shared-world";
30
+ export interface StudySubjectClone {
31
31
  /** git clone depth; 1 (shallow) by default. Consumed on the computer-use clone route. */
32
32
  depth?: number;
33
33
  /** how many participants to fan out, each with its own clone (one sandbox/desktop each). */
@@ -37,9 +37,9 @@ export interface LabSubjectClone {
37
37
  }
38
38
  /**
39
39
  * `local-tree`: how the operator's own working tree is packed and provisioned in-sandbox in
40
- * place of a clone. Internal shape (not re-exported from src/index.ts, same as LabSubjectClone).
40
+ * place of a clone. Internal shape (not re-exported from src/index.ts, same as StudySubjectClone).
41
41
  */
42
- export interface LabSubjectLocalTree {
42
+ export interface StudySubjectLocalTree {
43
43
  /** extra archive excludes (path prefixes/basenames) added on top of the always-on denylist. */
44
44
  exclude?: string[];
45
45
  /** keep the disposable sandbox on failure for debugging (mirrors subject.clone.keep). */
@@ -48,14 +48,14 @@ export interface LabSubjectLocalTree {
48
48
  maxArchiveBytes?: number;
49
49
  }
50
50
  /** How a cloned subject is installed/built/started inside the sandbox (computer-use route). */
51
- export interface LabSubjectServe {
51
+ export interface StudySubjectServe {
52
52
  /** Optional bounded install step (e.g. "pnpm install --frozen-lockfile"). */
53
53
  install?: string;
54
54
  /** Optional bounded build step. */
55
55
  build?: string;
56
56
  /** Required long-lived start command, launched detached; the sandbox lifecycle owns it. */
57
57
  start: string;
58
- /** Loopback entry URL: the readiness-probe target and the URL the actor drives. The lab
58
+ /** Loopback entry URL: the readiness-probe target and the URL the actor drives. humanish
59
59
  * serves the clone inside the sandbox, so this is always loopback (not subject to
60
60
  * allowPublicTargets, which governs app-url subjects, i.e. external deployments). */
61
61
  url: string;
@@ -67,8 +67,8 @@ export interface LabSubjectServe {
67
67
  buildTimeoutMs?: number;
68
68
  }
69
69
  /** When a state step runs, relative to the serve sequence (clone subjects, computer-use route). */
70
- export type LabStateStepWhen = "before-build" | "before-start" | "after-ready";
71
- interface LabSubjectStateStep {
70
+ export type StudyStateStepWhen = "before-build" | "before-start" | "after-ready";
71
+ interface StudySubjectStateStep {
72
72
  /**
73
73
  * [a-z0-9-] step label (must start alphanumeric), <=40 chars, unique across steps; becomes
74
74
  * the detached-step name `subject-state-<name>` (interpolates into in-sandbox file paths, so
@@ -88,7 +88,7 @@ interface LabSubjectStateStep {
88
88
  * an in-sandbox `service postgresql start`), after-ready (after the readiness probe:
89
89
  * fixtures loaded through the running app's API). Default: before-start.
90
90
  */
91
- when?: LabStateStepWhen;
91
+ when?: StudyStateStepWhen;
92
92
  /** Wall-clock budget per step. Default 300000. */
93
93
  timeoutMs?: number;
94
94
  }
@@ -99,7 +99,7 @@ interface LabSubjectStateStep {
99
99
  * (only sha256-16(scrub+redact(stdout)) ever lands, never the raw value), same lockdown as the
100
100
  * seed surface. Consumed only on the shared-world route; inert/warned elsewhere.
101
101
  */
102
- export interface LabSubjectStateCheckpoint {
102
+ export interface StudySubjectStateCheckpoint {
103
103
  /**
104
104
  * [a-z0-9-] probe label (must start alphanumeric), <=40 chars, unique across checkpoints;
105
105
  * names the detached step (`checkpoint-<snapshot>-<name>`), a shape validated at
@@ -120,11 +120,11 @@ export interface LabSubjectStateCheckpoint {
120
120
  redact?: string[];
121
121
  }
122
122
  /** The subject's state story (clone subjects): seeded in-sandbox, or declared external. */
123
- export interface LabSubjectState {
123
+ export interface StudySubjectState {
124
124
  /** Ordered seed/migration/fixture steps. Order within a phase is declaration order. */
125
- seed?: LabSubjectStateStep[];
125
+ seed?: StudySubjectStateStep[];
126
126
  /**
127
- * Env var names whose values point at state the lab does not control (e.g. a shared dev
127
+ * Env var names whose values point at state the study does not control (e.g. a shared dev
128
128
  * DB). Must be a subset of subject.env (so the declaration is mechanically backed by a
129
129
  * provisioned name, not a vibe). Flips state provenance to "unpinned".
130
130
  */
@@ -134,7 +134,7 @@ export interface LabSubjectState {
134
134
  * role's turn to produce the harness-clocked interaction timeline. Consumed only on the
135
135
  * shared-world route; inert/warned elsewhere. Shape-validated everywhere.
136
136
  */
137
- checkpoint?: LabSubjectStateCheckpoint[];
137
+ checkpoint?: StudySubjectStateCheckpoint[];
138
138
  }
139
139
  /**
140
140
  * `terminal-product`: the product-under-study a terminal agent must discover and use from public
@@ -142,8 +142,8 @@ export interface LabSubjectState {
142
142
  * the agent drives the declared public surfaces, so provenance is declared unpinned. The
143
143
  * concrete product name + surfaces are operator data; committed fixtures use a neutral mock name.
144
144
  */
145
- export interface LabSubjectProduct {
146
- /** Public-safe product label (shape-validated like a lab id; interpolates into evidence). */
145
+ export interface StudySubjectProduct {
146
+ /** Public-safe product label (shape-validated like a study id; interpolates into evidence). */
147
147
  name: string;
148
148
  /**
149
149
  * How the product gets onto the machine, run with no keys before the participant starts, in the
@@ -153,7 +153,7 @@ export interface LabSubjectProduct {
153
153
  * Absent means the participant installs it themselves from the public surfaces, which is a
154
154
  * different study, one about the install. Present means the study starts
155
155
  * where you want it to start: asking a participant what studies a project contains, in an empty
156
- * directory, measures the lab rather than the product.
156
+ * directory, measures the study rather than the product.
157
157
  * Both routes prepare Node/npm when install is absent; product installation remains the
158
158
  * participant's task. A missing template runtime must not become a product finding.
159
159
  */
@@ -164,7 +164,7 @@ export interface LabSubjectProduct {
164
164
  *
165
165
  * This exists because the first live study failed on it: the participant was asked what studies
166
166
  * the project contained, landed in an empty home directory, correctly reported that there was no
167
- * project, and stopped. The finding was about the lab, not the product. A study of a
167
+ * project, and stopped. The finding was about the study, not the product. A study of a
168
168
  * project-scoped tool has to put the participant inside a project, the same way an app study opens
169
169
  * the app rather than a blank tab.
170
170
  */
@@ -186,8 +186,8 @@ export interface LabSubjectProduct {
186
186
  */
187
187
  upload?: string;
188
188
  }
189
- export interface LabSubject {
190
- source: LabSubjectSource;
189
+ export interface StudySubject {
190
+ source: StudySubjectSource;
191
191
  /**
192
192
  * World topology across participants. Absent == `per-lane-worlds` (the isolation default; every
193
193
  * existing study is byte-stable). `shared-world` is the declared override: one mutable service
@@ -195,7 +195,7 @@ export interface LabSubject {
195
195
  * provisioned clone or an external-public app-url plane, a computer-use actor, and a roster of ≥2
196
196
  * participants); inert/warned elsewhere.
197
197
  */
198
- topology?: LabSubjectTopology;
198
+ topology?: StudySubjectTopology;
199
199
  /**
200
200
  * Concurrent shared-world route only: the author's required attestation that the
201
201
  * subject behind the internet-reachable `getHost` URL is synthetic seeded data. The concurrent
@@ -223,12 +223,12 @@ export interface LabSubject {
223
223
  };
224
224
  /** `clone`: one or more owner/repo slugs (public or authorized-private). */
225
225
  repos?: string[];
226
- clone?: LabSubjectClone;
226
+ clone?: StudySubjectClone;
227
227
  /**
228
228
  * `app-url`: a loopback http(s) URL the computer-use actor drives (127.0.0.1/localhost
229
229
  * only; driving arbitrary public sites is not allowed). The URL must be reachable from
230
230
  * inside the desktop sandbox; library callers provision it via the prepareDesktop hook.
231
- * For a config-only path use `clone` + `serve`: the lab serves the app itself.
231
+ * For a config-only path use `clone` + `serve`: humanish serves the app itself.
232
232
  *
233
233
  * `local-app`: the loopback http(s) URL of an already-running local dev server the caller's
234
234
  * custom CuaExecutor drives in-process (no sandbox, no public-target option, always
@@ -236,7 +236,7 @@ export interface LabSubject {
236
236
  */
237
237
  appUrl?: string;
238
238
  /** `clone` (computer-use route): how the cloned app is served in-sandbox. */
239
- serve?: LabSubjectServe;
239
+ serve?: StudySubjectServe;
240
240
  /**
241
241
  * Env var names the subject app needs, provisioned into the sandbox from the caller's
242
242
  * environment (--env-file). Names are recorded in evidence; values never are. Consumed
@@ -244,10 +244,10 @@ export interface LabSubject {
244
244
  */
245
245
  env?: string[];
246
246
  /**
247
- * Literal, non-secret env values committed alongside the lab: the configuration every real app
247
+ * Literal, non-secret env values committed alongside the study: the configuration every real app
248
248
  * needs before it will boot: a public base URL, a transport selector, a feature flag. None of that
249
249
  * is secret, and routing it through `subject.env` would force an adopter to carry a private env
250
- * file just to reproduce a public study, which is the opposite of a reproducible lab.
250
+ * file just to reproduce a public study, which is the opposite of a reproducible study.
251
251
  *
252
252
  * These values are recorded in evidence, because they are part of how the subject was configured,
253
253
  * so a value that looks like a secret or a local path is refused at parse rather than committed to
@@ -260,22 +260,22 @@ export interface LabSubject {
260
260
  * in the run bundle as structured provenance: seeded with command digests,
261
261
  * unpinned for external state, declared-not-run for dry-run/failed provisioning.
262
262
  */
263
- state?: LabSubjectState;
263
+ state?: StudySubjectState;
264
264
  /**
265
265
  * `terminal-product` (terminal route): the product the terminal agent discovers + uses from
266
266
  * public surfaces only. Consumed on the terminal route; rejected on every other source.
267
267
  */
268
- product?: LabSubjectProduct;
268
+ product?: StudySubjectProduct;
269
269
  /**
270
- * `local-tree` (computer-use route): local-tree packs the lab resolution cwd (the project
270
+ * `local-tree` (computer-use route): local-tree packs the study's working directory (the project
271
271
  * directory humanish runs from) instead of cloning a repo. `exclude` adds extra archive excludes
272
272
  * on top of the always-on denylist; `keep` preserves the sandbox on failure for debugging;
273
273
  * `maxArchiveBytes` caps the upload. Consumed on the local-tree route; rejected on every other
274
274
  * source.
275
275
  */
276
- localTree?: LabSubjectLocalTree;
276
+ localTree?: StudySubjectLocalTree;
277
277
  }
278
- export interface LabParticipantFocus {
278
+ export interface StudyParticipantFocus {
279
279
  id?: string;
280
280
  label?: string;
281
281
  /** Per-participant steer appended to the actor's mission. Consumed on the app-url route. */
@@ -288,7 +288,7 @@ export interface LabParticipantFocus {
288
288
  * defaults to `lane-01`..`lane-NN` and must be a public-safe token (it names per-participant evidence
289
289
  * paths). Consumed only on the computer-use E2B route (inert/warned elsewhere).
290
290
  */
291
- export interface LabParticipantEntry {
291
+ export interface StudyParticipantEntry {
292
292
  /** Public-safe participant id (interpolates into its evidence paths). Default `lane-NN`. */
293
293
  id?: string;
294
294
  /**
@@ -349,13 +349,13 @@ export interface LabParticipantEntry {
349
349
  * `lanes[]` with deterministic ids (`<group.id>-01`, `<group.id>-02`, ...). The runtime never
350
350
  * consumes this shape directly; it always sees ordinary `LabActorLane` entries.
351
351
  */
352
- export interface LabActorRosterGroup extends Omit<LabParticipantEntry, "id"> {
352
+ export interface StudyActorRosterGroup extends Omit<StudyParticipantEntry, "id"> {
353
353
  /** Public-safe group id; prefixes generated participant ids. */
354
354
  id: string;
355
355
  /** Number of participants to generate for this group. */
356
356
  count: number;
357
357
  }
358
- export interface LabActor {
358
+ export interface StudyActor {
359
359
  /**
360
360
  * The actor label. On computer-use (including shared-world), scripted-browser, and
361
361
  * terminal-product routes this is a real dispatch key resolved against the closed first-party
@@ -371,13 +371,13 @@ export interface LabActor {
371
371
  /** Computer-use E2B route: a differentiated fan-out roster (`per-lane-worlds`). XOR `count`,
372
372
  * `roster`, and `laneFocus`. Cap 16 participants. Consumed only on the cua E2B route
373
373
  * (inert/warned elsewhere). */
374
- lanes?: LabParticipantEntry[];
374
+ lanes?: StudyParticipantEntry[];
375
375
  /** Persona id/label threaded into the actor prompt. Consumed on the app-url route. */
376
376
  persona?: string;
377
377
  /** Consumed on the app-url route (laneFocus.instruction appended to the mission). XOR `lanes`. */
378
- laneFocus?: LabParticipantFocus;
378
+ laneFocus?: StudyParticipantFocus;
379
379
  /** Free-form mission threaded into the actor prompt. Consumed on the app-url route. A mission on
380
- * its own is a complete, valid lab; `tasks` is additive, never required. */
380
+ * its own is a complete, valid study; `tasks` is additive, never required. */
381
381
  mission?: string;
382
382
  /**
383
383
  * The researcher's protocol: discrete tasks, each with what the participant is asked to do and
@@ -385,11 +385,11 @@ export interface LabActor {
385
385
  *
386
386
  * The two halves belong to different people. `goal` reaches the participant's prompt; `success`
387
387
  * never does. A moderator does not read the success criterion aloud, because telling someone how
388
- * they will be judged changes what they do. See src/lab/tasks.ts.
388
+ * they will be judged changes what they do. See src/study/tasks.ts.
389
389
  * Supported only on the first actor of per-participant computer-use routes; other routes fail
390
390
  * preflight.
391
391
  */
392
- tasks?: LabTask[];
392
+ tasks?: StudyTask[];
393
393
  /** Provider model override. Consumed on the app-url route. */
394
394
  model?: string;
395
395
  /** First-party OpenAI CUA only: per-response output limit including reasoning, not a dollar cap. */
@@ -431,21 +431,21 @@ export interface LabActor {
431
431
  */
432
432
  dwell?: DwellWindow;
433
433
  }
434
- type LabExecutionTarget = "local" | "e2b-desktop" | "e2b-terminal";
434
+ type StudyExecutionTarget = "local" | "e2b-desktop" | "e2b-terminal";
435
435
  /** Terminal transport: the captured non-interactive exec stream (stdin disabled). It is not an
436
436
  * interactive duplex PTY; labeling captured exec output "pty" would be a claim/mechanism
437
437
  * mismatch, so this route uses "exec-stream". */
438
- type LabTerminalTransport = "exec-stream";
438
+ type StudyTerminalTransport = "exec-stream";
439
439
  /** Whether operator stdin reaches the in-sandbox agent. Disabled by default (the run is
440
440
  * autonomous + comparable to an unassisted baseline). "planned" records intent but sends no
441
441
  * input; "sent" is rejected because assisted-input capture and a non-comparable marker do not
442
442
  * ship (the safety contract forbids an assisted run masquerading as green). */
443
- type LabTerminalStdin = "disabled" | "planned" | "sent";
444
- export interface LabExecutionTerminal {
443
+ type StudyTerminalStdin = "disabled" | "planned" | "sent";
444
+ export interface StudyExecutionTerminal {
445
445
  /** Transport label. Default and only shipped value is "exec-stream". */
446
- transport?: LabTerminalTransport;
446
+ transport?: StudyTerminalTransport;
447
447
  /** Operator stdin posture. Default "disabled". */
448
- stdin?: LabTerminalStdin;
448
+ stdin?: StudyTerminalStdin;
449
449
  }
450
450
  /**
451
451
  * The terminal agent's runtime-auth channel. "openai-env" (the default) passes the raw runtime
@@ -453,9 +453,9 @@ export interface LabExecutionTerminal {
453
453
  * OpenAI endpoint and passes an inert placeholder to Codex. The latter still gives every sandbox
454
454
  * process a spendable OpenAI proxy capability; it is not a spend cap or an egress restriction.
455
455
  */
456
- export type LabRuntimeAuth = "openai-env" | "openai-egress";
457
- export type LabDesktopBrowser = "default" | "chrome" | "chromium" | "firefox";
458
- export interface LabExecutionDesktop {
456
+ export type StudyRuntimeAuth = "openai-env" | "openai-egress";
457
+ export type StudyDesktopBrowser = "default" | "chrome" | "chromium" | "firefox";
458
+ export interface StudyExecutionDesktop {
459
459
  /**
460
460
  * Named device preset (mobile / small-mobile / narrow-mobile / tablet / desktop / wide) the
461
461
  * run renders at. Consumed on the computer-use route; default `desktop` (1440x950). On that
@@ -470,7 +470,7 @@ export interface LabExecutionDesktop {
470
470
  * historical desktop opener behavior. A concrete value means "launch this browser or fail"
471
471
  * instead of silently accepting the template's default URL opener.
472
472
  */
473
- browser?: LabDesktopBrowser;
473
+ browser?: StudyDesktopBrowser;
474
474
  /** Sandbox server-side timeout. Consumed on the app-url route. */
475
475
  sandboxTimeoutMs?: number;
476
476
  /**
@@ -499,9 +499,9 @@ export interface LabExecutionDesktop {
499
499
  * A held CDP session also applies the overrides to later page targets. Their first observed
500
500
  * viewport and touch read-back is recorded separately; missing or different values warn.
501
501
  */
502
- fidelity?: LabDesktopFidelity;
502
+ fidelity?: StudyDesktopFidelity;
503
503
  /** Synthetic media devices behind the browser's own permission prompt. */
504
- media?: LabDesktopMedia;
504
+ media?: StudyDesktopMedia;
505
505
  /** Optional retained screen video. Capture is independent of participant media input. */
506
506
  recording?: {
507
507
  audio: boolean;
@@ -514,7 +514,7 @@ export interface LabExecutionDesktop {
514
514
  * uploaded instead on hosted desktops. `microphone.source: speech` enables the participant's
515
515
  * own spoken replies and listening through native audio devices. File microphones are unsupported.
516
516
  */
517
- export interface LabDesktopMedia {
517
+ export interface StudyDesktopMedia {
518
518
  camera?: {
519
519
  source: string;
520
520
  };
@@ -522,7 +522,7 @@ export interface LabDesktopMedia {
522
522
  source: string;
523
523
  };
524
524
  }
525
- export interface LabDesktopFidelity {
525
+ export interface StudyDesktopFidelity {
526
526
  mobileEmulation: boolean;
527
527
  /** Emulated devicePixelRatio; default: the device preset's. */
528
528
  deviceScaleFactor?: number;
@@ -531,8 +531,8 @@ export interface LabDesktopFidelity {
531
531
  /** Full user-agent string to present; default: a mobile Safari string. */
532
532
  userAgent?: string;
533
533
  }
534
- export interface LabExecution {
535
- target?: LabExecutionTarget;
534
+ export interface StudyExecution {
535
+ target?: StudyExecutionTarget;
536
536
  /** Actor session wall-clock budget. Consumed on the app-url route. */
537
537
  timeoutMs?: number;
538
538
  /** Forward-declared: no route reads it yet, so a set value warns. */
@@ -542,7 +542,7 @@ export interface LabExecution {
542
542
  * defaults to the participant count. Inert (warned) elsewhere.
543
543
  */
544
544
  concurrency?: number;
545
- desktop?: LabExecutionDesktop;
545
+ desktop?: StudyExecutionDesktop;
546
546
  /**
547
547
  * Blast-radius budget for each computer-use participant. Consumed on the computer-use route:
548
548
  * `caps.maxUsd`, when set, is a fail-closed abort: the session stops the moment its running
@@ -553,15 +553,15 @@ export interface LabExecution {
553
553
  * `caps.maxTotalUsd` is the shared study budget: one ledger across every participant, the knob a
554
554
  * researcher actually reasons with. Absent = uncapped (the historical CUA behavior); maxUsd: 0
555
555
  * still permits a request before reported usage trips it. Inert (warned) on non-computer-use
556
- * routes. Reuses the same LabScenarioCaps shape as the terminal route's `scenario.caps` (not a
556
+ * routes. Reuses the same StudyScenarioCaps shape as the terminal route's `scenario.caps` (not a
557
557
  * fork).
558
558
  */
559
- caps?: LabScenarioCaps;
559
+ caps?: StudyScenarioCaps;
560
560
  /** `terminal-product` route: the terminal transport + stdin posture. Consumed on that route. */
561
- terminal?: LabExecutionTerminal;
561
+ terminal?: StudyExecutionTerminal;
562
562
  /** `terminal-product` route: runtime key placement, defaulting to openai-env. openai-egress
563
563
  * uses an external header transform; dry-runs record declarations only. Inert on other routes. */
564
- runtimeAuth?: LabRuntimeAuth;
564
+ runtimeAuth?: StudyRuntimeAuth;
565
565
  /** Terminal Codex package pin. Omit to resolve latest once, observe it, then execute that version. */
566
566
  runtime?: {
567
567
  version: string;
@@ -573,7 +573,7 @@ export interface LabExecution {
573
573
  * openai-egress keeps the raw runtime key outside the sandbox.
574
574
  *
575
575
  * Absent means unrestricted, which is the historical behavior and stays the default, because a
576
- * wrong host list fails studies in ways that look like product bugs. Opt in per lab.
576
+ * wrong host list fails studies in ways that look like product bugs. Opt in per study.
577
577
  *
578
578
  * Domain filtering covers HTTP on :80 (Host header) and TLS on :443 (SNI); anything else needs
579
579
  * an IP or CIDR. `*.example.com` matches subdomains at any depth and not the apex, which needs
@@ -581,7 +581,7 @@ export interface LabExecution {
581
581
  */
582
582
  egressAllow?: string[];
583
583
  }
584
- type LabScenarioMode = "dry-run" | "live";
584
+ type StudyScenarioMode = "dry-run" | "live";
585
585
  /**
586
586
  * The blast-radius budget for a route that passes a live key to an in-sandbox command.
587
587
  * Per the safety contract, the live key is never exercised without a fail-closed cap in force.
@@ -590,7 +590,7 @@ type LabScenarioMode = "dry-run" | "live";
590
590
  * and maxMinutes is enforced as the command wall clock. Codex tokens are unpriced, so a live run
591
591
  * refuses a positive maxUsd unless a costProbe measures spend (HUMANISH_TERMINAL_UNPRICED_CAP).
592
592
  */
593
- export interface LabScenarioCaps {
593
+ export interface StudyScenarioCaps {
594
594
  /** Max USD the run may spend (provider + product). 0 = no-spend. */
595
595
  maxUsd?: number;
596
596
  /**
@@ -602,7 +602,7 @@ export interface LabScenarioCaps {
602
602
  * the participant ran out of budget; never `gave_up`, because a study-level stop is not the
603
603
  * participant's doing). Estimated model spend only; desktop-minutes ride the cost summary but
604
604
  * not this ledger. Independent of the per-participant `maxUsd` backstop; either, both, or neither may
605
- * be set. A positive `scenario.caps.maxTotalUsd` on a computer-use lab is a parse error; on the
605
+ * be set. A positive `scenario.caps.maxTotalUsd` on a computer-use study is a parse error; on the
606
606
  * terminal route it is inert (warned), since the single agent's maxUsd already caps the run.
607
607
  */
608
608
  maxTotalUsd?: number;
@@ -611,19 +611,19 @@ export interface LabScenarioCaps {
611
611
  /** Max wall-clock minutes for the agent session. */
612
612
  maxMinutes?: number;
613
613
  }
614
- export interface LabScenario {
614
+ export interface StudyScenario {
615
615
  /** Reference a committed scenario by id (humanish/scenarios/<ref>.yaml) or path. Consumed
616
616
  * (and required) on the scripted-browser route; forward-declared elsewhere. */
617
617
  ref?: string;
618
618
  /** Or inline the scenario body. Forward-declared: no route reads it yet, so a set value warns. */
619
619
  inline?: Record<string, unknown>;
620
620
  /** dry-run = a synthetic bundle with no provider spend; live = real run. Consumed. */
621
- mode?: LabScenarioMode;
621
+ mode?: StudyScenarioMode;
622
622
  /** Spend/job/time caps. Consumed (recorded in the bundle) on the terminal-product route;
623
623
  * inert (warned) elsewhere. */
624
- caps?: LabScenarioCaps;
624
+ caps?: StudyScenarioCaps;
625
625
  }
626
- export interface LabPolicies {
626
+ export interface StudyPolicies {
627
627
  /**
628
628
  * Redact target repo labels in durable artifacts. Consumed on the computer-use,
629
629
  * scripted-browser and shared-world clone routes (provenance), where it defaults to true when
@@ -640,7 +640,7 @@ export interface LabPolicies {
640
640
  */
641
641
  redactScreenshots?: boolean;
642
642
  /**
643
- * Allow an app-url subject to point at a non-loopback (public/preview/staging) URL the lab
643
+ * Allow an app-url subject to point at a non-loopback (public/preview/staging) URL the study
644
644
  * owner declares. Default `false` (loopback-only). The invariant is "the actor drives a target
645
645
  * the owner declared"; setting this is that declaration (e.g. a Vercel preview of your app).
646
646
  */
@@ -662,9 +662,9 @@ export interface LabPolicies {
662
662
  /** Recorded GitHub-mutation intent. No GitHub-token injection channel ships. */
663
663
  allowGitHubMutation?: boolean;
664
664
  }
665
- export interface LabReview {
665
+ export interface StudyReview {
666
666
  /** Analysis defaults on for eligible live recordings; false disables the separate request. */
667
- analysis?: LabAnalysis | false;
667
+ analysis?: StudyAnalysis | false;
668
668
  /** Forward-declared: no route reads it yet, so a set value warns. */
669
669
  scoring?: string;
670
670
  /** Forward-declared: no route reads it yet, so a set value warns. */
@@ -681,14 +681,14 @@ export interface LabReview {
681
681
  ref: string;
682
682
  };
683
683
  }
684
- export interface LabDefaults {
684
+ export interface StudyDefaults {
685
685
  open?: boolean;
686
686
  }
687
687
  /** Off-app comms (email/SMS the persona lives in) the harness provides for the run. */
688
- export interface LabComms {
689
- email?: LabCommsEmail;
688
+ export interface StudyComms {
689
+ email?: StudyCommsEmail;
690
690
  }
691
- export interface LabCommsSmtp {
691
+ export interface StudyCommsSmtp {
692
692
  /** Fixed in-sandbox loopback SMTP port (default 2525). Known before sandbox create, like `port`. */
693
693
  port?: number;
694
694
  /** The subject-env var carrying the SMTP host. The harness sets it to 127.0.0.1. */
@@ -703,8 +703,8 @@ export interface LabCommsSmtp {
703
703
  user?: string;
704
704
  password?: string;
705
705
  }
706
- export type LabCommsEmail = LabCommsCaptureEmail | LabCommsReceivingEmail;
707
- export interface LabCommsReceivingEmail {
706
+ export type StudyCommsEmail = StudyCommsCaptureEmail | StudyCommsReceivingEmail;
707
+ export interface StudyCommsReceivingEmail {
708
708
  kind: "real";
709
709
  connection: string;
710
710
  /** Additional exact first-hop destinations; automatic remote email assets remain blocked. */
@@ -716,13 +716,13 @@ export interface LabCommsReceivingEmail {
716
716
  recipients?: never;
717
717
  external?: never;
718
718
  }
719
- interface LabCommsCaptureEmail {
719
+ interface StudyCommsCaptureEmail {
720
720
  connection?: never;
721
721
  allowedOrigins?: never;
722
722
  /** Which implementation backs the inbox (a backend discriminator, distinct from `scenario.mode`):
723
723
  * `fake` (default) is an in-harness in-memory inbox in the Fowler test-double sense: an in-sandbox
724
724
  * catch captures the app's sends. Provider-backed receiving uses the separate
725
- * LabCommsReceivingEmail configuration selected by a saved connection. */
725
+ * StudyCommsReceivingEmail configuration selected by a saved connection. */
726
726
  kind: "fake";
727
727
  /**
728
728
  * The subject-env var the harness sets to the in-sandbox catch's base URL. The adopter names it (an app
@@ -743,7 +743,7 @@ interface LabCommsCaptureEmail {
743
743
  * `hostEnv` and `portEnv` are adopter-named, exactly like `injectEnv`: the harness sets them to
744
744
  * its own loopback and the chosen port. Declare the pair your app actually reads.
745
745
  */
746
- smtp?: LabCommsSmtp;
746
+ smtp?: StudyCommsSmtp;
747
747
  /** Optional escape hatch: the exact absolute origin the app-under-test bakes into its email verify
748
748
  * links, when that differs from the serve origin (e.g. an app configured with an absolute
749
749
  * APP_URL/NEXT_PUBLIC_BASE_URL). The harness cannot infer it, so the operator declares it; it is
@@ -760,7 +760,7 @@ interface LabCommsCaptureEmail {
760
760
  * not match it, and its participant gets no inbox instruction; captured mail to an undeclared
761
761
  * address is warned,
762
762
  * never silently dropped. */
763
- recipients?: LabCommsRecipient[];
763
+ recipients?: StudyCommsRecipient[];
764
764
  /**
765
765
  * adopter-hosted ingress. Declaring this says: the operator runs the catch and the inbox
766
766
  * themselves, so humanish neither provisions the subject nor injects `injectEnv`. It points the
@@ -769,9 +769,9 @@ interface LabCommsCaptureEmail {
769
769
  * plane, where humanish holds no sandbox handle to host a catch in and the block was previously
770
770
  * warned inert. Run the same implementation with `humanish comms catch`.
771
771
  */
772
- external?: LabCommsExternal;
772
+ external?: StudyCommsExternal;
773
773
  }
774
- export interface LabCommsExternal {
774
+ export interface StudyCommsExternal {
775
775
  /** Where the adopter's app POSTs its email sends, and where humanish reads GET /deliveries. */
776
776
  catchBaseUrl: string;
777
777
  /** Where the persona opens its inbox. Defaults to catchBaseUrl (one server serves both). */
@@ -780,40 +780,40 @@ export interface LabCommsExternal {
780
780
  * the value is read at runtime and never persisted (the credential-boundary discipline). */
781
781
  authTokenEnv?: string;
782
782
  }
783
- export interface LabCommsRecipient {
783
+ export interface StudyCommsRecipient {
784
784
  lane: string;
785
785
  /** The literal address the app sends to, which the evidence drain matches. Omit to reserve the participant
786
786
  * for the persona surface's default address (not drain-matched). */
787
787
  address?: string;
788
788
  }
789
- export interface LabConfig {
789
+ export interface StudyConfig {
790
790
  /** The format the file was written in. Both parse into this one shape. */
791
- schema: typeof LAB_CONFIG_SCHEMA | typeof STUDY_SCHEMA;
791
+ schema: typeof V2_SCHEMA | typeof STUDY_SCHEMA;
792
792
  id: string;
793
793
  title?: string;
794
794
  description?: string;
795
- subject: LabSubject;
796
- actors: LabActor[];
797
- execution?: LabExecution;
795
+ subject: StudySubject;
796
+ actors: StudyActor[];
797
+ execution?: StudyExecution;
798
798
  /** Forward-declared: no route reads it yet, so a set value warns. */
799
799
  personas?: Record<string, unknown>[];
800
- scenario?: LabScenario;
801
- policies?: LabPolicies;
802
- review?: LabReview;
803
- defaults?: LabDefaults;
804
- comms?: LabComms;
800
+ scenario?: StudyScenario;
801
+ policies?: StudyPolicies;
802
+ review?: StudyReview;
803
+ defaults?: StudyDefaults;
804
+ comms?: StudyComms;
805
805
  }
806
- interface LabConfigParseSuccess {
806
+ interface StudyParseSuccess {
807
807
  ok: true;
808
- config: LabConfig;
808
+ config: StudyConfig;
809
809
  warnings: string[];
810
810
  }
811
- export interface LabConfigParseFailure {
811
+ export interface StudyParseFailure {
812
812
  ok: false;
813
813
  error: {
814
- code: "HUMANISH_STUDY_INVALID";
814
+ code: "HUMANISH_STUDY_INVALID" | "HUMANISH_STUDY_V2_UNSUPPORTED";
815
815
  message: string;
816
816
  };
817
817
  }
818
- export type LabConfigParseResult = LabConfigParseSuccess | LabConfigParseFailure;
818
+ export type StudyParseResult = StudyParseSuccess | StudyParseFailure;
819
819
  export {};
@@ -1,6 +1,6 @@
1
1
  import {} from "../analysis/automatic-config.js";
2
2
  import {} from "../actors/reasoning-effort.js";
3
- export const LAB_CONFIG_SCHEMA = "humanish.lab.v2";
3
+ export const V2_SCHEMA = "humanish.lab.v2";
4
4
  /** The study format: it declares its route, one actor, its participants and one caps block. */
5
5
  export const STUDY_SCHEMA = "humanish.study.v3";
6
6
  // Must start alphanumeric so an id never collides with the path-vs-id resolver heuristic