humanish 0.105.0 → 0.106.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +91 -94
- package/ARCHITECTURE.md +146 -0
- package/CHANGELOG.md +512 -0
- package/CONTEXT.md +51 -0
- package/CONTRIBUTING.md +113 -9
- package/README.md +213 -124
- package/SECURITY.md +1 -1
- package/TELEMETRY.md +112 -0
- package/dist/actors/affordance.d.ts +56 -0
- package/dist/actors/affordance.js +155 -0
- package/dist/actors/agent-session.js +42 -0
- package/dist/actors/codex/app-server-actor-trace.d.ts +11 -0
- package/dist/actors/codex/app-server-actor-trace.js +211 -0
- package/dist/actors/codex/app-server-client.d.ts +39 -0
- package/dist/actors/codex/app-server-client.js +116 -0
- package/dist/actors/codex/app-server-trace.d.ts +154 -0
- package/dist/actors/codex/app-server-trace.js +424 -0
- package/dist/actors/codex/app-server-ui.d.ts +40 -0
- package/dist/actors/codex/app-server-ui.js +328 -0
- package/dist/actors/codex/app-server.d.ts +44 -0
- package/dist/actors/codex/app-server.js +268 -0
- package/dist/actors/codex/qualified-versions.d.ts +45 -0
- package/dist/actors/codex/qualified-versions.js +87 -0
- package/dist/actors/codex/restricted-executable.d.ts +17 -0
- package/dist/actors/codex/restricted-executable.js +147 -0
- package/dist/actors/codex/restricted-launch.d.ts +116 -0
- package/dist/actors/codex/restricted-launch.js +222 -0
- package/dist/actors/codex/restricted-participant-policy.d.ts +46 -0
- package/dist/actors/codex/restricted-participant-policy.js +82 -0
- package/dist/actors/codex/restricted-participant.d.ts +20 -0
- package/dist/actors/codex/restricted-participant.js +432 -0
- package/dist/actors/codex/restricted-policy.d.ts +70 -0
- package/dist/actors/codex/restricted-policy.js +326 -0
- package/dist/actors/codex/restricted-session.d.ts +65 -0
- package/dist/actors/codex/restricted-session.js +432 -0
- package/dist/actors/codex/restricted-transport.d.ts +73 -0
- package/dist/actors/codex/restricted-transport.js +335 -0
- package/dist/actors/codex/restricted-turn.d.ts +62 -0
- package/dist/actors/codex/restricted-turn.js +284 -0
- package/dist/actors/computer-use/actor.d.ts +77 -0
- package/dist/actors/computer-use/actor.js +78 -0
- package/dist/actors/computer-use/admission-limit.d.ts +12 -0
- package/dist/actors/computer-use/admission-limit.js +19 -0
- package/dist/actors/computer-use/executor-error.js +48 -0
- package/dist/actors/computer-use/loop/actions.d.ts +26 -0
- package/dist/actors/computer-use/loop/actions.js +245 -0
- package/dist/actors/computer-use/loop/backstop.d.ts +42 -0
- package/dist/actors/computer-use/loop/backstop.js +202 -0
- package/dist/actors/computer-use/loop/debrief.d.ts +19 -0
- package/dist/actors/computer-use/loop/debrief.js +164 -0
- package/dist/actors/computer-use/loop/ending.d.ts +86 -0
- package/dist/actors/computer-use/loop/ending.js +316 -0
- package/dist/actors/computer-use/loop/observation.d.ts +55 -0
- package/dist/actors/computer-use/loop/observation.js +246 -0
- package/dist/actors/computer-use/loop/output-limit.d.ts +11 -0
- package/dist/actors/computer-use/loop/output-limit.js +21 -0
- package/dist/actors/computer-use/loop/provider-call.d.ts +19 -0
- package/dist/actors/computer-use/loop/provider-call.js +208 -0
- package/dist/actors/computer-use/loop/race.d.ts +34 -0
- package/dist/actors/computer-use/loop/race.js +79 -0
- package/dist/actors/computer-use/loop/session.d.ts +77 -0
- package/dist/actors/computer-use/loop/session.js +135 -0
- package/dist/actors/computer-use/loop/spend.d.ts +30 -0
- package/dist/actors/computer-use/loop/spend.js +85 -0
- package/dist/actors/computer-use/loop/trace.d.ts +35 -0
- package/dist/actors/computer-use/loop/trace.js +140 -0
- package/dist/actors/computer-use/loop/types.d.ts +404 -0
- package/dist/actors/computer-use/loop/types.js +1 -0
- package/dist/actors/computer-use/loop/usage.d.ts +102 -0
- package/dist/actors/computer-use/loop/usage.js +355 -0
- package/dist/actors/computer-use/loop.d.ts +11 -0
- package/dist/actors/computer-use/loop.js +248 -0
- package/dist/actors/computer-use/openai-provider.d.ts +107 -0
- package/dist/actors/computer-use/openai-provider.js +472 -0
- package/dist/actors/computer-use/openai-requests.d.ts +35 -0
- package/dist/actors/computer-use/openai-requests.js +74 -0
- package/dist/actors/computer-use/openai-wire.d.ts +67 -0
- package/dist/actors/computer-use/openai-wire.js +365 -0
- package/dist/actors/computer-use/provider-error.d.ts +27 -0
- package/dist/actors/computer-use/provider-error.js +86 -0
- package/dist/actors/computer-use/speech.js +6 -0
- package/dist/actors/contract.d.ts +315 -0
- package/dist/actors/contract.js +207 -0
- package/dist/actors/goal-source.js +38 -0
- package/dist/actors/local-agent/claude-session.d.ts +43 -0
- package/dist/actors/local-agent/claude-session.js +370 -0
- package/dist/actors/local-agent/cli.d.ts +115 -0
- package/dist/actors/local-agent/cli.js +413 -0
- package/dist/actors/local-agent/readiness.d.ts +31 -0
- package/dist/actors/local-agent/readiness.js +45 -0
- package/dist/actors/openai-endpoint.d.ts +2 -0
- package/dist/actors/openai-endpoint.js +2 -0
- package/dist/actors/output-token-limit.js +4 -0
- package/dist/actors/reasoning-effort.js +33 -0
- package/dist/actors/registry.d.ts +59 -0
- package/dist/actors/registry.js +89 -0
- package/dist/actors/scripted-browser/actor.d.ts +49 -0
- package/dist/actors/scripted-browser/actor.js +428 -0
- package/dist/actors/scripted-browser/browser-command.d.ts +1 -0
- package/dist/actors/scripted-browser/browser-command.js +48 -0
- package/dist/actors/scripted-browser/journey.d.ts +9 -0
- package/dist/actors/scripted-browser/journey.js +171 -0
- package/dist/actors/scripted-browser/steps.d.ts +60 -0
- package/dist/actors/scripted-browser/steps.js +384 -0
- package/dist/actors/scripted-browser/types.d.ts +135 -0
- package/dist/actors/scripted-browser/types.js +26 -0
- package/dist/actors/stop-cause.d.ts +9 -0
- package/dist/actors/stop-cause.js +42 -0
- package/dist/actors/stop-conditions.d.ts +40 -0
- package/dist/actors/stop-conditions.js +65 -0
- package/dist/analysis/automatic-completion.d.ts +38 -0
- package/dist/analysis/automatic-completion.js +90 -0
- package/dist/analysis/automatic-config.d.ts +41 -0
- package/dist/analysis/automatic-config.js +135 -0
- package/dist/analysis/automatic.d.ts +17 -0
- package/dist/analysis/automatic.js +279 -0
- package/dist/analysis/codex-config.d.ts +8 -0
- package/dist/analysis/codex-config.js +69 -0
- package/dist/analysis/evidence-sources.d.ts +23 -0
- package/dist/analysis/evidence-sources.js +251 -0
- package/dist/analysis/evidence.d.ts +18 -0
- package/dist/analysis/evidence.js +482 -0
- package/dist/analysis/execute.d.ts +52 -0
- package/dist/analysis/execute.js +504 -0
- package/dist/analysis/image-tokens.d.ts +1 -0
- package/dist/analysis/image-tokens.js +41 -0
- package/dist/analysis/job.d.ts +97 -0
- package/dist/analysis/job.js +311 -0
- package/dist/analysis/load.d.ts +3 -0
- package/dist/analysis/load.js +11 -0
- package/dist/analysis/provider.d.ts +57 -0
- package/dist/analysis/provider.js +227 -0
- package/dist/analysis/restricted-codex.d.ts +19 -0
- package/dist/analysis/restricted-codex.js +23 -0
- package/dist/analysis/service.d.ts +72 -0
- package/dist/analysis/service.js +399 -0
- package/dist/analysis/sharing.d.ts +11 -0
- package/dist/analysis/sharing.js +44 -0
- package/dist/analysis/store-executions.d.ts +27 -0
- package/dist/analysis/store-executions.js +224 -0
- package/dist/analysis/store.d.ts +31 -0
- package/dist/analysis/store.js +315 -0
- package/dist/analysis/types.d.ts +217 -0
- package/dist/analysis/types.js +12 -0
- package/dist/analysis/validation.d.ts +225 -0
- package/dist/analysis/validation.js +562 -0
- package/dist/browser-control/client.d.ts +18 -0
- package/dist/browser-control/client.js +239 -0
- package/dist/browser-control/dispatcher.d.ts +19 -0
- package/dist/browser-control/dispatcher.js +221 -0
- package/dist/browser-control/protocol.d.ts +492 -0
- package/dist/browser-control/protocol.js +360 -0
- package/dist/browser-control/recording-transfer.d.ts +3 -0
- package/dist/browser-control/recording-transfer.js +48 -0
- package/dist/browser-control/transport.d.ts +27 -0
- package/dist/browser-control/transport.js +189 -0
- package/dist/cli/commands/analysis-signals.d.ts +7 -0
- package/dist/cli/commands/analysis-signals.js +25 -0
- package/dist/cli/commands/analyze.d.ts +3 -0
- package/dist/cli/commands/analyze.js +212 -0
- package/dist/cli/commands/codex.d.ts +3 -0
- package/dist/cli/commands/codex.js +145 -0
- package/dist/cli/commands/comms.d.ts +3 -0
- package/dist/cli/commands/comms.js +225 -0
- package/dist/cli/commands/feedback.d.ts +3 -0
- package/dist/cli/commands/feedback.js +138 -0
- package/dist/cli/commands/lab-format.d.ts +8 -0
- package/dist/cli/commands/lab-format.js +105 -0
- package/dist/cli/commands/lab-route-computer-use.d.ts +20 -0
- package/dist/cli/commands/lab-route-computer-use.js +251 -0
- package/dist/cli/commands/lab-route-open.d.ts +27 -0
- package/dist/cli/commands/lab-route-open.js +37 -0
- package/dist/cli/commands/lab-route-preview.d.ts +20 -0
- package/dist/cli/commands/lab-route-preview.js +74 -0
- package/dist/cli/commands/lab-route-run.d.ts +17 -0
- package/dist/cli/commands/lab-route-run.js +31 -0
- package/dist/cli/commands/lab-route-scripted.d.ts +19 -0
- package/dist/cli/commands/lab-route-scripted.js +50 -0
- package/dist/cli/commands/lab-route-shared-world.d.ts +20 -0
- package/dist/cli/commands/lab-route-shared-world.js +135 -0
- package/dist/cli/commands/lab-route-terminal.d.ts +19 -0
- package/dist/cli/commands/lab-route-terminal.js +49 -0
- package/dist/cli/commands/lab-run.d.ts +9 -0
- package/dist/cli/commands/lab-run.js +166 -0
- package/dist/cli/commands/lab-scorer.d.ts +30 -0
- package/dist/cli/commands/lab-scorer.js +17 -0
- package/dist/cli/commands/lab.d.ts +3 -0
- package/dist/cli/commands/lab.js +193 -0
- package/dist/cli/commands/observe.d.ts +4 -0
- package/dist/cli/commands/observe.js +345 -0
- package/dist/cli/commands/runs.d.ts +11 -0
- package/dist/cli/commands/runs.js +314 -0
- package/dist/cli/commands/setup.d.ts +11 -0
- package/dist/cli/commands/setup.js +325 -0
- package/dist/cli/commands/tui.d.ts +32 -0
- package/dist/cli/commands/tui.js +305 -0
- package/dist/cli/commands/watch.d.ts +3 -0
- package/dist/cli/commands/watch.js +245 -0
- package/dist/cli/doctor.d.ts +39 -0
- package/dist/cli/doctor.js +263 -0
- package/dist/cli/first-run-path.d.ts +67 -0
- package/dist/cli/first-run-path.js +150 -0
- package/dist/cli/io.d.ts +85 -0
- package/dist/cli/io.js +232 -0
- package/dist/cli/observer-follow.d.ts +56 -0
- package/dist/cli/observer-follow.js +160 -0
- package/dist/cli/orientation.d.ts +30 -0
- package/dist/cli/orientation.js +114 -0
- package/dist/cli/program.d.ts +15 -0
- package/dist/cli/program.js +338 -0
- package/dist/cli/secret-prompt.js +39 -0
- package/dist/cli/telemetry.js +351 -0
- package/dist/cli.js +2 -4
- package/dist/comms/agentmail.d.ts +29 -0
- package/dist/comms/agentmail.js +568 -0
- package/dist/comms/capture-surface.d.ts +54 -0
- package/dist/comms/capture-surface.js +468 -0
- package/dist/comms/catch-host.d.ts +52 -0
- package/dist/comms/catch-host.js +192 -0
- package/dist/comms/connections.d.ts +20 -0
- package/dist/comms/connections.js +116 -0
- package/dist/comms/email-catch.d.ts +49 -0
- package/dist/comms/email-catch.js +236 -0
- package/dist/comms/extract.d.ts +7 -0
- package/dist/comms/extract.js +65 -0
- package/dist/comms/fake-inbox.d.ts +39 -0
- package/dist/comms/fake-inbox.js +136 -0
- package/dist/comms/images.d.ts +7 -0
- package/dist/comms/images.js +53 -0
- package/dist/comms/lease-store.d.ts +91 -0
- package/dist/comms/lease-store.js +600 -0
- package/dist/comms/providers.d.ts +30 -0
- package/dist/comms/providers.js +24 -0
- package/dist/comms/receiving-common.d.ts +17 -0
- package/dist/comms/receiving-common.js +82 -0
- package/dist/comms/receiving-evidence.d.ts +4 -0
- package/dist/comms/receiving-evidence.js +59 -0
- package/dist/comms/receiving-recovery.d.ts +22 -0
- package/dist/comms/receiving-recovery.js +100 -0
- package/dist/comms/receiving-render.d.ts +16 -0
- package/dist/comms/receiving-render.js +409 -0
- package/dist/comms/receiving-runtime.d.ts +41 -0
- package/dist/comms/receiving-runtime.js +66 -0
- package/dist/comms/receiving-surface.d.ts +8 -0
- package/dist/comms/receiving-surface.js +156 -0
- package/dist/comms/receiving-types.d.ts +122 -0
- package/dist/comms/receiving-types.js +3 -0
- package/dist/comms/receiving.d.ts +33 -0
- package/dist/comms/receiving.js +508 -0
- package/dist/comms/sandbox-catch-script.d.ts +16 -0
- package/dist/comms/sandbox-catch-script.js +331 -0
- package/dist/comms/sandbox-catch.d.ts +214 -0
- package/dist/comms/sandbox-catch.js +451 -0
- package/dist/comms/setup.d.ts +65 -0
- package/dist/comms/setup.js +259 -0
- package/dist/comms/thread-evidence.d.ts +28 -0
- package/dist/comms/thread-evidence.js +30 -0
- package/dist/comms/types.d.ts +76 -0
- package/dist/comms/types.js +8 -0
- package/dist/deprecated.d.ts +90 -0
- package/dist/deprecated.js +106 -0
- package/dist/evidence/browser-hygiene.js +42 -0
- package/dist/evidence/desktop-recorder.d.ts +39 -0
- package/dist/evidence/desktop-recorder.js +340 -0
- package/dist/evidence/desktop-recording-artifact.d.ts +5 -0
- package/dist/evidence/desktop-recording-artifact.js +53 -0
- package/dist/evidence/desktop-recording-types.d.ts +27 -0
- package/dist/evidence/desktop-recording-types.js +16 -0
- package/dist/evidence/encoded-text.d.ts +27 -0
- package/dist/evidence/encoded-text.js +243 -0
- package/dist/evidence/frame-signature.d.ts +17 -0
- package/dist/evidence/frame-signature.js +111 -0
- package/dist/evidence/image.d.ts +24 -0
- package/dist/evidence/image.js +170 -0
- package/dist/evidence/plain-text.d.ts +8 -0
- package/dist/evidence/plain-text.js +16 -0
- package/dist/evidence/redaction.d.ts +110 -0
- package/dist/evidence/redaction.js +329 -0
- package/dist/feedback/draft.d.ts +58 -0
- package/dist/feedback/draft.js +309 -0
- package/dist/feedback/export-bundle.d.ts +6 -0
- package/dist/feedback/export-bundle.js +585 -0
- package/dist/feedback/export.d.ts +50 -0
- package/dist/feedback/export.js +392 -0
- package/dist/feedback/feedback.d.ts +37 -0
- package/dist/feedback/feedback.js +282 -0
- package/dist/feedback/proof.d.ts +8 -0
- package/dist/feedback/proof.js +56 -0
- package/dist/guest/bootstrap.d.ts +55 -0
- package/dist/guest/bootstrap.js +348 -0
- package/dist/guest/browser-tools.d.ts +8 -0
- package/dist/guest/browser-tools.js +72 -0
- package/dist/guest/chromium-text.d.ts +62 -0
- package/dist/guest/chromium-text.js +386 -0
- package/dist/guest/desktop-executor.d.ts +57 -0
- package/dist/guest/desktop-executor.js +256 -0
- package/dist/guest/desktop-keys.d.ts +8 -0
- package/dist/guest/desktop-keys.js +89 -0
- package/dist/guest/desktop-media.d.ts +70 -0
- package/dist/guest/desktop-media.js +385 -0
- package/dist/guest/desktop-native.d.ts +14 -0
- package/dist/guest/desktop-native.js +156 -0
- package/dist/guest/media-config.d.ts +15 -0
- package/dist/guest/media-config.js +16 -0
- package/dist/guest/runtime-desktop.d.ts +45 -0
- package/dist/guest/runtime-desktop.js +420 -0
- package/dist/guest/runtime-processes.d.ts +28 -0
- package/dist/guest/runtime-processes.js +94 -0
- package/dist/guest/runtime.d.ts +31 -0
- package/dist/guest/runtime.js +124 -0
- package/dist/guest-media-worker.js +184 -48
- package/dist/guest-runtime-main.js +23 -10
- package/dist/guest-runtime-revision.js +1 -1
- package/dist/index.d.ts +32 -83
- package/dist/index.js +21 -42
- package/dist/keys/env-file.d.ts +15 -0
- package/dist/keys/env-file.js +109 -0
- package/dist/keys/key-resolution.d.ts +58 -0
- package/dist/keys/key-resolution.js +389 -0
- package/dist/lab/adapter-extension.d.ts +75 -0
- package/dist/lab/adapter-extension.js +253 -0
- package/dist/lab/adapter-scorer-loader.d.ts +43 -0
- package/dist/lab/adapter-scorer-loader.js +130 -0
- package/dist/lab/bag-overrides.d.ts +18 -0
- package/dist/lab/bag-overrides.js +121 -0
- package/dist/lab/composition-rules.d.ts +7 -0
- package/dist/lab/composition-rules.js +292 -0
- package/dist/lab/config.d.ts +7 -0
- package/dist/lab/config.js +208 -0
- package/dist/lab/device-presets.d.ts +97 -0
- package/dist/lab/device-presets.js +87 -0
- package/dist/lab/discover.d.ts +65 -0
- package/dist/lab/discover.js +422 -0
- package/dist/lab/doctor.d.ts +39 -0
- package/dist/lab/doctor.js +233 -0
- package/dist/lab/init-paths.d.ts +5 -0
- package/dist/lab/init-paths.js +89 -0
- package/dist/lab/init-plan.d.ts +20 -0
- package/dist/lab/init-plan.js +163 -0
- package/dist/lab/init-templates.d.ts +28 -0
- package/dist/lab/init-templates.js +416 -0
- package/dist/lab/init.d.ts +39 -0
- package/dist/lab/init.js +287 -0
- package/dist/lab/keys.d.ts +2 -0
- package/dist/lab/keys.js +264 -0
- package/dist/lab/parse/actors.d.ts +14 -0
- package/dist/lab/parse/actors.js +453 -0
- package/dist/lab/parse/comms.d.ts +12 -0
- package/dist/lab/parse/comms.js +246 -0
- package/dist/lab/parse/execution.d.ts +19 -0
- package/dist/lab/parse/execution.js +356 -0
- package/dist/lab/parse/subject-state.d.ts +30 -0
- package/dist/lab/parse/subject-state.js +179 -0
- package/dist/lab/parse/subject.d.ts +9 -0
- package/dist/lab/parse/subject.js +420 -0
- package/dist/lab/parse/values.d.ts +17 -0
- package/dist/lab/parse/values.js +65 -0
- package/dist/lab/participant-assignment.d.ts +12 -0
- package/dist/lab/participant-assignment.js +19 -0
- package/dist/lab/persona-resolve.d.ts +39 -0
- package/dist/lab/persona-resolve.js +118 -0
- package/dist/lab/persona.d.ts +39 -0
- package/dist/lab/persona.js +192 -0
- package/dist/lab/plan-base.d.ts +30 -0
- package/dist/lab/plan-base.js +126 -0
- package/dist/lab/plan-participants.d.ts +81 -0
- package/dist/lab/plan-participants.js +92 -0
- package/dist/lab/plan-types.d.ts +277 -0
- package/dist/lab/plan-types.js +5 -0
- package/dist/lab/plan.d.ts +27 -0
- package/dist/lab/plan.js +156 -0
- package/dist/lab/preflight-probes.d.ts +3 -0
- package/dist/lab/preflight-probes.js +312 -0
- package/dist/lab/preflight-result.d.ts +7 -0
- package/dist/lab/preflight-result.js +43 -0
- package/dist/lab/preflight.d.ts +95 -0
- package/dist/lab/preflight.js +117 -0
- package/dist/lab/route-inputs.d.ts +17 -0
- package/dist/lab/route-inputs.js +95 -0
- package/dist/lab/routing.d.ts +81 -0
- package/dist/lab/routing.js +214 -0
- package/dist/lab/run-lab-events.d.ts +69 -0
- package/dist/lab/run-lab-events.js +95 -0
- package/dist/lab/run-lab-options.d.ts +82 -0
- package/dist/lab/run-lab-options.js +399 -0
- package/dist/lab/summary.d.ts +60 -0
- package/dist/lab/summary.js +168 -0
- package/dist/lab/tasks.d.ts +91 -0
- package/dist/lab/tasks.js +139 -0
- package/dist/lab/types.d.ts +813 -0
- package/dist/lab/types.js +6 -0
- package/dist/lab/validation.d.ts +67 -0
- package/dist/lab/validation.js +387 -0
- package/dist/lab/warnings.d.ts +2 -0
- package/dist/lab/warnings.js +338 -0
- package/dist/observer/artifact.d.ts +23 -0
- package/dist/observer/artifact.js +235 -0
- package/dist/observer/data.d.ts +115 -0
- package/dist/observer/data.js +258 -0
- package/dist/observer/exposure.d.ts +64 -0
- package/dist/observer/exposure.js +143 -0
- package/dist/observer/http.js +50 -0
- package/dist/observer/library.js +190 -0
- package/dist/observer/listen.js +85 -0
- package/dist/observer/live.d.ts +9 -0
- package/dist/observer/live.js +25 -0
- package/dist/observer/pinned-files.d.ts +30 -0
- package/dist/observer/pinned-files.js +160 -0
- package/dist/observer/render.d.ts +69 -0
- package/dist/observer/render.js +350 -0
- package/dist/observer/run-inventory.d.ts +35 -0
- package/dist/observer/run-inventory.js +95 -0
- package/dist/observer/run-routes.d.ts +37 -0
- package/dist/observer/run-routes.js +373 -0
- package/dist/observer/serve.d.ts +97 -0
- package/dist/observer/serve.js +305 -0
- package/dist/observer/static.js +369 -0
- package/dist/observer/tunnel.js +112 -0
- package/dist/observer-app.html +9 -20
- package/dist/routes/computer-use/bundle-parts.d.ts +50 -0
- package/dist/routes/computer-use/bundle-parts.js +177 -0
- package/dist/routes/computer-use/bundle.d.ts +56 -0
- package/dist/routes/computer-use/bundle.js +184 -0
- package/dist/routes/computer-use/diagnostics.d.ts +38 -0
- package/dist/routes/computer-use/diagnostics.js +94 -0
- package/dist/routes/computer-use/e2b-desktop/comms.d.ts +65 -0
- package/dist/routes/computer-use/e2b-desktop/comms.js +225 -0
- package/dist/routes/computer-use/e2b-desktop/desktop.d.ts +3 -0
- package/dist/routes/computer-use/e2b-desktop/desktop.js +91 -0
- package/dist/routes/computer-use/e2b-desktop/fidelity.d.ts +65 -0
- package/dist/routes/computer-use/e2b-desktop/fidelity.js +156 -0
- package/dist/routes/computer-use/e2b-desktop/prepare.d.ts +18 -0
- package/dist/routes/computer-use/e2b-desktop/prepare.js +198 -0
- package/dist/routes/computer-use/e2b-desktop/start.d.ts +14 -0
- package/dist/routes/computer-use/e2b-desktop/start.js +193 -0
- package/dist/routes/computer-use/e2b-desktop/state.d.ts +65 -0
- package/dist/routes/computer-use/e2b-desktop/state.js +69 -0
- package/dist/routes/computer-use/e2b-desktop/teardown.d.ts +6 -0
- package/dist/routes/computer-use/e2b-desktop/teardown.js +152 -0
- package/dist/routes/computer-use/external-comms.d.ts +20 -0
- package/dist/routes/computer-use/external-comms.js +55 -0
- package/dist/routes/computer-use/fanout-bundle.d.ts +11 -0
- package/dist/routes/computer-use/fanout-bundle.js +274 -0
- package/dist/routes/computer-use/fanout-lanes.d.ts +15 -0
- package/dist/routes/computer-use/fanout-lanes.js +302 -0
- package/dist/routes/computer-use/in-process-desktop.d.ts +17 -0
- package/dist/routes/computer-use/in-process-desktop.js +40 -0
- package/dist/routes/computer-use/lanes.d.ts +35 -0
- package/dist/routes/computer-use/lanes.js +321 -0
- package/dist/routes/computer-use/legacy-lane-spec.d.ts +62 -0
- package/dist/routes/computer-use/legacy-lane-spec.js +39 -0
- package/dist/routes/computer-use/live-flush.d.ts +42 -0
- package/dist/routes/computer-use/live-flush.js +154 -0
- package/dist/routes/computer-use/local-tree-pack.d.ts +27 -0
- package/dist/routes/computer-use/local-tree-pack.js +47 -0
- package/dist/routes/computer-use/local-vm.d.ts +20 -0
- package/dist/routes/computer-use/local-vm.js +218 -0
- package/dist/routes/computer-use/participant-desktop.d.ts +63 -0
- package/dist/routes/computer-use/participant-desktop.js +33 -0
- package/dist/routes/computer-use/participant-facts.d.ts +6 -0
- package/dist/routes/computer-use/participant-facts.js +22 -0
- package/dist/routes/computer-use/participant-model.d.ts +30 -0
- package/dist/routes/computer-use/participant-model.js +223 -0
- package/dist/routes/computer-use/participant-prompt.d.ts +53 -0
- package/dist/routes/computer-use/participant-prompt.js +87 -0
- package/dist/routes/computer-use/participant-runs.d.ts +67 -0
- package/dist/routes/computer-use/participant-runs.js +255 -0
- package/dist/routes/computer-use/plan.d.ts +56 -0
- package/dist/routes/computer-use/plan.js +310 -0
- package/dist/routes/computer-use/preflight.d.ts +23 -0
- package/dist/routes/computer-use/preflight.js +89 -0
- package/dist/routes/computer-use/rerun-selection.d.ts +19 -0
- package/dist/routes/computer-use/rerun-selection.js +121 -0
- package/dist/routes/computer-use/result.d.ts +7 -0
- package/dist/routes/computer-use/result.js +292 -0
- package/dist/routes/computer-use/route.d.ts +33 -0
- package/dist/routes/computer-use/route.js +145 -0
- package/dist/routes/computer-use/run-lanes.d.ts +59 -0
- package/dist/routes/computer-use/run-lanes.js +135 -0
- package/dist/routes/computer-use/self-report.d.ts +21 -0
- package/dist/routes/computer-use/self-report.js +231 -0
- package/dist/routes/computer-use/setup.d.ts +133 -0
- package/dist/routes/computer-use/setup.js +359 -0
- package/dist/routes/computer-use/single-bundle.d.ts +97 -0
- package/dist/routes/computer-use/single-bundle.js +393 -0
- package/dist/routes/computer-use/subject-projection.d.ts +51 -0
- package/dist/routes/computer-use/subject-projection.js +159 -0
- package/dist/routes/computer-use/types.d.ts +538 -0
- package/dist/routes/computer-use/types.js +36 -0
- package/dist/routes/preview.d.ts +13 -0
- package/dist/routes/preview.js +36 -0
- package/dist/routes/scripted/bundle.d.ts +47 -0
- package/dist/routes/scripted/bundle.js +195 -0
- package/dist/routes/scripted/plan.d.ts +30 -0
- package/dist/routes/scripted/plan.js +95 -0
- package/dist/routes/scripted/result.d.ts +48 -0
- package/dist/routes/scripted/result.js +176 -0
- package/dist/routes/scripted/route.d.ts +28 -0
- package/dist/routes/scripted/route.js +218 -0
- package/dist/routes/scripted/scenario.d.ts +21 -0
- package/dist/routes/scripted/scenario.js +102 -0
- package/dist/routes/scripted/session-result.d.ts +8 -0
- package/dist/routes/scripted/session-result.js +60 -0
- package/dist/routes/scripted/setup.d.ts +45 -0
- package/dist/routes/scripted/setup.js +126 -0
- package/dist/routes/scripted/subject.d.ts +49 -0
- package/dist/routes/scripted/subject.js +157 -0
- package/dist/routes/scripted/surface-records.d.ts +26 -0
- package/dist/routes/scripted/surface-records.js +88 -0
- package/dist/routes/scripted/surface-sessions.d.ts +13 -0
- package/dist/routes/scripted/surface-sessions.js +40 -0
- package/dist/routes/scripted/types.d.ts +88 -0
- package/dist/routes/scripted/types.js +3 -0
- package/dist/routes/shared-world/bundle.d.ts +20 -0
- package/dist/routes/shared-world/bundle.js +446 -0
- package/dist/routes/shared-world/checkpoints.d.ts +25 -0
- package/dist/routes/shared-world/checkpoints.js +46 -0
- package/dist/routes/shared-world/comms.d.ts +68 -0
- package/dist/routes/shared-world/comms.js +176 -0
- package/dist/routes/shared-world/external-public.d.ts +21 -0
- package/dist/routes/shared-world/external-public.js +130 -0
- package/dist/routes/shared-world/handoff.d.ts +62 -0
- package/dist/routes/shared-world/handoff.js +348 -0
- package/dist/routes/shared-world/lobby-code.d.ts +25 -0
- package/dist/routes/shared-world/lobby-code.js +152 -0
- package/dist/routes/shared-world/plan.d.ts +27 -0
- package/dist/routes/shared-world/plan.js +174 -0
- package/dist/routes/shared-world/provenance.d.ts +27 -0
- package/dist/routes/shared-world/provenance.js +65 -0
- package/dist/routes/shared-world/provisioned.d.ts +57 -0
- package/dist/routes/shared-world/provisioned.js +506 -0
- package/dist/routes/shared-world/result.d.ts +18 -0
- package/dist/routes/shared-world/result.js +327 -0
- package/dist/routes/shared-world/route.d.ts +21 -0
- package/dist/routes/shared-world/route.js +277 -0
- package/dist/routes/shared-world/seat-records.d.ts +20 -0
- package/dist/routes/shared-world/seat-records.js +213 -0
- package/dist/routes/shared-world/seats.d.ts +38 -0
- package/dist/routes/shared-world/seats.js +208 -0
- package/dist/routes/shared-world/setup.d.ts +48 -0
- package/dist/routes/shared-world/setup.js +200 -0
- package/dist/routes/shared-world/types.d.ts +354 -0
- package/dist/routes/shared-world/types.js +29 -0
- package/dist/routes/terminal/adapter.d.ts +37 -0
- package/dist/routes/terminal/adapter.js +201 -0
- package/dist/routes/terminal/bundle.d.ts +79 -0
- package/dist/routes/terminal/bundle.js +305 -0
- package/dist/routes/terminal/credentials.d.ts +34 -0
- package/dist/routes/terminal/credentials.js +102 -0
- package/dist/routes/terminal/dry-run.d.ts +24 -0
- package/dist/routes/terminal/dry-run.js +157 -0
- package/dist/routes/terminal/encoding.js +79 -0
- package/dist/routes/terminal/ledger.d.ts +49 -0
- package/dist/routes/terminal/ledger.js +170 -0
- package/dist/routes/terminal/lifetime.d.ts +10 -0
- package/dist/routes/terminal/lifetime.js +22 -0
- package/dist/routes/terminal/live-finish.d.ts +31 -0
- package/dist/routes/terminal/live-finish.js +215 -0
- package/dist/routes/terminal/live-sandbox.d.ts +70 -0
- package/dist/routes/terminal/live-sandbox.js +456 -0
- package/dist/routes/terminal/persona.d.ts +20 -0
- package/dist/routes/terminal/persona.js +34 -0
- package/dist/routes/terminal/plan.d.ts +21 -0
- package/dist/routes/terminal/plan.js +115 -0
- package/dist/routes/terminal/recorder.d.ts +23 -0
- package/dist/routes/terminal/recorder.js +77 -0
- package/dist/routes/terminal/result.d.ts +47 -0
- package/dist/routes/terminal/result.js +114 -0
- package/dist/routes/terminal/route.d.ts +23 -0
- package/dist/routes/terminal/route.js +170 -0
- package/dist/routes/terminal/runtime-auth.d.ts +12 -0
- package/dist/routes/terminal/runtime-auth.js +23 -0
- package/dist/routes/terminal/runtime.d.ts +14 -0
- package/dist/routes/terminal/runtime.js +47 -0
- package/dist/routes/terminal/sandbox.d.ts +37 -0
- package/dist/routes/terminal/sandbox.js +123 -0
- package/dist/routes/terminal/session.d.ts +25 -0
- package/dist/routes/terminal/session.js +199 -0
- package/dist/routes/terminal/token-usage.d.ts +15 -0
- package/dist/routes/terminal/token-usage.js +93 -0
- package/dist/routes/terminal/trace.d.ts +40 -0
- package/dist/routes/terminal/trace.js +172 -0
- package/dist/routes/terminal/types.d.ts +342 -0
- package/dist/routes/terminal/types.js +31 -0
- package/dist/run/bundle-shape.d.ts +7 -0
- package/dist/run/bundle-shape.js +369 -0
- package/dist/run/bundle.d.ts +547 -0
- package/dist/run/bundle.js +44 -0
- package/dist/run/concurrency.js +24 -0
- package/dist/run/contained-output.d.ts +50 -0
- package/dist/run/contained-output.js +351 -0
- package/dist/run/cost-summary.d.ts +28 -0
- package/dist/run/cost-summary.js +213 -0
- package/dist/run/costs.js +140 -0
- package/dist/run/detail.d.ts +62 -0
- package/dist/run/detail.js +139 -0
- package/dist/run/dry-run-inputs.d.ts +9 -0
- package/dist/run/dry-run-inputs.js +90 -0
- package/dist/run/dry-run.d.ts +6 -0
- package/dist/run/dry-run.js +362 -0
- package/dist/run/feedback-shape.d.ts +7 -0
- package/dist/run/feedback-shape.js +89 -0
- package/dist/run/git-state.d.ts +35 -0
- package/dist/run/git-state.js +316 -0
- package/dist/run/git-workspace.d.ts +32 -0
- package/dist/run/git-workspace.js +450 -0
- package/dist/run/judge.d.ts +210 -0
- package/dist/run/judge.js +240 -0
- package/dist/run/locate.d.ts +22 -0
- package/dist/run/locate.js +122 -0
- package/dist/run/outcomes.d.ts +31 -0
- package/dist/run/outcomes.js +210 -0
- package/dist/run/participant-records.d.ts +28 -0
- package/dist/run/participant-records.js +63 -0
- package/dist/run/participant.d.ts +29 -0
- package/dist/run/participant.js +12 -0
- package/dist/run/paths.d.ts +79 -0
- package/dist/run/paths.js +356 -0
- package/dist/run/preflight-receipts.d.ts +46 -0
- package/dist/run/preflight-receipts.js +173 -0
- package/dist/run/pricing.d.ts +124 -0
- package/dist/run/pricing.js +298 -0
- package/dist/run/project.d.ts +8 -0
- package/dist/run/project.js +103 -0
- package/dist/run/projection.d.ts +184 -0
- package/dist/run/projection.js +356 -0
- package/dist/run/reclaim.d.ts +41 -0
- package/dist/run/reclaim.js +193 -0
- package/dist/run/results.d.ts +88 -0
- package/dist/run/results.js +3 -0
- package/dist/run/run-index.d.ts +107 -0
- package/dist/run/run-index.js +243 -0
- package/dist/run/run.d.ts +103 -0
- package/dist/run/run.js +199 -0
- package/dist/run/sandbox-receipts.d.ts +31 -0
- package/dist/run/sandbox-receipts.js +49 -0
- package/dist/run/shared-world-evidence.d.ts +220 -0
- package/dist/run/shared-world-evidence.js +49 -0
- package/dist/run/shared-world-shape.d.ts +26 -0
- package/dist/run/shared-world-shape.js +181 -0
- package/dist/run/stats.d.ts +82 -0
- package/dist/run/stats.js +258 -0
- package/dist/run/status.d.ts +111 -0
- package/dist/run/status.js +176 -0
- package/dist/run/stored-runs.d.ts +38 -0
- package/dist/run/stored-runs.js +273 -0
- package/dist/run/stream-shape.d.ts +4 -0
- package/dist/run/stream-shape.js +160 -0
- package/dist/run/streams.d.ts +257 -0
- package/dist/run/streams.js +12 -0
- package/dist/run/study-files.d.ts +35 -0
- package/dist/run/study-files.js +164 -0
- package/dist/run/terminal-contract.d.ts +25 -0
- package/dist/run/terminal-contract.js +47 -0
- package/dist/run/text.d.ts +2 -0
- package/dist/run/text.js +4 -0
- package/dist/run/transient-comms-secrets.js +72 -0
- package/dist/run/type-guards.d.ts +6 -0
- package/dist/run/type-guards.js +18 -0
- package/dist/run-lab.d.ts +110 -0
- package/dist/run-lab.js +148 -0
- package/dist/subject/clone.d.ts +37 -0
- package/dist/subject/clone.js +62 -0
- package/dist/subject/desktop-cli.d.ts +17 -0
- package/dist/subject/desktop-cli.js +51 -0
- package/dist/subject/local-tree-archive.d.ts +82 -0
- package/dist/subject/local-tree-archive.js +431 -0
- package/dist/subject/local-tree.d.ts +28 -0
- package/dist/subject/local-tree.js +58 -0
- package/dist/subject/node-bootstrap.d.ts +12 -0
- package/dist/subject/node-bootstrap.js +66 -0
- package/dist/subject/runtime.d.ts +13 -0
- package/dist/subject/runtime.js +50 -0
- package/dist/subject/serve.d.ts +39 -0
- package/dist/subject/serve.js +249 -0
- package/dist/subject/state.d.ts +23 -0
- package/dist/subject/state.js +58 -0
- package/dist/subject/steps.d.ts +37 -0
- package/dist/subject/steps.js +39 -0
- package/dist/substrates/command-failure.d.ts +23 -0
- package/dist/substrates/command-failure.js +45 -0
- package/dist/substrates/desktop-session.d.ts +43 -0
- package/dist/substrates/desktop-session.js +59 -0
- package/dist/substrates/detached.d.ts +55 -0
- package/dist/substrates/detached.js +139 -0
- package/dist/substrates/e2b/cdp-probe.d.ts +99 -0
- package/dist/substrates/e2b/cdp-probe.js +556 -0
- package/dist/substrates/e2b/desktop-browser.d.ts +81 -0
- package/dist/substrates/e2b/desktop-browser.js +410 -0
- package/dist/substrates/e2b/desktop-cdp.d.ts +77 -0
- package/dist/substrates/e2b/desktop-cdp.js +211 -0
- package/dist/substrates/e2b/desktop-executor.d.ts +92 -0
- package/dist/substrates/e2b/desktop-executor.js +302 -0
- package/dist/substrates/e2b/desktop-geometry.d.ts +83 -0
- package/dist/substrates/e2b/desktop-geometry.js +331 -0
- package/dist/substrates/e2b/desktop-media.d.ts +29 -0
- package/dist/substrates/e2b/desktop-media.js +151 -0
- package/dist/substrates/e2b/desktop-recording.d.ts +18 -0
- package/dist/substrates/e2b/desktop-recording.js +238 -0
- package/dist/substrates/e2b/desktop-resources.d.ts +11 -0
- package/dist/substrates/e2b/desktop-resources.js +35 -0
- package/dist/substrates/e2b/desktop-screenshot-cleanup.d.ts +15 -0
- package/dist/substrates/e2b/desktop-screenshot-cleanup.js +66 -0
- package/dist/substrates/e2b/lifetime.d.ts +12 -0
- package/dist/substrates/e2b/lifetime.js +18 -0
- package/dist/substrates/e2b/sandbox.d.ts +104 -0
- package/dist/substrates/e2b/sandbox.js +216 -0
- package/dist/substrates/e2b/sdk.d.ts +205 -0
- package/dist/substrates/e2b/sdk.js +189 -0
- package/dist/substrates/e2b/shell.d.ts +10 -0
- package/dist/substrates/e2b/shell.js +61 -0
- package/dist/substrates/local/captured-inbox.d.ts +6 -0
- package/dist/substrates/local/captured-inbox.js +87 -0
- package/dist/substrates/local/firecracker-desktop.d.ts +25 -0
- package/dist/substrates/local/firecracker-desktop.js +315 -0
- package/dist/substrates/local/runtime-config.d.ts +6 -0
- package/dist/substrates/local/runtime-config.js +91 -0
- package/dist/substrates/local/runtime-host.d.ts +30 -0
- package/dist/substrates/local/runtime-host.js +143 -0
- package/dist/substrates/local/runtime-release.d.ts +5 -0
- package/dist/substrates/local/runtime-release.js +32 -0
- package/dist/substrates/local/runtime-ssh.d.ts +9 -0
- package/dist/substrates/local/runtime-ssh.js +129 -0
- package/dist/substrates/local/runtime.d.ts +25 -0
- package/dist/substrates/local/runtime.js +190 -0
- package/dist/substrates/shell.d.ts +44 -0
- package/dist/substrates/shell.js +22 -0
- package/dist/tui/actions.d.ts +39 -0
- package/dist/tui/actions.js +203 -0
- package/dist/tui/contract.d.ts +144 -0
- package/dist/tui/contract.js +52 -0
- package/dist/tui/launch.js +172 -0
- package/dist/tui/project.d.ts +10 -0
- package/dist/tui/project.js +17 -0
- package/dist/tui-app.js +125 -125
- package/dist/verify/actor.d.ts +27 -0
- package/dist/verify/actor.js +292 -0
- package/dist/verify/artifacts.d.ts +47 -0
- package/dist/verify/artifacts.js +373 -0
- package/dist/verify/costs.d.ts +30 -0
- package/dist/verify/costs.js +129 -0
- package/dist/verify/liveness.d.ts +7 -0
- package/dist/verify/liveness.js +72 -0
- package/dist/verify/rerun.d.ts +3 -0
- package/dist/verify/rerun.js +46 -0
- package/dist/verify/shared-world-concurrent.d.ts +11 -0
- package/dist/verify/shared-world-concurrent.js +346 -0
- package/dist/verify/shared-world.d.ts +8 -0
- package/dist/verify/shared-world.js +295 -0
- package/dist/verify/subject.d.ts +17 -0
- package/dist/verify/subject.js +123 -0
- package/dist/verify/verify.d.ts +34 -0
- package/dist/verify/verify.js +333 -0
- package/docs/README.md +67 -0
- package/docs/architecture/actor-contract.md +215 -174
- package/docs/architecture/browser-control.md +51 -37
- package/docs/architecture/comms-inbox.md +8 -8
- package/docs/architecture/desktop-recording.md +2 -2
- package/docs/architecture/desktop-sessions.md +33 -21
- package/docs/architecture/external-public-shared-world.md +80 -64
- package/docs/architecture/github-feedback-loop.md +40 -27
- package/docs/architecture/guest-desktop.md +22 -10
- package/docs/architecture/local-browser-runtime.md +30 -21
- package/docs/architecture/observer-review.md +9 -9
- package/docs/architecture/observer.md +53 -57
- package/docs/architecture/participant-media.md +3 -3
- package/docs/architecture/project-layout.md +33 -137
- package/docs/architecture/real-email-receiving.md +7 -6
- package/docs/architecture/restricted-codex-analysis.md +213 -25
- package/docs/architecture/serve.md +89 -87
- package/docs/architecture/state-driven-executor.md +79 -64
- package/docs/architecture/task-protocol-support.md +18 -18
- package/docs/architecture/terminal-product-lane.md +92 -86
- package/docs/contracts/adapter-admission.md +8 -4
- package/docs/contracts/adapter-fixtures.md +6 -6
- package/docs/contracts/core.md +22 -24
- package/docs/contracts/feedback.md +33 -23
- package/docs/contracts/policy.md +28 -31
- package/docs/contracts/run-bundle.md +168 -82
- package/docs/contracts/schemas.md +563 -379
- package/docs/contracts/study-analysis.md +2 -2
- package/docs/contracts/study-costs.md +12 -12
- package/docs/decisions/0001-run-bundle-is-the-source-of-truth.md +36 -0
- package/docs/decisions/0002-observer-is-one-self-contained-file.md +30 -0
- package/docs/decisions/0003-contained-paths-and-cleanup-authority.md +35 -0
- package/docs/decisions/0004-participant-desktops-stay-in-the-route.md +31 -0
- package/docs/decisions/README.md +16 -0
- package/docs/goals/current.md +22 -50
- package/docs/principles/actor-fidelity.md +37 -40
- package/docs/principles/engineering.md +81 -0
- package/docs/principles/invariants-and-defaults.md +48 -45
- package/docs/principles/self-driving-harness.md +11 -10
- package/docs/principles/three-roles.md +12 -13
- package/docs/product/automatic-analysis.md +39 -9
- package/docs/product/lobby-trivia-3player-external-public.md +14 -13
- package/docs/product/open-source-install-experience.md +34 -38
- package/docs/ramp/README.md +91 -218
- package/docs/release/open-source-readiness.md +5 -2
- package/docs/release/public-readiness-standard.md +1 -1
- package/examples/README.md +11 -0
- package/examples/participant/README.md +80 -0
- package/examples/participant/app.mjs +55 -0
- package/examples/participant/run.mjs +116 -0
- package/examples/scorer/README.md +29 -0
- package/examples/scorer/run.mjs +63 -0
- package/examples/scorer/scorer.mjs +20 -0
- package/package.json +61 -57
- package/skills/humanish/SKILL.md +72 -60
- package/skills/humanish/agents/openai.yaml +2 -2
- package/dist/actor-contract.d.ts +0 -296
- package/dist/actor-contract.js +0 -340
- package/dist/actor-contract.js.map +0 -1
- package/dist/actor-goal-source.js +0 -32
- package/dist/actor-goal-source.js.map +0 -1
- package/dist/actor-registry.d.ts +0 -77
- package/dist/actor-registry.js +0 -106
- package/dist/actor-registry.js.map +0 -1
- package/dist/actor-stop-cause.d.ts +0 -9
- package/dist/actor-stop-cause.js +0 -42
- package/dist/actor-stop-cause.js.map +0 -1
- package/dist/adapter-extension.d.ts +0 -76
- package/dist/adapter-extension.js +0 -273
- package/dist/adapter-extension.js.map +0 -1
- package/dist/adapter-scorer-loader.d.ts +0 -42
- package/dist/adapter-scorer-loader.js +0 -129
- package/dist/adapter-scorer-loader.js.map +0 -1
- package/dist/affordance.d.ts +0 -53
- package/dist/affordance.js +0 -145
- package/dist/affordance.js.map +0 -1
- package/dist/agent-session.js +0 -43
- package/dist/agent-session.js.map +0 -1
- package/dist/argv.d.ts +0 -1
- package/dist/argv.js +0 -8
- package/dist/argv.js.map +0 -1
- package/dist/artifact-reference.d.ts +0 -22
- package/dist/artifact-reference.js +0 -47
- package/dist/artifact-reference.js.map +0 -1
- package/dist/automatic-analysis-completion.d.ts +0 -25
- package/dist/automatic-analysis-completion.js +0 -56
- package/dist/automatic-analysis-completion.js.map +0 -1
- package/dist/automatic-analysis-config.d.ts +0 -38
- package/dist/automatic-analysis-config.js +0 -68
- package/dist/automatic-analysis-config.js.map +0 -1
- package/dist/automatic-study-analysis.d.ts +0 -17
- package/dist/automatic-study-analysis.js +0 -195
- package/dist/automatic-study-analysis.js.map +0 -1
- package/dist/browser-control-client.d.ts +0 -18
- package/dist/browser-control-client.js +0 -176
- package/dist/browser-control-client.js.map +0 -1
- package/dist/browser-control-dispatcher.d.ts +0 -19
- package/dist/browser-control-dispatcher.js +0 -147
- package/dist/browser-control-dispatcher.js.map +0 -1
- package/dist/browser-control-protocol.d.ts +0 -472
- package/dist/browser-control-protocol.js +0 -185
- package/dist/browser-control-protocol.js.map +0 -1
- package/dist/browser-control-recording-transfer.d.ts +0 -4
- package/dist/browser-control-recording-transfer.js +0 -42
- package/dist/browser-control-recording-transfer.js.map +0 -1
- package/dist/browser-control-transport.d.ts +0 -27
- package/dist/browser-control-transport.js +0 -177
- package/dist/browser-control-transport.js.map +0 -1
- package/dist/browser-evidence-hygiene.js +0 -43
- package/dist/browser-evidence-hygiene.js.map +0 -1
- package/dist/chrome-cdp-probe.d.ts +0 -97
- package/dist/chrome-cdp-probe.js +0 -536
- package/dist/chrome-cdp-probe.js.map +0 -1
- package/dist/claude-agent-sdk.d.ts +0 -94
- package/dist/claude-agent-sdk.js +0 -367
- package/dist/claude-agent-sdk.js.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/codex-app-server-ui.d.ts +0 -39
- package/dist/codex-app-server-ui.js +0 -357
- package/dist/codex-app-server-ui.js.map +0 -1
- package/dist/codex-app-server.d.ts +0 -144
- package/dist/codex-app-server.js +0 -754
- package/dist/codex-app-server.js.map +0 -1
- package/dist/command-failure.d.ts +0 -43
- package/dist/command-failure.js +0 -73
- package/dist/command-failure.js.map +0 -1
- package/dist/comms-agentmail.d.ts +0 -25
- package/dist/comms-agentmail.js +0 -418
- package/dist/comms-agentmail.js.map +0 -1
- package/dist/comms-catch-host.d.ts +0 -52
- package/dist/comms-catch-host.js +0 -178
- package/dist/comms-catch-host.js.map +0 -1
- package/dist/comms-connections.d.ts +0 -52
- package/dist/comms-connections.js +0 -123
- package/dist/comms-connections.js.map +0 -1
- package/dist/comms-email-catch.d.ts +0 -54
- package/dist/comms-email-catch.js +0 -212
- package/dist/comms-email-catch.js.map +0 -1
- package/dist/comms-evidence.d.ts +0 -27
- package/dist/comms-evidence.js +0 -31
- package/dist/comms-evidence.js.map +0 -1
- package/dist/comms-fake-inbox.d.ts +0 -45
- package/dist/comms-fake-inbox.js +0 -184
- package/dist/comms-fake-inbox.js.map +0 -1
- package/dist/comms-images.d.ts +0 -7
- package/dist/comms-images.js +0 -39
- package/dist/comms-images.js.map +0 -1
- package/dist/comms-inbox.d.ts +0 -66
- package/dist/comms-inbox.js +0 -389
- package/dist/comms-inbox.js.map +0 -1
- package/dist/comms-lease-store.d.ts +0 -91
- package/dist/comms-lease-store.js +0 -495
- package/dist/comms-lease-store.js.map +0 -1
- package/dist/comms-receiving-evidence.d.ts +0 -46
- package/dist/comms-receiving-evidence.js +0 -35
- package/dist/comms-receiving-evidence.js.map +0 -1
- package/dist/comms-receiving-inbox.d.ts +0 -16
- package/dist/comms-receiving-inbox.js +0 -410
- package/dist/comms-receiving-inbox.js.map +0 -1
- package/dist/comms-receiving-runtime.d.ts +0 -25
- package/dist/comms-receiving-runtime.js +0 -45
- package/dist/comms-receiving-runtime.js.map +0 -1
- package/dist/comms-receiving-types.d.ts +0 -98
- package/dist/comms-receiving-types.js +0 -2
- package/dist/comms-receiving-types.js.map +0 -1
- package/dist/comms-receiving.d.ts +0 -58
- package/dist/comms-receiving.js +0 -554
- package/dist/comms-receiving.js.map +0 -1
- package/dist/comms-sandbox-catch.d.ts +0 -229
- package/dist/comms-sandbox-catch.js +0 -737
- package/dist/comms-sandbox-catch.js.map +0 -1
- package/dist/comms-setup.d.ts +0 -40
- package/dist/comms-setup.js +0 -121
- package/dist/comms-setup.js.map +0 -1
- package/dist/comms-types.d.ts +0 -72
- package/dist/comms-types.js +0 -10
- package/dist/comms-types.js.map +0 -1
- package/dist/computer-use-actor.d.ts +0 -76
- package/dist/computer-use-actor.js +0 -68
- package/dist/computer-use-actor.js.map +0 -1
- package/dist/computer-use.d.ts +0 -429
- package/dist/computer-use.js +0 -1751
- package/dist/computer-use.js.map +0 -1
- package/dist/concurrency.js +0 -27
- package/dist/concurrency.js.map +0 -1
- package/dist/concurrent-shared-world-lab.d.ts +0 -186
- package/dist/concurrent-shared-world-lab.js +0 -2181
- package/dist/concurrent-shared-world-lab.js.map +0 -1
- package/dist/core/git-state.d.ts +0 -33
- package/dist/core/git-state.js +0 -277
- package/dist/core/git-state.js.map +0 -1
- package/dist/core/git-workspace.d.ts +0 -31
- package/dist/core/git-workspace.js +0 -447
- package/dist/core/git-workspace.js.map +0 -1
- package/dist/core/index.d.ts +0 -4
- package/dist/core/index.js +0 -3
- package/dist/core/index.js.map +0 -1
- package/dist/core/run-primitives.d.ts +0 -66
- package/dist/core/run-primitives.js +0 -120
- package/dist/core/run-primitives.js.map +0 -1
- package/dist/cua-actor-lab.d.ts +0 -855
- package/dist/cua-actor-lab.js +0 -3543
- package/dist/cua-actor-lab.js.map +0 -1
- package/dist/cua-admission-limit.d.ts +0 -12
- package/dist/cua-admission-limit.js +0 -20
- package/dist/cua-admission-limit.js.map +0 -1
- package/dist/cua-desktop-lane.d.ts +0 -35
- package/dist/cua-desktop-lane.js +0 -13
- package/dist/cua-desktop-lane.js.map +0 -1
- package/dist/cua-diagnostics.d.ts +0 -38
- package/dist/cua-diagnostics.js +0 -68
- package/dist/cua-diagnostics.js.map +0 -1
- package/dist/cua-executor-error.js +0 -48
- package/dist/cua-executor-error.js.map +0 -1
- package/dist/cua-provider-error.d.ts +0 -16
- package/dist/cua-provider-error.js +0 -35
- package/dist/cua-provider-error.js.map +0 -1
- package/dist/cua-speech.js +0 -2
- package/dist/cua-speech.js.map +0 -1
- package/dist/desktop-recorder.d.ts +0 -39
- package/dist/desktop-recorder.js +0 -226
- package/dist/desktop-recorder.js.map +0 -1
- package/dist/desktop-recording-artifact.d.ts +0 -5
- package/dist/desktop-recording-artifact.js +0 -54
- package/dist/desktop-recording-artifact.js.map +0 -1
- package/dist/desktop-recording-types.d.ts +0 -24
- package/dist/desktop-recording-types.js +0 -14
- package/dist/desktop-recording-types.js.map +0 -1
- package/dist/desktop-session.d.ts +0 -41
- package/dist/desktop-session.js +0 -47
- package/dist/desktop-session.js.map +0 -1
- package/dist/device-presets.d.ts +0 -67
- package/dist/device-presets.js +0 -55
- package/dist/device-presets.js.map +0 -1
- package/dist/doctor-lab.d.ts +0 -38
- package/dist/doctor-lab.js +0 -126
- package/dist/doctor-lab.js.map +0 -1
- package/dist/e2b-cua-desktop.d.ts +0 -3
- package/dist/e2b-cua-desktop.js +0 -708
- package/dist/e2b-cua-desktop.js.map +0 -1
- package/dist/e2b-cua-provisioning.d.ts +0 -314
- package/dist/e2b-cua-provisioning.js +0 -1219
- package/dist/e2b-cua-provisioning.js.map +0 -1
- package/dist/e2b-desktop-executor.d.ts +0 -101
- package/dist/e2b-desktop-executor.js +0 -297
- package/dist/e2b-desktop-executor.js.map +0 -1
- package/dist/e2b-desktop-launch.d.ts +0 -243
- package/dist/e2b-desktop-launch.js +0 -234
- package/dist/e2b-desktop-launch.js.map +0 -1
- package/dist/e2b-desktop-media.d.ts +0 -14
- package/dist/e2b-desktop-media.js +0 -58
- package/dist/e2b-desktop-media.js.map +0 -1
- package/dist/e2b-desktop-recording.d.ts +0 -16
- package/dist/e2b-desktop-recording.js +0 -162
- package/dist/e2b-desktop-recording.js.map +0 -1
- package/dist/e2b-desktop-resources.d.ts +0 -11
- package/dist/e2b-desktop-resources.js +0 -33
- package/dist/e2b-desktop-resources.js.map +0 -1
- package/dist/e2b-desktop-screenshot-cleanup.d.ts +0 -15
- package/dist/e2b-desktop-screenshot-cleanup.js +0 -67
- package/dist/e2b-desktop-screenshot-cleanup.js.map +0 -1
- package/dist/e2b-desktop-session.d.ts +0 -7
- package/dist/e2b-desktop-session.js +0 -29
- package/dist/e2b-desktop-session.js.map +0 -1
- package/dist/e2b-detached.d.ts +0 -53
- package/dist/e2b-detached.js +0 -130
- package/dist/e2b-detached.js.map +0 -1
- package/dist/e2b-terminal-lab.d.ts +0 -383
- package/dist/e2b-terminal-lab.js +0 -2000
- package/dist/e2b-terminal-lab.js.map +0 -1
- package/dist/env-file.d.ts +0 -14
- package/dist/env-file.js +0 -108
- package/dist/env-file.js.map +0 -1
- package/dist/export-bundle.d.ts +0 -7
- package/dist/export-bundle.js +0 -441
- package/dist/export-bundle.js.map +0 -1
- package/dist/export.d.ts +0 -49
- package/dist/export.js +0 -308
- package/dist/export.js.map +0 -1
- package/dist/feedback-proof.d.ts +0 -8
- package/dist/feedback-proof.js +0 -44
- package/dist/feedback-proof.js.map +0 -1
- package/dist/feedback.d.ts +0 -76
- package/dist/feedback.js +0 -496
- package/dist/feedback.js.map +0 -1
- package/dist/first-run-path.d.ts +0 -55
- package/dist/first-run-path.js +0 -136
- package/dist/first-run-path.js.map +0 -1
- package/dist/frame-signature.d.ts +0 -24
- package/dist/frame-signature.js +0 -128
- package/dist/frame-signature.js.map +0 -1
- package/dist/guest-bootstrap.d.ts +0 -55
- package/dist/guest-bootstrap.js +0 -285
- package/dist/guest-bootstrap.js.map +0 -1
- package/dist/guest-browser-tools.d.ts +0 -8
- package/dist/guest-browser-tools.js +0 -66
- package/dist/guest-browser-tools.js.map +0 -1
- package/dist/guest-chromium-text.d.ts +0 -27
- package/dist/guest-chromium-text.js +0 -281
- package/dist/guest-chromium-text.js.map +0 -1
- package/dist/guest-desktop-executor.d.ts +0 -22
- package/dist/guest-desktop-executor.js +0 -178
- package/dist/guest-desktop-executor.js.map +0 -1
- package/dist/guest-desktop-media.d.ts +0 -33
- package/dist/guest-desktop-media.js +0 -281
- package/dist/guest-desktop-media.js.map +0 -1
- package/dist/guest-desktop-native.d.ts +0 -14
- package/dist/guest-desktop-native.js +0 -131
- package/dist/guest-desktop-native.js.map +0 -1
- package/dist/guest-media-config.d.ts +0 -15
- package/dist/guest-media-config.js +0 -8
- package/dist/guest-media-config.js.map +0 -1
- package/dist/guest-media-worker.js.map +0 -1
- package/dist/guest-runtime-desktop.d.ts +0 -42
- package/dist/guest-runtime-desktop.js +0 -314
- package/dist/guest-runtime-desktop.js.map +0 -1
- package/dist/guest-runtime-main.js.map +0 -1
- package/dist/guest-runtime-revision.js.map +0 -1
- package/dist/guest-runtime.d.ts +0 -31
- package/dist/guest-runtime.js +0 -99
- package/dist/guest-runtime.js.map +0 -1
- package/dist/image-evidence.d.ts +0 -2
- package/dist/image-evidence.js +0 -47
- package/dist/image-evidence.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/init-templates.d.ts +0 -25
- package/dist/init-templates.js +0 -541
- package/dist/init-templates.js.map +0 -1
- package/dist/init.d.ts +0 -38
- package/dist/init.js +0 -532
- package/dist/init.js.map +0 -1
- package/dist/key-resolution.d.ts +0 -67
- package/dist/key-resolution.js +0 -375
- package/dist/key-resolution.js.map +0 -1
- package/dist/lab-app-runner.d.ts +0 -78
- package/dist/lab-app-runner.js +0 -403
- package/dist/lab-app-runner.js.map +0 -1
- package/dist/lab-config.d.ts +0 -968
- package/dist/lab-config.js +0 -2714
- package/dist/lab-config.js.map +0 -1
- package/dist/lab-engine.d.ts +0 -97
- package/dist/lab-engine.js +0 -285
- package/dist/lab-engine.js.map +0 -1
- package/dist/lab-preflight.d.ts +0 -70
- package/dist/lab-preflight.js +0 -388
- package/dist/lab-preflight.js.map +0 -1
- package/dist/lab-summary.d.ts +0 -57
- package/dist/lab-summary.js +0 -126
- package/dist/lab-summary.js.map +0 -1
- package/dist/labs.d.ts +0 -66
- package/dist/labs.js +0 -401
- package/dist/labs.js.map +0 -1
- package/dist/listen.js +0 -84
- package/dist/listen.js.map +0 -1
- package/dist/local-agent-claude-session.d.ts +0 -45
- package/dist/local-agent-claude-session.js +0 -203
- package/dist/local-agent-claude-session.js.map +0 -1
- package/dist/local-agent-cli.d.ts +0 -121
- package/dist/local-agent-cli.js +0 -427
- package/dist/local-agent-cli.js.map +0 -1
- package/dist/local-captured-inbox.d.ts +0 -6
- package/dist/local-captured-inbox.js +0 -65
- package/dist/local-captured-inbox.js.map +0 -1
- package/dist/local-firecracker-desktop.d.ts +0 -23
- package/dist/local-firecracker-desktop.js +0 -191
- package/dist/local-firecracker-desktop.js.map +0 -1
- package/dist/local-firecracker-study.d.ts +0 -9
- package/dist/local-firecracker-study.js +0 -135
- package/dist/local-firecracker-study.js.map +0 -1
- package/dist/local-runtime-config.d.ts +0 -6
- package/dist/local-runtime-config.js +0 -60
- package/dist/local-runtime-config.js.map +0 -1
- package/dist/local-runtime-host.d.ts +0 -31
- package/dist/local-runtime-host.js +0 -128
- package/dist/local-runtime-host.js.map +0 -1
- package/dist/local-runtime-release.d.ts +0 -7
- package/dist/local-runtime-release.js +0 -33
- package/dist/local-runtime-release.js.map +0 -1
- package/dist/local-runtime-ssh.d.ts +0 -27
- package/dist/local-runtime-ssh.js +0 -91
- package/dist/local-runtime-ssh.js.map +0 -1
- package/dist/local-runtime.d.ts +0 -25
- package/dist/local-runtime.js +0 -133
- package/dist/local-runtime.js.map +0 -1
- package/dist/observer-data.d.ts +0 -114
- package/dist/observer-data.js +0 -224
- package/dist/observer-data.js.map +0 -1
- package/dist/observer-library.js +0 -191
- package/dist/observer-library.js.map +0 -1
- package/dist/observer-serve.d.ts +0 -99
- package/dist/observer-serve.js +0 -284
- package/dist/observer-serve.js.map +0 -1
- package/dist/observer-static.js +0 -357
- package/dist/observer-static.js.map +0 -1
- package/dist/observer.d.ts +0 -118
- package/dist/observer.js +0 -947
- package/dist/observer.js.map +0 -1
- package/dist/openai-responses-cu.d.ts +0 -158
- package/dist/openai-responses-cu.js +0 -714
- package/dist/openai-responses-cu.js.map +0 -1
- package/dist/orientation.d.ts +0 -29
- package/dist/orientation.js +0 -95
- package/dist/orientation.js.map +0 -1
- package/dist/oss-lab.d.ts +0 -55
- package/dist/oss-lab.js +0 -344
- package/dist/oss-lab.js.map +0 -1
- package/dist/oss-meta-lab-scoring.d.ts +0 -15
- package/dist/oss-meta-lab-scoring.js +0 -145
- package/dist/oss-meta-lab-scoring.js.map +0 -1
- package/dist/oss-meta-lab.d.ts +0 -287
- package/dist/oss-meta-lab.js +0 -4551
- package/dist/oss-meta-lab.js.map +0 -1
- package/dist/oss-remote-telemetry.d.ts +0 -77
- package/dist/oss-remote-telemetry.js +0 -403
- package/dist/oss-remote-telemetry.js.map +0 -1
- package/dist/output-token-limit.js +0 -5
- package/dist/output-token-limit.js.map +0 -1
- package/dist/participant-assignment.d.ts +0 -12
- package/dist/participant-assignment.js +0 -15
- package/dist/participant-assignment.js.map +0 -1
- package/dist/persona-resolve.d.ts +0 -44
- package/dist/persona-resolve.js +0 -99
- package/dist/persona-resolve.js.map +0 -1
- package/dist/persona.d.ts +0 -39
- package/dist/persona.js +0 -144
- package/dist/persona.js.map +0 -1
- package/dist/pi-agent-core.d.ts +0 -77
- package/dist/pi-agent-core.js +0 -207
- package/dist/pi-agent-core.js.map +0 -1
- package/dist/pricing.d.ts +0 -145
- package/dist/pricing.js +0 -277
- package/dist/pricing.js.map +0 -1
- package/dist/program.d.ts +0 -96
- package/dist/program.js +0 -4030
- package/dist/program.js.map +0 -1
- package/dist/reasoning-effort.js +0 -26
- package/dist/reasoning-effort.js.map +0 -1
- package/dist/reclaim.d.ts +0 -31
- package/dist/reclaim.js +0 -90
- package/dist/reclaim.js.map +0 -1
- package/dist/redaction.d.ts +0 -90
- package/dist/redaction.js +0 -294
- package/dist/redaction.js.map +0 -1
- package/dist/restricted-codex-analysis.d.ts +0 -15
- package/dist/restricted-codex-analysis.js +0 -13
- package/dist/restricted-codex-analysis.js.map +0 -1
- package/dist/restricted-codex-participant-policy.d.ts +0 -44
- package/dist/restricted-codex-participant-policy.js +0 -43
- package/dist/restricted-codex-participant-policy.js.map +0 -1
- package/dist/restricted-codex-participant-run.d.ts +0 -20
- package/dist/restricted-codex-participant-run.js +0 -79
- package/dist/restricted-codex-participant-run.js.map +0 -1
- package/dist/restricted-codex-participant.d.ts +0 -20
- package/dist/restricted-codex-participant.js +0 -250
- package/dist/restricted-codex-participant.js.map +0 -1
- package/dist/restricted-codex-policy.d.ts +0 -64
- package/dist/restricted-codex-policy.js +0 -176
- package/dist/restricted-codex-policy.js.map +0 -1
- package/dist/restricted-codex-session.d.ts +0 -44
- package/dist/restricted-codex-session.js +0 -657
- package/dist/restricted-codex-session.js.map +0 -1
- package/dist/restricted-codex-transport.d.ts +0 -69
- package/dist/restricted-codex-transport.js +0 -296
- package/dist/restricted-codex-transport.js.map +0 -1
- package/dist/run-detail.d.ts +0 -61
- package/dist/run-detail.js +0 -137
- package/dist/run-detail.js.map +0 -1
- package/dist/run-index.d.ts +0 -71
- package/dist/run-index.js +0 -206
- package/dist/run-index.js.map +0 -1
- package/dist/run-narration-secrets.js +0 -68
- package/dist/run-narration-secrets.js.map +0 -1
- package/dist/run-paths.d.ts +0 -56
- package/dist/run-paths.js +0 -355
- package/dist/run-paths.js.map +0 -1
- package/dist/run-projection.d.ts +0 -186
- package/dist/run-projection.js +0 -350
- package/dist/run-projection.js.map +0 -1
- package/dist/run-status.d.ts +0 -139
- package/dist/run-status.js +0 -218
- package/dist/run-status.js.map +0 -1
- package/dist/run.d.ts +0 -1255
- package/dist/run.js +0 -5949
- package/dist/run.js.map +0 -1
- package/dist/sandbox-receipts.d.ts +0 -19
- package/dist/sandbox-receipts.js +0 -51
- package/dist/sandbox-receipts.js.map +0 -1
- package/dist/screenshot-image.d.ts +0 -11
- package/dist/screenshot-image.js +0 -26
- package/dist/screenshot-image.js.map +0 -1
- package/dist/scripted-browser-actor.d.ts +0 -297
- package/dist/scripted-browser-actor.js +0 -1399
- package/dist/scripted-browser-actor.js.map +0 -1
- package/dist/scripted-browser-lab.d.ts +0 -121
- package/dist/scripted-browser-lab.js +0 -852
- package/dist/scripted-browser-lab.js.map +0 -1
- package/dist/secret-prompt.js +0 -36
- package/dist/secret-prompt.js.map +0 -1
- package/dist/selected-output-paths.d.ts +0 -52
- package/dist/selected-output-paths.js +0 -366
- package/dist/selected-output-paths.js.map +0 -1
- package/dist/serve-exposure.d.ts +0 -62
- package/dist/serve-exposure.js +0 -129
- package/dist/serve-exposure.js.map +0 -1
- package/dist/serve-http.js +0 -45
- package/dist/serve-http.js.map +0 -1
- package/dist/serve-tunnel.js +0 -113
- package/dist/serve-tunnel.js.map +0 -1
- package/dist/shared-world-lab.d.ts +0 -269
- package/dist/shared-world-lab.js +0 -1424
- package/dist/shared-world-lab.js.map +0 -1
- package/dist/source-archive.d.ts +0 -82
- package/dist/source-archive.js +0 -408
- package/dist/source-archive.js.map +0 -1
- package/dist/stats.d.ts +0 -82
- package/dist/stats.js +0 -219
- package/dist/stats.js.map +0 -1
- package/dist/stop-conditions.d.ts +0 -39
- package/dist/stop-conditions.js +0 -66
- package/dist/stop-conditions.js.map +0 -1
- package/dist/study-analysis-codex-config.d.ts +0 -11
- package/dist/study-analysis-codex-config.js +0 -34
- package/dist/study-analysis-codex-config.js.map +0 -1
- package/dist/study-analysis-engine.d.ts +0 -47
- package/dist/study-analysis-engine.js +0 -327
- package/dist/study-analysis-engine.js.map +0 -1
- package/dist/study-analysis-evidence.d.ts +0 -27
- package/dist/study-analysis-evidence.js +0 -660
- package/dist/study-analysis-evidence.js.map +0 -1
- package/dist/study-analysis-job.d.ts +0 -97
- package/dist/study-analysis-job.js +0 -214
- package/dist/study-analysis-job.js.map +0 -1
- package/dist/study-analysis-provider.d.ts +0 -40
- package/dist/study-analysis-provider.js +0 -170
- package/dist/study-analysis-provider.js.map +0 -1
- package/dist/study-analysis-service.d.ts +0 -59
- package/dist/study-analysis-service.js +0 -257
- package/dist/study-analysis-service.js.map +0 -1
- package/dist/study-analysis-sharing.d.ts +0 -11
- package/dist/study-analysis-sharing.js +0 -35
- package/dist/study-analysis-sharing.js.map +0 -1
- package/dist/study-analysis-store.d.ts +0 -47
- package/dist/study-analysis-store.js +0 -493
- package/dist/study-analysis-store.js.map +0 -1
- package/dist/study-analysis-validation.d.ts +0 -618
- package/dist/study-analysis-validation.js +0 -384
- package/dist/study-analysis-validation.js.map +0 -1
- package/dist/study-analysis.d.ts +0 -206
- package/dist/study-analysis.js +0 -4
- package/dist/study-analysis.js.map +0 -1
- package/dist/study-costs.js +0 -114
- package/dist/study-costs.js.map +0 -1
- package/dist/subject-runtime.d.ts +0 -23
- package/dist/subject-runtime.js +0 -70
- package/dist/subject-runtime.js.map +0 -1
- package/dist/tasks.d.ts +0 -90
- package/dist/tasks.js +0 -144
- package/dist/tasks.js.map +0 -1
- package/dist/telemetry.js +0 -324
- package/dist/telemetry.js.map +0 -1
- package/dist/terminal-agent-actor.d.ts +0 -41
- package/dist/terminal-agent-actor.js +0 -25
- package/dist/terminal-agent-actor.js.map +0 -1
- package/dist/terminal-encoding.js +0 -80
- package/dist/terminal-encoding.js.map +0 -1
- package/dist/terminal-node-bootstrap.d.ts +0 -4
- package/dist/terminal-node-bootstrap.js +0 -58
- package/dist/terminal-node-bootstrap.js.map +0 -1
- package/dist/terminal-participant-activity.d.ts +0 -6
- package/dist/terminal-participant-activity.js +0 -34
- package/dist/terminal-participant-activity.js.map +0 -1
- package/dist/terminal-runtime-auth.d.ts +0 -13
- package/dist/terminal-runtime-auth.js +0 -24
- package/dist/terminal-runtime-auth.js.map +0 -1
- package/dist/terminal-runtime.d.ts +0 -16
- package/dist/terminal-runtime.js +0 -42
- package/dist/terminal-runtime.js.map +0 -1
- package/dist/terminal-token-usage.d.ts +0 -15
- package/dist/terminal-token-usage.js +0 -94
- package/dist/terminal-token-usage.js.map +0 -1
- package/dist/tui-actions.d.ts +0 -39
- package/dist/tui-actions.js +0 -178
- package/dist/tui-actions.js.map +0 -1
- package/dist/tui-contract.d.ts +0 -141
- package/dist/tui-contract.js +0 -54
- package/dist/tui-contract.js.map +0 -1
- package/dist/tui-launch.js +0 -167
- package/dist/tui-launch.js.map +0 -1
- package/dist/tui-project.d.ts +0 -9
- package/dist/tui-project.js +0 -18
- package/dist/tui-project.js.map +0 -1
- package/docs/architecture/examples/state-driven-local-app/README.md +0 -80
- package/docs/architecture/examples/state-driven-local-app/app.mjs +0 -48
- package/docs/architecture/examples/state-driven-local-app/runner.mjs +0 -105
- package/docs/architecture/local-codex-tui-actor.md +0 -213
- package/docs/architecture/oss-lab-poc.md +0 -250
- package/docs/architecture/runtime-broker-core.md +0 -30
- package/docs/release/0.100.0-local-setup.md +0 -31
- package/docs/release/0.100.1-participant-continuity.md +0 -20
- package/docs/release/0.101.0-codex-ui-tools.md +0 -28
- package/docs/release/0.102.0-participant-media.md +0 -43
- package/docs/release/0.103.0-desktop-recording.md +0 -29
- package/docs/release/0.103.1-analysis-capture-allocation.md +0 -18
- package/docs/release/0.103.2-analysis-ending-context.md +0 -21
- package/docs/release/0.104.0-local-captured-inboxes.md +0 -29
- package/docs/release/0.104.1-recording-startup.md +0 -24
- package/docs/release/0.104.2-recording-timestamps.md +0 -32
- package/docs/release/0.104.3-local-smtp-catch.md +0 -15
- package/docs/release/0.105.0-participant-backgrounds.md +0 -50
- package/docs/release/0.20.0-external-public-shared-world.md +0 -43
- package/docs/release/0.84.0-redacted-evidence.md +0 -42
- package/docs/release/0.84.1-portable-feedback.md +0 -20
- package/docs/release/0.85.0-observer-review.md +0 -56
- package/docs/release/0.85.1-observer-continuity.md +0 -20
- package/docs/release/0.86.0-participant-evidence.md +0 -50
- package/docs/release/0.86.1-task-preflight-saved-recordings.md +0 -40
- package/docs/release/0.87.0-participant-endings-and-phone-review.md +0 -64
- package/docs/release/0.88.0-study-diagnostics.md +0 -43
- package/docs/release/0.88.1-completion-evidence-and-local-app.md +0 -79
- package/docs/release/0.88.2-sequential-study-budgets.md +0 -57
- package/docs/release/0.89.0-study-findings.md +0 -79
- package/docs/release/0.89.1-analysis-finished-notice.md +0 -24
- package/docs/release/0.90.0-automatic-analysis.md +0 -21
- package/docs/release/0.91.0-analysis-quality-and-defaults.md +0 -33
- package/docs/release/0.91.1-study-review-polish.md +0 -28
- package/docs/release/0.92.0-grid-playback.md +0 -22
- package/docs/release/0.93.0-global-playback.md +0 -26
- package/docs/release/0.93.1-observer-review-controls.md +0 -24
- package/docs/release/0.94.0-reliability.md +0 -48
- package/docs/release/0.95.0-connections-setup.md +0 -38
- package/docs/release/0.96.0-real-email-receiving.md +0 -47
- package/docs/release/0.96.1-browser-navigation.md +0 -22
- package/docs/release/0.97.0-codex-account-analysis.md +0 -45
- package/docs/release/0.98.0-local-browser-studies.md +0 -31
- package/docs/release/0.99.0-local-browser-mac.md +0 -34
- package/docs/release/0.99.1-action-recovery.md +0 -19
- /package/dist/{agent-session.d.ts → actors/agent-session.d.ts} +0 -0
- /package/dist/{cua-executor-error.d.ts → actors/computer-use/executor-error.d.ts} +0 -0
- /package/dist/{cua-speech.d.ts → actors/computer-use/speech.d.ts} +0 -0
- /package/dist/{actor-goal-source.d.ts → actors/goal-source.d.ts} +0 -0
- /package/dist/{output-token-limit.d.ts → actors/output-token-limit.d.ts} +0 -0
- /package/dist/{reasoning-effort.d.ts → actors/reasoning-effort.d.ts} +0 -0
- /package/dist/{secret-prompt.d.ts → cli/secret-prompt.d.ts} +0 -0
- /package/dist/{telemetry.d.ts → cli/telemetry.d.ts} +0 -0
- /package/dist/{browser-evidence-hygiene.d.ts → evidence/browser-hygiene.d.ts} +0 -0
- /package/dist/{serve-http.d.ts → observer/http.d.ts} +0 -0
- /package/dist/{observer-library.d.ts → observer/library.d.ts} +0 -0
- /package/dist/{listen.d.ts → observer/listen.d.ts} +0 -0
- /package/dist/{observer-static.d.ts → observer/static.d.ts} +0 -0
- /package/dist/{serve-tunnel.d.ts → observer/tunnel.d.ts} +0 -0
- /package/dist/{terminal-encoding.d.ts → routes/terminal/encoding.d.ts} +0 -0
- /package/dist/{concurrency.d.ts → run/concurrency.d.ts} +0 -0
- /package/dist/{study-costs.d.ts → run/costs.d.ts} +0 -0
- /package/dist/{run-narration-secrets.d.ts → run/transient-comms-secrets.d.ts} +0 -0
- /package/dist/{tui-launch.d.ts → tui/launch.d.ts} +0 -0
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
// Local working-tree packaging for `subject.source: local-tree`.
|
|
2
|
+
//
|
|
3
|
+
// Enumeration produces ONE file list that drives BOTH the tar archive and the
|
|
4
|
+
// content digest (archiveSha256), so the digest can never diverge from what
|
|
5
|
+
// actually gets packed. A prior in-house harness reimplemented exclusion in a
|
|
6
|
+
// second, independent digest walker that could drift from what its tar
|
|
7
|
+
// `--exclude` flags actually excluded; this file is deliberately designed so
|
|
8
|
+
// that cannot happen: enumerateLocalTree() builds one entries array, and both
|
|
9
|
+
// the hash and the tar file list are derived from that same array.
|
|
10
|
+
//
|
|
11
|
+
// See docs/goals/local-tree-subject/goal.md ("Packing design") for the full
|
|
12
|
+
// contract implemented here. Node builtins only, no npm dependencies.
|
|
13
|
+
import { execFileSync } from "node:child_process";
|
|
14
|
+
import { createHash } from "node:crypto";
|
|
15
|
+
import { lstatSync, mkdirSync, mkdtempSync, readdirSync, readFileSync, readlinkSync, rmSync, statSync, writeFileSync, } from "node:fs";
|
|
16
|
+
import { tmpdir } from "node:os";
|
|
17
|
+
import path from "node:path";
|
|
18
|
+
/**
|
|
19
|
+
* Path segments that are always excluded, wherever they appear in a relPath,
|
|
20
|
+
* in both git and fallback enumeration modes. Not overridable by callers.
|
|
21
|
+
*/
|
|
22
|
+
// ".homun" stays denied: user trees may still carry runtime dirs from before the humanish rename.
|
|
23
|
+
export const LOCAL_TREE_DENYLIST_PATH_SEGMENTS = [
|
|
24
|
+
".git",
|
|
25
|
+
"node_modules",
|
|
26
|
+
".humanish",
|
|
27
|
+
".homun",
|
|
28
|
+
];
|
|
29
|
+
/**
|
|
30
|
+
* Basename glob patterns (single leading or trailing `*` only) that are always
|
|
31
|
+
* excluded, in both git and fallback enumeration modes. Not overridable by
|
|
32
|
+
* callers. This is a safety net for secret-shaped files that were never
|
|
33
|
+
* gitignored; in git mode `.gitignore` already handles the bulk (build output,
|
|
34
|
+
* caches).
|
|
35
|
+
*/
|
|
36
|
+
export const LOCAL_TREE_DENYLIST_BASENAME_PATTERNS = [
|
|
37
|
+
".env*",
|
|
38
|
+
"*.pem",
|
|
39
|
+
"*.key",
|
|
40
|
+
"*.p12",
|
|
41
|
+
"*.pfx",
|
|
42
|
+
"id_rsa*",
|
|
43
|
+
"id_dsa*",
|
|
44
|
+
"id_ed25519*",
|
|
45
|
+
"id_ecdsa*",
|
|
46
|
+
"*.keystore",
|
|
47
|
+
"*.jks",
|
|
48
|
+
"*.ppk",
|
|
49
|
+
"*.gpg",
|
|
50
|
+
"*.tfstate",
|
|
51
|
+
"terraform.tfstate.backup",
|
|
52
|
+
".npmrc",
|
|
53
|
+
".netrc",
|
|
54
|
+
".dockercfg",
|
|
55
|
+
"kubeconfig",
|
|
56
|
+
"credentials.json",
|
|
57
|
+
"service-account.json",
|
|
58
|
+
"serviceAccount.json",
|
|
59
|
+
"service_account.json",
|
|
60
|
+
"secrets.json",
|
|
61
|
+
"secrets.yaml",
|
|
62
|
+
"secrets.yml",
|
|
63
|
+
"auth.json",
|
|
64
|
+
];
|
|
65
|
+
/** Default upload size cap: 256 MiB. */
|
|
66
|
+
export const DEFAULT_LOCAL_TREE_MAX_ARCHIVE_BYTES = 256 * 1024 * 1024;
|
|
67
|
+
/**
|
|
68
|
+
* Enumerate the packable entries of a local working tree.
|
|
69
|
+
*
|
|
70
|
+
* When root is a git work tree, the list is `git ls-files --cached --others
|
|
71
|
+
* --exclude-standard -z`: tracked files plus untracked-but-not-ignored files,
|
|
72
|
+
* honoring .gitignore exactly as git does. Entries that no longer exist on
|
|
73
|
+
* disk (staged deletes) are dropped, and entries that resolve to a directory
|
|
74
|
+
* on disk (a nested repo or worktree boundary) are dropped rather than
|
|
75
|
+
* recursed into.
|
|
76
|
+
*
|
|
77
|
+
* Otherwise, a recursive readdir walk applies only the always-on denylist
|
|
78
|
+
* plus extraExclude; .gitignore semantics require git, so this fallback is
|
|
79
|
+
* coarser by design.
|
|
80
|
+
*
|
|
81
|
+
* The always-on denylist is applied in both modes and is not overridable.
|
|
82
|
+
* The returned entries are sorted bytewise by relPath.
|
|
83
|
+
*/
|
|
84
|
+
export function enumerateLocalTree(root, options = {}) {
|
|
85
|
+
const resolvedRoot = path.resolve(root);
|
|
86
|
+
assertValidRoot(resolvedRoot);
|
|
87
|
+
const extraExclude = (options.extraExclude ?? []).map(normalizeExtraExcludeEntry);
|
|
88
|
+
if (isGitWorkTree(resolvedRoot)) {
|
|
89
|
+
const entries = enumerateGitTree(resolvedRoot, extraExclude);
|
|
90
|
+
const git = captureGitInfo(resolvedRoot);
|
|
91
|
+
return git ? { entries, git } : { entries };
|
|
92
|
+
}
|
|
93
|
+
const entries = [];
|
|
94
|
+
walkFallbackTree(resolvedRoot, "", extraExclude, entries);
|
|
95
|
+
entries.sort(compareEntriesByRelPath);
|
|
96
|
+
return { entries };
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Enumerate a local working tree and pack it into a gzipped tar archive,
|
|
100
|
+
* computing archiveSha256 from the exact same entries list used for the tar
|
|
101
|
+
* file list.
|
|
102
|
+
*
|
|
103
|
+
* Fails closed when: the root is missing or not a directory; enumeration
|
|
104
|
+
* produces zero entries; or total packed bytes exceed maxArchiveBytes.
|
|
105
|
+
*/
|
|
106
|
+
export function createLocalTreeArchive(root, options = {}) {
|
|
107
|
+
const resolvedRoot = path.resolve(root);
|
|
108
|
+
const extraExclude = options.extraExclude ?? [];
|
|
109
|
+
const maxArchiveBytes = options.maxArchiveBytes ?? DEFAULT_LOCAL_TREE_MAX_ARCHIVE_BYTES;
|
|
110
|
+
const { entries, git } = enumerateLocalTree(resolvedRoot, extraExclude.length > 0 ? { extraExclude } : undefined);
|
|
111
|
+
if (entries.length === 0) {
|
|
112
|
+
throw new Error(`Local tree root "${path.basename(resolvedRoot)}" produced zero packable entries after the always-on denylist` +
|
|
113
|
+
(extraExclude.length > 0 ? " and extraExclude" : "") +
|
|
114
|
+
"; local-tree packing requires at least one non-denylisted file or symlink. (Paths in this message are basenames only; the packed root is the lab resolution cwd.)");
|
|
115
|
+
}
|
|
116
|
+
// Check the cap from enumerated sizes BEFORE reading/hashing file bytes, so
|
|
117
|
+
// an oversized tree fails closed without the cost of hashing all of it.
|
|
118
|
+
const enumeratedBytes = entries.reduce((sum, entry) => (entry.kind === "file" ? sum + entry.size : sum), 0);
|
|
119
|
+
if (enumeratedBytes > maxArchiveBytes) {
|
|
120
|
+
throw new Error(`Local tree archive for "${path.basename(resolvedRoot)}" is ${enumeratedBytes} bytes, exceeding maxArchiveBytes ` +
|
|
121
|
+
`(${maxArchiveBytes}); pass a larger maxArchiveBytes or exclude more paths via localTree.exclude.`);
|
|
122
|
+
}
|
|
123
|
+
const { archiveSha256, totalBytes } = computeArchiveSha256(resolvedRoot, entries);
|
|
124
|
+
let tempDir;
|
|
125
|
+
let archivePath;
|
|
126
|
+
if (options.outputPath) {
|
|
127
|
+
archivePath = path.resolve(options.outputPath);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
tempDir = mkdtempSync(path.join(tmpdir(), "humanish-local-tree-"));
|
|
131
|
+
archivePath = path.join(tempDir, "source.tar.gz");
|
|
132
|
+
}
|
|
133
|
+
mkdirSync(path.dirname(archivePath), { recursive: true });
|
|
134
|
+
try {
|
|
135
|
+
writeTarArchive(resolvedRoot, entries, archivePath);
|
|
136
|
+
}
|
|
137
|
+
catch (error) {
|
|
138
|
+
// A failed tar can leave a partial archive of the working tree; the temp dir is ours to remove.
|
|
139
|
+
if (tempDir !== undefined)
|
|
140
|
+
rmSync(tempDir, { recursive: true, force: true });
|
|
141
|
+
throw error;
|
|
142
|
+
}
|
|
143
|
+
const fileCount = entries.length;
|
|
144
|
+
return git
|
|
145
|
+
? { archivePath, archiveSha256, fileCount, totalBytes, git }
|
|
146
|
+
: { archivePath, archiveSha256, fileCount, totalBytes };
|
|
147
|
+
}
|
|
148
|
+
function assertValidRoot(root) {
|
|
149
|
+
let stat;
|
|
150
|
+
try {
|
|
151
|
+
stat = statSync(root);
|
|
152
|
+
}
|
|
153
|
+
catch {
|
|
154
|
+
throw new Error(`Local tree root "${path.basename(root)}" does not exist or is not readable; local-tree packing requires an existing directory.`);
|
|
155
|
+
}
|
|
156
|
+
if (!stat.isDirectory()) {
|
|
157
|
+
throw new Error(`Local tree root "${path.basename(root)}" is not a directory; local-tree packing requires a directory root.`);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
function isGitWorkTree(root) {
|
|
161
|
+
try {
|
|
162
|
+
const out = execFileSync("git", ["rev-parse", "--is-inside-work-tree"], {
|
|
163
|
+
cwd: root,
|
|
164
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
165
|
+
});
|
|
166
|
+
return out.toString("utf8").trim() === "true";
|
|
167
|
+
}
|
|
168
|
+
catch {
|
|
169
|
+
return false;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
function gitListFiles(root) {
|
|
173
|
+
const out = execFileSync("git", ["ls-files", "--cached", "--others", "--exclude-standard", "-z"], {
|
|
174
|
+
cwd: root,
|
|
175
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
176
|
+
maxBuffer: 64 * 1024 * 1024,
|
|
177
|
+
});
|
|
178
|
+
const names = out
|
|
179
|
+
.toString("utf8")
|
|
180
|
+
.split("\0")
|
|
181
|
+
.filter((entry) => entry.length > 0);
|
|
182
|
+
// During an unresolved merge, `ls-files --cached` emits one entry per
|
|
183
|
+
// conflict stage for the same path; pack each path exactly once.
|
|
184
|
+
return [...new Set(names)];
|
|
185
|
+
}
|
|
186
|
+
function captureGitInfo(root) {
|
|
187
|
+
let commit;
|
|
188
|
+
try {
|
|
189
|
+
commit = execFileSync("git", ["rev-parse", "HEAD"], {
|
|
190
|
+
cwd: root,
|
|
191
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
192
|
+
})
|
|
193
|
+
.toString("utf8")
|
|
194
|
+
.trim();
|
|
195
|
+
}
|
|
196
|
+
catch {
|
|
197
|
+
// Unborn HEAD (git init with no commit yet): the tree is still packable
|
|
198
|
+
// and .gitignore-aware, but there is no commit to pin and dirty is
|
|
199
|
+
// meaningless without one, so git info is simply absent.
|
|
200
|
+
return undefined;
|
|
201
|
+
}
|
|
202
|
+
// Pathspec-scoped to the packed root: `git status --porcelain` without a
|
|
203
|
+
// pathspec reports the WHOLE enclosing repository, which would report a
|
|
204
|
+
// clean packed subtree as dirty whenever an unrelated sibling package in a
|
|
205
|
+
// monorepo has in-progress changes.
|
|
206
|
+
const status = execFileSync("git", ["status", "--porcelain", "--", "."], {
|
|
207
|
+
cwd: root,
|
|
208
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
209
|
+
maxBuffer: 64 * 1024 * 1024,
|
|
210
|
+
}).toString("utf8");
|
|
211
|
+
return { commit, dirty: status.trim().length > 0 };
|
|
212
|
+
}
|
|
213
|
+
function enumerateGitTree(root, extraExclude) {
|
|
214
|
+
const entries = [];
|
|
215
|
+
for (const relPath of gitListFiles(root)) {
|
|
216
|
+
if (isPathDenylisted(relPath, extraExclude)) {
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
const absolutePath = path.join(root, relPath);
|
|
220
|
+
let stat;
|
|
221
|
+
try {
|
|
222
|
+
stat = lstatSync(absolutePath);
|
|
223
|
+
}
|
|
224
|
+
catch {
|
|
225
|
+
// Staged delete: git still tracks it, but it is gone from disk.
|
|
226
|
+
continue;
|
|
227
|
+
}
|
|
228
|
+
if (stat.isDirectory()) {
|
|
229
|
+
// A nested repo or worktree boundary enumerates as a single
|
|
230
|
+
// directory-shaped entry from git ls-files; never recurse into it.
|
|
231
|
+
continue;
|
|
232
|
+
}
|
|
233
|
+
if (stat.isSymbolicLink()) {
|
|
234
|
+
entries.push({ relPath, kind: "symlink", size: stat.size });
|
|
235
|
+
continue;
|
|
236
|
+
}
|
|
237
|
+
if (stat.isFile()) {
|
|
238
|
+
assertSingleLinkSourceFile(stat);
|
|
239
|
+
entries.push({ relPath, kind: "file", size: stat.size });
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
entries.sort(compareEntriesByRelPath);
|
|
243
|
+
return entries;
|
|
244
|
+
}
|
|
245
|
+
function walkFallbackTree(root, relDir, extraExclude, out) {
|
|
246
|
+
const absoluteDir = relDir ? path.join(root, relDir) : root;
|
|
247
|
+
const names = readdirSync(absoluteDir).sort();
|
|
248
|
+
for (const name of names) {
|
|
249
|
+
const relPath = relDir ? `${relDir}/${name}` : name;
|
|
250
|
+
if (isPathDenylisted(relPath, extraExclude)) {
|
|
251
|
+
continue;
|
|
252
|
+
}
|
|
253
|
+
const absolutePath = path.join(root, relPath);
|
|
254
|
+
const stat = lstatSync(absolutePath);
|
|
255
|
+
if (stat.isDirectory()) {
|
|
256
|
+
walkFallbackTree(root, relPath, extraExclude, out);
|
|
257
|
+
continue;
|
|
258
|
+
}
|
|
259
|
+
if (stat.isSymbolicLink()) {
|
|
260
|
+
out.push({ relPath, kind: "symlink", size: stat.size });
|
|
261
|
+
continue;
|
|
262
|
+
}
|
|
263
|
+
if (stat.isFile()) {
|
|
264
|
+
assertSingleLinkSourceFile(stat);
|
|
265
|
+
out.push({ relPath, kind: "file", size: stat.size });
|
|
266
|
+
}
|
|
267
|
+
// Sockets, fifos, and device files are silently skipped: neither a
|
|
268
|
+
// regular file nor a symlink, so out of scope for packing.
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
function basenameOf(relPath) {
|
|
272
|
+
return relPath.slice(relPath.lastIndexOf("/") + 1);
|
|
273
|
+
}
|
|
274
|
+
function matchesBasenamePattern(basename, pattern) {
|
|
275
|
+
if (pattern.endsWith("*")) {
|
|
276
|
+
return basename.startsWith(pattern.slice(0, -1));
|
|
277
|
+
}
|
|
278
|
+
if (pattern.startsWith("*")) {
|
|
279
|
+
return basename.endsWith(pattern.slice(1));
|
|
280
|
+
}
|
|
281
|
+
return basename === pattern;
|
|
282
|
+
}
|
|
283
|
+
function isDenylistedBasename(basename) {
|
|
284
|
+
return LOCAL_TREE_DENYLIST_BASENAME_PATTERNS.some((pattern) => matchesBasenamePattern(basename, pattern));
|
|
285
|
+
}
|
|
286
|
+
function isDenylistedSegment(relPath) {
|
|
287
|
+
const segments = relPath.split("/");
|
|
288
|
+
return segments.some((segment) => LOCAL_TREE_DENYLIST_PATH_SEGMENTS.includes(segment));
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Normalize an author-supplied exclude entry to the relPath shape enumeration
|
|
292
|
+
* produces (no leading "./", no trailing "/"). Absolute paths and glob syntax
|
|
293
|
+
* are REJECTED, not silently no-op'd: an exclude the author believed in but
|
|
294
|
+
* that never matches anything is a leak vector, so unusable shapes fail
|
|
295
|
+
* closed at the packing boundary (and, for lab manifests, already at parse
|
|
296
|
+
* time in src/lab/parse/subject.ts).
|
|
297
|
+
*/
|
|
298
|
+
export function normalizeExtraExcludeEntry(entry) {
|
|
299
|
+
const trimmed = entry.trim();
|
|
300
|
+
if (trimmed.startsWith("/") || /^[A-Za-z]:[\\/]/.test(trimmed)) {
|
|
301
|
+
throw new Error(`localTree.exclude entry "${trimmed}" is an absolute path; entries must be repo-relative path prefixes or basenames (e.g. "big-media" or "fixtures/huge").`);
|
|
302
|
+
}
|
|
303
|
+
if (/[*?[\]]/.test(trimmed)) {
|
|
304
|
+
throw new Error(`localTree.exclude entry "${trimmed}" uses glob syntax, which is not supported; entries match as a repo-relative path prefix or an exact basename.`);
|
|
305
|
+
}
|
|
306
|
+
let normalized = trimmed;
|
|
307
|
+
while (normalized.startsWith("./"))
|
|
308
|
+
normalized = normalized.slice(2);
|
|
309
|
+
while (normalized.endsWith("/"))
|
|
310
|
+
normalized = normalized.slice(0, -1);
|
|
311
|
+
if (normalized.length === 0) {
|
|
312
|
+
throw new Error(`localTree.exclude entry "${entry}" normalizes to an empty path.`);
|
|
313
|
+
}
|
|
314
|
+
return normalized;
|
|
315
|
+
}
|
|
316
|
+
function matchesExtraExclude(relPath, basename, extraExclude) {
|
|
317
|
+
return extraExclude.some((entry) => relPath === entry || relPath.startsWith(`${entry}/`) || basename === entry);
|
|
318
|
+
}
|
|
319
|
+
function isPathDenylisted(relPath, extraExclude) {
|
|
320
|
+
if (isDenylistedSegment(relPath)) {
|
|
321
|
+
return true;
|
|
322
|
+
}
|
|
323
|
+
const basename = basenameOf(relPath);
|
|
324
|
+
if (isDenylistedBasename(basename)) {
|
|
325
|
+
return true;
|
|
326
|
+
}
|
|
327
|
+
return matchesExtraExclude(relPath, basename, extraExclude);
|
|
328
|
+
}
|
|
329
|
+
/** Bytewise (UTF-8) comparison, independent of locale/platform string ordering. */
|
|
330
|
+
function compareEntriesByRelPath(a, b) {
|
|
331
|
+
return Buffer.compare(Buffer.from(a.relPath, "utf8"), Buffer.from(b.relPath, "utf8"));
|
|
332
|
+
}
|
|
333
|
+
function assertSingleLinkSourceFile(stat) {
|
|
334
|
+
if (stat.nlink > 1) {
|
|
335
|
+
throw new Error("Local tree contains a hardlinked regular file; hardlinked source files are not packable.");
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
function validateEntryForRead(root, entry) {
|
|
339
|
+
let stat;
|
|
340
|
+
try {
|
|
341
|
+
stat = lstatSync(path.join(root, entry.relPath));
|
|
342
|
+
}
|
|
343
|
+
catch {
|
|
344
|
+
throw new Error("Local tree entry changed after enumeration; refusing to create an inconsistent archive.");
|
|
345
|
+
}
|
|
346
|
+
if (entry.kind === "symlink") {
|
|
347
|
+
if (!stat.isSymbolicLink()) {
|
|
348
|
+
throw new Error("Local tree entry changed kind after enumeration; refusing to create an inconsistent archive.");
|
|
349
|
+
}
|
|
350
|
+
return stat;
|
|
351
|
+
}
|
|
352
|
+
if (!stat.isFile() || stat.isSymbolicLink() || stat.size !== entry.size) {
|
|
353
|
+
throw new Error("Local tree entry changed after enumeration; refusing to create an inconsistent archive.");
|
|
354
|
+
}
|
|
355
|
+
assertSingleLinkSourceFile(stat);
|
|
356
|
+
return stat;
|
|
357
|
+
}
|
|
358
|
+
function validateEntryIdentity(root, entry, expected) {
|
|
359
|
+
const current = validateEntryForRead(root, entry);
|
|
360
|
+
if (current.dev !== expected.dev || current.ino !== expected.ino) {
|
|
361
|
+
throw new Error("Local tree entry changed physical identity while being read; refusing to create an inconsistent archive.");
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* sha256 over the sorted sequence of records:
|
|
366
|
+
* files: kind\0relPath\0size\0<file bytes>\0
|
|
367
|
+
* symlinks: kind\0relPath\0<link target string>\0
|
|
368
|
+
* Symlinks are never dereferenced: only their target path string is hashed,
|
|
369
|
+
* never bytes at the target.
|
|
370
|
+
*/
|
|
371
|
+
function computeArchiveSha256(root, entries) {
|
|
372
|
+
const hash = createHash("sha256");
|
|
373
|
+
let totalBytes = 0;
|
|
374
|
+
for (const entry of entries) {
|
|
375
|
+
const absolutePath = path.join(root, entry.relPath);
|
|
376
|
+
const expected = validateEntryForRead(root, entry);
|
|
377
|
+
if (entry.kind === "symlink") {
|
|
378
|
+
const target = readlinkSync(absolutePath);
|
|
379
|
+
validateEntryIdentity(root, entry, expected);
|
|
380
|
+
hash.update(`symlink\0${entry.relPath}\0${target}\0`);
|
|
381
|
+
continue;
|
|
382
|
+
}
|
|
383
|
+
const bytes = readFileSync(absolutePath);
|
|
384
|
+
validateEntryIdentity(root, entry, expected);
|
|
385
|
+
hash.update(`file\0${entry.relPath}\0${entry.size}\0`);
|
|
386
|
+
hash.update(bytes);
|
|
387
|
+
hash.update("\0");
|
|
388
|
+
totalBytes += entry.size;
|
|
389
|
+
}
|
|
390
|
+
return { archiveSha256: hash.digest("hex"), totalBytes };
|
|
391
|
+
}
|
|
392
|
+
function writeTarArchive(root, entries, archivePath) {
|
|
393
|
+
// Recheck immediately before tar reads the source tree. Enumeration and
|
|
394
|
+
// hashing already reject hardlinks; this closes the ordinary mutation gap
|
|
395
|
+
// between hashing and packing without dereferencing symlinks.
|
|
396
|
+
for (const entry of entries) {
|
|
397
|
+
validateEntryForRead(root, entry);
|
|
398
|
+
}
|
|
399
|
+
const listDir = mkdtempSync(path.join(tmpdir(), "humanish-local-tree-list-"));
|
|
400
|
+
const listFile = path.join(listDir, "files.list");
|
|
401
|
+
try {
|
|
402
|
+
writeFileSync(listFile, `${entries.map((entry) => entry.relPath).join("\0")}\0`);
|
|
403
|
+
const darwinArgs = process.platform === "darwin"
|
|
404
|
+
? ["--disable-copyfile", "--no-xattrs", "--no-mac-metadata"]
|
|
405
|
+
: [];
|
|
406
|
+
// -C must precede -T: both are position-sensitive in GNU tar, and names
|
|
407
|
+
// read from -T resolve against the directory in effect at that point.
|
|
408
|
+
// bsdtar tolerates either order; GNU tar does not.
|
|
409
|
+
const args = [...darwinArgs, "-czf", archivePath, "-C", root, "--null", "-T", listFile];
|
|
410
|
+
try {
|
|
411
|
+
execFileSync("tar", args, { stdio: ["ignore", "ignore", "pipe"] });
|
|
412
|
+
}
|
|
413
|
+
catch (error) {
|
|
414
|
+
throw new Error(`Failed to create the local-tree tar archive: ${tarErrorTail(error)}`);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
finally {
|
|
418
|
+
rmSync(listDir, { recursive: true, force: true });
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
function tarErrorTail(error) {
|
|
422
|
+
const stderr = error &&
|
|
423
|
+
typeof error === "object" &&
|
|
424
|
+
"stderr" in error &&
|
|
425
|
+
error.stderr instanceof Buffer
|
|
426
|
+
? error.stderr.toString("utf8")
|
|
427
|
+
: error instanceof Error
|
|
428
|
+
? error.message
|
|
429
|
+
: String(error);
|
|
430
|
+
return stderr.trim().slice(-400);
|
|
431
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { LabSubjectServe, LabSubjectState } from "../lab/types.js";
|
|
2
|
+
import type { RunSubjectStateStepRecord } from "../run/bundle.js";
|
|
3
|
+
import { type DetachedTimers } from "../substrates/detached.js";
|
|
4
|
+
import type { Shell } from "../substrates/shell.js";
|
|
5
|
+
import { type SubjectPhaseEvent } from "./steps.js";
|
|
6
|
+
/**
|
|
7
|
+
* Provision a local-tree subject inside the sandbox: upload the once-per-run packed archive
|
|
8
|
+
* (identical bytes across every fan-out lane) → extract it into SUBJECT_DIR → the
|
|
9
|
+
* same shared serve pipeline provisionCloneSubject uses. Unlike the clone route there is no
|
|
10
|
+
* in-sandbox git refresh: the archive excludes .git entirely (see local-tree-archive.ts), so
|
|
11
|
+
* subject identity is the host-side LocalTreeArchive captured at pack time, never anything
|
|
12
|
+
* resolved in-sandbox.
|
|
13
|
+
*/
|
|
14
|
+
export declare function provisionLocalTreeSubject(shell: Shell, args: {
|
|
15
|
+
/** The once-per-run packed archive bytes (shared byte-identically across every lane). */
|
|
16
|
+
archiveBuffer: ArrayBuffer;
|
|
17
|
+
serve: LabSubjectServe;
|
|
18
|
+
/** Declared subject state (seed steps; external declaration is provenance-only). */
|
|
19
|
+
state?: LabSubjectState;
|
|
20
|
+
requestTimeoutMs: number;
|
|
21
|
+
/** Literal scrubber for known provisioned values, applied to log tails PRE-truncation. */
|
|
22
|
+
scrub: (text: string) => string;
|
|
23
|
+
/** Called the moment each state step finishes, success or failure. */
|
|
24
|
+
onStateStep?: (record: RunSubjectStateStepRecord) => void;
|
|
25
|
+
/** Called at each phase boundary (started/completed): upload, extract, install, build,
|
|
26
|
+
* serve start, ready, and each subject.state seed-step group. */
|
|
27
|
+
onPhase?: (event: SubjectPhaseEvent) => void;
|
|
28
|
+
} & DetachedTimers): Promise<void>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { failureTail, toErrorMessage } from "../evidence/redaction.js";
|
|
2
|
+
import { detachedTimersOf, runDetachedStep } from "../substrates/detached.js";
|
|
3
|
+
import { runSubjectServePipeline } from "./serve.js";
|
|
4
|
+
import { SOURCE_TIMEOUT_MS, emitPhaseCompleted, emitPhaseStarted, SUBJECT_DIR, } from "./steps.js";
|
|
5
|
+
// Remote path for the once-per-run packed local-tree archive; removed by the extract step
|
|
6
|
+
// after it unpacks into SUBJECT_DIR.
|
|
7
|
+
const LOCAL_TREE_REMOTE_ARCHIVE_PATH = "/home/user/.humanish-source.tar.gz";
|
|
8
|
+
/**
|
|
9
|
+
* Provision a local-tree subject inside the sandbox: upload the once-per-run packed archive
|
|
10
|
+
* (identical bytes across every fan-out lane) → extract it into SUBJECT_DIR → the
|
|
11
|
+
* same shared serve pipeline provisionCloneSubject uses. Unlike the clone route there is no
|
|
12
|
+
* in-sandbox git refresh: the archive excludes .git entirely (see local-tree-archive.ts), so
|
|
13
|
+
* subject identity is the host-side LocalTreeArchive captured at pack time, never anything
|
|
14
|
+
* resolved in-sandbox.
|
|
15
|
+
*/
|
|
16
|
+
export async function provisionLocalTreeSubject(shell, args) {
|
|
17
|
+
const timers = detachedTimersOf(args);
|
|
18
|
+
const now = args.now ?? Date.now;
|
|
19
|
+
const uploadStartedAt = now();
|
|
20
|
+
emitPhaseStarted(args.onPhase, now, "upload", "uploading packed local-tree archive");
|
|
21
|
+
try {
|
|
22
|
+
await shell.writeFile(LOCAL_TREE_REMOTE_ARCHIVE_PATH, args.archiveBuffer, {
|
|
23
|
+
requestTimeoutMs: args.requestTimeoutMs,
|
|
24
|
+
retryOnce: {
|
|
25
|
+
onRetry: (reason) => emitPhaseStarted(args.onPhase, now, "upload-retry", `local-tree archive upload retried once (${failureTail(args.scrub(reason))})`),
|
|
26
|
+
...(args.sleep === undefined ? {} : { sleep: args.sleep }),
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
emitPhaseCompleted(args.onPhase, now, uploadStartedAt, "upload", false, "local-tree archive upload failed");
|
|
32
|
+
throw new Error(`subject-upload failed: ${failureTail(args.scrub(toErrorMessage(error)))}`);
|
|
33
|
+
}
|
|
34
|
+
emitPhaseCompleted(args.onPhase, now, uploadStartedAt, "upload", true, "local-tree archive uploaded");
|
|
35
|
+
const extractCommand = `rm -rf ${SUBJECT_DIR} && mkdir -p ${SUBJECT_DIR} && tar -xzf ${LOCAL_TREE_REMOTE_ARCHIVE_PATH} -C ${SUBJECT_DIR} && rm -f ${LOCAL_TREE_REMOTE_ARCHIVE_PATH}`;
|
|
36
|
+
const extractStartedAt = now();
|
|
37
|
+
emitPhaseStarted(args.onPhase, now, "extract", "extracting local-tree archive");
|
|
38
|
+
const extract = await runDetachedStep(shell, {
|
|
39
|
+
name: "subject-extract",
|
|
40
|
+
command: extractCommand,
|
|
41
|
+
timeoutMs: SOURCE_TIMEOUT_MS,
|
|
42
|
+
requestTimeoutMs: args.requestTimeoutMs,
|
|
43
|
+
...timers,
|
|
44
|
+
});
|
|
45
|
+
emitPhaseCompleted(args.onPhase, now, extractStartedAt, "extract", extract.ok, extract.ok ? "local-tree archive extracted" : "local-tree archive extraction failed");
|
|
46
|
+
if (!extract.ok) {
|
|
47
|
+
throw new Error(`subject extract ${extract.timedOut ? "timed out" : `failed (exit ${extract.exitCode})`}: ${failureTail(args.scrub(extract.logTail))}`);
|
|
48
|
+
}
|
|
49
|
+
await runSubjectServePipeline(shell, {
|
|
50
|
+
serve: args.serve,
|
|
51
|
+
...(args.state === undefined ? {} : { state: args.state }),
|
|
52
|
+
requestTimeoutMs: args.requestTimeoutMs,
|
|
53
|
+
scrub: args.scrub,
|
|
54
|
+
...(args.onStateStep === undefined ? {} : { onStateStep: args.onStateStep }),
|
|
55
|
+
...(args.onPhase === undefined ? {} : { onPhase: args.onPhase }),
|
|
56
|
+
...timers,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const NODE_NPM_PREFIX_SCRIPT: string;
|
|
2
|
+
/**
|
|
3
|
+
* The bound on one Node bootstrap attempt. The archive download is one curl with a 90 s limit and
|
|
4
|
+
* one retry inside 120 s; the rest is local. A step that outlives this is stuck, not slow.
|
|
5
|
+
*/
|
|
6
|
+
export declare const NODE_BOOTSTRAP_TIMEOUT_MS: number;
|
|
7
|
+
/**
|
|
8
|
+
* Install Node from the pinned official archive when the desktop has no working Node >=20 and
|
|
9
|
+
* npm. The terminal lane, desktop CLI studies and the subject serve pipeline share it. It needs no
|
|
10
|
+
* apt: every network call is one bounded curl, so a stalled mirror fails the step within minutes.
|
|
11
|
+
*/
|
|
12
|
+
export declare const NODE_BOOTSTRAP_COMMAND: string;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// Node 22 remains a supported LTS line. Pin the official release and trusted archive hashes:
|
|
2
|
+
// https://nodejs.org/en/about/previous-releases
|
|
3
|
+
// https://nodejs.org/dist/v22.23.2/SHASUMS256.txt (checked 2026-09-05)
|
|
4
|
+
// A checksum fetched alongside the archive at runtime would not pin what we trust.
|
|
5
|
+
const NODE_BOOTSTRAP_VERSION = "22.23.2";
|
|
6
|
+
// npm normally derives its global prefix from the real Node executable. This distribution
|
|
7
|
+
// lives under /opt, while its public executables use /usr/local/bin. Set only a missing
|
|
8
|
+
// built-in default; npm's environment, CLI, user and global config still take precedence.
|
|
9
|
+
export const NODE_NPM_PREFIX_SCRIPT = [
|
|
10
|
+
'const fs = require("node:fs");',
|
|
11
|
+
"const file = process.argv[1];",
|
|
12
|
+
'let existing = "";',
|
|
13
|
+
'try { existing = fs.readFileSync(file, "utf8"); } catch (error) { if (error.code !== "ENOENT") throw error; }',
|
|
14
|
+
'if (!/^[\\t ]*prefix[\\t ]*=/m.test(existing)) fs.appendFileSync(file, "\\nprefix=/usr/local\\n");',
|
|
15
|
+
].join(" ");
|
|
16
|
+
/**
|
|
17
|
+
* The bound on one Node bootstrap attempt. The archive download is one curl with a 90 s limit and
|
|
18
|
+
* one retry inside 120 s; the rest is local. A step that outlives this is stuck, not slow.
|
|
19
|
+
*/
|
|
20
|
+
export const NODE_BOOTSTRAP_TIMEOUT_MS = 5 * 60_000;
|
|
21
|
+
/**
|
|
22
|
+
* Install Node from the pinned official archive when the desktop has no working Node >=20 and
|
|
23
|
+
* npm. The terminal lane, desktop CLI studies and the subject serve pipeline share it. It needs no
|
|
24
|
+
* apt: every network call is one bounded curl, so a stalled mirror fails the step within minutes.
|
|
25
|
+
*/
|
|
26
|
+
export const NODE_BOOTSTRAP_COMMAND = [
|
|
27
|
+
"set -eu",
|
|
28
|
+
"# humanish node-bootstrap",
|
|
29
|
+
"node_major=0",
|
|
30
|
+
`if command -v node >/dev/null 2>&1; then node_major=$(node -e 'console.log(Number(process.versions.node.split(".")[0]))' 2>/dev/null || echo 0); fi`,
|
|
31
|
+
`if command -v node >/dev/null 2>&1 && command -v npm >/dev/null 2>&1 && [ "$node_major" -ge 20 ] && npm --version >/dev/null 2>&1; then`,
|
|
32
|
+
// An explicit exit under set -e runs the stock login shell's failing clear_console logout hook
|
|
33
|
+
// and turns this successful fast path into exit 1. Finish the compound command naturally.
|
|
34
|
+
" :",
|
|
35
|
+
"else",
|
|
36
|
+
`case "$(uname -s):$(uname -m)" in`,
|
|
37
|
+
` Linux:x86_64) node_arch=x64; node_sha=b294a556e639d64338823920e5866c21c02741742d2e1529ee1a225c1ec9252a ;;`,
|
|
38
|
+
` Linux:aarch64|Linux:arm64) node_arch=arm64; node_sha=013b59cfd2819703a6f4a14ab891fc46fc2a4e3f5bcd92de3fb4929b43e35b30 ;;`,
|
|
39
|
+
` *) echo 'humanish: the Node bootstrap requires a supported Linux x64/arm64 desktop or working Node >=20 and npm' >&2; exit 1 ;;`,
|
|
40
|
+
"esac",
|
|
41
|
+
"for prerequisite in curl sha256sum tar gzip mktemp sudo; do",
|
|
42
|
+
` command -v "$prerequisite" >/dev/null 2>&1 || { echo "humanish: the Node bootstrap requires $prerequisite" >&2; exit 1; }`,
|
|
43
|
+
"done",
|
|
44
|
+
`node_archive="node-v${NODE_BOOTSTRAP_VERSION}-linux-$node_arch.tar.gz"`,
|
|
45
|
+
`node_target="/opt/humanish/node-v${NODE_BOOTSTRAP_VERSION}-linux-$node_arch"`,
|
|
46
|
+
`node_temp=$(mktemp -d /tmp/humanish-node.XXXXXX)`,
|
|
47
|
+
`trap 'rm -rf "$node_temp"' EXIT`,
|
|
48
|
+
`curl --fail --silent --show-error --location --proto '=https' --proto-redir '=https' --connect-timeout 10 --max-time 90 --retry 1 --retry-max-time 120 --output "$node_temp/$node_archive" "https://nodejs.org/dist/v${NODE_BOOTSTRAP_VERSION}/$node_archive"`,
|
|
49
|
+
`(cd "$node_temp" && printf '%s %s\\n' "$node_sha" "$node_archive" | sha256sum --check --status) || { echo 'humanish: the Node archive checksum did not match the trusted release' >&2; exit 1; }`,
|
|
50
|
+
// Only a verified official archive reaches privileged extraction. The versioned install is
|
|
51
|
+
// root-owned; subsequent ordinary and sudo shells find it through standard /usr/local/bin.
|
|
52
|
+
"sudo -n mkdir -p /opt/humanish /usr/local/bin",
|
|
53
|
+
`sudo -n tar --extract --gzip --file "$node_temp/$node_archive" --directory /opt/humanish --no-same-owner`,
|
|
54
|
+
"for executable in node npm npx; do",
|
|
55
|
+
` sudo -n ln -sfn "$node_target/bin/$executable" "/usr/local/bin/$executable"`,
|
|
56
|
+
"done",
|
|
57
|
+
// Keep global product executables on the existing ordinary/sudo PATH (#679). The new
|
|
58
|
+
// versioned distribution is the only config we modify; no user/global npmrc or profile.
|
|
59
|
+
`sudo -n "$node_target/bin/node" -e '${NODE_NPM_PREFIX_SCRIPT}' "$node_target/lib/node_modules/npm/npmrc"`,
|
|
60
|
+
"hash -r",
|
|
61
|
+
`node -e 'process.exit(Number(process.versions.node.split(".")[0]) >= 20 ? 0 : 1)' && npm --version >/dev/null`,
|
|
62
|
+
// Product installation already uses sudo; detect a template whose sudo PATH cannot see Node
|
|
63
|
+
// rather than changing global PATH or permissions to make it look supported.
|
|
64
|
+
`sudo -n node -e 'process.exit(Number(process.versions.node.split(".")[0]) >= 20 ? 0 : 1)' && sudo -n npm --version >/dev/null`,
|
|
65
|
+
"fi",
|
|
66
|
+
].join("\n");
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Does this serve pipeline need a Node runtime? Matches a bare command word at a token boundary, so
|
|
3
|
+
* `npm install` and `sudo -n npm ci` count while `my-npm-wrapper` or a path containing "node" does
|
|
4
|
+
* not. Being wrong in the permissive direction only costs a skipped bootstrap probe; being wrong in
|
|
5
|
+
* the strict direction costs a paid sandbox and a cryptic exit 127.
|
|
6
|
+
*/
|
|
7
|
+
export declare function needsNodeRuntime(commands: readonly (string | undefined)[]): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Package managers that need their own install step after Node exists. npm and npx arrive with
|
|
10
|
+
* Node; pnpm, yarn and bun do not, and `corepack enable` is the supported way to get the first two
|
|
11
|
+
* without a second network fetch.
|
|
12
|
+
*/
|
|
13
|
+
export declare function corepackCommandFor(commands: readonly (string | undefined)[]): string | undefined;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Provide the runtime a subject's serve pipeline needs, instead of failing at exit 127 (#371).
|
|
2
|
+
//
|
|
3
|
+
// The stock E2B `desktop` template ships python3 and curl but NO Node. That fact has now been
|
|
4
|
+
// rediscovered three times: the in-sandbox comms catch was rewritten from node to python3 in 0.29.0
|
|
5
|
+
// for exactly this reason, the terminal lane bootstraps Node explicitly, and the computer-use
|
|
6
|
+
// clone/local-tree route did neither — so any lab whose `serve.install` runs npm or pnpm died with
|
|
7
|
+
// `pnpm: command not found` AFTER a sandbox had been created and paid for.
|
|
8
|
+
//
|
|
9
|
+
// It failed invisibly up front: `lab inspect` was clean, the plan printed normally, the sandbox
|
|
10
|
+
// provisioned, and the first signal was a shell exit code attributed to "subject install failed".
|
|
11
|
+
// Nobody can debug that from the outside.
|
|
12
|
+
//
|
|
13
|
+
// The posture here is PROVIDE, not warn. An adopter writing a lab for a Node app should not have to
|
|
14
|
+
// know which binaries the template happens to carry — that is the harness's job, and the terminal
|
|
15
|
+
// lane already treats it that way. Detection is conservative and the bootstrap is skipped whenever
|
|
16
|
+
// a runtime is already present, so a custom template that ships Node pays nothing.
|
|
17
|
+
/** Package managers and runtimes whose absence on the stock template breaks a serve pipeline. */
|
|
18
|
+
const NODE_COMMANDS = ["npm", "npx", "pnpm", "yarn", "bun", "node", "vite", "next", "tsx"];
|
|
19
|
+
/**
|
|
20
|
+
* Does this serve pipeline need a Node runtime? Matches a bare command word at a token boundary, so
|
|
21
|
+
* `npm install` and `sudo -n npm ci` count while `my-npm-wrapper` or a path containing "node" does
|
|
22
|
+
* not. Being wrong in the permissive direction only costs a skipped bootstrap probe; being wrong in
|
|
23
|
+
* the strict direction costs a paid sandbox and a cryptic exit 127.
|
|
24
|
+
*/
|
|
25
|
+
export function needsNodeRuntime(commands) {
|
|
26
|
+
const pattern = new RegExp(`(^|[\\s;&|(])(${NODE_COMMANDS.join("|")})([\\s;&|)]|$)`);
|
|
27
|
+
return commands.some((command) => (command ? pattern.test(command) : false));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Package managers that need their own install step after Node exists. npm and npx arrive with
|
|
31
|
+
* Node; pnpm, yarn and bun do not, and `corepack enable` is the supported way to get the first two
|
|
32
|
+
* without a second network fetch.
|
|
33
|
+
*/
|
|
34
|
+
export function corepackCommandFor(commands) {
|
|
35
|
+
const joined = commands.filter((c) => Boolean(c)).join("\n");
|
|
36
|
+
const wantsPnpm = /(^|[\s;&|(])pnpm([\s;&|)]|$)/.test(joined);
|
|
37
|
+
const wantsYarn = /(^|[\s;&|(])yarn([\s;&|)]|$)/.test(joined);
|
|
38
|
+
if (!wantsPnpm && !wantsYarn)
|
|
39
|
+
return undefined;
|
|
40
|
+
// Probe first for the same reason as above: a template that already has it pays nothing.
|
|
41
|
+
const binary = wantsPnpm ? "pnpm" : "yarn";
|
|
42
|
+
return [
|
|
43
|
+
`if command -v ${binary} >/dev/null 2>&1; then`,
|
|
44
|
+
` echo "humanish: ${binary} already present; skipping corepack";`,
|
|
45
|
+
"else",
|
|
46
|
+
" sudo -n corepack enable >/dev/null 2>&1 || true;",
|
|
47
|
+
` corepack prepare ${binary}@latest --activate 2>/dev/null || sudo -n npm install -g ${binary};`,
|
|
48
|
+
"fi",
|
|
49
|
+
].join("\n");
|
|
50
|
+
}
|