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.
- package/AGENTS.md +89 -94
- package/ARCHITECTURE.md +146 -0
- package/CHANGELOG.md +502 -0
- package/CONTEXT.md +51 -0
- package/CONTRIBUTING.md +111 -9
- package/README.md +213 -124
- package/SECURITY.md +1 -1
- package/TELEMETRY.md +112 -0
- package/dist/actors/affordance.d.ts +56 -0
- package/dist/actors/affordance.js +155 -0
- package/dist/actors/agent-session.js +42 -0
- package/dist/actors/codex/app-server-actor-trace.d.ts +11 -0
- package/dist/actors/codex/app-server-actor-trace.js +211 -0
- package/dist/actors/codex/app-server-client.d.ts +39 -0
- package/dist/actors/codex/app-server-client.js +116 -0
- package/dist/actors/codex/app-server-trace.d.ts +154 -0
- package/dist/actors/codex/app-server-trace.js +424 -0
- package/dist/actors/codex/app-server-ui.d.ts +40 -0
- package/dist/actors/codex/app-server-ui.js +328 -0
- package/dist/actors/codex/app-server.d.ts +44 -0
- package/dist/actors/codex/app-server.js +268 -0
- package/dist/actors/codex/qualified-versions.d.ts +45 -0
- package/dist/actors/codex/qualified-versions.js +87 -0
- package/dist/actors/codex/restricted-executable.d.ts +17 -0
- package/dist/actors/codex/restricted-executable.js +147 -0
- package/dist/actors/codex/restricted-launch.d.ts +116 -0
- package/dist/actors/codex/restricted-launch.js +222 -0
- package/dist/actors/codex/restricted-participant-policy.d.ts +46 -0
- package/dist/actors/codex/restricted-participant-policy.js +82 -0
- package/dist/actors/codex/restricted-participant.d.ts +20 -0
- package/dist/actors/codex/restricted-participant.js +432 -0
- package/dist/actors/codex/restricted-policy.d.ts +70 -0
- package/dist/actors/codex/restricted-policy.js +326 -0
- package/dist/actors/codex/restricted-session.d.ts +65 -0
- package/dist/actors/codex/restricted-session.js +432 -0
- package/dist/actors/codex/restricted-transport.d.ts +73 -0
- package/dist/actors/codex/restricted-transport.js +335 -0
- package/dist/actors/codex/restricted-turn.d.ts +62 -0
- package/dist/actors/codex/restricted-turn.js +284 -0
- package/dist/actors/computer-use/actor.d.ts +77 -0
- package/dist/actors/computer-use/actor.js +78 -0
- package/dist/actors/computer-use/admission-limit.d.ts +12 -0
- package/dist/actors/computer-use/admission-limit.js +19 -0
- package/dist/actors/computer-use/executor-error.js +48 -0
- package/dist/actors/computer-use/loop/actions.d.ts +26 -0
- package/dist/actors/computer-use/loop/actions.js +245 -0
- package/dist/actors/computer-use/loop/backstop.d.ts +42 -0
- package/dist/actors/computer-use/loop/backstop.js +202 -0
- package/dist/actors/computer-use/loop/debrief.d.ts +19 -0
- package/dist/actors/computer-use/loop/debrief.js +164 -0
- package/dist/actors/computer-use/loop/ending.d.ts +86 -0
- package/dist/actors/computer-use/loop/ending.js +316 -0
- package/dist/actors/computer-use/loop/observation.d.ts +55 -0
- package/dist/actors/computer-use/loop/observation.js +246 -0
- package/dist/actors/computer-use/loop/output-limit.d.ts +11 -0
- package/dist/actors/computer-use/loop/output-limit.js +21 -0
- package/dist/actors/computer-use/loop/provider-call.d.ts +19 -0
- package/dist/actors/computer-use/loop/provider-call.js +208 -0
- package/dist/actors/computer-use/loop/race.d.ts +34 -0
- package/dist/actors/computer-use/loop/race.js +79 -0
- package/dist/actors/computer-use/loop/session.d.ts +77 -0
- package/dist/actors/computer-use/loop/session.js +135 -0
- package/dist/actors/computer-use/loop/spend.d.ts +30 -0
- package/dist/actors/computer-use/loop/spend.js +85 -0
- package/dist/actors/computer-use/loop/trace.d.ts +35 -0
- package/dist/actors/computer-use/loop/trace.js +140 -0
- package/dist/actors/computer-use/loop/types.d.ts +404 -0
- package/dist/actors/computer-use/loop/types.js +1 -0
- package/dist/actors/computer-use/loop/usage.d.ts +102 -0
- package/dist/actors/computer-use/loop/usage.js +355 -0
- package/dist/actors/computer-use/loop.d.ts +11 -0
- package/dist/actors/computer-use/loop.js +248 -0
- package/dist/actors/computer-use/openai-provider.d.ts +107 -0
- package/dist/actors/computer-use/openai-provider.js +472 -0
- package/dist/actors/computer-use/openai-requests.d.ts +35 -0
- package/dist/actors/computer-use/openai-requests.js +74 -0
- package/dist/actors/computer-use/openai-wire.d.ts +67 -0
- package/dist/actors/computer-use/openai-wire.js +365 -0
- package/dist/actors/computer-use/provider-error.d.ts +27 -0
- package/dist/actors/computer-use/provider-error.js +86 -0
- package/dist/actors/computer-use/speech.js +6 -0
- package/dist/actors/contract.d.ts +315 -0
- package/dist/actors/contract.js +201 -0
- package/dist/actors/goal-source.js +38 -0
- package/dist/actors/local-agent/claude-session.d.ts +43 -0
- package/dist/actors/local-agent/claude-session.js +370 -0
- package/dist/actors/local-agent/cli.d.ts +115 -0
- package/dist/actors/local-agent/cli.js +413 -0
- package/dist/actors/local-agent/readiness.d.ts +31 -0
- package/dist/actors/local-agent/readiness.js +45 -0
- package/dist/actors/openai-endpoint.d.ts +2 -0
- package/dist/actors/openai-endpoint.js +2 -0
- package/dist/actors/output-token-limit.js +4 -0
- package/dist/actors/reasoning-effort.js +33 -0
- package/dist/actors/registry.d.ts +59 -0
- package/dist/actors/registry.js +89 -0
- package/dist/actors/scripted-browser/actor.d.ts +49 -0
- package/dist/actors/scripted-browser/actor.js +428 -0
- package/dist/actors/scripted-browser/browser-command.d.ts +1 -0
- package/dist/actors/scripted-browser/browser-command.js +48 -0
- package/dist/actors/scripted-browser/journey.d.ts +9 -0
- package/dist/actors/scripted-browser/journey.js +171 -0
- package/dist/actors/scripted-browser/steps.d.ts +60 -0
- package/dist/actors/scripted-browser/steps.js +384 -0
- package/dist/actors/scripted-browser/types.d.ts +135 -0
- package/dist/actors/scripted-browser/types.js +26 -0
- package/dist/actors/stop-cause.d.ts +9 -0
- package/dist/actors/stop-cause.js +42 -0
- package/dist/actors/stop-conditions.d.ts +40 -0
- package/dist/actors/stop-conditions.js +65 -0
- package/dist/analysis/automatic-completion.d.ts +38 -0
- package/dist/analysis/automatic-completion.js +90 -0
- package/dist/analysis/automatic-config.d.ts +41 -0
- package/dist/analysis/automatic-config.js +135 -0
- package/dist/analysis/automatic.d.ts +17 -0
- package/dist/analysis/automatic.js +279 -0
- package/dist/analysis/codex-config.d.ts +8 -0
- package/dist/analysis/codex-config.js +69 -0
- package/dist/analysis/evidence-sources.d.ts +23 -0
- package/dist/analysis/evidence-sources.js +251 -0
- package/dist/analysis/evidence.d.ts +18 -0
- package/dist/analysis/evidence.js +482 -0
- package/dist/analysis/execute.d.ts +52 -0
- package/dist/analysis/execute.js +504 -0
- package/dist/analysis/image-tokens.d.ts +1 -0
- package/dist/analysis/image-tokens.js +41 -0
- package/dist/analysis/job.d.ts +97 -0
- package/dist/analysis/job.js +311 -0
- package/dist/analysis/load.d.ts +3 -0
- package/dist/analysis/load.js +11 -0
- package/dist/analysis/provider.d.ts +57 -0
- package/dist/analysis/provider.js +227 -0
- package/dist/analysis/restricted-codex.d.ts +19 -0
- package/dist/analysis/restricted-codex.js +23 -0
- package/dist/analysis/service.d.ts +72 -0
- package/dist/analysis/service.js +399 -0
- package/dist/analysis/sharing.d.ts +11 -0
- package/dist/analysis/sharing.js +44 -0
- package/dist/analysis/store-executions.d.ts +27 -0
- package/dist/analysis/store-executions.js +224 -0
- package/dist/analysis/store.d.ts +31 -0
- package/dist/analysis/store.js +315 -0
- package/dist/analysis/types.d.ts +217 -0
- package/dist/analysis/types.js +12 -0
- package/dist/analysis/validation.d.ts +225 -0
- package/dist/analysis/validation.js +562 -0
- package/dist/browser-control/client.d.ts +18 -0
- package/dist/browser-control/client.js +239 -0
- package/dist/browser-control/dispatcher.d.ts +19 -0
- package/dist/browser-control/dispatcher.js +221 -0
- package/dist/browser-control/protocol.d.ts +492 -0
- package/dist/browser-control/protocol.js +360 -0
- package/dist/browser-control/recording-transfer.d.ts +3 -0
- package/dist/browser-control/recording-transfer.js +48 -0
- package/dist/browser-control/transport.d.ts +27 -0
- package/dist/browser-control/transport.js +189 -0
- package/dist/cli/commands/analysis-signals.d.ts +7 -0
- package/dist/cli/commands/analysis-signals.js +25 -0
- package/dist/cli/commands/analyze.d.ts +3 -0
- package/dist/cli/commands/analyze.js +212 -0
- package/dist/cli/commands/codex.d.ts +3 -0
- package/dist/cli/commands/codex.js +145 -0
- package/dist/cli/commands/comms.d.ts +3 -0
- package/dist/cli/commands/comms.js +225 -0
- package/dist/cli/commands/feedback.d.ts +3 -0
- package/dist/cli/commands/feedback.js +138 -0
- package/dist/cli/commands/lab-format.d.ts +8 -0
- package/dist/cli/commands/lab-format.js +105 -0
- package/dist/cli/commands/lab-route-computer-use.d.ts +20 -0
- package/dist/cli/commands/lab-route-computer-use.js +251 -0
- package/dist/cli/commands/lab-route-open.d.ts +27 -0
- package/dist/cli/commands/lab-route-open.js +37 -0
- package/dist/cli/commands/lab-route-preview.d.ts +20 -0
- package/dist/cli/commands/lab-route-preview.js +74 -0
- package/dist/cli/commands/lab-route-run.d.ts +17 -0
- package/dist/cli/commands/lab-route-run.js +31 -0
- package/dist/cli/commands/lab-route-scripted.d.ts +19 -0
- package/dist/cli/commands/lab-route-scripted.js +50 -0
- package/dist/cli/commands/lab-route-shared-world.d.ts +20 -0
- package/dist/cli/commands/lab-route-shared-world.js +135 -0
- package/dist/cli/commands/lab-route-terminal.d.ts +19 -0
- package/dist/cli/commands/lab-route-terminal.js +49 -0
- package/dist/cli/commands/lab-run.d.ts +9 -0
- package/dist/cli/commands/lab-run.js +166 -0
- package/dist/cli/commands/lab-scorer.d.ts +30 -0
- package/dist/cli/commands/lab-scorer.js +17 -0
- package/dist/cli/commands/lab.d.ts +3 -0
- package/dist/cli/commands/lab.js +193 -0
- package/dist/cli/commands/observe.d.ts +4 -0
- package/dist/cli/commands/observe.js +345 -0
- package/dist/cli/commands/runs.d.ts +11 -0
- package/dist/cli/commands/runs.js +314 -0
- package/dist/cli/commands/setup.d.ts +11 -0
- package/dist/cli/commands/setup.js +325 -0
- package/dist/cli/commands/tui.d.ts +32 -0
- package/dist/cli/commands/tui.js +305 -0
- package/dist/cli/commands/watch.d.ts +3 -0
- package/dist/cli/commands/watch.js +245 -0
- package/dist/cli/doctor.d.ts +39 -0
- package/dist/cli/doctor.js +263 -0
- package/dist/cli/first-run-path.d.ts +67 -0
- package/dist/cli/first-run-path.js +150 -0
- package/dist/cli/io.d.ts +85 -0
- package/dist/cli/io.js +232 -0
- package/dist/cli/observer-follow.d.ts +56 -0
- package/dist/cli/observer-follow.js +160 -0
- package/dist/cli/orientation.d.ts +30 -0
- package/dist/cli/orientation.js +114 -0
- package/dist/cli/program.d.ts +15 -0
- package/dist/cli/program.js +338 -0
- package/dist/cli/secret-prompt.js +39 -0
- package/dist/cli/telemetry.js +351 -0
- package/dist/cli.js +2 -4
- package/dist/comms/agentmail.d.ts +29 -0
- package/dist/comms/agentmail.js +568 -0
- package/dist/comms/capture-surface.d.ts +54 -0
- package/dist/comms/capture-surface.js +468 -0
- package/dist/comms/catch-host.d.ts +52 -0
- package/dist/comms/catch-host.js +192 -0
- package/dist/comms/connections.d.ts +20 -0
- package/dist/comms/connections.js +116 -0
- package/dist/comms/email-catch.d.ts +49 -0
- package/dist/comms/email-catch.js +236 -0
- package/dist/comms/extract.d.ts +7 -0
- package/dist/comms/extract.js +65 -0
- package/dist/comms/fake-inbox.d.ts +39 -0
- package/dist/comms/fake-inbox.js +136 -0
- package/dist/comms/images.d.ts +7 -0
- package/dist/comms/images.js +53 -0
- package/dist/comms/lease-store.d.ts +91 -0
- package/dist/comms/lease-store.js +600 -0
- package/dist/comms/providers.d.ts +30 -0
- package/dist/comms/providers.js +24 -0
- package/dist/comms/receiving-common.d.ts +17 -0
- package/dist/comms/receiving-common.js +82 -0
- package/dist/comms/receiving-evidence.d.ts +4 -0
- package/dist/comms/receiving-evidence.js +59 -0
- package/dist/comms/receiving-recovery.d.ts +22 -0
- package/dist/comms/receiving-recovery.js +100 -0
- package/dist/comms/receiving-render.d.ts +16 -0
- package/dist/comms/receiving-render.js +409 -0
- package/dist/comms/receiving-runtime.d.ts +41 -0
- package/dist/comms/receiving-runtime.js +66 -0
- package/dist/comms/receiving-surface.d.ts +8 -0
- package/dist/comms/receiving-surface.js +156 -0
- package/dist/comms/receiving-types.d.ts +122 -0
- package/dist/comms/receiving-types.js +3 -0
- package/dist/comms/receiving.d.ts +33 -0
- package/dist/comms/receiving.js +508 -0
- package/dist/comms/sandbox-catch-script.d.ts +16 -0
- package/dist/comms/sandbox-catch-script.js +331 -0
- package/dist/comms/sandbox-catch.d.ts +214 -0
- package/dist/comms/sandbox-catch.js +451 -0
- package/dist/comms/setup.d.ts +65 -0
- package/dist/comms/setup.js +259 -0
- package/dist/comms/thread-evidence.d.ts +28 -0
- package/dist/comms/thread-evidence.js +30 -0
- package/dist/comms/types.d.ts +76 -0
- package/dist/comms/types.js +8 -0
- package/dist/deprecated.d.ts +90 -0
- package/dist/deprecated.js +106 -0
- package/dist/evidence/browser-hygiene.js +42 -0
- package/dist/evidence/desktop-recorder.d.ts +39 -0
- package/dist/evidence/desktop-recorder.js +340 -0
- package/dist/evidence/desktop-recording-artifact.d.ts +5 -0
- package/dist/evidence/desktop-recording-artifact.js +53 -0
- package/dist/evidence/desktop-recording-types.d.ts +27 -0
- package/dist/evidence/desktop-recording-types.js +16 -0
- package/dist/evidence/encoded-text.d.ts +27 -0
- package/dist/evidence/encoded-text.js +243 -0
- package/dist/evidence/frame-signature.d.ts +17 -0
- package/dist/evidence/frame-signature.js +111 -0
- package/dist/evidence/image.d.ts +24 -0
- package/dist/evidence/image.js +170 -0
- package/dist/evidence/plain-text.d.ts +8 -0
- package/dist/evidence/plain-text.js +16 -0
- package/dist/evidence/redaction.d.ts +110 -0
- package/dist/evidence/redaction.js +329 -0
- package/dist/feedback/draft.d.ts +58 -0
- package/dist/feedback/draft.js +309 -0
- package/dist/feedback/export-bundle.d.ts +6 -0
- package/dist/feedback/export-bundle.js +585 -0
- package/dist/feedback/export.d.ts +50 -0
- package/dist/feedback/export.js +392 -0
- package/dist/feedback/feedback.d.ts +37 -0
- package/dist/feedback/feedback.js +282 -0
- package/dist/feedback/proof.d.ts +8 -0
- package/dist/feedback/proof.js +56 -0
- package/dist/guest/bootstrap.d.ts +55 -0
- package/dist/guest/bootstrap.js +348 -0
- package/dist/guest/browser-tools.d.ts +8 -0
- package/dist/guest/browser-tools.js +72 -0
- package/dist/guest/chromium-text.d.ts +62 -0
- package/dist/guest/chromium-text.js +386 -0
- package/dist/guest/desktop-executor.d.ts +57 -0
- package/dist/guest/desktop-executor.js +256 -0
- package/dist/guest/desktop-keys.d.ts +8 -0
- package/dist/guest/desktop-keys.js +89 -0
- package/dist/guest/desktop-media.d.ts +70 -0
- package/dist/guest/desktop-media.js +385 -0
- package/dist/guest/desktop-native.d.ts +14 -0
- package/dist/guest/desktop-native.js +156 -0
- package/dist/guest/media-config.d.ts +15 -0
- package/dist/guest/media-config.js +16 -0
- package/dist/guest/runtime-desktop.d.ts +45 -0
- package/dist/guest/runtime-desktop.js +420 -0
- package/dist/guest/runtime-processes.d.ts +28 -0
- package/dist/guest/runtime-processes.js +94 -0
- package/dist/guest/runtime.d.ts +31 -0
- package/dist/guest/runtime.js +124 -0
- package/dist/guest-media-worker.js +184 -48
- package/dist/guest-runtime-main.js +23 -10
- package/dist/guest-runtime-revision.js +1 -1
- package/dist/index.d.ts +32 -83
- package/dist/index.js +21 -42
- package/dist/keys/env-file.d.ts +15 -0
- package/dist/keys/env-file.js +109 -0
- package/dist/keys/key-resolution.d.ts +58 -0
- package/dist/keys/key-resolution.js +389 -0
- package/dist/lab/adapter-extension.d.ts +75 -0
- package/dist/lab/adapter-extension.js +253 -0
- package/dist/lab/adapter-scorer-loader.d.ts +43 -0
- package/dist/lab/adapter-scorer-loader.js +130 -0
- package/dist/lab/bag-overrides.d.ts +18 -0
- package/dist/lab/bag-overrides.js +121 -0
- package/dist/lab/composition-rules.d.ts +5 -0
- package/dist/lab/composition-rules.js +283 -0
- package/dist/lab/config.d.ts +7 -0
- package/dist/lab/config.js +208 -0
- package/dist/lab/device-presets.d.ts +97 -0
- package/dist/lab/device-presets.js +87 -0
- package/dist/lab/discover.d.ts +65 -0
- package/dist/lab/discover.js +422 -0
- package/dist/lab/doctor.d.ts +39 -0
- package/dist/lab/doctor.js +233 -0
- package/dist/lab/init-paths.d.ts +5 -0
- package/dist/lab/init-paths.js +89 -0
- package/dist/lab/init-plan.d.ts +20 -0
- package/dist/lab/init-plan.js +163 -0
- package/dist/lab/init-templates.d.ts +28 -0
- package/dist/lab/init-templates.js +416 -0
- package/dist/lab/init.d.ts +39 -0
- package/dist/lab/init.js +287 -0
- package/dist/lab/keys.d.ts +2 -0
- package/dist/lab/keys.js +264 -0
- package/dist/lab/parse/actors.d.ts +14 -0
- package/dist/lab/parse/actors.js +453 -0
- package/dist/lab/parse/comms.d.ts +12 -0
- package/dist/lab/parse/comms.js +246 -0
- package/dist/lab/parse/execution.d.ts +19 -0
- package/dist/lab/parse/execution.js +356 -0
- package/dist/lab/parse/subject-state.d.ts +30 -0
- package/dist/lab/parse/subject-state.js +179 -0
- package/dist/lab/parse/subject.d.ts +9 -0
- package/dist/lab/parse/subject.js +420 -0
- package/dist/lab/parse/values.d.ts +17 -0
- package/dist/lab/parse/values.js +65 -0
- package/dist/lab/participant-assignment.d.ts +12 -0
- package/dist/lab/participant-assignment.js +19 -0
- package/dist/lab/persona-resolve.d.ts +39 -0
- package/dist/lab/persona-resolve.js +118 -0
- package/dist/lab/persona.d.ts +39 -0
- package/dist/lab/persona.js +192 -0
- package/dist/lab/plan-base.d.ts +24 -0
- package/dist/lab/plan-base.js +113 -0
- package/dist/lab/plan-participants.d.ts +81 -0
- package/dist/lab/plan-participants.js +92 -0
- package/dist/lab/plan-types.d.ts +269 -0
- package/dist/lab/plan-types.js +5 -0
- package/dist/lab/plan.d.ts +27 -0
- package/dist/lab/plan.js +156 -0
- package/dist/lab/preflight-probes.d.ts +3 -0
- package/dist/lab/preflight-probes.js +312 -0
- package/dist/lab/preflight-result.d.ts +7 -0
- package/dist/lab/preflight-result.js +43 -0
- package/dist/lab/preflight.d.ts +95 -0
- package/dist/lab/preflight.js +117 -0
- package/dist/lab/route-inputs.d.ts +17 -0
- package/dist/lab/route-inputs.js +95 -0
- package/dist/lab/routing.d.ts +81 -0
- package/dist/lab/routing.js +214 -0
- package/dist/lab/run-lab-events.d.ts +69 -0
- package/dist/lab/run-lab-events.js +95 -0
- package/dist/lab/run-lab-options.d.ts +82 -0
- package/dist/lab/run-lab-options.js +399 -0
- package/dist/lab/summary.d.ts +60 -0
- package/dist/lab/summary.js +168 -0
- package/dist/lab/tasks.d.ts +91 -0
- package/dist/lab/tasks.js +139 -0
- package/dist/lab/types.d.ts +813 -0
- package/dist/lab/types.js +6 -0
- package/dist/lab/validation.d.ts +67 -0
- package/dist/lab/validation.js +387 -0
- package/dist/lab/warnings.d.ts +2 -0
- package/dist/lab/warnings.js +338 -0
- package/dist/observer/artifact.d.ts +23 -0
- package/dist/observer/artifact.js +235 -0
- package/dist/observer/data.d.ts +115 -0
- package/dist/observer/data.js +258 -0
- package/dist/observer/exposure.d.ts +64 -0
- package/dist/observer/exposure.js +143 -0
- package/dist/observer/http.js +50 -0
- package/dist/observer/library.js +190 -0
- package/dist/observer/listen.js +85 -0
- package/dist/observer/live.d.ts +9 -0
- package/dist/observer/live.js +25 -0
- package/dist/observer/pinned-files.d.ts +30 -0
- package/dist/observer/pinned-files.js +160 -0
- package/dist/observer/render.d.ts +69 -0
- package/dist/observer/render.js +350 -0
- package/dist/observer/run-inventory.d.ts +35 -0
- package/dist/observer/run-inventory.js +95 -0
- package/dist/observer/run-routes.d.ts +37 -0
- package/dist/observer/run-routes.js +373 -0
- package/dist/observer/serve.d.ts +97 -0
- package/dist/observer/serve.js +305 -0
- package/dist/observer/static.js +369 -0
- package/dist/observer/tunnel.js +112 -0
- package/dist/observer-app.html +9 -20
- package/dist/routes/computer-use/bundle-parts.d.ts +50 -0
- package/dist/routes/computer-use/bundle-parts.js +177 -0
- package/dist/routes/computer-use/bundle.d.ts +56 -0
- package/dist/routes/computer-use/bundle.js +184 -0
- package/dist/routes/computer-use/diagnostics.d.ts +38 -0
- package/dist/routes/computer-use/diagnostics.js +94 -0
- package/dist/routes/computer-use/e2b-desktop/comms.d.ts +65 -0
- package/dist/routes/computer-use/e2b-desktop/comms.js +225 -0
- package/dist/routes/computer-use/e2b-desktop/desktop.d.ts +3 -0
- package/dist/routes/computer-use/e2b-desktop/desktop.js +91 -0
- package/dist/routes/computer-use/e2b-desktop/fidelity.d.ts +65 -0
- package/dist/routes/computer-use/e2b-desktop/fidelity.js +156 -0
- package/dist/routes/computer-use/e2b-desktop/prepare.d.ts +18 -0
- package/dist/routes/computer-use/e2b-desktop/prepare.js +198 -0
- package/dist/routes/computer-use/e2b-desktop/start.d.ts +14 -0
- package/dist/routes/computer-use/e2b-desktop/start.js +193 -0
- package/dist/routes/computer-use/e2b-desktop/state.d.ts +65 -0
- package/dist/routes/computer-use/e2b-desktop/state.js +69 -0
- package/dist/routes/computer-use/e2b-desktop/teardown.d.ts +6 -0
- package/dist/routes/computer-use/e2b-desktop/teardown.js +152 -0
- package/dist/routes/computer-use/external-comms.d.ts +20 -0
- package/dist/routes/computer-use/external-comms.js +55 -0
- package/dist/routes/computer-use/fanout-bundle.d.ts +11 -0
- package/dist/routes/computer-use/fanout-bundle.js +274 -0
- package/dist/routes/computer-use/fanout-lanes.d.ts +15 -0
- package/dist/routes/computer-use/fanout-lanes.js +302 -0
- package/dist/routes/computer-use/in-process-desktop.d.ts +17 -0
- package/dist/routes/computer-use/in-process-desktop.js +40 -0
- package/dist/routes/computer-use/lanes.d.ts +35 -0
- package/dist/routes/computer-use/lanes.js +321 -0
- package/dist/routes/computer-use/legacy-lane-spec.d.ts +62 -0
- package/dist/routes/computer-use/legacy-lane-spec.js +39 -0
- package/dist/routes/computer-use/live-flush.d.ts +42 -0
- package/dist/routes/computer-use/live-flush.js +154 -0
- package/dist/routes/computer-use/local-tree-pack.d.ts +27 -0
- package/dist/routes/computer-use/local-tree-pack.js +47 -0
- package/dist/routes/computer-use/local-vm.d.ts +20 -0
- package/dist/routes/computer-use/local-vm.js +218 -0
- package/dist/routes/computer-use/participant-desktop.d.ts +63 -0
- package/dist/routes/computer-use/participant-desktop.js +33 -0
- package/dist/routes/computer-use/participant-facts.d.ts +6 -0
- package/dist/routes/computer-use/participant-facts.js +22 -0
- package/dist/routes/computer-use/participant-model.d.ts +30 -0
- package/dist/routes/computer-use/participant-model.js +222 -0
- package/dist/routes/computer-use/participant-prompt.d.ts +53 -0
- package/dist/routes/computer-use/participant-prompt.js +87 -0
- package/dist/routes/computer-use/participant-runs.d.ts +67 -0
- package/dist/routes/computer-use/participant-runs.js +255 -0
- package/dist/routes/computer-use/plan.d.ts +56 -0
- package/dist/routes/computer-use/plan.js +308 -0
- package/dist/routes/computer-use/preflight.d.ts +26 -0
- package/dist/routes/computer-use/preflight.js +85 -0
- package/dist/routes/computer-use/rerun-selection.d.ts +19 -0
- package/dist/routes/computer-use/rerun-selection.js +121 -0
- package/dist/routes/computer-use/result.d.ts +7 -0
- package/dist/routes/computer-use/result.js +292 -0
- package/dist/routes/computer-use/route.d.ts +33 -0
- package/dist/routes/computer-use/route.js +145 -0
- package/dist/routes/computer-use/run-lanes.d.ts +59 -0
- package/dist/routes/computer-use/run-lanes.js +135 -0
- package/dist/routes/computer-use/self-report.d.ts +21 -0
- package/dist/routes/computer-use/self-report.js +231 -0
- package/dist/routes/computer-use/setup.d.ts +136 -0
- package/dist/routes/computer-use/setup.js +371 -0
- package/dist/routes/computer-use/single-bundle.d.ts +97 -0
- package/dist/routes/computer-use/single-bundle.js +393 -0
- package/dist/routes/computer-use/subject-projection.d.ts +51 -0
- package/dist/routes/computer-use/subject-projection.js +159 -0
- package/dist/routes/computer-use/types.d.ts +539 -0
- package/dist/routes/computer-use/types.js +37 -0
- package/dist/routes/preview.d.ts +13 -0
- package/dist/routes/preview.js +36 -0
- package/dist/routes/scripted/bundle.d.ts +47 -0
- package/dist/routes/scripted/bundle.js +195 -0
- package/dist/routes/scripted/plan.d.ts +30 -0
- package/dist/routes/scripted/plan.js +95 -0
- package/dist/routes/scripted/result.d.ts +48 -0
- package/dist/routes/scripted/result.js +176 -0
- package/dist/routes/scripted/route.d.ts +28 -0
- package/dist/routes/scripted/route.js +218 -0
- package/dist/routes/scripted/scenario.d.ts +21 -0
- package/dist/routes/scripted/scenario.js +102 -0
- package/dist/routes/scripted/session-result.d.ts +8 -0
- package/dist/routes/scripted/session-result.js +60 -0
- package/dist/routes/scripted/setup.d.ts +45 -0
- package/dist/routes/scripted/setup.js +126 -0
- package/dist/routes/scripted/subject.d.ts +49 -0
- package/dist/routes/scripted/subject.js +156 -0
- package/dist/routes/scripted/surface-records.d.ts +26 -0
- package/dist/routes/scripted/surface-records.js +88 -0
- package/dist/routes/scripted/surface-sessions.d.ts +13 -0
- package/dist/routes/scripted/surface-sessions.js +40 -0
- package/dist/routes/scripted/types.d.ts +88 -0
- package/dist/routes/scripted/types.js +3 -0
- package/dist/routes/shared-world/bundle.d.ts +20 -0
- package/dist/routes/shared-world/bundle.js +446 -0
- package/dist/routes/shared-world/checkpoints.d.ts +25 -0
- package/dist/routes/shared-world/checkpoints.js +46 -0
- package/dist/routes/shared-world/comms.d.ts +68 -0
- package/dist/routes/shared-world/comms.js +176 -0
- package/dist/routes/shared-world/external-public.d.ts +21 -0
- package/dist/routes/shared-world/external-public.js +130 -0
- package/dist/routes/shared-world/handoff.d.ts +62 -0
- package/dist/routes/shared-world/handoff.js +348 -0
- package/dist/routes/shared-world/lobby-code.d.ts +25 -0
- package/dist/routes/shared-world/lobby-code.js +152 -0
- package/dist/routes/shared-world/plan.d.ts +27 -0
- package/dist/routes/shared-world/plan.js +174 -0
- package/dist/routes/shared-world/provenance.d.ts +27 -0
- package/dist/routes/shared-world/provenance.js +65 -0
- package/dist/routes/shared-world/provisioned.d.ts +57 -0
- package/dist/routes/shared-world/provisioned.js +505 -0
- package/dist/routes/shared-world/result.d.ts +18 -0
- package/dist/routes/shared-world/result.js +327 -0
- package/dist/routes/shared-world/route.d.ts +21 -0
- package/dist/routes/shared-world/route.js +277 -0
- package/dist/routes/shared-world/seat-records.d.ts +20 -0
- package/dist/routes/shared-world/seat-records.js +213 -0
- package/dist/routes/shared-world/seats.d.ts +38 -0
- package/dist/routes/shared-world/seats.js +208 -0
- package/dist/routes/shared-world/setup.d.ts +48 -0
- package/dist/routes/shared-world/setup.js +200 -0
- package/dist/routes/shared-world/types.d.ts +354 -0
- package/dist/routes/shared-world/types.js +29 -0
- package/dist/routes/terminal/adapter.d.ts +37 -0
- package/dist/routes/terminal/adapter.js +201 -0
- package/dist/routes/terminal/bundle.d.ts +79 -0
- package/dist/routes/terminal/bundle.js +305 -0
- package/dist/routes/terminal/credentials.d.ts +34 -0
- package/dist/routes/terminal/credentials.js +102 -0
- package/dist/routes/terminal/dry-run.d.ts +24 -0
- package/dist/routes/terminal/dry-run.js +157 -0
- package/dist/routes/terminal/encoding.js +79 -0
- package/dist/routes/terminal/ledger.d.ts +49 -0
- package/dist/routes/terminal/ledger.js +170 -0
- package/dist/routes/terminal/lifetime.d.ts +10 -0
- package/dist/routes/terminal/lifetime.js +22 -0
- package/dist/routes/terminal/live-finish.d.ts +31 -0
- package/dist/routes/terminal/live-finish.js +215 -0
- package/dist/routes/terminal/live-sandbox.d.ts +69 -0
- package/dist/routes/terminal/live-sandbox.js +452 -0
- package/dist/routes/terminal/persona.d.ts +20 -0
- package/dist/routes/terminal/persona.js +34 -0
- package/dist/routes/terminal/plan.d.ts +21 -0
- package/dist/routes/terminal/plan.js +115 -0
- package/dist/routes/terminal/recorder.d.ts +23 -0
- package/dist/routes/terminal/recorder.js +77 -0
- package/dist/routes/terminal/result.d.ts +47 -0
- package/dist/routes/terminal/result.js +114 -0
- package/dist/routes/terminal/route.d.ts +23 -0
- package/dist/routes/terminal/route.js +170 -0
- package/dist/routes/terminal/runtime-auth.d.ts +12 -0
- package/dist/routes/terminal/runtime-auth.js +23 -0
- package/dist/routes/terminal/runtime.d.ts +14 -0
- package/dist/routes/terminal/runtime.js +47 -0
- package/dist/routes/terminal/sandbox.d.ts +35 -0
- package/dist/routes/terminal/sandbox.js +126 -0
- package/dist/routes/terminal/session.d.ts +25 -0
- package/dist/routes/terminal/session.js +199 -0
- package/dist/routes/terminal/token-usage.d.ts +15 -0
- package/dist/routes/terminal/token-usage.js +93 -0
- package/dist/routes/terminal/trace.d.ts +40 -0
- package/dist/routes/terminal/trace.js +172 -0
- package/dist/routes/terminal/types.d.ts +342 -0
- package/dist/routes/terminal/types.js +31 -0
- package/dist/run/bundle-shape.d.ts +7 -0
- package/dist/run/bundle-shape.js +369 -0
- package/dist/run/bundle.d.ts +547 -0
- package/dist/run/bundle.js +44 -0
- package/dist/run/concurrency.js +24 -0
- package/dist/run/contained-output.d.ts +50 -0
- package/dist/run/contained-output.js +351 -0
- package/dist/run/cost-summary.d.ts +28 -0
- package/dist/run/cost-summary.js +213 -0
- package/dist/run/costs.js +140 -0
- package/dist/run/detail.d.ts +62 -0
- package/dist/run/detail.js +139 -0
- package/dist/run/dry-run-inputs.d.ts +9 -0
- package/dist/run/dry-run-inputs.js +90 -0
- package/dist/run/dry-run.d.ts +6 -0
- package/dist/run/dry-run.js +362 -0
- package/dist/run/feedback-shape.d.ts +7 -0
- package/dist/run/feedback-shape.js +89 -0
- package/dist/run/git-state.d.ts +35 -0
- package/dist/run/git-state.js +316 -0
- package/dist/run/git-workspace.d.ts +32 -0
- package/dist/run/git-workspace.js +450 -0
- package/dist/run/judge.d.ts +210 -0
- package/dist/run/judge.js +240 -0
- package/dist/run/locate.d.ts +22 -0
- package/dist/run/locate.js +122 -0
- package/dist/run/outcomes.d.ts +31 -0
- package/dist/run/outcomes.js +210 -0
- package/dist/run/participant-records.d.ts +28 -0
- package/dist/run/participant-records.js +63 -0
- package/dist/run/participant.d.ts +29 -0
- package/dist/run/participant.js +12 -0
- package/dist/run/paths.d.ts +79 -0
- package/dist/run/paths.js +356 -0
- package/dist/run/preflight-receipts.d.ts +46 -0
- package/dist/run/preflight-receipts.js +173 -0
- package/dist/run/pricing.d.ts +124 -0
- package/dist/run/pricing.js +298 -0
- package/dist/run/project.d.ts +8 -0
- package/dist/run/project.js +103 -0
- package/dist/run/projection.d.ts +184 -0
- package/dist/run/projection.js +356 -0
- package/dist/run/reclaim.d.ts +41 -0
- package/dist/run/reclaim.js +183 -0
- package/dist/run/results.d.ts +88 -0
- package/dist/run/results.js +3 -0
- package/dist/run/run-index.d.ts +107 -0
- package/dist/run/run-index.js +243 -0
- package/dist/run/run.d.ts +103 -0
- package/dist/run/run.js +199 -0
- package/dist/run/sandbox-receipts.d.ts +31 -0
- package/dist/run/sandbox-receipts.js +49 -0
- package/dist/run/shared-world-evidence.d.ts +220 -0
- package/dist/run/shared-world-evidence.js +49 -0
- package/dist/run/shared-world-shape.d.ts +26 -0
- package/dist/run/shared-world-shape.js +181 -0
- package/dist/run/stats.d.ts +82 -0
- package/dist/run/stats.js +258 -0
- package/dist/run/status.d.ts +111 -0
- package/dist/run/status.js +176 -0
- package/dist/run/stored-runs.d.ts +38 -0
- package/dist/run/stored-runs.js +273 -0
- package/dist/run/stream-shape.d.ts +4 -0
- package/dist/run/stream-shape.js +160 -0
- package/dist/run/streams.d.ts +257 -0
- package/dist/run/streams.js +12 -0
- package/dist/run/study-files.d.ts +35 -0
- package/dist/run/study-files.js +164 -0
- package/dist/run/terminal-contract.d.ts +25 -0
- package/dist/run/terminal-contract.js +47 -0
- package/dist/run/text.d.ts +2 -0
- package/dist/run/text.js +4 -0
- package/dist/run/transient-comms-secrets.js +72 -0
- package/dist/run/type-guards.d.ts +6 -0
- package/dist/run/type-guards.js +18 -0
- package/dist/run-lab.d.ts +110 -0
- package/dist/run-lab.js +148 -0
- package/dist/subject/clone.d.ts +37 -0
- package/dist/subject/clone.js +62 -0
- package/dist/subject/desktop-cli.d.ts +17 -0
- package/dist/subject/desktop-cli.js +51 -0
- package/dist/subject/local-tree-archive.d.ts +82 -0
- package/dist/subject/local-tree-archive.js +431 -0
- package/dist/subject/local-tree.d.ts +28 -0
- package/dist/subject/local-tree.js +58 -0
- package/dist/subject/node-bootstrap.d.ts +12 -0
- package/dist/subject/node-bootstrap.js +66 -0
- package/dist/subject/runtime.d.ts +13 -0
- package/dist/subject/runtime.js +50 -0
- package/dist/subject/serve.d.ts +39 -0
- package/dist/subject/serve.js +249 -0
- package/dist/subject/state.d.ts +23 -0
- package/dist/subject/state.js +58 -0
- package/dist/subject/steps.d.ts +37 -0
- package/dist/subject/steps.js +39 -0
- package/dist/substrates/command-failure.d.ts +23 -0
- package/dist/substrates/command-failure.js +45 -0
- package/dist/substrates/desktop-session.d.ts +41 -0
- package/dist/substrates/desktop-session.js +59 -0
- package/dist/substrates/detached.d.ts +55 -0
- package/dist/substrates/detached.js +139 -0
- package/dist/substrates/e2b/cdp-probe.d.ts +99 -0
- package/dist/substrates/e2b/cdp-probe.js +556 -0
- package/dist/substrates/e2b/desktop-browser.d.ts +81 -0
- package/dist/substrates/e2b/desktop-browser.js +410 -0
- package/dist/substrates/e2b/desktop-cdp.d.ts +77 -0
- package/dist/substrates/e2b/desktop-cdp.js +211 -0
- package/dist/substrates/e2b/desktop-executor.d.ts +92 -0
- package/dist/substrates/e2b/desktop-executor.js +302 -0
- package/dist/substrates/e2b/desktop-geometry.d.ts +83 -0
- package/dist/substrates/e2b/desktop-geometry.js +331 -0
- package/dist/substrates/e2b/desktop-media.d.ts +29 -0
- package/dist/substrates/e2b/desktop-media.js +151 -0
- package/dist/substrates/e2b/desktop-recording.d.ts +18 -0
- package/dist/substrates/e2b/desktop-recording.js +238 -0
- package/dist/substrates/e2b/desktop-resources.d.ts +11 -0
- package/dist/substrates/e2b/desktop-resources.js +35 -0
- package/dist/substrates/e2b/desktop-screenshot-cleanup.d.ts +15 -0
- package/dist/substrates/e2b/desktop-screenshot-cleanup.js +66 -0
- package/dist/substrates/e2b/lifetime.d.ts +12 -0
- package/dist/substrates/e2b/lifetime.js +18 -0
- package/dist/substrates/e2b/sandbox.d.ts +102 -0
- package/dist/substrates/e2b/sandbox.js +202 -0
- package/dist/substrates/e2b/sdk.d.ts +194 -0
- package/dist/substrates/e2b/sdk.js +168 -0
- package/dist/substrates/e2b/shell.d.ts +10 -0
- package/dist/substrates/e2b/shell.js +61 -0
- package/dist/substrates/local/captured-inbox.d.ts +6 -0
- package/dist/substrates/local/captured-inbox.js +87 -0
- package/dist/substrates/local/firecracker-desktop.d.ts +25 -0
- package/dist/substrates/local/firecracker-desktop.js +315 -0
- package/dist/substrates/local/runtime-config.d.ts +6 -0
- package/dist/substrates/local/runtime-config.js +91 -0
- package/dist/substrates/local/runtime-host.d.ts +30 -0
- package/dist/substrates/local/runtime-host.js +143 -0
- package/dist/substrates/local/runtime-release.d.ts +5 -0
- package/dist/substrates/local/runtime-release.js +32 -0
- package/dist/substrates/local/runtime-ssh.d.ts +9 -0
- package/dist/substrates/local/runtime-ssh.js +129 -0
- package/dist/substrates/local/runtime.d.ts +25 -0
- package/dist/substrates/local/runtime.js +190 -0
- package/dist/substrates/shell.d.ts +44 -0
- package/dist/substrates/shell.js +22 -0
- package/dist/tui/actions.d.ts +39 -0
- package/dist/tui/actions.js +203 -0
- package/dist/tui/contract.d.ts +144 -0
- package/dist/tui/contract.js +52 -0
- package/dist/tui/launch.js +172 -0
- package/dist/tui/project.d.ts +10 -0
- package/dist/tui/project.js +17 -0
- package/dist/tui-app.js +125 -125
- package/dist/verify/actor.d.ts +27 -0
- package/dist/verify/actor.js +292 -0
- package/dist/verify/artifacts.d.ts +47 -0
- package/dist/verify/artifacts.js +373 -0
- package/dist/verify/costs.d.ts +30 -0
- package/dist/verify/costs.js +129 -0
- package/dist/verify/liveness.d.ts +7 -0
- package/dist/verify/liveness.js +72 -0
- package/dist/verify/rerun.d.ts +3 -0
- package/dist/verify/rerun.js +46 -0
- package/dist/verify/shared-world-concurrent.d.ts +11 -0
- package/dist/verify/shared-world-concurrent.js +346 -0
- package/dist/verify/shared-world.d.ts +8 -0
- package/dist/verify/shared-world.js +295 -0
- package/dist/verify/subject.d.ts +17 -0
- package/dist/verify/subject.js +123 -0
- package/dist/verify/verify.d.ts +34 -0
- package/dist/verify/verify.js +333 -0
- package/docs/README.md +67 -0
- package/docs/architecture/actor-contract.md +215 -174
- package/docs/architecture/browser-control.md +51 -37
- package/docs/architecture/comms-inbox.md +8 -8
- package/docs/architecture/desktop-recording.md +2 -2
- package/docs/architecture/desktop-sessions.md +33 -21
- package/docs/architecture/external-public-shared-world.md +80 -64
- package/docs/architecture/github-feedback-loop.md +40 -27
- package/docs/architecture/guest-desktop.md +22 -10
- package/docs/architecture/local-browser-runtime.md +30 -21
- package/docs/architecture/observer-review.md +9 -9
- package/docs/architecture/observer.md +53 -57
- package/docs/architecture/participant-media.md +3 -3
- package/docs/architecture/project-layout.md +33 -137
- package/docs/architecture/real-email-receiving.md +7 -6
- package/docs/architecture/restricted-codex-analysis.md +211 -25
- package/docs/architecture/serve.md +89 -87
- package/docs/architecture/state-driven-executor.md +79 -64
- package/docs/architecture/task-protocol-support.md +18 -18
- package/docs/architecture/terminal-product-lane.md +92 -86
- package/docs/contracts/adapter-admission.md +8 -4
- package/docs/contracts/adapter-fixtures.md +6 -6
- package/docs/contracts/core.md +22 -24
- package/docs/contracts/feedback.md +33 -23
- package/docs/contracts/policy.md +28 -31
- package/docs/contracts/run-bundle.md +168 -82
- package/docs/contracts/schemas.md +594 -379
- package/docs/contracts/study-analysis.md +2 -2
- package/docs/contracts/study-costs.md +12 -12
- package/docs/decisions/0001-run-bundle-is-the-source-of-truth.md +36 -0
- package/docs/decisions/0002-observer-is-one-self-contained-file.md +30 -0
- package/docs/decisions/0003-contained-paths-and-cleanup-authority.md +35 -0
- package/docs/decisions/0004-participant-desktops-stay-in-the-route.md +31 -0
- package/docs/decisions/README.md +16 -0
- package/docs/goals/current.md +22 -46
- package/docs/principles/actor-fidelity.md +51 -63
- package/docs/principles/engineering.md +81 -0
- package/docs/principles/invariants-and-defaults.md +48 -45
- package/docs/principles/self-driving-harness.md +11 -10
- package/docs/principles/three-roles.md +12 -13
- package/docs/product/automatic-analysis.md +39 -9
- package/docs/product/lobby-trivia-3player-external-public.md +14 -13
- package/docs/product/open-source-install-experience.md +34 -38
- package/docs/ramp/README.md +91 -213
- package/docs/release/open-source-readiness.md +5 -2
- package/docs/release/public-readiness-standard.md +1 -1
- package/examples/README.md +11 -0
- package/examples/participant/README.md +80 -0
- package/examples/participant/app.mjs +55 -0
- package/examples/participant/run.mjs +116 -0
- package/examples/scorer/README.md +29 -0
- package/examples/scorer/run.mjs +63 -0
- package/examples/scorer/scorer.mjs +20 -0
- package/package.json +61 -57
- package/skills/humanish/SKILL.md +112 -83
- package/skills/humanish/agents/openai.yaml +2 -2
- package/dist/actor-contract.d.ts +0 -288
- package/dist/actor-contract.js +0 -340
- package/dist/actor-contract.js.map +0 -1
- package/dist/actor-goal-source.js +0 -32
- package/dist/actor-goal-source.js.map +0 -1
- package/dist/actor-registry.d.ts +0 -77
- package/dist/actor-registry.js +0 -106
- package/dist/actor-registry.js.map +0 -1
- package/dist/actor-stop-cause.d.ts +0 -9
- package/dist/actor-stop-cause.js +0 -42
- package/dist/actor-stop-cause.js.map +0 -1
- package/dist/adapter-extension.d.ts +0 -76
- package/dist/adapter-extension.js +0 -273
- package/dist/adapter-extension.js.map +0 -1
- package/dist/adapter-scorer-loader.d.ts +0 -42
- package/dist/adapter-scorer-loader.js +0 -129
- package/dist/adapter-scorer-loader.js.map +0 -1
- package/dist/affordance.d.ts +0 -53
- package/dist/affordance.js +0 -145
- package/dist/affordance.js.map +0 -1
- package/dist/agent-session.js +0 -43
- package/dist/agent-session.js.map +0 -1
- package/dist/argv.d.ts +0 -1
- package/dist/argv.js +0 -8
- package/dist/argv.js.map +0 -1
- package/dist/artifact-reference.d.ts +0 -22
- package/dist/artifact-reference.js +0 -47
- package/dist/artifact-reference.js.map +0 -1
- package/dist/automatic-analysis-completion.d.ts +0 -25
- package/dist/automatic-analysis-completion.js +0 -56
- package/dist/automatic-analysis-completion.js.map +0 -1
- package/dist/automatic-analysis-config.d.ts +0 -38
- package/dist/automatic-analysis-config.js +0 -68
- package/dist/automatic-analysis-config.js.map +0 -1
- package/dist/automatic-study-analysis.d.ts +0 -17
- package/dist/automatic-study-analysis.js +0 -195
- package/dist/automatic-study-analysis.js.map +0 -1
- package/dist/browser-control-client.d.ts +0 -18
- package/dist/browser-control-client.js +0 -176
- package/dist/browser-control-client.js.map +0 -1
- package/dist/browser-control-dispatcher.d.ts +0 -19
- package/dist/browser-control-dispatcher.js +0 -147
- package/dist/browser-control-dispatcher.js.map +0 -1
- package/dist/browser-control-protocol.d.ts +0 -472
- package/dist/browser-control-protocol.js +0 -185
- package/dist/browser-control-protocol.js.map +0 -1
- package/dist/browser-control-recording-transfer.d.ts +0 -4
- package/dist/browser-control-recording-transfer.js +0 -42
- package/dist/browser-control-recording-transfer.js.map +0 -1
- package/dist/browser-control-transport.d.ts +0 -27
- package/dist/browser-control-transport.js +0 -177
- package/dist/browser-control-transport.js.map +0 -1
- package/dist/browser-evidence-hygiene.js +0 -43
- package/dist/browser-evidence-hygiene.js.map +0 -1
- package/dist/chrome-cdp-probe.d.ts +0 -97
- package/dist/chrome-cdp-probe.js +0 -536
- package/dist/chrome-cdp-probe.js.map +0 -1
- package/dist/claude-agent-sdk.d.ts +0 -94
- package/dist/claude-agent-sdk.js +0 -367
- package/dist/claude-agent-sdk.js.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/codex-app-server-ui.d.ts +0 -39
- package/dist/codex-app-server-ui.js +0 -357
- package/dist/codex-app-server-ui.js.map +0 -1
- package/dist/codex-app-server.d.ts +0 -144
- package/dist/codex-app-server.js +0 -754
- package/dist/codex-app-server.js.map +0 -1
- package/dist/command-failure.d.ts +0 -43
- package/dist/command-failure.js +0 -73
- package/dist/command-failure.js.map +0 -1
- package/dist/comms-agentmail.d.ts +0 -25
- package/dist/comms-agentmail.js +0 -418
- package/dist/comms-agentmail.js.map +0 -1
- package/dist/comms-catch-host.d.ts +0 -52
- package/dist/comms-catch-host.js +0 -178
- package/dist/comms-catch-host.js.map +0 -1
- package/dist/comms-connections.d.ts +0 -52
- package/dist/comms-connections.js +0 -123
- package/dist/comms-connections.js.map +0 -1
- package/dist/comms-email-catch.d.ts +0 -54
- package/dist/comms-email-catch.js +0 -212
- package/dist/comms-email-catch.js.map +0 -1
- package/dist/comms-evidence.d.ts +0 -27
- package/dist/comms-evidence.js +0 -31
- package/dist/comms-evidence.js.map +0 -1
- package/dist/comms-fake-inbox.d.ts +0 -45
- package/dist/comms-fake-inbox.js +0 -184
- package/dist/comms-fake-inbox.js.map +0 -1
- package/dist/comms-images.d.ts +0 -7
- package/dist/comms-images.js +0 -39
- package/dist/comms-images.js.map +0 -1
- package/dist/comms-inbox.d.ts +0 -66
- package/dist/comms-inbox.js +0 -389
- package/dist/comms-inbox.js.map +0 -1
- package/dist/comms-lease-store.d.ts +0 -91
- package/dist/comms-lease-store.js +0 -495
- package/dist/comms-lease-store.js.map +0 -1
- package/dist/comms-receiving-evidence.d.ts +0 -46
- package/dist/comms-receiving-evidence.js +0 -35
- package/dist/comms-receiving-evidence.js.map +0 -1
- package/dist/comms-receiving-inbox.d.ts +0 -16
- package/dist/comms-receiving-inbox.js +0 -410
- package/dist/comms-receiving-inbox.js.map +0 -1
- package/dist/comms-receiving-runtime.d.ts +0 -25
- package/dist/comms-receiving-runtime.js +0 -45
- package/dist/comms-receiving-runtime.js.map +0 -1
- package/dist/comms-receiving-types.d.ts +0 -98
- package/dist/comms-receiving-types.js +0 -2
- package/dist/comms-receiving-types.js.map +0 -1
- package/dist/comms-receiving.d.ts +0 -58
- package/dist/comms-receiving.js +0 -554
- package/dist/comms-receiving.js.map +0 -1
- package/dist/comms-sandbox-catch.d.ts +0 -229
- package/dist/comms-sandbox-catch.js +0 -737
- package/dist/comms-sandbox-catch.js.map +0 -1
- package/dist/comms-setup.d.ts +0 -40
- package/dist/comms-setup.js +0 -121
- package/dist/comms-setup.js.map +0 -1
- package/dist/comms-types.d.ts +0 -72
- package/dist/comms-types.js +0 -10
- package/dist/comms-types.js.map +0 -1
- package/dist/computer-use-actor.d.ts +0 -76
- package/dist/computer-use-actor.js +0 -68
- package/dist/computer-use-actor.js.map +0 -1
- package/dist/computer-use.d.ts +0 -429
- package/dist/computer-use.js +0 -1749
- package/dist/computer-use.js.map +0 -1
- package/dist/concurrency.js +0 -27
- package/dist/concurrency.js.map +0 -1
- package/dist/concurrent-shared-world-lab.d.ts +0 -186
- package/dist/concurrent-shared-world-lab.js +0 -2179
- package/dist/concurrent-shared-world-lab.js.map +0 -1
- package/dist/core/git-state.d.ts +0 -33
- package/dist/core/git-state.js +0 -277
- package/dist/core/git-state.js.map +0 -1
- package/dist/core/git-workspace.d.ts +0 -31
- package/dist/core/git-workspace.js +0 -447
- package/dist/core/git-workspace.js.map +0 -1
- package/dist/core/index.d.ts +0 -4
- package/dist/core/index.js +0 -3
- package/dist/core/index.js.map +0 -1
- package/dist/core/run-primitives.d.ts +0 -66
- package/dist/core/run-primitives.js +0 -120
- package/dist/core/run-primitives.js.map +0 -1
- package/dist/cua-actor-lab.d.ts +0 -855
- package/dist/cua-actor-lab.js +0 -3545
- package/dist/cua-actor-lab.js.map +0 -1
- package/dist/cua-admission-limit.d.ts +0 -12
- package/dist/cua-admission-limit.js +0 -20
- package/dist/cua-admission-limit.js.map +0 -1
- package/dist/cua-desktop-lane.d.ts +0 -35
- package/dist/cua-desktop-lane.js +0 -13
- package/dist/cua-desktop-lane.js.map +0 -1
- package/dist/cua-diagnostics.d.ts +0 -38
- package/dist/cua-diagnostics.js +0 -68
- package/dist/cua-diagnostics.js.map +0 -1
- package/dist/cua-executor-error.js +0 -48
- package/dist/cua-executor-error.js.map +0 -1
- package/dist/cua-provider-error.d.ts +0 -16
- package/dist/cua-provider-error.js +0 -35
- package/dist/cua-provider-error.js.map +0 -1
- package/dist/cua-speech.js +0 -2
- package/dist/cua-speech.js.map +0 -1
- package/dist/desktop-recorder.d.ts +0 -39
- package/dist/desktop-recorder.js +0 -226
- package/dist/desktop-recorder.js.map +0 -1
- package/dist/desktop-recording-artifact.d.ts +0 -5
- package/dist/desktop-recording-artifact.js +0 -54
- package/dist/desktop-recording-artifact.js.map +0 -1
- package/dist/desktop-recording-types.d.ts +0 -24
- package/dist/desktop-recording-types.js +0 -14
- package/dist/desktop-recording-types.js.map +0 -1
- package/dist/desktop-session.d.ts +0 -41
- package/dist/desktop-session.js +0 -47
- package/dist/desktop-session.js.map +0 -1
- package/dist/device-presets.d.ts +0 -67
- package/dist/device-presets.js +0 -55
- package/dist/device-presets.js.map +0 -1
- package/dist/doctor-lab.d.ts +0 -38
- package/dist/doctor-lab.js +0 -126
- package/dist/doctor-lab.js.map +0 -1
- package/dist/e2b-cua-desktop.d.ts +0 -3
- package/dist/e2b-cua-desktop.js +0 -708
- package/dist/e2b-cua-desktop.js.map +0 -1
- package/dist/e2b-cua-provisioning.d.ts +0 -314
- package/dist/e2b-cua-provisioning.js +0 -1219
- package/dist/e2b-cua-provisioning.js.map +0 -1
- package/dist/e2b-desktop-executor.d.ts +0 -101
- package/dist/e2b-desktop-executor.js +0 -297
- package/dist/e2b-desktop-executor.js.map +0 -1
- package/dist/e2b-desktop-launch.d.ts +0 -243
- package/dist/e2b-desktop-launch.js +0 -234
- package/dist/e2b-desktop-launch.js.map +0 -1
- package/dist/e2b-desktop-media.d.ts +0 -14
- package/dist/e2b-desktop-media.js +0 -58
- package/dist/e2b-desktop-media.js.map +0 -1
- package/dist/e2b-desktop-recording.d.ts +0 -16
- package/dist/e2b-desktop-recording.js +0 -162
- package/dist/e2b-desktop-recording.js.map +0 -1
- package/dist/e2b-desktop-resources.d.ts +0 -11
- package/dist/e2b-desktop-resources.js +0 -33
- package/dist/e2b-desktop-resources.js.map +0 -1
- package/dist/e2b-desktop-screenshot-cleanup.d.ts +0 -15
- package/dist/e2b-desktop-screenshot-cleanup.js +0 -67
- package/dist/e2b-desktop-screenshot-cleanup.js.map +0 -1
- package/dist/e2b-desktop-session.d.ts +0 -7
- package/dist/e2b-desktop-session.js +0 -29
- package/dist/e2b-desktop-session.js.map +0 -1
- package/dist/e2b-detached.d.ts +0 -53
- package/dist/e2b-detached.js +0 -130
- package/dist/e2b-detached.js.map +0 -1
- package/dist/e2b-terminal-lab.d.ts +0 -395
- package/dist/e2b-terminal-lab.js +0 -2041
- package/dist/e2b-terminal-lab.js.map +0 -1
- package/dist/env-file.d.ts +0 -14
- package/dist/env-file.js +0 -108
- package/dist/env-file.js.map +0 -1
- package/dist/export-bundle.d.ts +0 -7
- package/dist/export-bundle.js +0 -441
- package/dist/export-bundle.js.map +0 -1
- package/dist/export.d.ts +0 -49
- package/dist/export.js +0 -308
- package/dist/export.js.map +0 -1
- package/dist/feedback-proof.d.ts +0 -8
- package/dist/feedback-proof.js +0 -44
- package/dist/feedback-proof.js.map +0 -1
- package/dist/feedback.d.ts +0 -76
- package/dist/feedback.js +0 -496
- package/dist/feedback.js.map +0 -1
- package/dist/first-run-path.d.ts +0 -55
- package/dist/first-run-path.js +0 -136
- package/dist/first-run-path.js.map +0 -1
- package/dist/frame-signature.d.ts +0 -24
- package/dist/frame-signature.js +0 -128
- package/dist/frame-signature.js.map +0 -1
- package/dist/guest-bootstrap.d.ts +0 -55
- package/dist/guest-bootstrap.js +0 -285
- package/dist/guest-bootstrap.js.map +0 -1
- package/dist/guest-browser-tools.d.ts +0 -8
- package/dist/guest-browser-tools.js +0 -66
- package/dist/guest-browser-tools.js.map +0 -1
- package/dist/guest-chromium-text.d.ts +0 -27
- package/dist/guest-chromium-text.js +0 -281
- package/dist/guest-chromium-text.js.map +0 -1
- package/dist/guest-desktop-executor.d.ts +0 -22
- package/dist/guest-desktop-executor.js +0 -178
- package/dist/guest-desktop-executor.js.map +0 -1
- package/dist/guest-desktop-media.d.ts +0 -33
- package/dist/guest-desktop-media.js +0 -281
- package/dist/guest-desktop-media.js.map +0 -1
- package/dist/guest-desktop-native.d.ts +0 -14
- package/dist/guest-desktop-native.js +0 -131
- package/dist/guest-desktop-native.js.map +0 -1
- package/dist/guest-media-config.d.ts +0 -15
- package/dist/guest-media-config.js +0 -8
- package/dist/guest-media-config.js.map +0 -1
- package/dist/guest-media-worker.js.map +0 -1
- package/dist/guest-runtime-desktop.d.ts +0 -42
- package/dist/guest-runtime-desktop.js +0 -314
- package/dist/guest-runtime-desktop.js.map +0 -1
- package/dist/guest-runtime-main.js.map +0 -1
- package/dist/guest-runtime-revision.js.map +0 -1
- package/dist/guest-runtime.d.ts +0 -31
- package/dist/guest-runtime.js +0 -99
- package/dist/guest-runtime.js.map +0 -1
- package/dist/image-evidence.d.ts +0 -2
- package/dist/image-evidence.js +0 -47
- package/dist/image-evidence.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/init-templates.d.ts +0 -25
- package/dist/init-templates.js +0 -542
- package/dist/init-templates.js.map +0 -1
- package/dist/init.d.ts +0 -38
- package/dist/init.js +0 -532
- package/dist/init.js.map +0 -1
- package/dist/key-resolution.d.ts +0 -67
- package/dist/key-resolution.js +0 -375
- package/dist/key-resolution.js.map +0 -1
- package/dist/lab-app-runner.d.ts +0 -78
- package/dist/lab-app-runner.js +0 -403
- package/dist/lab-app-runner.js.map +0 -1
- package/dist/lab-config.d.ts +0 -968
- package/dist/lab-config.js +0 -2714
- package/dist/lab-config.js.map +0 -1
- package/dist/lab-engine.d.ts +0 -97
- package/dist/lab-engine.js +0 -285
- package/dist/lab-engine.js.map +0 -1
- package/dist/lab-preflight.d.ts +0 -70
- package/dist/lab-preflight.js +0 -388
- package/dist/lab-preflight.js.map +0 -1
- package/dist/lab-summary.d.ts +0 -57
- package/dist/lab-summary.js +0 -126
- package/dist/lab-summary.js.map +0 -1
- package/dist/labs.d.ts +0 -59
- package/dist/labs.js +0 -385
- package/dist/labs.js.map +0 -1
- package/dist/listen.js +0 -84
- package/dist/listen.js.map +0 -1
- package/dist/local-agent-claude-session.d.ts +0 -45
- package/dist/local-agent-claude-session.js +0 -203
- package/dist/local-agent-claude-session.js.map +0 -1
- package/dist/local-agent-cli.d.ts +0 -121
- package/dist/local-agent-cli.js +0 -427
- package/dist/local-agent-cli.js.map +0 -1
- package/dist/local-captured-inbox.d.ts +0 -6
- package/dist/local-captured-inbox.js +0 -65
- package/dist/local-captured-inbox.js.map +0 -1
- package/dist/local-firecracker-desktop.d.ts +0 -23
- package/dist/local-firecracker-desktop.js +0 -191
- package/dist/local-firecracker-desktop.js.map +0 -1
- package/dist/local-firecracker-study.d.ts +0 -9
- package/dist/local-firecracker-study.js +0 -135
- package/dist/local-firecracker-study.js.map +0 -1
- package/dist/local-runtime-config.d.ts +0 -6
- package/dist/local-runtime-config.js +0 -60
- package/dist/local-runtime-config.js.map +0 -1
- package/dist/local-runtime-host.d.ts +0 -31
- package/dist/local-runtime-host.js +0 -128
- package/dist/local-runtime-host.js.map +0 -1
- package/dist/local-runtime-release.d.ts +0 -7
- package/dist/local-runtime-release.js +0 -33
- package/dist/local-runtime-release.js.map +0 -1
- package/dist/local-runtime-ssh.d.ts +0 -27
- package/dist/local-runtime-ssh.js +0 -91
- package/dist/local-runtime-ssh.js.map +0 -1
- package/dist/local-runtime.d.ts +0 -25
- package/dist/local-runtime.js +0 -133
- package/dist/local-runtime.js.map +0 -1
- package/dist/observer-data.d.ts +0 -114
- package/dist/observer-data.js +0 -224
- package/dist/observer-data.js.map +0 -1
- package/dist/observer-library.js +0 -191
- package/dist/observer-library.js.map +0 -1
- package/dist/observer-serve.d.ts +0 -99
- package/dist/observer-serve.js +0 -284
- package/dist/observer-serve.js.map +0 -1
- package/dist/observer-static.js +0 -357
- package/dist/observer-static.js.map +0 -1
- package/dist/observer.d.ts +0 -118
- package/dist/observer.js +0 -947
- package/dist/observer.js.map +0 -1
- package/dist/openai-responses-cu.d.ts +0 -158
- package/dist/openai-responses-cu.js +0 -714
- package/dist/openai-responses-cu.js.map +0 -1
- package/dist/orientation.d.ts +0 -29
- package/dist/orientation.js +0 -95
- package/dist/orientation.js.map +0 -1
- package/dist/oss-lab.d.ts +0 -55
- package/dist/oss-lab.js +0 -344
- package/dist/oss-lab.js.map +0 -1
- package/dist/oss-meta-lab-scoring.d.ts +0 -15
- package/dist/oss-meta-lab-scoring.js +0 -145
- package/dist/oss-meta-lab-scoring.js.map +0 -1
- package/dist/oss-meta-lab.d.ts +0 -287
- package/dist/oss-meta-lab.js +0 -4551
- package/dist/oss-meta-lab.js.map +0 -1
- package/dist/oss-remote-telemetry.d.ts +0 -77
- package/dist/oss-remote-telemetry.js +0 -403
- package/dist/oss-remote-telemetry.js.map +0 -1
- package/dist/output-token-limit.js +0 -5
- package/dist/output-token-limit.js.map +0 -1
- package/dist/participant-assignment.d.ts +0 -12
- package/dist/participant-assignment.js +0 -15
- package/dist/participant-assignment.js.map +0 -1
- package/dist/persona-resolve.d.ts +0 -44
- package/dist/persona-resolve.js +0 -109
- package/dist/persona-resolve.js.map +0 -1
- package/dist/persona.d.ts +0 -35
- package/dist/persona.js +0 -141
- package/dist/persona.js.map +0 -1
- package/dist/pi-agent-core.d.ts +0 -77
- package/dist/pi-agent-core.js +0 -207
- package/dist/pi-agent-core.js.map +0 -1
- package/dist/pricing.d.ts +0 -145
- package/dist/pricing.js +0 -277
- package/dist/pricing.js.map +0 -1
- package/dist/program.d.ts +0 -96
- package/dist/program.js +0 -4029
- package/dist/program.js.map +0 -1
- package/dist/reasoning-effort.js +0 -26
- package/dist/reasoning-effort.js.map +0 -1
- package/dist/reclaim.d.ts +0 -31
- package/dist/reclaim.js +0 -90
- package/dist/reclaim.js.map +0 -1
- package/dist/redaction.d.ts +0 -90
- package/dist/redaction.js +0 -294
- package/dist/redaction.js.map +0 -1
- package/dist/restricted-codex-analysis.d.ts +0 -15
- package/dist/restricted-codex-analysis.js +0 -13
- package/dist/restricted-codex-analysis.js.map +0 -1
- package/dist/restricted-codex-participant-policy.d.ts +0 -44
- package/dist/restricted-codex-participant-policy.js +0 -43
- package/dist/restricted-codex-participant-policy.js.map +0 -1
- package/dist/restricted-codex-participant-run.d.ts +0 -20
- package/dist/restricted-codex-participant-run.js +0 -79
- package/dist/restricted-codex-participant-run.js.map +0 -1
- package/dist/restricted-codex-participant.d.ts +0 -20
- package/dist/restricted-codex-participant.js +0 -250
- package/dist/restricted-codex-participant.js.map +0 -1
- package/dist/restricted-codex-policy.d.ts +0 -64
- package/dist/restricted-codex-policy.js +0 -176
- package/dist/restricted-codex-policy.js.map +0 -1
- package/dist/restricted-codex-session.d.ts +0 -44
- package/dist/restricted-codex-session.js +0 -657
- package/dist/restricted-codex-session.js.map +0 -1
- package/dist/restricted-codex-transport.d.ts +0 -69
- package/dist/restricted-codex-transport.js +0 -296
- package/dist/restricted-codex-transport.js.map +0 -1
- package/dist/run-detail.d.ts +0 -61
- package/dist/run-detail.js +0 -137
- package/dist/run-detail.js.map +0 -1
- package/dist/run-index.d.ts +0 -71
- package/dist/run-index.js +0 -206
- package/dist/run-index.js.map +0 -1
- package/dist/run-narration-secrets.js +0 -68
- package/dist/run-narration-secrets.js.map +0 -1
- package/dist/run-paths.d.ts +0 -56
- package/dist/run-paths.js +0 -355
- package/dist/run-paths.js.map +0 -1
- package/dist/run-projection.d.ts +0 -186
- package/dist/run-projection.js +0 -350
- package/dist/run-projection.js.map +0 -1
- package/dist/run-status.d.ts +0 -139
- package/dist/run-status.js +0 -218
- package/dist/run-status.js.map +0 -1
- package/dist/run.d.ts +0 -1255
- package/dist/run.js +0 -5947
- package/dist/run.js.map +0 -1
- package/dist/sandbox-receipts.d.ts +0 -19
- package/dist/sandbox-receipts.js +0 -51
- package/dist/sandbox-receipts.js.map +0 -1
- package/dist/screenshot-image.d.ts +0 -11
- package/dist/screenshot-image.js +0 -26
- package/dist/screenshot-image.js.map +0 -1
- package/dist/scripted-browser-actor.d.ts +0 -297
- package/dist/scripted-browser-actor.js +0 -1399
- package/dist/scripted-browser-actor.js.map +0 -1
- package/dist/scripted-browser-lab.d.ts +0 -121
- package/dist/scripted-browser-lab.js +0 -852
- package/dist/scripted-browser-lab.js.map +0 -1
- package/dist/secret-prompt.js +0 -36
- package/dist/secret-prompt.js.map +0 -1
- package/dist/selected-output-paths.d.ts +0 -52
- package/dist/selected-output-paths.js +0 -366
- package/dist/selected-output-paths.js.map +0 -1
- package/dist/serve-exposure.d.ts +0 -62
- package/dist/serve-exposure.js +0 -129
- package/dist/serve-exposure.js.map +0 -1
- package/dist/serve-http.js +0 -45
- package/dist/serve-http.js.map +0 -1
- package/dist/serve-tunnel.js +0 -113
- package/dist/serve-tunnel.js.map +0 -1
- package/dist/shared-world-lab.d.ts +0 -269
- package/dist/shared-world-lab.js +0 -1422
- package/dist/shared-world-lab.js.map +0 -1
- package/dist/source-archive.d.ts +0 -82
- package/dist/source-archive.js +0 -408
- package/dist/source-archive.js.map +0 -1
- package/dist/stats.d.ts +0 -82
- package/dist/stats.js +0 -219
- package/dist/stats.js.map +0 -1
- package/dist/stop-conditions.d.ts +0 -39
- package/dist/stop-conditions.js +0 -66
- package/dist/stop-conditions.js.map +0 -1
- package/dist/study-analysis-codex-config.d.ts +0 -11
- package/dist/study-analysis-codex-config.js +0 -34
- package/dist/study-analysis-codex-config.js.map +0 -1
- package/dist/study-analysis-engine.d.ts +0 -47
- package/dist/study-analysis-engine.js +0 -327
- package/dist/study-analysis-engine.js.map +0 -1
- package/dist/study-analysis-evidence.d.ts +0 -27
- package/dist/study-analysis-evidence.js +0 -660
- package/dist/study-analysis-evidence.js.map +0 -1
- package/dist/study-analysis-job.d.ts +0 -97
- package/dist/study-analysis-job.js +0 -214
- package/dist/study-analysis-job.js.map +0 -1
- package/dist/study-analysis-provider.d.ts +0 -40
- package/dist/study-analysis-provider.js +0 -170
- package/dist/study-analysis-provider.js.map +0 -1
- package/dist/study-analysis-service.d.ts +0 -59
- package/dist/study-analysis-service.js +0 -257
- package/dist/study-analysis-service.js.map +0 -1
- package/dist/study-analysis-sharing.d.ts +0 -11
- package/dist/study-analysis-sharing.js +0 -35
- package/dist/study-analysis-sharing.js.map +0 -1
- package/dist/study-analysis-store.d.ts +0 -47
- package/dist/study-analysis-store.js +0 -493
- package/dist/study-analysis-store.js.map +0 -1
- package/dist/study-analysis-validation.d.ts +0 -618
- package/dist/study-analysis-validation.js +0 -384
- package/dist/study-analysis-validation.js.map +0 -1
- package/dist/study-analysis.d.ts +0 -206
- package/dist/study-analysis.js +0 -4
- package/dist/study-analysis.js.map +0 -1
- package/dist/study-costs.js +0 -114
- package/dist/study-costs.js.map +0 -1
- package/dist/subject-runtime.d.ts +0 -23
- package/dist/subject-runtime.js +0 -70
- package/dist/subject-runtime.js.map +0 -1
- package/dist/tasks.d.ts +0 -90
- package/dist/tasks.js +0 -144
- package/dist/tasks.js.map +0 -1
- package/dist/telemetry.js +0 -324
- package/dist/telemetry.js.map +0 -1
- package/dist/terminal-agent-actor.d.ts +0 -41
- package/dist/terminal-agent-actor.js +0 -25
- package/dist/terminal-agent-actor.js.map +0 -1
- package/dist/terminal-encoding.js +0 -80
- package/dist/terminal-encoding.js.map +0 -1
- package/dist/terminal-node-bootstrap.d.ts +0 -4
- package/dist/terminal-node-bootstrap.js +0 -58
- package/dist/terminal-node-bootstrap.js.map +0 -1
- package/dist/terminal-participant-activity.d.ts +0 -6
- package/dist/terminal-participant-activity.js +0 -34
- package/dist/terminal-participant-activity.js.map +0 -1
- package/dist/terminal-runtime-auth.d.ts +0 -13
- package/dist/terminal-runtime-auth.js +0 -24
- package/dist/terminal-runtime-auth.js.map +0 -1
- package/dist/terminal-runtime.d.ts +0 -16
- package/dist/terminal-runtime.js +0 -42
- package/dist/terminal-runtime.js.map +0 -1
- package/dist/terminal-token-usage.d.ts +0 -15
- package/dist/terminal-token-usage.js +0 -94
- package/dist/terminal-token-usage.js.map +0 -1
- package/dist/tui-actions.d.ts +0 -39
- package/dist/tui-actions.js +0 -178
- package/dist/tui-actions.js.map +0 -1
- package/dist/tui-contract.d.ts +0 -141
- package/dist/tui-contract.js +0 -54
- package/dist/tui-contract.js.map +0 -1
- package/dist/tui-launch.js +0 -167
- package/dist/tui-launch.js.map +0 -1
- package/dist/tui-project.d.ts +0 -9
- package/dist/tui-project.js +0 -18
- package/dist/tui-project.js.map +0 -1
- package/docs/architecture/examples/state-driven-local-app/README.md +0 -80
- package/docs/architecture/examples/state-driven-local-app/app.mjs +0 -48
- package/docs/architecture/examples/state-driven-local-app/runner.mjs +0 -105
- package/docs/architecture/local-codex-tui-actor.md +0 -213
- package/docs/architecture/oss-lab-poc.md +0 -250
- package/docs/architecture/runtime-broker-core.md +0 -30
- package/docs/release/0.100.0-local-setup.md +0 -31
- package/docs/release/0.100.1-participant-continuity.md +0 -20
- package/docs/release/0.101.0-codex-ui-tools.md +0 -28
- package/docs/release/0.102.0-participant-media.md +0 -43
- package/docs/release/0.103.0-desktop-recording.md +0 -29
- package/docs/release/0.103.1-analysis-capture-allocation.md +0 -18
- package/docs/release/0.103.2-analysis-ending-context.md +0 -21
- package/docs/release/0.104.0-local-captured-inboxes.md +0 -29
- package/docs/release/0.104.1-recording-startup.md +0 -24
- package/docs/release/0.104.2-recording-timestamps.md +0 -32
- package/docs/release/0.104.3-local-smtp-catch.md +0 -15
- package/docs/release/0.20.0-external-public-shared-world.md +0 -43
- package/docs/release/0.84.0-redacted-evidence.md +0 -42
- package/docs/release/0.84.1-portable-feedback.md +0 -20
- package/docs/release/0.85.0-observer-review.md +0 -56
- package/docs/release/0.85.1-observer-continuity.md +0 -20
- package/docs/release/0.86.0-participant-evidence.md +0 -50
- package/docs/release/0.86.1-task-preflight-saved-recordings.md +0 -40
- package/docs/release/0.87.0-participant-endings-and-phone-review.md +0 -64
- package/docs/release/0.88.0-study-diagnostics.md +0 -43
- package/docs/release/0.88.1-completion-evidence-and-local-app.md +0 -79
- package/docs/release/0.88.2-sequential-study-budgets.md +0 -57
- package/docs/release/0.89.0-study-findings.md +0 -79
- package/docs/release/0.89.1-analysis-finished-notice.md +0 -24
- package/docs/release/0.90.0-automatic-analysis.md +0 -21
- package/docs/release/0.91.0-analysis-quality-and-defaults.md +0 -33
- package/docs/release/0.91.1-study-review-polish.md +0 -28
- package/docs/release/0.92.0-grid-playback.md +0 -22
- package/docs/release/0.93.0-global-playback.md +0 -26
- package/docs/release/0.93.1-observer-review-controls.md +0 -24
- package/docs/release/0.94.0-reliability.md +0 -48
- package/docs/release/0.95.0-connections-setup.md +0 -38
- package/docs/release/0.96.0-real-email-receiving.md +0 -47
- package/docs/release/0.96.1-browser-navigation.md +0 -22
- package/docs/release/0.97.0-codex-account-analysis.md +0 -45
- package/docs/release/0.98.0-local-browser-studies.md +0 -31
- package/docs/release/0.99.0-local-browser-mac.md +0 -34
- package/docs/release/0.99.1-action-recovery.md +0 -19
- /package/dist/{agent-session.d.ts → actors/agent-session.d.ts} +0 -0
- /package/dist/{cua-executor-error.d.ts → actors/computer-use/executor-error.d.ts} +0 -0
- /package/dist/{cua-speech.d.ts → actors/computer-use/speech.d.ts} +0 -0
- /package/dist/{actor-goal-source.d.ts → actors/goal-source.d.ts} +0 -0
- /package/dist/{output-token-limit.d.ts → actors/output-token-limit.d.ts} +0 -0
- /package/dist/{reasoning-effort.d.ts → actors/reasoning-effort.d.ts} +0 -0
- /package/dist/{secret-prompt.d.ts → cli/secret-prompt.d.ts} +0 -0
- /package/dist/{telemetry.d.ts → cli/telemetry.d.ts} +0 -0
- /package/dist/{browser-evidence-hygiene.d.ts → evidence/browser-hygiene.d.ts} +0 -0
- /package/dist/{serve-http.d.ts → observer/http.d.ts} +0 -0
- /package/dist/{observer-library.d.ts → observer/library.d.ts} +0 -0
- /package/dist/{listen.d.ts → observer/listen.d.ts} +0 -0
- /package/dist/{observer-static.d.ts → observer/static.d.ts} +0 -0
- /package/dist/{serve-tunnel.d.ts → observer/tunnel.d.ts} +0 -0
- /package/dist/{terminal-encoding.d.ts → routes/terminal/encoding.d.ts} +0 -0
- /package/dist/{concurrency.d.ts → run/concurrency.d.ts} +0 -0
- /package/dist/{study-costs.d.ts → run/costs.d.ts} +0 -0
- /package/dist/{run-narration-secrets.d.ts → run/transient-comms-secrets.d.ts} +0 -0
- /package/dist/{tui-launch.d.ts → tui/launch.d.ts} +0 -0
|
@@ -1,852 +0,0 @@
|
|
|
1
|
-
// The scripted-browser lab backend: either an app-url subject (a loopback app the operator
|
|
2
|
-
// already runs) or one provisioned synthetic clone subject (served in E2B and exposed through
|
|
3
|
-
// getHost) driven by the REGISTRY-RESOLVED scripted-browser actor.
|
|
4
|
-
// Mirrors cua-actor-lab.ts: the descriptor returned by the registry runs the session; this
|
|
5
|
-
// backend consumes `scenario.ref` (resolves the committed scenario whose browser steps ARE the
|
|
6
|
-
// actor's behavior — no built-in fallback on the lab route, unlike `run --app-url`), composes
|
|
7
|
-
// the per-surface sessions, persists the evidence bundle, and renders the Observer.
|
|
8
|
-
//
|
|
9
|
-
// Spend posture: scripted participant steps make no model requests, and their traces record
|
|
10
|
-
// tokenUsage zeros. Post-run analysis has a separate model budget unless explicitly disabled. Local
|
|
11
|
-
// app-url runs also spend no sandbox minutes; live provisioned clone runs can spend E2B
|
|
12
|
-
// sandbox minutes to clone/serve the synthetic subject. `scenario.mode: live` is still
|
|
13
|
-
// required because the gate's justification here is ACTUATION: a live scripted run drives a
|
|
14
|
-
// real browser against a real running app (fills forms, clicks buttons — state-mutating
|
|
15
|
-
// effects), which deserves the same affirmative declaration as spend. Dry-run (the default)
|
|
16
|
-
// parses and digest-pins the scenario and emits the contract bundle without touching anything.
|
|
17
|
-
//
|
|
18
|
-
// Subject provenance (invariant 5): local app-url runs declare that the lab did NOT provision
|
|
19
|
-
// the subject, so build/commit provenance is UNPINNED and the evidence binds to the scenario
|
|
20
|
-
// digest instead. Provisioned clone runs persist structured commit/env-name/state provenance
|
|
21
|
-
// plus a host digest while never writing the raw getHost URL or secret values into artifacts.
|
|
22
|
-
import { resolveAutomaticAnalysis } from "./automatic-analysis-config.js";
|
|
23
|
-
import { completeAutomaticAnalysis, markFinalizedStudyResult } from "./automatic-analysis-completion.js";
|
|
24
|
-
import { desktopMediaValidationReason, taskProtocolValidationReason } from "./lab-config.js";
|
|
25
|
-
import { randomBytes } from "node:crypto";
|
|
26
|
-
import { describeMissingKeys } from "./key-resolution.js";
|
|
27
|
-
import { beginRunStatus, withRunStatusScope } from "./run-status.js";
|
|
28
|
-
import { realpath } from "node:fs/promises";
|
|
29
|
-
import path from "node:path";
|
|
30
|
-
import { parse as parseYaml } from "yaml";
|
|
31
|
-
import { actorRegistry, isScriptedBrowserActorDescriptor } from "./actor-registry.js";
|
|
32
|
-
import { toErrorMessage } from "./command-failure.js";
|
|
33
|
-
import { commandDigestOf, provisionCloneSubject, resolveSubjectState } from "./cua-actor-lab.js";
|
|
34
|
-
import { createDesktopSandbox, loadE2BDesktopModule } from "./e2b-desktop-launch.js";
|
|
35
|
-
import { renderObserver } from "./observer.js";
|
|
36
|
-
import { digestText, redactText } from "./redaction.js";
|
|
37
|
-
import { prepareRunArtifactPaths, validatePreparedRunArtifactPaths } from "./run-paths.js";
|
|
38
|
-
import { buildRunSource, PUBLIC_TARGET_CWD, REVIEW_SCHEMA, RUN_BUNDLE_SCHEMA } from "./run.js";
|
|
39
|
-
import { browserSurfaces, normalizeLocalAppUrl, parseBrowserPersonaJourneyFromScenario, resolveBrowserCommand, runScriptedBrowserSessionInPreparedRoot } from "./scripted-browser-actor.js";
|
|
40
|
-
import { prepareSelectedOutputDirectory, readContainedRegularFile, writeContainedOutputFile, writePreparedRunLatestPointer } from "./selected-output-paths.js";
|
|
41
|
-
export const SCRIPTED_BROWSER_LAB_SCHEMA = "humanish.scripted-lab-result.v1";
|
|
42
|
-
// Journey wall-clock budget per surface — same default as `run --app-url`.
|
|
43
|
-
// 5 minutes (was 60s): a scripted surface has zero model cost and sandbox-seconds are pennies;
|
|
44
|
-
// a short default only truncated slow-loading subjects.
|
|
45
|
-
const DEFAULT_SESSION_TIMEOUT_MS = 300_000;
|
|
46
|
-
const SANDBOX_TIMEOUT_BUFFER_MS = 10 * 60_000;
|
|
47
|
-
const SUBJECT_PROVISION_BUDGET_MS = 30 * 60_000;
|
|
48
|
-
const DEFAULT_STATE_STEP_TIMEOUT_MS = 5 * 60_000;
|
|
49
|
-
// Default surface roster is 1 (desktop only): the defaults-table single-lane row governs;
|
|
50
|
-
// `count: 2` is the declared override that adds the mobile surface.
|
|
51
|
-
const DEFAULT_SURFACE_COUNT = 1;
|
|
52
|
-
// Same public-safe token shape the lab id uses; an id-style scenario.ref must match it before
|
|
53
|
-
// it is interpolated into a repo path.
|
|
54
|
-
const SCENARIO_REF_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9_.-]*$/;
|
|
55
|
-
class UnsafeScriptedSessionResultError extends Error {
|
|
56
|
-
constructor(message) {
|
|
57
|
-
super(message);
|
|
58
|
-
this.name = "UnsafeScriptedSessionResultError";
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Wrapped so a DIRECT library caller gets the same status-record lifetime the CLI does: returning
|
|
63
|
-
* from this function finalizes any record the run opened, whichever of its fail-closed exits it
|
|
64
|
-
* took. `runLab` establishes a scope too and nesting is harmless — the inner scope owns what it
|
|
65
|
-
* opened. Without this a test or an adopter calling the backend directly leaves the 5s cadence
|
|
66
|
-
* ticking into a directory something else is deleting, which surfaces as an unrelated ENOTEMPTY.
|
|
67
|
-
*/
|
|
68
|
-
export async function runScriptedBrowserLab(options) {
|
|
69
|
-
if (String(options.config.comms?.email?.kind) === "real")
|
|
70
|
-
return {
|
|
71
|
-
schema: SCRIPTED_BROWSER_LAB_SCHEMA, ok: false, cwd: path.resolve(options.cwd), labId: options.config.id,
|
|
72
|
-
actor: options.config.actors[0]?.type ?? "", dryRun: options.dryRun,
|
|
73
|
-
runId: options.runId ?? "not-created", appUrl: options.config.subject.appUrl ?? "", sessions: [], warnings: [],
|
|
74
|
-
error: { code: "HUMANISH_SCRIPTED_LAB_SCENARIO_INVALID", message: "Real email receiving is unsupported on the scripted-browser backend. Use a supported hosted computer-use browser study." }
|
|
75
|
-
};
|
|
76
|
-
const analysisReason = resolveAutomaticAnalysis(options.config.review?.analysis);
|
|
77
|
-
const tasksReason = analysisReason.ok ? taskProtocolValidationReason(options.config, false) : analysisReason.message;
|
|
78
|
-
if (tasksReason)
|
|
79
|
-
return {
|
|
80
|
-
schema: SCRIPTED_BROWSER_LAB_SCHEMA, ok: false, cwd: path.resolve(options.cwd), labId: options.config.id,
|
|
81
|
-
actor: options.config.actors[0]?.type ?? "", dryRun: options.dryRun,
|
|
82
|
-
runId: options.runId ?? "not-created", appUrl: options.config.subject.appUrl ?? "", sessions: [], warnings: [],
|
|
83
|
-
error: { code: analysisReason.ok ? "HUMANISH_LAB_TASKS_UNSUPPORTED" : "HUMANISH_LAB_ANALYSIS_INVALID", message: tasksReason }
|
|
84
|
-
};
|
|
85
|
-
const analysis = resolveAutomaticAnalysis(options.config.review?.analysis);
|
|
86
|
-
const result = await withRunStatusScope(() => runScriptedBrowserLabInScope(options));
|
|
87
|
-
return completeAutomaticAnalysis(result, analysis.ok ? analysis.config : undefined, options.automaticAnalysis, options.config.review?.analysis === undefined ? "default" : "explicit", analysis.ok && analysis.preferLargerOutput === true);
|
|
88
|
-
}
|
|
89
|
-
async function runScriptedBrowserLabInScope(options) {
|
|
90
|
-
const { config, dryRun } = options;
|
|
91
|
-
const cwd = path.resolve(options.cwd);
|
|
92
|
-
const physicalCwd = await realpath(cwd);
|
|
93
|
-
const projectRoot = await prepareSelectedOutputDirectory(path.dirname(physicalCwd), physicalCwd);
|
|
94
|
-
const hooks = options.hooks ?? {};
|
|
95
|
-
const render = hooks.renderObserverFn ?? renderObserver;
|
|
96
|
-
const warnings = [];
|
|
97
|
-
const actorType = config.actors[0]?.type ?? "";
|
|
98
|
-
const failed = (code, message, extras) => ({
|
|
99
|
-
schema: SCRIPTED_BROWSER_LAB_SCHEMA,
|
|
100
|
-
ok: false,
|
|
101
|
-
cwd,
|
|
102
|
-
labId: config.id,
|
|
103
|
-
actor: extras?.actor ?? actorType,
|
|
104
|
-
appUrl: extras?.appUrl ?? config.subject.appUrl ?? "",
|
|
105
|
-
dryRun,
|
|
106
|
-
runId: options.runId ?? "not-created",
|
|
107
|
-
sessions: [],
|
|
108
|
-
warnings,
|
|
109
|
-
error: { code, message }
|
|
110
|
-
});
|
|
111
|
-
// Resolve the actor through the registry — the parse layer already validated this, but the
|
|
112
|
-
// engine fails closed rather than trusting a config that arrived through another door
|
|
113
|
-
// (runScriptedBrowserLab is itself exported npm surface).
|
|
114
|
-
const mediaReason = desktopMediaValidationReason(config);
|
|
115
|
-
if (mediaReason)
|
|
116
|
-
return failed("HUMANISH_SCRIPTED_LAB_SCENARIO_INVALID", mediaReason);
|
|
117
|
-
const descriptor = actorRegistry[actorType];
|
|
118
|
-
if (!descriptor || !isScriptedBrowserActorDescriptor(descriptor)) {
|
|
119
|
-
return failed("HUMANISH_SCRIPTED_LAB_ACTOR_UNSUPPORTED", `actors[0].type "${actorType}" is not a registered scripted-browser actor.`);
|
|
120
|
-
}
|
|
121
|
-
const runSession = hooks.runSession;
|
|
122
|
-
const provisionedRoute = config.subject.source === "clone";
|
|
123
|
-
const evidenceAppUrl = provisionedRoute ? "[provisioned-subject]" : normalizeLocalAppUrl(config.subject.appUrl ?? "") ?? "";
|
|
124
|
-
const urlPolicy = provisionedRoute
|
|
125
|
-
? { kind: "provisioned-subject", evidenceOrigin: evidenceAppUrl }
|
|
126
|
-
: { kind: "loopback" };
|
|
127
|
-
const serve = config.subject.serve;
|
|
128
|
-
const subjectRepo = provisionedRoute ? config.subject.repos?.[0] ?? "" : undefined;
|
|
129
|
-
const subjectEnvNames = provisionedRoute ? config.subject.env ?? [] : [];
|
|
130
|
-
const env = hooks.env ?? process.env;
|
|
131
|
-
const e2bApiKey = env.E2B_API_KEY?.trim() ?? "";
|
|
132
|
-
const hasGithubToken = subjectEnvNames.includes("GITHUB_TOKEN");
|
|
133
|
-
const redactRepoLabel = config.policies?.redactRepos ?? hasGithubToken;
|
|
134
|
-
const publicRepo = provisionedRoute && subjectRepo ? (redactRepoLabel ? "repo-01" : subjectRepo) : undefined;
|
|
135
|
-
const scrubSourceValues = [
|
|
136
|
-
...(subjectRepo ? [subjectRepo] : []),
|
|
137
|
-
...subjectEnvNames.map((name) => env[name] ?? "")
|
|
138
|
-
].filter(Boolean);
|
|
139
|
-
const scrubKnownValues = (text) => scrubSourceValues.reduce((acc, value) => acc.split(value).join("[redacted]"), text);
|
|
140
|
-
// Re-enforce the local loopback entry boundary at the engine. The provisioned clone route
|
|
141
|
-
// mints its own getHost URL later and persists only evidenceAppUrl.
|
|
142
|
-
let appUrl = provisionedRoute ? serve?.url ?? "" : evidenceAppUrl;
|
|
143
|
-
if (!provisionedRoute && !appUrl) {
|
|
144
|
-
return failed("HUMANISH_SCRIPTED_LAB_SUBJECT_UNSAFE", "subject.appUrl must be a loopback http(s) URL (127.0.0.1 or localhost) on the scripted-browser route.", { actor: descriptor.id });
|
|
145
|
-
}
|
|
146
|
-
if (provisionedRoute && (!serve || !subjectRepo || !publicRepo)) {
|
|
147
|
-
return failed("HUMANISH_SCRIPTED_LAB_SUBJECT_UNSAFE", "clone scripted-browser labs require one subject repo plus subject.serve; parseLabConfig should have rejected this config.", { actor: descriptor.id, appUrl: evidenceAppUrl });
|
|
148
|
-
}
|
|
149
|
-
// Consume scenario.ref (fail-closed: invariant 6 — the steps ARE the actor; there is no
|
|
150
|
-
// built-in journey fallback on the lab route).
|
|
151
|
-
const scenario = await resolveScriptedScenario(projectRoot, config.scenario?.ref);
|
|
152
|
-
if (!scenario.ok) {
|
|
153
|
-
return failed("HUMANISH_SCRIPTED_LAB_SCENARIO_INVALID", scenario.message, { actor: descriptor.id, appUrl: evidenceAppUrl });
|
|
154
|
-
}
|
|
155
|
-
const journey = scenario.journey;
|
|
156
|
-
if (!dryRun && provisionedRoute) {
|
|
157
|
-
if (!e2bApiKey) {
|
|
158
|
-
return failed("HUMANISH_SCRIPTED_LAB_KEYS_MISSING", `Live clone scripted-browser labs require E2B_API_KEY (dry-run remains $0 and does not provision a subject). ${describeMissingKeys(["E2B_API_KEY"], env)}`, { actor: descriptor.id, appUrl: evidenceAppUrl });
|
|
159
|
-
}
|
|
160
|
-
const missingSubjectEnv = subjectEnvNames.filter((name) => !env[name]?.trim());
|
|
161
|
-
if (missingSubjectEnv.length > 0) {
|
|
162
|
-
return failed("HUMANISH_SCRIPTED_LAB_SUBJECT_ENV_MISSING", `Subject env values missing for live clone scripted-browser lab: ${missingSubjectEnv.join(", ")}.`, { actor: descriptor.id, appUrl: evidenceAppUrl });
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
const surfaces = browserSurfaces.slice(0, config.actors[0]?.count ?? DEFAULT_SURFACE_COUNT);
|
|
166
|
-
const timeoutMs = config.execution?.timeoutMs ?? DEFAULT_SESSION_TIMEOUT_MS;
|
|
167
|
-
const persona = {
|
|
168
|
-
id: config.actors[0]?.persona ?? "scripted-journey",
|
|
169
|
-
traitsApplied: [],
|
|
170
|
-
// The step manifest IS the "prompt" on this lane; the digest binds the trace to the
|
|
171
|
-
// committed scenario text.
|
|
172
|
-
promptDigest: journey.sourceDigest.slice(0, 16)
|
|
173
|
-
};
|
|
174
|
-
// Live runs need a browser BEFORE any actuation (unless one is injected).
|
|
175
|
-
let browserCommand = hooks.browserCommand;
|
|
176
|
-
if (!dryRun && !hooks.launchBrowser && !browserCommand) {
|
|
177
|
-
const resolved = await resolveBrowserCommand();
|
|
178
|
-
if (!resolved) {
|
|
179
|
-
return failed("HUMANISH_SCRIPTED_LAB_BROWSER_MISSING", "No Chrome/Chromium browser command was found for the scripted-browser actor. Set HUMANISH_BROWSER_COMMAND to a browser binary playwright-core can launch.", { actor: descriptor.id, appUrl: evidenceAppUrl });
|
|
180
|
-
}
|
|
181
|
-
browserCommand = resolved;
|
|
182
|
-
}
|
|
183
|
-
const runId = options.runId ?? makeScriptedRunId();
|
|
184
|
-
const runPaths = await prepareRunArtifactPaths(physicalCwd, runId);
|
|
185
|
-
// Identity + liveness on disk (#455): every backend writes this, so a watcher can classify any
|
|
186
|
-
// run without parsing bundles and without depending on the interactive-observer path.
|
|
187
|
-
const runStatus = beginRunStatus(runPaths, {
|
|
188
|
-
runId,
|
|
189
|
-
mode: dryRun ? "dry-run" : "live",
|
|
190
|
-
...(options.lab === undefined ? {} : { lab: options.lab })
|
|
191
|
-
});
|
|
192
|
-
const artifactRoot = runPaths.physicalRunRoot;
|
|
193
|
-
const createdAt = new Date().toISOString();
|
|
194
|
-
const source = await buildRunSource({
|
|
195
|
-
capturedAt: createdAt,
|
|
196
|
-
cwd: physicalCwd,
|
|
197
|
-
humanishSource: "present",
|
|
198
|
-
packageName: "humanish"
|
|
199
|
-
});
|
|
200
|
-
let sessionResults = [];
|
|
201
|
-
let sessionError;
|
|
202
|
-
const stateStepRecords = [];
|
|
203
|
-
let subjectCommit;
|
|
204
|
-
let subjectSandboxId;
|
|
205
|
-
let subjectKilled = false;
|
|
206
|
-
let hostDigest;
|
|
207
|
-
if (!dryRun) {
|
|
208
|
-
let subjectModule;
|
|
209
|
-
let subjectDesktop;
|
|
210
|
-
try {
|
|
211
|
-
if (provisionedRoute) {
|
|
212
|
-
const requestTimeoutMs = readPositiveInt(env.HUMANISH_E2B_REQUEST_TIMEOUT_MS, 60_000);
|
|
213
|
-
const timers = hooks.detachedTimers ?? {};
|
|
214
|
-
subjectModule = await (hooks.loadDesktopModule ?? loadE2BDesktopModule)();
|
|
215
|
-
await validatePreparedRunArtifactPaths(runPaths);
|
|
216
|
-
subjectDesktop = await createDesktopSandbox(subjectModule, {
|
|
217
|
-
apiKey: e2bApiKey,
|
|
218
|
-
requestTimeoutMs,
|
|
219
|
-
timeoutMs: timeoutMs + SUBJECT_PROVISION_BUDGET_MS
|
|
220
|
-
+ (config.subject.state?.seed ?? []).reduce((sum, step) => sum + (step.timeoutMs ?? DEFAULT_STATE_STEP_TIMEOUT_MS), 0)
|
|
221
|
-
+ SANDBOX_TIMEOUT_BUFFER_MS,
|
|
222
|
-
metadata: {
|
|
223
|
-
mode: "scripted-browser-lab",
|
|
224
|
-
tool: "humanish",
|
|
225
|
-
labId: config.id,
|
|
226
|
-
role: "subject",
|
|
227
|
-
actor: descriptor.id
|
|
228
|
-
},
|
|
229
|
-
...(subjectEnvNames.length > 0
|
|
230
|
-
? { envs: Object.fromEntries(subjectEnvNames.map((name) => [name, env[name]])) }
|
|
231
|
-
: {}),
|
|
232
|
-
dpi: 96,
|
|
233
|
-
lifecycle: { onTimeout: "kill" }
|
|
234
|
-
}, config.execution?.desktop?.template);
|
|
235
|
-
subjectSandboxId = subjectDesktop.sandboxId;
|
|
236
|
-
if (hooks.prepareDesktop) {
|
|
237
|
-
await hooks.prepareDesktop(subjectDesktop);
|
|
238
|
-
await validatePreparedRunArtifactPaths(runPaths);
|
|
239
|
-
}
|
|
240
|
-
subjectCommit = await provisionCloneSubject(subjectDesktop, {
|
|
241
|
-
repo: subjectRepo,
|
|
242
|
-
depth: config.subject.clone?.depth ?? 1,
|
|
243
|
-
serve: serve,
|
|
244
|
-
...(config.subject.state === undefined ? {} : { state: config.subject.state }),
|
|
245
|
-
hasGithubToken,
|
|
246
|
-
requestTimeoutMs,
|
|
247
|
-
scrub: scrubKnownValues,
|
|
248
|
-
onCommit: (commit) => {
|
|
249
|
-
subjectCommit = commit;
|
|
250
|
-
},
|
|
251
|
-
onStateStep: (record) => {
|
|
252
|
-
stateStepRecords.push(record);
|
|
253
|
-
},
|
|
254
|
-
...timers
|
|
255
|
-
});
|
|
256
|
-
if (typeof subjectDesktop.getHost !== "function") {
|
|
257
|
-
throw new Error("the installed @e2b/desktop SDK does not expose getHost(port); clone scripted-browser labs require it to reach the provisioned subject");
|
|
258
|
-
}
|
|
259
|
-
const rawHost = subjectDesktop.getHost(servePort(serve.url));
|
|
260
|
-
const hostUrl = /^https?:\/\//i.test(rawHost) ? rawHost : `https://${rawHost}`;
|
|
261
|
-
if (!isTokenlessHost(hostUrl)) {
|
|
262
|
-
throw new Error("getHost returned a non-tokenless URL; refusing to persist or drive a host URL that may carry a credential");
|
|
263
|
-
}
|
|
264
|
-
appUrl = hostUrl;
|
|
265
|
-
hostDigest = hostOriginDigest(hostUrl);
|
|
266
|
-
}
|
|
267
|
-
// One session per surface, in parallel — parity with `run --app-url`.
|
|
268
|
-
sessionResults = await Promise.all(surfaces.map((surface) => {
|
|
269
|
-
const sessionOptions = {
|
|
270
|
-
appUrl,
|
|
271
|
-
evidenceAppUrl,
|
|
272
|
-
urlPolicy,
|
|
273
|
-
journey,
|
|
274
|
-
surface,
|
|
275
|
-
persona,
|
|
276
|
-
timeoutMs,
|
|
277
|
-
artifactRoot,
|
|
278
|
-
...(browserCommand === undefined ? {} : { browserCommand }),
|
|
279
|
-
...(hooks.launchBrowser === undefined ? {} : { launchBrowser: hooks.launchBrowser }),
|
|
280
|
-
...(hooks.now === undefined ? {} : { now: hooks.now })
|
|
281
|
-
};
|
|
282
|
-
return runSession
|
|
283
|
-
? runSession(sessionOptions).then(async (result) => {
|
|
284
|
-
await validatePreparedRunArtifactPaths(runPaths);
|
|
285
|
-
validateScriptedSessionResult(surface, result);
|
|
286
|
-
return result;
|
|
287
|
-
})
|
|
288
|
-
: runScriptedBrowserSessionInPreparedRoot(sessionOptions, runPaths);
|
|
289
|
-
}));
|
|
290
|
-
}
|
|
291
|
-
catch (error) {
|
|
292
|
-
if (error instanceof UnsafeScriptedSessionResultError) {
|
|
293
|
-
throw error;
|
|
294
|
-
}
|
|
295
|
-
// The session itself maps launch failures to harness_error; reaching here means the
|
|
296
|
-
// harness around it failed. Redacted at this boundary before persisting anywhere.
|
|
297
|
-
sessionError = redactText(scrubKnownValues(toErrorMessage(error)));
|
|
298
|
-
}
|
|
299
|
-
finally {
|
|
300
|
-
if (subjectDesktop && subjectModule) {
|
|
301
|
-
if (typeof subjectModule.Sandbox.kill === "function") {
|
|
302
|
-
try {
|
|
303
|
-
await subjectModule.Sandbox.kill(subjectDesktop.sandboxId, { requestTimeoutMs: 60_000 });
|
|
304
|
-
subjectKilled = true;
|
|
305
|
-
}
|
|
306
|
-
catch (error) {
|
|
307
|
-
warnings.push(`Subject sandbox teardown failed (server-side kill-on-timeout will reclaim it): ${redactText(scrubKnownValues(toErrorMessage(error)))}`);
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
else {
|
|
311
|
-
warnings.push("Installed @e2b/desktop SDK does not expose Sandbox.kill; server-side kill-on-timeout will reclaim the subject sandbox.");
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
for (const result of sessionResults) {
|
|
316
|
-
// The backend writes the provider-neutral projection next to the session's native
|
|
317
|
-
// traces/<surface>.json (cua's actor.json convention, pluralized per surface).
|
|
318
|
-
await writeContainedOutputFile(runPaths, `actor-${result.capture.surface.id}.json`, `${JSON.stringify(result.trace, null, 2)}\n`, "utf8");
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
const screenshotsBySurface = new Map();
|
|
322
|
-
for (const result of sessionResults) {
|
|
323
|
-
screenshotsBySurface.set(result.capture.surface.id, await existingScreenshots(runPaths, result));
|
|
324
|
-
}
|
|
325
|
-
const subject = provisionedRoute
|
|
326
|
-
? {
|
|
327
|
-
source: "clone",
|
|
328
|
-
repo: publicRepo,
|
|
329
|
-
...(subjectCommit === undefined ? {} : { commit: subjectCommit }),
|
|
330
|
-
envNames: subjectEnvNames,
|
|
331
|
-
state: resolveSubjectState({ declared: config.subject.state, dryRun, executed: stateStepRecords })
|
|
332
|
-
}
|
|
333
|
-
: undefined;
|
|
334
|
-
const bundle = buildScriptedLabBundle({
|
|
335
|
-
...(options.lab === undefined ? {} : { lab: options.lab }),
|
|
336
|
-
actorId: descriptor.id,
|
|
337
|
-
appUrl: evidenceAppUrl,
|
|
338
|
-
createdAt,
|
|
339
|
-
dryRun,
|
|
340
|
-
journey,
|
|
341
|
-
labId: config.id,
|
|
342
|
-
...(config.title ? { labTitle: config.title } : {}),
|
|
343
|
-
persona,
|
|
344
|
-
runId,
|
|
345
|
-
scenarioSource: scenario.source,
|
|
346
|
-
scenarioSourceDigest: scenario.sourceDigest,
|
|
347
|
-
screenshotsBySurface,
|
|
348
|
-
sessionResults,
|
|
349
|
-
...(sessionError === undefined ? {} : { sessionError }),
|
|
350
|
-
source,
|
|
351
|
-
surfaces,
|
|
352
|
-
...(subject === undefined ? {} : { subject }),
|
|
353
|
-
...(config.execution?.desktop?.template === undefined ? {} : { desktopTemplate: config.execution.desktop.template }),
|
|
354
|
-
...(hostDigest === undefined ? {} : { hostDigest })
|
|
355
|
-
});
|
|
356
|
-
await writeContainedOutputFile(runPaths, "run.json", `${JSON.stringify(bundle, null, 2)}\n`, "utf8");
|
|
357
|
-
// Finalize identity+liveness from the bundle just written; a throw before this leaves the record
|
|
358
|
-
// stale, which reads as interrupted rather than as a false outcome (#455).
|
|
359
|
-
await runStatus.finish({
|
|
360
|
-
...(bundle.review?.verdict === undefined ? {} : { verdict: bundle.review.verdict }),
|
|
361
|
-
...(bundle.review?.participants === undefined
|
|
362
|
-
? {}
|
|
363
|
-
: {
|
|
364
|
-
participants: {
|
|
365
|
-
total: bundle.review.participants.total,
|
|
366
|
-
reachedGoal: bundle.review.participants.reachedGoal,
|
|
367
|
-
...(bundle.review.participants.reportedFriction === undefined
|
|
368
|
-
? {}
|
|
369
|
-
: { reportedFriction: bundle.review.participants.reportedFriction })
|
|
370
|
-
}
|
|
371
|
-
}),
|
|
372
|
-
...(bundle.cost?.estimatedTotalUsd === undefined ? {} : { estimatedCostUsd: bundle.cost.estimatedTotalUsd })
|
|
373
|
-
});
|
|
374
|
-
await writeContainedOutputFile(runPaths, "review.json", `${JSON.stringify(bundle.review, null, 2)}\n`, "utf8");
|
|
375
|
-
await writeContainedOutputFile(runPaths, "review.md", renderScriptedReviewMarkdown(bundle), "utf8");
|
|
376
|
-
await writeContainedOutputFile(runPaths, "events.ndjson", `${bundle.events.map((event) => JSON.stringify(event)).join("\n")}\n`, "utf8");
|
|
377
|
-
// Keep `verify --run latest` honest: point it at THIS run (mirrors run.ts's RunPointer).
|
|
378
|
-
await writePreparedRunLatestPointer(runPaths, `${JSON.stringify({
|
|
379
|
-
schema: "humanish.latest-run.v1",
|
|
380
|
-
runId,
|
|
381
|
-
path: runPaths.relativeRunRoot,
|
|
382
|
-
updatedAt: createdAt
|
|
383
|
-
}, null, 2)}\n`, "utf8");
|
|
384
|
-
// Surface the local-fidelity posture so the operator knows the bundle is not publish-safe as-is.
|
|
385
|
-
if (sessionResults.some((result) => result.trace.redaction.screenshots === "raw")) {
|
|
386
|
-
warnings.push("Screenshots are full-fidelity (raw) for local use — the bundle stays in gitignored .humanish and nothing scans these pixels; review them before sharing anywhere. policies.redactScreenshots is not yet supported on the scripted route.");
|
|
387
|
-
}
|
|
388
|
-
const observer = await render(physicalCwd, runId, { open: options.open === true });
|
|
389
|
-
await validatePreparedRunArtifactPaths(runPaths);
|
|
390
|
-
const harnessError = sessionResults.some((result) => result.completionReason === "harness_error");
|
|
391
|
-
const ok = observer.ok
|
|
392
|
-
&& sessionError === undefined
|
|
393
|
-
&& (dryRun || (sessionResults.length === surfaces.length && !harnessError));
|
|
394
|
-
return markFinalizedStudyResult({
|
|
395
|
-
schema: SCRIPTED_BROWSER_LAB_SCHEMA,
|
|
396
|
-
ok,
|
|
397
|
-
cwd,
|
|
398
|
-
labId: config.id,
|
|
399
|
-
actor: descriptor.id,
|
|
400
|
-
appUrl: evidenceAppUrl,
|
|
401
|
-
dryRun,
|
|
402
|
-
runId,
|
|
403
|
-
...(subject === undefined ? {} : { subject }),
|
|
404
|
-
...(subjectSandboxId === undefined ? {} : { subjectSandbox: { sandboxId: subjectSandboxId, killed: subjectKilled } }),
|
|
405
|
-
...(hostDigest === undefined ? {} : { hostDigest }),
|
|
406
|
-
scenario: {
|
|
407
|
-
id: journey.scenarioId,
|
|
408
|
-
source: scenario.source,
|
|
409
|
-
sourceDigest: scenario.sourceDigest,
|
|
410
|
-
steps: journey.steps.length
|
|
411
|
-
},
|
|
412
|
-
sessions: sessionResults.map((result) => ({
|
|
413
|
-
surface: result.capture.surface.id,
|
|
414
|
-
status: result.status,
|
|
415
|
-
completionReason: result.completionReason,
|
|
416
|
-
reason: result.reason,
|
|
417
|
-
screenshots: screenshotsBySurface.get(result.capture.surface.id)?.length ?? 0
|
|
418
|
-
})),
|
|
419
|
-
observer,
|
|
420
|
-
warnings: [...warnings, ...observer.warnings],
|
|
421
|
-
...(ok
|
|
422
|
-
? {}
|
|
423
|
-
: {
|
|
424
|
-
error: {
|
|
425
|
-
code: "HUMANISH_SCRIPTED_LAB_FAILED",
|
|
426
|
-
message: sessionError
|
|
427
|
-
?? (observer.ok
|
|
428
|
-
? harnessError
|
|
429
|
-
? `Scripted session ended with a harness error: ${sessionResults.find((result) => result.completionReason === "harness_error")?.reason ?? "unknown"}`
|
|
430
|
-
: "Scripted lab did not produce terminal sessions for every surface."
|
|
431
|
-
: observer.error?.message ?? "Observer failed for the scripted lab run.")
|
|
432
|
-
}
|
|
433
|
-
})
|
|
434
|
-
}, runPaths);
|
|
435
|
-
}
|
|
436
|
-
/**
|
|
437
|
-
* Resolve and consume `scenario.ref`. Path-style refs (contain a separator or end .yaml/.yml)
|
|
438
|
-
* resolve against cwd and are CLAMPED inside it — a ../../ escape is rejected, never recorded
|
|
439
|
-
* as repo-relative provenance. Id-style refs must be public-safe tokens and resolve to
|
|
440
|
-
* humanish/scenarios/<ref>.yaml (then .yml). Every failure mode is fail-closed.
|
|
441
|
-
*/
|
|
442
|
-
async function resolveScriptedScenario(projectRoot, ref) {
|
|
443
|
-
if (!ref || !ref.trim()) {
|
|
444
|
-
return {
|
|
445
|
-
ok: false,
|
|
446
|
-
message: "scripted-browser labs require `scenario.ref` — the committed scenario's browser steps are what this actor executes."
|
|
447
|
-
};
|
|
448
|
-
}
|
|
449
|
-
const trimmed = ref.trim();
|
|
450
|
-
let absolutePath;
|
|
451
|
-
let source;
|
|
452
|
-
if (scenarioRefLooksLikePath(trimmed)) {
|
|
453
|
-
absolutePath = path.resolve(projectRoot.physicalPath, trimmed);
|
|
454
|
-
const relative = path.relative(projectRoot.physicalPath, absolutePath);
|
|
455
|
-
if (!relative || relative.startsWith("..") || path.isAbsolute(relative)) {
|
|
456
|
-
return {
|
|
457
|
-
ok: false,
|
|
458
|
-
message: `scenario.ref path must stay inside the target cwd (got "${trimmed}") — provenance is recorded repo-relative and an escaping path cannot be.`
|
|
459
|
-
};
|
|
460
|
-
}
|
|
461
|
-
source = relative.split(path.sep).join("/");
|
|
462
|
-
}
|
|
463
|
-
else {
|
|
464
|
-
if (!SCENARIO_REF_ID_PATTERN.test(trimmed)) {
|
|
465
|
-
return {
|
|
466
|
-
ok: false,
|
|
467
|
-
message: `scenario.ref must be a public-safe scenario id or a .yaml path inside the repo (got "${trimmed}").`
|
|
468
|
-
};
|
|
469
|
-
}
|
|
470
|
-
const candidates = [
|
|
471
|
-
path.posix.join("humanish", "scenarios", `${trimmed}.yaml`),
|
|
472
|
-
path.posix.join("humanish", "scenarios", `${trimmed}.yml`)
|
|
473
|
-
];
|
|
474
|
-
const found = await firstExistingFile(projectRoot, candidates);
|
|
475
|
-
if (!found) {
|
|
476
|
-
return {
|
|
477
|
-
ok: false,
|
|
478
|
-
message: `scenario.ref "${trimmed}" was not found (looked for ${candidates.join(", ")}).`
|
|
479
|
-
};
|
|
480
|
-
}
|
|
481
|
-
source = found;
|
|
482
|
-
absolutePath = path.join(projectRoot.physicalPath, found);
|
|
483
|
-
}
|
|
484
|
-
const relativeScenarioPath = path.relative(projectRoot.physicalPath, absolutePath);
|
|
485
|
-
const scenarioBytes = await readContainedRegularFile(projectRoot, relativeScenarioPath);
|
|
486
|
-
if (!scenarioBytes) {
|
|
487
|
-
return { ok: false, message: `scenario.ref "${trimmed}" could not be read (${source}).` };
|
|
488
|
-
}
|
|
489
|
-
const text = scenarioBytes.toString("utf8");
|
|
490
|
-
let raw;
|
|
491
|
-
try {
|
|
492
|
-
raw = parseYaml(text);
|
|
493
|
-
}
|
|
494
|
-
catch {
|
|
495
|
-
return { ok: false, message: `${source} could not be parsed as YAML; the scripted scenario failed closed.` };
|
|
496
|
-
}
|
|
497
|
-
const sourceDigest = digestText(text);
|
|
498
|
-
const parsed = parseBrowserPersonaJourneyFromScenario({ raw, relativePath: source, sourceDigest });
|
|
499
|
-
if (parsed.failure) {
|
|
500
|
-
return { ok: false, message: parsed.failure };
|
|
501
|
-
}
|
|
502
|
-
if (!parsed.journey) {
|
|
503
|
-
return {
|
|
504
|
-
ok: false,
|
|
505
|
-
message: `${source} declares no executable browser steps — the scripted-browser actor needs a scenario with browser.steps (there is no built-in fallback on the lab route).`
|
|
506
|
-
};
|
|
507
|
-
}
|
|
508
|
-
return { ok: true, journey: parsed.journey, source, sourceDigest };
|
|
509
|
-
}
|
|
510
|
-
function scenarioRefLooksLikePath(ref) {
|
|
511
|
-
return ref.endsWith(".yaml")
|
|
512
|
-
|| ref.endsWith(".yml")
|
|
513
|
-
|| ref.includes("/")
|
|
514
|
-
|| ref.includes("\\")
|
|
515
|
-
|| ref.startsWith(".");
|
|
516
|
-
}
|
|
517
|
-
async function firstExistingFile(projectRoot, candidates) {
|
|
518
|
-
for (const candidate of candidates) {
|
|
519
|
-
if (await readContainedRegularFile(projectRoot, candidate) !== null) {
|
|
520
|
-
return candidate;
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
return null;
|
|
524
|
-
}
|
|
525
|
-
async function existingScreenshots(runPaths, result) {
|
|
526
|
-
const existing = [];
|
|
527
|
-
for (const step of result.capture.steps) {
|
|
528
|
-
// Blocked steps whose evidence is the failure itself recorded no screenshot path.
|
|
529
|
-
if (!step.screenshotPath) {
|
|
530
|
-
continue;
|
|
531
|
-
}
|
|
532
|
-
const screenshot = await readContainedRegularFile(runPaths, step.screenshotPath);
|
|
533
|
-
if (screenshot && screenshot.byteLength > 0) {
|
|
534
|
-
existing.push(step.screenshotPath);
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
return existing;
|
|
538
|
-
}
|
|
539
|
-
function validateScriptedSessionResult(expectedSurface, result) {
|
|
540
|
-
if (result.capture.surface.id !== expectedSurface.id || !isSafeOutputSegment(result.capture.surface.id)) {
|
|
541
|
-
throw new UnsafeScriptedSessionResultError("Scripted session returned an unexpected or unsafe surface id.");
|
|
542
|
-
}
|
|
543
|
-
const paths = [
|
|
544
|
-
result.capture.tracePath,
|
|
545
|
-
...(result.capture.screenshotPath ? [result.capture.screenshotPath] : []),
|
|
546
|
-
...result.capture.steps.flatMap((step) => step.screenshotPath ? [step.screenshotPath] : [])
|
|
547
|
-
];
|
|
548
|
-
if (!paths.every(isSafeRelativeArtifactPath)) {
|
|
549
|
-
throw new UnsafeScriptedSessionResultError("Scripted session returned an unsafe artifact path.");
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
function isSafeOutputSegment(value) {
|
|
553
|
-
return value.length > 0
|
|
554
|
-
&& value !== "."
|
|
555
|
-
&& value !== ".."
|
|
556
|
-
&& !value.includes("/")
|
|
557
|
-
&& !value.includes("\\")
|
|
558
|
-
&& !value.includes("\0");
|
|
559
|
-
}
|
|
560
|
-
function isSafeRelativeArtifactPath(value) {
|
|
561
|
-
if (!value || value.includes("\0") || path.isAbsolute(value) || path.posix.isAbsolute(value) || path.win32.isAbsolute(value)) {
|
|
562
|
-
return false;
|
|
563
|
-
}
|
|
564
|
-
return !value.replace(/\\/g, "/").split("/").some((part) => !part || part === "." || part === "..");
|
|
565
|
-
}
|
|
566
|
-
/**
|
|
567
|
-
* Project the scripted lab run into a humanish.run-bundle.v1 (no schema change — a new
|
|
568
|
-
* producer only). The load-bearing line is `stream.actor = result.trace`: the provider-neutral
|
|
569
|
-
* ActorTrace seam the Observer renders and verifyRun's engagement check reads. Exported for
|
|
570
|
-
* the bundle-builder tests.
|
|
571
|
-
*/
|
|
572
|
-
export function buildScriptedLabBundle(args) {
|
|
573
|
-
const resultBySurface = new Map(args.sessionResults.map((result) => [result.capture.surface.id, result]));
|
|
574
|
-
const simulations = [];
|
|
575
|
-
const streams = [];
|
|
576
|
-
args.surfaces.forEach((surface, index) => {
|
|
577
|
-
const simId = `scripted-${surface.id}`;
|
|
578
|
-
const streamId = `${simId}-stream`;
|
|
579
|
-
const result = resultBySurface.get(surface.id);
|
|
580
|
-
const screenshots = args.screenshotsBySurface.get(surface.id) ?? [];
|
|
581
|
-
const lastScreenshot = screenshots.at(-1);
|
|
582
|
-
const status = result
|
|
583
|
-
? result.status
|
|
584
|
-
: args.sessionError
|
|
585
|
-
? "failed"
|
|
586
|
-
: "contract_proof_only";
|
|
587
|
-
const reason = result?.reason
|
|
588
|
-
?? args.sessionError
|
|
589
|
-
?? "Contract bundle only: dry-run pinned the scenario contract without launching a browser or touching the subject app.";
|
|
590
|
-
simulations.push({
|
|
591
|
-
id: simId,
|
|
592
|
-
index: index + 1,
|
|
593
|
-
personaId: args.persona.id,
|
|
594
|
-
scenarioId: args.journey.scenarioId,
|
|
595
|
-
status,
|
|
596
|
-
streamKind: "browser",
|
|
597
|
-
mode: "browser-sim",
|
|
598
|
-
progress: 100,
|
|
599
|
-
currentStep: reason,
|
|
600
|
-
summary: result
|
|
601
|
-
? `Scripted-browser actor (${args.actorId}) replayed ${args.journey.scenarioId} on the ${surface.id} surface; ${result.completionReason}.`
|
|
602
|
-
: args.sessionError
|
|
603
|
-
? `Scripted lab failed before a terminal session verdict: ${args.sessionError}`
|
|
604
|
-
: `Contract lane for the scripted-browser actor (${args.actorId}) against ${args.appUrl}.`,
|
|
605
|
-
streamIds: [streamId],
|
|
606
|
-
startedAt: args.createdAt,
|
|
607
|
-
updatedAt: result?.capture.capturedAt ?? args.createdAt
|
|
608
|
-
});
|
|
609
|
-
streams.push({
|
|
610
|
-
id: streamId,
|
|
611
|
-
simId,
|
|
612
|
-
kind: "browser",
|
|
613
|
-
label: `${surface.label} — ${args.labId}`,
|
|
614
|
-
status,
|
|
615
|
-
transport: "snapshot",
|
|
616
|
-
updatedAt: result?.capture.capturedAt ?? args.createdAt,
|
|
617
|
-
embed: lastScreenshot
|
|
618
|
-
? { kind: "screenshot", url: `../${lastScreenshot}`, title: `${surface.label} (raw)` }
|
|
619
|
-
: { kind: "placeholder", title: surface.label },
|
|
620
|
-
// REAL emulated viewport: isMobile/deviceScaleFactor genuinely render on this route
|
|
621
|
-
// (playwright emulation), unlike the e2b-desktop route's prompt-signal-only fidelity.
|
|
622
|
-
viewport: surface.viewport,
|
|
623
|
-
ui: {
|
|
624
|
-
route: args.appUrl,
|
|
625
|
-
intent: args.journey.goal,
|
|
626
|
-
state: reason,
|
|
627
|
-
...(result ? { actorStatus: result.status } : {}),
|
|
628
|
-
...(lastScreenshot ? { screenshotUrl: `../${lastScreenshot}` } : {})
|
|
629
|
-
},
|
|
630
|
-
// The seam this registration exists to fill: the provider-neutral actor evidence.
|
|
631
|
-
...(result ? { actor: result.trace } : {}),
|
|
632
|
-
artifacts: [
|
|
633
|
-
{ label: "run bundle", path: "run.json", kind: "bundle" },
|
|
634
|
-
{ label: "review", path: "review.md", kind: "review" },
|
|
635
|
-
{ label: "events", path: "events.ndjson", kind: "events" },
|
|
636
|
-
...(result
|
|
637
|
-
? [
|
|
638
|
-
{ label: `${surface.id} browser trace`, path: result.capture.tracePath, kind: "trace" },
|
|
639
|
-
{ label: `${surface.id} actor trace`, path: `actor-${surface.id}.json`, kind: "trace" }
|
|
640
|
-
]
|
|
641
|
-
: []),
|
|
642
|
-
...screenshots.map((screenshot, screenshotIndex) => ({
|
|
643
|
-
label: `${surface.id} screenshot ${String(screenshotIndex + 1).padStart(2, "0")} (raw)`,
|
|
644
|
-
path: screenshot,
|
|
645
|
-
kind: "screenshot"
|
|
646
|
-
}))
|
|
647
|
-
]
|
|
648
|
-
});
|
|
649
|
-
});
|
|
650
|
-
const events = [
|
|
651
|
-
{
|
|
652
|
-
id: "event-000-created",
|
|
653
|
-
at: args.createdAt,
|
|
654
|
-
level: "info",
|
|
655
|
-
type: "scripted-lab.run.created",
|
|
656
|
-
message: `Created scripted-browser lab run for ${args.labId} (actor ${args.actorId}, ${args.surfaces.length} surface${args.surfaces.length === 1 ? "" : "s"}).`
|
|
657
|
-
},
|
|
658
|
-
{
|
|
659
|
-
id: "event-001-subject",
|
|
660
|
-
at: args.createdAt,
|
|
661
|
-
level: "info",
|
|
662
|
-
type: "scripted-lab.subject.declared",
|
|
663
|
-
// Invariant 5: provenance recorded or its absence DECLARED. The lab did not provision
|
|
664
|
-
// this subject on app-url routes; clone routes carry structured subject provenance below.
|
|
665
|
-
message: args.subject
|
|
666
|
-
? `Provisioned synthetic subject: clone of ${args.subject.repo}${args.subject.commit ? `@${args.subject.commit}` : ""}, served + getHost-exposed in-sandbox; env names: ${args.subject.envNames?.join(", ") || "none"} (values never persisted); state provenance: ${args.subject.state.provenance}; evidence host digest: ${args.hostDigest ?? "dry-run"}.`
|
|
667
|
-
: `Subject app declared at ${args.appUrl}; the lab did not provision it — subject build/commit provenance is UNPINNED; evidence binds to the scenario digest ${args.scenarioSourceDigest}.`
|
|
668
|
-
},
|
|
669
|
-
{
|
|
670
|
-
id: "event-002-spend",
|
|
671
|
-
at: args.createdAt,
|
|
672
|
-
level: "info",
|
|
673
|
-
type: "scripted-lab.spend",
|
|
674
|
-
message: args.subject
|
|
675
|
-
? "Scripted participant steps make no model requests; post-run analysis has a separate budget unless disabled. Live provisioned runs may spend E2B sandbox minutes to clone/serve the synthetic subject."
|
|
676
|
-
: "Scripted participant steps make no model requests and use no sandbox on this route; post-run analysis has a separate budget unless disabled. scenario.mode: live gates real browser actuation against the declared app."
|
|
677
|
-
}
|
|
678
|
-
];
|
|
679
|
-
if (args.sessionResults.length > 0) {
|
|
680
|
-
for (const result of args.sessionResults) {
|
|
681
|
-
events.push({
|
|
682
|
-
id: `event-${String(events.length).padStart(3, "0")}-session-${result.capture.surface.id}`,
|
|
683
|
-
at: result.capture.capturedAt,
|
|
684
|
-
level: result.status === "passed" ? "info" : "warn",
|
|
685
|
-
type: `scripted-lab.session.${result.completionReason}`,
|
|
686
|
-
message: `${result.capture.surface.id}: ${result.status} — ${result.reason}`,
|
|
687
|
-
simId: `scripted-${result.capture.surface.id}`,
|
|
688
|
-
streamId: `scripted-${result.capture.surface.id}-stream`
|
|
689
|
-
});
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
else if (args.sessionError) {
|
|
693
|
-
events.push({
|
|
694
|
-
id: "event-003-session-error",
|
|
695
|
-
at: args.createdAt,
|
|
696
|
-
level: "error",
|
|
697
|
-
type: "scripted-lab.session.error",
|
|
698
|
-
message: args.sessionError
|
|
699
|
-
});
|
|
700
|
-
}
|
|
701
|
-
else {
|
|
702
|
-
events.push({
|
|
703
|
-
id: "event-003-contract",
|
|
704
|
-
at: args.createdAt,
|
|
705
|
-
level: "info",
|
|
706
|
-
type: "scripted-lab.contract.ready",
|
|
707
|
-
message: `Dry-run contract bundle ready: scenario ${args.journey.scenarioId} @ ${args.scenarioSourceDigest} (${args.scenarioSource}, ${args.journey.steps.length} step${args.journey.steps.length === 1 ? "" : "s"}) parsed and digest-pinned; switch scenario.mode to live to actuate a real browser.`
|
|
708
|
-
});
|
|
709
|
-
}
|
|
710
|
-
const review = buildScriptedReview(args);
|
|
711
|
-
const ranLive = args.sessionResults.length > 0 || args.sessionError !== undefined;
|
|
712
|
-
return {
|
|
713
|
-
schema: RUN_BUNDLE_SCHEMA,
|
|
714
|
-
runId: args.runId,
|
|
715
|
-
mode: args.dryRun ? "dry-run" : "live",
|
|
716
|
-
simCount: args.surfaces.length,
|
|
717
|
-
createdAt: args.createdAt,
|
|
718
|
-
cwd: PUBLIC_TARGET_CWD,
|
|
719
|
-
...(args.lab === undefined ? {} : { lab: args.lab }),
|
|
720
|
-
artifactRoot: path.join(".humanish", "runs", args.runId),
|
|
721
|
-
source: args.source,
|
|
722
|
-
persona: {
|
|
723
|
-
id: args.persona.id,
|
|
724
|
-
name: `Scripted journey persona (${args.persona.id})`,
|
|
725
|
-
source: `lab:${args.labId}`,
|
|
726
|
-
sourceDigest: args.persona.promptDigest
|
|
727
|
-
},
|
|
728
|
-
scenario: {
|
|
729
|
-
id: args.journey.scenarioId,
|
|
730
|
-
title: args.journey.scenarioTitle,
|
|
731
|
-
goal: redactText(args.journey.goal),
|
|
732
|
-
source: args.scenarioSource,
|
|
733
|
-
sourceDigest: args.scenarioSourceDigest
|
|
734
|
-
},
|
|
735
|
-
lifecycle: [
|
|
736
|
-
{
|
|
737
|
-
at: args.createdAt,
|
|
738
|
-
event: "scripted-lab.run.created",
|
|
739
|
-
message: `Created scripted-browser lab run with ${args.surfaces.length} surface lane${args.surfaces.length === 1 ? "" : "s"} (actor ${args.actorId}).`
|
|
740
|
-
}
|
|
741
|
-
],
|
|
742
|
-
simulations,
|
|
743
|
-
streams,
|
|
744
|
-
events,
|
|
745
|
-
redaction: {
|
|
746
|
-
status: "passed",
|
|
747
|
-
notes: ranLive
|
|
748
|
-
? "Scripted step URLs are sanitized to loopback origin+path (query/hash redacted) and step text passes text redaction. Screenshots are FULL-FIDELITY (raw), retained for local use in gitignored .humanish — NOT redacted for publishing; policies.redactScreenshots is not yet supported on this route."
|
|
749
|
-
: "Dry-run contract bundle: no browser ran and no screenshots were captured. The scenario contract is digest-pinned; live step text passes text redaction when a session runs."
|
|
750
|
-
},
|
|
751
|
-
artifacts: {
|
|
752
|
-
run: "run.json",
|
|
753
|
-
reviewJson: "review.json",
|
|
754
|
-
reviewMarkdown: "review.md",
|
|
755
|
-
observerData: "observer/observer-data.json",
|
|
756
|
-
events: "events.ndjson"
|
|
757
|
-
},
|
|
758
|
-
review,
|
|
759
|
-
feedbackCandidates: [],
|
|
760
|
-
...(args.subject === undefined ? {} : { subject: args.subject }),
|
|
761
|
-
...(args.desktopTemplate === undefined ? {} : { desktopTemplate: args.desktopTemplate })
|
|
762
|
-
};
|
|
763
|
-
}
|
|
764
|
-
function buildScriptedReview(args) {
|
|
765
|
-
if (args.sessionError) {
|
|
766
|
-
return {
|
|
767
|
-
schema: REVIEW_SCHEMA,
|
|
768
|
-
verdict: "fail",
|
|
769
|
-
summary: `Scripted lab failed before a terminal session verdict: ${args.sessionError}`,
|
|
770
|
-
gaps: []
|
|
771
|
-
};
|
|
772
|
-
}
|
|
773
|
-
if (args.sessionResults.length === 0) {
|
|
774
|
-
return {
|
|
775
|
-
schema: REVIEW_SCHEMA,
|
|
776
|
-
verdict: "contract_proof_only",
|
|
777
|
-
summary: `Dry-run contract for scenario ${args.journey.scenarioId} (${args.scenarioSource}, ${args.journey.steps.length} steps) against ${args.appUrl}: composition and scenario contract proven at $0; no browser ran.`,
|
|
778
|
-
gaps: ["Live scripted session not yet run (dry-run contract only)."]
|
|
779
|
-
};
|
|
780
|
-
}
|
|
781
|
-
// Worst-of across surfaces: harness/step failures outrank a timeout outranks a pass.
|
|
782
|
-
const reasons = args.sessionResults.map((result) => result.completionReason);
|
|
783
|
-
const verdict = reasons.some((reason) => reason === "harness_error" || reason === "step_failed")
|
|
784
|
-
? "fail"
|
|
785
|
-
: reasons.some((reason) => reason === "timed_out")
|
|
786
|
-
? "timed_out"
|
|
787
|
-
: "pass";
|
|
788
|
-
const passed = args.sessionResults.filter((result) => result.status === "passed").length;
|
|
789
|
-
return {
|
|
790
|
-
schema: REVIEW_SCHEMA,
|
|
791
|
-
verdict,
|
|
792
|
-
summary: `Scripted-browser actor replayed ${args.journey.scenarioId} on ${args.sessionResults.length} surface${args.sessionResults.length === 1 ? "" : "s"} against ${args.appUrl}: ${passed}/${args.sessionResults.length} satisfied the scenario predicate.`,
|
|
793
|
-
gaps: args.sessionResults
|
|
794
|
-
.filter((result) => result.status !== "passed")
|
|
795
|
-
.map((result) => `${result.capture.surface.id}: ${result.reason}`)
|
|
796
|
-
};
|
|
797
|
-
}
|
|
798
|
-
function renderScriptedReviewMarkdown(bundle) {
|
|
799
|
-
const subject = bundle.events.find((event) => event.type === "scripted-lab.subject.declared");
|
|
800
|
-
const spend = bundle.events.find((event) => event.type === "scripted-lab.spend");
|
|
801
|
-
const traces = bundle.streams
|
|
802
|
-
.map((stream) => ({ stream, trace: stream.actor }))
|
|
803
|
-
.filter((entry) => entry.trace !== undefined);
|
|
804
|
-
return [
|
|
805
|
-
`# ${bundle.scenario.title}`,
|
|
806
|
-
"",
|
|
807
|
-
`- run: ${bundle.runId}`,
|
|
808
|
-
`- mode: ${bundle.mode}`,
|
|
809
|
-
`- verdict: ${bundle.review.verdict}`,
|
|
810
|
-
`- summary: ${bundle.review.summary}`,
|
|
811
|
-
`- scenario: ${bundle.scenario.id} @ ${bundle.scenario.sourceDigest} (${bundle.scenario.source})`,
|
|
812
|
-
...(subject ? [`- subject: ${subject.message}`] : []),
|
|
813
|
-
...(spend ? [`- spend: ${spend.message}`] : []),
|
|
814
|
-
...traces.map(({ stream, trace }) => `- ${stream.simId}: ${trace.provider} (${trace.lane}/${trace.protocol}) ${trace.status} (${trace.completionReason}); ${trace.counts.actions ?? 0} step action(s), ${trace.counts.screenshots ?? 0} raw screenshot(s)`),
|
|
815
|
-
...(bundle.review.gaps.length > 0 ? ["", "## Gaps", ...bundle.review.gaps.map((gap) => `- ${gap}`)] : []),
|
|
816
|
-
""
|
|
817
|
-
].join("\n");
|
|
818
|
-
}
|
|
819
|
-
function makeScriptedRunId() {
|
|
820
|
-
const stamp = new Date().toISOString().replace(/[:.]/g, "-");
|
|
821
|
-
return `scripted-${stamp}-${randomBytes(4).toString("hex")}`;
|
|
822
|
-
}
|
|
823
|
-
function readPositiveInt(value, fallback) {
|
|
824
|
-
if (value === undefined)
|
|
825
|
-
return fallback;
|
|
826
|
-
const parsed = Number.parseInt(value, 10);
|
|
827
|
-
return Number.isSafeInteger(parsed) && parsed > 0 ? parsed : fallback;
|
|
828
|
-
}
|
|
829
|
-
function servePort(serveUrl) {
|
|
830
|
-
const url = new URL(serveUrl);
|
|
831
|
-
if (url.port)
|
|
832
|
-
return Number(url.port);
|
|
833
|
-
return url.protocol === "https:" ? 443 : 80;
|
|
834
|
-
}
|
|
835
|
-
function isTokenlessHost(value) {
|
|
836
|
-
try {
|
|
837
|
-
const url = new URL(value);
|
|
838
|
-
return url.username === "" && url.password === "" && url.search === "";
|
|
839
|
-
}
|
|
840
|
-
catch {
|
|
841
|
-
return false;
|
|
842
|
-
}
|
|
843
|
-
}
|
|
844
|
-
function hostOriginDigest(url) {
|
|
845
|
-
try {
|
|
846
|
-
return commandDigestOf(new URL(url).origin);
|
|
847
|
-
}
|
|
848
|
-
catch {
|
|
849
|
-
return commandDigestOf(url);
|
|
850
|
-
}
|
|
851
|
-
}
|
|
852
|
-
//# sourceMappingURL=scripted-browser-lab.js.map
|