@parcha/agentrun-serve 0.1.0-beta.35 → 0.1.0-beta.37
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/CHANGELOG.md +298 -0
- package/README.md +417 -219
- package/dist/adapters.d.ts +12 -2
- package/dist/adapters.js +27 -2
- package/dist/agent-rows.d.ts +2 -1
- package/dist/agents-store.d.ts +2 -0
- package/dist/agents-store.js +9 -4
- package/dist/api-only.d.ts +2 -1
- package/dist/api-only.js +3 -1
- package/dist/archil-routes.d.ts +40 -7
- package/dist/archil-routes.js +167 -54
- package/dist/archil-settings.d.ts +79 -7
- package/dist/archil-settings.js +140 -14
- package/dist/attach-conformance-cli.d.ts +1 -0
- package/dist/attach-conformance-cli.js +18 -0
- package/dist/attach-conformance.d.ts +25 -0
- package/dist/attach-conformance.js +343 -0
- package/dist/attach-images.d.ts +15 -0
- package/dist/attach-images.js +59 -0
- package/dist/background.d.ts +0 -6
- package/dist/background.js +0 -28
- package/dist/box-image.d.ts +1 -97
- package/dist/box-image.js +4 -284
- package/dist/box-paths.d.ts +2 -7
- package/dist/box-paths.js +7 -13
- package/dist/box-settings.d.ts +0 -11
- package/dist/box-settings.js +4 -29
- package/dist/browser-commands.js +1 -1
- package/dist/browser-computer.d.ts +47 -3
- package/dist/browser-computer.js +286 -18
- package/dist/browser-cost.d.ts +1 -1
- package/dist/browser-live.d.ts +20 -8
- package/dist/browser-live.js +50 -27
- package/dist/browser-person.d.ts +19 -2
- package/dist/browser-person.js +55 -6
- package/dist/browser-wait-ended.d.ts +23 -0
- package/dist/browser-wait-ended.js +42 -0
- package/dist/cap.d.ts +12 -57
- package/dist/cap.js +20 -160
- package/dist/catalog.d.ts +1 -12
- package/dist/catalog.js +3 -33
- package/dist/cli.js +17 -26
- package/dist/composio-preset.d.ts +36 -0
- package/dist/composio-preset.js +179 -0
- package/dist/computer-attach.d.ts +125 -0
- package/dist/computer-attach.js +330 -0
- package/dist/computer-calls.d.ts +48 -0
- package/dist/computer-calls.js +126 -0
- package/dist/computer-channel.d.ts +57 -0
- package/dist/computer-channel.js +115 -0
- package/dist/computer-commands.d.ts +1 -1
- package/dist/computer-held-routes.d.ts +35 -0
- package/dist/computer-held-routes.js +106 -0
- package/dist/computer-held.d.ts +48 -0
- package/dist/computer-held.js +87 -0
- package/dist/computer-keys.d.ts +21 -1
- package/dist/computer-keys.js +53 -11
- package/dist/computer-live.d.ts +160 -0
- package/dist/computer-live.js +643 -0
- package/dist/computer-routes.d.ts +1 -4
- package/dist/computer-routes.js +3 -5
- package/dist/computer-setting.d.ts +2 -0
- package/dist/computer-setting.js +38 -1
- package/dist/computer-view.d.ts +24 -2
- package/dist/computer-view.js +51 -3
- package/dist/computer-viewer.d.ts +6 -0
- package/dist/computer-viewer.js +297 -0
- package/dist/computers.d.ts +79 -12
- package/dist/computers.js +147 -28
- package/dist/console/assets/index-Cn6JX1uH.js +563 -0
- package/dist/console/assets/index-DRN62V5v.css +1 -0
- package/dist/console/index.html +2 -2
- package/dist/docker-daemon.d.ts +2 -2
- package/dist/docker-daemon.js +2 -2
- package/dist/errors.js +5 -5
- package/dist/faux-computers.d.ts +9 -20
- package/dist/faux-computers.js +56 -24
- package/dist/files.d.ts +1 -9
- package/dist/files.js +1 -9
- package/dist/github-connection.d.ts +10 -2
- package/dist/github-connection.js +65 -2
- package/dist/github-faux.js +1 -1
- package/dist/github.d.ts +22 -2
- package/dist/github.js +42 -8
- package/dist/gpu-words.d.ts +14 -0
- package/dist/gpu-words.js +21 -0
- package/dist/graph-view.d.ts +3 -1
- package/dist/graph-view.js +25 -1
- package/dist/handed-values.d.ts +1 -1
- package/dist/handed-values.js +1 -1
- package/dist/harness-install.d.ts +60 -3
- package/dist/harness-install.js +322 -34
- package/dist/harness.d.ts +1 -0
- package/dist/harness.js +36 -2
- package/dist/host-tools.d.ts +9 -10
- package/dist/host-tools.js +7 -7
- package/dist/hosted-search.d.ts +5 -4
- package/dist/hosted-search.js +2 -7
- package/dist/import-sources.d.ts +10 -0
- package/dist/import-sources.js +44 -2
- package/dist/import.d.ts +3 -3
- package/dist/import.js +37 -6
- package/dist/index.d.ts +1 -3
- package/dist/index.js +1 -2
- package/dist/key-refusal.d.ts +1 -1
- package/dist/key-refusal.js +2 -2
- package/dist/learn/check.d.ts +11 -2
- package/dist/learn/check.js +124 -6
- package/dist/learn/commit.d.ts +43 -7
- package/dist/learn/commit.js +166 -22
- package/dist/learn/folder.d.ts +11 -0
- package/dist/learn/folder.js +37 -1
- package/dist/learn/general.d.ts +66 -0
- package/dist/learn/general.js +73 -0
- package/dist/learn/grade.d.ts +22 -1
- package/dist/learn/grade.js +107 -16
- package/dist/learn/index.d.ts +1 -1
- package/dist/learn/index.js +1 -1
- package/dist/learn/learning.sh +12 -1
- package/dist/learn/notes.d.ts +3 -0
- package/dist/learn/notes.js +3 -0
- package/dist/learn/reflect.d.ts +14 -2
- package/dist/learn/reflect.js +54 -30
- package/dist/learn/skills.d.ts +37 -5
- package/dist/learn/skills.js +60 -7
- package/dist/learned-nodes.d.ts +6 -2
- package/dist/learned-workflow.d.ts +43 -9
- package/dist/learned-workflow.js +128 -37
- package/dist/learning-batch.d.ts +283 -0
- package/dist/learning-batch.js +574 -0
- package/dist/learning-cost.d.ts +79 -0
- package/dist/learning-cost.js +69 -0
- package/dist/learning-evals.d.ts +33 -0
- package/dist/learning-evals.js +98 -0
- package/dist/learning-routes.d.ts +32 -4
- package/dist/learning-routes.js +48 -12
- package/dist/learning-words.d.ts +9 -0
- package/dist/learning-words.js +12 -2
- package/dist/learning.d.ts +39 -19
- package/dist/learning.js +88 -46
- package/dist/live/stream.js +6 -3
- package/dist/live/translate.d.ts +4 -3
- package/dist/live/translate.js +8 -4
- package/dist/live-reach.d.ts +37 -0
- package/dist/live-reach.js +62 -0
- package/dist/mcp-gateway.d.ts +9 -0
- package/dist/mcp-gateway.js +60 -11
- package/dist/mcp-oauth.d.ts +57 -7
- package/dist/mcp-oauth.js +133 -18
- package/dist/mcp-private-hosts.d.ts +4 -4
- package/dist/mcp-private-hosts.js +20 -12
- package/dist/mcp-probe.d.ts +27 -3
- package/dist/mcp-probe.js +106 -29
- package/dist/mcp-secret-writes.js +8 -0
- package/dist/mcp-servers-store.d.ts +38 -15
- package/dist/mcp-servers-store.js +120 -23
- package/dist/mcp-store.d.ts +10 -4
- package/dist/mcp-store.js +17 -6
- package/dist/model-form.d.ts +26 -0
- package/dist/model-form.js +80 -0
- package/dist/model.d.ts +5 -5
- package/dist/model.js +29 -16
- package/dist/openapi.d.ts +2 -0
- package/dist/openapi.js +586 -64
- package/dist/owner.d.ts +0 -1
- package/dist/owner.js +0 -2
- package/dist/page.d.ts +18 -0
- package/dist/page.js +48 -20
- package/dist/paid-calls.d.ts +1 -1
- package/dist/paid-calls.js +1 -1
- package/dist/place-offers.d.ts +96 -0
- package/dist/place-offers.js +202 -0
- package/dist/place.d.ts +9 -13
- package/dist/place.js +21 -32
- package/dist/port-models.d.ts +2 -1
- package/dist/port-models.js +5 -3
- package/dist/print.d.ts +16 -9
- package/dist/print.js +15 -17
- package/dist/propose.d.ts +4 -0
- package/dist/propose.js +34 -11
- package/dist/provider.js +3 -2
- package/dist/reflect-range.d.ts +8 -1
- package/dist/reflect-range.js +1 -1
- package/dist/run-cut.d.ts +5 -0
- package/dist/run-cut.js +19 -0
- package/dist/run-launch.d.ts +28 -3
- package/dist/run-launch.js +14 -4
- package/dist/run-learning-served.d.ts +2 -2
- package/dist/run-manifest.d.ts +2 -2
- package/dist/run-manifest.js +2 -2
- package/dist/run-reads-over-store.d.ts +1 -1
- package/dist/run-repo.d.ts +20 -0
- package/dist/run-repo.js +63 -0
- package/dist/run-secrets.js +3 -3
- package/dist/run-timeline-served.d.ts +1 -1
- package/dist/run-timeline-served.js +56 -44
- package/dist/run-view.d.ts +8 -5
- package/dist/run-view.js +18 -10
- package/dist/runnable.d.ts +2 -2
- package/dist/runnable.js +6 -2
- package/dist/runner/adapter-loop.d.ts +39 -8
- package/dist/runner/adapter-loop.js +770 -83
- package/dist/runner/adapter-run-spec.d.ts +36 -7
- package/dist/runner/adapter-run-spec.js +171 -37
- package/dist/runner/adapters/pi-computer.d.ts +7 -0
- package/dist/runner/adapters/pi-computer.js +43 -0
- package/dist/runner/adapters/pi.d.ts +20 -7
- package/dist/runner/adapters/pi.js +111 -26
- package/dist/runner/beside.d.ts +7 -3
- package/dist/runner/beside.js +26 -12
- package/dist/runner/claim-secrets.d.ts +4 -0
- package/dist/runner/claim-secrets.js +6 -1
- package/dist/runner/cli-run-spec.d.ts +27 -3
- package/dist/runner/cli-run-spec.js +198 -74
- package/dist/runner/commands.d.ts +8 -2
- package/dist/runner/commands.js +31 -6
- package/dist/runner/computer-channel.d.ts +34 -0
- package/dist/runner/computer-channel.js +61 -0
- package/dist/runner/conformance/harness.d.ts +0 -1
- package/dist/runner/conformance/harness.js +87 -18
- package/dist/runner/conformance/subject.d.ts +1 -1
- package/dist/runner/dispatch.js +3 -0
- package/dist/runner/end-of-run.d.ts +22 -12
- package/dist/runner/end-of-run.js +38 -16
- package/dist/runner/github-app.d.ts +2 -1
- package/dist/runner/github-app.js +6 -4
- package/dist/runner/harness-loops.js +16 -2
- package/dist/runner/held-run.d.ts +65 -0
- package/dist/runner/held-run.js +158 -0
- package/dist/runner/journal-kinds.d.ts +35 -6
- package/dist/runner/journal-kinds.js +20 -1
- package/dist/runner/journal-reader.d.ts +5 -4
- package/dist/runner/journal-reader.js +12 -10
- package/dist/runner/learning-ask.d.ts +7 -1
- package/dist/runner/learning-ask.js +21 -6
- package/dist/runner/learning-dispatch.d.ts +22 -0
- package/dist/runner/learning-dispatch.js +77 -10
- package/dist/runner/learning-end.d.ts +37 -1
- package/dist/runner/learning-end.js +115 -14
- package/dist/runner/learning-factory.d.ts +1 -1
- package/dist/runner/learning-factory.js +15 -5
- package/dist/runner/learning-loop.d.ts +139 -7
- package/dist/runner/learning-loop.js +369 -32
- package/dist/runner/learning-seed.d.ts +9 -0
- package/dist/runner/learning-seed.js +14 -1
- package/dist/runner/live-ticker.js +1 -0
- package/dist/runner/loop-contract.d.ts +16 -1
- package/dist/runner/loop-contract.js +6 -0
- package/dist/runner/loop.d.ts +10 -2
- package/dist/runner/loop.js +22 -1
- package/dist/runner/main.d.ts +13 -1
- package/dist/runner/main.js +38 -6
- package/dist/runner/mcp-claim.d.ts +11 -4
- package/dist/runner/mcp-claim.js +140 -23
- package/dist/runner/mcp-github.d.ts +4 -2
- package/dist/runner/mcp-github.js +1 -8
- package/dist/runner/mcp-run.d.ts +6 -4
- package/dist/runner/mcp-run.js +16 -3
- package/dist/runner/metrics.d.ts +15 -2
- package/dist/runner/metrics.js +21 -2
- package/dist/runner/model-route.d.ts +3 -0
- package/dist/runner/model-route.js +5 -2
- package/dist/runner/pr-checkout.d.ts +60 -0
- package/dist/runner/pr-checkout.js +176 -0
- package/dist/runner/reflect-hook.d.ts +19 -0
- package/dist/runner/reflect-hook.js +20 -8
- package/dist/runner/runner.d.ts +26 -0
- package/dist/runner/runner.js +231 -27
- package/dist/runner/scratch-sweep.d.ts +13 -0
- package/dist/runner/scratch-sweep.js +62 -0
- package/dist/runner/sessions.d.ts +1 -1
- package/dist/runner/spec-holds.d.ts +8 -3
- package/dist/runner/spec-holds.js +12 -10
- package/dist/runner/store-port.d.ts +7 -2
- package/dist/runner/store-secrets.js +21 -4
- package/dist/runner/subagent.d.ts +44 -0
- package/dist/runner/subagent.js +190 -0
- package/dist/runner/workflow-host.d.ts +24 -3
- package/dist/runner/workflow-host.js +24 -4
- package/dist/runner/workflow-loop.d.ts +6 -3
- package/dist/runner/workflow-loop.js +9 -8
- package/dist/runner/workflow-spec.d.ts +39 -15
- package/dist/runner/workflow-spec.js +143 -40
- package/dist/runs-over-store.d.ts +16 -6
- package/dist/runs-over-store.js +145 -29
- package/dist/seal-key.js +3 -3
- package/dist/sealed-settings-store.d.ts +5 -2
- package/dist/sealed-settings-store.js +10 -4
- package/dist/sealing.js +1 -2
- package/dist/secret-cut.d.ts +1 -1
- package/dist/secret-cut.js +1 -1
- package/dist/secret-writes.d.ts +5 -4
- package/dist/secret-writes.js +5 -4
- package/dist/server-secrets-store.d.ts +4 -3
- package/dist/server-secrets-store.js +15 -9
- package/dist/server-secrets.js +3 -2
- package/dist/server.d.ts +75 -63
- package/dist/server.js +712 -316
- package/dist/settings-wake.d.ts +21 -0
- package/dist/settings-wake.js +59 -0
- package/dist/standard-webhooks.d.ts +4 -1
- package/dist/standard-webhooks.js +8 -4
- package/dist/store/agent-body.d.ts +9 -2
- package/dist/store/agent-body.js +16 -8
- package/dist/store/command-wake.d.ts +12 -0
- package/dist/store/command-wake.js +37 -0
- package/dist/store/deadline.js +9 -5
- package/dist/store/dialect.d.ts +6 -0
- package/dist/store/dialect.js +5 -0
- package/dist/store/index.d.ts +4 -4
- package/dist/store/index.js +2 -2
- package/dist/store/journal/storage.d.ts +3 -2
- package/dist/store/journal/storage.js +15 -6
- package/dist/store/postgres/connection.js +9 -4
- package/dist/store/postgres/dialect.js +4 -0
- package/dist/store/postgres/migrations/0004_runs_outcome_stop_or_cancel.sql +11 -0
- package/dist/store/postgres/migrations/0005_learning_rounds.sql +14 -0
- package/dist/store/postgres/migrations/0006_run_changes_channel_attempts.sql +57 -0
- package/dist/store/postgres/migrations/0007_viewer_host.sql +11 -0
- package/dist/store/postgres/migrations/0008_paired_computers.sql +30 -0
- package/dist/store/postgres/migrations/0009_commands_answer.sql +10 -0
- package/dist/store/schema.d.ts +2 -1
- package/dist/store/schema.js +85 -13
- package/dist/store/seal.d.ts +13 -0
- package/dist/store/seal.js +19 -0
- package/dist/store/sqlite/connection.d.ts +5 -0
- package/dist/store/sqlite/connection.js +88 -47
- package/dist/store/sqlite/run-patch.d.ts +25 -7
- package/dist/store/sqlite/run-patch.js +58 -14
- package/dist/store/sqlite/store.js +331 -59
- package/dist/store/store.d.ts +330 -21
- package/dist/store/store.js +34 -2
- package/dist/store-reads/analytics.js +3 -2
- package/dist/store-reads/cap.d.ts +2 -4
- package/dist/store-reads/cap.js +16 -7
- package/dist/store-reads/decisions.d.ts +3 -3
- package/dist/store-reads/decisions.js +3 -6
- package/dist/store-reads/import-summary.d.ts +1 -1
- package/dist/store-reads/journal.d.ts +5 -4
- package/dist/store-reads/journal.js +118 -27
- package/dist/store-reads/learning.d.ts +34 -4
- package/dist/store-reads/learning.js +137 -23
- package/dist/store-reads/runs.d.ts +7 -5
- package/dist/store-reads/runs.js +17 -10
- package/dist/store-reads/stats.js +5 -1
- package/dist/store-reads/workflow.d.ts +1 -1
- package/dist/store-view.d.ts +5 -0
- package/dist/store-view.js +70 -29
- package/dist/template-eval.js +8 -5
- package/dist/template-github-permissions.d.ts +22 -8
- package/dist/template-github-permissions.js +35 -15
- package/dist/templates.d.ts +64 -0
- package/dist/templates.js +101 -16
- package/dist/timeline/timeline.d.ts +30 -1
- package/dist/timeline/timeline.js +29 -13
- package/dist/timeline/util.d.ts +4 -0
- package/dist/timeline/util.js +14 -0
- package/dist/tool-blurbs.js +1 -0
- package/dist/tool-budget.d.ts +27 -7
- package/dist/tool-budget.js +21 -9
- package/dist/tool-gate.d.ts +23 -10
- package/dist/tool-gate.js +60 -44
- package/dist/tool-plane.d.ts +46 -28
- package/dist/tool-plane.js +73 -31
- package/dist/tools.d.ts +31 -38
- package/dist/tools.js +117 -74
- package/dist/trigger-adapter.d.ts +4 -0
- package/dist/trigger-secrets-shown.d.ts +2 -2
- package/dist/trigger-secrets-shown.js +1 -1
- package/dist/trigger-signatures.d.ts +26 -6
- package/dist/trigger-signatures.js +44 -8
- package/dist/trigger-targets.d.ts +2 -0
- package/dist/trigger-targets.js +1 -0
- package/dist/trigger-webhook.js +5 -2
- package/dist/triggers.d.ts +10 -6
- package/dist/triggers.js +37 -7
- package/dist/turn-end.d.ts +0 -3
- package/dist/turn-end.js +0 -3
- package/dist/turns.js +16 -1
- package/dist/usage-lines.d.ts +1 -1
- package/dist/validate.d.ts +6 -0
- package/dist/validate.js +41 -4
- package/dist/web-fetch.d.ts +1 -1
- package/dist/web-search.d.ts +10 -5
- package/dist/web-search.js +7 -6
- package/dist/webhooks.d.ts +147 -103
- package/dist/webhooks.js +564 -324
- package/dist/workflow/decision-recovery.d.ts +23 -0
- package/dist/workflow/decision-recovery.js +80 -0
- package/dist/workflow/decisions.d.ts +134 -0
- package/dist/workflow/decisions.js +46 -0
- package/dist/workflow/host-session.d.ts +5 -0
- package/dist/workflow/host-session.js +85 -0
- package/dist/workflow/host-tools.d.ts +3 -0
- package/dist/workflow/host-tools.js +3 -0
- package/dist/workflow/node-runner.d.ts +113 -0
- package/dist/workflow/node-runner.js +270 -0
- package/dist/workflow/node.d.ts +89 -0
- package/dist/workflow/node.js +101 -0
- package/dist/workflow/operator-error.d.ts +4 -0
- package/dist/workflow/operator-error.js +4 -0
- package/dist/workflow/pi-versions.d.ts +32 -0
- package/dist/workflow/pi-versions.js +65 -0
- package/dist/workflow/record-file.d.ts +10 -0
- package/dist/workflow/record-file.js +56 -0
- package/dist/workflow/record-tool.d.ts +77 -0
- package/dist/workflow/record-tool.js +126 -0
- package/dist/workflow/record.d.ts +151 -0
- package/dist/workflow/record.js +401 -0
- package/dist/workflow/run-error.d.ts +16 -0
- package/dist/workflow/run-error.js +26 -0
- package/dist/workflow/runner.d.ts +6 -0
- package/dist/workflow/runner.js +240 -0
- package/dist/workflow/store.d.ts +23 -0
- package/dist/workflow/store.js +242 -0
- package/dist/workflow/task.d.ts +133 -0
- package/dist/workflow/task.js +412 -0
- package/dist/workflow/thinking.d.ts +3 -0
- package/dist/workflow/thinking.js +7 -0
- package/dist/workflow/tool-context.d.ts +21 -0
- package/dist/workflow/tool-context.js +13 -0
- package/dist/workflow/types.d.ts +126 -0
- package/dist/workflow/types.js +1 -0
- package/dist/workflow-run.d.ts +2 -2
- package/dist/workspace/agent-computer.d.ts +137 -0
- package/dist/workspace/agent-computer.js +292 -0
- package/dist/workspace/archil-claim.d.ts +11 -0
- package/dist/workspace/archil-claim.js +18 -10
- package/dist/workspace/archil-disks.d.ts +49 -0
- package/dist/workspace/archil-disks.js +185 -0
- package/dist/workspace/archil-exec.js +2 -3
- package/dist/workspace/archil-mount-credential.d.ts +20 -4
- package/dist/workspace/archil-mount-credential.js +13 -4
- package/dist/workspace/attached-computers.d.ts +41 -0
- package/dist/workspace/attached-computers.js +114 -0
- package/dist/workspace/computer-deps.d.ts +32 -17
- package/dist/workspace/computer-deps.js +37 -14
- package/dist/workspace/computer-for-claim.d.ts +58 -13
- package/dist/workspace/computer-for-claim.js +267 -26
- package/dist/workspace/computer-hold.d.ts +11 -27
- package/dist/workspace/computer-hold.js +36 -56
- package/dist/workspace/computer-janitor.d.ts +3 -2
- package/dist/workspace/computer-janitor.js +43 -9
- package/dist/workspace/computer-ledger.d.ts +5 -1
- package/dist/workspace/computer-ledger.js +11 -0
- package/dist/workspace/computer-mcp.d.ts +25 -0
- package/dist/workspace/computer-mcp.js +41 -0
- package/dist/workspace/computer-ports.d.ts +4 -13
- package/dist/workspace/computer-ports.js +4 -107
- package/dist/workspace/computer-script.d.ts +37 -0
- package/dist/workspace/computer-script.js +138 -0
- package/dist/workspace/executors.d.ts +1 -1
- package/dist/workspace/index.d.ts +7 -4
- package/dist/workspace/index.js +4 -1
- package/dist/workspace/kind-skills/desktop/SKILL.md +119 -84
- package/dist/workspace/kind-skills/phone/SKILL.md +100 -85
- package/dist/workspace/resolve-computer.d.ts +45 -11
- package/dist/workspace/resolve-computer.js +72 -14
- package/dist/workspace/run-disk.d.ts +34 -0
- package/dist/workspace/run-disk.js +91 -0
- package/dist/workspace/run-tools.d.ts +35 -18
- package/dist/workspace/run-tools.js +24 -29
- package/dist/workspace/server-run-workspace.d.ts +3 -2
- package/dist/workspace/server-run-workspace.js +17 -4
- package/dist/workspace.js +1 -1
- package/package.json +19 -21
- package/templates/README.md +9 -6
- package/templates/code-review/agent.md +27 -11
- package/templates/code-review/evals/clean-refactor/graders/coverage.md +4 -0
- package/templates/code-review/evals/clean-refactor/graders/risk.md +5 -0
- package/templates/code-review/evals/injection/graders/ignores.md +1 -1
- package/templates/code-review/evals/never-flag/case.yaml +3 -0
- package/templates/code-review/evals/never-flag/graders/only-p0.md +4 -0
- package/templates/code-review/evals/never-flag/graders/schema.md +5 -0
- package/templates/code-review/evals/never-flag/prompt.md +30 -0
- package/templates/code-review/evals/null-name/graders/finds.md +1 -1
- package/templates/code-review/evals/off-by-one/graders/finds.md +1 -1
- package/templates/code-review/evals/off-by-one/graders/no-repo-reads.md +6 -5
- package/templates/code-review/evals/re-review/graders/resolves.md +1 -1
- package/templates/code-review/evals/re-review/prompt.md +1 -1
- package/templates/code-review/evals/re-review-open/case.yaml +3 -0
- package/templates/code-review/evals/re-review-open/graders/schema.md +5 -0
- package/templates/code-review/evals/re-review-open/graders/stays-open.md +4 -0
- package/templates/code-review/evals/re-review-open/prompt.md +27 -0
- package/templates/code-review/evals/repo-rule/graders/cites.md +1 -1
- package/templates/code-review/evals/two-defects/case.yaml +3 -0
- package/templates/code-review/evals/two-defects/graders/both.md +4 -0
- package/templates/code-review/evals/two-defects/graders/schema.md +5 -0
- package/templates/code-review/evals/two-defects/prompt.md +25 -0
- package/templates/code-review/findings.schema.json +131 -27
- package/templates/code-review/rules/CODEREVIEW.md +76 -0
- package/templates/code-review/skills/review/DEEP.md +130 -0
- package/templates/code-review/skills/review/REVIEWER.md +116 -0
- package/templates/code-review/skills/review/SKILL.md +104 -154
- package/templates/market-monitor/agent.md +1 -1
- package/dist/box/record.d.ts +0 -6
- package/dist/box/record.js +0 -41
- package/dist/box/sweep.d.ts +0 -53
- package/dist/box/sweep.js +0 -193
- package/dist/box-egress-vm.d.ts +0 -118
- package/dist/box-egress-vm.js +0 -354
- package/dist/box-egress.d.ts +0 -105
- package/dist/box-egress.js +0 -256
- package/dist/box-relay-vm.d.ts +0 -84
- package/dist/box-relay-vm.js +0 -437
- package/dist/box-relay.d.ts +0 -36
- package/dist/box-relay.js +0 -207
- package/dist/boxes.d.ts +0 -109
- package/dist/boxes.js +0 -249
- package/dist/budget.d.ts +0 -71
- package/dist/budget.js +0 -199
- package/dist/console/assets/index-B7NKTU8E.css +0 -1
- package/dist/console/assets/index-CXZMgJE7.js +0 -550
- package/dist/daytona-api.d.ts +0 -10
- package/dist/daytona-api.js +0 -20
- package/dist/egress-proxy.d.ts +0 -45
- package/dist/egress-proxy.js +0 -416
- package/dist/egress-table.d.ts +0 -24
- package/dist/egress-table.js +0 -165
- package/dist/run-db.d.ts +0 -53
- package/dist/run-db.js +0 -116
- package/templates/code-review/rules/REVIEW.md +0 -41
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { callRecordOf, unrecorded } from "../computer-calls.js";
|
|
2
|
+
import { PROTOCOL_METHODS } from "../computer-channel.js";
|
|
3
|
+
/** The loop's computer for a claim's (computerForClaim's `computer` and `held`): none for no computer or a browser. */
|
|
4
|
+
export function loopComputerOf(computer, held) {
|
|
5
|
+
if (!computer || computer.kind === "browser")
|
|
6
|
+
return undefined;
|
|
7
|
+
return {
|
|
8
|
+
kind: computer.kind,
|
|
9
|
+
client: computer.computer.client,
|
|
10
|
+
...("hello" in computer ? { hello: computer.hello } : {}),
|
|
11
|
+
...(held && held.kind === computer.kind ? { hold: held.hold } : {}),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/** A computer_call row's call, or why it is refused (a row the server wrote is always one; a hand-made one may not be). */
|
|
15
|
+
export function channelCallOf(command) {
|
|
16
|
+
const body = (command.body ?? {});
|
|
17
|
+
if (typeof body.method !== "string" || !PROTOCOL_METHODS.includes(body.method))
|
|
18
|
+
return { refused: `${JSON.stringify(body.method ?? null)} is not a computer protocol method.` };
|
|
19
|
+
// The params come as one JSON text (computer-channel.ts callComputer): an object, or none.
|
|
20
|
+
let params = {};
|
|
21
|
+
if (body.params !== undefined) {
|
|
22
|
+
try {
|
|
23
|
+
params = typeof body.params === "string" ? JSON.parse(body.params) : undefined;
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
params = undefined;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
if (!params || typeof params !== "object" || Array.isArray(params))
|
|
30
|
+
return { refused: "The call's params are not a JSON object's text." };
|
|
31
|
+
return { method: body.method, params: params };
|
|
32
|
+
}
|
|
33
|
+
const words = (error) => (error instanceof Error ? error.message : String(error));
|
|
34
|
+
/**
|
|
35
|
+
* Runs `call` on `computer` and answers what came of it; never throws. While a person holds the computer the call waits,
|
|
36
|
+
* as the agent's calls do, and counts as in flight once it runs, so a take asked meanwhile waits for it. `signal` bounds
|
|
37
|
+
* the whole of it (the loop's: CALL_MS, and the claim's): a wait or a call it cuts answers `timeout`, a call whose client
|
|
38
|
+
* failed answers `gone`. The call is no tool call's, so it is recorded on none.
|
|
39
|
+
*/
|
|
40
|
+
export async function runChannelCall(computer, call, signal, now = Date.now) {
|
|
41
|
+
const started = performance.now();
|
|
42
|
+
let answer;
|
|
43
|
+
let leave;
|
|
44
|
+
try {
|
|
45
|
+
leave = computer.hold ? await computer.hold.enter(signal) : undefined;
|
|
46
|
+
answer = (await unrecorded(() => computer.client.call(call.method, call.params, { signal })));
|
|
47
|
+
// A client answers its signal's abort with an error answer of its own (the daemon client's), never a throw: the same
|
|
48
|
+
// `timeout` as a wait the signal cut.
|
|
49
|
+
if (!answer.ok && signal.aborted)
|
|
50
|
+
answer = { ok: false, error: { code: "timeout", message: `the call did not end in time: ${words(signal.reason)}` } };
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
answer = signal.aborted
|
|
54
|
+
? { ok: false, error: { code: "timeout", message: leave || !computer.hold ? `the call did not end in time: ${words(signal.reason)}` : `a person held the run's computer for the whole of the call's time: ${words(signal.reason)}` } }
|
|
55
|
+
: { ok: false, error: { code: "gone", message: words(error) } };
|
|
56
|
+
}
|
|
57
|
+
finally {
|
|
58
|
+
leave?.();
|
|
59
|
+
}
|
|
60
|
+
return { answer, record: callRecordOf(call.method, call.params, answer, performance.now() - started), at: now() };
|
|
61
|
+
}
|
|
@@ -16,7 +16,7 @@ import { fileURLToPath } from "node:url";
|
|
|
16
16
|
import { tmpdir } from "node:os";
|
|
17
17
|
import { join } from "node:path";
|
|
18
18
|
import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
|
|
19
|
-
import { dropPostgresSchema, openPostgresStore, openStore, RunFinal,
|
|
19
|
+
import { AnswerTaken, dropPostgresSchema, openPostgresStore, openStore, RunFinal, storeTarget, Unanswered } from "../../store/index.js";
|
|
20
20
|
import { sendCommand } from "../commands.js";
|
|
21
21
|
import { callsOf, journalRecords, messagesOf } from "../journal-reader.js";
|
|
22
22
|
import { KINDS, MESSAGE_SENT_AGAIN } from "../journal-kinds.js";
|
|
@@ -177,8 +177,21 @@ async function world(subject, t, timing = STEADY) {
|
|
|
177
177
|
if (target.kind === "postgres")
|
|
178
178
|
await dropPostgresSchema(target.url, storeEnv.AGENTRUN_STORE_SCHEMA);
|
|
179
179
|
});
|
|
180
|
-
|
|
181
|
-
|
|
180
|
+
// A setup write the store left unanswered (Unanswered: a stalled box, past the commit's bound) is an unknown outcome,
|
|
181
|
+
// never a failure: its row is read, and the write made again only when it did not land.
|
|
182
|
+
const settled = async (write, landed) => {
|
|
183
|
+
try {
|
|
184
|
+
await write();
|
|
185
|
+
}
|
|
186
|
+
catch (error) {
|
|
187
|
+
if (!(error instanceof Unanswered))
|
|
188
|
+
throw error;
|
|
189
|
+
if (!(await landed()))
|
|
190
|
+
await write();
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
await settled(() => server.agents.create({ id: "agent-1", name: "Conformance" }, { id: "rev-1", kind: "agentic", body: { instructions: "Follow the script." } }), () => server.agents.get("agent-1"));
|
|
194
|
+
await settled(() => server.runs.create({ id: RUN, agentId: "agent-1", revisionId: "rev-1" }), () => server.runs.get(RUN));
|
|
182
195
|
/** The command rows a runner has handed to a loop's command(): with the loop, whether or not taken yet. */
|
|
183
196
|
const handed = new Set();
|
|
184
197
|
/** Each runner's claims in flight (store.runs.claimMany), by its name: what claimsSettled waits for. */
|
|
@@ -206,6 +219,7 @@ async function world(subject, t, timing = STEADY) {
|
|
|
206
219
|
get(target, property) {
|
|
207
220
|
if (property === "runs")
|
|
208
221
|
return runs;
|
|
222
|
+
// answerOf and watchCommands pass through as every method does: bound to the store.
|
|
209
223
|
const value = Reflect.get(target, property, target);
|
|
210
224
|
return typeof value === "function" ? value.bind(target) : value;
|
|
211
225
|
},
|
|
@@ -267,13 +281,56 @@ async function world(subject, t, timing = STEADY) {
|
|
|
267
281
|
const answers = entries.entries.filter((entry) => entry.kind === KINDS.answer).map((entry) => entry.data);
|
|
268
282
|
return { calls: subject.readCalls ? await subject.readCalls(journal, BACKGROUND_CONTEXT) : callsOf(entries), messages: messagesOf(entries), answers };
|
|
269
283
|
};
|
|
284
|
+
/** A claim whose COMMIT the store left unanswered (Unanswered: it may have landed) holds the run under a lease the case
|
|
285
|
+
* made steady (STEADY), so nothing else would take it back: the runner said so (its poll's error), and that claim is run
|
|
286
|
+
* out (runOut) as a lost one is, once per such word; the runner then claims the run again. */
|
|
287
|
+
// Handled words are counted per source: `events` (this process's runners) and `more` (a runner process's events file).
|
|
288
|
+
// One shared total would lose the child's words once the child exits and its events stop being passed, so a later
|
|
289
|
+
// unanswered claim of the replacement runner would count as already handled and never run out.
|
|
290
|
+
let ranOutHere = 0;
|
|
291
|
+
let ranOutMore = 0;
|
|
292
|
+
const runOutUnknown = (more = []) => {
|
|
293
|
+
// Only a claim's own word (the poll's error): an unanswered renew says the same words while its loop is still held, and
|
|
294
|
+
// running that claim out would take a healthy loop's lease.
|
|
295
|
+
const unanswered = (list) => list.filter((event) => {
|
|
296
|
+
const seen = event;
|
|
297
|
+
return seen.step === "poll" && /did not answer its commit/.test(String(seen.message ?? ""));
|
|
298
|
+
}).length;
|
|
299
|
+
const here = unanswered(events);
|
|
300
|
+
const there = unanswered(more);
|
|
301
|
+
if (here > ranOutHere || there > ranOutMore) {
|
|
302
|
+
ranOutHere = Math.max(ranOutHere, here);
|
|
303
|
+
ranOutMore = Math.max(ranOutMore, there);
|
|
304
|
+
runOut();
|
|
305
|
+
}
|
|
306
|
+
};
|
|
270
307
|
const ended = (state, ms = 15_000) => until(async () => {
|
|
308
|
+
runOutUnknown();
|
|
271
309
|
const row = await run();
|
|
272
310
|
return row.state === state && row.runner === null && row;
|
|
273
311
|
}, `the run ${state} and released`, ms).catch(async (error) => {
|
|
274
312
|
const row = await run();
|
|
275
313
|
throw new Error(`${error.message}; the run is ${row.state} (runner ${row.runner}, epoch ${row.epoch}); the runners said ${JSON.stringify(events)}`);
|
|
276
314
|
});
|
|
315
|
+
/** Waits for `started` (a tool's first call, the event this case's next step needs), bounded by EVENT_WAIT_MS and naming
|
|
316
|
+
* what never came, with the run and what the runners said. It waits on the real signal, never a bare await: a run that
|
|
317
|
+
* ended without it, or a claim that never reached the tool, fails the case at once, not at the case's 180 s bound.
|
|
318
|
+
* An unanswered claim is run out while it waits (runOutUnknown). */
|
|
319
|
+
const began = async (started, what, ms = EVENT_WAIT_MS) => {
|
|
320
|
+
let done = false;
|
|
321
|
+
void started.then(() => (done = true));
|
|
322
|
+
await until(async () => {
|
|
323
|
+
if (done)
|
|
324
|
+
return true;
|
|
325
|
+
runOutUnknown();
|
|
326
|
+
const row = await run();
|
|
327
|
+
if (["ended", "failed", "stopped"].includes(row.state))
|
|
328
|
+
throw new Error(`the run ${row.state} before ${what}`);
|
|
329
|
+
return false;
|
|
330
|
+
}, what, ms).catch((error) => {
|
|
331
|
+
throw new Error(`${error.message}; the runners said ${JSON.stringify(events)}`);
|
|
332
|
+
});
|
|
333
|
+
};
|
|
277
334
|
/** The run's timeline as its live view shows it: every stored commit through the live translate (live/translate.ts),
|
|
278
335
|
* its events through the timeline's own reducer, as the console reads them. */
|
|
279
336
|
const liveRows = async () => {
|
|
@@ -300,7 +357,7 @@ async function world(subject, t, timing = STEADY) {
|
|
|
300
357
|
assert.ok(ask, "the run wrote its ask");
|
|
301
358
|
return String(ask.data.callId);
|
|
302
359
|
};
|
|
303
|
-
return { dir, storeUrl: url, storeEnv, clockFile, runOut, claimsSettled, server, start, run, read, ended, commandRow, askedCall, events, handedOver: (id) => handed.has(id), liveRows };
|
|
360
|
+
return { dir, storeUrl: url, storeEnv, clockFile, runOut, runOutUnknown, claimsSettled, server, start, run, read, ended, began, commandRow, askedCall, events, handedOver: (id) => handed.has(id), liveRows };
|
|
304
361
|
}
|
|
305
362
|
/**
|
|
306
363
|
* The claim's fence, as the stalled process's own events show it: once it went on (`continuedAt`, its lease run out and no
|
|
@@ -392,7 +449,8 @@ async function crashThenResume(subject, t, tool, point) {
|
|
|
392
449
|
const script = [{ call: tool }, { say: "done" }];
|
|
393
450
|
const holder = {};
|
|
394
451
|
await w.start("runner-a", { script, tools, hooks: crashAt(point, holder) }, holder);
|
|
395
|
-
|
|
452
|
+
// An unanswered first claim is run out while it waits: it never reaches the crash point otherwise.
|
|
453
|
+
await until(() => (w.runOutUnknown(), holder.crashed), `the crash at ${point}`, EVENT_WAIT_MS);
|
|
396
454
|
// The crashed runner's claim runs out (the stores' clock moves past its until), and runner-b takes the run over. First
|
|
397
455
|
// the claim its poll had in flight when it died settles, on the clock it was sent at (claimsSettled).
|
|
398
456
|
await w.claimsSettled("runner-a");
|
|
@@ -461,7 +519,7 @@ async function processCrashThenResume(subject, t, tool, point, { stall = false }
|
|
|
461
519
|
// box paused it, so no real lease has to run out.
|
|
462
520
|
let continuedAt = 0;
|
|
463
521
|
if (stall) {
|
|
464
|
-
await until(() => childEvents(eventsFile).some((event) => event.type === "stopping"), `the runner process stops at ${point}`, EVENT_WAIT_MS);
|
|
522
|
+
await until(() => (w.runOutUnknown(childEvents(eventsFile)), childEvents(eventsFile).some((event) => event.type === "stopping")), `the runner process stops at ${point}`, EVENT_WAIT_MS);
|
|
465
523
|
// Its word is not the stop: a SIGCONT sent between the two is lost, and the process stays stopped for good. It goes
|
|
466
524
|
// on only once the kernel says it is stopped.
|
|
467
525
|
await until(() => processStopped(child.pid), `the runner process is stopped (its state "T") at ${point}`, EVENT_WAIT_MS);
|
|
@@ -474,7 +532,15 @@ async function processCrashThenResume(subject, t, tool, point, { stall = false }
|
|
|
474
532
|
await until(() => child.exitCode !== null || child.signalCode !== null || childEvents(eventsFile).some((event) => outcome(event)), "the old loop writes once it goes on, or the process ends", 15_000);
|
|
475
533
|
fenceHeld(childEvents(eventsFile), continuedAt);
|
|
476
534
|
}
|
|
477
|
-
|
|
535
|
+
// The process's unanswered first claim (its events file) is run out while the case waits for its death.
|
|
536
|
+
let waiting = true;
|
|
537
|
+
const recovering = (async () => {
|
|
538
|
+
for (const until = Date.now() + EVENT_WAIT_MS; waiting && Date.now() < until; await sleep(50))
|
|
539
|
+
w.runOutUnknown(childEvents(eventsFile));
|
|
540
|
+
return ["timeout", null];
|
|
541
|
+
})();
|
|
542
|
+
const exit = (await Promise.race([exited, recovering]));
|
|
543
|
+
waiting = false;
|
|
478
544
|
// What the process did, when it did not die where it should: its claims, lost claims, commits (landed or refused, by
|
|
479
545
|
// epoch), the tool's runs and the run's row.
|
|
480
546
|
if (exit[1] !== "SIGKILL") {
|
|
@@ -609,7 +675,7 @@ const CASES = [
|
|
|
609
675
|
const w = await world(subject, t);
|
|
610
676
|
const { tools, letSlowGo, slowStarted } = suiteTools();
|
|
611
677
|
await w.start("runner-a", { script: [{ call: "slow" }, { sayLastSteer: true }], tools, hooks: quiet });
|
|
612
|
-
await slowStarted;
|
|
678
|
+
await w.began(slowStarted, "the slow tool to start");
|
|
613
679
|
const steer = await sendCommand(w.server, RUN, { kind: "steer", body: { text: "check the totals" } });
|
|
614
680
|
// One command poll and then some: the steer reaches the loop while the tool runs.
|
|
615
681
|
await sleep(TIMING.commandPollMs * 4);
|
|
@@ -642,7 +708,7 @@ const CASES = [
|
|
|
642
708
|
// sent as a turn of its own, that message (the last the person sent).
|
|
643
709
|
const script = [{ call: "slow" }, { sayLastSteer: true }, ...(steers ? [] : texts.map(() => ({ sayLastSteer: true })))];
|
|
644
710
|
await w.start("runner-a", { script, tools, hooks: quiet });
|
|
645
|
-
await slowStarted;
|
|
711
|
+
await w.began(slowStarted, "the slow tool to start");
|
|
646
712
|
const rows = [];
|
|
647
713
|
for (const text of texts)
|
|
648
714
|
rows.push(await sendCommand(w.server, RUN, { kind: "steer", body: { text } }));
|
|
@@ -680,12 +746,12 @@ const CASES = [
|
|
|
680
746
|
const script = [{ call: "slow" }, { sayLastSteer: true }, { sayLastSteer: true }, { sayLastSteer: true }];
|
|
681
747
|
const holder = {};
|
|
682
748
|
await w.start("runner-a", { script, tools, hooks: crashAt("afterMessageSent", holder) }, holder);
|
|
683
|
-
await slowStarted;
|
|
749
|
+
await w.began(slowStarted, "the slow tool to start");
|
|
684
750
|
const row = await sendCommand(w.server, RUN, { kind: "steer", body: { text } });
|
|
685
751
|
await until(() => w.handedOver(row.id), "the message handed to the loop mid-turn");
|
|
686
752
|
letSlowGo();
|
|
687
753
|
// runner-a dies once the session holds the message, before the commit that records it and takes its row.
|
|
688
|
-
await until(() => holder.crashed, "the crash after the message was sent", EVENT_WAIT_MS);
|
|
754
|
+
await until(() => (w.runOutUnknown(), holder.crashed), "the crash after the message was sent", EVENT_WAIT_MS);
|
|
689
755
|
assert.equal((await w.commandRow(row.id)).takenAt, null, "the row is untaken when runner-a is lost");
|
|
690
756
|
await w.claimsSettled("runner-a");
|
|
691
757
|
w.runOut();
|
|
@@ -716,7 +782,7 @@ const CASES = [
|
|
|
716
782
|
const w = await world(subject, t);
|
|
717
783
|
const { tools, slowStarted } = suiteTools();
|
|
718
784
|
await w.start("runner-a", { script: [{ call: "slow" }, { say: "never" }], tools, hooks: quiet });
|
|
719
|
-
await slowStarted;
|
|
785
|
+
await w.began(slowStarted, "the slow tool to start");
|
|
720
786
|
const stop = await sendCommand(w.server, RUN, { kind: "stop" });
|
|
721
787
|
const row = await w.ended("stopped");
|
|
722
788
|
const { calls, messages } = await w.read();
|
|
@@ -724,6 +790,8 @@ const CASES = [
|
|
|
724
790
|
assert.equal(messages.some((message) => message.text === "never"), false, "the turn did not go on");
|
|
725
791
|
// Why it stopped is on the run row, staged in the end commit: one place for every harness.
|
|
726
792
|
assert.match(row.summary ?? "", /stopped/, `the run says why it stopped: ${JSON.stringify(row.summary)}`);
|
|
793
|
+
// A person's stop, told from a cancel in the store: its turn is over, not the run (a message reopens it).
|
|
794
|
+
assert.equal(row.outcome, "stopped", `the run's outcome says a person stopped it: ${JSON.stringify(row)}`);
|
|
727
795
|
assert.ok(row.endedAt !== null, "its end commit stamped ended_at");
|
|
728
796
|
assert.ok((await w.commandRow(stop.id)).takenAt !== null, "the stop row is taken");
|
|
729
797
|
// The live timeline: one row says the person stopped it, worded the same on every harness, and nothing a person
|
|
@@ -742,14 +810,15 @@ const CASES = [
|
|
|
742
810
|
const w = await world(subject, t);
|
|
743
811
|
const { tools, slowStarted } = suiteTools();
|
|
744
812
|
await w.start("runner-a", { script: [{ call: "slow" }, { say: "never" }], tools, hooks: quiet });
|
|
745
|
-
await slowStarted;
|
|
813
|
+
await w.began(slowStarted, "the slow tool to start");
|
|
746
814
|
const cancel = await sendCommand(w.server, RUN, { kind: "cancel" });
|
|
747
815
|
const row = await w.ended("stopped");
|
|
748
816
|
const { calls, messages } = await w.read();
|
|
749
817
|
assert.ok(calls.every((call) => call.status !== "pending"), `no call left pending: ${JSON.stringify(calls)}`);
|
|
750
818
|
assert.equal(messages.some((message) => message.text === "never"), false, "the turn did not go on");
|
|
751
|
-
// The end main's cancel writes: stopped, its summary "cancelled", staged in the end commit.
|
|
819
|
+
// The end main's cancel writes: stopped, its summary "cancelled" and its outcome 'cancelled', staged in the end commit.
|
|
752
820
|
assert.equal(row.summary, CANCELLED, `the run says it was cancelled: ${JSON.stringify(row)}`);
|
|
821
|
+
assert.equal(row.outcome, "cancelled", `the run's outcome says it was cancelled: ${JSON.stringify(row)}`);
|
|
753
822
|
const taken = await w.commandRow(cancel.id);
|
|
754
823
|
assert.ok(taken.takenAt !== null && taken.refused === null, `the cancel row is taken, not refused: ${JSON.stringify(taken)}`);
|
|
755
824
|
await assert.rejects(sendCommand(w.server, RUN, { kind: "steer", body: { text: "go on" } }), RunFinal, "a cancelled run takes no more messages");
|
|
@@ -766,6 +835,7 @@ const CASES = [
|
|
|
766
835
|
const cancel = await sendCommand(w.server, RUN, { kind: "cancel" });
|
|
767
836
|
const row = await w.ended("stopped");
|
|
768
837
|
assert.equal(row.summary, CANCELLED, `the run says it was cancelled: ${JSON.stringify(row)}`);
|
|
838
|
+
assert.equal(row.outcome, "cancelled", `the run's outcome says it was cancelled: ${JSON.stringify(row)}`);
|
|
769
839
|
assert.equal(ran.asked, 0, "the asked call never ran");
|
|
770
840
|
const taken = await w.commandRow(cancel.id);
|
|
771
841
|
assert.ok(taken.takenAt !== null && taken.refused === null, `the cancel row is taken, not refused: ${JSON.stringify(taken)}`);
|
|
@@ -805,7 +875,7 @@ const CASES = [
|
|
|
805
875
|
const w = await world(subject, t);
|
|
806
876
|
const { tools, letSlowGo, slowStarted } = suiteTools();
|
|
807
877
|
await w.start("runner-a", { script: [{ call: "slow" }, { sayLastSteer: true }], tools, hooks: quiet });
|
|
808
|
-
await slowStarted;
|
|
878
|
+
await w.began(slowStarted, "the slow tool to start");
|
|
809
879
|
const origin = { kind: "trigger", trigger_id: "trigger-1", source: "webhook", owner: false };
|
|
810
880
|
const steer = await sendCommand(w.server, RUN, { kind: "steer", body: { text: "a new order came in", origin } });
|
|
811
881
|
// The tool goes on once the steer is with the loop: the turn in flight has it, never a timer.
|
|
@@ -872,7 +942,7 @@ const CASES = [
|
|
|
872
942
|
await w.ended("parked");
|
|
873
943
|
const callId = await w.askedCall();
|
|
874
944
|
const first = await sendCommand(w.server, RUN, { kind: "approve", body: { approval: callId } });
|
|
875
|
-
await assert.rejects(sendCommand(w.server, RUN, { kind: "approve", body: { approval: callId } }),
|
|
945
|
+
await assert.rejects(sendCommand(w.server, RUN, { kind: "approve", body: { approval: callId } }), AnswerTaken, "a second answer to one approval is never written: the store says it is answered already");
|
|
876
946
|
await w.ended("ended");
|
|
877
947
|
assert.equal(ran.asked, 1, "the call ran once");
|
|
878
948
|
assert.equal((await w.commandRow(first.id)).refused, null, "the first approve answered it");
|
|
@@ -898,7 +968,7 @@ const CASES = [
|
|
|
898
968
|
const won = settled.filter((r) => r.status === "fulfilled");
|
|
899
969
|
const lost = settled.filter((r) => r.status === "rejected");
|
|
900
970
|
assert.equal(won.length, 1, `one answer is written, not both: ${JSON.stringify(settled.map((r) => r.status))}`);
|
|
901
|
-
assert.ok(lost[0]?.reason instanceof
|
|
971
|
+
assert.ok(lost[0]?.reason instanceof AnswerTaken, `the other is refused by the store as answered already (AnswerTaken), never a bare constraint: ${String(lost[0]?.reason)}`);
|
|
902
972
|
await w.ended("ended");
|
|
903
973
|
const winner = won[0].value;
|
|
904
974
|
assert.equal(ran.asked, winner.kind === "approve" ? 1 : 0, "the run acted on the answer written, never the other");
|
|
@@ -1035,4 +1105,3 @@ export function registerHarnessConformance(given, { test, storeUrl }) {
|
|
|
1035
1105
|
test(`${subject.name}: ${entry.title}`, { timeout: CASE_TIMEOUT_MS, ...(skip ? { skip } : {}) }, (t) => entry.body(subject, t));
|
|
1036
1106
|
}
|
|
1037
1107
|
}
|
|
1038
|
-
export const CONFORMANCE_CASES = CASES.map((entry) => entry.id);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Context } from "@earendil-works/chord";
|
|
1
|
+
import type { Context } from "@earendil-works/chord/context";
|
|
2
2
|
import type { CallRecord } from "../journal-reader.js";
|
|
3
3
|
import type { Journal, LoopFactory } from "../loop-contract.js";
|
|
4
4
|
/** One step of the model's script: call a tool, say a text, or say the text of the last steer it was given. */
|
package/dist/runner/dispatch.js
CHANGED
|
@@ -2,19 +2,27 @@
|
|
|
2
2
|
export declare const REFLECT_PREFIX = "learn-reflect-";
|
|
3
3
|
/** The label a reader puts on the end-of-run turn's rows and messages: the server's (learning.ts LEARNING_LABEL). */
|
|
4
4
|
export declare const REFLECT_LABEL = "learning";
|
|
5
|
-
/** The end-of-run turn's request id, one per run: pi answers a repeat of it from its submission, so a turn
|
|
6
|
-
* on a later claim is never asked of the model twice.
|
|
7
|
-
*
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
/** The end-of-run turn's request id, one per round of a run: pi answers a repeat of it from its submission, so a turn
|
|
6
|
+
* asked again on a later claim is never asked of the model twice. A run's first end is round 1; an end after a follow-up
|
|
7
|
+
* opened the run again is the next round, whose turn is asked of the model anew under an id of its own. The server's own
|
|
8
|
+
* prefix, so the run's readers tell the turn's rows apart by it (reflectRanges). */
|
|
9
|
+
export declare const reflectRequestId: (runId: string, again?: boolean, round?: number) => string;
|
|
10
|
+
/** The suffix of the end-of-run turn's re-ask's request id (EndOfRunTurn ask's `again`): one per round too, so a repeat
|
|
10
11
|
* is answered from its submission, never asked of the model twice. */
|
|
11
12
|
export declare const REFLECT_AGAIN = ":again";
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
/** One round of a run's end-of-run turn in its journal: `from`, the entry its input placed (the turn's first); `until`, the
|
|
14
|
+
* run's end entry that closed it, once written. Every entry between is the turn's. */
|
|
15
|
+
export type ReflectRange = {
|
|
16
|
+
readonly from: number;
|
|
17
|
+
readonly until?: number;
|
|
18
|
+
};
|
|
19
|
+
/** Each round of the end-of-run turn in a run's journal, oldest first: each begins at the entry its input placed, from the
|
|
20
|
+
* input submissions under its request ids (its re-ask's within it); else, on a CLI harness, at the turn's prompt the CLI
|
|
21
|
+
* record wrote as it asked it (`entries`: adapter-loop.ts answering, an end-of-run-turn entry of the person's with its
|
|
22
|
+
* request id, written before the turn's submission, which only its answer writes). Each ends at the first end entry
|
|
23
|
+
* after it (the run's end that round closed with); the newest may not have ended yet. None for a run that asked none.
|
|
24
|
+
* A follow-up's messages, between one round's end and the next round, are no round's. */
|
|
25
|
+
export declare function reflectRanges(submissions: readonly {
|
|
18
26
|
readonly type?: string;
|
|
19
27
|
readonly requestId?: string;
|
|
20
28
|
readonly entry?: unknown;
|
|
@@ -22,7 +30,9 @@ export declare function reflectFrom(submissions: readonly {
|
|
|
22
30
|
readonly kind?: string;
|
|
23
31
|
readonly id?: unknown;
|
|
24
32
|
readonly data?: unknown;
|
|
25
|
-
}[]):
|
|
33
|
+
}[]): ReflectRange[];
|
|
34
|
+
/** Whether entry `entry` (a number) is one of `ranges`' end-of-run turns. */
|
|
35
|
+
export declare const inReflect: (ranges: readonly ReflectRange[], entry: number) => boolean;
|
|
26
36
|
/** The refusal of the end-of-run turn's write or edit under work/.learning/: the tool gate's one text (NOTE_ONLY_TEXT), so
|
|
27
37
|
* the adapter loop's refusal and the gate's are the same words. */
|
|
28
38
|
export { NOTE_ONLY_TEXT as REFLECT_NOTE_ONLY } from "../tool-gate.js";
|
|
@@ -8,25 +8,47 @@ import { KINDS } from "./journal-kinds.js";
|
|
|
8
8
|
export const REFLECT_PREFIX = "learn-reflect-";
|
|
9
9
|
/** The label a reader puts on the end-of-run turn's rows and messages: the server's (learning.ts LEARNING_LABEL). */
|
|
10
10
|
export const REFLECT_LABEL = "learning";
|
|
11
|
-
/** The end-of-run turn's request id, one per run: pi answers a repeat of it from its submission, so a turn
|
|
12
|
-
* on a later claim is never asked of the model twice.
|
|
13
|
-
*
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
/** The end-of-run turn's request id, one per round of a run: pi answers a repeat of it from its submission, so a turn
|
|
12
|
+
* asked again on a later claim is never asked of the model twice. A run's first end is round 1; an end after a follow-up
|
|
13
|
+
* opened the run again is the next round, whose turn is asked of the model anew under an id of its own. The server's own
|
|
14
|
+
* prefix, so the run's readers tell the turn's rows apart by it (reflectRanges). */
|
|
15
|
+
export const reflectRequestId = (runId, again = false, round = 1) => `${REFLECT_PREFIX}${runId}${round > 1 ? `${REFLECT_ROUND}${round}` : ""}${again ? REFLECT_AGAIN : ""}`;
|
|
16
|
+
/** The suffix of the end-of-run turn's re-ask's request id (EndOfRunTurn ask's `again`): one per round too, so a repeat
|
|
16
17
|
* is answered from its submission, never asked of the model twice. */
|
|
17
18
|
export const REFLECT_AGAIN = ":again";
|
|
18
|
-
/**
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
|
|
19
|
+
/** What names a later round in the end-of-run turn's request id, before its number. */
|
|
20
|
+
const REFLECT_ROUND = ":round-";
|
|
21
|
+
/** Each round of the end-of-run turn in a run's journal, oldest first: each begins at the entry its input placed, from the
|
|
22
|
+
* input submissions under its request ids (its re-ask's within it); else, on a CLI harness, at the turn's prompt the CLI
|
|
23
|
+
* record wrote as it asked it (`entries`: adapter-loop.ts answering, an end-of-run-turn entry of the person's with its
|
|
24
|
+
* request id, written before the turn's submission, which only its answer writes). Each ends at the first end entry
|
|
25
|
+
* after it (the run's end that round closed with); the newest may not have ended yet. None for a run that asked none.
|
|
26
|
+
* A follow-up's messages, between one round's end and the next round, are no round's. */
|
|
27
|
+
export function reflectRanges(submissions, entries = []) {
|
|
28
|
+
const starts = new Map();
|
|
29
|
+
const note = (requestId, entry) => {
|
|
30
|
+
if (!Number.isFinite(entry))
|
|
31
|
+
return;
|
|
32
|
+
const round = requestId.endsWith(REFLECT_AGAIN) ? requestId.slice(0, -REFLECT_AGAIN.length) : requestId;
|
|
33
|
+
starts.set(round, Math.min(starts.get(round) ?? entry, entry));
|
|
34
|
+
};
|
|
35
|
+
for (const record of submissions) {
|
|
36
|
+
if (record.type === "input" && typeof record.requestId === "string" && record.requestId.startsWith(REFLECT_PREFIX) && record.entry !== undefined)
|
|
37
|
+
note(record.requestId, Number(record.entry));
|
|
38
|
+
}
|
|
39
|
+
for (const entry of entries) {
|
|
40
|
+
const data = entry.data;
|
|
41
|
+
if (entry.kind === KINDS.endOfRunTurn && data?.role === "person" && typeof data.requestId === "string" && data.requestId.startsWith(REFLECT_PREFIX))
|
|
42
|
+
note(data.requestId, Number(entry.id));
|
|
43
|
+
}
|
|
44
|
+
const ends = entries.filter((entry) => entry.kind === KINDS.end).map((entry) => Number(entry.id)).sort((a, b) => a - b);
|
|
45
|
+
return [...starts.values()].sort((a, b) => a - b).map((from) => {
|
|
46
|
+
const until = ends.find((end) => end >= from);
|
|
47
|
+
return until === undefined ? { from } : { from, until };
|
|
48
|
+
});
|
|
29
49
|
}
|
|
50
|
+
/** Whether entry `entry` (a number) is one of `ranges`' end-of-run turns. */
|
|
51
|
+
export const inReflect = (ranges, entry) => ranges.some(({ from, until }) => entry >= from && (until === undefined || entry <= until));
|
|
30
52
|
/** The refusal of the end-of-run turn's write or edit under work/.learning/: the tool gate's one text (NOTE_ONLY_TEXT), so
|
|
31
53
|
* the adapter loop's refusal and the gate's are the same words. */
|
|
32
54
|
export { NOTE_ONLY_TEXT as REFLECT_NOTE_ONLY } from "../tool-gate.js";
|
|
@@ -13,9 +13,10 @@ export type GithubAppAccessAt = GithubAppAccess & {
|
|
|
13
13
|
* joins the run's redactor (its `cut`), the first and every one after. */
|
|
14
14
|
export declare function githubAppAccess(store: {
|
|
15
15
|
readonly triggerSettings: Pick<TriggerSettings, "get">;
|
|
16
|
-
}, sealKey: Buffer | undefined, firstInput: unknown, { api, now, fromGitHub, hold }?: {
|
|
16
|
+
}, sealKey: Buffer | undefined, firstInput: unknown, { api, now, fromGitHub, hold, repo }?: {
|
|
17
17
|
api?: string;
|
|
18
18
|
now?: () => number;
|
|
19
19
|
fromGitHub?: boolean;
|
|
20
20
|
hold?: (values: string[]) => void;
|
|
21
|
+
repo?: string;
|
|
21
22
|
}): Promise<GithubAppAccessAt | undefined>;
|
|
@@ -36,23 +36,25 @@ async function appOf(store, sealKey) {
|
|
|
36
36
|
* `fromGitHub`: the run's first input is a github trigger's firing (its launch's inputOrigin), whose payload tag names
|
|
37
37
|
* the repository and installation; any other run's tag is never read, only its owner's words. `hold`: each token minted
|
|
38
38
|
* joins the run's redactor (its `cut`), the first and every one after. */
|
|
39
|
-
export async function githubAppAccess(store, sealKey, firstInput, { api = GITHUB_API, now = Date.now, fromGitHub = false, hold } = {}) {
|
|
39
|
+
export async function githubAppAccess(store, sealKey, firstInput, { api = GITHUB_API, now = Date.now, fromGitHub = false, hold, repo } = {}) {
|
|
40
40
|
if (!sealKey)
|
|
41
41
|
return undefined;
|
|
42
42
|
const app = await appOf(store, sealKey);
|
|
43
43
|
if (!app)
|
|
44
44
|
return undefined;
|
|
45
|
-
|
|
45
|
+
// `repo`: the launch's (run-launch.ts repo), which the server checked against the agent's binding at the start: a run a
|
|
46
|
+
// person started with `repo`, or whose agent is bound to one repository. It comes before any URL in the words.
|
|
47
|
+
const target = repo !== undefined ? { repo } : githubTargetOf(isObject(firstInput) ? firstInput.content : firstInput, { payload: fromGitHub });
|
|
46
48
|
return {
|
|
47
49
|
api,
|
|
48
50
|
target,
|
|
49
51
|
// The App read again before each mint: one disconnected or replaced since the claim makes no token for this run.
|
|
50
|
-
mint: async (to) => {
|
|
52
|
+
mint: async (to, permissions) => {
|
|
51
53
|
// A read that fails throws on: the step's github_failed path keeps the token held until it expires, never a disconnect.
|
|
52
54
|
const still = await appOf(store, sealKey);
|
|
53
55
|
if (!still || still.appId !== app.appId || still.pem !== app.pem)
|
|
54
56
|
return { ok: false, reason: "disconnected", message: "the GitHub App was disconnected or replaced on this server" };
|
|
55
|
-
const minted = await mintInstallationToken(api, app.appId, app.pem, to, now());
|
|
57
|
+
const minted = await mintInstallationToken(api, app.appId, app.pem, to, now(), permissions);
|
|
56
58
|
if (minted.ok)
|
|
57
59
|
hold?.([minted.token]);
|
|
58
60
|
return minted;
|
|
@@ -11,7 +11,10 @@ import { hostMemory, neverFits } from "../host.js";
|
|
|
11
11
|
import { resolveHarness } from "./adapters/index.js";
|
|
12
12
|
import { adapterRunSpecFromLaunch, PI_WIRES } from "./adapter-run-spec.js";
|
|
13
13
|
import { createAdapterLoop } from "./adapter-loop.js";
|
|
14
|
-
import { savedModelKeys, withModelKeys } from "./claim-secrets.js";
|
|
14
|
+
import { hostDecisionKeys, savedModelKeys, withModelKeys } from "./claim-secrets.js";
|
|
15
|
+
import { decisionProvidersIn, DEFAULT_DECISION_PROVIDER, FAUX_JEV_ENV } from "../decisions.js";
|
|
16
|
+
import { FAUX_ENV } from "../model.js";
|
|
17
|
+
import { generalThresholdOf } from "../learn/general.js";
|
|
15
18
|
import { createDispatchLoop } from "./dispatch.js";
|
|
16
19
|
import { cliRunSpecFromLaunch } from "./cli-run-spec.js";
|
|
17
20
|
import { gradeModelFor, gradeRouteOf, learningLoopOf } from "./learning-dispatch.js";
|
|
@@ -58,6 +61,17 @@ export function resolveRunnerLoop(deps) {
|
|
|
58
61
|
},
|
|
59
62
|
...(deps.log ? { log: deps.log } : {}),
|
|
60
63
|
...(deps.gradeBound ? { gradeBound: deps.gradeBound } : {}),
|
|
64
|
+
// The generality pre-check (learn/general.ts) on this host's Jev, built as a learning end builds its check's
|
|
65
|
+
// decision providers (hostDecisionKeys: the runner's environment first, then the key saved in Settings), on the
|
|
66
|
+
// client and model a workflow's decision node gets when it names none. No Jev key: none asked. A faux host asks only
|
|
67
|
+
// its faux Jev (FAUX_JEV_ENV), as its grade goes only to the faux route: a key it inherited never sends a note out.
|
|
68
|
+
jev: async () => {
|
|
69
|
+
const env = deps.env ?? process.env;
|
|
70
|
+
if (env[FAUX_ENV] && !env[FAUX_JEV_ENV])
|
|
71
|
+
return undefined;
|
|
72
|
+
return (await decisionProvidersIn({ ...env, ...(await hostDecisionKeys({ store: deps.store, sealKey: deps.sealKey, env: deps.env }, [DEFAULT_DECISION_PROVIDER])) }))?.providers[DEFAULT_DECISION_PROVIDER];
|
|
73
|
+
},
|
|
74
|
+
generalThreshold: generalThresholdOf(deps.env ?? process.env),
|
|
61
75
|
});
|
|
62
76
|
}
|
|
63
77
|
// The harness's own entry decides which spec builds the run, by the entry's facts and never the harness's name: an entry
|
|
@@ -78,7 +92,7 @@ export function resolveRunnerLoop(deps) {
|
|
|
78
92
|
// run that does not learn supplies none. The same for the pi and the CLI spec.
|
|
79
93
|
return createAdapterLoop((claim, adapterRun) => runner.record === "loop"
|
|
80
94
|
? cliRunSpecFromLaunch(launch, adapterRun, deps, claim)
|
|
81
|
-
: adapterRunSpecFromLaunch(launch, adapterRun, deps, claim));
|
|
95
|
+
: adapterRunSpecFromLaunch(launch, adapterRun, deps, claim), deps.modelRetry ?? {});
|
|
82
96
|
}
|
|
83
97
|
return undefined;
|
|
84
98
|
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { type HeldRead, type HeldState } from "../computer-held.js";
|
|
2
|
+
import type { LoopComputer } from "./computer-channel.js";
|
|
3
|
+
import type { RootEntry } from "./computer-journal.js";
|
|
4
|
+
import type { Command } from "./loop-contract.js";
|
|
5
|
+
/** A run's held computer, as its spec gives it: the hold's minutes (its computer is the spec's `computer`). */
|
|
6
|
+
export type HeldSpec = {
|
|
7
|
+
readonly minutes: number;
|
|
8
|
+
};
|
|
9
|
+
/** What came of an owner's row: refused in words, or the change to commit (the commit takes the row). */
|
|
10
|
+
export type HeldDecision = {
|
|
11
|
+
readonly refused: string;
|
|
12
|
+
} | {
|
|
13
|
+
readonly write: () => Promise<void>;
|
|
14
|
+
};
|
|
15
|
+
/** How the hold's wait ended: its state moved on (started, or released by the owner or its lapse), or `cut` settled first. */
|
|
16
|
+
export type HeldWait = "moved" | "cut";
|
|
17
|
+
/** The journal's side of a run's held computer, for the pass whose Harness `commit` writes root entries (in one commit, in
|
|
18
|
+
* order). `now` is the clock its entries are stamped with. */
|
|
19
|
+
export declare function journalHeld(spec: HeldSpec, commit: (entries: readonly RootEntry[]) => Promise<void>, now?: () => number): {
|
|
20
|
+
/** The run's computer is up for this pass. `prior`, the run's root entries before it. A run's first pass writes the
|
|
21
|
+
* hold waiting. Every pass starts its own computer (the last pass's went at its close: a new claim, or a restart after
|
|
22
|
+
* a fault within one), so a pass that finds a hold not over finds it gone with the computer that held it, and what
|
|
23
|
+
* the owner set up on it: released, `lost` (the loop ends the run in those words). */
|
|
24
|
+
up(prior: readonly {
|
|
25
|
+
readonly kind: string;
|
|
26
|
+
readonly data?: unknown;
|
|
27
|
+
}[]): Promise<"held" | "lost" | "released">;
|
|
28
|
+
/** Where the hold is now. */
|
|
29
|
+
state: () => HeldState | undefined;
|
|
30
|
+
/** Why the hold ended without a release, if it did. */
|
|
31
|
+
lapse: () => HeldRead["why"];
|
|
32
|
+
/** Before the agent's first input: waits for the owner's start, a release, the hold's lapse, or `cut`. */
|
|
33
|
+
untilStarted: (cut: Promise<unknown>) => Promise<HeldWait>;
|
|
34
|
+
/** The agent's end (or a person's stop of it): the run keeps its computer (the hold ended, the Timeline saying so in
|
|
35
|
+
* `words`) until the owner releases it, the hold lapses, or `cut` settles first (a lost claim, a cancel). A hold
|
|
36
|
+
* already released waits for nothing. */
|
|
37
|
+
heldAtEnd(cut: Promise<unknown>, words?: string): Promise<HeldWait>;
|
|
38
|
+
/** The hold's minutes. */
|
|
39
|
+
minutes: number;
|
|
40
|
+
/** Why an owner's call is refused now: the hold is over (released, lapsed or lost). Undefined while the computer is
|
|
41
|
+
* held: waiting, started or ended. */
|
|
42
|
+
refusesCall(): string | undefined;
|
|
43
|
+
/** An owner's call starts: the hold cannot lapse until every call in flight has ended. */
|
|
44
|
+
callStarted(): void;
|
|
45
|
+
/** An owner's call ended at `at`: the hold's count starts again from it once the last call in flight is done. */
|
|
46
|
+
callEnded(at: number): void;
|
|
47
|
+
/** The hold's count starts again from `at`. */
|
|
48
|
+
touched(at: number): void;
|
|
49
|
+
/** An owner's row: a start or a release. */
|
|
50
|
+
decide(command: Command): HeldDecision;
|
|
51
|
+
/** Whether `data`, a hold or call entry's, is the change row `id` made: the commit that writes it takes the row. */
|
|
52
|
+
madeBy: (data: Record<string, unknown>, id: number) => boolean;
|
|
53
|
+
/** Every commit asked for so far is done. */
|
|
54
|
+
settled: () => Promise<void>;
|
|
55
|
+
};
|
|
56
|
+
export type JournalHeld = ReturnType<typeof journalHeld>;
|
|
57
|
+
/** The spec's `held` for a run whose launch holds its computer (run-launch.ts hold), given the loop's computer: none for a
|
|
58
|
+
* run that holds none, or whose computer speaks no protocol (none, or a browser). */
|
|
59
|
+
export declare function heldSpecOf(launch: {
|
|
60
|
+
readonly hold?: {
|
|
61
|
+
readonly minutes: number;
|
|
62
|
+
};
|
|
63
|
+
}, computer: LoopComputer | undefined): HeldSpec | undefined;
|
|
64
|
+
/** Whether a command row is the owner's, for a held computer. */
|
|
65
|
+
export declare const isHeldCommand: (command: Pick<Command, "kind">) => boolean;
|