humanish 0.104.3 → 0.106.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 (1407) hide show
  1. package/AGENTS.md +89 -94
  2. package/ARCHITECTURE.md +146 -0
  3. package/CHANGELOG.md +502 -0
  4. package/CONTEXT.md +51 -0
  5. package/CONTRIBUTING.md +111 -9
  6. package/README.md +213 -124
  7. package/SECURITY.md +1 -1
  8. package/TELEMETRY.md +112 -0
  9. package/dist/actors/affordance.d.ts +56 -0
  10. package/dist/actors/affordance.js +155 -0
  11. package/dist/actors/agent-session.js +42 -0
  12. package/dist/actors/codex/app-server-actor-trace.d.ts +11 -0
  13. package/dist/actors/codex/app-server-actor-trace.js +211 -0
  14. package/dist/actors/codex/app-server-client.d.ts +39 -0
  15. package/dist/actors/codex/app-server-client.js +116 -0
  16. package/dist/actors/codex/app-server-trace.d.ts +154 -0
  17. package/dist/actors/codex/app-server-trace.js +424 -0
  18. package/dist/actors/codex/app-server-ui.d.ts +40 -0
  19. package/dist/actors/codex/app-server-ui.js +328 -0
  20. package/dist/actors/codex/app-server.d.ts +44 -0
  21. package/dist/actors/codex/app-server.js +268 -0
  22. package/dist/actors/codex/qualified-versions.d.ts +45 -0
  23. package/dist/actors/codex/qualified-versions.js +87 -0
  24. package/dist/actors/codex/restricted-executable.d.ts +17 -0
  25. package/dist/actors/codex/restricted-executable.js +147 -0
  26. package/dist/actors/codex/restricted-launch.d.ts +116 -0
  27. package/dist/actors/codex/restricted-launch.js +222 -0
  28. package/dist/actors/codex/restricted-participant-policy.d.ts +46 -0
  29. package/dist/actors/codex/restricted-participant-policy.js +82 -0
  30. package/dist/actors/codex/restricted-participant.d.ts +20 -0
  31. package/dist/actors/codex/restricted-participant.js +432 -0
  32. package/dist/actors/codex/restricted-policy.d.ts +70 -0
  33. package/dist/actors/codex/restricted-policy.js +326 -0
  34. package/dist/actors/codex/restricted-session.d.ts +65 -0
  35. package/dist/actors/codex/restricted-session.js +432 -0
  36. package/dist/actors/codex/restricted-transport.d.ts +73 -0
  37. package/dist/actors/codex/restricted-transport.js +335 -0
  38. package/dist/actors/codex/restricted-turn.d.ts +62 -0
  39. package/dist/actors/codex/restricted-turn.js +284 -0
  40. package/dist/actors/computer-use/actor.d.ts +77 -0
  41. package/dist/actors/computer-use/actor.js +78 -0
  42. package/dist/actors/computer-use/admission-limit.d.ts +12 -0
  43. package/dist/actors/computer-use/admission-limit.js +19 -0
  44. package/dist/actors/computer-use/executor-error.js +48 -0
  45. package/dist/actors/computer-use/loop/actions.d.ts +26 -0
  46. package/dist/actors/computer-use/loop/actions.js +245 -0
  47. package/dist/actors/computer-use/loop/backstop.d.ts +42 -0
  48. package/dist/actors/computer-use/loop/backstop.js +202 -0
  49. package/dist/actors/computer-use/loop/debrief.d.ts +19 -0
  50. package/dist/actors/computer-use/loop/debrief.js +164 -0
  51. package/dist/actors/computer-use/loop/ending.d.ts +86 -0
  52. package/dist/actors/computer-use/loop/ending.js +316 -0
  53. package/dist/actors/computer-use/loop/observation.d.ts +55 -0
  54. package/dist/actors/computer-use/loop/observation.js +246 -0
  55. package/dist/actors/computer-use/loop/output-limit.d.ts +11 -0
  56. package/dist/actors/computer-use/loop/output-limit.js +21 -0
  57. package/dist/actors/computer-use/loop/provider-call.d.ts +19 -0
  58. package/dist/actors/computer-use/loop/provider-call.js +208 -0
  59. package/dist/actors/computer-use/loop/race.d.ts +34 -0
  60. package/dist/actors/computer-use/loop/race.js +79 -0
  61. package/dist/actors/computer-use/loop/session.d.ts +77 -0
  62. package/dist/actors/computer-use/loop/session.js +135 -0
  63. package/dist/actors/computer-use/loop/spend.d.ts +30 -0
  64. package/dist/actors/computer-use/loop/spend.js +85 -0
  65. package/dist/actors/computer-use/loop/trace.d.ts +35 -0
  66. package/dist/actors/computer-use/loop/trace.js +140 -0
  67. package/dist/actors/computer-use/loop/types.d.ts +404 -0
  68. package/dist/actors/computer-use/loop/types.js +1 -0
  69. package/dist/actors/computer-use/loop/usage.d.ts +102 -0
  70. package/dist/actors/computer-use/loop/usage.js +355 -0
  71. package/dist/actors/computer-use/loop.d.ts +11 -0
  72. package/dist/actors/computer-use/loop.js +248 -0
  73. package/dist/actors/computer-use/openai-provider.d.ts +107 -0
  74. package/dist/actors/computer-use/openai-provider.js +472 -0
  75. package/dist/actors/computer-use/openai-requests.d.ts +35 -0
  76. package/dist/actors/computer-use/openai-requests.js +74 -0
  77. package/dist/actors/computer-use/openai-wire.d.ts +67 -0
  78. package/dist/actors/computer-use/openai-wire.js +365 -0
  79. package/dist/actors/computer-use/provider-error.d.ts +27 -0
  80. package/dist/actors/computer-use/provider-error.js +86 -0
  81. package/dist/actors/computer-use/speech.js +6 -0
  82. package/dist/actors/contract.d.ts +315 -0
  83. package/dist/actors/contract.js +201 -0
  84. package/dist/actors/goal-source.js +38 -0
  85. package/dist/actors/local-agent/claude-session.d.ts +43 -0
  86. package/dist/actors/local-agent/claude-session.js +370 -0
  87. package/dist/actors/local-agent/cli.d.ts +115 -0
  88. package/dist/actors/local-agent/cli.js +413 -0
  89. package/dist/actors/local-agent/readiness.d.ts +31 -0
  90. package/dist/actors/local-agent/readiness.js +45 -0
  91. package/dist/actors/openai-endpoint.d.ts +2 -0
  92. package/dist/actors/openai-endpoint.js +2 -0
  93. package/dist/actors/output-token-limit.js +4 -0
  94. package/dist/actors/reasoning-effort.js +33 -0
  95. package/dist/actors/registry.d.ts +59 -0
  96. package/dist/actors/registry.js +89 -0
  97. package/dist/actors/scripted-browser/actor.d.ts +49 -0
  98. package/dist/actors/scripted-browser/actor.js +428 -0
  99. package/dist/actors/scripted-browser/browser-command.d.ts +1 -0
  100. package/dist/actors/scripted-browser/browser-command.js +48 -0
  101. package/dist/actors/scripted-browser/journey.d.ts +9 -0
  102. package/dist/actors/scripted-browser/journey.js +171 -0
  103. package/dist/actors/scripted-browser/steps.d.ts +60 -0
  104. package/dist/actors/scripted-browser/steps.js +384 -0
  105. package/dist/actors/scripted-browser/types.d.ts +135 -0
  106. package/dist/actors/scripted-browser/types.js +26 -0
  107. package/dist/actors/stop-cause.d.ts +9 -0
  108. package/dist/actors/stop-cause.js +42 -0
  109. package/dist/actors/stop-conditions.d.ts +40 -0
  110. package/dist/actors/stop-conditions.js +65 -0
  111. package/dist/analysis/automatic-completion.d.ts +38 -0
  112. package/dist/analysis/automatic-completion.js +90 -0
  113. package/dist/analysis/automatic-config.d.ts +41 -0
  114. package/dist/analysis/automatic-config.js +135 -0
  115. package/dist/analysis/automatic.d.ts +17 -0
  116. package/dist/analysis/automatic.js +279 -0
  117. package/dist/analysis/codex-config.d.ts +8 -0
  118. package/dist/analysis/codex-config.js +69 -0
  119. package/dist/analysis/evidence-sources.d.ts +23 -0
  120. package/dist/analysis/evidence-sources.js +251 -0
  121. package/dist/analysis/evidence.d.ts +18 -0
  122. package/dist/analysis/evidence.js +482 -0
  123. package/dist/analysis/execute.d.ts +52 -0
  124. package/dist/analysis/execute.js +504 -0
  125. package/dist/analysis/image-tokens.d.ts +1 -0
  126. package/dist/analysis/image-tokens.js +41 -0
  127. package/dist/analysis/job.d.ts +97 -0
  128. package/dist/analysis/job.js +311 -0
  129. package/dist/analysis/load.d.ts +3 -0
  130. package/dist/analysis/load.js +11 -0
  131. package/dist/analysis/provider.d.ts +57 -0
  132. package/dist/analysis/provider.js +227 -0
  133. package/dist/analysis/restricted-codex.d.ts +19 -0
  134. package/dist/analysis/restricted-codex.js +23 -0
  135. package/dist/analysis/service.d.ts +72 -0
  136. package/dist/analysis/service.js +399 -0
  137. package/dist/analysis/sharing.d.ts +11 -0
  138. package/dist/analysis/sharing.js +44 -0
  139. package/dist/analysis/store-executions.d.ts +27 -0
  140. package/dist/analysis/store-executions.js +224 -0
  141. package/dist/analysis/store.d.ts +31 -0
  142. package/dist/analysis/store.js +315 -0
  143. package/dist/analysis/types.d.ts +217 -0
  144. package/dist/analysis/types.js +12 -0
  145. package/dist/analysis/validation.d.ts +225 -0
  146. package/dist/analysis/validation.js +562 -0
  147. package/dist/browser-control/client.d.ts +18 -0
  148. package/dist/browser-control/client.js +239 -0
  149. package/dist/browser-control/dispatcher.d.ts +19 -0
  150. package/dist/browser-control/dispatcher.js +221 -0
  151. package/dist/browser-control/protocol.d.ts +492 -0
  152. package/dist/browser-control/protocol.js +360 -0
  153. package/dist/browser-control/recording-transfer.d.ts +3 -0
  154. package/dist/browser-control/recording-transfer.js +48 -0
  155. package/dist/browser-control/transport.d.ts +27 -0
  156. package/dist/browser-control/transport.js +189 -0
  157. package/dist/cli/commands/analysis-signals.d.ts +7 -0
  158. package/dist/cli/commands/analysis-signals.js +25 -0
  159. package/dist/cli/commands/analyze.d.ts +3 -0
  160. package/dist/cli/commands/analyze.js +212 -0
  161. package/dist/cli/commands/codex.d.ts +3 -0
  162. package/dist/cli/commands/codex.js +145 -0
  163. package/dist/cli/commands/comms.d.ts +3 -0
  164. package/dist/cli/commands/comms.js +225 -0
  165. package/dist/cli/commands/feedback.d.ts +3 -0
  166. package/dist/cli/commands/feedback.js +138 -0
  167. package/dist/cli/commands/lab-format.d.ts +8 -0
  168. package/dist/cli/commands/lab-format.js +105 -0
  169. package/dist/cli/commands/lab-route-computer-use.d.ts +20 -0
  170. package/dist/cli/commands/lab-route-computer-use.js +251 -0
  171. package/dist/cli/commands/lab-route-open.d.ts +27 -0
  172. package/dist/cli/commands/lab-route-open.js +37 -0
  173. package/dist/cli/commands/lab-route-preview.d.ts +20 -0
  174. package/dist/cli/commands/lab-route-preview.js +74 -0
  175. package/dist/cli/commands/lab-route-run.d.ts +17 -0
  176. package/dist/cli/commands/lab-route-run.js +31 -0
  177. package/dist/cli/commands/lab-route-scripted.d.ts +19 -0
  178. package/dist/cli/commands/lab-route-scripted.js +50 -0
  179. package/dist/cli/commands/lab-route-shared-world.d.ts +20 -0
  180. package/dist/cli/commands/lab-route-shared-world.js +135 -0
  181. package/dist/cli/commands/lab-route-terminal.d.ts +19 -0
  182. package/dist/cli/commands/lab-route-terminal.js +49 -0
  183. package/dist/cli/commands/lab-run.d.ts +9 -0
  184. package/dist/cli/commands/lab-run.js +166 -0
  185. package/dist/cli/commands/lab-scorer.d.ts +30 -0
  186. package/dist/cli/commands/lab-scorer.js +17 -0
  187. package/dist/cli/commands/lab.d.ts +3 -0
  188. package/dist/cli/commands/lab.js +193 -0
  189. package/dist/cli/commands/observe.d.ts +4 -0
  190. package/dist/cli/commands/observe.js +345 -0
  191. package/dist/cli/commands/runs.d.ts +11 -0
  192. package/dist/cli/commands/runs.js +314 -0
  193. package/dist/cli/commands/setup.d.ts +11 -0
  194. package/dist/cli/commands/setup.js +325 -0
  195. package/dist/cli/commands/tui.d.ts +32 -0
  196. package/dist/cli/commands/tui.js +305 -0
  197. package/dist/cli/commands/watch.d.ts +3 -0
  198. package/dist/cli/commands/watch.js +245 -0
  199. package/dist/cli/doctor.d.ts +39 -0
  200. package/dist/cli/doctor.js +263 -0
  201. package/dist/cli/first-run-path.d.ts +67 -0
  202. package/dist/cli/first-run-path.js +150 -0
  203. package/dist/cli/io.d.ts +85 -0
  204. package/dist/cli/io.js +232 -0
  205. package/dist/cli/observer-follow.d.ts +56 -0
  206. package/dist/cli/observer-follow.js +160 -0
  207. package/dist/cli/orientation.d.ts +30 -0
  208. package/dist/cli/orientation.js +114 -0
  209. package/dist/cli/program.d.ts +15 -0
  210. package/dist/cli/program.js +338 -0
  211. package/dist/cli/secret-prompt.js +39 -0
  212. package/dist/cli/telemetry.js +351 -0
  213. package/dist/cli.js +2 -4
  214. package/dist/comms/agentmail.d.ts +29 -0
  215. package/dist/comms/agentmail.js +568 -0
  216. package/dist/comms/capture-surface.d.ts +54 -0
  217. package/dist/comms/capture-surface.js +468 -0
  218. package/dist/comms/catch-host.d.ts +52 -0
  219. package/dist/comms/catch-host.js +192 -0
  220. package/dist/comms/connections.d.ts +20 -0
  221. package/dist/comms/connections.js +116 -0
  222. package/dist/comms/email-catch.d.ts +49 -0
  223. package/dist/comms/email-catch.js +236 -0
  224. package/dist/comms/extract.d.ts +7 -0
  225. package/dist/comms/extract.js +65 -0
  226. package/dist/comms/fake-inbox.d.ts +39 -0
  227. package/dist/comms/fake-inbox.js +136 -0
  228. package/dist/comms/images.d.ts +7 -0
  229. package/dist/comms/images.js +53 -0
  230. package/dist/comms/lease-store.d.ts +91 -0
  231. package/dist/comms/lease-store.js +600 -0
  232. package/dist/comms/providers.d.ts +30 -0
  233. package/dist/comms/providers.js +24 -0
  234. package/dist/comms/receiving-common.d.ts +17 -0
  235. package/dist/comms/receiving-common.js +82 -0
  236. package/dist/comms/receiving-evidence.d.ts +4 -0
  237. package/dist/comms/receiving-evidence.js +59 -0
  238. package/dist/comms/receiving-recovery.d.ts +22 -0
  239. package/dist/comms/receiving-recovery.js +100 -0
  240. package/dist/comms/receiving-render.d.ts +16 -0
  241. package/dist/comms/receiving-render.js +409 -0
  242. package/dist/comms/receiving-runtime.d.ts +41 -0
  243. package/dist/comms/receiving-runtime.js +66 -0
  244. package/dist/comms/receiving-surface.d.ts +8 -0
  245. package/dist/comms/receiving-surface.js +156 -0
  246. package/dist/comms/receiving-types.d.ts +122 -0
  247. package/dist/comms/receiving-types.js +3 -0
  248. package/dist/comms/receiving.d.ts +33 -0
  249. package/dist/comms/receiving.js +508 -0
  250. package/dist/comms/sandbox-catch-script.d.ts +16 -0
  251. package/dist/comms/sandbox-catch-script.js +331 -0
  252. package/dist/comms/sandbox-catch.d.ts +214 -0
  253. package/dist/comms/sandbox-catch.js +451 -0
  254. package/dist/comms/setup.d.ts +65 -0
  255. package/dist/comms/setup.js +259 -0
  256. package/dist/comms/thread-evidence.d.ts +28 -0
  257. package/dist/comms/thread-evidence.js +30 -0
  258. package/dist/comms/types.d.ts +76 -0
  259. package/dist/comms/types.js +8 -0
  260. package/dist/deprecated.d.ts +90 -0
  261. package/dist/deprecated.js +106 -0
  262. package/dist/evidence/browser-hygiene.js +42 -0
  263. package/dist/evidence/desktop-recorder.d.ts +39 -0
  264. package/dist/evidence/desktop-recorder.js +340 -0
  265. package/dist/evidence/desktop-recording-artifact.d.ts +5 -0
  266. package/dist/evidence/desktop-recording-artifact.js +53 -0
  267. package/dist/evidence/desktop-recording-types.d.ts +27 -0
  268. package/dist/evidence/desktop-recording-types.js +16 -0
  269. package/dist/evidence/encoded-text.d.ts +27 -0
  270. package/dist/evidence/encoded-text.js +243 -0
  271. package/dist/evidence/frame-signature.d.ts +17 -0
  272. package/dist/evidence/frame-signature.js +111 -0
  273. package/dist/evidence/image.d.ts +24 -0
  274. package/dist/evidence/image.js +170 -0
  275. package/dist/evidence/plain-text.d.ts +8 -0
  276. package/dist/evidence/plain-text.js +16 -0
  277. package/dist/evidence/redaction.d.ts +110 -0
  278. package/dist/evidence/redaction.js +329 -0
  279. package/dist/feedback/draft.d.ts +58 -0
  280. package/dist/feedback/draft.js +309 -0
  281. package/dist/feedback/export-bundle.d.ts +6 -0
  282. package/dist/feedback/export-bundle.js +585 -0
  283. package/dist/feedback/export.d.ts +50 -0
  284. package/dist/feedback/export.js +392 -0
  285. package/dist/feedback/feedback.d.ts +37 -0
  286. package/dist/feedback/feedback.js +282 -0
  287. package/dist/feedback/proof.d.ts +8 -0
  288. package/dist/feedback/proof.js +56 -0
  289. package/dist/guest/bootstrap.d.ts +55 -0
  290. package/dist/guest/bootstrap.js +348 -0
  291. package/dist/guest/browser-tools.d.ts +8 -0
  292. package/dist/guest/browser-tools.js +72 -0
  293. package/dist/guest/chromium-text.d.ts +62 -0
  294. package/dist/guest/chromium-text.js +386 -0
  295. package/dist/guest/desktop-executor.d.ts +57 -0
  296. package/dist/guest/desktop-executor.js +256 -0
  297. package/dist/guest/desktop-keys.d.ts +8 -0
  298. package/dist/guest/desktop-keys.js +89 -0
  299. package/dist/guest/desktop-media.d.ts +70 -0
  300. package/dist/guest/desktop-media.js +385 -0
  301. package/dist/guest/desktop-native.d.ts +14 -0
  302. package/dist/guest/desktop-native.js +156 -0
  303. package/dist/guest/media-config.d.ts +15 -0
  304. package/dist/guest/media-config.js +16 -0
  305. package/dist/guest/runtime-desktop.d.ts +45 -0
  306. package/dist/guest/runtime-desktop.js +420 -0
  307. package/dist/guest/runtime-processes.d.ts +28 -0
  308. package/dist/guest/runtime-processes.js +94 -0
  309. package/dist/guest/runtime.d.ts +31 -0
  310. package/dist/guest/runtime.js +124 -0
  311. package/dist/guest-media-worker.js +184 -48
  312. package/dist/guest-runtime-main.js +23 -10
  313. package/dist/guest-runtime-revision.js +1 -1
  314. package/dist/index.d.ts +32 -83
  315. package/dist/index.js +21 -42
  316. package/dist/keys/env-file.d.ts +15 -0
  317. package/dist/keys/env-file.js +109 -0
  318. package/dist/keys/key-resolution.d.ts +58 -0
  319. package/dist/keys/key-resolution.js +389 -0
  320. package/dist/lab/adapter-extension.d.ts +75 -0
  321. package/dist/lab/adapter-extension.js +253 -0
  322. package/dist/lab/adapter-scorer-loader.d.ts +43 -0
  323. package/dist/lab/adapter-scorer-loader.js +130 -0
  324. package/dist/lab/bag-overrides.d.ts +18 -0
  325. package/dist/lab/bag-overrides.js +121 -0
  326. package/dist/lab/composition-rules.d.ts +5 -0
  327. package/dist/lab/composition-rules.js +283 -0
  328. package/dist/lab/config.d.ts +7 -0
  329. package/dist/lab/config.js +208 -0
  330. package/dist/lab/device-presets.d.ts +97 -0
  331. package/dist/lab/device-presets.js +87 -0
  332. package/dist/lab/discover.d.ts +65 -0
  333. package/dist/lab/discover.js +422 -0
  334. package/dist/lab/doctor.d.ts +39 -0
  335. package/dist/lab/doctor.js +233 -0
  336. package/dist/lab/init-paths.d.ts +5 -0
  337. package/dist/lab/init-paths.js +89 -0
  338. package/dist/lab/init-plan.d.ts +20 -0
  339. package/dist/lab/init-plan.js +163 -0
  340. package/dist/lab/init-templates.d.ts +28 -0
  341. package/dist/lab/init-templates.js +416 -0
  342. package/dist/lab/init.d.ts +39 -0
  343. package/dist/lab/init.js +287 -0
  344. package/dist/lab/keys.d.ts +2 -0
  345. package/dist/lab/keys.js +264 -0
  346. package/dist/lab/parse/actors.d.ts +14 -0
  347. package/dist/lab/parse/actors.js +453 -0
  348. package/dist/lab/parse/comms.d.ts +12 -0
  349. package/dist/lab/parse/comms.js +246 -0
  350. package/dist/lab/parse/execution.d.ts +19 -0
  351. package/dist/lab/parse/execution.js +356 -0
  352. package/dist/lab/parse/subject-state.d.ts +30 -0
  353. package/dist/lab/parse/subject-state.js +179 -0
  354. package/dist/lab/parse/subject.d.ts +9 -0
  355. package/dist/lab/parse/subject.js +420 -0
  356. package/dist/lab/parse/values.d.ts +17 -0
  357. package/dist/lab/parse/values.js +65 -0
  358. package/dist/lab/participant-assignment.d.ts +12 -0
  359. package/dist/lab/participant-assignment.js +19 -0
  360. package/dist/lab/persona-resolve.d.ts +39 -0
  361. package/dist/lab/persona-resolve.js +118 -0
  362. package/dist/lab/persona.d.ts +39 -0
  363. package/dist/lab/persona.js +192 -0
  364. package/dist/lab/plan-base.d.ts +24 -0
  365. package/dist/lab/plan-base.js +113 -0
  366. package/dist/lab/plan-participants.d.ts +81 -0
  367. package/dist/lab/plan-participants.js +92 -0
  368. package/dist/lab/plan-types.d.ts +269 -0
  369. package/dist/lab/plan-types.js +5 -0
  370. package/dist/lab/plan.d.ts +27 -0
  371. package/dist/lab/plan.js +156 -0
  372. package/dist/lab/preflight-probes.d.ts +3 -0
  373. package/dist/lab/preflight-probes.js +312 -0
  374. package/dist/lab/preflight-result.d.ts +7 -0
  375. package/dist/lab/preflight-result.js +43 -0
  376. package/dist/lab/preflight.d.ts +95 -0
  377. package/dist/lab/preflight.js +117 -0
  378. package/dist/lab/route-inputs.d.ts +17 -0
  379. package/dist/lab/route-inputs.js +95 -0
  380. package/dist/lab/routing.d.ts +81 -0
  381. package/dist/lab/routing.js +214 -0
  382. package/dist/lab/run-lab-events.d.ts +69 -0
  383. package/dist/lab/run-lab-events.js +95 -0
  384. package/dist/lab/run-lab-options.d.ts +82 -0
  385. package/dist/lab/run-lab-options.js +399 -0
  386. package/dist/lab/summary.d.ts +60 -0
  387. package/dist/lab/summary.js +168 -0
  388. package/dist/lab/tasks.d.ts +91 -0
  389. package/dist/lab/tasks.js +139 -0
  390. package/dist/lab/types.d.ts +813 -0
  391. package/dist/lab/types.js +6 -0
  392. package/dist/lab/validation.d.ts +67 -0
  393. package/dist/lab/validation.js +387 -0
  394. package/dist/lab/warnings.d.ts +2 -0
  395. package/dist/lab/warnings.js +338 -0
  396. package/dist/observer/artifact.d.ts +23 -0
  397. package/dist/observer/artifact.js +235 -0
  398. package/dist/observer/data.d.ts +115 -0
  399. package/dist/observer/data.js +258 -0
  400. package/dist/observer/exposure.d.ts +64 -0
  401. package/dist/observer/exposure.js +143 -0
  402. package/dist/observer/http.js +50 -0
  403. package/dist/observer/library.js +190 -0
  404. package/dist/observer/listen.js +85 -0
  405. package/dist/observer/live.d.ts +9 -0
  406. package/dist/observer/live.js +25 -0
  407. package/dist/observer/pinned-files.d.ts +30 -0
  408. package/dist/observer/pinned-files.js +160 -0
  409. package/dist/observer/render.d.ts +69 -0
  410. package/dist/observer/render.js +350 -0
  411. package/dist/observer/run-inventory.d.ts +35 -0
  412. package/dist/observer/run-inventory.js +95 -0
  413. package/dist/observer/run-routes.d.ts +37 -0
  414. package/dist/observer/run-routes.js +373 -0
  415. package/dist/observer/serve.d.ts +97 -0
  416. package/dist/observer/serve.js +305 -0
  417. package/dist/observer/static.js +369 -0
  418. package/dist/observer/tunnel.js +112 -0
  419. package/dist/observer-app.html +9 -20
  420. package/dist/routes/computer-use/bundle-parts.d.ts +50 -0
  421. package/dist/routes/computer-use/bundle-parts.js +177 -0
  422. package/dist/routes/computer-use/bundle.d.ts +56 -0
  423. package/dist/routes/computer-use/bundle.js +184 -0
  424. package/dist/routes/computer-use/diagnostics.d.ts +38 -0
  425. package/dist/routes/computer-use/diagnostics.js +94 -0
  426. package/dist/routes/computer-use/e2b-desktop/comms.d.ts +65 -0
  427. package/dist/routes/computer-use/e2b-desktop/comms.js +225 -0
  428. package/dist/routes/computer-use/e2b-desktop/desktop.d.ts +3 -0
  429. package/dist/routes/computer-use/e2b-desktop/desktop.js +91 -0
  430. package/dist/routes/computer-use/e2b-desktop/fidelity.d.ts +65 -0
  431. package/dist/routes/computer-use/e2b-desktop/fidelity.js +156 -0
  432. package/dist/routes/computer-use/e2b-desktop/prepare.d.ts +18 -0
  433. package/dist/routes/computer-use/e2b-desktop/prepare.js +198 -0
  434. package/dist/routes/computer-use/e2b-desktop/start.d.ts +14 -0
  435. package/dist/routes/computer-use/e2b-desktop/start.js +193 -0
  436. package/dist/routes/computer-use/e2b-desktop/state.d.ts +65 -0
  437. package/dist/routes/computer-use/e2b-desktop/state.js +69 -0
  438. package/dist/routes/computer-use/e2b-desktop/teardown.d.ts +6 -0
  439. package/dist/routes/computer-use/e2b-desktop/teardown.js +152 -0
  440. package/dist/routes/computer-use/external-comms.d.ts +20 -0
  441. package/dist/routes/computer-use/external-comms.js +55 -0
  442. package/dist/routes/computer-use/fanout-bundle.d.ts +11 -0
  443. package/dist/routes/computer-use/fanout-bundle.js +274 -0
  444. package/dist/routes/computer-use/fanout-lanes.d.ts +15 -0
  445. package/dist/routes/computer-use/fanout-lanes.js +302 -0
  446. package/dist/routes/computer-use/in-process-desktop.d.ts +17 -0
  447. package/dist/routes/computer-use/in-process-desktop.js +40 -0
  448. package/dist/routes/computer-use/lanes.d.ts +35 -0
  449. package/dist/routes/computer-use/lanes.js +321 -0
  450. package/dist/routes/computer-use/legacy-lane-spec.d.ts +62 -0
  451. package/dist/routes/computer-use/legacy-lane-spec.js +39 -0
  452. package/dist/routes/computer-use/live-flush.d.ts +42 -0
  453. package/dist/routes/computer-use/live-flush.js +154 -0
  454. package/dist/routes/computer-use/local-tree-pack.d.ts +27 -0
  455. package/dist/routes/computer-use/local-tree-pack.js +47 -0
  456. package/dist/routes/computer-use/local-vm.d.ts +20 -0
  457. package/dist/routes/computer-use/local-vm.js +218 -0
  458. package/dist/routes/computer-use/participant-desktop.d.ts +63 -0
  459. package/dist/routes/computer-use/participant-desktop.js +33 -0
  460. package/dist/routes/computer-use/participant-facts.d.ts +6 -0
  461. package/dist/routes/computer-use/participant-facts.js +22 -0
  462. package/dist/routes/computer-use/participant-model.d.ts +30 -0
  463. package/dist/routes/computer-use/participant-model.js +222 -0
  464. package/dist/routes/computer-use/participant-prompt.d.ts +53 -0
  465. package/dist/routes/computer-use/participant-prompt.js +87 -0
  466. package/dist/routes/computer-use/participant-runs.d.ts +67 -0
  467. package/dist/routes/computer-use/participant-runs.js +255 -0
  468. package/dist/routes/computer-use/plan.d.ts +56 -0
  469. package/dist/routes/computer-use/plan.js +308 -0
  470. package/dist/routes/computer-use/preflight.d.ts +26 -0
  471. package/dist/routes/computer-use/preflight.js +85 -0
  472. package/dist/routes/computer-use/rerun-selection.d.ts +19 -0
  473. package/dist/routes/computer-use/rerun-selection.js +121 -0
  474. package/dist/routes/computer-use/result.d.ts +7 -0
  475. package/dist/routes/computer-use/result.js +292 -0
  476. package/dist/routes/computer-use/route.d.ts +33 -0
  477. package/dist/routes/computer-use/route.js +145 -0
  478. package/dist/routes/computer-use/run-lanes.d.ts +59 -0
  479. package/dist/routes/computer-use/run-lanes.js +135 -0
  480. package/dist/routes/computer-use/self-report.d.ts +21 -0
  481. package/dist/routes/computer-use/self-report.js +231 -0
  482. package/dist/routes/computer-use/setup.d.ts +136 -0
  483. package/dist/routes/computer-use/setup.js +371 -0
  484. package/dist/routes/computer-use/single-bundle.d.ts +97 -0
  485. package/dist/routes/computer-use/single-bundle.js +393 -0
  486. package/dist/routes/computer-use/subject-projection.d.ts +51 -0
  487. package/dist/routes/computer-use/subject-projection.js +159 -0
  488. package/dist/routes/computer-use/types.d.ts +539 -0
  489. package/dist/routes/computer-use/types.js +37 -0
  490. package/dist/routes/preview.d.ts +13 -0
  491. package/dist/routes/preview.js +36 -0
  492. package/dist/routes/scripted/bundle.d.ts +47 -0
  493. package/dist/routes/scripted/bundle.js +195 -0
  494. package/dist/routes/scripted/plan.d.ts +30 -0
  495. package/dist/routes/scripted/plan.js +95 -0
  496. package/dist/routes/scripted/result.d.ts +48 -0
  497. package/dist/routes/scripted/result.js +176 -0
  498. package/dist/routes/scripted/route.d.ts +28 -0
  499. package/dist/routes/scripted/route.js +218 -0
  500. package/dist/routes/scripted/scenario.d.ts +21 -0
  501. package/dist/routes/scripted/scenario.js +102 -0
  502. package/dist/routes/scripted/session-result.d.ts +8 -0
  503. package/dist/routes/scripted/session-result.js +60 -0
  504. package/dist/routes/scripted/setup.d.ts +45 -0
  505. package/dist/routes/scripted/setup.js +126 -0
  506. package/dist/routes/scripted/subject.d.ts +49 -0
  507. package/dist/routes/scripted/subject.js +156 -0
  508. package/dist/routes/scripted/surface-records.d.ts +26 -0
  509. package/dist/routes/scripted/surface-records.js +88 -0
  510. package/dist/routes/scripted/surface-sessions.d.ts +13 -0
  511. package/dist/routes/scripted/surface-sessions.js +40 -0
  512. package/dist/routes/scripted/types.d.ts +88 -0
  513. package/dist/routes/scripted/types.js +3 -0
  514. package/dist/routes/shared-world/bundle.d.ts +20 -0
  515. package/dist/routes/shared-world/bundle.js +446 -0
  516. package/dist/routes/shared-world/checkpoints.d.ts +25 -0
  517. package/dist/routes/shared-world/checkpoints.js +46 -0
  518. package/dist/routes/shared-world/comms.d.ts +68 -0
  519. package/dist/routes/shared-world/comms.js +176 -0
  520. package/dist/routes/shared-world/external-public.d.ts +21 -0
  521. package/dist/routes/shared-world/external-public.js +130 -0
  522. package/dist/routes/shared-world/handoff.d.ts +62 -0
  523. package/dist/routes/shared-world/handoff.js +348 -0
  524. package/dist/routes/shared-world/lobby-code.d.ts +25 -0
  525. package/dist/routes/shared-world/lobby-code.js +152 -0
  526. package/dist/routes/shared-world/plan.d.ts +27 -0
  527. package/dist/routes/shared-world/plan.js +174 -0
  528. package/dist/routes/shared-world/provenance.d.ts +27 -0
  529. package/dist/routes/shared-world/provenance.js +65 -0
  530. package/dist/routes/shared-world/provisioned.d.ts +57 -0
  531. package/dist/routes/shared-world/provisioned.js +505 -0
  532. package/dist/routes/shared-world/result.d.ts +18 -0
  533. package/dist/routes/shared-world/result.js +327 -0
  534. package/dist/routes/shared-world/route.d.ts +21 -0
  535. package/dist/routes/shared-world/route.js +277 -0
  536. package/dist/routes/shared-world/seat-records.d.ts +20 -0
  537. package/dist/routes/shared-world/seat-records.js +213 -0
  538. package/dist/routes/shared-world/seats.d.ts +38 -0
  539. package/dist/routes/shared-world/seats.js +208 -0
  540. package/dist/routes/shared-world/setup.d.ts +48 -0
  541. package/dist/routes/shared-world/setup.js +200 -0
  542. package/dist/routes/shared-world/types.d.ts +354 -0
  543. package/dist/routes/shared-world/types.js +29 -0
  544. package/dist/routes/terminal/adapter.d.ts +37 -0
  545. package/dist/routes/terminal/adapter.js +201 -0
  546. package/dist/routes/terminal/bundle.d.ts +79 -0
  547. package/dist/routes/terminal/bundle.js +305 -0
  548. package/dist/routes/terminal/credentials.d.ts +34 -0
  549. package/dist/routes/terminal/credentials.js +102 -0
  550. package/dist/routes/terminal/dry-run.d.ts +24 -0
  551. package/dist/routes/terminal/dry-run.js +157 -0
  552. package/dist/routes/terminal/encoding.js +79 -0
  553. package/dist/routes/terminal/ledger.d.ts +49 -0
  554. package/dist/routes/terminal/ledger.js +170 -0
  555. package/dist/routes/terminal/lifetime.d.ts +10 -0
  556. package/dist/routes/terminal/lifetime.js +22 -0
  557. package/dist/routes/terminal/live-finish.d.ts +31 -0
  558. package/dist/routes/terminal/live-finish.js +215 -0
  559. package/dist/routes/terminal/live-sandbox.d.ts +69 -0
  560. package/dist/routes/terminal/live-sandbox.js +452 -0
  561. package/dist/routes/terminal/persona.d.ts +20 -0
  562. package/dist/routes/terminal/persona.js +34 -0
  563. package/dist/routes/terminal/plan.d.ts +21 -0
  564. package/dist/routes/terminal/plan.js +115 -0
  565. package/dist/routes/terminal/recorder.d.ts +23 -0
  566. package/dist/routes/terminal/recorder.js +77 -0
  567. package/dist/routes/terminal/result.d.ts +47 -0
  568. package/dist/routes/terminal/result.js +114 -0
  569. package/dist/routes/terminal/route.d.ts +23 -0
  570. package/dist/routes/terminal/route.js +170 -0
  571. package/dist/routes/terminal/runtime-auth.d.ts +12 -0
  572. package/dist/routes/terminal/runtime-auth.js +23 -0
  573. package/dist/routes/terminal/runtime.d.ts +14 -0
  574. package/dist/routes/terminal/runtime.js +47 -0
  575. package/dist/routes/terminal/sandbox.d.ts +35 -0
  576. package/dist/routes/terminal/sandbox.js +126 -0
  577. package/dist/routes/terminal/session.d.ts +25 -0
  578. package/dist/routes/terminal/session.js +199 -0
  579. package/dist/routes/terminal/token-usage.d.ts +15 -0
  580. package/dist/routes/terminal/token-usage.js +93 -0
  581. package/dist/routes/terminal/trace.d.ts +40 -0
  582. package/dist/routes/terminal/trace.js +172 -0
  583. package/dist/routes/terminal/types.d.ts +342 -0
  584. package/dist/routes/terminal/types.js +31 -0
  585. package/dist/run/bundle-shape.d.ts +7 -0
  586. package/dist/run/bundle-shape.js +369 -0
  587. package/dist/run/bundle.d.ts +547 -0
  588. package/dist/run/bundle.js +44 -0
  589. package/dist/run/concurrency.js +24 -0
  590. package/dist/run/contained-output.d.ts +50 -0
  591. package/dist/run/contained-output.js +351 -0
  592. package/dist/run/cost-summary.d.ts +28 -0
  593. package/dist/run/cost-summary.js +213 -0
  594. package/dist/run/costs.js +140 -0
  595. package/dist/run/detail.d.ts +62 -0
  596. package/dist/run/detail.js +139 -0
  597. package/dist/run/dry-run-inputs.d.ts +9 -0
  598. package/dist/run/dry-run-inputs.js +90 -0
  599. package/dist/run/dry-run.d.ts +6 -0
  600. package/dist/run/dry-run.js +362 -0
  601. package/dist/run/feedback-shape.d.ts +7 -0
  602. package/dist/run/feedback-shape.js +89 -0
  603. package/dist/run/git-state.d.ts +35 -0
  604. package/dist/run/git-state.js +316 -0
  605. package/dist/run/git-workspace.d.ts +32 -0
  606. package/dist/run/git-workspace.js +450 -0
  607. package/dist/run/judge.d.ts +210 -0
  608. package/dist/run/judge.js +240 -0
  609. package/dist/run/locate.d.ts +22 -0
  610. package/dist/run/locate.js +122 -0
  611. package/dist/run/outcomes.d.ts +31 -0
  612. package/dist/run/outcomes.js +210 -0
  613. package/dist/run/participant-records.d.ts +28 -0
  614. package/dist/run/participant-records.js +63 -0
  615. package/dist/run/participant.d.ts +29 -0
  616. package/dist/run/participant.js +12 -0
  617. package/dist/run/paths.d.ts +79 -0
  618. package/dist/run/paths.js +356 -0
  619. package/dist/run/preflight-receipts.d.ts +46 -0
  620. package/dist/run/preflight-receipts.js +173 -0
  621. package/dist/run/pricing.d.ts +124 -0
  622. package/dist/run/pricing.js +298 -0
  623. package/dist/run/project.d.ts +8 -0
  624. package/dist/run/project.js +103 -0
  625. package/dist/run/projection.d.ts +184 -0
  626. package/dist/run/projection.js +356 -0
  627. package/dist/run/reclaim.d.ts +41 -0
  628. package/dist/run/reclaim.js +183 -0
  629. package/dist/run/results.d.ts +88 -0
  630. package/dist/run/results.js +3 -0
  631. package/dist/run/run-index.d.ts +107 -0
  632. package/dist/run/run-index.js +243 -0
  633. package/dist/run/run.d.ts +103 -0
  634. package/dist/run/run.js +199 -0
  635. package/dist/run/sandbox-receipts.d.ts +31 -0
  636. package/dist/run/sandbox-receipts.js +49 -0
  637. package/dist/run/shared-world-evidence.d.ts +220 -0
  638. package/dist/run/shared-world-evidence.js +49 -0
  639. package/dist/run/shared-world-shape.d.ts +26 -0
  640. package/dist/run/shared-world-shape.js +181 -0
  641. package/dist/run/stats.d.ts +82 -0
  642. package/dist/run/stats.js +258 -0
  643. package/dist/run/status.d.ts +111 -0
  644. package/dist/run/status.js +176 -0
  645. package/dist/run/stored-runs.d.ts +38 -0
  646. package/dist/run/stored-runs.js +273 -0
  647. package/dist/run/stream-shape.d.ts +4 -0
  648. package/dist/run/stream-shape.js +160 -0
  649. package/dist/run/streams.d.ts +257 -0
  650. package/dist/run/streams.js +12 -0
  651. package/dist/run/study-files.d.ts +35 -0
  652. package/dist/run/study-files.js +164 -0
  653. package/dist/run/terminal-contract.d.ts +25 -0
  654. package/dist/run/terminal-contract.js +47 -0
  655. package/dist/run/text.d.ts +2 -0
  656. package/dist/run/text.js +4 -0
  657. package/dist/run/transient-comms-secrets.js +72 -0
  658. package/dist/run/type-guards.d.ts +6 -0
  659. package/dist/run/type-guards.js +18 -0
  660. package/dist/run-lab.d.ts +110 -0
  661. package/dist/run-lab.js +148 -0
  662. package/dist/subject/clone.d.ts +37 -0
  663. package/dist/subject/clone.js +62 -0
  664. package/dist/subject/desktop-cli.d.ts +17 -0
  665. package/dist/subject/desktop-cli.js +51 -0
  666. package/dist/subject/local-tree-archive.d.ts +82 -0
  667. package/dist/subject/local-tree-archive.js +431 -0
  668. package/dist/subject/local-tree.d.ts +28 -0
  669. package/dist/subject/local-tree.js +58 -0
  670. package/dist/subject/node-bootstrap.d.ts +12 -0
  671. package/dist/subject/node-bootstrap.js +66 -0
  672. package/dist/subject/runtime.d.ts +13 -0
  673. package/dist/subject/runtime.js +50 -0
  674. package/dist/subject/serve.d.ts +39 -0
  675. package/dist/subject/serve.js +249 -0
  676. package/dist/subject/state.d.ts +23 -0
  677. package/dist/subject/state.js +58 -0
  678. package/dist/subject/steps.d.ts +37 -0
  679. package/dist/subject/steps.js +39 -0
  680. package/dist/substrates/command-failure.d.ts +23 -0
  681. package/dist/substrates/command-failure.js +45 -0
  682. package/dist/substrates/desktop-session.d.ts +41 -0
  683. package/dist/substrates/desktop-session.js +59 -0
  684. package/dist/substrates/detached.d.ts +55 -0
  685. package/dist/substrates/detached.js +139 -0
  686. package/dist/substrates/e2b/cdp-probe.d.ts +99 -0
  687. package/dist/substrates/e2b/cdp-probe.js +556 -0
  688. package/dist/substrates/e2b/desktop-browser.d.ts +81 -0
  689. package/dist/substrates/e2b/desktop-browser.js +410 -0
  690. package/dist/substrates/e2b/desktop-cdp.d.ts +77 -0
  691. package/dist/substrates/e2b/desktop-cdp.js +211 -0
  692. package/dist/substrates/e2b/desktop-executor.d.ts +92 -0
  693. package/dist/substrates/e2b/desktop-executor.js +302 -0
  694. package/dist/substrates/e2b/desktop-geometry.d.ts +83 -0
  695. package/dist/substrates/e2b/desktop-geometry.js +331 -0
  696. package/dist/substrates/e2b/desktop-media.d.ts +29 -0
  697. package/dist/substrates/e2b/desktop-media.js +151 -0
  698. package/dist/substrates/e2b/desktop-recording.d.ts +18 -0
  699. package/dist/substrates/e2b/desktop-recording.js +238 -0
  700. package/dist/substrates/e2b/desktop-resources.d.ts +11 -0
  701. package/dist/substrates/e2b/desktop-resources.js +35 -0
  702. package/dist/substrates/e2b/desktop-screenshot-cleanup.d.ts +15 -0
  703. package/dist/substrates/e2b/desktop-screenshot-cleanup.js +66 -0
  704. package/dist/substrates/e2b/lifetime.d.ts +12 -0
  705. package/dist/substrates/e2b/lifetime.js +18 -0
  706. package/dist/substrates/e2b/sandbox.d.ts +102 -0
  707. package/dist/substrates/e2b/sandbox.js +202 -0
  708. package/dist/substrates/e2b/sdk.d.ts +194 -0
  709. package/dist/substrates/e2b/sdk.js +168 -0
  710. package/dist/substrates/e2b/shell.d.ts +10 -0
  711. package/dist/substrates/e2b/shell.js +61 -0
  712. package/dist/substrates/local/captured-inbox.d.ts +6 -0
  713. package/dist/substrates/local/captured-inbox.js +87 -0
  714. package/dist/substrates/local/firecracker-desktop.d.ts +25 -0
  715. package/dist/substrates/local/firecracker-desktop.js +315 -0
  716. package/dist/substrates/local/runtime-config.d.ts +6 -0
  717. package/dist/substrates/local/runtime-config.js +91 -0
  718. package/dist/substrates/local/runtime-host.d.ts +30 -0
  719. package/dist/substrates/local/runtime-host.js +143 -0
  720. package/dist/substrates/local/runtime-release.d.ts +5 -0
  721. package/dist/substrates/local/runtime-release.js +32 -0
  722. package/dist/substrates/local/runtime-ssh.d.ts +9 -0
  723. package/dist/substrates/local/runtime-ssh.js +129 -0
  724. package/dist/substrates/local/runtime.d.ts +25 -0
  725. package/dist/substrates/local/runtime.js +190 -0
  726. package/dist/substrates/shell.d.ts +44 -0
  727. package/dist/substrates/shell.js +22 -0
  728. package/dist/tui/actions.d.ts +39 -0
  729. package/dist/tui/actions.js +203 -0
  730. package/dist/tui/contract.d.ts +144 -0
  731. package/dist/tui/contract.js +52 -0
  732. package/dist/tui/launch.js +172 -0
  733. package/dist/tui/project.d.ts +10 -0
  734. package/dist/tui/project.js +17 -0
  735. package/dist/tui-app.js +125 -125
  736. package/dist/verify/actor.d.ts +27 -0
  737. package/dist/verify/actor.js +292 -0
  738. package/dist/verify/artifacts.d.ts +47 -0
  739. package/dist/verify/artifacts.js +373 -0
  740. package/dist/verify/costs.d.ts +30 -0
  741. package/dist/verify/costs.js +129 -0
  742. package/dist/verify/liveness.d.ts +7 -0
  743. package/dist/verify/liveness.js +72 -0
  744. package/dist/verify/rerun.d.ts +3 -0
  745. package/dist/verify/rerun.js +46 -0
  746. package/dist/verify/shared-world-concurrent.d.ts +11 -0
  747. package/dist/verify/shared-world-concurrent.js +346 -0
  748. package/dist/verify/shared-world.d.ts +8 -0
  749. package/dist/verify/shared-world.js +295 -0
  750. package/dist/verify/subject.d.ts +17 -0
  751. package/dist/verify/subject.js +123 -0
  752. package/dist/verify/verify.d.ts +34 -0
  753. package/dist/verify/verify.js +333 -0
  754. package/docs/README.md +67 -0
  755. package/docs/architecture/actor-contract.md +215 -174
  756. package/docs/architecture/browser-control.md +51 -37
  757. package/docs/architecture/comms-inbox.md +8 -8
  758. package/docs/architecture/desktop-recording.md +2 -2
  759. package/docs/architecture/desktop-sessions.md +33 -21
  760. package/docs/architecture/external-public-shared-world.md +80 -64
  761. package/docs/architecture/github-feedback-loop.md +40 -27
  762. package/docs/architecture/guest-desktop.md +22 -10
  763. package/docs/architecture/local-browser-runtime.md +30 -21
  764. package/docs/architecture/observer-review.md +9 -9
  765. package/docs/architecture/observer.md +53 -57
  766. package/docs/architecture/participant-media.md +3 -3
  767. package/docs/architecture/project-layout.md +33 -137
  768. package/docs/architecture/real-email-receiving.md +7 -6
  769. package/docs/architecture/restricted-codex-analysis.md +211 -25
  770. package/docs/architecture/serve.md +89 -87
  771. package/docs/architecture/state-driven-executor.md +79 -64
  772. package/docs/architecture/task-protocol-support.md +18 -18
  773. package/docs/architecture/terminal-product-lane.md +92 -86
  774. package/docs/contracts/adapter-admission.md +8 -4
  775. package/docs/contracts/adapter-fixtures.md +6 -6
  776. package/docs/contracts/core.md +22 -24
  777. package/docs/contracts/feedback.md +33 -23
  778. package/docs/contracts/policy.md +28 -31
  779. package/docs/contracts/run-bundle.md +168 -82
  780. package/docs/contracts/schemas.md +594 -379
  781. package/docs/contracts/study-analysis.md +2 -2
  782. package/docs/contracts/study-costs.md +12 -12
  783. package/docs/decisions/0001-run-bundle-is-the-source-of-truth.md +36 -0
  784. package/docs/decisions/0002-observer-is-one-self-contained-file.md +30 -0
  785. package/docs/decisions/0003-contained-paths-and-cleanup-authority.md +35 -0
  786. package/docs/decisions/0004-participant-desktops-stay-in-the-route.md +31 -0
  787. package/docs/decisions/README.md +16 -0
  788. package/docs/goals/current.md +22 -46
  789. package/docs/principles/actor-fidelity.md +51 -63
  790. package/docs/principles/engineering.md +81 -0
  791. package/docs/principles/invariants-and-defaults.md +48 -45
  792. package/docs/principles/self-driving-harness.md +11 -10
  793. package/docs/principles/three-roles.md +12 -13
  794. package/docs/product/automatic-analysis.md +39 -9
  795. package/docs/product/lobby-trivia-3player-external-public.md +14 -13
  796. package/docs/product/open-source-install-experience.md +34 -38
  797. package/docs/ramp/README.md +91 -213
  798. package/docs/release/open-source-readiness.md +5 -2
  799. package/docs/release/public-readiness-standard.md +1 -1
  800. package/examples/README.md +11 -0
  801. package/examples/participant/README.md +80 -0
  802. package/examples/participant/app.mjs +55 -0
  803. package/examples/participant/run.mjs +116 -0
  804. package/examples/scorer/README.md +29 -0
  805. package/examples/scorer/run.mjs +63 -0
  806. package/examples/scorer/scorer.mjs +20 -0
  807. package/package.json +61 -57
  808. package/skills/humanish/SKILL.md +112 -83
  809. package/skills/humanish/agents/openai.yaml +2 -2
  810. package/dist/actor-contract.d.ts +0 -288
  811. package/dist/actor-contract.js +0 -340
  812. package/dist/actor-contract.js.map +0 -1
  813. package/dist/actor-goal-source.js +0 -32
  814. package/dist/actor-goal-source.js.map +0 -1
  815. package/dist/actor-registry.d.ts +0 -77
  816. package/dist/actor-registry.js +0 -106
  817. package/dist/actor-registry.js.map +0 -1
  818. package/dist/actor-stop-cause.d.ts +0 -9
  819. package/dist/actor-stop-cause.js +0 -42
  820. package/dist/actor-stop-cause.js.map +0 -1
  821. package/dist/adapter-extension.d.ts +0 -76
  822. package/dist/adapter-extension.js +0 -273
  823. package/dist/adapter-extension.js.map +0 -1
  824. package/dist/adapter-scorer-loader.d.ts +0 -42
  825. package/dist/adapter-scorer-loader.js +0 -129
  826. package/dist/adapter-scorer-loader.js.map +0 -1
  827. package/dist/affordance.d.ts +0 -53
  828. package/dist/affordance.js +0 -145
  829. package/dist/affordance.js.map +0 -1
  830. package/dist/agent-session.js +0 -43
  831. package/dist/agent-session.js.map +0 -1
  832. package/dist/argv.d.ts +0 -1
  833. package/dist/argv.js +0 -8
  834. package/dist/argv.js.map +0 -1
  835. package/dist/artifact-reference.d.ts +0 -22
  836. package/dist/artifact-reference.js +0 -47
  837. package/dist/artifact-reference.js.map +0 -1
  838. package/dist/automatic-analysis-completion.d.ts +0 -25
  839. package/dist/automatic-analysis-completion.js +0 -56
  840. package/dist/automatic-analysis-completion.js.map +0 -1
  841. package/dist/automatic-analysis-config.d.ts +0 -38
  842. package/dist/automatic-analysis-config.js +0 -68
  843. package/dist/automatic-analysis-config.js.map +0 -1
  844. package/dist/automatic-study-analysis.d.ts +0 -17
  845. package/dist/automatic-study-analysis.js +0 -195
  846. package/dist/automatic-study-analysis.js.map +0 -1
  847. package/dist/browser-control-client.d.ts +0 -18
  848. package/dist/browser-control-client.js +0 -176
  849. package/dist/browser-control-client.js.map +0 -1
  850. package/dist/browser-control-dispatcher.d.ts +0 -19
  851. package/dist/browser-control-dispatcher.js +0 -147
  852. package/dist/browser-control-dispatcher.js.map +0 -1
  853. package/dist/browser-control-protocol.d.ts +0 -472
  854. package/dist/browser-control-protocol.js +0 -185
  855. package/dist/browser-control-protocol.js.map +0 -1
  856. package/dist/browser-control-recording-transfer.d.ts +0 -4
  857. package/dist/browser-control-recording-transfer.js +0 -42
  858. package/dist/browser-control-recording-transfer.js.map +0 -1
  859. package/dist/browser-control-transport.d.ts +0 -27
  860. package/dist/browser-control-transport.js +0 -177
  861. package/dist/browser-control-transport.js.map +0 -1
  862. package/dist/browser-evidence-hygiene.js +0 -43
  863. package/dist/browser-evidence-hygiene.js.map +0 -1
  864. package/dist/chrome-cdp-probe.d.ts +0 -97
  865. package/dist/chrome-cdp-probe.js +0 -536
  866. package/dist/chrome-cdp-probe.js.map +0 -1
  867. package/dist/claude-agent-sdk.d.ts +0 -94
  868. package/dist/claude-agent-sdk.js +0 -367
  869. package/dist/claude-agent-sdk.js.map +0 -1
  870. package/dist/cli.js.map +0 -1
  871. package/dist/codex-app-server-ui.d.ts +0 -39
  872. package/dist/codex-app-server-ui.js +0 -357
  873. package/dist/codex-app-server-ui.js.map +0 -1
  874. package/dist/codex-app-server.d.ts +0 -144
  875. package/dist/codex-app-server.js +0 -754
  876. package/dist/codex-app-server.js.map +0 -1
  877. package/dist/command-failure.d.ts +0 -43
  878. package/dist/command-failure.js +0 -73
  879. package/dist/command-failure.js.map +0 -1
  880. package/dist/comms-agentmail.d.ts +0 -25
  881. package/dist/comms-agentmail.js +0 -418
  882. package/dist/comms-agentmail.js.map +0 -1
  883. package/dist/comms-catch-host.d.ts +0 -52
  884. package/dist/comms-catch-host.js +0 -178
  885. package/dist/comms-catch-host.js.map +0 -1
  886. package/dist/comms-connections.d.ts +0 -52
  887. package/dist/comms-connections.js +0 -123
  888. package/dist/comms-connections.js.map +0 -1
  889. package/dist/comms-email-catch.d.ts +0 -54
  890. package/dist/comms-email-catch.js +0 -212
  891. package/dist/comms-email-catch.js.map +0 -1
  892. package/dist/comms-evidence.d.ts +0 -27
  893. package/dist/comms-evidence.js +0 -31
  894. package/dist/comms-evidence.js.map +0 -1
  895. package/dist/comms-fake-inbox.d.ts +0 -45
  896. package/dist/comms-fake-inbox.js +0 -184
  897. package/dist/comms-fake-inbox.js.map +0 -1
  898. package/dist/comms-images.d.ts +0 -7
  899. package/dist/comms-images.js +0 -39
  900. package/dist/comms-images.js.map +0 -1
  901. package/dist/comms-inbox.d.ts +0 -66
  902. package/dist/comms-inbox.js +0 -389
  903. package/dist/comms-inbox.js.map +0 -1
  904. package/dist/comms-lease-store.d.ts +0 -91
  905. package/dist/comms-lease-store.js +0 -495
  906. package/dist/comms-lease-store.js.map +0 -1
  907. package/dist/comms-receiving-evidence.d.ts +0 -46
  908. package/dist/comms-receiving-evidence.js +0 -35
  909. package/dist/comms-receiving-evidence.js.map +0 -1
  910. package/dist/comms-receiving-inbox.d.ts +0 -16
  911. package/dist/comms-receiving-inbox.js +0 -410
  912. package/dist/comms-receiving-inbox.js.map +0 -1
  913. package/dist/comms-receiving-runtime.d.ts +0 -25
  914. package/dist/comms-receiving-runtime.js +0 -45
  915. package/dist/comms-receiving-runtime.js.map +0 -1
  916. package/dist/comms-receiving-types.d.ts +0 -98
  917. package/dist/comms-receiving-types.js +0 -2
  918. package/dist/comms-receiving-types.js.map +0 -1
  919. package/dist/comms-receiving.d.ts +0 -58
  920. package/dist/comms-receiving.js +0 -554
  921. package/dist/comms-receiving.js.map +0 -1
  922. package/dist/comms-sandbox-catch.d.ts +0 -229
  923. package/dist/comms-sandbox-catch.js +0 -737
  924. package/dist/comms-sandbox-catch.js.map +0 -1
  925. package/dist/comms-setup.d.ts +0 -40
  926. package/dist/comms-setup.js +0 -121
  927. package/dist/comms-setup.js.map +0 -1
  928. package/dist/comms-types.d.ts +0 -72
  929. package/dist/comms-types.js +0 -10
  930. package/dist/comms-types.js.map +0 -1
  931. package/dist/computer-use-actor.d.ts +0 -76
  932. package/dist/computer-use-actor.js +0 -68
  933. package/dist/computer-use-actor.js.map +0 -1
  934. package/dist/computer-use.d.ts +0 -429
  935. package/dist/computer-use.js +0 -1749
  936. package/dist/computer-use.js.map +0 -1
  937. package/dist/concurrency.js +0 -27
  938. package/dist/concurrency.js.map +0 -1
  939. package/dist/concurrent-shared-world-lab.d.ts +0 -186
  940. package/dist/concurrent-shared-world-lab.js +0 -2179
  941. package/dist/concurrent-shared-world-lab.js.map +0 -1
  942. package/dist/core/git-state.d.ts +0 -33
  943. package/dist/core/git-state.js +0 -277
  944. package/dist/core/git-state.js.map +0 -1
  945. package/dist/core/git-workspace.d.ts +0 -31
  946. package/dist/core/git-workspace.js +0 -447
  947. package/dist/core/git-workspace.js.map +0 -1
  948. package/dist/core/index.d.ts +0 -4
  949. package/dist/core/index.js +0 -3
  950. package/dist/core/index.js.map +0 -1
  951. package/dist/core/run-primitives.d.ts +0 -66
  952. package/dist/core/run-primitives.js +0 -120
  953. package/dist/core/run-primitives.js.map +0 -1
  954. package/dist/cua-actor-lab.d.ts +0 -855
  955. package/dist/cua-actor-lab.js +0 -3545
  956. package/dist/cua-actor-lab.js.map +0 -1
  957. package/dist/cua-admission-limit.d.ts +0 -12
  958. package/dist/cua-admission-limit.js +0 -20
  959. package/dist/cua-admission-limit.js.map +0 -1
  960. package/dist/cua-desktop-lane.d.ts +0 -35
  961. package/dist/cua-desktop-lane.js +0 -13
  962. package/dist/cua-desktop-lane.js.map +0 -1
  963. package/dist/cua-diagnostics.d.ts +0 -38
  964. package/dist/cua-diagnostics.js +0 -68
  965. package/dist/cua-diagnostics.js.map +0 -1
  966. package/dist/cua-executor-error.js +0 -48
  967. package/dist/cua-executor-error.js.map +0 -1
  968. package/dist/cua-provider-error.d.ts +0 -16
  969. package/dist/cua-provider-error.js +0 -35
  970. package/dist/cua-provider-error.js.map +0 -1
  971. package/dist/cua-speech.js +0 -2
  972. package/dist/cua-speech.js.map +0 -1
  973. package/dist/desktop-recorder.d.ts +0 -39
  974. package/dist/desktop-recorder.js +0 -226
  975. package/dist/desktop-recorder.js.map +0 -1
  976. package/dist/desktop-recording-artifact.d.ts +0 -5
  977. package/dist/desktop-recording-artifact.js +0 -54
  978. package/dist/desktop-recording-artifact.js.map +0 -1
  979. package/dist/desktop-recording-types.d.ts +0 -24
  980. package/dist/desktop-recording-types.js +0 -14
  981. package/dist/desktop-recording-types.js.map +0 -1
  982. package/dist/desktop-session.d.ts +0 -41
  983. package/dist/desktop-session.js +0 -47
  984. package/dist/desktop-session.js.map +0 -1
  985. package/dist/device-presets.d.ts +0 -67
  986. package/dist/device-presets.js +0 -55
  987. package/dist/device-presets.js.map +0 -1
  988. package/dist/doctor-lab.d.ts +0 -38
  989. package/dist/doctor-lab.js +0 -126
  990. package/dist/doctor-lab.js.map +0 -1
  991. package/dist/e2b-cua-desktop.d.ts +0 -3
  992. package/dist/e2b-cua-desktop.js +0 -708
  993. package/dist/e2b-cua-desktop.js.map +0 -1
  994. package/dist/e2b-cua-provisioning.d.ts +0 -314
  995. package/dist/e2b-cua-provisioning.js +0 -1219
  996. package/dist/e2b-cua-provisioning.js.map +0 -1
  997. package/dist/e2b-desktop-executor.d.ts +0 -101
  998. package/dist/e2b-desktop-executor.js +0 -297
  999. package/dist/e2b-desktop-executor.js.map +0 -1
  1000. package/dist/e2b-desktop-launch.d.ts +0 -243
  1001. package/dist/e2b-desktop-launch.js +0 -234
  1002. package/dist/e2b-desktop-launch.js.map +0 -1
  1003. package/dist/e2b-desktop-media.d.ts +0 -14
  1004. package/dist/e2b-desktop-media.js +0 -58
  1005. package/dist/e2b-desktop-media.js.map +0 -1
  1006. package/dist/e2b-desktop-recording.d.ts +0 -16
  1007. package/dist/e2b-desktop-recording.js +0 -162
  1008. package/dist/e2b-desktop-recording.js.map +0 -1
  1009. package/dist/e2b-desktop-resources.d.ts +0 -11
  1010. package/dist/e2b-desktop-resources.js +0 -33
  1011. package/dist/e2b-desktop-resources.js.map +0 -1
  1012. package/dist/e2b-desktop-screenshot-cleanup.d.ts +0 -15
  1013. package/dist/e2b-desktop-screenshot-cleanup.js +0 -67
  1014. package/dist/e2b-desktop-screenshot-cleanup.js.map +0 -1
  1015. package/dist/e2b-desktop-session.d.ts +0 -7
  1016. package/dist/e2b-desktop-session.js +0 -29
  1017. package/dist/e2b-desktop-session.js.map +0 -1
  1018. package/dist/e2b-detached.d.ts +0 -53
  1019. package/dist/e2b-detached.js +0 -130
  1020. package/dist/e2b-detached.js.map +0 -1
  1021. package/dist/e2b-terminal-lab.d.ts +0 -395
  1022. package/dist/e2b-terminal-lab.js +0 -2041
  1023. package/dist/e2b-terminal-lab.js.map +0 -1
  1024. package/dist/env-file.d.ts +0 -14
  1025. package/dist/env-file.js +0 -108
  1026. package/dist/env-file.js.map +0 -1
  1027. package/dist/export-bundle.d.ts +0 -7
  1028. package/dist/export-bundle.js +0 -441
  1029. package/dist/export-bundle.js.map +0 -1
  1030. package/dist/export.d.ts +0 -49
  1031. package/dist/export.js +0 -308
  1032. package/dist/export.js.map +0 -1
  1033. package/dist/feedback-proof.d.ts +0 -8
  1034. package/dist/feedback-proof.js +0 -44
  1035. package/dist/feedback-proof.js.map +0 -1
  1036. package/dist/feedback.d.ts +0 -76
  1037. package/dist/feedback.js +0 -496
  1038. package/dist/feedback.js.map +0 -1
  1039. package/dist/first-run-path.d.ts +0 -55
  1040. package/dist/first-run-path.js +0 -136
  1041. package/dist/first-run-path.js.map +0 -1
  1042. package/dist/frame-signature.d.ts +0 -24
  1043. package/dist/frame-signature.js +0 -128
  1044. package/dist/frame-signature.js.map +0 -1
  1045. package/dist/guest-bootstrap.d.ts +0 -55
  1046. package/dist/guest-bootstrap.js +0 -285
  1047. package/dist/guest-bootstrap.js.map +0 -1
  1048. package/dist/guest-browser-tools.d.ts +0 -8
  1049. package/dist/guest-browser-tools.js +0 -66
  1050. package/dist/guest-browser-tools.js.map +0 -1
  1051. package/dist/guest-chromium-text.d.ts +0 -27
  1052. package/dist/guest-chromium-text.js +0 -281
  1053. package/dist/guest-chromium-text.js.map +0 -1
  1054. package/dist/guest-desktop-executor.d.ts +0 -22
  1055. package/dist/guest-desktop-executor.js +0 -178
  1056. package/dist/guest-desktop-executor.js.map +0 -1
  1057. package/dist/guest-desktop-media.d.ts +0 -33
  1058. package/dist/guest-desktop-media.js +0 -281
  1059. package/dist/guest-desktop-media.js.map +0 -1
  1060. package/dist/guest-desktop-native.d.ts +0 -14
  1061. package/dist/guest-desktop-native.js +0 -131
  1062. package/dist/guest-desktop-native.js.map +0 -1
  1063. package/dist/guest-media-config.d.ts +0 -15
  1064. package/dist/guest-media-config.js +0 -8
  1065. package/dist/guest-media-config.js.map +0 -1
  1066. package/dist/guest-media-worker.js.map +0 -1
  1067. package/dist/guest-runtime-desktop.d.ts +0 -42
  1068. package/dist/guest-runtime-desktop.js +0 -314
  1069. package/dist/guest-runtime-desktop.js.map +0 -1
  1070. package/dist/guest-runtime-main.js.map +0 -1
  1071. package/dist/guest-runtime-revision.js.map +0 -1
  1072. package/dist/guest-runtime.d.ts +0 -31
  1073. package/dist/guest-runtime.js +0 -99
  1074. package/dist/guest-runtime.js.map +0 -1
  1075. package/dist/image-evidence.d.ts +0 -2
  1076. package/dist/image-evidence.js +0 -47
  1077. package/dist/image-evidence.js.map +0 -1
  1078. package/dist/index.js.map +0 -1
  1079. package/dist/init-templates.d.ts +0 -25
  1080. package/dist/init-templates.js +0 -542
  1081. package/dist/init-templates.js.map +0 -1
  1082. package/dist/init.d.ts +0 -38
  1083. package/dist/init.js +0 -532
  1084. package/dist/init.js.map +0 -1
  1085. package/dist/key-resolution.d.ts +0 -67
  1086. package/dist/key-resolution.js +0 -375
  1087. package/dist/key-resolution.js.map +0 -1
  1088. package/dist/lab-app-runner.d.ts +0 -78
  1089. package/dist/lab-app-runner.js +0 -403
  1090. package/dist/lab-app-runner.js.map +0 -1
  1091. package/dist/lab-config.d.ts +0 -968
  1092. package/dist/lab-config.js +0 -2714
  1093. package/dist/lab-config.js.map +0 -1
  1094. package/dist/lab-engine.d.ts +0 -97
  1095. package/dist/lab-engine.js +0 -285
  1096. package/dist/lab-engine.js.map +0 -1
  1097. package/dist/lab-preflight.d.ts +0 -70
  1098. package/dist/lab-preflight.js +0 -388
  1099. package/dist/lab-preflight.js.map +0 -1
  1100. package/dist/lab-summary.d.ts +0 -57
  1101. package/dist/lab-summary.js +0 -126
  1102. package/dist/lab-summary.js.map +0 -1
  1103. package/dist/labs.d.ts +0 -59
  1104. package/dist/labs.js +0 -385
  1105. package/dist/labs.js.map +0 -1
  1106. package/dist/listen.js +0 -84
  1107. package/dist/listen.js.map +0 -1
  1108. package/dist/local-agent-claude-session.d.ts +0 -45
  1109. package/dist/local-agent-claude-session.js +0 -203
  1110. package/dist/local-agent-claude-session.js.map +0 -1
  1111. package/dist/local-agent-cli.d.ts +0 -121
  1112. package/dist/local-agent-cli.js +0 -427
  1113. package/dist/local-agent-cli.js.map +0 -1
  1114. package/dist/local-captured-inbox.d.ts +0 -6
  1115. package/dist/local-captured-inbox.js +0 -65
  1116. package/dist/local-captured-inbox.js.map +0 -1
  1117. package/dist/local-firecracker-desktop.d.ts +0 -23
  1118. package/dist/local-firecracker-desktop.js +0 -191
  1119. package/dist/local-firecracker-desktop.js.map +0 -1
  1120. package/dist/local-firecracker-study.d.ts +0 -9
  1121. package/dist/local-firecracker-study.js +0 -135
  1122. package/dist/local-firecracker-study.js.map +0 -1
  1123. package/dist/local-runtime-config.d.ts +0 -6
  1124. package/dist/local-runtime-config.js +0 -60
  1125. package/dist/local-runtime-config.js.map +0 -1
  1126. package/dist/local-runtime-host.d.ts +0 -31
  1127. package/dist/local-runtime-host.js +0 -128
  1128. package/dist/local-runtime-host.js.map +0 -1
  1129. package/dist/local-runtime-release.d.ts +0 -7
  1130. package/dist/local-runtime-release.js +0 -33
  1131. package/dist/local-runtime-release.js.map +0 -1
  1132. package/dist/local-runtime-ssh.d.ts +0 -27
  1133. package/dist/local-runtime-ssh.js +0 -91
  1134. package/dist/local-runtime-ssh.js.map +0 -1
  1135. package/dist/local-runtime.d.ts +0 -25
  1136. package/dist/local-runtime.js +0 -133
  1137. package/dist/local-runtime.js.map +0 -1
  1138. package/dist/observer-data.d.ts +0 -114
  1139. package/dist/observer-data.js +0 -224
  1140. package/dist/observer-data.js.map +0 -1
  1141. package/dist/observer-library.js +0 -191
  1142. package/dist/observer-library.js.map +0 -1
  1143. package/dist/observer-serve.d.ts +0 -99
  1144. package/dist/observer-serve.js +0 -284
  1145. package/dist/observer-serve.js.map +0 -1
  1146. package/dist/observer-static.js +0 -357
  1147. package/dist/observer-static.js.map +0 -1
  1148. package/dist/observer.d.ts +0 -118
  1149. package/dist/observer.js +0 -947
  1150. package/dist/observer.js.map +0 -1
  1151. package/dist/openai-responses-cu.d.ts +0 -158
  1152. package/dist/openai-responses-cu.js +0 -714
  1153. package/dist/openai-responses-cu.js.map +0 -1
  1154. package/dist/orientation.d.ts +0 -29
  1155. package/dist/orientation.js +0 -95
  1156. package/dist/orientation.js.map +0 -1
  1157. package/dist/oss-lab.d.ts +0 -55
  1158. package/dist/oss-lab.js +0 -344
  1159. package/dist/oss-lab.js.map +0 -1
  1160. package/dist/oss-meta-lab-scoring.d.ts +0 -15
  1161. package/dist/oss-meta-lab-scoring.js +0 -145
  1162. package/dist/oss-meta-lab-scoring.js.map +0 -1
  1163. package/dist/oss-meta-lab.d.ts +0 -287
  1164. package/dist/oss-meta-lab.js +0 -4551
  1165. package/dist/oss-meta-lab.js.map +0 -1
  1166. package/dist/oss-remote-telemetry.d.ts +0 -77
  1167. package/dist/oss-remote-telemetry.js +0 -403
  1168. package/dist/oss-remote-telemetry.js.map +0 -1
  1169. package/dist/output-token-limit.js +0 -5
  1170. package/dist/output-token-limit.js.map +0 -1
  1171. package/dist/participant-assignment.d.ts +0 -12
  1172. package/dist/participant-assignment.js +0 -15
  1173. package/dist/participant-assignment.js.map +0 -1
  1174. package/dist/persona-resolve.d.ts +0 -44
  1175. package/dist/persona-resolve.js +0 -109
  1176. package/dist/persona-resolve.js.map +0 -1
  1177. package/dist/persona.d.ts +0 -35
  1178. package/dist/persona.js +0 -141
  1179. package/dist/persona.js.map +0 -1
  1180. package/dist/pi-agent-core.d.ts +0 -77
  1181. package/dist/pi-agent-core.js +0 -207
  1182. package/dist/pi-agent-core.js.map +0 -1
  1183. package/dist/pricing.d.ts +0 -145
  1184. package/dist/pricing.js +0 -277
  1185. package/dist/pricing.js.map +0 -1
  1186. package/dist/program.d.ts +0 -96
  1187. package/dist/program.js +0 -4029
  1188. package/dist/program.js.map +0 -1
  1189. package/dist/reasoning-effort.js +0 -26
  1190. package/dist/reasoning-effort.js.map +0 -1
  1191. package/dist/reclaim.d.ts +0 -31
  1192. package/dist/reclaim.js +0 -90
  1193. package/dist/reclaim.js.map +0 -1
  1194. package/dist/redaction.d.ts +0 -90
  1195. package/dist/redaction.js +0 -294
  1196. package/dist/redaction.js.map +0 -1
  1197. package/dist/restricted-codex-analysis.d.ts +0 -15
  1198. package/dist/restricted-codex-analysis.js +0 -13
  1199. package/dist/restricted-codex-analysis.js.map +0 -1
  1200. package/dist/restricted-codex-participant-policy.d.ts +0 -44
  1201. package/dist/restricted-codex-participant-policy.js +0 -43
  1202. package/dist/restricted-codex-participant-policy.js.map +0 -1
  1203. package/dist/restricted-codex-participant-run.d.ts +0 -20
  1204. package/dist/restricted-codex-participant-run.js +0 -79
  1205. package/dist/restricted-codex-participant-run.js.map +0 -1
  1206. package/dist/restricted-codex-participant.d.ts +0 -20
  1207. package/dist/restricted-codex-participant.js +0 -250
  1208. package/dist/restricted-codex-participant.js.map +0 -1
  1209. package/dist/restricted-codex-policy.d.ts +0 -64
  1210. package/dist/restricted-codex-policy.js +0 -176
  1211. package/dist/restricted-codex-policy.js.map +0 -1
  1212. package/dist/restricted-codex-session.d.ts +0 -44
  1213. package/dist/restricted-codex-session.js +0 -657
  1214. package/dist/restricted-codex-session.js.map +0 -1
  1215. package/dist/restricted-codex-transport.d.ts +0 -69
  1216. package/dist/restricted-codex-transport.js +0 -296
  1217. package/dist/restricted-codex-transport.js.map +0 -1
  1218. package/dist/run-detail.d.ts +0 -61
  1219. package/dist/run-detail.js +0 -137
  1220. package/dist/run-detail.js.map +0 -1
  1221. package/dist/run-index.d.ts +0 -71
  1222. package/dist/run-index.js +0 -206
  1223. package/dist/run-index.js.map +0 -1
  1224. package/dist/run-narration-secrets.js +0 -68
  1225. package/dist/run-narration-secrets.js.map +0 -1
  1226. package/dist/run-paths.d.ts +0 -56
  1227. package/dist/run-paths.js +0 -355
  1228. package/dist/run-paths.js.map +0 -1
  1229. package/dist/run-projection.d.ts +0 -186
  1230. package/dist/run-projection.js +0 -350
  1231. package/dist/run-projection.js.map +0 -1
  1232. package/dist/run-status.d.ts +0 -139
  1233. package/dist/run-status.js +0 -218
  1234. package/dist/run-status.js.map +0 -1
  1235. package/dist/run.d.ts +0 -1255
  1236. package/dist/run.js +0 -5947
  1237. package/dist/run.js.map +0 -1
  1238. package/dist/sandbox-receipts.d.ts +0 -19
  1239. package/dist/sandbox-receipts.js +0 -51
  1240. package/dist/sandbox-receipts.js.map +0 -1
  1241. package/dist/screenshot-image.d.ts +0 -11
  1242. package/dist/screenshot-image.js +0 -26
  1243. package/dist/screenshot-image.js.map +0 -1
  1244. package/dist/scripted-browser-actor.d.ts +0 -297
  1245. package/dist/scripted-browser-actor.js +0 -1399
  1246. package/dist/scripted-browser-actor.js.map +0 -1
  1247. package/dist/scripted-browser-lab.d.ts +0 -121
  1248. package/dist/scripted-browser-lab.js +0 -852
  1249. package/dist/scripted-browser-lab.js.map +0 -1
  1250. package/dist/secret-prompt.js +0 -36
  1251. package/dist/secret-prompt.js.map +0 -1
  1252. package/dist/selected-output-paths.d.ts +0 -52
  1253. package/dist/selected-output-paths.js +0 -366
  1254. package/dist/selected-output-paths.js.map +0 -1
  1255. package/dist/serve-exposure.d.ts +0 -62
  1256. package/dist/serve-exposure.js +0 -129
  1257. package/dist/serve-exposure.js.map +0 -1
  1258. package/dist/serve-http.js +0 -45
  1259. package/dist/serve-http.js.map +0 -1
  1260. package/dist/serve-tunnel.js +0 -113
  1261. package/dist/serve-tunnel.js.map +0 -1
  1262. package/dist/shared-world-lab.d.ts +0 -269
  1263. package/dist/shared-world-lab.js +0 -1422
  1264. package/dist/shared-world-lab.js.map +0 -1
  1265. package/dist/source-archive.d.ts +0 -82
  1266. package/dist/source-archive.js +0 -408
  1267. package/dist/source-archive.js.map +0 -1
  1268. package/dist/stats.d.ts +0 -82
  1269. package/dist/stats.js +0 -219
  1270. package/dist/stats.js.map +0 -1
  1271. package/dist/stop-conditions.d.ts +0 -39
  1272. package/dist/stop-conditions.js +0 -66
  1273. package/dist/stop-conditions.js.map +0 -1
  1274. package/dist/study-analysis-codex-config.d.ts +0 -11
  1275. package/dist/study-analysis-codex-config.js +0 -34
  1276. package/dist/study-analysis-codex-config.js.map +0 -1
  1277. package/dist/study-analysis-engine.d.ts +0 -47
  1278. package/dist/study-analysis-engine.js +0 -327
  1279. package/dist/study-analysis-engine.js.map +0 -1
  1280. package/dist/study-analysis-evidence.d.ts +0 -27
  1281. package/dist/study-analysis-evidence.js +0 -660
  1282. package/dist/study-analysis-evidence.js.map +0 -1
  1283. package/dist/study-analysis-job.d.ts +0 -97
  1284. package/dist/study-analysis-job.js +0 -214
  1285. package/dist/study-analysis-job.js.map +0 -1
  1286. package/dist/study-analysis-provider.d.ts +0 -40
  1287. package/dist/study-analysis-provider.js +0 -170
  1288. package/dist/study-analysis-provider.js.map +0 -1
  1289. package/dist/study-analysis-service.d.ts +0 -59
  1290. package/dist/study-analysis-service.js +0 -257
  1291. package/dist/study-analysis-service.js.map +0 -1
  1292. package/dist/study-analysis-sharing.d.ts +0 -11
  1293. package/dist/study-analysis-sharing.js +0 -35
  1294. package/dist/study-analysis-sharing.js.map +0 -1
  1295. package/dist/study-analysis-store.d.ts +0 -47
  1296. package/dist/study-analysis-store.js +0 -493
  1297. package/dist/study-analysis-store.js.map +0 -1
  1298. package/dist/study-analysis-validation.d.ts +0 -618
  1299. package/dist/study-analysis-validation.js +0 -384
  1300. package/dist/study-analysis-validation.js.map +0 -1
  1301. package/dist/study-analysis.d.ts +0 -206
  1302. package/dist/study-analysis.js +0 -4
  1303. package/dist/study-analysis.js.map +0 -1
  1304. package/dist/study-costs.js +0 -114
  1305. package/dist/study-costs.js.map +0 -1
  1306. package/dist/subject-runtime.d.ts +0 -23
  1307. package/dist/subject-runtime.js +0 -70
  1308. package/dist/subject-runtime.js.map +0 -1
  1309. package/dist/tasks.d.ts +0 -90
  1310. package/dist/tasks.js +0 -144
  1311. package/dist/tasks.js.map +0 -1
  1312. package/dist/telemetry.js +0 -324
  1313. package/dist/telemetry.js.map +0 -1
  1314. package/dist/terminal-agent-actor.d.ts +0 -41
  1315. package/dist/terminal-agent-actor.js +0 -25
  1316. package/dist/terminal-agent-actor.js.map +0 -1
  1317. package/dist/terminal-encoding.js +0 -80
  1318. package/dist/terminal-encoding.js.map +0 -1
  1319. package/dist/terminal-node-bootstrap.d.ts +0 -4
  1320. package/dist/terminal-node-bootstrap.js +0 -58
  1321. package/dist/terminal-node-bootstrap.js.map +0 -1
  1322. package/dist/terminal-participant-activity.d.ts +0 -6
  1323. package/dist/terminal-participant-activity.js +0 -34
  1324. package/dist/terminal-participant-activity.js.map +0 -1
  1325. package/dist/terminal-runtime-auth.d.ts +0 -13
  1326. package/dist/terminal-runtime-auth.js +0 -24
  1327. package/dist/terminal-runtime-auth.js.map +0 -1
  1328. package/dist/terminal-runtime.d.ts +0 -16
  1329. package/dist/terminal-runtime.js +0 -42
  1330. package/dist/terminal-runtime.js.map +0 -1
  1331. package/dist/terminal-token-usage.d.ts +0 -15
  1332. package/dist/terminal-token-usage.js +0 -94
  1333. package/dist/terminal-token-usage.js.map +0 -1
  1334. package/dist/tui-actions.d.ts +0 -39
  1335. package/dist/tui-actions.js +0 -178
  1336. package/dist/tui-actions.js.map +0 -1
  1337. package/dist/tui-contract.d.ts +0 -141
  1338. package/dist/tui-contract.js +0 -54
  1339. package/dist/tui-contract.js.map +0 -1
  1340. package/dist/tui-launch.js +0 -167
  1341. package/dist/tui-launch.js.map +0 -1
  1342. package/dist/tui-project.d.ts +0 -9
  1343. package/dist/tui-project.js +0 -18
  1344. package/dist/tui-project.js.map +0 -1
  1345. package/docs/architecture/examples/state-driven-local-app/README.md +0 -80
  1346. package/docs/architecture/examples/state-driven-local-app/app.mjs +0 -48
  1347. package/docs/architecture/examples/state-driven-local-app/runner.mjs +0 -105
  1348. package/docs/architecture/local-codex-tui-actor.md +0 -213
  1349. package/docs/architecture/oss-lab-poc.md +0 -250
  1350. package/docs/architecture/runtime-broker-core.md +0 -30
  1351. package/docs/release/0.100.0-local-setup.md +0 -31
  1352. package/docs/release/0.100.1-participant-continuity.md +0 -20
  1353. package/docs/release/0.101.0-codex-ui-tools.md +0 -28
  1354. package/docs/release/0.102.0-participant-media.md +0 -43
  1355. package/docs/release/0.103.0-desktop-recording.md +0 -29
  1356. package/docs/release/0.103.1-analysis-capture-allocation.md +0 -18
  1357. package/docs/release/0.103.2-analysis-ending-context.md +0 -21
  1358. package/docs/release/0.104.0-local-captured-inboxes.md +0 -29
  1359. package/docs/release/0.104.1-recording-startup.md +0 -24
  1360. package/docs/release/0.104.2-recording-timestamps.md +0 -32
  1361. package/docs/release/0.104.3-local-smtp-catch.md +0 -15
  1362. package/docs/release/0.20.0-external-public-shared-world.md +0 -43
  1363. package/docs/release/0.84.0-redacted-evidence.md +0 -42
  1364. package/docs/release/0.84.1-portable-feedback.md +0 -20
  1365. package/docs/release/0.85.0-observer-review.md +0 -56
  1366. package/docs/release/0.85.1-observer-continuity.md +0 -20
  1367. package/docs/release/0.86.0-participant-evidence.md +0 -50
  1368. package/docs/release/0.86.1-task-preflight-saved-recordings.md +0 -40
  1369. package/docs/release/0.87.0-participant-endings-and-phone-review.md +0 -64
  1370. package/docs/release/0.88.0-study-diagnostics.md +0 -43
  1371. package/docs/release/0.88.1-completion-evidence-and-local-app.md +0 -79
  1372. package/docs/release/0.88.2-sequential-study-budgets.md +0 -57
  1373. package/docs/release/0.89.0-study-findings.md +0 -79
  1374. package/docs/release/0.89.1-analysis-finished-notice.md +0 -24
  1375. package/docs/release/0.90.0-automatic-analysis.md +0 -21
  1376. package/docs/release/0.91.0-analysis-quality-and-defaults.md +0 -33
  1377. package/docs/release/0.91.1-study-review-polish.md +0 -28
  1378. package/docs/release/0.92.0-grid-playback.md +0 -22
  1379. package/docs/release/0.93.0-global-playback.md +0 -26
  1380. package/docs/release/0.93.1-observer-review-controls.md +0 -24
  1381. package/docs/release/0.94.0-reliability.md +0 -48
  1382. package/docs/release/0.95.0-connections-setup.md +0 -38
  1383. package/docs/release/0.96.0-real-email-receiving.md +0 -47
  1384. package/docs/release/0.96.1-browser-navigation.md +0 -22
  1385. package/docs/release/0.97.0-codex-account-analysis.md +0 -45
  1386. package/docs/release/0.98.0-local-browser-studies.md +0 -31
  1387. package/docs/release/0.99.0-local-browser-mac.md +0 -34
  1388. package/docs/release/0.99.1-action-recovery.md +0 -19
  1389. /package/dist/{agent-session.d.ts → actors/agent-session.d.ts} +0 -0
  1390. /package/dist/{cua-executor-error.d.ts → actors/computer-use/executor-error.d.ts} +0 -0
  1391. /package/dist/{cua-speech.d.ts → actors/computer-use/speech.d.ts} +0 -0
  1392. /package/dist/{actor-goal-source.d.ts → actors/goal-source.d.ts} +0 -0
  1393. /package/dist/{output-token-limit.d.ts → actors/output-token-limit.d.ts} +0 -0
  1394. /package/dist/{reasoning-effort.d.ts → actors/reasoning-effort.d.ts} +0 -0
  1395. /package/dist/{secret-prompt.d.ts → cli/secret-prompt.d.ts} +0 -0
  1396. /package/dist/{telemetry.d.ts → cli/telemetry.d.ts} +0 -0
  1397. /package/dist/{browser-evidence-hygiene.d.ts → evidence/browser-hygiene.d.ts} +0 -0
  1398. /package/dist/{serve-http.d.ts → observer/http.d.ts} +0 -0
  1399. /package/dist/{observer-library.d.ts → observer/library.d.ts} +0 -0
  1400. /package/dist/{listen.d.ts → observer/listen.d.ts} +0 -0
  1401. /package/dist/{observer-static.d.ts → observer/static.d.ts} +0 -0
  1402. /package/dist/{serve-tunnel.d.ts → observer/tunnel.d.ts} +0 -0
  1403. /package/dist/{terminal-encoding.d.ts → routes/terminal/encoding.d.ts} +0 -0
  1404. /package/dist/{concurrency.d.ts → run/concurrency.d.ts} +0 -0
  1405. /package/dist/{study-costs.d.ts → run/costs.d.ts} +0 -0
  1406. /package/dist/{run-narration-secrets.d.ts → run/transient-comms-secrets.d.ts} +0 -0
  1407. /package/dist/{tui-launch.d.ts → tui/launch.d.ts} +0 -0
