humanish 0.106.0 → 0.107.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +4 -2
- package/ARCHITECTURE.md +17 -16
- package/CHANGELOG.md +24 -0
- package/CONTEXT.md +42 -39
- package/CONTRIBUTING.md +8 -6
- package/README.md +8 -3
- package/dist/actors/codex/app-server-client.js +2 -1
- package/dist/actors/codex/app-server-trace.d.ts +0 -1
- package/dist/actors/codex/app-server-trace.js +1 -3
- package/dist/actors/codex/app-server.js +2 -1
- package/dist/actors/codex/protocol-compat.d.ts +27 -0
- package/dist/actors/codex/protocol-compat.js +357 -0
- package/dist/actors/codex/protocol-contract.d.ts +61 -0
- package/dist/actors/codex/protocol-contract.js +471 -0
- package/dist/actors/codex/qualified-versions.d.ts +31 -4
- package/dist/actors/codex/qualified-versions.js +51 -6
- package/dist/actors/codex/restricted-executable.d.ts +24 -0
- package/dist/actors/codex/restricted-executable.js +97 -22
- package/dist/actors/codex/restricted-launch.d.ts +7 -1
- package/dist/actors/codex/restricted-launch.js +42 -3
- package/dist/actors/codex/restricted-notifications.d.ts +101 -0
- package/dist/actors/codex/restricted-notifications.js +277 -0
- package/dist/actors/codex/restricted-participant.d.ts +30 -0
- package/dist/actors/codex/restricted-participant.js +60 -2
- package/dist/actors/codex/restricted-policy.d.ts +9 -1
- package/dist/actors/codex/restricted-session.d.ts +14 -1
- package/dist/actors/codex/restricted-session.js +50 -17
- package/dist/actors/codex/restricted-transport.d.ts +29 -0
- package/dist/actors/codex/restricted-transport.js +139 -27
- package/dist/actors/codex/restricted-turn.d.ts +19 -4
- package/dist/actors/codex/restricted-turn.js +43 -30
- package/dist/actors/computer-use/actor.d.ts +1 -1
- package/dist/actors/computer-use/actor.js +4 -4
- package/dist/actors/computer-use/loop/backstop.js +1 -1
- package/dist/actors/computer-use/loop/ending.d.ts +2 -2
- package/dist/actors/computer-use/loop/ending.js +2 -2
- package/dist/actors/computer-use/loop/spend.d.ts +1 -1
- package/dist/actors/computer-use/loop/spend.js +3 -3
- package/dist/actors/computer-use/loop/trace.js +2 -2
- package/dist/actors/computer-use/loop/types.d.ts +14 -5
- package/dist/actors/computer-use/loop.js +4 -4
- package/dist/actors/computer-use/openai-provider.d.ts +1 -1
- package/dist/actors/computer-use/openai-provider.js +2 -2
- package/dist/actors/contract.d.ts +10 -8
- package/dist/actors/contract.js +7 -1
- package/dist/actors/local-agent/cli.js +1 -1
- package/dist/actors/scripted-browser/actor.d.ts +2 -2
- package/dist/actors/scripted-browser/journey.js +15 -4
- package/dist/actors/scripted-browser/steps.js +18 -0
- package/dist/actors/scripted-browser/types.d.ts +11 -1
- package/dist/actors/stop-conditions.js +1 -3
- package/dist/analysis/automatic-completion.d.ts +13 -8
- package/dist/analysis/automatic-completion.js +14 -8
- package/dist/analysis/automatic-config.d.ts +1 -1
- package/dist/analysis/automatic-config.js +2 -2
- package/dist/analysis/automatic.d.ts +10 -4
- package/dist/analysis/automatic.js +17 -13
- package/dist/analysis/diagnostics.d.ts +23 -0
- package/dist/analysis/diagnostics.js +112 -0
- package/dist/analysis/evidence-sources.js +2 -2
- package/dist/analysis/evidence.js +6 -6
- package/dist/analysis/execute.d.ts +7 -1
- package/dist/analysis/execute.js +39 -12
- package/dist/analysis/job.d.ts +8 -5
- package/dist/analysis/job.js +15 -14
- package/dist/analysis/load.d.ts +1 -1
- package/dist/analysis/load.js +5 -5
- package/dist/analysis/provider.d.ts +9 -1
- package/dist/analysis/restricted-codex.d.ts +2 -0
- package/dist/analysis/restricted-codex.js +10 -1
- package/dist/analysis/service.d.ts +2 -0
- package/dist/analysis/service.js +31 -12
- package/dist/analysis/sharing.d.ts +2 -2
- package/dist/analysis/sharing.js +5 -5
- package/dist/analysis/store-executions.d.ts +5 -5
- package/dist/analysis/store-executions.js +12 -12
- package/dist/analysis/store.d.ts +4 -4
- package/dist/analysis/store.js +13 -13
- package/dist/cli/commands/analysis-signals.d.ts +2 -1
- package/dist/cli/commands/analysis-signals.js +4 -1
- package/dist/cli/commands/analyze.js +4 -2
- package/dist/cli/commands/comms.js +8 -1
- package/dist/cli/commands/lab-route-computer-use.d.ts +0 -2
- package/dist/cli/commands/lab-route-computer-use.js +26 -14
- package/dist/cli/commands/lab-route-preview.d.ts +1 -3
- package/dist/cli/commands/lab-route-preview.js +3 -4
- package/dist/cli/commands/lab-route-run.d.ts +6 -4
- package/dist/cli/commands/lab-route-run.js +6 -2
- package/dist/cli/commands/lab-route-scripted.d.ts +0 -2
- package/dist/cli/commands/lab-route-scripted.js +0 -1
- package/dist/cli/commands/lab-route-shared-world.d.ts +0 -2
- package/dist/cli/commands/lab-route-shared-world.js +0 -1
- package/dist/cli/commands/lab-route-terminal.d.ts +0 -2
- package/dist/cli/commands/lab-route-terminal.js +0 -1
- package/dist/cli/commands/lab-run.js +76 -45
- package/dist/cli/commands/lab-scorer.d.ts +0 -2
- package/dist/cli/commands/lab.js +12 -6
- package/dist/cli/commands/observe.js +22 -0
- package/dist/cli/commands/run-signals.d.ts +30 -0
- package/dist/cli/commands/run-signals.js +146 -0
- package/dist/cli/commands/runs.js +10 -8
- package/dist/cli/commands/watch.js +12 -10
- package/dist/cli/doctor.d.ts +3 -0
- package/dist/cli/doctor.js +10 -2
- package/dist/cli/io.d.ts +5 -4
- package/dist/cli/io.js +12 -8
- package/dist/cli/program.js +3 -3
- package/dist/cli/renamed-options.d.ts +11 -0
- package/dist/cli/renamed-options.js +18 -0
- package/dist/cli/telemetry.d.ts +2 -2
- package/dist/cli/telemetry.js +1 -1
- package/dist/comms/capture-surface.d.ts +1 -1
- package/dist/comms/catch-host.d.ts +1 -1
- package/dist/comms/connections.js +4 -4
- package/dist/comms/external-evidence.d.ts +27 -0
- package/dist/comms/external-evidence.js +93 -0
- package/dist/comms/lease-store.js +7 -7
- package/dist/comms/types.js +1 -1
- package/dist/evidence/browser-hygiene.d.ts +1 -1
- package/dist/evidence/browser-hygiene.js +1 -1
- package/dist/evidence/redaction.js +1 -1
- package/dist/evidence/secret-scrub.d.ts +9 -0
- package/dist/evidence/secret-scrub.js +96 -0
- package/dist/feedback/draft.js +7 -9
- package/dist/feedback/export-bundle.js +4 -4
- package/dist/feedback/export.js +9 -9
- package/dist/feedback/feedback.d.ts +1 -1
- package/dist/index.d.ts +3 -6
- package/dist/index.js +3 -6
- package/dist/keys/key-resolution.d.ts +3 -1
- package/dist/keys/key-resolution.js +18 -16
- package/dist/lab/adapter-extension.d.ts +28 -6
- package/dist/lab/adapter-extension.js +65 -126
- package/dist/lab/adapter-scorer-loader.d.ts +25 -5
- package/dist/lab/adapter-scorer-loader.js +24 -0
- package/dist/lab/composition-rules.d.ts +2 -0
- package/dist/lab/composition-rules.js +35 -26
- package/dist/lab/config.js +28 -26
- package/dist/lab/device-presets.d.ts +2 -2
- package/dist/lab/discover.js +1 -3
- package/dist/lab/doctor.d.ts +44 -9
- package/dist/lab/doctor.js +149 -41
- package/dist/lab/init-plan.js +1 -3
- package/dist/lab/keys.js +1 -1
- package/dist/lab/lab-deps.d.ts +85 -0
- package/dist/lab/lab-deps.js +4 -0
- package/dist/lab/parse/actors.js +8 -7
- package/dist/lab/parse/comms.js +3 -2
- package/dist/lab/parse/execution.js +3 -2
- package/dist/lab/parse/subject-state.js +2 -1
- package/dist/lab/parse/subject.js +2 -1
- package/dist/lab/parse/values.d.ts +0 -1
- package/dist/lab/parse/values.js +0 -3
- package/dist/lab/persona-resolve.d.ts +3 -3
- package/dist/lab/persona-resolve.js +4 -4
- package/dist/lab/persona.js +1 -3
- package/dist/lab/plan-base.d.ts +6 -2
- package/dist/lab/plan-base.js +22 -7
- package/dist/lab/plan-participants.d.ts +5 -5
- package/dist/lab/plan-participants.js +2 -2
- package/dist/lab/plan-types.d.ts +33 -7
- package/dist/lab/plan.d.ts +3 -11
- package/dist/lab/plan.js +18 -42
- package/dist/lab/preflight-result.js +0 -2
- package/dist/lab/preflight.d.ts +0 -3
- package/dist/lab/preflight.js +1 -1
- package/dist/lab/requirements.d.ts +20 -0
- package/dist/lab/requirements.js +54 -0
- package/dist/lab/route-inputs.d.ts +23 -12
- package/dist/lab/route-inputs.js +48 -51
- package/dist/lab/routing.d.ts +19 -24
- package/dist/lab/routing.js +14 -47
- package/dist/lab/run-lab-events.d.ts +6 -11
- package/dist/lab/run-lab-events.js +3 -11
- package/dist/lab/run-lab-homes.d.ts +64 -0
- package/dist/lab/run-lab-homes.js +3 -0
- package/dist/lab/run-lab-options.d.ts +12 -66
- package/dist/lab/run-lab-options.js +45 -275
- package/dist/lab/summary.d.ts +9 -4
- package/dist/lab/summary.js +15 -8
- package/dist/lab/types.d.ts +132 -132
- package/dist/lab/validation.d.ts +15 -15
- package/dist/lab/validation.js +28 -28
- package/dist/lab/warnings.js +20 -19
- package/dist/observer/artifact.d.ts +1 -1
- package/dist/observer/artifact.js +3 -3
- package/dist/observer/data.js +2 -2
- package/dist/observer/render.js +2 -2
- package/dist/observer/run-routes.d.ts +1 -1
- package/dist/observer/run-routes.js +5 -5
- package/dist/observer/serve.d.ts +17 -0
- package/dist/observer/serve.js +34 -3
- package/dist/observer-app.html +1 -1
- package/dist/routes/computer-use/bundle-parts.d.ts +1 -1
- package/dist/routes/computer-use/bundle-parts.js +10 -3
- package/dist/routes/computer-use/bundle.d.ts +4 -11
- package/dist/routes/computer-use/bundle.js +9 -15
- package/dist/routes/computer-use/diagnostics.d.ts +1 -1
- package/dist/routes/computer-use/diagnostics.js +1 -1
- package/dist/routes/computer-use/e2b-desktop/comms.d.ts +10 -10
- package/dist/routes/computer-use/e2b-desktop/comms.js +11 -14
- package/dist/routes/computer-use/e2b-desktop/desktop.d.ts +2 -2
- package/dist/routes/computer-use/e2b-desktop/desktop.js +4 -7
- package/dist/routes/computer-use/e2b-desktop/fidelity.d.ts +13 -13
- package/dist/routes/computer-use/e2b-desktop/fidelity.js +11 -11
- package/dist/routes/computer-use/e2b-desktop/prepare.d.ts +3 -3
- package/dist/routes/computer-use/e2b-desktop/prepare.js +33 -36
- package/dist/routes/computer-use/e2b-desktop/start.d.ts +1 -1
- package/dist/routes/computer-use/e2b-desktop/start.js +24 -23
- package/dist/routes/computer-use/e2b-desktop/state.d.ts +5 -4
- package/dist/routes/computer-use/e2b-desktop/state.js +5 -3
- package/dist/routes/computer-use/e2b-desktop/teardown.d.ts +1 -1
- package/dist/routes/computer-use/e2b-desktop/teardown.js +29 -17
- package/dist/routes/computer-use/external-comms.d.ts +4 -4
- package/dist/routes/computer-use/external-comms.js +19 -43
- package/dist/routes/computer-use/fanout-bundle.d.ts +3 -3
- package/dist/routes/computer-use/fanout-bundle.js +25 -29
- package/dist/routes/computer-use/{fanout-lanes.js → fanout-records.js} +25 -19
- package/dist/routes/computer-use/in-process-desktop.d.ts +3 -10
- package/dist/routes/computer-use/in-process-desktop.js +3 -9
- package/dist/routes/computer-use/live-flush.d.ts +7 -5
- package/dist/routes/computer-use/live-flush.js +19 -27
- package/dist/routes/computer-use/{run-lanes.js → live-phase.js} +14 -13
- package/dist/routes/computer-use/local-tree-pack.d.ts +3 -3
- package/dist/routes/computer-use/local-tree-pack.js +4 -5
- package/dist/routes/computer-use/local-vm.d.ts +11 -8
- package/dist/routes/computer-use/local-vm.js +39 -66
- package/dist/routes/computer-use/participant-desktop.d.ts +8 -23
- package/dist/routes/computer-use/participant-desktop.js +5 -25
- package/dist/routes/computer-use/{lanes.d.ts → participant-execution.d.ts} +10 -10
- package/dist/routes/computer-use/{lanes.js → participant-execution.js} +35 -22
- package/dist/routes/computer-use/participant-facts.d.ts +7 -1
- package/dist/routes/computer-use/participant-facts.js +12 -1
- package/dist/routes/computer-use/participant-model.d.ts +19 -11
- package/dist/routes/computer-use/participant-model.js +58 -33
- package/dist/routes/computer-use/participant-prompt.d.ts +3 -3
- package/dist/routes/computer-use/participant-prompt.js +4 -4
- package/dist/routes/computer-use/participant-runs.d.ts +6 -6
- package/dist/routes/computer-use/participant-runs.js +8 -8
- package/dist/routes/computer-use/plan.d.ts +21 -29
- package/dist/routes/computer-use/plan.js +59 -65
- package/dist/routes/computer-use/preflight.d.ts +6 -11
- package/dist/routes/computer-use/preflight.js +26 -18
- package/dist/routes/computer-use/rerun-selection.js +10 -6
- package/dist/routes/computer-use/result.d.ts +1 -1
- package/dist/routes/computer-use/result.js +40 -30
- package/dist/routes/computer-use/route.d.ts +3 -4
- package/dist/routes/computer-use/route.js +21 -19
- package/dist/routes/computer-use/self-report.d.ts +2 -2
- package/dist/routes/computer-use/self-report.js +4 -4
- package/dist/routes/computer-use/setup.d.ts +8 -17
- package/dist/routes/computer-use/setup.js +98 -86
- package/dist/routes/computer-use/single-bundle.d.ts +8 -11
- package/dist/routes/computer-use/single-bundle.js +20 -25
- package/dist/routes/computer-use/subject-projection.d.ts +5 -7
- package/dist/routes/computer-use/subject-projection.js +20 -19
- package/dist/routes/computer-use/types.d.ts +169 -211
- package/dist/routes/computer-use/types.js +13 -6
- package/dist/routes/preview.js +0 -1
- package/dist/routes/scripted/bundle.d.ts +3 -6
- package/dist/routes/scripted/bundle.js +11 -16
- package/dist/routes/scripted/plan.d.ts +5 -7
- package/dist/routes/scripted/plan.js +6 -4
- package/dist/routes/scripted/result.d.ts +4 -1
- package/dist/routes/scripted/result.js +10 -6
- package/dist/routes/scripted/route.js +10 -11
- package/dist/routes/scripted/scenario.d.ts +1 -1
- package/dist/routes/scripted/scenario.js +1 -1
- package/dist/routes/scripted/setup.d.ts +3 -2
- package/dist/routes/scripted/setup.js +22 -21
- package/dist/routes/scripted/subject.d.ts +8 -3
- package/dist/routes/scripted/subject.js +11 -6
- package/dist/routes/scripted/surface-records.js +1 -1
- package/dist/routes/scripted/surface-sessions.d.ts +2 -2
- package/dist/routes/scripted/surface-sessions.js +4 -4
- package/dist/routes/scripted/types.d.ts +19 -36
- package/dist/routes/scripted/types.js +1 -2
- package/dist/routes/shared-world/{seat-records.js → bundle-records.js} +8 -8
- package/dist/routes/shared-world/bundle.d.ts +2 -2
- package/dist/routes/shared-world/bundle.js +22 -26
- package/dist/routes/shared-world/checkpoints.d.ts +4 -4
- package/dist/routes/shared-world/checkpoints.js +4 -4
- package/dist/routes/shared-world/comms.d.ts +5 -4
- package/dist/routes/shared-world/comms.js +28 -41
- package/dist/routes/shared-world/external-public.d.ts +5 -5
- package/dist/routes/shared-world/external-public.js +19 -20
- package/dist/routes/shared-world/handoff.d.ts +4 -4
- package/dist/routes/shared-world/handoff.js +50 -50
- package/dist/routes/shared-world/lobby-code.d.ts +5 -5
- package/dist/routes/shared-world/lobby-code.js +13 -13
- package/dist/routes/shared-world/{seats.d.ts → participant-specs.d.ts} +8 -6
- package/dist/routes/shared-world/{seats.js → participant-specs.js} +46 -51
- package/dist/routes/shared-world/plan.d.ts +2 -6
- package/dist/routes/shared-world/plan.js +1 -2
- package/dist/routes/shared-world/provenance.d.ts +4 -4
- package/dist/routes/shared-world/provenance.js +4 -4
- package/dist/routes/shared-world/provisioned.d.ts +3 -2
- package/dist/routes/shared-world/provisioned.js +48 -41
- package/dist/routes/shared-world/result.js +31 -19
- package/dist/routes/shared-world/route.js +37 -41
- package/dist/routes/shared-world/setup.d.ts +5 -4
- package/dist/routes/shared-world/setup.js +12 -14
- package/dist/routes/shared-world/types.d.ts +53 -126
- package/dist/routes/shared-world/types.js +2 -2
- package/dist/routes/terminal/adapter.d.ts +8 -8
- package/dist/routes/terminal/adapter.js +28 -125
- package/dist/routes/terminal/bundle.d.ts +7 -12
- package/dist/routes/terminal/bundle.js +24 -34
- package/dist/routes/terminal/credentials.d.ts +2 -2
- package/dist/routes/terminal/credentials.js +16 -16
- package/dist/routes/terminal/dry-run.d.ts +1 -1
- package/dist/routes/terminal/dry-run.js +9 -11
- package/dist/routes/terminal/encoding.d.ts +1 -1
- package/dist/routes/terminal/encoding.js +2 -2
- package/dist/routes/terminal/ledger.d.ts +6 -6
- package/dist/routes/terminal/ledger.js +9 -9
- package/dist/routes/terminal/live-finish.d.ts +1 -2
- package/dist/routes/terminal/live-finish.js +21 -20
- package/dist/routes/terminal/live-sandbox.d.ts +4 -2
- package/dist/routes/terminal/live-sandbox.js +25 -21
- package/dist/routes/terminal/participant-text.d.ts +23 -0
- package/dist/routes/terminal/participant-text.js +165 -0
- package/dist/routes/terminal/plan.d.ts +2 -6
- package/dist/routes/terminal/plan.js +13 -9
- package/dist/routes/terminal/recorder.d.ts +6 -1
- package/dist/routes/terminal/recorder.js +12 -4
- package/dist/routes/terminal/result.js +4 -4
- package/dist/routes/terminal/route.js +26 -26
- package/dist/routes/terminal/runtime.d.ts +3 -2
- package/dist/routes/terminal/runtime.js +3 -3
- package/dist/routes/terminal/sandbox.d.ts +5 -3
- package/dist/routes/terminal/sandbox.js +13 -16
- package/dist/routes/terminal/session.js +16 -14
- package/dist/routes/terminal/token-usage.js +5 -5
- package/dist/routes/terminal/trace.d.ts +5 -8
- package/dist/routes/terminal/trace.js +9 -64
- package/dist/routes/terminal/types.d.ts +85 -93
- package/dist/routes/terminal/types.js +9 -4
- package/dist/run/active-runs.d.ts +13 -0
- package/dist/run/active-runs.js +12 -0
- package/dist/run/bundle-shape.d.ts +2 -1
- package/dist/run/bundle-shape.js +4 -4
- package/dist/run/bundle.d.ts +63 -56
- package/dist/run/bundle.js +9 -8
- package/dist/run/cost-summary.js +3 -2
- package/dist/run/costs.d.ts +6 -6
- package/dist/run/costs.js +10 -10
- package/dist/run/detail.d.ts +5 -5
- package/dist/run/detail.js +6 -6
- package/dist/run/dry-run.js +5 -12
- package/dist/run/{study-files.d.ts → evidence-files.d.ts} +4 -4
- package/dist/run/{study-files.js → evidence-files.js} +5 -5
- package/dist/run/feedback-shape.js +1 -1
- package/dist/run/judge.d.ts +16 -4
- package/dist/run/judge.js +24 -7
- package/dist/run/locate.d.ts +2 -0
- package/dist/run/locate.js +3 -1
- package/dist/run/outcomes.d.ts +3 -3
- package/dist/run/outcomes.js +3 -3
- package/dist/run/participant-records.d.ts +2 -2
- package/dist/run/participant-records.js +2 -2
- package/dist/run/paths.js +1 -1
- package/dist/run/pricing.d.ts +19 -9
- package/dist/run/pricing.js +30 -18
- package/dist/run/projection.d.ts +13 -13
- package/dist/run/projection.js +8 -8
- package/dist/run/reclaim.d.ts +7 -1
- package/dist/run/reclaim.js +24 -4
- package/dist/run/results.d.ts +1 -1
- package/dist/run/run-index.d.ts +1 -1
- package/dist/run/run-index.js +11 -11
- package/dist/run/run.d.ts +4 -2
- package/dist/run/run.js +9 -5
- package/dist/run/sandbox-receipts.d.ts +4 -4
- package/dist/run/sandbox-receipts.js +4 -4
- package/dist/run/shared-world-evidence.d.ts +47 -47
- package/dist/run/shared-world-shape.d.ts +3 -3
- package/dist/run/shared-world-shape.js +11 -11
- package/dist/run/stats.d.ts +5 -5
- package/dist/run/stats.js +8 -8
- package/dist/run/status.d.ts +16 -6
- package/dist/run/status.js +31 -8
- package/dist/run/streams.d.ts +26 -19
- package/dist/run/terminal-contract.d.ts +5 -5
- package/dist/run/terminal-contract.js +4 -4
- package/dist/run/transient-comms-secrets.d.ts +5 -0
- package/dist/run/transient-comms-secrets.js +12 -0
- package/dist/run-lab.d.ts +36 -34
- package/dist/run-lab.js +41 -37
- package/dist/subject/desktop-cli.d.ts +1 -1
- package/dist/subject/desktop-cli.js +1 -1
- package/dist/subject/local-tree-archive.d.ts +1 -1
- package/dist/subject/local-tree-archive.js +4 -4
- package/dist/subject/local-tree.d.ts +2 -2
- package/dist/subject/local-tree.js +1 -1
- package/dist/subject/node-bootstrap.d.ts +1 -1
- package/dist/subject/node-bootstrap.js +4 -4
- package/dist/subject/runtime.js +5 -5
- package/dist/subject/serve.js +1 -1
- package/dist/subject/steps.d.ts +4 -4
- package/dist/subject/steps.js +5 -5
- package/dist/substrates/desktop-session.d.ts +2 -0
- package/dist/substrates/e2b/cdp-probe.d.ts +2 -2
- package/dist/substrates/e2b/cdp-probe.js +1 -1
- package/dist/substrates/e2b/desktop-browser.d.ts +3 -3
- package/dist/substrates/e2b/desktop-browser.js +4 -4
- package/dist/substrates/e2b/desktop-cdp.d.ts +7 -7
- package/dist/substrates/e2b/desktop-cdp.js +4 -4
- package/dist/substrates/e2b/desktop-geometry.d.ts +4 -4
- package/dist/substrates/e2b/desktop-geometry.js +3 -3
- package/dist/substrates/e2b/desktop-media.js +2 -2
- package/dist/substrates/e2b/sandbox.d.ts +2 -0
- package/dist/substrates/e2b/sandbox.js +22 -8
- package/dist/substrates/e2b/sdk.d.ts +12 -1
- package/dist/substrates/e2b/sdk.js +30 -9
- package/dist/substrates/local/runtime-host.d.ts +2 -0
- package/dist/substrates/local/runtime-host.js +6 -0
- package/dist/tui/actions.d.ts +7 -5
- package/dist/tui/actions.js +18 -9
- package/dist/tui-app.js +42 -42
- package/dist/verify/actor.d.ts +10 -10
- package/dist/verify/actor.js +15 -15
- package/dist/verify/artifacts.d.ts +1 -1
- package/dist/verify/artifacts.js +3 -3
- package/dist/verify/costs.d.ts +2 -2
- package/dist/verify/costs.js +2 -2
- package/dist/verify/liveness.d.ts +1 -1
- package/dist/verify/liveness.js +4 -1
- package/dist/verify/rerun.d.ts +1 -1
- package/dist/verify/rerun.js +1 -1
- package/dist/verify/shared-world.js +2 -2
- package/dist/verify/verify.js +6 -6
- package/docs/README.md +1 -1
- package/docs/architecture/actor-contract.md +60 -22
- package/docs/architecture/desktop-sessions.md +9 -9
- package/docs/architecture/external-public-shared-world.md +5 -0
- package/docs/architecture/observer.md +4 -4
- package/docs/architecture/restricted-codex-analysis.md +40 -4
- package/docs/architecture/state-driven-executor.md +4 -5
- package/docs/architecture/task-protocol-support.md +3 -5
- package/docs/architecture/{terminal-product-lane.md → terminal-product-route.md} +24 -16
- package/docs/contracts/run-bundle.md +10 -8
- package/docs/contracts/schemas.md +109 -53
- package/docs/contracts/study-analysis.md +24 -0
- package/docs/decisions/0004-participant-desktops-stay-in-the-route.md +2 -1
- package/docs/product/automatic-analysis.md +1 -0
- package/docs/ramp/README.md +2 -1
- package/package.json +4 -4
- package/skills/humanish/SKILL.md +3 -2
- package/skills/humanish/agents/openai.yaml +1 -1
- package/dist/deprecated.d.ts +0 -90
- package/dist/deprecated.js +0 -106
- package/dist/lab/bag-overrides.d.ts +0 -18
- package/dist/lab/bag-overrides.js +0 -121
- package/dist/routes/computer-use/legacy-lane-spec.d.ts +0 -62
- package/dist/routes/computer-use/legacy-lane-spec.js +0 -39
- /package/dist/routes/computer-use/{fanout-lanes.d.ts → fanout-records.d.ts} +0 -0
- /package/dist/routes/computer-use/{run-lanes.d.ts → live-phase.d.ts} +0 -0
- /package/dist/routes/shared-world/{seat-records.d.ts → bundle-records.d.ts} +0 -0
package/dist/run-lab.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LocalVmInput } from "./routes/computer-use/types.js";
|
|
2
2
|
import { type LateScorer } from "./lab/route-inputs.js";
|
|
3
|
-
import { type
|
|
4
|
-
import
|
|
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";
|
|
5
6
|
import { type LabConfig } from "./lab/types.js";
|
|
6
7
|
import type { ObserverResult } from "./observer/render.js";
|
|
7
|
-
import { type
|
|
8
|
-
import { type
|
|
9
|
-
import { type ConcurrentSharedWorldLabResult
|
|
10
|
-
import { type
|
|
8
|
+
import { type CuaActorLabResult } from "./routes/computer-use/types.js";
|
|
9
|
+
import { type ScriptedBrowserLabResult } from "./routes/scripted/types.js";
|
|
10
|
+
import { type ConcurrentSharedWorldLabResult } from "./routes/shared-world/types.js";
|
|
11
|
+
import { type TerminalProductLabResult } from "./routes/terminal/types.js";
|
|
11
12
|
import { type RunScorerProvenance } from "./run/bundle.js";
|
|
12
13
|
import { type RunResult } from "./run/results.js";
|
|
13
14
|
import { type RunLabProvenance } from "./run/status.js";
|
|
@@ -16,7 +17,13 @@ import { type RunLabProvenance } from "./run/status.js";
|
|
|
16
17
|
* hook bags before anything runs. Each route closes the run it started on every exit through its
|
|
17
18
|
* own run scope (`src/run/run.ts`).
|
|
18
19
|
*/
|
|
19
|
-
export declare function runLab(config: LabConfig, options:
|
|
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>;
|
|
20
27
|
/** A lab planned once: the route's refusal, or the run of its plan. */
|
|
21
28
|
export type PreparedLab = {
|
|
22
29
|
readonly ok: false;
|
|
@@ -28,46 +35,41 @@ export type PreparedLab = {
|
|
|
28
35
|
};
|
|
29
36
|
/**
|
|
30
37
|
* Normalizes the options and plans the lab once, so a caller can present a refusal before it loads
|
|
31
|
-
* anything the run needs. A local browser study's
|
|
32
|
-
*
|
|
33
|
-
*
|
|
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.
|
|
34
41
|
*/
|
|
35
|
-
export declare function prepareLab(config: LabConfig, options:
|
|
42
|
+
export declare function prepareLab(config: LabConfig, options: InternalRunLabOptions, deps?: LabDeps): Promise<PreparedLab>;
|
|
36
43
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
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.
|
|
39
46
|
*/
|
|
40
47
|
export type RunLabOptions = RunLabBase & RunLabHomes & RunLabDriving;
|
|
41
48
|
interface RunLabBase {
|
|
42
|
-
automaticAnalysis?: AutomaticAnalysisHooks;
|
|
43
49
|
cwd: string;
|
|
44
50
|
runId?: string;
|
|
45
|
-
/** Which manifest this run came from (#455): threaded to the route so the run's own
|
|
46
|
-
* status record and bundle can say which lab produced it. Absent for library callers who
|
|
47
|
-
* hand a LabConfig directly — the run is then honestly lab-less rather than guessed. */
|
|
48
|
-
lab?: RunLabProvenance;
|
|
49
51
|
dryRun?: boolean;
|
|
50
52
|
open?: boolean;
|
|
51
53
|
/** Participant count override: preview participants or computer-use desktops. */
|
|
52
54
|
count?: number;
|
|
53
|
-
/** CUA fan-out only: create a new run for failed/selected
|
|
55
|
+
/** CUA fan-out only: create a new run for failed/selected participants from a prior run. */
|
|
54
56
|
rerun?: {
|
|
55
57
|
sourceRunId: string;
|
|
56
58
|
participantIds?: string[];
|
|
57
|
-
/** @deprecated The older name of `participantIds`. */
|
|
58
|
-
laneIds?: string[];
|
|
59
59
|
};
|
|
60
60
|
onObserverReady?: (observer: ObserverResult & {
|
|
61
61
|
ok: true;
|
|
62
62
|
}) => Promise<void> | void;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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 (#455). 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?: RunLabProvenance;
|
|
71
73
|
/**
|
|
72
74
|
* CONFIG-DECLARED scorer provenance (#316), forwarded alongside whichever hooks bag carries the
|
|
73
75
|
* loaded scorer. Its presence is the "declared" marker the terminal route reads to flip a
|
|
@@ -75,15 +77,15 @@ interface RunLabBase {
|
|
|
75
77
|
* (path + digest), never adopter-supplied; absent for library callers.
|
|
76
78
|
*/
|
|
77
79
|
scorerProvenance?: RunScorerProvenance;
|
|
80
|
+
/** The local VM study's desktop, analysis gate and signal, for a local browser lab. */
|
|
81
|
+
localVm?: LocalVmInput;
|
|
78
82
|
}
|
|
79
83
|
/** A run's result and the route it ran on. */
|
|
80
|
-
interface RouteOutcome<R extends LabRoute,
|
|
84
|
+
interface RouteOutcome<R extends LabRoute, T> {
|
|
81
85
|
route: R;
|
|
82
|
-
/** @deprecated The route's older name. Use `route`; this field goes in the next minor. */
|
|
83
|
-
backend: B;
|
|
84
86
|
result: T;
|
|
85
87
|
}
|
|
86
|
-
export type LabOutcome = RouteOutcome<"preview",
|
|
88
|
+
export type LabOutcome = RouteOutcome<"preview", RunResult> | RouteOutcome<"computer-use", CuaActorLabResult> | RouteOutcome<"scripted", ScriptedBrowserLabResult> | RouteOutcome<"terminal", TerminalProductLabResult> | RouteOutcome<"shared-world", ConcurrentSharedWorldLabResult>;
|
|
87
89
|
/**
|
|
88
90
|
* A plan past its route's local checks that need no scorer: the refusal they returned, or the
|
|
89
91
|
* route's run, which takes a scorer loaded after them.
|
package/dist/run-lab.js
CHANGED
|
@@ -6,10 +6,9 @@
|
|
|
6
6
|
// refusal before it loads a declared review scorer.
|
|
7
7
|
import { computerUseInput, scriptedInput, sharedWorldInput, terminalInput, } from "./lab/route-inputs.js";
|
|
8
8
|
import { planLab, resolveLabDryRun, routeOf } from "./lab/plan.js";
|
|
9
|
-
import { normalizeRunLabOptions, optionRefusalOutcome, } from "./lab/run-lab-options.js";
|
|
9
|
+
import { normalizeRunLabOptions, optionRefusalOutcome, removedOptionRefusal, } from "./lab/run-lab-options.js";
|
|
10
10
|
import {} from "./lab/types.js";
|
|
11
11
|
import { admitComputerUsePlan, computerUseLabRefusal } from "./routes/computer-use/route.js";
|
|
12
|
-
import { participantDesktopOf } from "./routes/computer-use/participant-desktop.js";
|
|
13
12
|
import {} from "./routes/computer-use/types.js";
|
|
14
13
|
import { admitPreviewPlan, previewLabRefusal } from "./routes/preview.js";
|
|
15
14
|
import { admitScriptedPlan, scriptedLabRefusal } from "./routes/scripted/route.js";
|
|
@@ -27,40 +26,51 @@ import { isLocalBrowserLab, localBrowserDefaults } from "./substrates/local/runt
|
|
|
27
26
|
* hook bags before anything runs. Each route closes the run it started on every exit through its
|
|
28
27
|
* own run scope (`src/run/run.ts`).
|
|
29
28
|
*/
|
|
30
|
-
export async function runLab(config, options) {
|
|
31
|
-
const prepared = await prepareLab(config, options);
|
|
29
|
+
export async function runLab(config, options, deps = {}) {
|
|
30
|
+
const prepared = await prepareLab(config, options, deps);
|
|
32
31
|
return prepared.ok ? prepared.run() : prepared.outcome;
|
|
33
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* runLab as the package exports it (`src/index.ts`): the public options only. A JavaScript caller
|
|
35
|
+
* that passes a field RunLabOptions no longer has is refused in the route's own result envelope
|
|
36
|
+
* before anything runs.
|
|
37
|
+
*/
|
|
38
|
+
export async function runPackageLab(config, options) {
|
|
39
|
+
const removed = removedOptionRefusal(options);
|
|
40
|
+
if (removed === undefined)
|
|
41
|
+
return runLab(config, options);
|
|
42
|
+
const lab = localBrowserDefaults(config);
|
|
43
|
+
return optionRefusalOutcome(lab, routeOf(lab), options, removed);
|
|
44
|
+
}
|
|
34
45
|
/**
|
|
35
46
|
* Normalizes the options and plans the lab once, so a caller can present a refusal before it loads
|
|
36
|
-
* anything the run needs. A local browser study's
|
|
37
|
-
*
|
|
38
|
-
*
|
|
47
|
+
* anything the run needs. A local browser study's provider is bound first, so the plan is made with
|
|
48
|
+
* it, and its desktop goes to the computer-use run as `localVm`; with inProcess the caller drives
|
|
49
|
+
* the app in process and needs no desktop.
|
|
39
50
|
*/
|
|
40
|
-
export async function prepareLab(config, options) {
|
|
51
|
+
export async function prepareLab(config, options, deps = {}) {
|
|
41
52
|
const lab = localBrowserDefaults(config);
|
|
42
53
|
const route = routeOf(lab);
|
|
43
54
|
const normalized = normalizeRunLabOptions(lab, route, options);
|
|
44
55
|
if (!normalized.ok)
|
|
45
56
|
return { ok: false, outcome: optionRefusalOutcome(lab, route, options, normalized) };
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
? (await import("./routes/computer-use/local-vm.js")).prepareLocalVmStudy
|
|
57
|
+
// An in-process executor needs no desktop, and a caller that already prepared the study passes
|
|
58
|
+
// its localVm, which a second study would replace.
|
|
59
|
+
const prepareLocalVm = isLocalBrowserLab(lab) && options.inProcess === undefined && options.localVm === undefined
|
|
60
|
+
? (await import("./routes/computer-use/local-vm.js")).prepareLocalVmRun
|
|
51
61
|
: undefined;
|
|
52
|
-
const
|
|
53
|
-
const planning =
|
|
54
|
-
const planned = planLab(lab, planning);
|
|
62
|
+
const vm = prepareLocalVm?.({ ...normalized.options, config: lab });
|
|
63
|
+
const planning = vm === undefined ? normalized.options : { ...vm.options, localVm: vm.localVm };
|
|
64
|
+
const planned = planLab(lab, planning, deps);
|
|
55
65
|
if (!planned.ok) {
|
|
56
|
-
await
|
|
57
|
-
const outcome = await refusalOutcome(lab, planning, planned.refusal);
|
|
66
|
+
await vm?.close();
|
|
67
|
+
const outcome = await refusalOutcome(lab, planning, planned.refusal, deps, normalized.emit);
|
|
58
68
|
outcome.result.warnings.push(...normalized.warnings);
|
|
59
69
|
return { ok: false, outcome };
|
|
60
70
|
}
|
|
61
|
-
const admitted = await admitPlan(lab, planning, planned.planned.plan);
|
|
71
|
+
const admitted = await admitPlan(lab, planning, planned.planned.plan, deps, normalized.emit);
|
|
62
72
|
if (!admitted.ok) {
|
|
63
|
-
await
|
|
73
|
+
await vm?.close();
|
|
64
74
|
admitted.outcome.result.warnings.push(...normalized.warnings);
|
|
65
75
|
return { ok: false, outcome: admitted.outcome };
|
|
66
76
|
}
|
|
@@ -88,61 +98,55 @@ export async function prepareLab(config, options) {
|
|
|
88
98
|
return outcome;
|
|
89
99
|
}
|
|
90
100
|
finally {
|
|
91
|
-
await
|
|
101
|
+
await vm?.close();
|
|
92
102
|
}
|
|
93
103
|
},
|
|
94
104
|
};
|
|
95
105
|
}
|
|
96
106
|
/** The route's admit function for a plan, with the route's input from the run's options. */
|
|
97
|
-
async function admitPlan(config, options, plan) {
|
|
107
|
+
async function admitPlan(config, options, plan, deps, emit) {
|
|
98
108
|
switch (plan.route) {
|
|
99
109
|
case "preview":
|
|
100
110
|
return admitPreviewPlan(plan, options);
|
|
101
111
|
case "computer-use":
|
|
102
|
-
return admitComputerUsePlan(plan, computerUseInput(options), config);
|
|
112
|
+
return admitComputerUsePlan(plan, computerUseInput(options, deps, emit), config);
|
|
103
113
|
case "scripted":
|
|
104
|
-
return admitScriptedPlan(plan, scriptedInput(options));
|
|
114
|
+
return admitScriptedPlan(plan, scriptedInput(options, deps, emit));
|
|
105
115
|
case "terminal":
|
|
106
|
-
return admitTerminalPlan(plan, terminalInput(options));
|
|
116
|
+
return admitTerminalPlan(plan, terminalInput(options, deps, emit));
|
|
107
117
|
case "shared-world":
|
|
108
|
-
return admitSharedWorldPlan(plan, sharedWorldInput(options), config);
|
|
118
|
+
return admitSharedWorldPlan(plan, sharedWorldInput(options, deps, emit), config);
|
|
109
119
|
}
|
|
110
120
|
}
|
|
111
121
|
/** The refused route's own result, with the envelope and analysis record its runner returns. */
|
|
112
|
-
async function refusalOutcome(config, options, refusal) {
|
|
122
|
+
async function refusalOutcome(config, options, refusal, deps, emit) {
|
|
113
123
|
// Spend-safe default: a lab goes live only when the config (or CLI) says so.
|
|
114
124
|
const dryRun = resolveLabDryRun(config, options.dryRun, true) ?? true;
|
|
115
|
-
const lab = options.lab === undefined ? {} : { lab: options.lab };
|
|
116
125
|
switch (refusal.route) {
|
|
117
126
|
case "preview":
|
|
118
127
|
return {
|
|
119
128
|
route: "preview",
|
|
120
|
-
backend: "synthetic",
|
|
121
129
|
result: previewLabRefusal(options.cwd, refusal),
|
|
122
130
|
};
|
|
123
131
|
case "computer-use":
|
|
124
132
|
return {
|
|
125
133
|
route: "computer-use",
|
|
126
|
-
|
|
127
|
-
result: await computerUseLabRefusal({ ...computerUseInput(options), ...lab, config, dryRun }, refusal),
|
|
134
|
+
result: await computerUseLabRefusal({ ...computerUseInput(options, deps, emit), config, dryRun }, refusal),
|
|
128
135
|
};
|
|
129
136
|
case "scripted":
|
|
130
137
|
return {
|
|
131
138
|
route: "scripted",
|
|
132
|
-
|
|
133
|
-
result: await scriptedLabRefusal({ ...scriptedInput(options), ...lab, config, dryRun }, refusal),
|
|
139
|
+
result: await scriptedLabRefusal({ ...scriptedInput(options, deps, emit), config, dryRun }, refusal),
|
|
134
140
|
};
|
|
135
141
|
case "terminal":
|
|
136
142
|
return {
|
|
137
143
|
route: "terminal",
|
|
138
|
-
|
|
139
|
-
result: await terminalLabRefusal({ ...terminalInput(options), ...lab, config, dryRun }, refusal),
|
|
144
|
+
result: await terminalLabRefusal({ ...terminalInput(options, deps, emit), config, dryRun }, refusal),
|
|
140
145
|
};
|
|
141
146
|
case "shared-world":
|
|
142
147
|
return {
|
|
143
148
|
route: "shared-world",
|
|
144
|
-
|
|
145
|
-
result: await sharedWorldLabRefusal({ ...sharedWorldInput(options), ...lab, config, dryRun }, refusal),
|
|
149
|
+
result: await sharedWorldLabRefusal({ ...sharedWorldInput(options, deps, emit), config, dryRun }, refusal),
|
|
146
150
|
};
|
|
147
151
|
}
|
|
148
152
|
}
|
|
@@ -3,7 +3,7 @@ import { type SubjectPhaseEvent } from "./steps.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* Prepare a CLI study's runtime and, only when declared, its product (#495, #515).
|
|
5
5
|
*
|
|
6
|
-
* The install runs
|
|
6
|
+
* The install runs unkeyed and before the session starts, for the same reason the clone route
|
|
7
7
|
* provisions its subject first: what is being studied begins when the participant looks at the
|
|
8
8
|
* screen. Omitting install deliberately studies product installation; Node/npm remain a
|
|
9
9
|
* harness prerequisite so the participant can follow the product's public npm instructions.
|
|
@@ -6,7 +6,7 @@ import { emitPhaseCompleted, emitPhaseStarted, INSTALL_TIMEOUT_MS, } from "./ste
|
|
|
6
6
|
/**
|
|
7
7
|
* Prepare a CLI study's runtime and, only when declared, its product (#495, #515).
|
|
8
8
|
*
|
|
9
|
-
* The install runs
|
|
9
|
+
* The install runs unkeyed and before the session starts, for the same reason the clone route
|
|
10
10
|
* provisions its subject first: what is being studied begins when the participant looks at the
|
|
11
11
|
* screen. Omitting install deliberately studies product installation; Node/npm remain a
|
|
12
12
|
* harness prerequisite so the participant can follow the product's public npm instructions.
|
|
@@ -74,7 +74,7 @@ export declare function createLocalTreeArchive(root: string, options?: CreateLoc
|
|
|
74
74
|
/**
|
|
75
75
|
* Normalize an author-supplied exclude entry to the relPath shape enumeration
|
|
76
76
|
* produces (no leading "./", no trailing "/"). Absolute paths and glob syntax
|
|
77
|
-
* are
|
|
77
|
+
* are rejected instead of silently ignored: an exclude the author believed in but
|
|
78
78
|
* that never matches anything is a leak vector, so unusable shapes fail
|
|
79
79
|
* closed at the packing boundary (and, for lab manifests, already at parse
|
|
80
80
|
* time in src/lab/parse/subject.ts).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Local working-tree packaging for `subject.source: local-tree`.
|
|
2
2
|
//
|
|
3
|
-
// Enumeration produces
|
|
3
|
+
// Enumeration produces one file list that drives both the tar archive and the
|
|
4
4
|
// content digest (archiveSha256), so the digest can never diverge from what
|
|
5
5
|
// actually gets packed. A prior in-house harness reimplemented exclusion in a
|
|
6
6
|
// second, independent digest walker that could drift from what its tar
|
|
@@ -113,7 +113,7 @@ export function createLocalTreeArchive(root, options = {}) {
|
|
|
113
113
|
(extraExclude.length > 0 ? " and extraExclude" : "") +
|
|
114
114
|
"; local-tree packing requires at least one non-denylisted file or symlink. (Paths in this message are basenames only; the packed root is the lab resolution cwd.)");
|
|
115
115
|
}
|
|
116
|
-
// Check the cap from enumerated sizes
|
|
116
|
+
// Check the cap from enumerated sizes before reading/hashing file bytes, so
|
|
117
117
|
// an oversized tree fails closed without the cost of hashing all of it.
|
|
118
118
|
const enumeratedBytes = entries.reduce((sum, entry) => (entry.kind === "file" ? sum + entry.size : sum), 0);
|
|
119
119
|
if (enumeratedBytes > maxArchiveBytes) {
|
|
@@ -200,7 +200,7 @@ function captureGitInfo(root) {
|
|
|
200
200
|
return undefined;
|
|
201
201
|
}
|
|
202
202
|
// Pathspec-scoped to the packed root: `git status --porcelain` without a
|
|
203
|
-
// pathspec reports the
|
|
203
|
+
// pathspec reports the whole enclosing repository, which would report a
|
|
204
204
|
// clean packed subtree as dirty whenever an unrelated sibling package in a
|
|
205
205
|
// monorepo has in-progress changes.
|
|
206
206
|
const status = execFileSync("git", ["status", "--porcelain", "--", "."], {
|
|
@@ -290,7 +290,7 @@ function isDenylistedSegment(relPath) {
|
|
|
290
290
|
/**
|
|
291
291
|
* Normalize an author-supplied exclude entry to the relPath shape enumeration
|
|
292
292
|
* produces (no leading "./", no trailing "/"). Absolute paths and glob syntax
|
|
293
|
-
* are
|
|
293
|
+
* are rejected instead of silently ignored: an exclude the author believed in but
|
|
294
294
|
* that never matches anything is a leak vector, so unusable shapes fail
|
|
295
295
|
* closed at the packing boundary (and, for lab manifests, already at parse
|
|
296
296
|
* time in src/lab/parse/subject.ts).
|
|
@@ -5,14 +5,14 @@ import type { Shell } from "../substrates/shell.js";
|
|
|
5
5
|
import { type SubjectPhaseEvent } from "./steps.js";
|
|
6
6
|
/**
|
|
7
7
|
* Provision a local-tree subject inside the sandbox: upload the once-per-run packed archive
|
|
8
|
-
* (identical bytes across every fan-out
|
|
8
|
+
* (identical bytes across every fan-out participant) → extract it into SUBJECT_DIR → the
|
|
9
9
|
* same shared serve pipeline provisionCloneSubject uses. Unlike the clone route there is no
|
|
10
10
|
* in-sandbox git refresh: the archive excludes .git entirely (see local-tree-archive.ts), so
|
|
11
11
|
* subject identity is the host-side LocalTreeArchive captured at pack time, never anything
|
|
12
12
|
* resolved in-sandbox.
|
|
13
13
|
*/
|
|
14
14
|
export declare function provisionLocalTreeSubject(shell: Shell, args: {
|
|
15
|
-
/** The once-per-run packed archive bytes (shared byte-identically across every
|
|
15
|
+
/** The once-per-run packed archive bytes (shared byte-identically across every participant). */
|
|
16
16
|
archiveBuffer: ArrayBuffer;
|
|
17
17
|
serve: LabSubjectServe;
|
|
18
18
|
/** Declared subject state (seed steps; external declaration is provenance-only). */
|
|
@@ -7,7 +7,7 @@ import { SOURCE_TIMEOUT_MS, emitPhaseCompleted, emitPhaseStarted, SUBJECT_DIR, }
|
|
|
7
7
|
const LOCAL_TREE_REMOTE_ARCHIVE_PATH = "/home/user/.humanish-source.tar.gz";
|
|
8
8
|
/**
|
|
9
9
|
* Provision a local-tree subject inside the sandbox: upload the once-per-run packed archive
|
|
10
|
-
* (identical bytes across every fan-out
|
|
10
|
+
* (identical bytes across every fan-out participant) → extract it into SUBJECT_DIR → the
|
|
11
11
|
* same shared serve pipeline provisionCloneSubject uses. Unlike the clone route there is no
|
|
12
12
|
* in-sandbox git refresh: the archive excludes .git entirely (see local-tree-archive.ts), so
|
|
13
13
|
* subject identity is the host-side LocalTreeArchive captured at pack time, never anything
|
|
@@ -6,7 +6,7 @@ export declare const NODE_NPM_PREFIX_SCRIPT: string;
|
|
|
6
6
|
export declare const NODE_BOOTSTRAP_TIMEOUT_MS: number;
|
|
7
7
|
/**
|
|
8
8
|
* Install Node from the pinned official archive when the desktop has no working Node >=20 and
|
|
9
|
-
* npm. The terminal
|
|
9
|
+
* npm. The terminal route, desktop CLI studies and the subject serve pipeline share it. It needs no
|
|
10
10
|
* apt: every network call is one bounded curl, so a stalled mirror fails the step within minutes.
|
|
11
11
|
*/
|
|
12
12
|
export declare const NODE_BOOTSTRAP_COMMAND: string;
|
|
@@ -20,7 +20,7 @@ export const NODE_NPM_PREFIX_SCRIPT = [
|
|
|
20
20
|
export const NODE_BOOTSTRAP_TIMEOUT_MS = 5 * 60_000;
|
|
21
21
|
/**
|
|
22
22
|
* Install Node from the pinned official archive when the desktop has no working Node >=20 and
|
|
23
|
-
* npm. The terminal
|
|
23
|
+
* npm. The terminal route, desktop CLI studies and the subject serve pipeline share it. It needs no
|
|
24
24
|
* apt: every network call is one bounded curl, so a stalled mirror fails the step within minutes.
|
|
25
25
|
*/
|
|
26
26
|
export const NODE_BOOTSTRAP_COMMAND = [
|
|
@@ -54,13 +54,13 @@ export const NODE_BOOTSTRAP_COMMAND = [
|
|
|
54
54
|
"for executable in node npm npx; do",
|
|
55
55
|
` sudo -n ln -sfn "$node_target/bin/$executable" "/usr/local/bin/$executable"`,
|
|
56
56
|
"done",
|
|
57
|
-
// Keep global product executables on the existing ordinary/sudo PATH (#679). The new
|
|
57
|
+
// Keep global product executables on the existing ordinary/sudo `PATH` (#679). The new
|
|
58
58
|
// versioned distribution is the only config we modify; no user/global npmrc or profile.
|
|
59
59
|
`sudo -n "$node_target/bin/node" -e '${NODE_NPM_PREFIX_SCRIPT}' "$node_target/lib/node_modules/npm/npmrc"`,
|
|
60
60
|
"hash -r",
|
|
61
61
|
`node -e 'process.exit(Number(process.versions.node.split(".")[0]) >= 20 ? 0 : 1)' && npm --version >/dev/null`,
|
|
62
|
-
// Product installation already uses sudo; detect a template whose sudo PATH cannot see Node
|
|
63
|
-
// rather than changing global PATH or permissions to make it look supported.
|
|
62
|
+
// Product installation already uses sudo; detect a template whose sudo `PATH` cannot see Node
|
|
63
|
+
// rather than changing global `PATH` or permissions to make it look supported.
|
|
64
64
|
`sudo -n node -e 'process.exit(Number(process.versions.node.split(".")[0]) >= 20 ? 0 : 1)' && sudo -n npm --version >/dev/null`,
|
|
65
65
|
"fi",
|
|
66
66
|
].join("\n");
|
package/dist/subject/runtime.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
// Provide the runtime a subject's serve pipeline needs, instead of failing at exit 127 (#371).
|
|
2
2
|
//
|
|
3
|
-
// The stock E2B `desktop` template ships python3 and curl but
|
|
3
|
+
// The stock E2B `desktop` template ships python3 and curl but no Node. That fact has now been
|
|
4
4
|
// rediscovered three times: the in-sandbox comms catch was rewritten from node to python3 in 0.29.0
|
|
5
|
-
// for exactly this reason, the terminal
|
|
5
|
+
// for exactly this reason, the terminal route bootstraps Node explicitly, and the computer-use
|
|
6
6
|
// clone/local-tree route did neither — so any lab whose `serve.install` runs npm or pnpm died with
|
|
7
|
-
// `pnpm: command not found`
|
|
7
|
+
// `pnpm: command not found` after a sandbox had been created and paid for.
|
|
8
8
|
//
|
|
9
9
|
// It failed invisibly up front: `lab inspect` was clean, the plan printed normally, the sandbox
|
|
10
10
|
// provisioned, and the first signal was a shell exit code attributed to "subject install failed".
|
|
11
11
|
// Nobody can debug that from the outside.
|
|
12
12
|
//
|
|
13
|
-
// The
|
|
13
|
+
// The harness provides the runtime instead of warning about it. An adopter writing a lab for a Node app should not have to
|
|
14
14
|
// know which binaries the template happens to carry — that is the harness's job, and the terminal
|
|
15
|
-
//
|
|
15
|
+
// route already treats it that way. Detection is conservative and the bootstrap is skipped whenever
|
|
16
16
|
// a runtime is already present, so a custom template that ships Node pays nothing.
|
|
17
17
|
/** Package managers and runtimes whose absence on the stock template breaks a serve pipeline. */
|
|
18
18
|
const NODE_COMMANDS = ["npm", "npx", "pnpm", "yarn", "bun", "node", "vite", "next", "tsx"];
|
package/dist/subject/serve.js
CHANGED
|
@@ -114,7 +114,7 @@ export async function runSubjectServePipeline(shell, args) {
|
|
|
114
114
|
await refresh();
|
|
115
115
|
await startSubject(step);
|
|
116
116
|
await waitForSubjectReady(step);
|
|
117
|
-
// after-ready: fixture loading through the
|
|
117
|
+
// after-ready: fixture loading through the running app (loopback curl from in-sandbox:
|
|
118
118
|
// steps are author-trusted provisioning, not actors, so no new URL policy surface). These
|
|
119
119
|
// complete before the caller opens the browser and the session timer starts.
|
|
120
120
|
await runState("after-ready");
|
package/dist/subject/steps.d.ts
CHANGED
|
@@ -24,14 +24,14 @@ export declare function isoNow(now: () => number): string;
|
|
|
24
24
|
export declare function emitPhaseStarted(onPhase: ((event: SubjectPhaseEvent) => void) | undefined, now: () => number, phase: string, message: string): void;
|
|
25
25
|
/** Emit the matching phase-completed event: always carries ok and durationMs (>= 0). */
|
|
26
26
|
export declare function emitPhaseCompleted(onPhase: ((event: SubjectPhaseEvent) => void) | undefined, now: () => number, startedAt: number, phase: string, ok: boolean, message: string): void;
|
|
27
|
-
/** Default phase-boundary sink (stderr): one line per event, prefixed with the
|
|
28
|
-
* when laneCount > 1. Single-
|
|
27
|
+
/** Default phase-boundary sink (stderr): one line per event, prefixed with the participant id
|
|
28
|
+
* only when laneCount > 1. Single-participant emission is unconditional: total single-participant silence for the
|
|
29
29
|
* whole clone/install/build/ready boot is the bug this event stream exists to close.
|
|
30
|
-
* Overridable via
|
|
30
|
+
* Overridable via LabDeps.subjectPhaseSink so deterministic tests capture instead of writing to
|
|
31
31
|
* the real stderr. */
|
|
32
32
|
export declare function defaultSubjectPhaseSink(event: SubjectPhaseEvent, ctx: {
|
|
33
33
|
laneId: string;
|
|
34
34
|
laneCount: number;
|
|
35
35
|
}): void;
|
|
36
|
-
/** The shared-world subject's phase line: one shared plane, so no
|
|
36
|
+
/** The shared-world subject's phase line: one shared plane, so no participant prefix. */
|
|
37
37
|
export declare function defaultSharedWorldPhaseSink(event: SubjectPhaseEvent): void;
|
package/dist/subject/steps.js
CHANGED
|
@@ -22,17 +22,17 @@ export function emitPhaseCompleted(onPhase, now, startedAt, phase, ok, message)
|
|
|
22
22
|
message,
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
/** Default phase-boundary sink (stderr): one line per event, prefixed with the
|
|
26
|
-
* when laneCount > 1. Single-
|
|
25
|
+
/** Default phase-boundary sink (stderr): one line per event, prefixed with the participant id
|
|
26
|
+
* only when laneCount > 1. Single-participant emission is unconditional: total single-participant silence for the
|
|
27
27
|
* whole clone/install/build/ready boot is the bug this event stream exists to close.
|
|
28
|
-
* Overridable via
|
|
28
|
+
* Overridable via LabDeps.subjectPhaseSink so deterministic tests capture instead of writing to
|
|
29
29
|
* the real stderr. */
|
|
30
30
|
export function defaultSubjectPhaseSink(event, ctx) {
|
|
31
31
|
const durationSuffix = event.durationMs === undefined ? "" : ` (${event.durationMs}ms)`;
|
|
32
|
-
const prefix = ctx.laneCount > 1 ? `humanish
|
|
32
|
+
const prefix = ctx.laneCount > 1 ? `humanish computer-use [${ctx.laneId}]` : "humanish computer-use";
|
|
33
33
|
process.stderr.write(`${prefix}: ${event.message}${durationSuffix}\n`);
|
|
34
34
|
}
|
|
35
|
-
/** The shared-world subject's phase line: one shared plane, so no
|
|
35
|
+
/** The shared-world subject's phase line: one shared plane, so no participant prefix. */
|
|
36
36
|
export function defaultSharedWorldPhaseSink(event) {
|
|
37
37
|
const durationSuffix = event.durationMs === undefined ? "" : ` (${event.durationMs}ms)`;
|
|
38
38
|
process.stderr.write(`humanish shared-world (concurrent): ${event.message}${durationSuffix}\n`);
|
|
@@ -10,6 +10,8 @@ export type DesktopReleaseResult = {
|
|
|
10
10
|
status: "unconfirmed";
|
|
11
11
|
reason: "release_unavailable" | "invalid_result" | "release_failed";
|
|
12
12
|
error?: unknown;
|
|
13
|
+
/** Why release is unavailable, when it is not the missing kill method. */
|
|
14
|
+
detail?: string;
|
|
13
15
|
};
|
|
14
16
|
export interface DesktopSession {
|
|
15
17
|
readonly resourceId: string;
|
|
@@ -5,7 +5,7 @@ export interface ChromeCdpProbeArgs {
|
|
|
5
5
|
cdpPort?: number;
|
|
6
6
|
/** The launched profile dir; the probe re-reads DevToolsActivePort at observe time. */
|
|
7
7
|
profileDir?: string;
|
|
8
|
-
/** The URL this
|
|
8
|
+
/** The URL this participant opened; attributes the page when no target id is pinned yet. */
|
|
9
9
|
targetUrl: string;
|
|
10
10
|
/** The pinned page target id from the launch-time geometry capture. */
|
|
11
11
|
targetId?: string;
|
|
@@ -24,7 +24,7 @@ export interface ChromeCdpProbeArgs {
|
|
|
24
24
|
* "state": url/title/text/scrollY. "geometry": outer window + CSS viewport. "port": resolution
|
|
25
25
|
* only. "emulate": apply mobile emulation (#221) to the selected page and exit (the overrides that
|
|
26
26
|
* are session-scoped, UA / touch / DPR, lapse when the socket closes). "hold": the same over a browser-level
|
|
27
|
-
* socket, then stay attached until killed (how a
|
|
27
|
+
* socket, then stay attached until killed (how a participant keeps them for its whole life) and attach
|
|
28
28
|
* to every page target Chrome opens later, sending it the same overrides and a reload the moment
|
|
29
29
|
* it exists, never pausing it (#623). "fidelity": read
|
|
30
30
|
* back what the page reports about itself (UA, DPR, viewport, touch), the proof for the bundle.
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
//
|
|
16
16
|
// The script takes ONE JSON argument and prints ONE JSON line. Failures print
|
|
17
17
|
// `{"unavailable": "<reason>"}` with exit 0 so the caller can say WHY the channel is dark instead
|
|
18
|
-
// of swallowing an exit code; the TypeScript side turns that into a
|
|
18
|
+
// of swallowing an exit code; the TypeScript side turns that into a participant warning that names the
|
|
19
19
|
// consequence ("url/text criteria will read as NEVER MEASURED").
|
|
20
20
|
import { shellQuote } from "../shell.js";
|
|
21
21
|
/**
|
|
@@ -2,12 +2,12 @@ import type { LabDesktopBrowser } from "../../lab/types.js";
|
|
|
2
2
|
import type { E2BDesktopSandbox } from "./sdk.js";
|
|
3
3
|
import type { DesktopMediaEvidence } from "./desktop-media.js";
|
|
4
4
|
export declare const DESKTOP_SETTLE_MS = 8000;
|
|
5
|
-
/** The DevTools port every Chromium
|
|
5
|
+
/** The DevTools port every Chromium participant launches with; see `chrome_debug_flags` below. */
|
|
6
6
|
export declare const CHROME_DEVTOOLS_PORT = 9222;
|
|
7
7
|
/**
|
|
8
8
|
* The shell step that waits for DevTools after a Chromium launch. `pid` is a shell word (the
|
|
9
9
|
* launch script passes "$launch_pid"). Without python3 it prints nothing, which reads as no
|
|
10
|
-
* readiness evidence: the
|
|
10
|
+
* readiness evidence: the participant keeps its previous behavior.
|
|
11
11
|
*/
|
|
12
12
|
export declare function chromeDevToolsReadinessCommand(args: {
|
|
13
13
|
pid: string;
|
|
@@ -33,7 +33,7 @@ export interface DesktopBrowserEvidence {
|
|
|
33
33
|
media?: DesktopMediaEvidence;
|
|
34
34
|
}
|
|
35
35
|
export type DesktopBrowserFamily = "chromium" | "firefox" | "unknown";
|
|
36
|
-
/** Runtime-only identity for the exact browser process started
|
|
36
|
+
/** Runtime-only identity for the exact browser process started for this participant. */
|
|
37
37
|
export interface DesktopBrowserLaunchIdentity {
|
|
38
38
|
processId: string;
|
|
39
39
|
profileDir: string;
|
|
@@ -9,11 +9,11 @@ import { e2bShell } from "./shell.js";
|
|
|
9
9
|
// Settle after opening the browser or the terminal, before the first screenshot: long enough for
|
|
10
10
|
// a cold browser and page load to paint (2 s captured a blank desktop; the render needs 6-9 s).
|
|
11
11
|
export const DESKTOP_SETTLE_MS = 8_000;
|
|
12
|
-
/** The DevTools port every Chromium
|
|
12
|
+
/** The DevTools port every Chromium participant launches with; see `chrome_debug_flags` below. */
|
|
13
13
|
export const CHROME_DEVTOOLS_PORT = 9222;
|
|
14
14
|
/**
|
|
15
15
|
* How long the launch command waits for Chrome's DevTools port to answer. Six live launches on the
|
|
16
|
-
* stock desktop answered in 4.8-7.7 s; two device-emulated
|
|
16
|
+
* stock desktop answered in 4.8-7.7 s; two device-emulated participants failed when it had not answered
|
|
17
17
|
* about 11 s after launch, and a CI leg once waited 20 s for the port marker.
|
|
18
18
|
*/
|
|
19
19
|
const CHROME_DEVTOOLS_READY_MS = 30_000;
|
|
@@ -85,7 +85,7 @@ while True:
|
|
|
85
85
|
/**
|
|
86
86
|
* The shell step that waits for DevTools after a Chromium launch. `pid` is a shell word (the
|
|
87
87
|
* launch script passes "$launch_pid"). Without python3 it prints nothing, which reads as no
|
|
88
|
-
* readiness evidence: the
|
|
88
|
+
* readiness evidence: the participant keeps its previous behavior.
|
|
89
89
|
*/
|
|
90
90
|
export function chromeDevToolsReadinessCommand(args) {
|
|
91
91
|
return [
|
|
@@ -113,7 +113,7 @@ export async function findVisibleBrowserWindowId(desktop, requestTimeoutMs, brow
|
|
|
113
113
|
return undefined;
|
|
114
114
|
// The candidate loop keeps the LAST identity match: with a launch identity the match is
|
|
115
115
|
// unique anyway, and without one every family candidate matches, so the newest visible
|
|
116
|
-
// window of the launched family wins (the window this
|
|
116
|
+
// window of the launched family wins (the window this participant just opened).
|
|
117
117
|
const finder = browserFamily === "firefox"
|
|
118
118
|
? [
|
|
119
119
|
"find_firefox_window() {",
|