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
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export type {
|
|
3
|
-
export type {
|
|
4
|
-
export type { ProviderContext } from "./
|
|
5
|
-
export { routeOf } from "./
|
|
6
|
-
export type {
|
|
7
|
-
export {
|
|
8
|
-
export { STUDY_SCHEMA } from "./
|
|
9
|
-
export type {
|
|
1
|
+
export { runStudy } from "./run-study.js";
|
|
2
|
+
export type { StudyOutcome, StudyResult, RunStudyOptions } from "./run-study.js";
|
|
3
|
+
export type { StudyEvent } from "./study/run-study-events.js";
|
|
4
|
+
export type { ProviderContext } from "./study/run-study-homes.js";
|
|
5
|
+
export { routeOf } from "./study/plan.js";
|
|
6
|
+
export type { StudyRoute } from "./study/plan.js";
|
|
7
|
+
export { parseStudy } from "./study/config.js";
|
|
8
|
+
export { STUDY_SCHEMA } from "./study/types.js";
|
|
9
|
+
export type { StudyConfig } from "./study/types.js";
|
|
10
10
|
export { verifyRun } from "./verify/verify.js";
|
|
11
11
|
export type { VerifyResult } from "./verify/verify.js";
|
|
12
12
|
export { renderObserver } from "./observer/render.js";
|
|
@@ -18,14 +18,12 @@ export type { CuaAction as ComputerUseAction, CuaExecutor as ComputerUseExecutor
|
|
|
18
18
|
export type { ActorCapabilities } from "./actors/contract.js";
|
|
19
19
|
export { createOpenAiResponsesProvider } from "./actors/computer-use/openai-provider.js";
|
|
20
20
|
export type { OpenAiResponsesProviderOptions } from "./actors/computer-use/openai-provider.js";
|
|
21
|
-
export {
|
|
21
|
+
export { ComputerUseAdmissionLimitError } from "./actors/computer-use/admission-limit.js";
|
|
22
22
|
export { defaultRedactionHooks } from "./evidence/redaction.js";
|
|
23
23
|
export type { RedactionHooks } from "./evidence/redaction.js";
|
|
24
24
|
export type { E2BDesktopSandbox } from "./substrates/e2b/sdk.js";
|
|
25
|
-
export { browserScorer, terminalScorer } from "./
|
|
26
|
-
export type { AdapterScorerModule, AdapterScoringContext } from "./
|
|
27
|
-
export type {
|
|
25
|
+
export { browserScorer, terminalScorer } from "./study/adapter-scorer-loader.js";
|
|
26
|
+
export type { AdapterScorerModule, AdapterScoringContext } from "./study/adapter-scorer-loader.js";
|
|
27
|
+
export type { BrowserScoringContext } from "./study/adapter-extension.js";
|
|
28
28
|
export type { TerminalProductScoringContext } from "./routes/terminal/types.js";
|
|
29
29
|
export type { RunAdapterArtifact, RunAdapterScore } from "./run/bundle.js";
|
|
30
|
-
export { CuaAdmissionLimitError, LAB_CONFIG_SCHEMA, parseLabConfig, runLab, } from "./library-aliases.js";
|
|
31
|
-
export type { BrowserLabScoringContext, CuaAction, CuaExecutor, CuaLoopOptions, CuaLoopResult, CuaObservation, CuaProvider, CuaSafetyCheck, CuaTurn, CuaTurnRequest, LabConfig, LabEvent, LabOutcome, LabResult, LabRoute, RunLabOptions, } from "./library-aliases.js";
|
package/dist/index.js
CHANGED
|
@@ -2,19 +2,17 @@
|
|
|
2
2
|
// score a run. Everything else is internal and reached through the `humanish` bin. See
|
|
3
3
|
// docs/contracts/schemas.md, "Library options", and the site's library page.
|
|
4
4
|
// Run a study.
|
|
5
|
-
export {
|
|
6
|
-
export { routeOf } from "./
|
|
7
|
-
export {
|
|
8
|
-
export { STUDY_SCHEMA } from "./
|
|
5
|
+
export { runStudy } from "./run-study.js";
|
|
6
|
+
export { routeOf } from "./study/plan.js";
|
|
7
|
+
export { parseStudy } from "./study/config.js";
|
|
8
|
+
export { STUDY_SCHEMA } from "./study/types.js";
|
|
9
9
|
// Read a run.
|
|
10
10
|
export { verifyRun } from "./verify/verify.js";
|
|
11
11
|
export { renderObserver } from "./observer/render.js";
|
|
12
12
|
// Bring a participant.
|
|
13
13
|
export { runComputerUseLoop, stableProgressKey } from "./actors/computer-use/loop.js";
|
|
14
14
|
export { createOpenAiResponsesProvider } from "./actors/computer-use/openai-provider.js";
|
|
15
|
-
export {
|
|
15
|
+
export { ComputerUseAdmissionLimitError } from "./actors/computer-use/admission-limit.js";
|
|
16
16
|
export { defaultRedactionHooks } from "./evidence/redaction.js";
|
|
17
17
|
// Score a run.
|
|
18
|
-
export { browserScorer, terminalScorer } from "./
|
|
19
|
-
// The 0.107 names, deprecated until 0.109 removes them. Each is its new name's value or type.
|
|
20
|
-
export { CuaAdmissionLimitError, LAB_CONFIG_SCHEMA, parseLabConfig, runLab, } from "./library-aliases.js";
|
|
18
|
+
export { browserScorer, terminalScorer } from "./study/adapter-scorer-loader.js";
|
|
@@ -2,7 +2,7 @@ import type { LoadedAnalysis } from "../analysis/types.js";
|
|
|
2
2
|
import { type ObserverData } from "./data.js";
|
|
3
3
|
/**
|
|
4
4
|
* Resolve (and in a repo checkout, build) the Observer artifact before any run or
|
|
5
|
-
*
|
|
5
|
+
* study work starts. A missing artifact must cost seconds at startup, never a completed
|
|
6
6
|
* session (a live participant spends real money before the render step would have noticed).
|
|
7
7
|
* Unconditional on purpose: the artifact is the only renderer now, so the fail-before-
|
|
8
8
|
* spend property this preflight bought under the flag matters more, not less.
|
|
@@ -12,7 +12,7 @@ const OBSERVER_DATA_SLOT = `<script id="observer-data" type="application/json">$
|
|
|
12
12
|
let cachedObserverArtifact = null;
|
|
13
13
|
/**
|
|
14
14
|
* Resolve (and in a repo checkout, build) the Observer artifact before any run or
|
|
15
|
-
*
|
|
15
|
+
* study work starts. A missing artifact must cost seconds at startup, never a completed
|
|
16
16
|
* session (a live participant spends real money before the render step would have noticed).
|
|
17
17
|
* Unconditional on purpose: the artifact is the only renderer now, so the fail-before-
|
|
18
18
|
* spend property this preflight bought under the flag matters more, not less.
|
package/dist/observer/data.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export interface ObserverData {
|
|
|
42
42
|
/** The same thing as one readable line, so a renderer cannot accidentally show a number
|
|
43
43
|
* without its denominator. */
|
|
44
44
|
participantsLine?: string;
|
|
45
|
-
/** The study's per-task completion rates, when the
|
|
45
|
+
/** The study's per-task completion rates, when the study declared a protocol. */
|
|
46
46
|
tasks?: RunBundle["review"]["tasks"];
|
|
47
47
|
/** Pre-formatted like participantsLine, denominator on every number. */
|
|
48
48
|
tasksLine?: string;
|
|
@@ -13,6 +13,8 @@ export interface LibraryHistory {
|
|
|
13
13
|
estimatedCostUsd: number | null;
|
|
14
14
|
costRatesAsOf: string | null;
|
|
15
15
|
costPlaceholder: boolean;
|
|
16
|
+
/** The row's cost text: participants and desktops plus the run's analyses (src/run/run-cost.ts). */
|
|
17
|
+
costLabel: string | null;
|
|
16
18
|
}>;
|
|
17
19
|
}
|
|
18
20
|
export interface LibraryRenderOptions {
|
package/dist/observer/library.js
CHANGED
|
@@ -127,7 +127,10 @@ function libraryClientJs() {
|
|
|
127
127
|
var metaBits = [run.mode || "unknown", run.streamCount + " participants", run.createdAt || ""];
|
|
128
128
|
// Labeled cost token: ALWAYS "~$X est." (never a bare "$X"), so the library never implies an
|
|
129
129
|
// authoritative charge. Null = omitted (advisory, fail-open on display).
|
|
130
|
-
if (run.
|
|
130
|
+
if (run.costLabel) {
|
|
131
|
+
metaBits.push(run.costLabel + (run.costPlaceholder ? " (placeholder)" : ""));
|
|
132
|
+
if (run.costRatesAsOf) meta.title = "estimated, rates as of " + run.costRatesAsOf;
|
|
133
|
+
} else if (run.estimatedCostUsd != null) {
|
|
131
134
|
metaBits.push("~$" + Number(run.estimatedCostUsd).toFixed(2) + " est." + (run.costPlaceholder ? " (placeholder)" : ""));
|
|
132
135
|
if (run.costRatesAsOf) meta.title = "estimated, rates as of " + run.costRatesAsOf;
|
|
133
136
|
}
|
package/dist/observer/render.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { spawn } from "node:child_process";
|
|
2
2
|
import { runNotFoundMessage } from "../run/run-not-found.js";
|
|
3
|
+
import { readAnalysisAccounting } from "../run/costs.js";
|
|
4
|
+
import { analysisCostOf } from "../run/run-cost.js";
|
|
3
5
|
import { accessSync, constants } from "node:fs";
|
|
4
6
|
import { realpath } from "node:fs/promises";
|
|
5
7
|
import { createServer } from "node:http";
|
|
@@ -92,7 +94,11 @@ export async function renderObserver(cwdInput, runInput, options = {}) {
|
|
|
92
94
|
throw new Error("Observer output directory does not match the selected run.");
|
|
93
95
|
}
|
|
94
96
|
const observerPath = path.join(preparedRunPaths.physicalRunRoot, "observer", "index.html");
|
|
95
|
-
const
|
|
97
|
+
const spend = analysisCostOf(await readAnalysisAccounting(preparedRunPaths));
|
|
98
|
+
const analysis = {
|
|
99
|
+
...projectShareCheckedAnalysis(await loadAnalysis(preparedRunPaths)),
|
|
100
|
+
...(spend === null ? {} : { spend }),
|
|
101
|
+
};
|
|
96
102
|
const observerData = buildObserverData(loaded.bundle);
|
|
97
103
|
observerData.publicSafety.share = {
|
|
98
104
|
status: verified.shareSafety.status,
|
|
@@ -27,6 +27,7 @@ export declare function buildHistoryIndex(proofRoot: PinnedDirectory, admitRun?:
|
|
|
27
27
|
estimatedCostUsd: number | null;
|
|
28
28
|
costRatesAsOf: string | null;
|
|
29
29
|
costPlaceholder: boolean;
|
|
30
|
+
costLabel: string | null;
|
|
30
31
|
}>;
|
|
31
32
|
}>;
|
|
32
33
|
/** internal: consumed by src/observer/serve.ts */
|
|
@@ -5,34 +5,55 @@ import path from "node:path";
|
|
|
5
5
|
import { isAnalysisRecordPath, projectShareCheckedAnalysis } from "../analysis/sharing.js";
|
|
6
6
|
import { loadAnalysis } from "../analysis/load.js";
|
|
7
7
|
import { listRuns } from "../run/stored-runs.js";
|
|
8
|
-
import {
|
|
8
|
+
import { readAnalysisAccounting } from "../run/costs.js";
|
|
9
|
+
import { bindExistingRunArtifactPaths, isPathInside, isSafeRunIdSegment, } from "../run/paths.js";
|
|
10
|
+
import { analysisCostOf, runCost, runCostLabel } from "../run/run-cost.js";
|
|
9
11
|
import { RUN_STATUS_FILE, RUN_STATUS_STALE_MS, isRunStatusRecord } from "../run/status.js";
|
|
10
12
|
import { renderObserverHtml } from "./artifact.js";
|
|
11
13
|
import { buildObserverData, recordedStreamEmbed, withObserverEndings, } from "./data.js";
|
|
12
14
|
import { buildArtifactSecurityHeaders } from "./http.js";
|
|
13
15
|
import { assertPinnedDirectory, openContainedFile, pinDirectChildDirectory, readContainedFile, relativeToRoot, sha256OfOpenedFile, } from "./pinned-files.js";
|
|
16
|
+
/** The run's artifact paths, only when they are still the pinned directory being served. */
|
|
17
|
+
async function servedRunPaths(runRoot) {
|
|
18
|
+
const runId = path.basename(runRoot.physicalPath);
|
|
19
|
+
const cwd = path.dirname(path.dirname(path.dirname(runRoot.physicalPath)));
|
|
20
|
+
const prepared = await bindExistingRunArtifactPaths(cwd, runId);
|
|
21
|
+
if (prepared.physicalRunRoot !== runRoot.physicalPath ||
|
|
22
|
+
prepared.runRootIdentity.birthtimeNs !== runRoot.birthtimeNs ||
|
|
23
|
+
prepared.runRootIdentity.dev !== runRoot.dev ||
|
|
24
|
+
prepared.runRootIdentity.ino !== runRoot.ino) {
|
|
25
|
+
throw new Error("ANALYSIS_STORAGE_CHANGED");
|
|
26
|
+
}
|
|
27
|
+
return prepared;
|
|
28
|
+
}
|
|
14
29
|
/** Analysis cannot grant filesystem authority or make an otherwise readable recording disappear. */
|
|
15
30
|
async function readObserverAnalysis(runRoot) {
|
|
31
|
+
let loaded;
|
|
16
32
|
try {
|
|
17
|
-
|
|
18
|
-
const cwd = path.dirname(path.dirname(path.dirname(runRoot.physicalPath)));
|
|
19
|
-
const prepared = await bindExistingRunArtifactPaths(cwd, runId);
|
|
20
|
-
if (prepared.physicalRunRoot !== runRoot.physicalPath ||
|
|
21
|
-
prepared.runRootIdentity.birthtimeNs !== runRoot.birthtimeNs ||
|
|
22
|
-
prepared.runRootIdentity.dev !== runRoot.dev ||
|
|
23
|
-
prepared.runRootIdentity.ino !== runRoot.ino) {
|
|
24
|
-
throw new Error("ANALYSIS_STORAGE_CHANGED");
|
|
25
|
-
}
|
|
26
|
-
return projectShareCheckedAnalysis(await loadAnalysis(prepared));
|
|
33
|
+
loaded = projectShareCheckedAnalysis(await loadAnalysis(await servedRunPaths(runRoot)));
|
|
27
34
|
}
|
|
28
35
|
catch {
|
|
29
|
-
|
|
36
|
+
loaded = {
|
|
30
37
|
state: "invalid",
|
|
31
38
|
analysis: null,
|
|
32
39
|
corrections: [],
|
|
33
40
|
warnings: ["Analysis could not be validated against this recording."],
|
|
34
41
|
};
|
|
35
42
|
}
|
|
43
|
+
const spend = await readServedAnalysisSpend(runRoot);
|
|
44
|
+
return spend === undefined ? loaded : { ...loaded, spend };
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The run's analysis spend, read by the same reader as stats, so a request whose report could not
|
|
48
|
+
* be validated still counts. Undefined when the run sent none or its history cannot be bound.
|
|
49
|
+
*/
|
|
50
|
+
async function readServedAnalysisSpend(runRoot) {
|
|
51
|
+
try {
|
|
52
|
+
return analysisCostOf(await readAnalysisAccounting(await servedRunPaths(runRoot))) ?? undefined;
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
36
57
|
}
|
|
37
58
|
/** internal: consumed by src/observer/serve.ts */
|
|
38
59
|
export async function serveRunPath(runRoot, relativePath, response, runtimeStreamUrls = [], request) {
|
|
@@ -219,6 +240,7 @@ admitRun) {
|
|
|
219
240
|
if (admitRun && !root)
|
|
220
241
|
return null;
|
|
221
242
|
const data = root ? await readObserverData(root) : null;
|
|
243
|
+
const spend = root && data ? await readServedAnalysisSpend(root) : undefined;
|
|
222
244
|
// listRuns read run.json before admission, so an admitted run's fields come from its
|
|
223
245
|
// guarded read instead.
|
|
224
246
|
return {
|
|
@@ -233,6 +255,9 @@ admitRun) {
|
|
|
233
255
|
estimatedCostUsd: data?.cost?.estimatedTotalUsd ?? null,
|
|
234
256
|
costRatesAsOf: data?.cost?.ratesAsOf ?? null,
|
|
235
257
|
costPlaceholder: data?.cost?.placeholder ?? false,
|
|
258
|
+
// What the row shows: participants and desktops plus the run's analyses, as every
|
|
259
|
+
// surface that shows one run's cost reads it.
|
|
260
|
+
costLabel: data ? (runCostLabel(runCost(data.cost, spend)) ?? null) : null,
|
|
236
261
|
};
|
|
237
262
|
}));
|
|
238
263
|
await assertPinnedDirectory(proofRoot);
|