@@ -0,0 +1,813 @@
1
+ import { type LabAnalysis } from "../analysis/automatic-config.js";
2
+ import type { LabTask } from "./tasks.js";
3
+ import type { DwellWindow, StopWhen } from "../actors/stop-conditions.js";
4
+ import { type ReasoningEffort } from "../actors/reasoning-effort.js";
5
+ export declare const LAB_CONFIG_SCHEMA = "humanish.lab.v2";
6
+ export declare const ID_PATTERN: RegExp;
7
+ /**
8
+ * Where the run acts: the host repo, a fresh clone, a running app a browser actor drives
9
+ * (`app-url`), an already-running LOCAL dev server driven IN-PROCESS via a custom
10
+ * CuaExecutor with NO clone and NO E2B desktop (`local-app`), or the operator's own local
11
+ * working tree packed and provisioned in-sandbox in place of a clone (`local-tree`).
12
+ * `local-app` routes to the cua backend and is library-assisted: a caller supplies
13
+ * `RunLabOptions.inProcess` + `createProvider` (no built-in driver exists yet), and the engine
14
+ * fails closed (HUMANISH_CUA_LAB_LOCAL_APP_NO_EXECUTOR) when run without them: a structured
15
+ * error, never a desktop attempt. See docs/architecture/state-driven-executor.md.
16
+ */
17
+ type LabSubjectSource = "this-repo" | "clone" | "app-url" | "local-app" | "terminal-product" | "desktop-cli" | "local-tree";
18
+ /**
19
+ * How a subject's WORLD relates across actor lanes. `per-lane-worlds` (the default; absent ==
20
+ * this) is the only fan-out topology the computer-use route ships — N lanes, N independent
21
+ * worlds, isolation + per-lane attribution. `shared-world` (#164) is the DECLARED override: ONE
22
+ * mutable service plane that N role SEATS use at the same time, so their actions interact through
23
+ * shared state. Consumed ONLY on the shared-world routes (a provisioned clone plane, or an
24
+ * external-public app-url plane) with a computer-use actor; inert/warned everywhere else
25
+ * (invariant 6).
26
+ */
27
+ type LabSubjectTopology = "per-lane-worlds" | "shared-world";
28
+ export interface LabSubjectClone {
29
+ /** git clone depth; 1 (shallow) by default. Consumed on the computer-use clone route. */
30
+ depth?: number;
31
+ /** how many independent clone lanes to fan out (one sandbox/desktop each). */
32
+ fanout?: number;
33
+ /** keep the disposable clone for debugging instead of discarding. */
34
+ keep?: boolean;
35
+ }
36
+ /**
37
+ * `local-tree`: how the operator's own working tree is packed and provisioned in-sandbox in
38
+ * place of a clone. Internal shape (not re-exported from src/index.ts, same as LabSubjectClone).
39
+ */
40
+ export interface LabSubjectLocalTree {
41
+ /** extra archive excludes (path prefixes/basenames) added on top of the always-on denylist. */
42
+ exclude?: string[];
43
+ /** keep the disposable sandbox on failure for debugging (mirrors subject.clone.keep). */
44
+ keep?: boolean;
45
+ /** upload size cap override in bytes; default 256 MiB. */
46
+ maxArchiveBytes?: number;
47
+ }
48
+ /** How a cloned subject is installed/built/started inside the sandbox (computer-use route). */
49
+ export interface LabSubjectServe {
50
+ /** Optional bounded install step (e.g. "pnpm install --frozen-lockfile"). */
51
+ install?: string;
52
+ /** Optional bounded build step. */
53
+ build?: string;
54
+ /** Required long-lived start command — launched detached; the sandbox lifecycle owns it. */
55
+ start: string;
56
+ /** Loopback entry URL: the readiness-probe target and the URL the actor drives. The lab
57
+ * serves the clone INSIDE the sandbox, so this is always loopback (not subject to
58
+ * allowPublicTargets — that governs app-url subjects, i.e. external deployments). */
59
+ url: string;
60
+ /** Budget for the served app to answer the readiness probe. Default 180000. */
61
+ readyTimeoutMs?: number;
62
+ /** Override the install-step timeout (default 600000). Monorepos can exceed it. */
63
+ installTimeoutMs?: number;
64
+ /** Override the build-step timeout (default 600000). Large builds can exceed it. */
65
+ buildTimeoutMs?: number;
66
+ }
67
+ /** When a state step runs, relative to the serve sequence (clone subjects, computer-use route). */
68
+ export type LabStateStepWhen = "before-build" | "before-start" | "after-ready";
69
+ interface LabSubjectStateStep {
70
+ /**
71
+ * [a-z0-9-] step label (must start alphanumeric), <=40 chars, unique across steps; becomes
72
+ * the detached-step name `subject-state-<name>` (interpolates into in-sandbox file paths —
73
+ * the shape is load-bearing, validated at parse AND re-enforced in the engine).
74
+ */
75
+ name: string;
76
+ /**
77
+ * Author-trusted shell command (same trust class as serve.install/build/start — the
78
+ * "serve commands are author-trusted" corollary). Runs detached in the subject directory
79
+ * with an atomic status file, kill-on-timeout, and a capped log tail. Persisted in
80
+ * evidence as a sha256-16 DIGEST only, never as text.
81
+ */
82
+ command: string;
83
+ /**
84
+ * Phase: before-build (after install — for builds that read the DB, e.g. SSG),
85
+ * before-start (after build, before the server launches — migrations, SQL/file fixtures,
86
+ * an in-sandbox `service postgresql start`), after-ready (after the readiness probe —
87
+ * fixtures loaded through the RUNNING app's API). Default: before-start.
88
+ */
89
+ when?: LabStateStepWhen;
90
+ /** Wall-clock budget per step. Default 300000. */
91
+ timeoutMs?: number;
92
+ }
93
+ /**
94
+ * A shared-world state CHECKPOINT: an author-trusted, READ-ONLY, AGGREGATE/DIGEST probe command
95
+ * (counts, max-timestamps, hashes) run at baseline and after each role's turn. Reuses the
96
+ * seed-step validation shape (name [a-z0-9-] ≤40, unique; command required). Persisted DIGEST-ONLY
97
+ * (only sha256-16(scrub+redact(stdout)) ever lands — never the raw value), same lockdown as the
98
+ * seed surface. Consumed ONLY on the shared-world route (#164); inert/warned elsewhere.
99
+ */
100
+ export interface LabSubjectStateCheckpoint {
101
+ /**
102
+ * [a-z0-9-] probe label (must start alphanumeric), <=40 chars, unique across checkpoints;
103
+ * names the detached step (`checkpoint-<snapshot>-<name>`) — load-bearing shape, validated at
104
+ * parse AND re-enforced in the engine.
105
+ */
106
+ name: string;
107
+ /**
108
+ * Author-trusted READ-ONLY shell command (same trust class as serve/seed — the "serve commands
109
+ * are author-trusted" corollary). Its stdout is scrubbed + pattern-redacted, then digested
110
+ * (sha256-16); the raw value never persists.
111
+ */
112
+ command: string;
113
+ /**
114
+ * Optional extra literal values to scrub from this probe's stdout before digesting (author-known
115
+ * values that may appear in the probe output, beyond the harness-provisioned env values which are
116
+ * always scrubbed). Names/values are NEVER persisted — only the digest is.
117
+ */
118
+ redact?: string[];
119
+ }
120
+ /** The subject's STATE story (clone subjects): seeded in-sandbox, or declared external. */
121
+ export interface LabSubjectState {
122
+ /** Ordered seed/migration/fixture steps. Order within a phase is declaration order. */
123
+ seed?: LabSubjectStateStep[];
124
+ /**
125
+ * Env var NAMES whose values point at state the lab does NOT control (e.g. a shared dev
126
+ * DB). Must be a subset of subject.env (so the declaration is mechanically backed by a
127
+ * provisioned name, not a vibe). Flips state provenance to "unpinned".
128
+ */
129
+ external?: string[];
130
+ /**
131
+ * Shared-world state checkpoints (#164): read-only digest probes run at baseline + after each
132
+ * role's turn to produce the harness-clocked interaction timeline. Consumed ONLY on the
133
+ * shared-world route; inert/warned elsewhere (invariant 6). Shape-validated everywhere.
134
+ */
135
+ checkpoint?: LabSubjectStateCheckpoint[];
136
+ }
137
+ /**
138
+ * `terminal-product`: the product-under-study a terminal agent must discover and use from PUBLIC
139
+ * SURFACES ONLY (the terminal-product route's subject). The subject is NOT provisioned/cloned —
140
+ * the agent drives the declared public surfaces, so provenance is UNPINNED (invariant 5). The
141
+ * concrete product name + surfaces are operator data; committed fixtures use a NEUTRAL mock name.
142
+ */
143
+ export interface LabSubjectProduct {
144
+ /** Public-safe product label (shape-validated like a lab id; interpolates into evidence). */
145
+ name: string;
146
+ /**
147
+ * How the product gets onto the machine, run UNKEYED before the participant starts, in the
148
+ * lane's working directory. Consumed on BOTH product routes: `desktop-cli` (a person at a
149
+ * desktop) and `terminal-product` (an agent in a shell).
150
+ *
151
+ * Absent means the participant installs it themselves from the public surfaces, which is a
152
+ * different study — one about the install, not about the tool. Present means the study starts
153
+ * where you want it to start: asking a participant what studies a project contains, in an empty
154
+ * directory, measures the lab rather than the product.
155
+ * Both routes prepare Node/npm when install is absent; product installation remains the
156
+ * participant's task. A missing template runtime must not become a product finding.
157
+ */
158
+ install?: string;
159
+ /**
160
+ * `desktop-cli` ONLY: the directory the participant's terminal opens in. Absent means the home
161
+ * directory. (The terminal-product lane has its own fixed study workdir.)
162
+ *
163
+ * This exists because the first live study failed on it: the participant was asked what studies
164
+ * the project contained, landed in an empty home directory, correctly reported that there was no
165
+ * project, and stopped. The finding was about the lab, not the product. A study of a
166
+ * project-scoped tool has to put the participant IN a project, the same way an app study opens
167
+ * the app rather than a blank tab.
168
+ */
169
+ workdir?: string;
170
+ /**
171
+ * The product's PUBLIC surfaces — the only world the agent sees. Each must be an http(s) URL
172
+ * (e.g. a docs page, an llms.txt, a skill manifest). Validated at parse; recorded in evidence.
173
+ */
174
+ publicSurfaces: string[];
175
+ /**
176
+ * `terminal-product` ONLY: a local file uploaded into the sandbox before `install` runs, and
177
+ * exposed to it as `$HUMANISH_PRODUCT_UPLOAD`. A project-relative path; `..` and absolute paths
178
+ * are refused, because this reads a file off the operator's disk and puts it on a machine an
179
+ * autonomous agent is about to drive.
180
+ *
181
+ * It exists so a study can test a build that is NOT PUBLISHED YET. Installing `@latest` measures
182
+ * the last release, which is exactly the wrong artifact for a pre-release gate — the point is to
183
+ * meet the candidate before anyone else does. Any adopter shipping a CLI wants the same thing.
184
+ */
185
+ upload?: string;
186
+ }
187
+ export interface LabSubject {
188
+ source: LabSubjectSource;
189
+ /**
190
+ * WORLD topology across actor lanes. Absent == `per-lane-worlds` (the isolation default; every
191
+ * existing lab is byte-stable). `shared-world` is the declared override (#164): one mutable
192
+ * service plane, N role seats at once. Consumed ONLY on the shared-world routes (a provisioned
193
+ * clone or an external-public app-url plane, a computer-use actor, and a roster of ≥2 lanes);
194
+ * inert/warned elsewhere.
195
+ */
196
+ topology?: LabSubjectTopology;
197
+ /**
198
+ * CONCURRENT shared-world route ONLY (#164 phase 2): the author's REQUIRED attestation that the
199
+ * subject behind the internet-reachable `getHost` URL is SYNTHETIC seeded data. The concurrent
200
+ * route exposes the subject on a tokenless public URL for the run's duration, so real/external
201
+ * data must never sit behind it. This is author-trust + a provenance gate (verify also requires
202
+ * `subject.state.provenance == "seeded"`), NOT a no-real-data guarantee. Required when
203
+ * `topology: shared-world` + `execution.concurrency > 1`; inert/warned elsewhere.
204
+ */
205
+ exposure?: "synthetic";
206
+ /**
207
+ * EXTERNAL-PUBLIC shared-world route ONLY (#164 phase 2): the author's REQUIRED ownership
208
+ * attestation when a real PUBLIC deployment (`source: app-url` + `topology: shared-world` +
209
+ * `concurrency > 1` + `policies.allowPublicTargets: true`) is used directly as the shared plane.
210
+ * The harness neither provisions nor exposes this target (no getHost, no clone, no seed), so it
211
+ * cannot attest the data is synthetic; instead the operator MUST attest they own/operate it.
212
+ * `owner` is a public-safe operator/repo label; `authorized` must be true. This is author-trust —
213
+ * the harness cannot verify ownership — surfaced honestly in the evidence class. Required on the
214
+ * external-public branch. On a non-`app-url` subject it is REJECTED (parse error); on any OTHER
215
+ * `app-url` config that does not route to external-public shared-world it is IGNORED-WITH-A-WARNING
216
+ * (forwardDeclaredWarnings), never silently consumed — it is meaningless without that plane.
217
+ */
218
+ publicTarget?: {
219
+ owner: string;
220
+ authorized: boolean;
221
+ };
222
+ /** `clone`: one or more owner/repo slugs (public or authorized-private). */
223
+ repos?: string[];
224
+ clone?: LabSubjectClone;
225
+ /**
226
+ * `app-url`: a loopback http(s) URL the computer-use actor drives (127.0.0.1/localhost
227
+ * only — driving arbitrary public sites is not allowed). The URL must be reachable from
228
+ * INSIDE the desktop sandbox; library callers provision it via the prepareDesktop hook.
229
+ * For a config-only path use `clone` + `serve` — the lab serves the app itself.
230
+ *
231
+ * `local-app`: the loopback http(s) URL of an already-running LOCAL dev server the caller's
232
+ * custom CuaExecutor drives in-process (no sandbox, no public-target option — always
233
+ * loopback). Passed to `buildExecutor` so the bridge knows where the app lives.
234
+ */
235
+ appUrl?: string;
236
+ /** `clone` (computer-use route): how the cloned app is served in-sandbox. */
237
+ serve?: LabSubjectServe;
238
+ /**
239
+ * Env var NAMES the subject app needs, provisioned into the sandbox from the caller's
240
+ * environment (--env-file). Names are recorded in evidence; values never are. Consumed
241
+ * on the computer-use clone route.
242
+ */
243
+ env?: string[];
244
+ /**
245
+ * LITERAL, NON-SECRET env values committed alongside the lab — the configuration every real app
246
+ * needs before it will boot: a public base URL, a transport selector, a feature flag. None of that
247
+ * is secret, and routing it through `subject.env` would force an adopter to carry a private env
248
+ * file just to reproduce a public study, which is the opposite of a reproducible lab.
249
+ *
250
+ * These values ARE recorded in evidence, because they are part of how the subject was configured,
251
+ * so a value that looks like a secret or a local path is refused at parse rather than committed to
252
+ * a public repo. Anything genuinely secret belongs in `subject.env`.
253
+ */
254
+ envValues?: Record<string, string>;
255
+ /**
256
+ * `clone` (computer-use route): the subject's state story — seed/migration/fixture steps
257
+ * executed in-sandbox around the serve sequence, and/or declared external state. Recorded
258
+ * in the run bundle as structured provenance (invariant 5): seeded with command digests,
259
+ * UNPINNED for external state, declared-not-run for dry-run/failed provisioning.
260
+ */
261
+ state?: LabSubjectState;
262
+ /**
263
+ * `terminal-product` (terminal route): the product the terminal agent discovers + uses from
264
+ * PUBLIC surfaces only. Consumed on the terminal route; rejected on every other source.
265
+ */
266
+ product?: LabSubjectProduct;
267
+ /**
268
+ * `local-tree` (computer-use route): local-tree packs the lab resolution cwd (the project
269
+ * directory humanish runs from) instead of cloning a repo. `exclude` adds extra archive excludes
270
+ * on top of the always-on denylist; `keep` preserves the sandbox on failure for debugging;
271
+ * `maxArchiveBytes` caps the upload. Consumed on the local-tree route; rejected on every other
272
+ * source.
273
+ */
274
+ localTree?: LabSubjectLocalTree;
275
+ }
276
+ export interface LabParticipantFocus {
277
+ id?: string;
278
+ label?: string;
279
+ /** Per-lane steer appended to the actor's mission. Consumed on the app-url route. */
280
+ instruction?: string;
281
+ }
282
+ /**
283
+ * One differentiated fan-out lane on the computer-use E2B route (per-lane worlds). Each lane
284
+ * becomes an independent E2B desktop sandbox with its own persona/device/starting-steer. All
285
+ * fields optional: an omitted persona/device/instruction inherits the actor-level default. `id`
286
+ * defaults to `lane-01`..`lane-NN` and must be a public-safe token (it names per-lane evidence
287
+ * paths). Consumed ONLY on the computer-use E2B route (inert/warned elsewhere).
288
+ */
289
+ export interface LabParticipantEntry {
290
+ /** Public-safe lane label (interpolates into per-lane evidence paths). Default lane-NN. */
291
+ id?: string;
292
+ /**
293
+ * App-defined actor type label for grouping simulated users ("operator", "viewer",
294
+ * "maintainer", etc.). This is NOT the execution actor dispatch key (`actors[0].type`);
295
+ * it is adapter-owned taxonomy for roster/readback.
296
+ */
297
+ actorType?: string;
298
+ /** App-defined surface label for grouping lanes that start from different product areas. */
299
+ surface?: string;
300
+ /** App-defined correlation id tying lanes to one shared case/account/work item. */
301
+ caseGroup?: string;
302
+ /** Persona id/label threaded into this lane's actor prompt. Default: actors[0].persona. */
303
+ persona?: string;
304
+ /** Named hosted-screen preset for this lane. XOR raw execution.desktop.resolution. */
305
+ device?: string;
306
+ /** Per-lane steer appended to this lane's mission (the roster's per-lane focus). */
307
+ instruction?: string;
308
+ /**
309
+ * Deterministic lane completion guard. When set, this lane stops as soon as the runtime
310
+ * observation matches any declared rule; actor-level stopWhen is used as the default.
311
+ */
312
+ stopWhen?: StopWhen;
313
+ /** A declared observation window for THIS lane (#510); actor-level dwell is the default. */
314
+ dwell?: DwellWindow;
315
+ /**
316
+ * How hard the model is asked to think in THIS lane; actor-level reasoningEffort is the default.
317
+ *
318
+ * The single-run control: same persona, same mission, two efforts, one set of conditions.
319
+ */
320
+ reasoningEffort?: ReasoningEffort;
321
+ /**
322
+ * App-url computer-use ONLY: absolute browser URL this lane opens instead of `subject.appUrl`.
323
+ * This is the generic setup-produced-target handoff for crawler/swarm labs: product adapters may
324
+ * start any topology they need, then hand humanish explicit lane targets. Public/non-loopback
325
+ * targets still require `policies.allowPublicTargets: true`. Inert/rejected on clone, local-app,
326
+ * shared-world, scripted-browser, and terminal routes.
327
+ */
328
+ target?: string;
329
+ /**
330
+ * Shared-world ONLY (#164): this role's per-seat loopback entry route, resolved against
331
+ * `subject.serve.url` and REQUIRED to be same-origin (loopback) with it — the seat opens
332
+ * `serve.url + entry`. Validated at parse AND re-enforced in the engine. Inert/warned on every
333
+ * non-shared-world route (the per-lane-worlds fan-out roster has no per-lane entry).
334
+ */
335
+ entry?: string;
336
+ /**
337
+ * EXTERNAL-PUBLIC shared-world ONLY (#164 phase 2): marks this lane the DESIGNATED HOST seat — it
338
+ * creates the shared session (e.g. a multiplayer lobby) that the follower seats then join. Exactly
339
+ * ONE lane in the roster may carry `host: true` (validated in externalPublicSharedWorldValidationReason).
340
+ * The orchestrator watches the host seat's observed URL for the shared-session code and threads it
341
+ * into the follower missions at a host-first barrier. Inert/warned on every other route.
342
+ */
343
+ host?: boolean;
344
+ }
345
+ /**
346
+ * Compact authoring sugar for repeated lane groups. The parser expands each group into concrete
347
+ * `lanes[]` with deterministic ids (`<group.id>-01`, `<group.id>-02`, ...). The runtime never
348
+ * consumes this shape directly; it always sees ordinary `LabActorLane` entries.
349
+ */
350
+ export interface LabActorRosterGroup extends Omit<LabParticipantEntry, "id"> {
351
+ /** Public-safe group id; prefixes generated lane ids. */
352
+ id: string;
353
+ /** Number of lanes to generate for this group. */
354
+ count: number;
355
+ }
356
+ export interface LabActor {
357
+ /**
358
+ * The actor label. On computer-use (including shared-world), scripted-browser, and
359
+ * terminal-product routes this is a REAL dispatch key resolved against the closed first-party
360
+ * actor registry. On the synthetic route it remains a free-form descriptive label (e.g.
361
+ * synthetic-persona). The terminal route owns its live lifecycle after using
362
+ * the descriptor for dispatch and capability enforcement.
363
+ */
364
+ type: string;
365
+ /** Lane count — route-specific (see HONEST SCOPE header): synthetic simCount; scripted
366
+ * surface roster {1 = desktop, 2 = desktop + mobile, default 1}; computer-use E2B route the
367
+ * HOMOGENEOUS fan-out lane count (cap 16). XOR `lanes`. */
368
+ count?: number;
369
+ /** Computer-use E2B route: a DIFFERENTIATED fan-out roster (per-lane worlds). XOR `count`,
370
+ * `roster`, and `laneFocus`. Cap 16 lanes. Consumed only on the cua E2B route
371
+ * (inert/warned elsewhere). */
372
+ lanes?: LabParticipantEntry[];
373
+ /** Persona id/label threaded into the actor prompt. Consumed on the app-url route. */
374
+ persona?: string;
375
+ /** Consumed on the app-url route (laneFocus.instruction appended to the mission). XOR `lanes`. */
376
+ laneFocus?: LabParticipantFocus;
377
+ /** Free-form mission threaded into the actor prompt. Consumed on the app-url route. A mission on
378
+ * its own is a complete, valid lab — `tasks` is additive, never required. */
379
+ mission?: string;
380
+ /**
381
+ * The researcher's protocol: discrete tasks, each with what the participant is asked to do and
382
+ * (optionally) how the researcher measures it. Additive to `mission`, which stays the brief.
383
+ *
384
+ * The two halves belong to different people. `goal` reaches the participant's prompt; `success`
385
+ * never does — a moderator does not read the success criterion aloud, because telling someone how
386
+ * they will be judged changes what they do. See src/lab/tasks.ts.
387
+ * Supported only on the first actor of per-lane CUA routes; other routes fail preflight.
388
+ */
389
+ tasks?: LabTask[];
390
+ /** Provider model override. Consumed on the app-url route. */
391
+ model?: string;
392
+ /** First-party OpenAI CUA only: per-response output limit including reasoning, not a dollar cap. */
393
+ maxOutputTokens?: number;
394
+ /**
395
+ * `local-agent` ONLY: which locally signed-in coding agent is the brain. Absent = codex.
396
+ *
397
+ * A separate field from `model` on purpose. The first cut of this route overloaded `model` to
398
+ * mean BOTH which CLI and which model, which left no way to say "Claude Code, running Opus" —
399
+ * two different choices wearing one name.
400
+ */
401
+ localAgent?: "codex" | "claude";
402
+ /**
403
+ * How hard the model is asked to think, per turn. Lane-level `reasoningEffort` overrides this.
404
+ *
405
+ * Absent means the PROVIDER's default, and absence is recorded as absence: a run that did not
406
+ * declare an effort does not claim one. Support is model-dependent (see src/actors/reasoning-effort.ts),
407
+ * so a level a model does not accept fails on the first turn rather than being downgraded.
408
+ *
409
+ * This is a recruiting decision, not a tuning knob: it changes who the participant IS, the same
410
+ * way a persona prompt does. Two lanes running the same persona and mission at different efforts
411
+ * is therefore a CONTRAST between two participants, not a control for an instrument — a lane that
412
+ * abandons at one level and completes at another has reported on both of them. The obligation it
413
+ * creates is to declare and record, never to hold it constant. See
414
+ * docs/principles/actor-fidelity.md.
415
+ */
416
+ reasoningEffort?: ReasoningEffort;
417
+ /**
418
+ * Deterministic completion guard used as the default for CUA lanes. Lane-level stopWhen
419
+ * overrides this value.
420
+ */
421
+ stopWhen?: StopWhen;
422
+ /**
423
+ * A declared observation window (#510), the default for every lane; lane-level dwell overrides
424
+ * it. `when` is a stopWhen-shaped condition (absent: the window opens after the first
425
+ * observation); `ms` is the hold, `everyMs` the frame cadence (default 10 s), `then` whether
426
+ * the participant continues afterwards (default) or the session ends. The harness takes no
427
+ * action and requests no model turn during the window.
428
+ */
429
+ dwell?: DwellWindow;
430
+ }
431
+ type LabExecutionTarget = "local" | "e2b-desktop" | "e2b-terminal";
432
+ /** Terminal transport: the captured non-interactive exec stream (stdin disabled). NOT an
433
+ * interactive duplex PTY — labeling captured exec output "pty" would be a claim/mechanism
434
+ * mismatch (invariant 6 + the goal packet's PTY ruling), so this lane uses "exec-stream". */
435
+ type LabTerminalTransport = "exec-stream";
436
+ /** Whether operator stdin reaches the in-sandbox agent. Disabled by default (the run is
437
+ * autonomous + comparable to an unassisted baseline). "planned" records intent but sends no
438
+ * input; "sent" is rejected because assisted-input capture and a non-comparable marker do not
439
+ * ship (the safety contract forbids an assisted run masquerading as green). */
440
+ type LabTerminalStdin = "disabled" | "planned" | "sent";
441
+ export interface LabExecutionTerminal {
442
+ /** Transport label. Default and only shipped value is "exec-stream". */
443
+ transport?: LabTerminalTransport;
444
+ /** Operator stdin posture. Default "disabled". */
445
+ stdin?: LabTerminalStdin;
446
+ }
447
+ /**
448
+ * The terminal agent's runtime-auth channel. "openai-env" (the default) passes the raw runtime
449
+ * key command-scoped. "openai-egress" keeps it in an E2B outbound header transform for the default
450
+ * OpenAI endpoint and passes an inert placeholder to Codex. The latter still gives every sandbox
451
+ * process a spendable OpenAI proxy capability; it is not a spend cap or an egress restriction.
452
+ */
453
+ export type LabRuntimeAuth = "openai-env" | "openai-egress";
454
+ export type LabDesktopBrowser = "default" | "chrome" | "chromium" | "firefox";
455
+ export interface LabExecutionDesktop {
456
+ /**
457
+ * Named device preset (mobile / small-mobile / narrow-mobile / tablet / desktop / wide) the
458
+ * run renders at. Consumed on the computer-use route; default `desktop` (1440x950). On that
459
+ * route only width/height physically render (the X screen is sized to the preset, so
460
+ * width-based responsive CSS fires) — touch/DPR/UA are sim-parity prompt signals, not rendered.
461
+ */
462
+ device?: string;
463
+ /** Raw hosted screen resolution [width, height] — an escape hatch that overrides `device`. */
464
+ resolution?: [number, number];
465
+ /**
466
+ * Browser family to launch for hosted desktop actor lanes. Absent/default preserves the
467
+ * historical desktop opener behavior. A concrete value means "launch this browser or fail"
468
+ * instead of silently accepting the template's default URL opener.
469
+ */
470
+ browser?: LabDesktopBrowser;
471
+ /** Sandbox server-side timeout. Consumed on the app-url route. */
472
+ sandboxTimeoutMs?: number;
473
+ /**
474
+ * Custom E2B desktop TEMPLATE (image) the run launches on — a non-empty template NAME or ID —
475
+ * instead of the stock `desktop` template. Lets a subject that needs runtimes the stock image
476
+ * lacks (e.g. node/bun/a local Postgres baked into an adopter-maintained image) run as-is. Any
477
+ * string is a valid template name/id (there is no allowlist). Consumed ONLY on the
478
+ * `execution.target: e2b-desktop` computer-use routes (the cua/shared-world/concurrent backends
479
+ * that call `Sandbox.create`) and the clone scripted-browser route; inert/warned on every route
480
+ * that creates no desktop. Threaded to
481
+ * `Sandbox.create(template, opts)`; absent leaves the byte-stable `Sandbox.create(opts)` default.
482
+ * A template name is public-safe (not a secret) and is recorded in the run bundle.
483
+ */
484
+ template?: string;
485
+ /** Use the Codex app-server client mode for headed desktop actor surfaces. Consumed (meta). */
486
+ codexAppServer?: boolean;
487
+ /**
488
+ * Mobile fidelity beyond viewport size (#221). With `mobileEmulation: true`, every hosted
489
+ * Chromium computer-use lane ON A MOBILE PRESET (mobile / small-mobile / narrow-mobile) gets
490
+ * CDP device emulation applied to its launch page before the participant arrives; desktop,
491
+ * tablet and wide lanes in the same run are untouched and carry no fidelity block. Applied: the lane's device preset width/height as the CSS viewport, the preset's
492
+ * device pixel ratio (or `deviceScaleFactor`), touch events (`touch`, default true) and a mobile
493
+ * user agent (`userAgent`, default an iPhone Safari string). The bundle records what the page
494
+ * then reported about itself under `desktopGeometry.fidelity`; a browser that cannot be
495
+ * emulated (Firefox) fails the lane closed instead of shipping a desktop run labelled mobile.
496
+ * A held CDP session also applies the overrides to later page targets. Their first observed
497
+ * viewport and touch read-back is recorded separately; missing or different values warn.
498
+ */
499
+ fidelity?: LabDesktopFidelity;
500
+ /** Synthetic media devices behind the browser's own permission prompt (#509). */
501
+ media?: LabDesktopMedia;
502
+ /** Optional retained screen video. Capture is independent of participant media input. */
503
+ recording?: {
504
+ audio: boolean;
505
+ };
506
+ }
507
+ /**
508
+ * A participant with a camera (#509): a property of the ENVIRONMENT, like the screen preset and
509
+ * the browser, never support for any conferencing product. `camera.source: synthetic` generates
510
+ * a test pattern in the sandbox with the image's own ffmpeg; a `.y4m` path on the host is
511
+ * uploaded instead on hosted desktops. `microphone.source: speech` enables the participant's
512
+ * own spoken replies and listening through native audio devices. File microphones are unsupported.
513
+ */
514
+ export interface LabDesktopMedia {
515
+ camera?: {
516
+ source: string;
517
+ };
518
+ microphone?: {
519
+ source: string;
520
+ };
521
+ }
522
+ export interface LabDesktopFidelity {
523
+ mobileEmulation: boolean;
524
+ /** Emulated devicePixelRatio; default: the device preset's. */
525
+ deviceScaleFactor?: number;
526
+ /** Emulate touch (coarse pointer, touch events); default true. */
527
+ touch?: boolean;
528
+ /** Full user-agent string to present; default: a mobile Safari string. */
529
+ userAgent?: string;
530
+ }
531
+ export interface LabExecution {
532
+ target?: LabExecutionTarget;
533
+ /** Actor session wall-clock budget. Consumed on the app-url route. */
534
+ timeoutMs?: number;
535
+ /** FORWARD-DECLARED. */
536
+ completionTimeoutMs?: number;
537
+ /**
538
+ * Bounds in-flight fan-out lanes on the computer-use route. Shared-world needs at least 2 and
539
+ * defaults to the participant count. Inert (warned) elsewhere.
540
+ */
541
+ concurrency?: number;
542
+ desktop?: LabExecutionDesktop;
543
+ /**
544
+ * Blast-radius budget for the computer-use lane. CONSUMED on the CUA route: `caps.maxUsd`, when
545
+ * set, is a FAIL-CLOSED abort — the session stops the moment its running ESTIMATED spend crosses
546
+ * it (the runaway-retry guard), and a cap on a model src/run/pricing.ts cannot price is REFUSED at
547
+ * preflight rather than run uncapped. It is a PER-LANE cap: enforced inside each lane's loop, so
548
+ * an N-lane fan-out can spend up to N × maxUsd before any lane aborts (the run warns with the
549
+ * true ~N × cap ceiling). `caps.maxTotalUsd` is the shared STUDY budget (#299): one ledger
550
+ * across every lane, the knob a researcher actually reasons with. Absent = UNCAPPED (the
551
+ * historical CUA behavior); maxUsd: 0 still permits a request before reported usage trips it. Inert
552
+ * (warned) on non-CUA routes. Reuses the same LabScenarioCaps shape as the terminal lane's
553
+ * `scenario.caps` (not a fork).
554
+ */
555
+ caps?: LabScenarioCaps;
556
+ /** `terminal-product` route: the terminal transport + stdin posture. Consumed on that route. */
557
+ terminal?: LabExecutionTerminal;
558
+ /** `terminal-product` route: runtime key placement, defaulting to openai-env. openai-egress
559
+ * uses an external header transform; dry-runs record declarations only. Inert on other routes. */
560
+ runtimeAuth?: LabRuntimeAuth;
561
+ /** Terminal Codex package pin. Omit to resolve latest once, observe it, then execute that version. */
562
+ runtime?: {
563
+ version: string;
564
+ };
565
+ /**
566
+ * `terminal-product` route: outbound routing allowlist passed to E2B with a deny-all fallback.
567
+ * Domain filtering is a routing control, not strict destination isolation on shared hosting.
568
+ * It does not constrain spending through an allowed runtime provider (#538), including when
569
+ * openai-egress keeps the raw runtime key outside the sandbox.
570
+ *
571
+ * Absent means unrestricted, which is the historical behavior and stays the default, because a
572
+ * wrong host list fails studies in ways that look like product bugs. Opt in per lab.
573
+ *
574
+ * Domain filtering covers HTTP on :80 (Host header) and TLS on :443 (SNI); anything else needs
575
+ * an IP or CIDR. `*.example.com` matches subdomains at any depth and NOT the apex, which needs
576
+ * its own entry.
577
+ */
578
+ egressAllow?: string[];
579
+ }
580
+ type LabScenarioMode = "dry-run" | "live";
581
+ /**
582
+ * The blast-radius budget for a route that passes a live key to an in-sandbox command.
583
+ * Per the safety contract, the live key is never exercised without a fail-closed cap in force.
584
+ * All values are non-negative numbers (0 is the no-spend default). Live runs require maxUsd and a
585
+ * positive maxMinutes; maxUsd/maxJobs are checked after the session against known ledger signals
586
+ * and maxMinutes is enforced as the command wall clock. Codex tokens are unpriced, so a live run
587
+ * refuses a positive maxUsd unless a costProbe measures spend (HUMANISH_TERMINAL_LAB_UNPRICED_CAP).
588
+ */
589
+ export interface LabScenarioCaps {
590
+ /** Max USD the run may spend (provider + product). 0 = no-spend. */
591
+ maxUsd?: number;
592
+ /**
593
+ * STUDY-LEVEL model-spend budget (#299), the number a researcher actually reasons with: "this
594
+ * study is N participants, roughly $X" — decided once, up front, where recruiting decisions are
595
+ * made. The computer-use route reads it from `execution.caps.maxTotalUsd` only: every lane's
596
+ * running ESTIMATED model spend feeds one shared ledger, and the moment the run total crosses
597
+ * this, each lane stops at its next turn with an honest `budget_reached` (status `incomplete` —
598
+ * the participant ran out of budget; never `gave_up`, because a study-level stop is not the
599
+ * participant's doing). Estimated MODEL spend only — desktop-minutes ride the cost summary but
600
+ * not this ledger. Independent of the per-lane `maxUsd` backstop; either, both, or neither may
601
+ * be set. A positive `scenario.caps.maxTotalUsd` on a computer-use lab is a parse error; on the
602
+ * terminal route it is inert (warned), since the single agent's maxUsd already caps the run.
603
+ */
604
+ maxTotalUsd?: number;
605
+ /** Max billable product jobs the agent may trigger. 0 = none. */
606
+ maxJobs?: number;
607
+ /** Max wall-clock minutes for the agent session. */
608
+ maxMinutes?: number;
609
+ }
610
+ export interface LabScenario {
611
+ /** Reference a committed scenario by id (humanish/scenarios/<ref>.yaml) or path. CONSUMED
612
+ * (and REQUIRED) on the scripted-browser route; FORWARD-DECLARED elsewhere. */
613
+ ref?: string;
614
+ /** Or inline the scenario body. FORWARD-DECLARED (PR #2). */
615
+ inline?: Record<string, unknown>;
616
+ /** dry-run = contract evidence (no provider spend); live = real run. Consumed. */
617
+ mode?: LabScenarioMode;
618
+ /** Spend/job/time caps. Consumed (recorded in the bundle) on the terminal-product route;
619
+ * inert (warned) elsewhere. */
620
+ caps?: LabScenarioCaps;
621
+ }
622
+ export interface LabPolicies {
623
+ /**
624
+ * Redact target repo labels in durable artifacts. Consumed on the computer-use,
625
+ * scripted-browser and shared-world clone routes (provenance), where it DEFAULTS to true when
626
+ * the clone authenticates via GITHUB_TOKEN (a token-bearing clone is treated as private until
627
+ * declared otherwise).
628
+ */
629
+ redactRepos?: boolean;
630
+ /**
631
+ * Blur+downscale persisted screenshots on the computer-use route. Default FALSE — the common
632
+ * case is watching a sim of your OWN app locally (gitignored .humanish), where full fidelity is
633
+ * the deliverable. Set true for unowned subjects or bundles meant to be shared as-is. The
634
+ * provider always sees raw frames; this only governs what is persisted. Raw bundles stay
635
+ * local (gitignored, commit-scan-guarded); a redact-on-export step for them is planned.
636
+ */
637
+ redactScreenshots?: boolean;
638
+ /**
639
+ * Allow an app-url subject to point at a non-loopback (public/preview/staging) URL the lab
640
+ * owner declares. Default FALSE (loopback-only). The invariant is "the actor drives a target
641
+ * the owner declared" — setting this IS that declaration (e.g. a Vercel preview of your app).
642
+ */
643
+ allowPublicTargets?: boolean;
644
+ /**
645
+ * How the browser's camera/microphone permission is answered (#509). `prompt` (default): the
646
+ * participant meets Chrome's real dialog and answers it, which is where a real person hesitates
647
+ * or refuses. `granted`: the dialog is bypassed (`--use-fake-ui-for-media-stream`, which Chrome
648
+ * marks with an "unsupported command-line flag" banner), for studies about what happens after
649
+ * the gate.
650
+ */
651
+ mediaPermission?: "prompt" | "granted";
652
+ /** Recorded private-repo-access intent. No private-repo provisioning channel ships. */
653
+ allowPrivateRepoAccess?: boolean;
654
+ /** Recorded provider-credential intent. No provider-credential injection channel ships. */
655
+ allowProviderCredentials?: boolean;
656
+ /** Recorded payment-credential intent. No payment-credential injection channel ships. */
657
+ allowPaymentCredentials?: boolean;
658
+ /** Recorded GitHub-mutation intent. No GitHub-token injection channel ships. */
659
+ allowGitHubMutation?: boolean;
660
+ }
661
+ export interface LabReview {
662
+ /** Analysis defaults on for eligible live recordings; false disables the separate request. */
663
+ analysis?: LabAnalysis | false;
664
+ /** FORWARD-DECLARED (PR #2). */
665
+ scoring?: string;
666
+ /** FORWARD-DECLARED (PR #2). */
667
+ milestones?: string;
668
+ /** FORWARD-DECLARED (PR #2). */
669
+ vocabulary?: string;
670
+ /**
671
+ * #316 code escape hatch: a repo-relative path to an adopter scorer module (.mjs recommended) that
672
+ * exports any of `{score, deriveFeedback, deriveArtifacts}`. CONSUMED on the scorer-capable routes
673
+ * (terminal / computer-use / shared-world); loaded fail-closed (typed error, pre-spend). The entry
674
+ * is executable code — review a PR that adds one as code, not config.
675
+ */
676
+ scorer?: {
677
+ ref: string;
678
+ };
679
+ }
680
+ export interface LabDefaults {
681
+ open?: boolean;
682
+ }
683
+ /** Off-app comms (email/SMS the persona lives in) the harness provides for the run (#297). */
684
+ export interface LabComms {
685
+ email?: LabCommsEmail;
686
+ }
687
+ export interface LabCommsSmtp {
688
+ /** Fixed in-sandbox loopback SMTP port (default 2525). Known before sandbox create, like `port`. */
689
+ port?: number;
690
+ /** The subject-env var carrying the SMTP host. The harness sets it to 127.0.0.1. */
691
+ hostEnv: string;
692
+ /** The subject-env var carrying the SMTP port. The harness sets it to the port above. */
693
+ portEnv: string;
694
+ /** Optional subject-env vars for a username/password the app insists on sending. The catch accepts
695
+ * any credentials (it is loopback-only), but many apps refuse to start without the vars set. */
696
+ userEnv?: string;
697
+ passwordEnv?: string;
698
+ /** The value written to `userEnv`/`passwordEnv` when those are declared. Never a real secret. */
699
+ user?: string;
700
+ password?: string;
701
+ }
702
+ export type LabCommsEmail = LabCommsCaptureEmail | LabCommsReceivingEmail;
703
+ export interface LabCommsReceivingEmail {
704
+ kind: "real";
705
+ connection: string;
706
+ /** Additional exact first-hop destinations; automatic remote email assets remain blocked. */
707
+ allowedOrigins?: string[];
708
+ linkOrigin?: string;
709
+ port?: never;
710
+ injectEnv?: never;
711
+ smtp?: never;
712
+ recipients?: never;
713
+ external?: never;
714
+ }
715
+ interface LabCommsCaptureEmail {
716
+ connection?: never;
717
+ allowedOrigins?: never;
718
+ /** Which implementation backs the inbox (a backend discriminator, distinct from `scenario.mode`):
719
+ * `fake` (default) is an in-harness in-memory inbox in the Fowler test-double sense — an in-sandbox
720
+ * catch captures the app's sends. Provider-backed receiving uses the separate
721
+ * LabCommsReceivingEmail configuration selected by a saved connection. */
722
+ kind: "fake";
723
+ /**
724
+ * The subject-env var the harness sets to the in-sandbox catch's base URL — ADOPTER-NAMED (an app
725
+ * calling Resend's API directly reads `RESEND_API_URL`; an app using the SDK reads `RESEND_BASE_URL`).
726
+ * The value is computed by the harness (a loopback URL), so it is NOT declared in `subject.env`.
727
+ * REQUIRED on the provisioned routes; absent (and meaningless) when `external` is declared,
728
+ * because there the adopter runs the catch and points their own app at it.
729
+ */
730
+ injectEnv?: string;
731
+ /** Fixed in-sandbox loopback port the catch listens on (default 8025). Known before sandbox create. */
732
+ port?: number;
733
+ /**
734
+ * SMTP transport, for the many self-hostable apps that send mail through SMTP rather than a
735
+ * provider's HTTP API. The catch opens a loopback SMTP listener and normalizes what it receives
736
+ * into the same captured-send shape the HTTP path produces, so the inbox surface, the drain, and
737
+ * the evidence artifact are identical either way.
738
+ *
739
+ * `hostEnv` and `portEnv` are ADOPTER-NAMED, exactly like `injectEnv`: the harness sets them to
740
+ * its own loopback and the chosen port. Declare the pair your app actually reads.
741
+ */
742
+ smtp?: LabCommsSmtp;
743
+ /** Optional escape hatch: the exact absolute origin the app-under-test bakes into its email verify
744
+ * links, when that differs from the serve origin (e.g. an app configured with an absolute
745
+ * APP_URL/NEXT_PUBLIC_BASE_URL). The harness cannot infer it, so the operator declares it; it is
746
+ * prepended to the inbox link-origin rewrite so the persona's clicked link resolves to a reachable
747
+ * host. Omit when the app emits loopback links (the default derivation covers those). */
748
+ linkOrigin?: string;
749
+ /** Each lane's inbox address: the actor is TOLD to sign up with it (the injected inbox
750
+ * instruction carries it) and the teardown drain matches captured mail against it. Omit the
751
+ * whole list and the parser fills one deterministic address per lane (`<laneId>@example.test`)
752
+ * so every seat can do email out of the box (#351). When declared: a `lane` naming a lane that
753
+ * does not exist is a hard parse error (a mismatch silently disables the funnel for that seat),
754
+ * zero covered lanes is a hard error, and partial coverage warns with the uncovered lanes. An
755
+ * entry without `address` is legal but inert for the funnel — it is NOT matched by the drain
756
+ * and its lane gets no inbox instruction; captured mail to an undeclared address is warned,
757
+ * never silently dropped. */
758
+ recipients?: LabCommsRecipient[];
759
+ /**
760
+ * ADOPTER-HOSTED ingress (#328). Declaring this says: the operator runs the catch and the inbox
761
+ * themselves, so humanish neither provisions the subject nor injects `injectEnv` — it points the
762
+ * persona at the declared inbox, drains the declared catch over HTTP at teardown, and writes the
763
+ * same digest-only evidence. This is what makes comms work on the app-url / operator-provisioned
764
+ * plane, where humanish holds no sandbox handle to host a catch in and the block was previously
765
+ * warned inert. Run the same implementation with `humanish comms catch`.
766
+ */
767
+ external?: LabCommsExternal;
768
+ }
769
+ export interface LabCommsExternal {
770
+ /** Where the adopter's app POSTs its email sends, and where humanish reads GET /deliveries. */
771
+ catchBaseUrl: string;
772
+ /** Where the persona opens its inbox. Defaults to catchBaseUrl (one server serves both). */
773
+ inboxBaseUrl?: string;
774
+ /** Env var NAME holding the bearer token for the drain read. The NAME is recorded as evidence;
775
+ * the value is read at runtime and never persisted (the credential-boundary discipline). */
776
+ authTokenEnv?: string;
777
+ }
778
+ export interface LabCommsRecipient {
779
+ lane: string;
780
+ /** The literal address the app sends to — what the evidence drain matches. Omit to reserve the lane
781
+ * for the persona surface's default address (not drain-matched). */
782
+ address?: string;
783
+ }
784
+ export interface LabConfig {
785
+ schema: typeof LAB_CONFIG_SCHEMA;
786
+ id: string;
787
+ title?: string;
788
+ description?: string;
789
+ subject: LabSubject;
790
+ actors: LabActor[];
791
+ execution?: LabExecution;
792
+ /** FORWARD-DECLARED (PR #2). */
793
+ personas?: Record<string, unknown>[];
794
+ scenario?: LabScenario;
795
+ policies?: LabPolicies;
796
+ review?: LabReview;
797
+ defaults?: LabDefaults;
798
+ comms?: LabComms;
799
+ }
800
+ interface LabConfigParseSuccess {
801
+ ok: true;
802
+ config: LabConfig;
803
+ warnings: string[];
804
+ }
805
+ export interface LabConfigParseFailure {
806
+ ok: false;
807
+ error: {
808
+ code: "HUMANISH_LAB_INVALID";
809
+ message: string;
810
+ };
811
+ }
812
+ export type LabConfigParseResult = LabConfigParseSuccess | LabConfigParseFailure;
813
+ export {};