humanish 0.107.0 → 0.108.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/ARCHITECTURE.md +22 -17
- package/CHANGELOG.md +14 -0
- package/CONTEXT.md +51 -44
- package/README.md +145 -172
- package/SECURITY.md +16 -26
- package/TELEMETRY.md +8 -6
- package/dist/actors/affordance.d.ts +4 -4
- package/dist/actors/affordance.js +12 -12
- package/dist/actors/agent-session.d.ts +2 -2
- package/dist/actors/agent-session.js +7 -7
- package/dist/actors/codex/app-server-actor-trace.d.ts +1 -1
- package/dist/actors/codex/app-server-actor-trace.js +1 -1
- package/dist/actors/codex/app-server-ui.js +1 -1
- package/dist/actors/codex/codex-admission.d.ts +91 -0
- package/dist/actors/codex/codex-admission.js +150 -0
- package/dist/actors/codex/restricted-executable.d.ts +4 -4
- package/dist/actors/codex/restricted-executable.js +8 -8
- package/dist/actors/codex/restricted-launch.d.ts +2 -1
- package/dist/actors/codex/restricted-launch.js +1 -1
- package/dist/actors/codex/restricted-participant.js +8 -6
- package/dist/actors/codex/restricted-policy.d.ts +2 -2
- package/dist/actors/codex/restricted-policy.js +2 -2
- package/dist/actors/codex/restricted-session.d.ts +2 -2
- package/dist/actors/codex/restricted-session.js +10 -5
- package/dist/actors/computer-use/actor.d.ts +16 -16
- package/dist/actors/computer-use/actor.js +2 -2
- package/dist/actors/computer-use/admission-limit.d.ts +1 -1
- package/dist/actors/computer-use/admission-limit.js +1 -1
- package/dist/actors/computer-use/loop/actions.d.ts +3 -3
- package/dist/actors/computer-use/loop/actions.js +10 -10
- package/dist/actors/computer-use/loop/backstop.d.ts +3 -3
- package/dist/actors/computer-use/loop/backstop.js +14 -12
- package/dist/actors/computer-use/loop/ending.d.ts +5 -5
- package/dist/actors/computer-use/loop/ending.js +7 -7
- package/dist/actors/computer-use/loop/observation.d.ts +2 -2
- package/dist/actors/computer-use/loop/observation.js +9 -9
- package/dist/actors/computer-use/loop/provider-call.d.ts +1 -1
- package/dist/actors/computer-use/loop/provider-call.js +1 -1
- package/dist/actors/computer-use/loop/session.js +3 -3
- package/dist/actors/computer-use/loop/spend.d.ts +1 -1
- package/dist/actors/computer-use/loop/spend.js +1 -1
- package/dist/actors/computer-use/loop/trace.js +9 -8
- package/dist/actors/computer-use/loop/types.d.ts +25 -23
- package/dist/actors/computer-use/loop/usage.js +2 -2
- package/dist/actors/computer-use/openai-context.d.ts +37 -0
- package/dist/actors/computer-use/openai-context.js +214 -0
- package/dist/actors/computer-use/openai-provider.d.ts +11 -8
- package/dist/actors/computer-use/openai-provider.js +45 -34
- package/dist/actors/computer-use/openai-requests.d.ts +36 -10
- package/dist/actors/computer-use/openai-requests.js +82 -15
- package/dist/actors/computer-use/openai-wire.d.ts +19 -7
- package/dist/actors/computer-use/openai-wire.js +36 -34
- package/dist/actors/contract.d.ts +78 -43
- package/dist/actors/contract.js +29 -23
- package/dist/actors/local-agent/claude-session.d.ts +1 -1
- package/dist/actors/local-agent/claude-session.js +10 -9
- package/dist/actors/local-agent/cli.d.ts +8 -6
- package/dist/actors/local-agent/cli.js +24 -28
- package/dist/actors/local-agent/readiness.d.ts +2 -2
- package/dist/actors/local-agent/readiness.js +4 -4
- package/dist/actors/reasoning-effort.js +6 -6
- package/dist/actors/registry.d.ts +10 -10
- package/dist/actors/registry.js +18 -17
- package/dist/actors/scripted-browser/actor.d.ts +8 -8
- package/dist/actors/scripted-browser/actor.js +16 -16
- package/dist/actors/scripted-browser/browser-command.js +1 -1
- package/dist/actors/scripted-browser/steps.js +1 -1
- package/dist/actors/scripted-browser/types.d.ts +1 -1
- package/dist/actors/stop-conditions.d.ts +1 -1
- package/dist/analysis/codex-config.d.ts +6 -2
- package/dist/analysis/codex-config.js +22 -14
- package/dist/analysis/service.js +5 -5
- package/dist/cli/commands/analyze.js +19 -16
- package/dist/cli/commands/codex.js +9 -9
- package/dist/cli/commands/comms.js +54 -33
- package/dist/cli/commands/feedback.js +20 -21
- package/dist/cli/commands/lab-format.d.ts +5 -4
- package/dist/cli/commands/lab-format.js +35 -23
- package/dist/cli/commands/lab-route-computer-use.js +6 -7
- package/dist/cli/commands/lab-route-preview.js +4 -3
- package/dist/cli/commands/lab-route-shared-world.js +3 -3
- package/dist/cli/commands/lab-run.js +10 -11
- package/dist/cli/commands/lab-scorer.d.ts +2 -2
- package/dist/cli/commands/lab-scorer.js +1 -1
- package/dist/cli/commands/migrate.d.ts +4 -0
- package/dist/cli/commands/migrate.js +65 -0
- package/dist/cli/commands/observe.js +147 -108
- package/dist/cli/commands/run-command.d.ts +10 -0
- package/dist/cli/commands/run-command.js +85 -0
- package/dist/cli/commands/runs.js +137 -138
- package/dist/cli/commands/setup.d.ts +2 -2
- package/dist/cli/commands/setup.js +26 -21
- package/dist/cli/commands/study.d.ts +3 -0
- package/dist/cli/commands/study.js +182 -0
- package/dist/cli/commands/tui.d.ts +4 -4
- package/dist/cli/commands/tui.js +21 -21
- package/dist/cli/commands/watch.js +60 -75
- package/dist/cli/deprecations.d.ts +18 -0
- package/dist/cli/deprecations.js +48 -0
- package/dist/cli/doctor.d.ts +15 -5
- package/dist/cli/doctor.js +103 -48
- package/dist/cli/first-run-path.d.ts +12 -10
- package/dist/cli/first-run-path.js +30 -28
- package/dist/cli/io.d.ts +41 -6
- package/dist/cli/io.js +97 -22
- package/dist/cli/observer-follow.d.ts +2 -2
- package/dist/cli/observer-follow.js +5 -6
- package/dist/cli/orientation.d.ts +6 -3
- package/dist/cli/orientation.js +43 -39
- package/dist/cli/product-sentence.d.ts +6 -0
- package/dist/cli/product-sentence.js +6 -0
- package/dist/cli/program.d.ts +6 -1
- package/dist/cli/program.js +109 -40
- package/dist/cli/telemetry.d.ts +15 -15
- package/dist/cli/telemetry.js +48 -40
- package/dist/cli.js +1 -1
- package/dist/comms/capture-surface.d.ts +13 -12
- package/dist/comms/capture-surface.js +23 -22
- package/dist/comms/catch-host.d.ts +7 -7
- package/dist/comms/catch-host.js +14 -14
- package/dist/comms/email-catch.d.ts +3 -3
- package/dist/comms/email-catch.js +8 -8
- package/dist/comms/external-evidence.js +2 -2
- package/dist/comms/extract.js +2 -2
- package/dist/comms/fake-inbox.d.ts +2 -2
- package/dist/comms/fake-inbox.js +2 -2
- package/dist/comms/receiving-render.d.ts +1 -1
- package/dist/comms/receiving-render.js +2 -2
- package/dist/comms/sandbox-catch-script.d.ts +6 -6
- package/dist/comms/sandbox-catch-script.js +6 -6
- package/dist/comms/sandbox-catch.d.ts +36 -37
- package/dist/comms/sandbox-catch.js +34 -35
- package/dist/comms/setup.js +42 -8
- package/dist/comms/thread-evidence.d.ts +1 -1
- package/dist/comms/thread-evidence.js +6 -6
- package/dist/comms/types.d.ts +6 -6
- package/dist/comms/types.js +3 -3
- package/dist/evidence/frame-signature.d.ts +1 -1
- package/dist/evidence/frame-signature.js +4 -4
- package/dist/evidence/redaction.d.ts +3 -3
- package/dist/evidence/redaction.js +4 -4
- package/dist/feedback/draft.js +36 -78
- package/dist/feedback/export-bundle.js +1 -1
- package/dist/feedback/export.d.ts +5 -1
- package/dist/feedback/export.js +7 -8
- package/dist/feedback/feedback.d.ts +2 -2
- package/dist/feedback/feedback.js +21 -3
- package/dist/guest/chromium-text.js +2 -2
- package/dist/guest/desktop-native.d.ts +1 -1
- package/dist/guest/runtime.js +1 -1
- package/dist/index.d.ts +12 -10
- package/dist/index.js +8 -6
- package/dist/keys/key-resolution.d.ts +5 -5
- package/dist/keys/key-resolution.js +23 -23
- package/dist/lab/adapter-extension.d.ts +7 -7
- package/dist/lab/adapter-extension.js +13 -36
- package/dist/lab/adapter-scorer-loader.d.ts +7 -7
- package/dist/lab/adapter-scorer-loader.js +32 -32
- package/dist/lab/composition-rules.js +42 -42
- package/dist/lab/config.js +65 -25
- package/dist/lab/deprecated-fields.d.ts +10 -0
- package/dist/lab/deprecated-fields.js +24 -0
- package/dist/lab/device-presets.d.ts +8 -8
- package/dist/lab/device-presets.js +11 -11
- package/dist/lab/discover.d.ts +13 -9
- package/dist/lab/discover.js +117 -57
- package/dist/lab/doctor.d.ts +10 -3
- package/dist/lab/doctor.js +47 -9
- package/dist/lab/init-templates.js +147 -147
- package/dist/lab/init.d.ts +1 -1
- package/dist/lab/init.js +41 -9
- package/dist/lab/keys.d.ts +2 -0
- package/dist/lab/keys.js +42 -8
- package/dist/lab/lab-deps.d.ts +7 -12
- package/dist/lab/parse/actors.js +9 -9
- package/dist/lab/parse/comms.js +5 -5
- package/dist/lab/parse/execution.js +13 -13
- package/dist/lab/parse/study-v3.d.ts +23 -0
- package/dist/lab/parse/study-v3.js +259 -0
- package/dist/lab/parse/subject-state.d.ts +7 -7
- package/dist/lab/parse/subject-state.js +16 -16
- package/dist/lab/parse/subject.js +28 -28
- package/dist/lab/parse/values.d.ts +1 -1
- package/dist/lab/parse/values.js +3 -3
- package/dist/lab/persona-resolve.d.ts +4 -4
- package/dist/lab/persona-resolve.js +4 -4
- package/dist/lab/plan-participants.d.ts +2 -2
- package/dist/lab/plan-types.d.ts +4 -4
- package/dist/lab/plan.d.ts +1 -7
- package/dist/lab/plan.js +10 -41
- package/dist/lab/preflight-probes.js +11 -11
- package/dist/lab/preflight-result.d.ts +2 -1
- package/dist/lab/preflight-result.js +5 -4
- package/dist/lab/preflight.d.ts +7 -5
- package/dist/lab/preflight.js +5 -5
- package/dist/lab/routing.d.ts +31 -25
- package/dist/lab/routing.js +60 -29
- package/dist/lab/run-lab-events.d.ts +0 -3
- package/dist/lab/run-lab-events.js +0 -6
- package/dist/lab/run-lab-homes.d.ts +22 -10
- package/dist/lab/run-lab-homes.js +5 -1
- package/dist/lab/run-lab-options.d.ts +1 -1
- package/dist/lab/run-lab-options.js +16 -13
- package/dist/lab/summary.d.ts +7 -6
- package/dist/lab/summary.js +10 -10
- package/dist/lab/tasks.d.ts +15 -15
- package/dist/lab/tasks.js +14 -14
- package/dist/lab/types.d.ts +101 -95
- package/dist/lab/types.js +2 -0
- package/dist/lab/validation.d.ts +13 -13
- package/dist/lab/validation.js +44 -42
- package/dist/lab/warnings.d.ts +10 -0
- package/dist/lab/warnings.js +61 -33
- package/dist/library-aliases.d.ts +56 -0
- package/dist/library-aliases.js +22 -0
- package/dist/observer/artifact.d.ts +1 -1
- package/dist/observer/artifact.js +6 -6
- package/dist/observer/data.d.ts +6 -6
- package/dist/observer/data.js +5 -4
- package/dist/observer/exposure.d.ts +1 -1
- package/dist/observer/exposure.js +11 -11
- package/dist/observer/http.js +1 -1
- package/dist/observer/library.d.ts +1 -1
- package/dist/observer/library.js +4 -2
- package/dist/observer/listen.js +5 -4
- package/dist/observer/render.d.ts +1 -1
- package/dist/observer/render.js +10 -5
- package/dist/observer/run-routes.d.ts +3 -3
- package/dist/observer/run-routes.js +1 -1
- package/dist/observer/serve.js +7 -3
- package/dist/observer/tunnel.js +1 -1
- package/dist/observer-app.html +4 -4
- package/dist/routes/computer-use/bundle-parts.d.ts +9 -9
- package/dist/routes/computer-use/bundle-parts.js +15 -15
- package/dist/routes/computer-use/bundle.js +3 -3
- package/dist/routes/computer-use/e2b-desktop/comms.d.ts +1 -1
- package/dist/routes/computer-use/e2b-desktop/comms.js +14 -14
- package/dist/routes/computer-use/e2b-desktop/desktop.js +4 -4
- package/dist/routes/computer-use/e2b-desktop/fidelity.d.ts +4 -3
- package/dist/routes/computer-use/e2b-desktop/fidelity.js +11 -10
- package/dist/routes/computer-use/e2b-desktop/prepare.js +7 -7
- package/dist/routes/computer-use/e2b-desktop/start.js +9 -8
- package/dist/routes/computer-use/e2b-desktop/teardown.js +5 -4
- package/dist/routes/computer-use/external-comms.d.ts +1 -1
- package/dist/routes/computer-use/external-comms.js +1 -1
- package/dist/routes/computer-use/fanout-bundle.js +18 -18
- package/dist/routes/computer-use/fanout-records.js +10 -11
- package/dist/routes/computer-use/live-flush.d.ts +1 -1
- package/dist/routes/computer-use/live-flush.js +6 -6
- package/dist/routes/computer-use/live-phase.d.ts +4 -2
- package/dist/routes/computer-use/live-phase.js +6 -6
- package/dist/routes/computer-use/local-vm.js +1 -1
- package/dist/routes/computer-use/participant-desktop.d.ts +4 -4
- package/dist/routes/computer-use/participant-desktop.js +4 -4
- package/dist/routes/computer-use/participant-execution.d.ts +4 -4
- package/dist/routes/computer-use/participant-execution.js +9 -9
- package/dist/routes/computer-use/participant-model.d.ts +6 -0
- package/dist/routes/computer-use/participant-model.js +31 -13
- package/dist/routes/computer-use/participant-prompt.d.ts +11 -11
- package/dist/routes/computer-use/participant-prompt.js +6 -6
- package/dist/routes/computer-use/participant-runs.d.ts +7 -7
- package/dist/routes/computer-use/participant-runs.js +13 -13
- package/dist/routes/computer-use/plan.js +22 -22
- package/dist/routes/computer-use/preflight.js +21 -21
- package/dist/routes/computer-use/rerun-selection.js +1 -1
- package/dist/routes/computer-use/result.js +11 -11
- package/dist/routes/computer-use/route.d.ts +2 -1
- package/dist/routes/computer-use/route.js +15 -14
- package/dist/routes/computer-use/self-report.d.ts +7 -7
- package/dist/routes/computer-use/self-report.js +31 -31
- package/dist/routes/computer-use/setup.d.ts +1 -1
- package/dist/routes/computer-use/setup.js +17 -18
- package/dist/routes/computer-use/single-bundle.d.ts +7 -7
- package/dist/routes/computer-use/single-bundle.js +28 -30
- package/dist/routes/computer-use/subject-projection.d.ts +1 -1
- package/dist/routes/computer-use/subject-projection.js +6 -6
- package/dist/routes/computer-use/types.d.ts +40 -42
- package/dist/routes/computer-use/types.js +10 -10
- package/dist/routes/preview.d.ts +8 -2
- package/dist/routes/preview.js +8 -4
- package/dist/routes/scripted/bundle.d.ts +2 -2
- package/dist/routes/scripted/bundle.js +13 -12
- package/dist/routes/scripted/plan.d.ts +1 -1
- package/dist/routes/scripted/plan.js +9 -9
- package/dist/routes/scripted/result.js +5 -5
- package/dist/routes/scripted/route.js +5 -6
- package/dist/routes/scripted/scenario.js +2 -2
- package/dist/routes/scripted/setup.js +7 -7
- package/dist/routes/scripted/subject.js +1 -1
- package/dist/routes/scripted/surface-records.js +3 -3
- package/dist/routes/scripted/types.d.ts +3 -5
- package/dist/routes/scripted/types.js +1 -1
- package/dist/routes/shared-world/bundle-records.js +9 -8
- package/dist/routes/shared-world/bundle.d.ts +5 -5
- package/dist/routes/shared-world/bundle.js +40 -38
- package/dist/routes/shared-world/checkpoints.d.ts +1 -1
- package/dist/routes/shared-world/checkpoints.js +1 -1
- package/dist/routes/shared-world/comms.d.ts +5 -5
- package/dist/routes/shared-world/comms.js +14 -14
- package/dist/routes/shared-world/external-public.d.ts +4 -3
- package/dist/routes/shared-world/external-public.js +16 -12
- package/dist/routes/shared-world/handoff.d.ts +7 -6
- package/dist/routes/shared-world/handoff.js +65 -57
- package/dist/routes/shared-world/lobby-code.d.ts +2 -2
- package/dist/routes/shared-world/lobby-code.js +9 -9
- package/dist/routes/shared-world/participant-specs.d.ts +7 -6
- package/dist/routes/shared-world/participant-specs.js +31 -24
- package/dist/routes/shared-world/plan.js +7 -7
- package/dist/routes/shared-world/provenance.d.ts +2 -2
- package/dist/routes/shared-world/provenance.js +2 -2
- package/dist/routes/shared-world/provisioned.js +14 -13
- package/dist/routes/shared-world/result.js +20 -21
- package/dist/routes/shared-world/route.js +23 -22
- package/dist/routes/shared-world/setup.d.ts +3 -3
- package/dist/routes/shared-world/setup.js +4 -4
- package/dist/routes/shared-world/types.d.ts +30 -28
- package/dist/routes/shared-world/types.js +4 -4
- package/dist/routes/terminal/adapter.d.ts +3 -3
- package/dist/routes/terminal/adapter.js +5 -5
- package/dist/routes/terminal/bundle.d.ts +3 -3
- package/dist/routes/terminal/bundle.js +22 -21
- package/dist/routes/terminal/credentials.d.ts +4 -4
- package/dist/routes/terminal/credentials.js +7 -7
- package/dist/routes/terminal/dry-run.js +4 -4
- package/dist/routes/terminal/encoding.js +2 -2
- package/dist/routes/terminal/ledger.d.ts +3 -3
- package/dist/routes/terminal/ledger.js +14 -14
- package/dist/routes/terminal/live-finish.js +3 -3
- package/dist/routes/terminal/live-sandbox.js +12 -13
- package/dist/routes/terminal/persona.js +1 -1
- package/dist/routes/terminal/plan.js +11 -11
- package/dist/routes/terminal/recorder.js +2 -2
- package/dist/routes/terminal/result.js +8 -8
- package/dist/routes/terminal/route.js +6 -7
- package/dist/routes/terminal/sandbox.d.ts +1 -1
- package/dist/routes/terminal/sandbox.js +1 -1
- package/dist/routes/terminal/session.js +8 -7
- package/dist/routes/terminal/token-usage.d.ts +1 -1
- package/dist/routes/terminal/token-usage.js +7 -8
- package/dist/routes/terminal/trace.d.ts +2 -2
- package/dist/routes/terminal/trace.js +2 -2
- package/dist/routes/terminal/types.d.ts +26 -28
- package/dist/routes/terminal/types.js +3 -3
- package/dist/run/bundle-shape.js +3 -3
- package/dist/run/bundle.d.ts +46 -46
- package/dist/run/bundle.js +2 -1
- package/dist/run/cost-summary.js +3 -3
- package/dist/run/costs.js +7 -1
- package/dist/run/detail.d.ts +6 -6
- package/dist/run/detail.js +4 -4
- package/dist/run/dry-run-inputs.js +1 -1
- package/dist/run/dry-run.js +18 -18
- package/dist/run/judge.d.ts +19 -13
- package/dist/run/judge.js +18 -8
- package/dist/run/paths.d.ts +1 -1
- package/dist/run/paths.js +1 -1
- package/dist/run/pricing.d.ts +11 -6
- package/dist/run/pricing.js +20 -13
- package/dist/run/projection.d.ts +14 -14
- package/dist/run/projection.js +15 -15
- package/dist/run/reclaim.js +2 -2
- package/dist/run/results.d.ts +5 -5
- package/dist/run/run-index.d.ts +8 -6
- package/dist/run/run-index.js +15 -16
- package/dist/run/run-not-found.d.ts +5 -0
- package/dist/run/run-not-found.js +15 -0
- package/dist/run/run.d.ts +5 -4
- package/dist/run/run.js +1 -1
- package/dist/run/sandbox-receipts.d.ts +2 -2
- package/dist/run/sandbox-receipts.js +3 -3
- package/dist/run/shared-world-evidence.d.ts +36 -35
- package/dist/run/shared-world-evidence.js +4 -4
- package/dist/run/shared-world-shape.d.ts +1 -1
- package/dist/run/shared-world-shape.js +6 -6
- package/dist/run/stats.d.ts +12 -6
- package/dist/run/stats.js +116 -58
- package/dist/run/status.d.ts +8 -29
- package/dist/run/status.js +5 -27
- package/dist/run/stored-runs.js +2 -1
- package/dist/run/stream-shape.js +1 -1
- package/dist/run/streams.d.ts +6 -6
- package/dist/run/study-provenance.d.ts +47 -0
- package/dist/run/study-provenance.js +63 -0
- package/dist/run/study-result.d.ts +16 -0
- package/dist/run/study-result.js +9 -0
- package/dist/run/text.d.ts +2 -0
- package/dist/run/text.js +4 -0
- package/dist/run-lab.d.ts +7 -7
- package/dist/run-lab.js +1 -3
- package/dist/study/convert.d.ts +33 -0
- package/dist/study/convert.js +432 -0
- package/dist/study/field-paths.d.ts +12 -0
- package/dist/study/field-paths.js +126 -0
- package/dist/study/files.d.ts +26 -0
- package/dist/study/files.js +43 -0
- package/dist/study/migrate.d.ts +48 -0
- package/dist/study/migrate.js +408 -0
- package/dist/study/owned-files.d.ts +38 -0
- package/dist/study/owned-files.js +182 -0
- package/dist/subject/clone.d.ts +1 -1
- package/dist/subject/desktop-cli.d.ts +1 -1
- package/dist/subject/desktop-cli.js +2 -2
- package/dist/subject/local-tree-archive.js +1 -1
- package/dist/subject/local-tree.d.ts +1 -1
- package/dist/subject/node-bootstrap.js +1 -1
- package/dist/subject/runtime.js +8 -9
- package/dist/subject/serve.d.ts +1 -1
- package/dist/subject/serve.js +3 -3
- package/dist/subject/state.d.ts +1 -1
- package/dist/subject/steps.d.ts +5 -5
- package/dist/subject/steps.js +4 -4
- package/dist/substrates/command-failure.d.ts +3 -3
- package/dist/substrates/command-failure.js +3 -3
- package/dist/substrates/detached.d.ts +6 -6
- package/dist/substrates/detached.js +7 -7
- package/dist/substrates/e2b/cdp-probe.d.ts +9 -9
- package/dist/substrates/e2b/cdp-probe.js +14 -17
- package/dist/substrates/e2b/desktop-browser.d.ts +2 -2
- package/dist/substrates/e2b/desktop-browser.js +8 -8
- package/dist/substrates/e2b/desktop-cdp.d.ts +9 -9
- package/dist/substrates/e2b/desktop-cdp.js +8 -8
- package/dist/substrates/e2b/desktop-executor.d.ts +1 -1
- package/dist/substrates/e2b/desktop-executor.js +1 -1
- package/dist/substrates/e2b/desktop-geometry.d.ts +3 -3
- package/dist/substrates/e2b/desktop-geometry.js +7 -7
- package/dist/substrates/e2b/desktop-media.d.ts +1 -1
- package/dist/substrates/e2b/desktop-media.js +1 -1
- package/dist/substrates/e2b/desktop-screenshot-cleanup.d.ts +3 -3
- package/dist/substrates/e2b/desktop-screenshot-cleanup.js +3 -3
- package/dist/substrates/e2b/sandbox.d.ts +1 -1
- package/dist/substrates/e2b/sandbox.js +1 -1
- package/dist/substrates/e2b/sdk.d.ts +11 -11
- package/dist/substrates/e2b/sdk.js +6 -6
- package/dist/tui/actions.d.ts +1 -1
- package/dist/tui/actions.js +13 -13
- package/dist/tui/contract.d.ts +16 -16
- package/dist/tui/contract.js +10 -10
- package/dist/tui/launch.d.ts +4 -4
- package/dist/tui/launch.js +18 -19
- package/dist/tui/project.js +5 -5
- package/dist/tui-app.js +82 -82
- package/dist/verify/actor.d.ts +8 -8
- package/dist/verify/actor.js +36 -36
- package/dist/verify/artifacts.d.ts +2 -2
- package/dist/verify/artifacts.js +3 -3
- package/dist/verify/context-growth.d.ts +9 -0
- package/dist/verify/context-growth.js +62 -0
- package/dist/verify/costs.d.ts +6 -6
- package/dist/verify/costs.js +8 -8
- package/dist/verify/shared-world-concurrent.d.ts +2 -2
- package/dist/verify/shared-world-concurrent.js +79 -76
- package/dist/verify/shared-world.d.ts +2 -2
- package/dist/verify/shared-world.js +16 -16
- package/dist/verify/subject.d.ts +4 -4
- package/dist/verify/subject.js +18 -18
- package/dist/verify/verify.js +92 -43
- package/docs/README.md +25 -32
- package/docs/architecture/actor-contract.md +56 -87
- package/docs/architecture/desktop-sessions.md +7 -7
- package/docs/architecture/external-public-shared-world.md +61 -59
- package/docs/architecture/github-feedback-loop.md +1 -4
- package/docs/architecture/guest-desktop.md +2 -2
- package/docs/architecture/observer.md +34 -34
- package/docs/architecture/restricted-codex-analysis.md +34 -28
- package/docs/architecture/serve.md +34 -37
- package/docs/architecture/state-driven-executor.md +55 -58
- package/docs/architecture/task-protocol-support.md +5 -5
- package/docs/architecture/terminal-product-route.md +67 -107
- package/docs/contracts/README.md +24 -0
- package/docs/contracts/adapter-admission.md +3 -3
- package/docs/contracts/adapter-fixtures.md +2 -5
- package/docs/contracts/core.md +1 -3
- package/docs/contracts/errors.md +62 -0
- package/docs/contracts/feedback.md +8 -9
- package/docs/contracts/policy.md +7 -12
- package/docs/contracts/run-bundle.md +45 -44
- package/docs/contracts/schemas.md +421 -362
- package/docs/contracts/study-analysis.md +3 -3
- package/docs/contracts/study-costs.md +11 -7
- package/docs/decisions/0001-run-bundle-is-the-source-of-truth.md +1 -1
- package/docs/decisions/0002-observer-is-one-self-contained-file.md +2 -2
- package/docs/decisions/0003-contained-paths-and-cleanup-authority.md +3 -3
- package/docs/principles/actor-fidelity.md +4 -4
- package/docs/principles/engineering.md +3 -3
- package/docs/principles/invariants-and-defaults.md +38 -38
- package/docs/principles/self-driving-harness.md +1 -5
- package/docs/principles/three-roles.md +1 -1
- package/docs/product/automatic-analysis.md +7 -7
- package/examples/participant/README.md +5 -5
- package/examples/participant/run.mjs +11 -10
- package/examples/scorer/README.md +3 -3
- package/examples/scorer/run.mjs +11 -12
- package/package.json +16 -17
- package/skills/humanish/SKILL.md +60 -58
- package/skills/humanish/agents/openai.yaml +1 -1
- package/AGENTS.md +0 -99
- package/CONTRIBUTING.md +0 -148
- package/dist/actors/codex/qualified-versions.d.ts +0 -72
- package/dist/actors/codex/qualified-versions.js +0 -132
- package/dist/cli/commands/lab.d.ts +0 -3
- package/dist/cli/commands/lab.js +0 -199
- package/dist/cli/renamed-options.d.ts +0 -11
- package/dist/cli/renamed-options.js +0 -18
- package/dist/observer/static.d.ts +0 -39
- package/dist/observer/static.js +0 -369
- package/docs/architecture/comms-inbox.md +0 -122
- package/docs/architecture/desktop-recording.md +0 -80
- package/docs/architecture/local-browser-runtime.md +0 -178
- package/docs/architecture/observer-review.md +0 -144
- package/docs/architecture/participant-media.md +0 -90
- package/docs/architecture/project-layout.md +0 -62
- package/docs/architecture/real-email-receiving.md +0 -136
- package/docs/assets/humanish-drawdb-hero.png +0 -0
- package/docs/assets/humanish-observer-hero.png +0 -0
- package/docs/goals/current.md +0 -207
- package/docs/product/lobby-trivia-3player-external-public.md +0 -77
- package/docs/product/open-source-install-experience.md +0 -240
- package/docs/ramp/README.md +0 -295
- package/docs/release/open-source-readiness.md +0 -222
- package/docs/release/public-readiness-standard.md +0 -210
- package/docs/roadmap/world-class-open-source-v0.md +0 -311
|
@@ -2,7 +2,7 @@ import type { RunSubjectProvenance } from "../../run/bundle.js";
|
|
|
2
2
|
import type { LocalTreeArchive } from "../../subject/local-tree-archive.js";
|
|
3
3
|
/** Extract the in-sandbox port from the (loopback) serve.url so getHost can expose it. */
|
|
4
4
|
export declare function servePort(serveUrl: string): number;
|
|
5
|
-
/** A getHost URL must be tokenless (no userinfo and no query, so no authKey
|
|
5
|
+
/** A getHost URL must be tokenless (no userinfo and no query, so no authKey reaches evidence). */
|
|
6
6
|
export declare function isTokenlessHost(value: string): boolean;
|
|
7
7
|
/** sha256-16 of a URL's origin: the publish-safe host identity persisted in the bundle (the raw
|
|
8
8
|
* getHost URL embeds the live sandbox id + matches the e2b-URL redaction, so it never lands raw). */
|
|
@@ -11,7 +11,7 @@ export declare function hostOriginDigest(url: string): string;
|
|
|
11
11
|
* entry path kept). Never contains the raw getHost URL. */
|
|
12
12
|
export declare function publicSafeRouteLabel(entry: string | undefined): string;
|
|
13
13
|
/**
|
|
14
|
-
* Build the one subject sandbox's provenance
|
|
14
|
+
* Build the one subject sandbox's provenance: clone (repo + optional commit) or
|
|
15
15
|
* local-tree (archiveSha256 + optional commit/dirty from the once-per-run host-packed archive -
|
|
16
16
|
* archiveSha256 is the pin; there is only one archive, so no per-participant unanimity math applies,
|
|
17
17
|
* unlike the cua fan-out route). Used for both the in-progress and final bundle: the archive
|
|
@@ -8,7 +8,7 @@ export function servePort(serveUrl) {
|
|
|
8
8
|
return Number(url.port);
|
|
9
9
|
return url.protocol === "https:" ? 443 : 80;
|
|
10
10
|
}
|
|
11
|
-
/** A getHost URL must be tokenless (no userinfo and no query, so no authKey
|
|
11
|
+
/** A getHost URL must be tokenless (no userinfo and no query, so no authKey reaches evidence). */
|
|
12
12
|
export function isTokenlessHost(value) {
|
|
13
13
|
try {
|
|
14
14
|
const url = new URL(value);
|
|
@@ -34,7 +34,7 @@ export function publicSafeRouteLabel(entry) {
|
|
|
34
34
|
return `[provisioned-subject]${entry ?? "/"}`;
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
|
-
* Build the one subject sandbox's provenance
|
|
37
|
+
* Build the one subject sandbox's provenance: clone (repo + optional commit) or
|
|
38
38
|
* local-tree (archiveSha256 + optional commit/dirty from the once-per-run host-packed archive -
|
|
39
39
|
* archiveSha256 is the pin; there is only one archive, so no per-participant unanimity math applies,
|
|
40
40
|
* unlike the cua fan-out route). Used for both the in-progress and final bundle: the archive
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// The provisioned-getHost plane: the harness provisions one subject sandbox (clone or local-tree,
|
|
2
2
|
// install/build, seed, serve on 0.0.0.0), exposes it through getHost, probes its state on a
|
|
3
|
-
// cadence, and runs every
|
|
4
|
-
// id in the plane's finally, never through Sandbox.list.
|
|
3
|
+
// cadence, and runs every participant against that one shared plane. All sandboxes are torn down by
|
|
4
|
+
// exact id in the plane's finally, never through Sandbox.list.
|
|
5
5
|
import { buildOriginMap } from "../../comms/capture-surface.js";
|
|
6
6
|
import { deployCommsCatch, refreshInboxSurface, writeInboxSurface, } from "../../comms/sandbox-catch.js";
|
|
7
7
|
import { redactText, toErrorMessage } from "../../evidence/redaction.js";
|
|
@@ -59,7 +59,7 @@ class SubjectPlane {
|
|
|
59
59
|
subjectAllocation;
|
|
60
60
|
subjectDesktop;
|
|
61
61
|
subjectShell;
|
|
62
|
-
// The in-sandbox email catch on the one subject sandbox
|
|
62
|
+
// The in-sandbox email catch on the one subject sandbox; drained at teardown. Undefined
|
|
63
63
|
// unless a comms lab declared it.
|
|
64
64
|
deployedComms;
|
|
65
65
|
// Background prober dispose signal, cleared in teardown.
|
|
@@ -68,7 +68,7 @@ class SubjectPlane {
|
|
|
68
68
|
disposeSignal;
|
|
69
69
|
proberLoop;
|
|
70
70
|
snapshotIndex = 0;
|
|
71
|
-
// Persona inbox surface
|
|
71
|
+
// Persona inbox surface: the serve->getHost origin-rewrite map
|
|
72
72
|
// (required here so the app's loopback verify links resolve to a reachable host), and the
|
|
73
73
|
// dedicated surface render loop.
|
|
74
74
|
commsOriginMap = [];
|
|
@@ -103,8 +103,8 @@ class SubjectPlane {
|
|
|
103
103
|
const { plan, deps, env, requestTimeoutMs, timeoutMs } = this.ctx;
|
|
104
104
|
const { subjectEnvNames, commsEnv } = this.setup;
|
|
105
105
|
const subjectModule = await (deps.desktopModule ?? loadE2BDesktopModule)();
|
|
106
|
-
// The one subject sandbox: headless service host (no GUI
|
|
107
|
-
// here; the actor sandboxes get none of it. A custom desktop template (image) is
|
|
106
|
+
// The one subject sandbox: headless service host (no GUI participant). The subject env is
|
|
107
|
+
// provisioned here; the actor sandboxes get none of it. A custom desktop template (image) is
|
|
108
108
|
// honored on both the subject sandbox (here) and every actor sandbox (via runCuaParticipant, which
|
|
109
109
|
// reads the same config); absent keeps the byte-stable Sandbox.create(opts) default. The
|
|
110
110
|
// receipt is on disk before any work, so `humanish reclaim` can kill it by exact id.
|
|
@@ -122,8 +122,8 @@ class SubjectPlane {
|
|
|
122
122
|
labId: plan.labId,
|
|
123
123
|
topology: "shared-world",
|
|
124
124
|
topologyMode: "concurrent",
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
kind: "subject",
|
|
126
|
+
participantCount: String(plan.plane.participants.length),
|
|
127
127
|
},
|
|
128
128
|
...(subjectEnvNames.length > 0 || Object.keys(commsEnv).length > 0
|
|
129
129
|
? {
|
|
@@ -228,7 +228,7 @@ class SubjectPlane {
|
|
|
228
228
|
}
|
|
229
229
|
this.getHostUrl = hostUrl;
|
|
230
230
|
}
|
|
231
|
-
// Persona inbox surface
|
|
231
|
+
// Persona inbox surface: getHost-expose the read-only inbox listener so
|
|
232
232
|
// a persona in another sandbox can open it; build the serve->getHost origin map (required here:
|
|
233
233
|
// the app's loopback verify links must be rewritten to a reachable host); provision the surface
|
|
234
234
|
// channel; write the empty inbox up front (so /inbox never 404s); and start a render loop that drains
|
|
@@ -263,7 +263,7 @@ class SubjectPlane {
|
|
|
263
263
|
const surfaceCadenceMs = 2500;
|
|
264
264
|
this.surfaceLoop = (async () => {
|
|
265
265
|
// Full, idempotent rebuild each tick; surfaceRenderedCount advances only on a successful render,
|
|
266
|
-
// so a transient failure retries cleanly. Real timer (dispose-interruptible + cleared)
|
|
266
|
+
// so a transient failure retries cleanly. Real timer (dispose-interruptible + cleared): an
|
|
267
267
|
// unbounded loop must not busy-spin on the injected instant clock.
|
|
268
268
|
for (;;) {
|
|
269
269
|
try {
|
|
@@ -327,7 +327,7 @@ class SubjectPlane {
|
|
|
327
327
|
await this.proberLoop.catch(() => undefined);
|
|
328
328
|
}
|
|
329
329
|
// Stop the inbox-surface render loop too (shares the prober's dispose signal), before the teardown
|
|
330
|
-
// evidence drain below
|
|
330
|
+
// evidence drain below, so the two in-sandbox reads never overlap and the surface state is final.
|
|
331
331
|
if (this.surfaceLoop) {
|
|
332
332
|
await this.surfaceLoop.catch(() => undefined);
|
|
333
333
|
}
|
|
@@ -370,7 +370,8 @@ class SubjectPlane {
|
|
|
370
370
|
};
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
|
-
/** Writes the in-progress bundle, runs the caller's Observer gate and starts the
|
|
373
|
+
/** Writes the in-progress bundle, runs the caller's Observer gate and starts the participants'
|
|
374
|
+
* flush. */
|
|
374
375
|
async function publishInProgress(plane, ctx, live, setup) {
|
|
375
376
|
const { plan, input } = ctx;
|
|
376
377
|
const { localTreeRoute, localTreeArchive } = setup;
|
|
@@ -435,7 +436,7 @@ function runParticipants(plane, ctx, live, setup) {
|
|
|
435
436
|
// Tell this persona its (getHost-reachable) inbox URL, but only when comms is live and this participant
|
|
436
437
|
// has a declared recipient it can actually receive mail into (else it would stall on an empty
|
|
437
438
|
// inbox). Only the in-sandbox catch exists on this plane; the adopter-hosted catch is the
|
|
438
|
-
// external-public plane's
|
|
439
|
+
// external-public plane's.
|
|
439
440
|
const actorSpec = commsEmail && plane.commsInboxUrl && participantHasInboxRecipient(commsEmail, spec.planned.id)
|
|
440
441
|
? withInboxMission(spec, plane.commsInboxUrl, inboxRecipientFor(commsEmail, spec.planned.id)?.address)
|
|
441
442
|
: spec;
|
|
@@ -9,7 +9,8 @@ import { resolveSubjectState } from "../computer-use/subject-projection.js";
|
|
|
9
9
|
import { actorRunPassed, buildConcurrentSharedWorldBundle, judgeSharedWorldRun, maxSimultaneousWindows, } from "./bundle.js";
|
|
10
10
|
import { planeStateOf } from "./plan.js";
|
|
11
11
|
import { buildSubjectProvenance, hostOriginDigest } from "./provenance.js";
|
|
12
|
-
import {
|
|
12
|
+
import {} from "./types.js";
|
|
13
|
+
import { studyResultIdentity } from "../../run/study-result.js";
|
|
13
14
|
/** The results of a run whose plane did not run (a dry run) or has not reported yet. */
|
|
14
15
|
export function emptyPlaneResults() {
|
|
15
16
|
return {
|
|
@@ -65,7 +66,7 @@ function concurrentParticipantResults(actorSpecs, actorResults, dryRun) {
|
|
|
65
66
|
? {}
|
|
66
67
|
: {
|
|
67
68
|
error: {
|
|
68
|
-
code: "
|
|
69
|
+
code: "HUMANISH_SHARED_WORLD_FAILED",
|
|
69
70
|
message: result.outcome.sessionError ??
|
|
70
71
|
(result.outcome.noEngagement
|
|
71
72
|
? "Actor took no actions and produced no message (likely a blank/still-loading screen); not a credible goal_satisfied."
|
|
@@ -88,16 +89,16 @@ function concurrentLabError(args) {
|
|
|
88
89
|
if (handoffTimedOut) {
|
|
89
90
|
// Checked before the observer failure: the host never yielded a /lobby/CODE within the
|
|
90
91
|
// deadline (followers failed closed without opening), which is the root cause, and it can
|
|
91
|
-
// itself make the Observer unable to render a coherent run. Report the distinct
|
|
92
|
+
// itself make the Observer unable to render a coherent run. Report the distinct
|
|
92
93
|
// handoff-timeout code rather than a generic observer/run failure.
|
|
93
94
|
return {
|
|
94
|
-
code: "
|
|
95
|
+
code: "HUMANISH_SHARED_WORLD_HANDOFF_TIMEOUT",
|
|
95
96
|
message: runError ??
|
|
96
97
|
"The host participant never produced a /lobby/CODE URL within the handoff deadline.",
|
|
97
98
|
};
|
|
98
99
|
}
|
|
99
100
|
if (hostHandoffFailure !== undefined) {
|
|
100
|
-
return { code: "
|
|
101
|
+
return { code: "HUMANISH_SHARED_WORLD_FAILED", message: hostHandoffFailure };
|
|
101
102
|
}
|
|
102
103
|
// The run's own failure before the Observer's: a run that stopped early (a desktop module that
|
|
103
104
|
// failed to load, a plane that failed to start) leaves a bundle verify then refuses, and naming
|
|
@@ -105,34 +106,34 @@ function concurrentLabError(args) {
|
|
|
105
106
|
// evidence).
|
|
106
107
|
if (runError) {
|
|
107
108
|
return {
|
|
108
|
-
code: "
|
|
109
|
+
code: "HUMANISH_SHARED_WORLD_FAILED",
|
|
109
110
|
message: observer.ok ? runError : `${runError} The run bundle it left failed verification.`,
|
|
110
111
|
};
|
|
111
112
|
}
|
|
112
113
|
if (!observer.ok) {
|
|
113
114
|
return {
|
|
114
|
-
code: "
|
|
115
|
+
code: "HUMANISH_SHARED_WORLD_FAILED",
|
|
115
116
|
message: observer.error?.message ?? "Observer failed for the concurrent shared-world run.",
|
|
116
117
|
};
|
|
117
118
|
}
|
|
118
119
|
if (adapterFailure !== undefined) {
|
|
119
|
-
return { code: "
|
|
120
|
+
return { code: "HUMANISH_SHARED_WORLD_FAILED", message: adapterFailure };
|
|
120
121
|
}
|
|
121
122
|
const passed = participantResults.filter((result) => result.ok).length;
|
|
122
123
|
if (passed === participantCount && args.shortfall !== undefined) {
|
|
123
124
|
return {
|
|
124
|
-
code: "
|
|
125
|
+
code: "HUMANISH_SHARED_WORLD_FAILED",
|
|
125
126
|
message: `Concurrent shared-world run did not run coherently. ${args.shortfall}`,
|
|
126
127
|
};
|
|
127
128
|
}
|
|
128
129
|
if (passed === participantCount && args.executionFailure !== undefined) {
|
|
129
130
|
return {
|
|
130
|
-
code: "
|
|
131
|
+
code: "HUMANISH_SHARED_WORLD_FAILED",
|
|
131
132
|
message: `Concurrent shared-world run failed as an execution. ${args.executionFailure}`,
|
|
132
133
|
};
|
|
133
134
|
}
|
|
134
135
|
return {
|
|
135
|
-
code: "
|
|
136
|
+
code: "HUMANISH_SHARED_WORLD_FAILED",
|
|
136
137
|
message: `Concurrent shared-world run did not run coherently: ${passed}/${participantCount} actor(s) reached a terminal, engaged passed session.`,
|
|
137
138
|
};
|
|
138
139
|
}
|
|
@@ -142,10 +143,9 @@ function concurrentLabError(args) {
|
|
|
142
143
|
*/
|
|
143
144
|
export function concurrentLabFailure(envelope) {
|
|
144
145
|
return (code, message, actorLabel) => ({
|
|
145
|
-
|
|
146
|
+
...studyResultIdentity("shared-world", envelope.labId),
|
|
146
147
|
ok: false,
|
|
147
148
|
cwd: envelope.cwd,
|
|
148
|
-
labId: envelope.labId,
|
|
149
149
|
actor: actorLabel ?? envelope.actor,
|
|
150
150
|
topology: "shared-world",
|
|
151
151
|
topologyMode: "concurrent",
|
|
@@ -159,10 +159,10 @@ export function concurrentLabFailure(envelope) {
|
|
|
159
159
|
});
|
|
160
160
|
}
|
|
161
161
|
/**
|
|
162
|
-
* The run's execution failures: a run error (the handoff, the plane), each
|
|
163
|
-
* failed in the harness, each provider whose cleanup is unconfirmed or that reported a
|
|
164
|
-
* item after its last request, each sandbox whose release is unconfirmed, and an
|
|
165
|
-
* failed.
|
|
162
|
+
* The run's execution failures: a run error (the handoff, the plane), each participant whose
|
|
163
|
+
* session failed in the harness, each provider whose cleanup is unconfirmed or that reported a
|
|
164
|
+
* disallowed item after its last request, each sandbox whose release is unconfirmed, and an
|
|
165
|
+
* Observer that failed.
|
|
166
166
|
*/
|
|
167
167
|
function sharedWorldExecutionFailures(args) {
|
|
168
168
|
const { runId, runError, actorResults, subject, observer } = args;
|
|
@@ -288,8 +288,8 @@ export async function finishConcurrentRun(ctx, live, results, plane) {
|
|
|
288
288
|
if (observer.ok && live.observer) {
|
|
289
289
|
attachObserverRuntimeStreamUrls(observer, live.streamUrls);
|
|
290
290
|
}
|
|
291
|
-
// Concurrent "ok": every actor must produce a terminal, engaged, passed session, and the
|
|
292
|
-
// must show the concurrency verify requires of a pass (judgeSharedWorld). This is a
|
|
291
|
+
// Concurrent "ok": every actor must produce a terminal, engaged, passed session, and the
|
|
292
|
+
// participants must show the concurrency verify requires of a pass (judgeSharedWorld). This is a
|
|
293
293
|
// harness/session-credibility gate, not mission-completion proof; a failed actor trace cannot
|
|
294
294
|
// make the route green just because the harness got a terminal.
|
|
295
295
|
const adapterFailure = adapterScoreFailureMessage(bundle);
|
|
@@ -311,10 +311,9 @@ export async function finishConcurrentRun(ctx, live, results, plane) {
|
|
|
311
311
|
executionFailure: execution.failures[0]?.message,
|
|
312
312
|
});
|
|
313
313
|
const result = {
|
|
314
|
-
|
|
314
|
+
...studyResultIdentity("shared-world", plan.labId),
|
|
315
315
|
ok,
|
|
316
316
|
cwd,
|
|
317
|
-
labId: plan.labId,
|
|
318
317
|
actor: descriptor.id,
|
|
319
318
|
topology: "shared-world",
|
|
320
319
|
topologyMode: "concurrent",
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
// The concurrent shared-world lab
|
|
1
|
+
// The concurrent shared-world lab route: N persona participants drive one shared,
|
|
2
2
|
// mutable service plane at the same time. A recomposition of shipped
|
|
3
3
|
// pieces + the getHost wrapper:
|
|
4
4
|
//
|
|
5
5
|
// - One subject sandbox: provisionCloneSubject once (clone+install+build+seed) + serve on
|
|
6
6
|
// 0.0.0.0, exposed via getHost(port) → a tokenless reachable URL (the headless service host;
|
|
7
|
-
// no GUI
|
|
7
|
+
// no GUI participant).
|
|
8
8
|
// - N actor desktop sandboxes: fan-out's runCuaParticipant machinery (per-participant device/persona, by-id
|
|
9
|
-
// teardown) bounded by execution.concurrency, each browser pointed at the getHost URL
|
|
9
|
+
// teardown) bounded by execution.concurrency, each browser pointed at the getHost URL and
|
|
10
10
|
// driving the shared service at the same time. Independent: no pipeline gate, no
|
|
11
|
-
// fail-fast
|
|
11
|
+
// fail-fast: one actor's failure must not block the swarm or corrupt the "M of N" outcomes.
|
|
12
12
|
// - A background prober snapshots the subject DB checkpoint digests on a cadence → a stateSeries
|
|
13
13
|
// of the shared world evolving under load.
|
|
14
14
|
// - All N+1 sandboxes torn down by exact id in a finally, never through Sandbox.list.
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
// `best-effort-causal-attribution`, `non-deterministic-shared-state`,
|
|
21
21
|
// `window-and-snapshot-granularity`, `contention-observed-not-proven-safe`,
|
|
22
22
|
// `state-change-not-isolated-to-actors`. laneWindows + stateSeries are independent series with no
|
|
23
|
-
// per-delta→actor field
|
|
23
|
+
// per-delta→actor field, so causation under concurrency is structurally inexpressible.
|
|
24
24
|
//
|
|
25
|
-
// Capability and proof: the deterministic $0 gate proves the plumbing + the
|
|
26
|
-
// contract
|
|
25
|
+
// Capability and proof: the deterministic $0 gate proves the plumbing + the claims-match-mechanism
|
|
26
|
+
// contract: the real mapWithConcurrency produces genuinely overlapping laneWindows (a rendezvous
|
|
27
27
|
// latch in the fake session forces two participant fns in-flight while the real orchestrator clock
|
|
28
28
|
// measures the windows). Every generated bundle describes only its own observations; no one run
|
|
29
29
|
// establishes scale, repeatability, or adopter-harness replacement.
|
|
@@ -53,10 +53,10 @@ import {} from "./types.js";
|
|
|
53
53
|
import { rosterOf } from "../../lab/parse/actors.js";
|
|
54
54
|
/** The shared-world code for each local-agent refusal, kind for kind with computer-use. */
|
|
55
55
|
const LOCAL_AGENT_REFUSAL_CODES = {
|
|
56
|
-
"agent-missing": "
|
|
57
|
-
"signin-required": "
|
|
58
|
-
unsupported: "
|
|
59
|
-
"unpriced-cap": "
|
|
56
|
+
"agent-missing": "HUMANISH_SHARED_WORLD_AGENT_MISSING",
|
|
57
|
+
"signin-required": "HUMANISH_SHARED_WORLD_AGENT_SIGNIN_REQUIRED",
|
|
58
|
+
unsupported: "HUMANISH_SHARED_WORLD_ACTOR_UNSUPPORTED",
|
|
59
|
+
"unpriced-cap": "HUMANISH_SHARED_WORLD_UNPRICED_CAP",
|
|
60
60
|
};
|
|
61
61
|
/**
|
|
62
62
|
* The library entry for a shared-world lab. It plans the config with planSharedWorldLab and runs
|
|
@@ -83,8 +83,8 @@ export function sharedWorldLabRefusal(options, refusal) {
|
|
|
83
83
|
labId: config.id,
|
|
84
84
|
actor: config.actors[0]?.type ?? "",
|
|
85
85
|
participantCount: declared.length,
|
|
86
|
-
// The parser fills concurrency for multi-
|
|
87
|
-
// callers: every declared
|
|
86
|
+
// The parser fills concurrency for multi-participant studies, so this fallback serves only
|
|
87
|
+
// library callers: every declared participant runs at once unless the author declared a cap.
|
|
88
88
|
concurrency: config.execution?.concurrency ?? Math.max(1, declared.length),
|
|
89
89
|
dryRun,
|
|
90
90
|
runId: options.runId,
|
|
@@ -125,14 +125,15 @@ async function admitSharedWorldRun(plan, input) {
|
|
|
125
125
|
return undefined;
|
|
126
126
|
const env = input.env ?? process.env;
|
|
127
127
|
const fail = (code, message) => completeSharedWorldAnalysis(plan, input, sharedWorldFailure(plan, input)(code, message, sharedWorldDescriptorOf(plan.actor).id), undefined);
|
|
128
|
-
// The plan lists OPENAI_API_KEY for an openai brain's
|
|
129
|
-
// lobby-code reader; a local-agent brain's
|
|
128
|
+
// The plan lists OPENAI_API_KEY for an openai brain's participants and the external-public
|
|
129
|
+
// plane's lobby-code reader; a local-agent brain's participants run on the operator's signed-in
|
|
130
|
+
// agent instead.
|
|
130
131
|
const missing = missingKeys(plan.requirements, env);
|
|
131
132
|
if (missing.length > 0) {
|
|
132
|
-
return fail("
|
|
133
|
+
return fail("HUMANISH_SHARED_WORLD_KEYS_MISSING", `Live concurrent shared-world labs need ${missing.join(" and ")} in the environment (values are never persisted). ${describeMissingKeys(missing, env)}`);
|
|
133
134
|
}
|
|
134
135
|
if (plan.brain.kind === "local-agent") {
|
|
135
|
-
// A missing or signed-out agent found after the
|
|
136
|
+
// A missing or signed-out agent found after the participants' desktops are paid for is the same
|
|
136
137
|
// news at the worst moment.
|
|
137
138
|
const refusal = await localAgentRefusal({ agent: plan.brain.agent, env, caps: plan.caps });
|
|
138
139
|
if (refusal)
|
|
@@ -140,7 +141,7 @@ async function admitSharedWorldRun(plan, input) {
|
|
|
140
141
|
}
|
|
141
142
|
const unsetSubjectEnv = missingSubjectEnv(plan.requirements, env);
|
|
142
143
|
if (unsetSubjectEnv.length > 0) {
|
|
143
|
-
return fail("
|
|
144
|
+
return fail("HUMANISH_SHARED_WORLD_SUBJECT_ENV_MISSING", `subject.env declares ${unsetSubjectEnv.join(", ")} but the environment does not provide ${unsetSubjectEnv.length === 1 ? "it" : "them"} (pass via --env-file; values are never persisted).`);
|
|
144
145
|
}
|
|
145
146
|
return undefined;
|
|
146
147
|
}
|
|
@@ -232,13 +233,13 @@ async function runPlanInScope(plan, input, config, scope) {
|
|
|
232
233
|
const { ctx, live, results } = prepared;
|
|
233
234
|
const planeRan = await runPlane(ctx, live, results, prepared.plane);
|
|
234
235
|
if (!planeRan) {
|
|
235
|
-
return fail("
|
|
236
|
+
return fail("HUMANISH_SHARED_WORLD_INVALID", "the provisioned-getHost concurrent shared-world route requires `subject.serve`.", descriptor.id);
|
|
236
237
|
}
|
|
237
238
|
return finishConcurrentRun(ctx, live, results, prepared.finish);
|
|
238
239
|
}
|
|
239
240
|
/**
|
|
240
|
-
* Runs the plane the
|
|
241
|
-
* every exit. Returns false when a provisioned
|
|
241
|
+
* Runs the plane the study declares, then finalizes email receiving and stops the participants'
|
|
242
|
+
* flush on every exit. Returns false when a provisioned study reaches it without `subject.serve`.
|
|
242
243
|
*/
|
|
243
244
|
async function runPlane(ctx, live, results, plane) {
|
|
244
245
|
const { dryRun } = ctx.plan;
|
|
@@ -266,7 +267,7 @@ async function runPlane(ctx, live, results, plane) {
|
|
|
266
267
|
catch {
|
|
267
268
|
ctx.warnings.push("Email finalization could not complete. Inspect humanish comms recover; provider cleanup remains unresolved.");
|
|
268
269
|
}
|
|
269
|
-
// Stop the
|
|
270
|
+
// Stop the participants' flush timer on every exit, before the final write.
|
|
270
271
|
await live.flush?.stop();
|
|
271
272
|
}
|
|
272
273
|
return true;
|
|
@@ -8,8 +8,8 @@ import type { SharedWorldPlan } from "../../lab/plan-types.js";
|
|
|
8
8
|
interface AdmittedLab {
|
|
9
9
|
plan: SharedWorldPlan;
|
|
10
10
|
input: SharedWorldRunInput;
|
|
11
|
-
/** Read for the subject's serve URL, which each
|
|
12
|
-
* their host and entry come from the plan's participants. */
|
|
11
|
+
/** Read for the subject's serve URL, which each participant's subject names. Participants, their
|
|
12
|
+
* count and their host and entry come from the plan's participants. */
|
|
13
13
|
config: LabConfig;
|
|
14
14
|
requestedCwd: string;
|
|
15
15
|
deps: LabDeps;
|
|
@@ -32,7 +32,7 @@ interface AdmittedLab {
|
|
|
32
32
|
fail: (code: ConcurrentSharedWorldLabErrorCode, message: string, actorLabel?: string) => ConcurrentSharedWorldLabResult;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
* Starts the run and prepares what the planes read: the physical project, the run, the
|
|
35
|
+
* Starts the run and prepares what the planes read: the physical project, the run, the participant
|
|
36
36
|
* specs, comms, the packed tree and email receiving. Returns the refusal when one of them fails.
|
|
37
37
|
*/
|
|
38
38
|
export declare function prepareConcurrentRun(lab: AdmittedLab, scope: RunScope): Promise<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Starts a concurrent shared-world run and prepares what its plane reads: the physical project,
|
|
2
|
-
// the run, the
|
|
2
|
+
// the run, the participant specs, comms, the packed tree and email receiving.
|
|
3
3
|
import { randomBytes } from "node:crypto";
|
|
4
4
|
import { realpath } from "node:fs/promises";
|
|
5
5
|
import { buildRunSource } from "../../run/bundle.js";
|
|
@@ -61,7 +61,7 @@ function startConcurrentRun(lab, cwd, scope) {
|
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
|
-
* Starts the run and prepares what the planes read: the physical project, the run, the
|
|
64
|
+
* Starts the run and prepares what the planes read: the physical project, the run, the participant
|
|
65
65
|
* specs, comms, the packed tree and email receiving. Returns the refusal when one of them fails.
|
|
66
66
|
*/
|
|
67
67
|
export async function prepareConcurrentRun(lab, scope) {
|
|
@@ -85,7 +85,7 @@ export async function prepareConcurrentRun(lab, scope) {
|
|
|
85
85
|
if (!packed.ok) {
|
|
86
86
|
return {
|
|
87
87
|
ok: false,
|
|
88
|
-
result: fail("
|
|
88
|
+
result: fail("HUMANISH_SHARED_WORLD_FAILED", packed.message, descriptor.id),
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
91
|
const localTreeArchive = packed.archive;
|
|
@@ -131,7 +131,7 @@ export async function prepareConcurrentRun(lab, scope) {
|
|
|
131
131
|
return {
|
|
132
132
|
ok: false,
|
|
133
133
|
result: {
|
|
134
|
-
...fail("
|
|
134
|
+
...fail("HUMANISH_SHARED_WORLD_INVALID", email.message, descriptor.id),
|
|
135
135
|
runId,
|
|
136
136
|
},
|
|
137
137
|
};
|
|
@@ -18,7 +18,7 @@ import type { LiveTraceFlush } from "../computer-use/live-flush.js";
|
|
|
18
18
|
import type { CuaParticipantDeps, DesktopParticipantRun, CuaRunBudget, ParticipantRunOutcome } from "../computer-use/types.js";
|
|
19
19
|
import type { ProvisionedPlaneSetup } from "./provisioned.js";
|
|
20
20
|
import type { SharedWorldPlan } from "../../lab/plan-types.js";
|
|
21
|
-
|
|
21
|
+
import { type StudyResultIdentity } from "../../run/study-result.js";
|
|
22
22
|
export declare const CONCURRENT_SHARED_WORLD_PROVIDER_METADATA: {
|
|
23
23
|
readonly mode: "concurrent-shared-world-lab";
|
|
24
24
|
readonly tool: "humanish";
|
|
@@ -40,7 +40,8 @@ export interface RunConcurrentSharedWorldLabOptions {
|
|
|
40
40
|
env?: Readonly<Record<string, string | undefined>>;
|
|
41
41
|
/**
|
|
42
42
|
* Runs after a sandbox exists and before anything is provisioned on it: the provisioned plane's
|
|
43
|
-
* subject sandbox, then each
|
|
43
|
+
* subject sandbox, then each participant's desktop. The external-public plane has participants
|
|
44
|
+
* only.
|
|
44
45
|
*/
|
|
45
46
|
prepareDesktop?: NonNullable<RunLabHomes["prepareDesktop"]>;
|
|
46
47
|
/** Awaited after a participant's live stream starts, and again after its sandbox is gone. */
|
|
@@ -51,26 +52,26 @@ export interface RunConcurrentSharedWorldLabOptions {
|
|
|
51
52
|
deps?: LabDeps;
|
|
52
53
|
/** Scores the assembled evidence: `RunLabOptions.scorer`, or the scorer the CLI loads. */
|
|
53
54
|
scorer?: BrowserScorer;
|
|
54
|
-
/** Present only when the scorer was
|
|
55
|
+
/** Present only when the scorer was config-declared and loaded by the CLI;
|
|
55
56
|
* core-stamped onto the bundle as evidence. Absent for library callers. */
|
|
56
57
|
scorerProvenance?: RunScorerProvenance;
|
|
57
58
|
}
|
|
58
59
|
/** What a shared-world run takes besides its plan. The plan carries the config, dry run and lab. */
|
|
59
60
|
export type SharedWorldRunInput = Omit<RunConcurrentSharedWorldLabOptions, "config" | "dryRun" | "lab">;
|
|
60
|
-
export type ConcurrentSharedWorldLabErrorCode = "
|
|
61
|
+
export type ConcurrentSharedWorldLabErrorCode = "HUMANISH_STUDY_ANALYSIS_INVALID" | "HUMANISH_STUDY_TASKS_UNSUPPORTED" | "HUMANISH_STUDY_OPTION_UNSUPPORTED" | "HUMANISH_SHARED_WORLD_FAILED" | "HUMANISH_SHARED_WORLD_ACTOR_UNSUPPORTED" | "HUMANISH_SHARED_WORLD_INVALID" | "HUMANISH_SHARED_WORLD_KEYS_MISSING"
|
|
61
62
|
/** A local-agent brain's CLI is not on `PATH`. */
|
|
62
|
-
| "
|
|
63
|
+
| "HUMANISH_SHARED_WORLD_AGENT_MISSING"
|
|
63
64
|
/** A local-agent brain's CLI is signed out, or could not report its sign-in status. */
|
|
64
|
-
| "
|
|
65
|
+
| "HUMANISH_SHARED_WORLD_AGENT_SIGNIN_REQUIRED"
|
|
65
66
|
/** A dollar cap that cannot be priced: an unpriced model, or a ChatGPT-account Codex brain. */
|
|
66
|
-
| "
|
|
67
|
-
/** A declared adopter-hosted comms catch
|
|
67
|
+
| "HUMANISH_SHARED_WORLD_UNPRICED_CAP" | "HUMANISH_SHARED_WORLD_SUBJECT_ENV_MISSING" | "HUMANISH_SHARED_WORLD_GETHOST_UNAVAILABLE" | "HUMANISH_SHARED_WORLD_HANDOFF_TIMEOUT" | "HUMANISH_RUN_ID_IN_USE"
|
|
68
|
+
/** A declared adopter-hosted comms catch did not answer as a humanish catch. Fail closed
|
|
68
69
|
* before any actor spend, since the funnel would silently collect nothing. */
|
|
69
|
-
| "
|
|
70
|
+
| "HUMANISH_SHARED_WORLD_COMMS_CATCH_UNREACHABLE"
|
|
70
71
|
/** comms.email.external.authTokenEnv names a token shorter than MIN_CATCH_TOKEN_LENGTH or not
|
|
71
72
|
* well-formed Unicode (src/comms/external-evidence.ts). Refused before the catch is probed. */
|
|
72
|
-
| "
|
|
73
|
-
/** The two plane classes of the concurrent shared-world route
|
|
73
|
+
| "HUMANISH_SHARED_WORLD_COMMS_TOKEN_INVALID";
|
|
74
|
+
/** The two plane classes of the concurrent shared-world route. */
|
|
74
75
|
export type ConcurrentSharedWorldPlaneClass = "provisioned-getHost" | "external-public";
|
|
75
76
|
export declare const EXTERNAL_PUBLIC_ATTRIBUTION_LIMITS: readonly ["concurrent", "best-effort-causal-attribution", "non-deterministic-shared-state", "window-and-snapshot-granularity", "contention-observed-not-proven-safe", "state-change-not-isolated-to-actors", "external-public-plane", "operator-attested-target-not-harness-controlled", "no-synthetic-attestation", "no-authoritative-shared-state-proof", "concurrency-by-temporal-co-occupancy-only"];
|
|
76
77
|
/** One persona's outcome against the contended world (the "M of N" headline). */
|
|
@@ -101,11 +102,9 @@ export interface ConcurrentSharedWorldParticipantResult {
|
|
|
101
102
|
message: string;
|
|
102
103
|
};
|
|
103
104
|
}
|
|
104
|
-
export interface ConcurrentSharedWorldLabResult extends AutomaticAnalysisResult {
|
|
105
|
-
schema: typeof CONCURRENT_SHARED_WORLD_LAB_SCHEMA;
|
|
105
|
+
export interface ConcurrentSharedWorldLabResult extends AutomaticAnalysisResult, StudyResultIdentity<"shared-world"> {
|
|
106
106
|
ok: boolean;
|
|
107
107
|
cwd: string;
|
|
108
|
-
labId: string;
|
|
109
108
|
actor: string;
|
|
110
109
|
topology: "shared-world";
|
|
111
110
|
topologyMode: "concurrent";
|
|
@@ -124,10 +123,10 @@ export interface ConcurrentSharedWorldLabResult extends AutomaticAnalysisResult
|
|
|
124
123
|
};
|
|
125
124
|
/** Whether ≥2 actor windows overlapped in time (proven concurrency; live only). */
|
|
126
125
|
overlapProven?: boolean;
|
|
127
|
-
/** Max participants observed live at the same instant (live only)
|
|
128
|
-
* 6-participant run capped at 3 reports 3 here, never 6
|
|
126
|
+
/** Max participants observed live at the same instant (live only): the simultaneity number; a
|
|
127
|
+
* 6-participant run capped at 3 reports 3 here, never 6. */
|
|
129
128
|
maxSimultaneousLanes?: number;
|
|
130
|
-
/** Subject provenance
|
|
129
|
+
/** Subject provenance: the one shared plane. */
|
|
131
130
|
subject?: RunSubjectProvenance;
|
|
132
131
|
roles: ConcurrentSharedWorldParticipantResult[];
|
|
133
132
|
observer?: ObserverResult;
|
|
@@ -158,8 +157,8 @@ type StartedRun = Extract<Awaited<ReturnType<RunScope["startRun"]>>, {
|
|
|
158
157
|
export interface PlaneContext {
|
|
159
158
|
plan: SharedWorldPlan;
|
|
160
159
|
input: SharedWorldRunInput;
|
|
161
|
-
/** Read for the subject's serve URL, which each
|
|
162
|
-
* their host and entry come from the plan's participants. */
|
|
160
|
+
/** Read for the subject's serve URL, which each participant's subject names. Participants, their
|
|
161
|
+
* count and their host and entry come from the plan's participants. */
|
|
163
162
|
config: LabConfig;
|
|
164
163
|
descriptor: CuaActorDescriptor;
|
|
165
164
|
/** The run's test seams; empty outside tests. */
|
|
@@ -171,7 +170,8 @@ export interface PlaneContext {
|
|
|
171
170
|
openaiApiKey: string;
|
|
172
171
|
e2bApiKey: string;
|
|
173
172
|
scrubKnownValues: (text: string) => string;
|
|
174
|
-
/** The values scrubKnownValues removes. Real email receiving adds its secrets before
|
|
173
|
+
/** The values scrubKnownValues removes. Real email receiving adds its secrets before participants
|
|
174
|
+
* start. */
|
|
175
175
|
knownSecretValues: readonly string[];
|
|
176
176
|
cwd: string;
|
|
177
177
|
run: StartedRun;
|
|
@@ -191,8 +191,9 @@ export interface PlaneContext {
|
|
|
191
191
|
warnings: string[];
|
|
192
192
|
}
|
|
193
193
|
/**
|
|
194
|
-
* What the
|
|
195
|
-
* flush; each
|
|
194
|
+
* What the participants feed while they run. A plane sets the attached Observer and starts the
|
|
195
|
+
* trace flush; each participant's onStream appends stream URLs; the orchestrator reads all three at
|
|
196
|
+
* finish.
|
|
196
197
|
*/
|
|
197
198
|
export interface LiveParticipants {
|
|
198
199
|
observer?: ObserverResult & {
|
|
@@ -201,7 +202,7 @@ export interface LiveParticipants {
|
|
|
201
202
|
flush?: LiveTraceFlush;
|
|
202
203
|
readonly streamUrls: ObserverRuntimeStreamUrl[];
|
|
203
204
|
}
|
|
204
|
-
/** An adopter-hosted comms catch
|
|
205
|
+
/** An adopter-hosted comms catch and the inbox its personas open. */
|
|
205
206
|
export interface ExternalCommsWiring {
|
|
206
207
|
external: LabCommsExternal;
|
|
207
208
|
email: LabCommsEmail;
|
|
@@ -229,15 +230,16 @@ export interface ConcurrentBundleArgs {
|
|
|
229
230
|
* captured mail into the subject sandbox's catch. Registered on the first persona stream (it is a
|
|
230
231
|
* property of the one shared app, and belongs to no single persona). */
|
|
231
232
|
commsArtifactPath?: string;
|
|
232
|
-
/**
|
|
233
|
+
/** The plane-class discriminator (default provisioned-getHost, byte-stable). */
|
|
233
234
|
planeClass?: ConcurrentSharedWorldPlaneClass;
|
|
234
|
-
/** external-public only: sha256-16 of the observed origin the
|
|
235
|
-
* proof
|
|
235
|
+
/** external-public only: sha256-16 of the observed origin the participants converged on (the
|
|
236
|
+
* convergence proof: what the participants actually reached, tolerant of a declared->observed
|
|
237
|
+
* redirect). */
|
|
236
238
|
publicOriginDigest?: string;
|
|
237
|
-
/** external-public only: sha256-16 of the operator-
|
|
239
|
+
/** external-public only: sha256-16 of the operator-declared plane origin (evidence/reference only;
|
|
238
240
|
* never asserted equal to the observed origin, since a cross-origin redirect is normal). */
|
|
239
241
|
declaredOriginDigest?: string;
|
|
240
|
-
/** external-public only: sha256-16 of the
|
|
242
|
+
/** external-public only: sha256-16 of the /lobby/CODE path all participants converged on. */
|
|
241
243
|
lobbyConvergenceDigest?: string;
|
|
242
244
|
runError?: string;
|
|
243
245
|
/** The provisioned plane's own desktop; absent on external-public planes and dry runs. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// The concurrent shared-world route's schema constants, attribution limits, options and result
|
|
2
|
-
// types, and the per-
|
|
3
|
-
|
|
2
|
+
// types, and the per-participant result the planes collect.
|
|
3
|
+
import {} from "../../run/study-result.js";
|
|
4
4
|
export const CONCURRENT_SHARED_WORLD_PROVIDER_METADATA = {
|
|
5
5
|
mode: "concurrent-shared-world-lab",
|
|
6
6
|
tool: "humanish",
|
|
@@ -15,8 +15,8 @@ export const CONCURRENT_ATTRIBUTION_LIMITS = [
|
|
|
15
15
|
"contention-observed-not-proven-safe",
|
|
16
16
|
"state-change-not-isolated-to-actors",
|
|
17
17
|
];
|
|
18
|
-
//
|
|
19
|
-
//
|
|
18
|
+
// External-public plane class: the downgraded attribution ceiling. The concurrent family
|
|
19
|
+
// plus the mandatory external-public disclosures, mirrored in the required
|
|
20
20
|
// set in verify/shared-world-concurrent.ts (CONCURRENT_ATTRIBUTION_LIMITS +
|
|
21
21
|
// EXTERNAL_PUBLIC_EXTRA_LIMITS). Verify fails closed on a missing one.
|
|
22
22
|
export const EXTERNAL_PUBLIC_ATTRIBUTION_LIMITS = [
|
|
@@ -3,13 +3,13 @@ import { type RunBundle, type RunScorerProvenance } from "../../run/bundle.js";
|
|
|
3
3
|
import { type ScorerOutcome } from "../../lab/adapter-extension.js";
|
|
4
4
|
import type { TerminalLedgers, TerminalScorer } from "./types.js";
|
|
5
5
|
/**
|
|
6
|
-
* Run the
|
|
6
|
+
* Run the product-adapter extension seam over the assembled
|
|
7
7
|
* evidence and attach its results to the bundle in place, without core knowing any product noun.
|
|
8
8
|
* The review is not touched here: the returned failures are folded into it by the caller.
|
|
9
9
|
*
|
|
10
10
|
* - `score`: when present, the returned namespaced `RunAdapterScore` lands on `bundle.adapterScore`.
|
|
11
11
|
* For a library caller (no `scorerProvenance`), the adapter score is additive and never a
|
|
12
|
-
* failure. For a config-declared scorer (
|
|
12
|
+
* failure. For a config-declared scorer (`scorerProvenance` present), a status:"fail" is a
|
|
13
13
|
* failure (the keystone route is the product's own definition of pass/fail), and so is a scorer
|
|
14
14
|
* that throws or returns a malformed value, so a crashed declared gate is never a silent green.
|
|
15
15
|
* - `deriveFeedback`: when present, the returned candidates are appended to
|
|
@@ -31,7 +31,7 @@ export declare function applyAdapterExtensionSeam(args: {
|
|
|
31
31
|
runId: string;
|
|
32
32
|
sanitize: (text: string) => string;
|
|
33
33
|
warnings: string[];
|
|
34
|
-
/** Present only when the scorer was
|
|
34
|
+
/** Present only when the scorer was config-declared. It is the "declared" marker that opts the
|
|
35
35
|
* terminal route into flip-on-fail. Absent for library callers (additive, back-compat). */
|
|
36
36
|
scorerProvenance?: RunScorerProvenance;
|
|
37
37
|
}): Promise<ScorerOutcome>;
|