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