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/AGENTS.md
CHANGED
|
@@ -34,8 +34,10 @@ diff.
|
|
|
34
34
|
|
|
35
35
|
Three counts are held to caps in package.json: oxlint warnings (`lint`, `--max-warnings`), comment
|
|
36
36
|
prose (`prose:check`) and the retired words lane, seat, role, sim and study in `src/` identifiers
|
|
37
|
-
(`vocabulary:check`). Each checker fails when a count is above its cap or below it,
|
|
38
|
-
reduces a count lowers its cap to the new count; the failure names the flag and the
|
|
37
|
+
and file names (`vocabulary:check`). Each checker fails when a count is above its cap or below it,
|
|
38
|
+
so the PR that reduces a count lowers its cap to the new count; the failure names the flag and the
|
|
39
|
+
value. CI's `caps` workflow fails a PR that raises or removes a cap against the base branch, unless
|
|
40
|
+
the PR has the `raise-cap` label and a `Cap raise:` line in its body that says why.
|
|
39
41
|
|
|
40
42
|
## Layout
|
|
41
43
|
|
package/ARCHITECTURE.md
CHANGED
|
@@ -24,9 +24,9 @@ reaches through `admitPlan` (`src/run-lab.ts`):
|
|
|
24
24
|
|
|
25
25
|
`runComputerUsePlan` (`src/routes/computer-use/route.ts`), `runTerminalPlan`
|
|
26
26
|
(`src/routes/terminal/route.ts`) and `runSharedWorldPlan` (`src/routes/shared-world/route.ts`)
|
|
27
|
-
admit and run in one call. Only tests
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
admit and run in one call. Only tests call them, directly or through the route modules'
|
|
28
|
+
`runCuaActorLab`, `runTerminalProductLab` and `runConcurrentSharedWorld`. `runLab` and the CLI do
|
|
29
|
+
not.
|
|
30
30
|
|
|
31
31
|
1. **Parse.** `runLabCommand` (`src/cli/commands/lab-run.ts`) calls `resolveLabManifest`
|
|
32
32
|
(`src/lab/discover.ts`), which calls `parseLabConfig` (`src/lab/config.ts`). It rejects unknown
|
|
@@ -54,10 +54,11 @@ admit and run in one call. Only tests and the deprecated runners call them: `run
|
|
|
54
54
|
`acquireE2BDesktopSandbox` (`src/substrates/e2b/sandbox.ts`) records the sandbox id before it
|
|
55
55
|
returns. `src/subject/`
|
|
56
56
|
provisions a `clone` or `local-tree` subject over a `Shell` (`src/substrates/shell.ts`).
|
|
57
|
-
5. **Participants.** `runLabParticipants` (`src/routes/computer-use/
|
|
58
|
-
in-progress bundle, then calls `runAllCuaParticipants`
|
|
59
|
-
runs `runCuaParticipant` for each
|
|
60
|
-
each one drives `runComputerUseLoop`
|
|
57
|
+
5. **Participants.** `runLabParticipants` (`src/routes/computer-use/live-phase.ts`) publishes an
|
|
58
|
+
in-progress bundle, then calls `runAllCuaParticipants`
|
|
59
|
+
(`src/routes/computer-use/participant-execution.ts`). That runs `runCuaParticipant` for each
|
|
60
|
+
participant, at most `execution.concurrency` at a time, and each one drives `runComputerUseLoop`
|
|
61
|
+
(`src/actors/computer-use/loop.ts`).
|
|
61
62
|
6. **Judge and publish.** `finishCuaRun` (`src/routes/computer-use/result.ts`) judges once with
|
|
62
63
|
`judgeComputerUseRun` (`src/routes/computer-use/bundle.ts`) and builds the bundle with
|
|
63
64
|
`buildCuaRunBundle` (`src/routes/computer-use/bundle.ts`), by the rules in `src/run/judge.ts`. A
|
|
@@ -68,7 +69,7 @@ admit and run in one call. Only tests and the deprecated runners call them: `run
|
|
|
68
69
|
`verifyRunPrepared` (`src/verify/verify.ts`) and writes `observer/index.html` from
|
|
69
70
|
`buildObserverData` (`src/observer/data.ts`).
|
|
70
71
|
8. **Analysis.** `completeAutomaticAnalysis` (`src/analysis/automatic-completion.ts`) runs
|
|
71
|
-
`
|
|
72
|
+
`runAutomaticAnalysis` (`src/analysis/automatic.ts`) on the `FinishedRun` that `Run.finish`
|
|
72
73
|
issued. Dry runs and labs with `review.analysis: false` skip it.
|
|
73
74
|
|
|
74
75
|
## Find the code for each part of the system
|
|
@@ -121,14 +122,14 @@ three guest entry files stay at the `src/` root
|
|
|
121
122
|
|
|
122
123
|
## Keep these invariants when you change code
|
|
123
124
|
|
|
124
|
-
| Invariant | Enforced by | Pinned by
|
|
125
|
-
| ------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
126
|
-
| The run bundle is the source of truth, and the Observer derives from it | `verifyRun` grades only `run.json` and its artifacts (`src/verify/verify.ts`). It reads `status.json` and the sandbox and reclaim receipts only for the `RUN_NOT_FINISHED` warning (`runNotFinishedWarnings` in `src/verify/liveness.ts`), which changes no check and no grade. `buildObserverData` takes the bundle (`src/observer/data.ts`) | `tests/observer/data-contract.test.ts`; `tests/verify/run-not-finished.test.ts` checks that the grades are the same when `status.json` contradicts the bundle or is gone; `docs/decisions/0001-run-bundle-is-the-source-of-truth.md`
|
|
127
|
-
| Unsupported execution is refused before side effects | `parseLabConfig` (`src/lab/config.ts`), `taskProtocolValidationReason` (`src/lab/validation.ts`), `planComputerUseLab` (`src/routes/computer-use/plan.ts`) | `tests/lab/task-route-preflight.test.ts`; `pnpm cli:preflight:test` runs `scripts/task-route-preflight-proof.mjs` with `tests/fixtures/task-route-preflight/deny-side-effects.mjs` preloaded
|
|
128
|
-
| A sandbox id is recorded before any work runs in it | `acquireE2BDesktopSandbox` and `acquireE2BShellSandbox` (`src/substrates/e2b/sandbox.ts`) write the receipt before they return the handle, and every route that creates a sandbox calls them; `reclaimRunSandboxes` (`src/run/reclaim.ts`) switches on the receipt's provider and kills by exact id | `tests/substrates/e2b/sandbox.test.ts`, which also checks that `Sandbox.create` has one call site in `src/`, `tests/routes/terminal/acquisition-boundary.test.ts`, `tests/run/reclaim.test.ts`; `tests/routes/scripted/route.test.ts` checks create, receipt, then first work
|
|
129
|
-
| Bundles carry no secrets | `redactText` and `scrubLiterals` (`src/evidence/redaction.ts`); `scanRunPublicSafetyArtifacts` (`src/verify/artifacts.ts`); `buildShareSafety` (`src/verify/verify.ts`) grades `share_ready`, `local_only` or `blocked` | `tests/evidence/redaction-hooks.test.ts`, `tests/run/transient-comms-secrets.test.ts`, `tests/verify/evidence-refs.test.ts`
|
|
130
|
-
| Goldens pin route output | `runDirSnapshot` (`tests/helpers/run-golden.ts`) snapshots a whole run folder | `tests/golden/routes/`, `tests/golden/observer-data/`, `tests/golden/labs/`; `tests/lab/plan-lab.test.ts` checks that every `LabRoute` has a dry-run golden
|
|
131
|
-
| A run is closed on every exit, only a published run is analyzed, and `latest.json` moves only after its run is published | `runScope` and `FinishedRun` (`src/run/run.ts`); `completeAutomaticAnalysis` requires an issued `FinishedRun` for the result's run; `Run.finish` writes `latest.json` last through `writePreparedRunLatestPointer` (`src/run/contained-output.ts`) | `tests/run/run-lifecycle.test.ts`, which also checks that `src/run/run.ts` is the pointer's one writer, `tests/analysis/automatic-analysis.test.ts`
|
|
125
|
+
| Invariant | Enforced by | Pinned by |
|
|
126
|
+
| ------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
127
|
+
| The run bundle is the source of truth, and the Observer derives from it | `verifyRun` grades only `run.json` and its artifacts (`src/verify/verify.ts`). It reads `status.json` and the sandbox and reclaim receipts only for the `RUN_NOT_FINISHED` warning (`runNotFinishedWarnings` in `src/verify/liveness.ts`), which changes no check and no grade. `buildObserverData` takes the bundle (`src/observer/data.ts`) | `tests/observer/data-contract.test.ts`; `tests/verify/run-not-finished.test.ts` checks that the grades are the same when `status.json` contradicts the bundle or is gone; `docs/decisions/0001-run-bundle-is-the-source-of-truth.md` |
|
|
128
|
+
| Unsupported execution is refused before side effects | `parseLabConfig` (`src/lab/config.ts`), `taskProtocolValidationReason` (`src/lab/validation.ts`), `planComputerUseLab` (`src/routes/computer-use/plan.ts`) | `tests/admission/library.test.ts` checks each library refusal for a run directory, a desktop module load, a caller executor or provider, and a subprocess; `tests/admission/cli.test.ts` checks each CLI refusal for a run directory, a started process and a scorer's host code; `tests/lab/task-route-preflight.test.ts`; `pnpm cli:preflight:test` runs `scripts/task-route-preflight-proof.mjs` with `tests/fixtures/task-route-preflight/deny-side-effects.mjs` preloaded |
|
|
129
|
+
| A sandbox id is recorded before any work runs in it | `acquireE2BDesktopSandbox` and `acquireE2BShellSandbox` (`src/substrates/e2b/sandbox.ts`) write the receipt before they return the handle, and every route that creates a sandbox calls them; `reclaimRunSandboxes` (`src/run/reclaim.ts`) switches on the receipt's provider and kills by exact id | `tests/substrates/e2b/sandbox.test.ts`, which also checks that `Sandbox.create` has one call site in `src/`, `tests/routes/terminal/acquisition-boundary.test.ts`, `tests/run/reclaim.test.ts`; `tests/routes/scripted/route.test.ts` checks create, receipt, then first work |
|
|
130
|
+
| Bundles carry no secrets | `redactText` and `scrubLiterals` (`src/evidence/redaction.ts`); `scanRunPublicSafetyArtifacts` (`src/verify/artifacts.ts`); `buildShareSafety` (`src/verify/verify.ts`) grades `share_ready`, `local_only` or `blocked` | `tests/evidence/redaction-hooks.test.ts`, `tests/run/transient-comms-secrets.test.ts`, `tests/verify/evidence-refs.test.ts` |
|
|
131
|
+
| Goldens pin route output | `runDirSnapshot` (`tests/helpers/run-golden.ts`) snapshots a whole run folder | `tests/golden/routes/`, `tests/golden/observer-data/`, `tests/golden/labs/`; `tests/lab/plan-lab.test.ts` checks that every `LabRoute` has a dry-run golden |
|
|
132
|
+
| A run is closed on every exit, only a published run is analyzed, and `latest.json` moves only after its run is published | `runScope` and `FinishedRun` (`src/run/run.ts`); `completeAutomaticAnalysis` requires an issued `FinishedRun` for the result's run; `Run.finish` writes `latest.json` last through `writePreparedRunLatestPointer` (`src/run/contained-output.ts`) | `tests/run/run-lifecycle.test.ts`, which also checks that `src/run/run.ts` is the pointer's one writer, `tests/analysis/automatic-analysis.test.ts` |
|
|
132
133
|
|
|
133
134
|
The receipt write is best-effort; the sandbox's server-side timeout ends a sandbox with no
|
|
134
135
|
receipt. A lab preflight probe journals its receipt with `withPreflightSandbox`
|
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,30 @@ The Unreleased section holds the full notes for the next version until it is tag
|
|
|
8
8
|
|
|
9
9
|
## Unreleased
|
|
10
10
|
|
|
11
|
+
## 0.107.0: A 44-name library API, --count and --participants (2026-10-02)
|
|
12
|
+
|
|
13
|
+
humanish 0.107.0 removes the library surfaces 0.106.0 deprecated, so the entry point exports 44
|
|
14
|
+
names, down from 83. `runLab(config, options)` is the one way to run a lab: the route runners, the
|
|
15
|
+
`RunLabOptions` hook bags, `LabOutcome.backend`, the `routesTo*` predicates and `rerun.laneIds` are
|
|
16
|
+
gone, and a JavaScript caller that still passes a removed option is refused before anything runs.
|
|
17
|
+
The release notes map each removed name to its replacement. On the CLI, `--count` replaces
|
|
18
|
+
`--sims` and `--participants` replaces `--lanes`; the old flags work with a warning until 0.108.0.
|
|
19
|
+
A scripted `press` step sends its key. A signalled live run records itself as interrupted and
|
|
20
|
+
kills its sandboxes. Restricted Codex launches check the release's app-server schema before they
|
|
21
|
+
start, and a terminal lab with no declared model runs on `gpt-5.6-sol` and prices its tokens.
|
|
22
|
+
|
|
23
|
+
[Release notes](https://github.com/danielgwilson/humanish/releases/tag/v0.107.0)
|
|
24
|
+
|
|
25
|
+
## 0.106.1: Codex CLI 0.160.0 and reclaim in E2B debug mode (2026-10-01)
|
|
26
|
+
|
|
27
|
+
Codex participants, Codex-account analysis and `humanish doctor` admit Codex CLI 0.160.0 (published
|
|
28
|
+
to npm 2026-10-01) on Linux x64, which 0.106.0 refused. Doctor's recovery for an unadmitted release
|
|
29
|
+
suggests `npm install -g @openai/codex@0.160.0`. `humanish reclaim` refuses to run with
|
|
30
|
+
`E2B_DEBUG=true`, where the E2B SDK reports kills it never sent, and a run's sandbox teardown in
|
|
31
|
+
debug mode reads unconfirmed.
|
|
32
|
+
|
|
33
|
+
[Release notes](https://github.com/danielgwilson/humanish/releases/tag/v0.106.1)
|
|
34
|
+
|
|
11
35
|
## 0.106.0: Node 22.19, a smaller library API and stricter share safety (2026-10-01)
|
|
12
36
|
|
|
13
37
|
humanish needs Node 22.19.0 or later. The library entry point exports 83 names, down from 377:
|
package/CONTEXT.md
CHANGED
|
@@ -3,34 +3,37 @@
|
|
|
3
3
|
Use one word per concept. Docs and new code use the terms in the first table. Some lab, bundle and
|
|
4
4
|
output fields keep older spellings; the second table maps them.
|
|
5
5
|
|
|
6
|
-
| Term
|
|
7
|
-
|
|
|
8
|
-
| study
|
|
9
|
-
| run
|
|
10
|
-
| lab
|
|
11
|
-
| participant
|
|
12
|
-
| persona
|
|
13
|
-
| mission
|
|
14
|
-
| assignment
|
|
15
|
-
| scenario
|
|
16
|
-
| surface
|
|
17
|
-
| journey
|
|
18
|
-
| subject
|
|
19
|
-
| actor
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
|
|
|
6
|
+
| Term | Meaning | Where it lives in the code |
|
|
7
|
+
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
8
|
+
| study | The prose word for everything one `humanish run <lab>` produces: participants, evidence and analysis. Each study writes one run. | No type of its own; see run. |
|
|
9
|
+
| run | One execution on disk: `.humanish/runs/<runId>/`, with `run.json` (`humanish.run-bundle.v1`) as the source of truth. | `src/run/`; `RunBundle` in `src/run/bundle.ts` |
|
|
10
|
+
| lab | A YAML manifest that declares a study: `humanish/labs/<id>.yaml`, schema `humanish.lab.v2`. | `src/lab/`; `LabConfig` in `src/lab/types.ts`, parsed by `parseLabConfig` in `src/lab/config.ts` |
|
|
11
|
+
| participant | One simulated person, or agent, taking part in a study. The planner builds each one's record (id, persona id, assignment, labels and the route's own fields). Shared-world participants resolve the plan's records; computer-use participants rebuild the same records from the lab config with `computerUseParticipants` (`src/lab/plan-participants.ts`) and resolve those. `ResolvedParticipant` adds the bundle ids, persona and prompt. `run.json` records each one as a `simulations[]` entry with one or more `streams[]`. | `ResolvedParticipant` in `src/run/participant.ts`; the planned records in `src/lab/plan-participants.ts`. Computer-use and shared-world participants run a `DesktopParticipantRun` (`src/routes/computer-use/types.ts`). The terminal session (`src/routes/terminal/session.ts`), scripted surfaces (`src/routes/scripted/plan.ts`) and fixture simulations (`src/run/dry-run.ts`) still build their own. |
|
|
12
|
+
| persona | Who a participant is: traits, background, device. `humanish/personas/<id>.yaml`. | `src/lab/persona.ts`, `src/lab/persona-resolve.ts` |
|
|
13
|
+
| mission | The free-form brief a model-driven participant receives: `actors[].mission`. `actors[].tasks[]` adds discrete tasks: each has a `goal` the participant sees and an optional `success` check it does not. | `LabActor` in `src/lab/types.ts` |
|
|
14
|
+
| assignment | What one participant was asked to do: the mission, a `lanes[]` entry's `instruction` or `laneFocus.instruction` (recorded as `focus`), and the tasks. Each stream records it as `streams[].assignment`. | `participantAssignment` in `src/lab/participant-assignment.ts`; `RunParticipantAssignment` in `src/run/streams.ts` |
|
|
15
|
+
| scenario | Two things share the word. The lab's `scenario` block holds run settings: `mode` (`dry-run` or `live`), `caps`, and an optional `ref`. The `ref` names a scenario file, `humanish/scenarios/<id>.yaml` (`humanish.scenario.v1`): a goal and ordered steps with expectations. Only the scripted-browser route executes those steps. A model-driven participant follows its mission. | `LabScenario` in `src/lab/types.ts`; `src/routes/scripted/route.ts` resolves the scenario, and `executeBrowserPersonaStep` (`src/actors/scripted-browser/steps.ts`) runs each step |
|
|
16
|
+
| surface | One browser viewport that a scripted run replays its journey on: `desktop` or `mobile`. A scripted lab runs the desktop surface by default, and `actors[0].count: 2` adds the mobile one. Each surface writes `actor-<surface>.json` and `traces/<surface>.json`. | `BrowserSurface` and `browserSurfaces` in `src/actors/scripted-browser/types.ts`; the plan's `surfaces` in `src/routes/scripted/plan.ts` |
|
|
17
|
+
| journey | A scenario's `browser.steps` parsed into ordered steps with a goal and a start path. The scripted route replays it once on each surface, and each surface's session reports the first step that did not pass. | `BrowserPersonaJourney` in `src/actors/scripted-browser/types.ts`; `parseBrowserPersonaJourneyFromScenario` in `src/actors/scripted-browser/journey.ts` |
|
|
18
|
+
| subject | The product under study, declared by `subject.source`: `clone`, `app-url`, `local-tree`, `terminal-product`, `desktop-cli`, `local-app` or `this-repo`. `run.json` records its provenance under `subject`. | `LabSubject` in `src/lab/types.ts`, parsed in `src/lab/parse/subject.ts` |
|
|
19
|
+
| actor | The model or program that drives a participant, declared by `actors[0].type`, e.g. `openai-computer-use`, `local-agent`, `scripted-browser`, `codex-exec`. | `src/actors/`; `actorRegistry` in `src/actors/registry.ts` lists them, plus `codex-app-server`, which no lab can name; `ActorTrace` in `src/actors/contract.ts` is its record |
|
|
20
|
+
| run kind | What an actor can do: `code`, `computer-use`, `scripted-browser` or `terminal`. An actor declares its run kinds in `capabilities.lanes`, and its trace records the one it ran as `lane`; neither field names a participant. Routing admits a lab's actor only for a run kind it declares. `computer-use` and `terminal` name both a run kind and a route, but a route is where a lab runs and a run kind is what an actor does. | `ActorRunKind` in `src/actors/contract.ts`; `actorResolvesToComputerUse` (`src/lab/routing.ts`) and its siblings |
|
|
21
|
+
| adapter | Product-specific code kept out of core. A lab names a scorer module in `review.scorer.ref`, or the CLI passes `--scorer`, and a library caller passes the same functions as `RunLabOptions.scorer`: `score`, `deriveFeedback` and `deriveArtifacts`. Their output is stored under the adapter's namespace in `run.json` (`adapterScore`, `adapterArtifacts` and a feedback candidate's `adapter`). | `AdapterScorerModule` in `src/lab/adapter-scorer-loader.ts`; `applyBrowserScorer` in `src/lab/adapter-extension.ts`; fixture sets in `adapters/` |
|
|
22
|
+
| computer use | A model drives a participant by reading screenshots of a desktop and acting with mouse and keyboard. `openai-computer-use` and `local-agent` are the computer-use actors. CUA is the short form in code names such as `CuaExecutor` and in the older spellings listed under `cua` below. | `src/routes/computer-use/`, `src/actors/computer-use/` |
|
|
23
|
+
| fan-out | A computer-use run with more than one participant, each on its own desktop, or any rerun. It writes the fan-out bundle shape and passes only when every expected participant passes. One participant without a rerun keeps the single-participant shape. | `buildCuaFanoutBundle` in `src/routes/computer-use/fanout-bundle.ts`; `judgeComputerUseRun` in `src/routes/computer-use/bundle.ts` |
|
|
24
|
+
| route | The execution path for a lab: `computer-use`, `shared-world`, `scripted`, `terminal` or `preview`. `preview` writes a dry-run bundle for `this-repo` subjects with no live participant. | `routeOf` and `LabRoute` in `src/lab/plan.ts`; predicates in `src/lab/routing.ts`; one folder or file per route in `src/routes/` |
|
|
25
|
+
| plan | What `planLab` decides about a lab before anything runs: the lab id, whether it is a dry run, the analysis settings and the keys, connections and env vars the run needs, plus the route's participants, caps and own fields. There is one variant per route. `planLab` returns a plan, or a refusal with the route's error code, and the route's run function (`runComputerUsePlan` and the others) takes the plan. | `LabPlan` in `src/lab/plan-types.ts`; `planLab` in `src/lab/plan.ts`; each route's planner in its `plan.ts` |
|
|
26
|
+
| substrate | Where a participant's desktop or shell runs: a hosted E2B sandbox, or a local Firecracker VM (inside Lima on macOS). | `src/substrates/e2b/`, `src/substrates/local/` |
|
|
27
|
+
| participant desktop | The desktop one computer-use or shared-world participant drives: a substrate plus the route's concerns, such as subject provisioning, comms and the participant's plan. It lives in the route, so `src/substrates/` holds only provider primitives ([ADR 0004](docs/decisions/0004-participant-desktops-stay-in-the-route.md)). | `ParticipantDesktop` in `src/routes/computer-use/participant-desktop.ts`; `createE2BParticipantDesktop` in `src/routes/computer-use/e2b-desktop/desktop.ts`; the local VM's in `src/routes/computer-use/local-vm.ts` |
|
|
28
|
+
| receipt | A line in a run's `sandbox-receipts.ndjson` that records a sandbox's id, provider, the participant or subject it belongs to (`laneId`), and its time limit as soon as the sandbox is created, before any work runs in it. `humanish reclaim` kills sandboxes by these ids after an interrupted run. | `SandboxReceipt` in `src/run/sandbox-receipts.ts`; `reclaimRunSandboxes` in `src/run/reclaim.ts` |
|
|
29
|
+
| topology | Whether participants share one instance of the subject. `subject.topology` is `per-lane-worlds` (the default, one each) or `shared-world` (one for all). | `LabSubjectTopology` in `src/lab/types.ts` |
|
|
30
|
+
| plane | The one instance of the subject that a shared-world study's participants use together. A `provisioned` plane is a `clone` or `local-tree` subject that humanish serves in a sandbox, with a declared subject state. An `external-public` plane is a deployment already running at `subject.appUrl`, whose owner the lab names in `subject.publicTarget.owner`. Each plane has at least two participants. | `SharedWorldPlane` in `src/lab/plan-types.ts`; `src/routes/shared-world/` |
|
|
31
|
+
| stream | One live or recorded view of a participant, such as a browser or a terminal, in `run.json` and the Observer. | `RunStream` in `src/run/streams.ts` |
|
|
32
|
+
| Observer | The single-file review page built from `observer/observer-data.json` (`humanish.observer-data.v1`). | `observer/` (the page), `src/observer/` (data, render, serve) |
|
|
33
|
+
| evidence | Files a run keeps: screenshots, traces, transcripts, recordings. `verify` checks them and grades share-safety. | `src/evidence/`; `verifyRun` in `src/verify/verify.ts` |
|
|
34
|
+
| analysis | An independent model reading of a finished run's retained evidence, kept apart from participant feedback. Supported live runs request it automatically, and `humanish analyze` runs it on demand. It records findings and observations as `humanish.study-analysis.v1`. | `src/analysis/`; `runAutomaticAnalysis` in `src/analysis/automatic.ts`; `analyzeRun` in `src/analysis/service.ts`; `ANALYSIS_SCHEMA` in `src/analysis/types.ts` |
|
|
35
|
+
| finding | A result of analysis, with citations to evidence in the run. Each finding groups the observations that support it. | `src/analysis/` |
|
|
36
|
+
| observation | One claim in analysis with its basis, evidence ids and limitation. `concernReviews[]` gives each material concern's observation a disposition: `finding`, `context` or `unsupported`. | `src/analysis/` |
|
|
34
37
|
|
|
35
38
|
## Read these field spellings as the concept they name
|
|
36
39
|
|
|
@@ -38,14 +41,14 @@ Fields documented in [docs/contracts/](docs/contracts/schemas.md), in `TELEMETRY
|
|
|
38
41
|
library exports of `src/index.ts` are API, so they keep their spelling. Prose and new code use the
|
|
39
42
|
concept word.
|
|
40
43
|
|
|
41
|
-
| Spelling
|
|
42
|
-
|
|
|
43
|
-
| `lanes`, `laneFocus`, `laneId`, `laneWindows`, `laneGroups` | `actors[0].lanes[]` and `actors[0].laneFocus` in a lab; `streams[].laneId` and `sharedWorld.laneWindows` in `run.json`; `laneGroups` in Observer data
|
|
44
|
-
| `roles`, `roleId`, `roleCount`
|
|
45
|
-
| seat
|
|
46
|
-
| `simulations`, `simId`, `simCount`
|
|
47
|
-
| `streams`, `streamId`
|
|
48
|
-
| `backend`
|
|
49
|
-
| `cua`
|
|
50
|
-
| `CONCURRENT` in `HUMANISH_CONCURRENT_SHARED_WORLD_LAB_*`
|
|
51
|
-
| `brain`
|
|
44
|
+
| Spelling | Where it appears | Concept |
|
|
45
|
+
| -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- |
|
|
46
|
+
| `lanes`, `laneFocus`, `laneId`, `laneWindows`, `laneGroups`, `laneSummary`, `per-lane-worlds`, `lane-NN` | `actors[0].lanes[]` and `actors[0].laneFocus` in a lab, and `lane` on each `comms.email.recipients[]` entry; `per-lane-worlds`, the default `subject.topology`; `lane-01`, `lane-02`, … as the ids of independent participants the lab does not name; `streams[].laneId` and `sharedWorld.laneWindows` in `run.json`; `laneId` in `sandbox-receipts.ndjson`, which can also name the subject; `lanes[]` and `laneSummary` in `humanish.cua-lab-result.v2`; `laneGroups` in Observer data. Deprecated until the next minor removes them: `--lanes` (use `--participants`) and `BrowserLabScoringContext.laneCount` (use `participantCount`). | participant |
|
|
47
|
+
| `roles`, `roleId`, `roleCount`, `role-NN` | `run.json` `sharedWorld`: `roleCount`, and `roleId` on `laneWindows`, `outcomes` and the older sequential records; `role-01`, `role-02`, … as the ids of shared-world participants the lab does not name | participant in a shared world |
|
|
48
|
+
| seat | `resolveSeatUrl` in `src/lab/routing.ts`, comments in `src/lab/warnings.ts`, and the dated records under `docs/goals/`. The shared-world planner's records are `ProvisionedParticipant` and `ExternalPublicParticipant` (`src/lab/plan-participants.ts`). No lab or `run.json` field uses the word. | participant in a shared world |
|
|
49
|
+
| `simulations`, `simId`, `simCount`, `--sims` | `simulations[]` in `run.json` (one per participant), `simId` on streams and shared-world records, `simCount` in `run.json` and Observer data; `--sims` on `humanish run`, `lab run` and `watch`, deprecated for `--count` until the next minor removes it | participant |
|
|
50
|
+
| `streams`, `streamId` | `streams[]` in `run.json`; `streamId` on shared-world records | stream |
|
|
51
|
+
| `backend` | `BrowserLabScoringContext.backend`, deprecated for `route`: its first read warns, and the next minor removes it. `selectLabBackend`, `LabOutcome.backend`, `LabBackend` and the preflight result's `backend` field are removed; read `route`. The values are older route names: `cua` is computer-use, `concurrent-shared-world` is shared-world and `synthetic` is preview. | route |
|
|
52
|
+
| `cua` | The `HUMANISH_CUA_LAB_*` error codes, the result schema `humanish.cua-lab-result.v2`, the `cua-lab.*` event types in `run.json`, the `humanish lab cua` summary line, the fallback persona id `cua-operator`, and the `cua` value of the deprecated `BrowserLabScoringContext.backend` | computer use |
|
|
53
|
+
| `CONCURRENT` in `HUMANISH_CONCURRENT_SHARED_WORLD_LAB_*` | The shared-world route's error codes. The word dates from when a sequential shared-world route also existed; its codes, `HUMANISH_SHARED_WORLD_LAB_*`, went with it in 0.106.0, so new shared-world codes keep `CONCURRENT_` rather than reuse that prefix | shared world |
|
|
54
|
+
| `brain` | The telemetry property: `provider-key`, `local-agent` or `none` | how the actor gets its model |
|
package/CONTRIBUTING.md
CHANGED
|
@@ -68,12 +68,14 @@ Two kinds of change need one more step:
|
|
|
68
68
|
|
|
69
69
|
`pnpm format` rewrites files with oxfmt. `pnpm check` fails on unformatted files.
|
|
70
70
|
It also holds three counts to caps in package.json: oxlint warnings (`lint`), prose in `src/`
|
|
71
|
-
comments (`prose:check`: issue references, `FIX-N` tags, all-caps emphasis), and identifiers
|
|
72
|
-
`src/` outside the exempt contract modules that still say lane, seat, role, sim or
|
|
73
|
-
(`vocabulary:check`). Each check fails when its count rises above the cap and also when it
|
|
74
|
-
below it, so the PR that reduces a count lowers the cap in the same commit; the failure
|
|
75
|
-
names the flag and the new value.
|
|
76
|
-
|
|
71
|
+
comments (`prose:check`: issue references, `FIX-N` tags, all-caps emphasis), and identifiers and
|
|
72
|
+
file names in `src/` outside the exempt contract modules that still say lane, seat, role, sim or
|
|
73
|
+
study (`vocabulary:check`). Each check fails when its count rises above the cap and also when it
|
|
74
|
+
falls below it, so the PR that reduces a count lowers the cap in the same commit; the failure
|
|
75
|
+
message names the flag and the new value. CI's `caps` workflow (`scripts/check-cap-direction.mjs`)
|
|
76
|
+
also fails a PR that raises or removes a cap against the base branch, unless the PR has the
|
|
77
|
+
`raise-cap` label and a `Cap raise:` line in its body that says why. `pnpm lint` prints the warnings
|
|
78
|
+
that already exist, several hundred of them; that is expected. `pnpm knip` fails on unused files,
|
|
77
79
|
dependencies and exports, and on any import cycle.
|
|
78
80
|
|
|
79
81
|
## Useful Commands
|
package/README.md
CHANGED
|
@@ -294,8 +294,8 @@ and Intel macOS keep the one version they ran before qualification began, which
|
|
|
294
294
|
qualified there. Any other version, including one Codex updated itself to, is refused with the
|
|
295
295
|
list of accepted versions.
|
|
296
296
|
|
|
297
|
-
**Credentials.**
|
|
298
|
-
of these sources that has it. It prints the name and source of
|
|
297
|
+
**Credentials.** humanish fills each provider key that is not already set from
|
|
298
|
+
the first of these sources that has it. It prints the name and source of a key it
|
|
299
299
|
fills from sources 2 to 4, never the value:
|
|
300
300
|
|
|
301
301
|
1. the process environment, including a file passed with `--env-file`;
|
|
@@ -306,7 +306,12 @@ fills from sources 2 to 4, never the value:
|
|
|
306
306
|
which `humanish keys set` writes as plain text with mode `0600`.
|
|
307
307
|
|
|
308
308
|
A dry run reads no provider key, so `run`, `lab run` and `watch` consult sources 2 to 4 only
|
|
309
|
-
for a live lab.
|
|
309
|
+
for a live lab. A live run fills every key it finds and prints the ones its plan reads: its model,
|
|
310
|
+
desktop and runtime keys, its `subject.env` names, the variable
|
|
311
|
+
`comms.email.external.authTokenEnv` names, `ANTHROPIC_API_KEY` for a Claude Code participant, and
|
|
312
|
+
`OPENAI_API_KEY` when its automatic analysis runs on OpenAI. With a declared scorer it prints
|
|
313
|
+
every key it fills, since the scorer's code may read any. `lab preflight`, `doctor`, `tui` and the
|
|
314
|
+
`comms` commands still consult them.
|
|
310
315
|
`humanish analyze` consults them for a live OpenAI analysis, and not for `--dry-run` or the
|
|
311
316
|
Codex analyst.
|
|
312
317
|
`HUMANISH_STRICT_KEYS=1` turns off sources 2 to 4. `init` and `doctor` also run
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import readline from "node:readline";
|
|
2
2
|
import { redactText } from "../../evidence/redaction.js";
|
|
3
|
-
import {
|
|
3
|
+
import { isRecord } from "../../run/type-guards.js";
|
|
4
|
+
import { formatJsonRpcError } from "./app-server-trace.js";
|
|
4
5
|
export class CodexStdioClient {
|
|
5
6
|
child;
|
|
6
7
|
commandName;
|
|
@@ -150,5 +150,4 @@ export declare function renderTranscript(trace: CodexAppServerTrace): string;
|
|
|
150
150
|
export declare function readNestedString(value: unknown, pathParts: string[]): string | undefined;
|
|
151
151
|
export declare function formatJsonRpcError(error: JsonObject): string;
|
|
152
152
|
export declare function redactCodexEnvelope(value: unknown, rootCwd: string): unknown;
|
|
153
|
-
export declare function isRecord(value: unknown): value is JsonObject;
|
|
154
153
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// The trace a codex-app-server run writes (summary.json): its schema, the recorder that builds it
|
|
2
2
|
// from app-server envelopes, and the redaction applied before anything is persisted.
|
|
3
3
|
import { digestText, publicPathForTrace, redactText, tailText } from "../../evidence/redaction.js";
|
|
4
|
+
import { isRecord } from "../../run/type-guards.js";
|
|
4
5
|
export const CODEX_APP_SERVER_TRACE_SCHEMA = "humanish.codex-app-server-trace.v1";
|
|
5
6
|
const authLikeKey = /(api[_-]?key|access[_-]?token|auth[_-]?url|authorization|bearer|credential|password|secret|token)$/i;
|
|
6
7
|
const pathLikeKey = /^(cwd|path|writableRoots|workspaceRoot)$/i;
|
|
@@ -419,6 +420,3 @@ function limitTranscript(value) {
|
|
|
419
420
|
}
|
|
420
421
|
return `[...sanitized transcript truncated to last ${maxChars} characters...]\n${value.slice(-maxChars)}`;
|
|
421
422
|
}
|
|
422
|
-
export function isRecord(value) {
|
|
423
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
424
|
-
}
|
|
@@ -2,8 +2,9 @@ import { spawn } from "node:child_process";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { digestText, tailText } from "../../evidence/redaction.js";
|
|
4
4
|
import { prepareContainedOutputDirectory, prepareContainedOutputFile, prepareSelectedOutputDirectory, writeContainedOutputFile, } from "../../run/contained-output.js";
|
|
5
|
+
import { isRecord } from "../../run/type-guards.js";
|
|
5
6
|
import { CodexStdioClient } from "./app-server-client.js";
|
|
6
|
-
import { CodexTraceRecorder,
|
|
7
|
+
import { CodexTraceRecorder, readNestedString, redactCodexEnvelope, renderTranscript, } from "./app-server-trace.js";
|
|
7
8
|
export async function runCodexAppServerSession(options) {
|
|
8
9
|
const preparedRunRoot = await prepareSelectedOutputDirectory(process.cwd(), options.runRoot);
|
|
9
10
|
return runCodexAppServerSessionInPreparedRoot(options, preparedRunRoot);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ProtocolContract } from "./protocol-contract.js";
|
|
2
|
+
type Schema = boolean | Record<string, unknown>;
|
|
3
|
+
/** The definitions of one generated schema, and the params definition of each method. */
|
|
4
|
+
export interface ProtocolSchema {
|
|
5
|
+
readonly definitions: ReadonlyMap<string, Schema>;
|
|
6
|
+
readonly requestParams: ReadonlyMap<string, string>;
|
|
7
|
+
readonly notificationParams: ReadonlyMap<string, string>;
|
|
8
|
+
}
|
|
9
|
+
/** What the check found: changes that refuse the launch, and additions it only records. */
|
|
10
|
+
export interface ProtocolCheck {
|
|
11
|
+
readonly incompatibilities: string[];
|
|
12
|
+
readonly additions: string[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Reads the files `codex app-server generate-json-schema --experimental` writes: the v2 and full
|
|
16
|
+
* bundles for definitions, and the ClientRequest and ServerNotification unions for params.
|
|
17
|
+
*/
|
|
18
|
+
export declare function loadProtocolSchema(directory: string): Promise<ProtocolSchema>;
|
|
19
|
+
/** A field's alternatives at `path` under a definition, or none when the field is gone. */
|
|
20
|
+
export declare function resolveField(schema: ProtocolSchema, definition: string, fieldPath: string): Schema[];
|
|
21
|
+
/** Checks a generated schema against the contract; any incompatibility refuses the launch. */
|
|
22
|
+
export declare function checkProtocol(schema: ProtocolSchema, contract: ProtocolContract): ProtocolCheck;
|
|
23
|
+
/** The refusal detail for an incompatible release. */
|
|
24
|
+
export declare function protocolIncompatibilityMessage(cliVersion: string | undefined, incompatibilities: readonly string[]): string;
|
|
25
|
+
/** The run warning for schema values beyond the baseline, or undefined when there were none. */
|
|
26
|
+
export declare function protocolAdditionsWarning(cliVersion: string | undefined, additions: readonly string[] | undefined): string | undefined;
|
|
27
|
+
export {};
|