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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
// A scorer module: humanish calls `score` over the finished evidence of a computer-use,
|
|
3
3
|
// shared-world or terminal run and stores the result, under your namespace, as
|
|
4
|
-
// `bundle.adapterScore`. The same file works with `humanish
|
|
5
|
-
// from a library caller, as the scorer hooks passed to `
|
|
4
|
+
// `bundle.adapterScore`. The same file works with `humanish run <study> --scorer scorer.mjs` and,
|
|
5
|
+
// from a library caller, as the scorer hooks passed to `runStudy`.
|
|
6
6
|
|
|
7
7
|
/** @type {NonNullable<import("humanish").AdapterScorerModule["score"]>} */
|
|
8
8
|
export function score(ctx) {
|
|
@@ -14,7 +14,7 @@ export function score(ctx) {
|
|
|
14
14
|
// A dry run has no participant behavior to judge, so this rubric withholds a pass.
|
|
15
15
|
status: dryRun ? "partial" : "pass",
|
|
16
16
|
score: dryRun ? 50 : 100,
|
|
17
|
-
summary: `${participants} participant stream(s) in ${ctx.
|
|
17
|
+
summary: `${participants} participant stream(s) in ${ctx.studyId}${dryRun ? " (dry run)" : ""}.`,
|
|
18
18
|
data: { participants, runId: ctx.runId },
|
|
19
19
|
};
|
|
20
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "humanish",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.109.1",
|
|
4
4
|
"description": "Synthetic user research for apps, CLIs, and agent-facing product flows.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
"prose:check": "node scripts/check-code-prose.mjs",
|
|
92
92
|
"vocabulary:check": "tsx scripts/check-retired-words.ts",
|
|
93
93
|
"site-css:check": "node scripts/check-site-css.mjs",
|
|
94
|
+
"site:tour": "tsx scripts/site-tour.ts",
|
|
94
95
|
"site:hero:proof": "node scripts/site-hero-wrap-proof.mjs"
|
|
95
96
|
},
|
|
96
97
|
"dependencies": {
|
package/skills/humanish/SKILL.md
CHANGED
|
@@ -252,9 +252,11 @@ defaults:
|
|
|
252
252
|
A study declares its `route` (`preview`, `computer-use`, `shared-world`, `terminal` or
|
|
253
253
|
`scripted`) and composes `subject`, `actor`, `participants`, `caps`, `execution` and
|
|
254
254
|
`policies` for it; a key the route does not read is a parse error that names the route.
|
|
255
|
-
Run `npx humanish study show <study>` to see how a study file parses.
|
|
256
|
-
`humanish.lab.v2` file from 0.107
|
|
257
|
-
rewrites
|
|
255
|
+
Run `npx humanish study show <study>` to see how a study file parses. humanish
|
|
256
|
+
no longer runs a `humanish.lab.v2` file from 0.107: it fails with
|
|
257
|
+
`HUMANISH_STUDY_V2_UNSUPPORTED`. `npx humanish migrate` rewrites every v2 file as v3
|
|
258
|
+
under `studies/`, and `--dry-run` lists them first. A v3 file left in a `labs/` folder
|
|
259
|
+
fails with `HUMANISH_STUDY_RETIRED_DIRECTORY`; move it to the matching `studies/` folder.
|
|
258
260
|
|
|
259
261
|
### Many actors at once (fan-out, shared worlds, concurrency)
|
|
260
262
|
|
|
@@ -403,7 +405,7 @@ still runs by default when `OPENAI_API_KEY` is set, with a $3 cap; keep
|
|
|
403
405
|
`review.analysis: false` to skip it. Copy the shape of
|
|
404
406
|
[`humanish/studies/scripted-demo.yaml`](https://github.com/danielgwilson/humanish/blob/main/humanish/studies/scripted-demo.yaml)
|
|
405
407
|
or the example in the
|
|
406
|
-
[
|
|
408
|
+
[study file reference](https://humanish.dev/docs/study-files#scripted-browser-scenarios):
|
|
407
409
|
set `subject.appUrl` to the loopback URL, `scenario` to the scenario id,
|
|
408
410
|
and `mode: live`. Without `mode: live` the study is a dry run that opens
|
|
409
411
|
no browser.
|
|
@@ -417,8 +419,8 @@ npx humanish observe --run latest --open # for a person; it serves until Ctrl-
|
|
|
417
419
|
```
|
|
418
420
|
|
|
419
421
|
Do not use `humanish watch --count ...` as a substitute for a scripted-browser
|
|
420
|
-
study. `watch`
|
|
421
|
-
captures desktop and mobile browser evidence against a running app.
|
|
422
|
+
study. `watch` without a study starts a preview run for the Observer; a live scripted-browser
|
|
423
|
+
study captures desktop and mobile browser evidence against a running app.
|
|
422
424
|
|
|
423
425
|
## Optional Live E2B Study
|
|
424
426
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "humanish CLI"
|
|
3
3
|
short_description: "Set up public-safe persona simulation"
|
|
4
|
-
default_prompt: "Use $humanish to install humanish in this repo, scaffold synthetic personas and scenarios, run the safe Observer proof, and report the public-safe artifacts. If the app can run locally, start it on loopback and run a live scripted study (see https://humanish.dev/docs/
|
|
4
|
+
default_prompt: "Use $humanish to install humanish in this repo, scaffold synthetic personas and scenarios, run the safe Observer proof, and report the public-safe artifacts. If the app can run locally, start it on loopback and run a live scripted study (see https://humanish.dev/docs/study-files#scripted-browser-scenarios; set `mode: live` and keep `review.analysis: false`) before opening the Observer with `humanish observe --run latest`; do not treat `watch --count` as app behavior proof."
|
|
5
5
|
|
|
6
6
|
policy:
|
|
7
7
|
allow_implicit_invocation: true
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { HumanOutput } from "../io.js";
|
|
2
|
-
import type { CuaActorLabResult } from "../../routes/computer-use/types.js";
|
|
3
|
-
import type { ScriptedBrowserLabResult } from "../../routes/scripted/types.js";
|
|
4
|
-
import type { TerminalProductLabResult } from "../../routes/terminal/types.js";
|
|
5
|
-
import type { ConcurrentSharedWorldLabResult } from "../../routes/shared-world/types.js";
|
|
6
|
-
export declare function formatConcurrentSharedWorldLabHuman(result: ConcurrentSharedWorldLabResult): HumanOutput;
|
|
7
|
-
export declare function formatTerminalLabHuman(result: TerminalProductLabResult): HumanOutput;
|
|
8
|
-
export declare function formatScriptedLabHuman(result: ScriptedBrowserLabResult): HumanOutput;
|
|
9
|
-
export declare function formatCuaLabHuman(result: CuaActorLabResult): HumanOutput;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { type InternalRunLabOptions, type LabOutcome } from "../../run-lab.js";
|
|
2
|
-
import type { LabConfig } from "../../lab/types.js";
|
|
3
|
-
import type { LoadedAdapterScorer } from "./lab-scorer.js";
|
|
4
|
-
export interface RouteRun {
|
|
5
|
-
readonly options: InternalRunLabOptions;
|
|
6
|
-
present(outcome: LabOutcome): Promise<void>;
|
|
7
|
-
/** Handles an error runLab threw, and rethrows any it does not handle. */
|
|
8
|
-
onRunError?(error: unknown): Promise<void>;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Plans the lab with a route's options, then presents the refusal or the run. `beforeRun` runs
|
|
12
|
-
* only for a plan that will run: it loads the scorer, or writes its own refusal and returns
|
|
13
|
-
* undefined, so a refused lab never imports the scorer's host code. `afterRun` runs once runLab
|
|
14
|
-
* has returned or thrown, before presentation, which may hold its own signal handlers (watch's
|
|
15
|
-
* Observer and tunnel).
|
|
16
|
-
*/
|
|
17
|
-
export declare function runRoute(config: LabConfig, run: RouteRun, beforeRun?: () => Promise<{
|
|
18
|
-
scorer?: LoadedAdapterScorer;
|
|
19
|
-
} | undefined>, afterRun?: () => void): Promise<void>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Command } from "commander";
|
|
2
|
-
import type { LabConfig } from "../../lab/types.js";
|
|
3
|
-
import { type CliIo, type LabCommandOptions } from "../io.js";
|
|
4
|
-
import type { RouteRun } from "./lab-route-run.js";
|
|
5
|
-
interface ScriptedRouteArgs {
|
|
6
|
-
command: Command;
|
|
7
|
-
io: CliIo;
|
|
8
|
-
config: LabConfig;
|
|
9
|
-
mode: "run" | "watch";
|
|
10
|
-
options: LabCommandOptions;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* The scripted route's CLI setup: its open semantics and runLab options, and how it presents the
|
|
14
|
-
* outcome. Undefined when watch-mode setup has already written its own result.
|
|
15
|
-
*/
|
|
16
|
-
export declare function scriptedRouteRun(args: ScriptedRouteArgs): RouteRun | undefined;
|
|
17
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Command } from "commander";
|
|
2
|
-
import type { LabConfig } from "../../lab/types.js";
|
|
3
|
-
import { type CliIo, type LabCommandOptions } from "../io.js";
|
|
4
|
-
import type { RouteRun } from "./lab-route-run.js";
|
|
5
|
-
interface TerminalRouteArgs {
|
|
6
|
-
command: Command;
|
|
7
|
-
io: CliIo;
|
|
8
|
-
config: LabConfig;
|
|
9
|
-
mode: "run" | "watch";
|
|
10
|
-
options: LabCommandOptions;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* The terminal route's CLI setup: its open semantics and runLab options, and how it presents the
|
|
14
|
-
* outcome. Undefined when watch-mode setup has already written its own result.
|
|
15
|
-
*/
|
|
16
|
-
export declare function terminalRouteRun(args: TerminalRouteArgs): RouteRun | undefined;
|
|
17
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Command } from "commander";
|
|
2
|
-
import { type CliIo, type LabCommandOptions } from "../io.js";
|
|
3
|
-
export declare function runLabCommand(args: {
|
|
4
|
-
command: Command;
|
|
5
|
-
io: CliIo;
|
|
6
|
-
lab: string;
|
|
7
|
-
mode: "run" | "watch";
|
|
8
|
-
options: LabCommandOptions;
|
|
9
|
-
}): Promise<void>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { LabConfig } from "./types.js";
|
|
2
|
-
/** The first composition rule a config breaks, in the parser's order, or null. */
|
|
3
|
-
export declare function compositionReason(config: LabConfig): string | null;
|
|
4
|
-
/** Why a this-repo lab cannot run live. The parser and the preview planner both refuse with it. */
|
|
5
|
-
export declare const THIS_REPO_DRY_RUN_ONLY = "this-repo labs are dry-run only; use a clone or app-url subject for a live run.";
|
|
6
|
-
/** A desktop-cli subject with no product to study. The computer-use planner checks this too. */
|
|
7
|
-
export declare function desktopCliProductReason(config: LabConfig): string | null;
|
package/dist/lab/config.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { type LabConfigParseResult } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Validate a parsed YAML object into a LabConfig. Pure: the caller owns file IO. Structural
|
|
4
|
-
* validation only. Fields the engine does not yet consume are accepted but reported in
|
|
5
|
-
* `warnings` so `lab inspect` never silently swallows a setting that does nothing.
|
|
6
|
-
*/
|
|
7
|
-
export declare function parseLabConfig(raw: unknown): LabConfigParseResult;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/** One deprecated field: what to read instead, and how to compute the old value. */
|
|
2
|
-
export interface DeprecatedField {
|
|
3
|
-
readonly replacement: string;
|
|
4
|
-
readonly read: () => unknown;
|
|
5
|
-
}
|
|
6
|
-
/** Adds `fields` to `value` as warning getters and returns `value`. */
|
|
7
|
-
export declare function withDeprecatedFields<T extends object>(value: T, owner: {
|
|
8
|
-
readonly name: string;
|
|
9
|
-
readonly code: `HUMANISH_${string}`;
|
|
10
|
-
}, fields: Readonly<Record<string, DeprecatedField>>): T;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// Deprecated fields on a value humanish hands to a caller. Each is a getter that warns once per
|
|
2
|
-
// process when read. The getters are not enumerable, so a spread, `Object.assign`,
|
|
3
|
-
// `JSON.stringify` or `structuredClone` of the value skips them and warns about no field the
|
|
4
|
-
// caller never named; `"name" in value` still finds them. Core never reads them.
|
|
5
|
-
const warned = new Set();
|
|
6
|
-
/** Adds `fields` to `value` as warning getters and returns `value`. */
|
|
7
|
-
export function withDeprecatedFields(value, owner, fields) {
|
|
8
|
-
return Object.defineProperties(value, Object.fromEntries(Object.entries(fields).map(([field, { replacement, read }]) => [
|
|
9
|
-
field,
|
|
10
|
-
{
|
|
11
|
-
enumerable: false,
|
|
12
|
-
get: () => {
|
|
13
|
-
warnOnce(`${owner.name}.${field}`, replacement, owner.code);
|
|
14
|
-
return read();
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
])));
|
|
18
|
-
}
|
|
19
|
-
function warnOnce(name, replacement, code) {
|
|
20
|
-
if (warned.has(name))
|
|
21
|
-
return;
|
|
22
|
-
warned.add(name);
|
|
23
|
-
process.emitWarning(`${name} is deprecated and is removed in the next minor. Use ${replacement}.`, { type: "DeprecationWarning", code });
|
|
24
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { LabComms, LabCommsEmail, LabCommsRecipient, LabConfigParseFailure } from "../types.js";
|
|
2
|
-
export declare function parseComms(raw: unknown): {
|
|
3
|
-
ok: true;
|
|
4
|
-
value: LabComms | undefined;
|
|
5
|
-
} | LabConfigParseFailure;
|
|
6
|
-
/** The participant a declared inbox recipient belongs to. The manifest spells it `lane`. */
|
|
7
|
-
export declare function recipientParticipantId(recipient: LabCommsRecipient): string;
|
|
8
|
-
/** The declared recipients that name an address, in declaration order, by participant id. */
|
|
9
|
-
export declare function addressedRecipients(email: Pick<LabCommsEmail, "recipients">): {
|
|
10
|
-
participantId: string;
|
|
11
|
-
address: string;
|
|
12
|
-
}[];
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { LabConfigParseFailure, LabDefaults, LabExecution, LabPolicies, LabReview, LabScenario } from "../types.js";
|
|
2
|
-
export declare function parseExecution(raw: unknown): {
|
|
3
|
-
ok: true;
|
|
4
|
-
value: LabExecution | undefined;
|
|
5
|
-
} | LabConfigParseFailure;
|
|
6
|
-
export declare function parsePersonas(raw: unknown): Record<string, unknown>[] | undefined;
|
|
7
|
-
export declare function parseScenario(raw: unknown): {
|
|
8
|
-
ok: true;
|
|
9
|
-
value: LabScenario | undefined;
|
|
10
|
-
} | LabConfigParseFailure;
|
|
11
|
-
export declare function parsePolicies(raw: unknown): {
|
|
12
|
-
ok: true;
|
|
13
|
-
value: LabPolicies | undefined;
|
|
14
|
-
} | LabConfigParseFailure;
|
|
15
|
-
export declare function parseReview(raw: unknown): {
|
|
16
|
-
ok: true;
|
|
17
|
-
value: LabReview | undefined;
|
|
18
|
-
} | LabConfigParseFailure;
|
|
19
|
-
export declare function parseDefaults(raw: unknown): LabDefaults | undefined;
|
package/dist/lab/plan.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { InternalRunLabOptions } from "../run-lab.js";
|
|
2
|
-
import type { LabDeps } from "./lab-deps.js";
|
|
3
|
-
import type { PlanResult } from "./plan-types.js";
|
|
4
|
-
import type { LabConfig } from "./types.js";
|
|
5
|
-
export { routeOf, type LabRoute } from "./routing.js";
|
|
6
|
-
/** Resolve dry-run: explicit override wins, else the scenario mode, else the given fallback. */
|
|
7
|
-
export declare function resolveLabDryRun(config: LabConfig, override: boolean | undefined, fallback: boolean | undefined): boolean | undefined;
|
|
8
|
-
/**
|
|
9
|
-
* The plan a lab runs under, built without reading files, env or the network. Each route's planner
|
|
10
|
-
* makes every refusal that route makes, in the route's order and with its codes and messages; the
|
|
11
|
-
* route's exported runner calls the same planner.
|
|
12
|
-
*/
|
|
13
|
-
export declare function planLab(config: LabConfig, options: InternalRunLabOptions, deps?: LabDeps): PlanResult;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { LabPreflightResult, PreflightContext } from "./preflight.js";
|
|
2
|
-
export declare function runPublicPreviewPreflight(ctx: PreflightContext): Promise<LabPreflightResult>;
|
|
3
|
-
export declare function runSandboxLoopbackPreflight(ctx: PreflightContext): Promise<LabPreflightResult>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { LabPreflightCheck, LabPreflightResult, PreflightContext } from "./preflight.js";
|
|
2
|
-
/** The schema of `lab preflight` results: whether a study is ready to run on this machine. */
|
|
3
|
-
export declare const STUDY_CHECK_SCHEMA = "humanish.study-check.v1";
|
|
4
|
-
export declare function finalize(ctx: PreflightContext, args?: {
|
|
5
|
-
check?: LabPreflightCheck;
|
|
6
|
-
}): LabPreflightResult;
|
|
7
|
-
export declare function fail(ctx: PreflightContext, code: NonNullable<LabPreflightResult["error"]>["code"], message: string, checks: LabPreflightCheck[]): LabPreflightResult;
|
|
8
|
-
export declare function digest(value: string): string;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { InternalRunLabOptions } from "../run-lab.js";
|
|
2
|
-
import type { RunScorerProvenance } from "../run/bundle.js";
|
|
3
|
-
import { type AdapterScorerModule } from "./adapter-scorer-loader.js";
|
|
4
|
-
import type { LabDeps } from "./lab-deps.js";
|
|
5
|
-
import type { LabEvent } from "./run-lab-events.js";
|
|
6
|
-
import type { ComputerUseRunInput } from "../routes/computer-use/types.js";
|
|
7
|
-
import type { ScriptedRunInput } from "../routes/scripted/types.js";
|
|
8
|
-
import type { SharedWorldRunInput } from "../routes/shared-world/types.js";
|
|
9
|
-
import type { TerminalRunInput } from "../routes/terminal/types.js";
|
|
10
|
-
export declare function computerUseInput(options: InternalRunLabOptions, deps: LabDeps, emit: LabEmit | undefined): ComputerUseRunInput;
|
|
11
|
-
export declare function scriptedInput(options: InternalRunLabOptions, deps: LabDeps, emit: LabEmit | undefined): ScriptedRunInput;
|
|
12
|
-
export declare function terminalInput(options: InternalRunLabOptions, deps: LabDeps, emit: LabEmit | undefined): TerminalRunInput;
|
|
13
|
-
export declare function sharedWorldInput(options: InternalRunLabOptions, deps: LabDeps, emit: LabEmit | undefined): SharedWorldRunInput;
|
|
14
|
-
/** A scorer the CLI loads after the route's local checks, and the provenance it stamps on the run. */
|
|
15
|
-
export type LateScorer = Pick<InternalRunLabOptions, "scorer" | "scorerProvenance">;
|
|
16
|
-
/** Narrows RunLabOptions.scorer to the context the route passes (adapter-scorer-loader.ts). */
|
|
17
|
-
type NarrowScorer<S> = (scorer: AdapterScorerModule) => S;
|
|
18
|
-
/**
|
|
19
|
-
* A route's input with a scorer loaded after admission, and the scorer's provenance, as if the
|
|
20
|
-
* caller had passed them up front. The rest of the input is the one the route's checks admitted.
|
|
21
|
-
*/
|
|
22
|
-
export declare function withLateScorer<S, I extends {
|
|
23
|
-
scorer?: S;
|
|
24
|
-
scorerProvenance?: RunScorerProvenance;
|
|
25
|
-
}>(input: I, late: LateScorer | undefined, narrow: NarrowScorer<S>): I;
|
|
26
|
-
/** Reports a LabEvent to onEvent without waiting (normalizeRunLabOptions builds it). */
|
|
27
|
-
type LabEmit = (event: LabEvent) => void;
|
|
28
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
// The public RunLabOptions homes that every route reads: env, scorer, prepareDesktop, onEvent,
|
|
2
|
-
// onStream and analysisSignal, and the brain and in-process driving computer use takes.
|
|
3
|
-
import { withDeprecatedFields } from "./deprecated-fields.js";
|
|
4
|
-
/** A stream event as the routes report it, with `simId` as a getter over `recordId`. */
|
|
5
|
-
export function streamEvent(fields) {
|
|
6
|
-
return withDeprecatedFields({ ...fields }, { name: "StreamEvent", code: "HUMANISH_STREAM_EVENT_FIELD_DEPRECATED" }, { simId: { replacement: "recordId", read: () => fields.recordId } });
|
|
7
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { InternalRunLabOptions, LabOutcome, RunLabOptions } from "../run-lab.js";
|
|
2
|
-
import { type LabRoute } from "./plan.js";
|
|
3
|
-
import type { LabConfig } from "./types.js";
|
|
4
|
-
import { type LabEvent } from "./run-lab-events.js";
|
|
5
|
-
type Refusal = {
|
|
6
|
-
ok: false;
|
|
7
|
-
code: "HUMANISH_STUDY_OPTION_UNSUPPORTED";
|
|
8
|
-
message: string;
|
|
9
|
-
};
|
|
10
|
-
type Normalized = {
|
|
11
|
-
ok: true;
|
|
12
|
-
/** The options the route reads: onEvent removed, env copied. */
|
|
13
|
-
options: InternalRunLabOptions;
|
|
14
|
-
/** Filled by onEvent failures while the run runs; runLab appends them to the result. */
|
|
15
|
-
warnings: string[];
|
|
16
|
-
/** Calls onEvent and never waits for it, or undefined without onEvent. The routes report through it. */
|
|
17
|
-
emit: ((event: LabEvent) => void) | undefined;
|
|
18
|
-
};
|
|
19
|
-
/** The refusal for a field a JavaScript caller passed that RunLabOptions no longer has. */
|
|
20
|
-
export declare function removedOptionRefusal(options: RunLabOptions): Refusal | undefined;
|
|
21
|
-
/**
|
|
22
|
-
* Refuse what the route cannot honor, copy env, and build the emitter onEvent receives through.
|
|
23
|
-
* Nothing here touches the filesystem, so a refusal leaves no run directory, receipt or sandbox.
|
|
24
|
-
*/
|
|
25
|
-
export declare function normalizeRunLabOptions(config: LabConfig, route: LabRoute, options: InternalRunLabOptions): Normalized | Refusal;
|
|
26
|
-
/** A refusal in the route's own result envelope, before any run exists. */
|
|
27
|
-
export declare function optionRefusalOutcome(config: LabConfig, route: LabRoute, options: RunLabOptions, refusal: Refusal): LabOutcome;
|
|
28
|
-
export {};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { CuaAdmissionLimitError as AdmissionLimitError } from "./actors/computer-use/admission-limit.js";
|
|
2
|
-
import type { CuaAction as Action, CuaExecutor as Executor, CuaLoopOptions as LoopOptions, CuaLoopResult as LoopResult, CuaObservation as Observation, CuaProvider as Provider, CuaSafetyCheck as SafetyCheck, CuaTurn as Turn, CuaTurnRequest as TurnRequest } from "./actors/computer-use/loop.js";
|
|
3
|
-
import type { BrowserLabScoringContext as BrowserScoringContext } from "./lab/adapter-extension.js";
|
|
4
|
-
import { parseLabConfig as parseStudy } from "./lab/config.js";
|
|
5
|
-
import type { LabRoute as StudyRoute } from "./lab/routing.js";
|
|
6
|
-
import type { LabEvent as StudyEvent } from "./lab/run-lab-events.js";
|
|
7
|
-
import { type LabConfig as StudyConfig } from "./lab/types.js";
|
|
8
|
-
import { runPackageLab as runStudy, type LabOutcome as StudyOutcome, type LabResult as StudyResult, type RunLabOptions as RunStudyOptions } from "./run-lab.js";
|
|
9
|
-
/** @deprecated Use `runStudy`, the same function. 0.109 removes `runLab`. */
|
|
10
|
-
export declare const runLab: typeof runStudy;
|
|
11
|
-
/** @deprecated Use `parseStudy`, the same function. 0.109 removes `parseLabConfig`. */
|
|
12
|
-
export declare const parseLabConfig: typeof parseStudy;
|
|
13
|
-
/**
|
|
14
|
-
* The `humanish.lab.v2` schema id, which 0.109 stops parsing.
|
|
15
|
-
* @deprecated Write `STUDY_SCHEMA` (`humanish.study.v3`) files. 0.109 removes `LAB_CONFIG_SCHEMA`.
|
|
16
|
-
*/
|
|
17
|
-
export declare const LAB_CONFIG_SCHEMA = "humanish.lab.v2";
|
|
18
|
-
/** @deprecated Use `StudyConfig`, the same type. 0.109 removes `LabConfig`. */
|
|
19
|
-
export type LabConfig = StudyConfig;
|
|
20
|
-
/** @deprecated Use `StudyEvent`, the same type. 0.109 removes `LabEvent`. */
|
|
21
|
-
export type LabEvent = StudyEvent;
|
|
22
|
-
/** @deprecated Use `StudyOutcome`, the same type. 0.109 removes `LabOutcome`. */
|
|
23
|
-
export type LabOutcome = StudyOutcome;
|
|
24
|
-
/** @deprecated Use `StudyResult`, the same type. 0.109 removes `LabResult`. */
|
|
25
|
-
export type LabResult<R extends StudyRoute = StudyRoute> = StudyResult<R>;
|
|
26
|
-
/** @deprecated Use `StudyRoute`, the same type. 0.109 removes `LabRoute`. */
|
|
27
|
-
export type LabRoute = StudyRoute;
|
|
28
|
-
/** @deprecated Use `RunStudyOptions`, the same type. 0.109 removes `RunLabOptions`. */
|
|
29
|
-
export type RunLabOptions = RunStudyOptions;
|
|
30
|
-
/** @deprecated Use `BrowserScoringContext`, the same type. 0.109 removes `BrowserLabScoringContext`. */
|
|
31
|
-
export type BrowserLabScoringContext = BrowserScoringContext;
|
|
32
|
-
/**
|
|
33
|
-
* @deprecated Use `ComputerUseAdmissionLimitError`, the same class, so `instanceof` matches either
|
|
34
|
-
* name. 0.109 removes `CuaAdmissionLimitError`.
|
|
35
|
-
*/
|
|
36
|
-
export declare const CuaAdmissionLimitError: typeof AdmissionLimitError;
|
|
37
|
-
/** @deprecated Use `ComputerUseAdmissionLimitError`. 0.109 removes `CuaAdmissionLimitError`. */
|
|
38
|
-
export type CuaAdmissionLimitError = AdmissionLimitError;
|
|
39
|
-
/** @deprecated Use `ComputerUseAction`, the same type. 0.109 removes `CuaAction`. */
|
|
40
|
-
export type CuaAction = Action;
|
|
41
|
-
/** @deprecated Use `ComputerUseExecutor`, the same type. 0.109 removes `CuaExecutor`. */
|
|
42
|
-
export type CuaExecutor = Executor;
|
|
43
|
-
/** @deprecated Use `ComputerUseLoopOptions`, the same type. 0.109 removes `CuaLoopOptions`. */
|
|
44
|
-
export type CuaLoopOptions = LoopOptions;
|
|
45
|
-
/** @deprecated Use `ComputerUseLoopResult`, the same type. 0.109 removes `CuaLoopResult`. */
|
|
46
|
-
export type CuaLoopResult = LoopResult;
|
|
47
|
-
/** @deprecated Use `ComputerUseObservation`, the same type. 0.109 removes `CuaObservation`. */
|
|
48
|
-
export type CuaObservation = Observation;
|
|
49
|
-
/** @deprecated Use `ComputerUseProvider`, the same type. 0.109 removes `CuaProvider`. */
|
|
50
|
-
export type CuaProvider = Provider;
|
|
51
|
-
/** @deprecated Use `ComputerUseSafetyCheck`, the same type. 0.109 removes `CuaSafetyCheck`. */
|
|
52
|
-
export type CuaSafetyCheck = SafetyCheck;
|
|
53
|
-
/** @deprecated Use `ComputerUseTurn`, the same type. 0.109 removes `CuaTurn`. */
|
|
54
|
-
export type CuaTurn = Turn;
|
|
55
|
-
/** @deprecated Use `ComputerUseTurnRequest`, the same type. 0.109 removes `CuaTurnRequest`. */
|
|
56
|
-
export type CuaTurnRequest = TurnRequest;
|
package/dist/library-aliases.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// The names 0.107's library exported for running a lab and driving a computer-use participant.
|
|
2
|
-
// Each is the same function, constant, class or type as the name that replaces it, so an existing
|
|
3
|
-
// import, call or `instanceof` check keeps working, and editors mark it deprecated.
|
|
4
|
-
// Removed in 0.109.0: this module and its exports in src/index.ts.
|
|
5
|
-
import { CuaAdmissionLimitError as AdmissionLimitError } from "./actors/computer-use/admission-limit.js";
|
|
6
|
-
import { parseLabConfig as parseStudy } from "./lab/config.js";
|
|
7
|
-
import { LAB_CONFIG_SCHEMA as V2_SCHEMA } from "./lab/types.js";
|
|
8
|
-
import { runPackageLab as runStudy, } from "./run-lab.js";
|
|
9
|
-
/** @deprecated Use `runStudy`, the same function. 0.109 removes `runLab`. */
|
|
10
|
-
export const runLab = runStudy;
|
|
11
|
-
/** @deprecated Use `parseStudy`, the same function. 0.109 removes `parseLabConfig`. */
|
|
12
|
-
export const parseLabConfig = parseStudy;
|
|
13
|
-
/**
|
|
14
|
-
* The `humanish.lab.v2` schema id, which 0.109 stops parsing.
|
|
15
|
-
* @deprecated Write `STUDY_SCHEMA` (`humanish.study.v3`) files. 0.109 removes `LAB_CONFIG_SCHEMA`.
|
|
16
|
-
*/
|
|
17
|
-
export const LAB_CONFIG_SCHEMA = V2_SCHEMA;
|
|
18
|
-
/**
|
|
19
|
-
* @deprecated Use `ComputerUseAdmissionLimitError`, the same class, so `instanceof` matches either
|
|
20
|
-
* name. 0.109 removes `CuaAdmissionLimitError`.
|
|
21
|
-
*/
|
|
22
|
-
export const CuaAdmissionLimitError = AdmissionLimitError;
|
package/dist/run-lab.d.ts
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import type { LocalVmInput } from "./routes/computer-use/types.js";
|
|
2
|
-
import { type LateScorer } from "./lab/route-inputs.js";
|
|
3
|
-
import { type LabRoute } from "./lab/plan.js";
|
|
4
|
-
import type { LabDeps } from "./lab/lab-deps.js";
|
|
5
|
-
import type { RunLabDriving, RunLabHomes } from "./lab/run-lab-homes.js";
|
|
6
|
-
import { type LabConfig } from "./lab/types.js";
|
|
7
|
-
import type { ObserverResult } from "./observer/render.js";
|
|
8
|
-
import { type CuaActorLabResult } from "./routes/computer-use/types.js";
|
|
9
|
-
import { type PreviewStudyResult } from "./routes/preview.js";
|
|
10
|
-
import { type ScriptedBrowserLabResult } from "./routes/scripted/types.js";
|
|
11
|
-
import { type ConcurrentSharedWorldLabResult } from "./routes/shared-world/types.js";
|
|
12
|
-
import { type TerminalProductLabResult } from "./routes/terminal/types.js";
|
|
13
|
-
import { type RunScorerProvenance } from "./run/bundle.js";
|
|
14
|
-
import type { RunStudyProvenance } from "./run/study-provenance.js";
|
|
15
|
-
/**
|
|
16
|
-
* Runs a lab on its route. The options are checked against the route and mapped into the route's
|
|
17
|
-
* hook bags before anything runs. Each route closes the run it started on every exit through its
|
|
18
|
-
* own run scope (`src/run/run.ts`).
|
|
19
|
-
*/
|
|
20
|
-
export declare function runLab(config: LabConfig, options: InternalRunLabOptions, deps?: LabDeps): Promise<LabOutcome>;
|
|
21
|
-
/**
|
|
22
|
-
* runLab as the package exports it (`src/index.ts`): the public options only. A JavaScript caller
|
|
23
|
-
* that passes a field RunLabOptions no longer has is refused in the route's own result envelope
|
|
24
|
-
* before anything runs.
|
|
25
|
-
*/
|
|
26
|
-
export declare function runPackageLab(config: LabConfig, options: RunLabOptions): Promise<LabOutcome>;
|
|
27
|
-
/** A lab planned once: the route's refusal, or the run of its plan. */
|
|
28
|
-
export type PreparedLab = {
|
|
29
|
-
readonly ok: false;
|
|
30
|
-
readonly outcome: LabOutcome;
|
|
31
|
-
} | {
|
|
32
|
-
readonly ok: true;
|
|
33
|
-
/** Runs the plan. A scorer loaded after planning joins the run's hooks; it changes no plan. */
|
|
34
|
-
run(scorer?: LateScorer): Promise<LabOutcome>;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Normalizes the options and plans the lab once, so a caller can present a refusal before it loads
|
|
38
|
-
* anything the run needs. A local browser study's provider is bound first, so the plan is made with
|
|
39
|
-
* it, and its desktop goes to the computer-use run as `localVm`; with inProcess the caller drives
|
|
40
|
-
* the app in process and needs no desktop.
|
|
41
|
-
*/
|
|
42
|
-
export declare function prepareLab(config: LabConfig, options: InternalRunLabOptions, deps?: LabDeps): Promise<PreparedLab>;
|
|
43
|
-
/**
|
|
44
|
-
* What a package caller passes to runLab: the run's settings and the typed homes (`RunLabHomes`,
|
|
45
|
-
* `RunLabDriving`). Each wins over the config when provided.
|
|
46
|
-
*/
|
|
47
|
-
export type RunLabOptions = RunLabBase & RunLabHomes & RunLabDriving;
|
|
48
|
-
interface RunLabBase {
|
|
49
|
-
cwd: string;
|
|
50
|
-
runId?: string;
|
|
51
|
-
dryRun?: boolean;
|
|
52
|
-
open?: boolean;
|
|
53
|
-
/** Participant count override: preview participants or computer-use desktops. */
|
|
54
|
-
count?: number;
|
|
55
|
-
/** CUA fan-out only: create a new run for failed/selected participants from a prior run. */
|
|
56
|
-
rerun?: {
|
|
57
|
-
sourceRunId: string;
|
|
58
|
-
participantIds?: string[];
|
|
59
|
-
};
|
|
60
|
-
onObserverReady?: (observer: ObserverResult & {
|
|
61
|
-
ok: true;
|
|
62
|
-
}) => Promise<void> | void;
|
|
63
|
-
}
|
|
64
|
-
/** runLab's options inside the package: the public ones plus what only the CLI and tests set. */
|
|
65
|
-
export type InternalRunLabOptions = RunLabOptions & RunLabInternals;
|
|
66
|
-
interface RunLabInternals {
|
|
67
|
-
/**
|
|
68
|
-
* Which manifest this run came from. planLab puts it on the plan, and the route reads
|
|
69
|
-
* plan.lab for the run's status record and bundle. Absent for a library caller that passes a
|
|
70
|
-
* LabConfig directly; that run records no lab.
|
|
71
|
-
*/
|
|
72
|
-
lab?: RunStudyProvenance;
|
|
73
|
-
/**
|
|
74
|
-
* Config-declared scorer provenance, forwarded alongside the
|
|
75
|
-
* loaded scorer. Its presence is the "declared" marker the terminal route reads to flip a
|
|
76
|
-
* status:"fail" verdict; the browser routes stamp it as evidence (they already flip). Core-computed
|
|
77
|
-
* (path + digest), never adopter-supplied; absent for library callers.
|
|
78
|
-
*/
|
|
79
|
-
scorerProvenance?: RunScorerProvenance;
|
|
80
|
-
/** The local VM study's desktop, analysis gate and signal, for a local browser lab. */
|
|
81
|
-
localVm?: LocalVmInput;
|
|
82
|
-
}
|
|
83
|
-
/** A run's result and the route it ran on. */
|
|
84
|
-
interface RouteOutcome<R extends LabRoute, T> {
|
|
85
|
-
route: R;
|
|
86
|
-
result: T;
|
|
87
|
-
}
|
|
88
|
-
export type LabOutcome = RouteOutcome<"preview", PreviewStudyResult> | RouteOutcome<"computer-use", CuaActorLabResult> | RouteOutcome<"scripted", ScriptedBrowserLabResult> | RouteOutcome<"terminal", TerminalProductLabResult> | RouteOutcome<"shared-world", ConcurrentSharedWorldLabResult>;
|
|
89
|
-
/**
|
|
90
|
-
* A plan past its route's local checks that need no scorer: the refusal they returned, or the
|
|
91
|
-
* route's run, which takes a scorer loaded after them.
|
|
92
|
-
*/
|
|
93
|
-
export type AdmittedPlan<R extends LabRoute = LabRoute> = {
|
|
94
|
-
readonly ok: false;
|
|
95
|
-
readonly outcome: Extract<LabOutcome, {
|
|
96
|
-
route: R;
|
|
97
|
-
}>;
|
|
98
|
-
} | {
|
|
99
|
-
readonly ok: true;
|
|
100
|
-
run(scorer?: LateScorer): Promise<Extract<LabOutcome, {
|
|
101
|
-
route: R;
|
|
102
|
-
}>>;
|
|
103
|
-
};
|
|
104
|
-
/** The result of a run on route `R`, the `result` of that route's `LabOutcome`. */
|
|
105
|
-
export type LabResult<R extends LabRoute = LabRoute> = {
|
|
106
|
-
preview: PreviewStudyResult;
|
|
107
|
-
"computer-use": CuaActorLabResult;
|
|
108
|
-
scripted: ScriptedBrowserLabResult;
|
|
109
|
-
terminal: TerminalProductLabResult;
|
|
110
|
-
"shared-world": ConcurrentSharedWorldLabResult;
|
|
111
|
-
}[R];
|
|
112
|
-
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|