@parcha/agentrun-serve 0.1.0-beta.34 → 0.1.0-beta.36
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 +263 -0
- package/README.md +339 -179
- package/dist/adapters.d.ts +15 -2
- package/dist/adapters.js +34 -2
- package/dist/agent-rows.d.ts +3 -1
- package/dist/agents-store.d.ts +2 -0
- package/dist/agents-store.js +25 -5
- 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 +90 -8
- package/dist/archil-settings.js +150 -14
- 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/bash-read-only.d.ts +13 -0
- package/dist/bash-read-only.js +77 -0
- 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 +2 -2
- package/dist/browser-cost.js +6 -4
- 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 +19 -44
- package/dist/cap.js +31 -77
- package/dist/cli.js +36 -27
- package/dist/computer-keys.d.ts +20 -10
- package/dist/computer-keys.js +36 -57
- package/dist/computer-routes.d.ts +1 -4
- package/dist/computer-routes.js +3 -5
- package/dist/computer-setting.d.ts +8 -5
- package/dist/computer-setting.js +91 -26
- package/dist/computer-view.d.ts +11 -2
- package/dist/computer-view.js +2 -1
- package/dist/computers.d.ts +54 -8
- package/dist/computers.js +101 -22
- package/dist/console/assets/index-BI4Byidu.js +550 -0
- package/dist/console/assets/index-C19gUF2n.css +1 -0
- package/dist/console/index.html +2 -2
- package/dist/content-filter.d.ts +7 -0
- package/dist/content-filter.js +23 -0
- package/dist/decision-cap.d.ts +7 -29
- package/dist/decision-cap.js +3 -94
- package/dist/docker-daemon.d.ts +2 -2
- package/dist/docker-daemon.js +2 -2
- package/dist/errors.d.ts +1 -0
- package/dist/errors.js +8 -5
- package/dist/explain.js +3 -1
- package/dist/faux-computers.js +4 -0
- package/dist/files.d.ts +1 -9
- package/dist/files.js +1 -9
- package/dist/github-connection.js +25 -7
- package/dist/github-faux.d.ts +26 -0
- package/dist/github-faux.js +76 -0
- package/dist/github.d.ts +28 -4
- package/dist/github.js +46 -10
- package/dist/gpu-words.d.ts +14 -0
- package/dist/gpu-words.js +21 -0
- package/dist/graph-served.d.ts +5 -3
- package/dist/graph-served.js +14 -6
- package/dist/graph-view.d.ts +2 -0
- package/dist/graph-view.js +29 -2
- 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-opencode/harness.js +0 -1
- package/dist/harness-opencode/host/policy.js +2 -2
- package/dist/harness.js +1 -1
- package/dist/host-tools.d.ts +8 -9
- package/dist/host-tools.js +7 -7
- package/dist/index.d.ts +2 -3
- package/dist/index.js +2 -2
- package/dist/key-refusal.d.ts +1 -1
- package/dist/key-refusal.js +2 -2
- package/dist/learn/check.d.ts +10 -2
- package/dist/learn/check.js +126 -8
- package/dist/learn/commit.d.ts +40 -6
- package/dist/learn/commit.js +164 -20
- package/dist/learn/folder.d.ts +11 -3
- package/dist/learn/folder.js +40 -16
- package/dist/learn/grade.d.ts +22 -2
- package/dist/learn/grade.js +127 -19
- package/dist/learn/index.d.ts +2 -2
- package/dist/learn/index.js +2 -2
- package/dist/learn/learning.sh +11 -13
- package/dist/learn/notes.d.ts +17 -3
- package/dist/learn/notes.js +19 -6
- package/dist/learn/reflect.d.ts +5 -2
- package/dist/learn/reflect.js +48 -32
- package/dist/learn/skills.d.ts +52 -5
- package/dist/learn/skills.js +104 -21
- package/dist/learned-nodes.d.ts +18 -0
- package/dist/learned-nodes.js +8 -0
- package/dist/learned-workflow.d.ts +27 -13
- package/dist/learned-workflow.js +110 -38
- package/dist/learning-cost.d.ts +79 -0
- package/dist/learning-cost.js +69 -0
- package/dist/learning-routes.d.ts +48 -2
- package/dist/learning-routes.js +99 -28
- package/dist/learning-run.d.ts +7 -5
- package/dist/learning-run.js +9 -6
- package/dist/learning-words.d.ts +3 -0
- package/dist/learning-words.js +6 -2
- package/dist/learning.d.ts +13 -28
- package/dist/learning.js +4 -18
- package/dist/llm.d.ts +4 -1
- package/dist/llm.js +4 -2
- package/dist/mcp-gateway.d.ts +6 -0
- package/dist/mcp-gateway.js +11 -1
- package/dist/mcp-probe.d.ts +8 -1
- package/dist/mcp-probe.js +62 -20
- package/dist/mcp-secret-writes.js +4 -0
- package/dist/mcp-servers-store.d.ts +12 -12
- package/dist/mcp-servers-store.js +8 -3
- package/dist/model.d.ts +8 -5
- package/dist/model.js +14 -6
- package/dist/openapi.d.ts +2 -0
- package/dist/openapi.js +236 -55
- package/dist/owner.d.ts +0 -1
- package/dist/owner.js +0 -2
- package/dist/pause.d.ts +2 -19
- package/dist/pause.js +5 -74
- package/dist/place-offers.d.ts +97 -0
- package/dist/place-offers.js +206 -0
- package/dist/place.d.ts +9 -13
- package/dist/place.js +22 -32
- package/dist/port-models.d.ts +12 -4
- package/dist/port-models.js +31 -9
- package/dist/print.d.ts +1 -8
- package/dist/print.js +1 -14
- package/dist/propose.d.ts +3 -0
- package/dist/propose.js +25 -19
- package/dist/run-cut.d.ts +5 -0
- package/dist/run-cut.js +19 -0
- package/dist/run-db.js +3 -3
- package/dist/run-launch.d.ts +18 -3
- package/dist/run-launch.js +11 -5
- package/dist/run-learning-served.d.ts +12 -1
- package/dist/run-manifest.d.ts +2 -2
- package/dist/run-manifest.js +2 -2
- package/dist/run-reads-over-store.d.ts +4 -2
- package/dist/run-reads-over-store.js +10 -8
- package/dist/run-secrets.js +3 -3
- package/dist/run-timeline-served.js +60 -38
- package/dist/run-view.d.ts +35 -16
- package/dist/run-view.js +64 -35
- package/dist/runnable.d.ts +6 -3
- package/dist/runnable.js +20 -4
- package/dist/runner/adapter-loop.d.ts +46 -5
- package/dist/runner/adapter-loop.js +381 -56
- package/dist/runner/adapter-run-spec.d.ts +46 -4
- package/dist/runner/adapter-run-spec.js +200 -45
- package/dist/runner/adapters/pi.d.ts +39 -3
- package/dist/runner/adapters/pi.js +124 -29
- package/dist/runner/beside.d.ts +8 -0
- package/dist/runner/beside.js +24 -2
- package/dist/runner/claim-secrets.d.ts +6 -0
- package/dist/runner/claim-secrets.js +15 -1
- package/dist/runner/cli-run-spec.d.ts +10 -0
- package/dist/runner/cli-run-spec.js +207 -64
- package/dist/runner/commands.d.ts +5 -1
- package/dist/runner/commands.js +3 -3
- package/dist/runner/conformance/harness.d.ts +1 -1
- package/dist/runner/conformance/harness.js +13 -10
- package/dist/runner/github-app.d.ts +7 -2
- package/dist/runner/github-app.js +46 -15
- package/dist/runner/harness-loops.d.ts +6 -1
- package/dist/runner/harness-loops.js +24 -1
- package/dist/runner/journal-kinds.d.ts +53 -7
- package/dist/runner/journal-kinds.js +29 -1
- package/dist/runner/learning-end.d.ts +15 -0
- package/dist/runner/learning-end.js +113 -20
- package/dist/runner/learning-factory.js +6 -2
- package/dist/runner/learning-loop.d.ts +75 -1
- package/dist/runner/learning-loop.js +215 -22
- package/dist/runner/learning-seed.d.ts +8 -0
- package/dist/runner/learning-seed.js +7 -1
- package/dist/runner/loop-contract.d.ts +12 -0
- package/dist/runner/loop-contract.js +6 -0
- package/dist/runner/loop.d.ts +5 -1
- package/dist/runner/loop.js +20 -0
- package/dist/runner/main.d.ts +9 -4
- package/dist/runner/main.js +38 -13
- package/dist/runner/mcp-claim.d.ts +7 -0
- package/dist/runner/mcp-claim.js +35 -2
- package/dist/runner/mcp-github.d.ts +15 -4
- package/dist/runner/mcp-github.js +55 -11
- package/dist/runner/mcp-run.d.ts +2 -0
- package/dist/runner/mcp-run.js +2 -0
- package/dist/runner/metrics.d.ts +18 -1
- package/dist/runner/metrics.js +81 -1
- package/dist/runner/model-route.d.ts +6 -0
- package/dist/runner/model-route.js +5 -2
- package/dist/runner/pr-checkout.d.ts +59 -0
- package/dist/runner/pr-checkout.js +176 -0
- package/dist/runner/reflect-hook.d.ts +1 -0
- package/dist/runner/reflect-hook.js +3 -3
- package/dist/runner/runner.js +136 -19
- package/dist/runner/spec-holds.d.ts +13 -3
- package/dist/runner/spec-holds.js +13 -10
- package/dist/runner/store-port.d.ts +4 -1
- package/dist/runner/store-secrets.js +17 -1
- package/dist/runner/subagent.d.ts +44 -0
- package/dist/runner/subagent.js +188 -0
- package/dist/runner/workflow-host.d.ts +25 -4
- package/dist/runner/workflow-host.js +26 -4
- package/dist/runner/workflow-loop.d.ts +9 -3
- package/dist/runner/workflow-loop.js +17 -10
- package/dist/runner/workflow-spec.d.ts +28 -13
- package/dist/runner/workflow-spec.js +247 -102
- package/dist/runs-over-store.d.ts +18 -7
- package/dist/runs-over-store.js +149 -31
- package/dist/seal-key.d.ts +0 -2
- package/dist/seal-key.js +0 -2
- package/dist/sealing.js +1 -2
- package/dist/secret-cut.d.ts +1 -1
- package/dist/secret-cut.js +1 -1
- package/dist/server-lock.js +4 -5
- package/dist/server.d.ts +49 -63
- package/dist/server.js +429 -230
- package/dist/stop-signals.d.ts +4 -2
- package/dist/stop-signals.js +5 -3
- package/dist/store/agent-body.d.ts +14 -3
- package/dist/store/agent-body.js +22 -8
- package/dist/store/deadline.d.ts +18 -0
- package/dist/store/deadline.js +49 -0
- package/dist/store/index.d.ts +3 -3
- package/dist/store/index.js +2 -2
- package/dist/store/journal/storage.js +2 -1
- package/dist/store/postgres/connection.d.ts +4 -0
- package/dist/store/postgres/connection.js +64 -13
- package/dist/store/postgres/migrations/0004_runs_outcome_stop_or_cancel.sql +11 -0
- package/dist/store/schema.d.ts +2 -1
- package/dist/store/schema.js +11 -8
- 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 -82
- package/dist/store/sqlite/run-patch.d.ts +18 -2
- package/dist/store/sqlite/run-patch.js +31 -2
- package/dist/store/sqlite/store.js +65 -11
- package/dist/store/store.d.ts +62 -12
- package/dist/store/store.js +22 -1
- package/dist/store-reads/analytics.js +3 -2
- package/dist/store-reads/cap.d.ts +1 -3
- package/dist/store-reads/cap.js +8 -6
- package/dist/store-reads/decisions.d.ts +2 -2
- package/dist/store-reads/decisions.js +3 -6
- package/dist/store-reads/journal.js +83 -15
- package/dist/store-reads/learning.d.ts +73 -3
- package/dist/store-reads/learning.js +232 -9
- package/dist/store-reads/runs.d.ts +6 -4
- package/dist/store-reads/runs.js +17 -10
- package/dist/store-reads/stats.js +5 -1
- package/dist/store-view.d.ts +15 -1
- package/dist/store-view.js +88 -29
- package/dist/template-eval.js +2 -1
- package/dist/templates.d.ts +73 -4
- package/dist/templates.js +113 -23
- package/dist/timeline/timeline.d.ts +11 -1
- package/dist/timeline/timeline.js +19 -4
- package/dist/tool-blurbs.js +1 -0
- package/dist/tool-budget.d.ts +26 -0
- package/dist/tool-budget.js +56 -0
- package/dist/tool-gate.d.ts +13 -3
- package/dist/tool-gate.js +15 -7
- package/dist/tool-plane.d.ts +42 -29
- package/dist/tool-plane.js +64 -27
- package/dist/tools.d.ts +53 -39
- package/dist/tools.js +174 -79
- package/dist/trigger-signatures.d.ts +1 -0
- package/dist/trigger-signatures.js +3 -1
- package/dist/triggers.d.ts +3 -3
- package/dist/triggers.js +2 -2
- package/dist/turn-end.d.ts +0 -3
- package/dist/turn-end.js +0 -3
- package/dist/uploads.d.ts +28 -5
- package/dist/uploads.js +82 -9
- package/dist/usage-lines.d.ts +1 -1
- package/dist/usage.d.ts +1 -47
- package/dist/usage.js +3 -82
- package/dist/validate.d.ts +8 -0
- package/dist/validate.js +40 -3
- package/dist/webhooks.d.ts +2 -1
- package/dist/webhooks.js +5 -2
- 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 +112 -0
- package/dist/workflow/node-runner.js +270 -0
- package/dist/workflow/node.d.ts +88 -0
- package/dist/workflow/node.js +99 -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 +9 -0
- package/dist/workflow/pi-versions.js +8 -0
- package/dist/workflow/readers.d.ts +36 -0
- package/dist/workflow/readers.js +145 -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 +76 -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 +411 -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/wal.d.ts +11 -0
- package/dist/workflow/wal.js +106 -0
- package/dist/workflow-run.d.ts +1 -1
- package/dist/workspace/agent-computer.d.ts +137 -0
- package/dist/workspace/agent-computer.js +292 -0
- package/dist/workspace/archil-claim.d.ts +13 -2
- package/dist/workspace/archil-claim.js +22 -13
- package/dist/workspace/archil-disk.d.ts +10 -1
- package/dist/workspace/archil-disk.js +4 -0
- package/dist/workspace/archil-disks.d.ts +49 -0
- package/dist/workspace/archil-disks.js +185 -0
- package/dist/workspace/archil-exec.d.ts +12 -2
- package/dist/workspace/archil-exec.js +18 -3
- package/dist/workspace/archil-mount-credential.d.ts +20 -4
- package/dist/workspace/archil-mount-credential.js +13 -4
- package/dist/workspace/archil.d.ts +2 -2
- package/dist/workspace/archil.js +25 -5
- package/dist/workspace/attach.js +2 -0
- package/dist/workspace/computer-deps.d.ts +18 -11
- package/dist/workspace/computer-deps.js +64 -40
- package/dist/workspace/computer-for-claim.d.ts +47 -9
- package/dist/workspace/computer-for-claim.js +236 -24
- package/dist/workspace/computer-janitor.d.ts +3 -2
- package/dist/workspace/computer-janitor.js +43 -9
- package/dist/workspace/computer-ledger.d.ts +3 -8
- package/dist/workspace/computer-ledger.js +7 -3
- package/dist/workspace/computer-providers.d.ts +5 -3
- package/dist/workspace/computer-providers.js +11 -9
- package/dist/workspace/hands.d.ts +5 -2
- package/dist/workspace/hands.js +4 -3
- package/dist/workspace/index.d.ts +5 -4
- package/dist/workspace/index.js +2 -1
- package/dist/workspace/local.d.ts +3 -0
- package/dist/workspace/local.js +9 -0
- package/dist/workspace/paths.js +3 -2
- package/dist/workspace/pi-env.d.ts +4 -0
- package/dist/workspace/pi-env.js +3 -2
- package/dist/workspace/resolve-computer.d.ts +48 -12
- package/dist/workspace/resolve-computer.js +88 -19
- package/dist/workspace/run-disk.d.ts +34 -0
- package/dist/workspace/run-disk.js +91 -0
- package/dist/workspace/run-tools.d.ts +6 -4
- package/dist/workspace/run-tools.js +17 -9
- package/dist/workspace/server-run-workspace.d.ts +3 -2
- package/dist/workspace/server-run-workspace.js +17 -4
- package/dist/workspace/workspace.d.ts +5 -0
- package/dist/workspace.d.ts +0 -3
- package/dist/workspace.js +2 -15
- package/package.json +11 -16
- package/skills/agentrun-serve/SKILL.md +1 -1
- package/templates/README.md +11 -8
- 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/mentions-defused/case.yaml +15 -0
- package/templates/code-review/evals/mentions-defused/fixtures/github-mcp.json +254 -0
- package/templates/code-review/evals/mentions-defused/graders/no-pings.md +16 -0
- package/templates/code-review/evals/mentions-defused/graders/posted-a-review.md +5 -0
- package/templates/code-review/evals/mentions-defused/graders/schema.md +5 -0
- package/templates/code-review/evals/mentions-defused/prompt.md +10 -0
- 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/kyb/evals/clean-public-company/graders/no-opensanctions.md +5 -0
- package/templates/kyb/evals/opensanctions-on/case.yaml +5 -0
- package/templates/kyb/evals/opensanctions-on/graders/licence-and-evidence.md +18 -0
- package/templates/kyb/evals/opensanctions-on/graders/schema.md +5 -0
- package/templates/kyb/evals/opensanctions-on/prompt.md +11 -0
- package/templates/release-notes/agent.md +11 -0
- 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 -76
- package/dist/budget.js +0 -204
- package/dist/console/assets/index-RPHGlXmM.js +0 -540
- package/dist/console/assets/index-opTN5Naq.css +0 -1
- 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/templates/code-review/rules/REVIEW.md +0 -41
package/dist/server.d.ts
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { type ModelNeeds } from "./model.js";
|
|
2
2
|
import { type HarnessCapability } from "./harness.js";
|
|
3
|
-
import type { MessageOrigin } from "./timeline/index.js";
|
|
4
3
|
import { type LearningMode } from "./learning.js";
|
|
5
4
|
import { type Place } from "./place.js";
|
|
6
5
|
import { type Store } from "./store/index.js";
|
|
7
|
-
import { type
|
|
8
|
-
import { type BoxOffer } from "./boxes.js";
|
|
9
|
-
import { type ImageState } from "./box-image.js";
|
|
6
|
+
import { type BoxOffer } from "./place-offers.js";
|
|
10
7
|
import { type StoredKeys } from "./secrets.js";
|
|
11
8
|
import type { TriggerAdapter } from "./trigger-adapter.js";
|
|
12
9
|
import { type TriggerClock } from "./triggers.js";
|
|
@@ -66,9 +63,19 @@ export type ServeOptions = {
|
|
|
66
63
|
* (the console, sign-in, setup, settings, MCP, triggers, hooks, ...) with a 404 before anything reads the request.
|
|
67
64
|
* It has no owner: accounts and open setup are off, there being no page to sign in to. */
|
|
68
65
|
apiOnly?: boolean;
|
|
66
|
+
/** Another Archil control plane than the key's region's, and its fetch: a test's fake, for the server's own Archil calls
|
|
67
|
+
* (a launch's disk read, the settings' test, an agent's disk removed). */
|
|
68
|
+
archilControl?: {
|
|
69
|
+
readonly baseUrl?: string;
|
|
70
|
+
readonly fetch?: typeof fetch;
|
|
71
|
+
};
|
|
69
72
|
/** With `faux` only: a module whose default export gives the `browser` tool's `{ provider, driver }` (the tests' fake
|
|
70
73
|
* backend), in place of Browserbase's or Kernel's. */
|
|
71
74
|
fauxBrowser?: string;
|
|
75
|
+
/** With `faux` only: a fake GitHub App, connected at the start, its API in this process on loopback (github-faux.ts),
|
|
76
|
+
* so the console's GitHub flows run with nothing sent to GitHub. Its webhook secret is kept beside the data
|
|
77
|
+
* (FAUX_GITHUB_FILE) for a test's signed delivery. Refused on a data directory another GitHub App is connected in. */
|
|
78
|
+
fauxGitHub?: boolean;
|
|
72
79
|
/** With `faux` only: a module whose default export is the fetch the check of a Kernel key goes through (the tests'
|
|
73
80
|
* fake), in place of Kernel's API. */
|
|
74
81
|
fauxKernel?: string;
|
|
@@ -103,24 +110,14 @@ export type ServeOptions = {
|
|
|
103
110
|
/** A module of harness table entries merged over the built-in ones (harness-table.ts HARNESS_TABLE_ENV): a test's
|
|
104
111
|
* stand-ins for the harnesses. */
|
|
105
112
|
harnessTable?: string;
|
|
106
|
-
/** With `faux` only:
|
|
107
|
-
|
|
108
|
-
fauxBox?: string;
|
|
109
|
-
/** Under `faux` only: a module that stands in for the VM provider's SDK (its client class, by the SDK's name for it),
|
|
110
|
-
* so the VM box runs on the tests' fake, never the provider. */
|
|
111
|
-
fauxVm?: string;
|
|
113
|
+
/** With `faux` only: Docker answers, so docker is available, and nothing asks Docker (place-offers.ts). */
|
|
114
|
+
fauxDocker?: boolean;
|
|
112
115
|
/** For tests: the lock each harness's first use installs by (harness-install.ts), by harness, with the package.json it
|
|
113
116
|
* locks beside it, in place of the one AgentRun ships, whose packages a test's own registry serves. */
|
|
114
117
|
harnessLocks?: Readonly<Record<string, string>>;
|
|
115
|
-
/** Under `faux`: a module whose default export gives a box's egress proxy its `lookup` and `dial` (box-egress.ts), the
|
|
116
|
-
* tests' fake network. */
|
|
117
|
-
fauxEgress?: string;
|
|
118
118
|
/** Under `faux`: a file read as this server's /proc/self/mountinfo (box-paths.ts), a container's in a test; absent (and
|
|
119
119
|
* no FAUX_MOUNTINFO_ENV), a faux server is on a host. */
|
|
120
120
|
fauxMountinfo?: string;
|
|
121
|
-
/** With `faux` only: the platform this server takes itself to run on (tests: `darwin`, to take a Mac's path to a box's
|
|
122
|
-
* network, box-egress-vm.ts, on another machine). */
|
|
123
|
-
fauxPlatform?: NodeJS.Platform;
|
|
124
121
|
/** Extra `Host` names to accept besides the loopback ones, on any port (host-check.ts). */
|
|
125
122
|
allowHosts?: string[];
|
|
126
123
|
/** The console's built files, answered at / (default dist/console beside the server, which this package's build copies
|
|
@@ -135,25 +132,9 @@ export type ServeOptions = {
|
|
|
135
132
|
minFreeBytes?: number;
|
|
136
133
|
/** Where the log lines go (print.ts); none without it. AGENTRUN_LOG=quiet leaves out the request lines. */
|
|
137
134
|
log?: (line: string) => void;
|
|
138
|
-
/** Told the Docker box image's state at the start, when this server has a Docker box, then each change (box-image.ts):
|
|
139
|
-
* the CLI says a first build in words, as it starts and as it ends. */
|
|
140
|
-
onBoxImage?: (state: ImageState) => void;
|
|
141
135
|
/** The lines a person reads about a stop on this data root: this server's, as its close begins and runs' processes are
|
|
142
|
-
* left to finish their turn
|
|
143
|
-
* standard error, after `agentrun-serve: `. */
|
|
136
|
+
* left to finish their turn. Default: standard error, after `agentrun-serve: `. */
|
|
144
137
|
notice?: (line: string) => void;
|
|
145
|
-
/** A test's seam: awaited by a stop between its mark and its abort, so a test can hold a stop in flight there. */
|
|
146
|
-
beforeAbort?: (runId: string) => Promise<void> | void;
|
|
147
|
-
/** A test's seam: awaited by a completed run's reopen for a follow-up, after the run reads open again and before its
|
|
148
|
-
* process is launched, so a test can hold a reopen there. */
|
|
149
|
-
beforeReopenLaunch?: (runId: string) => Promise<void> | void;
|
|
150
|
-
/** A test's seam: the host's memory, in bytes, that the runs' limit reads (host.ts), in place of this host's. */
|
|
151
|
-
hostMemory?: number;
|
|
152
|
-
/** A test's seam: told each run read in from its store (runs.ts onRunLoad). */
|
|
153
|
-
onRunLoad?: (runId: string) => void;
|
|
154
|
-
/** A test's seam: who wrote a message sent to a run through its messages route (`origin`, as a raised cap's follow-up
|
|
155
|
-
* carries it), so a test sends a server-written message down the path a person's message takes. */
|
|
156
|
-
messageOrigin?: (runId: string, content: string) => MessageOrigin | undefined;
|
|
157
138
|
/** The model the grader runs on (`--grade-model`; default AGENTRUN_SERVE_GRADE_MODEL, else the strong tier,
|
|
158
139
|
* AGENT_MODEL_STRONG, else each run's agent's own model). */
|
|
159
140
|
gradeModel?: string;
|
|
@@ -183,9 +164,6 @@ export type ServeOptions = {
|
|
|
183
164
|
templates?: string;
|
|
184
165
|
/** The waits before each try again of a webhook delivery (default 5 s, 5 min, 30 min, 2 h, 5 h and 10 h: webhooks.ts RETRY_MS). */
|
|
185
166
|
webhookRetryMs?: readonly number[];
|
|
186
|
-
/** The box runs' harnesses run in (4a's Box: its reap; on a shared server its run cgroups): the boxes runs leave are
|
|
187
|
-
* swept at start and let go at archive. The quarantine of boxes a reap could not empty is kept in the data directory. */
|
|
188
|
-
box?: BoxHost;
|
|
189
167
|
};
|
|
190
168
|
/** The test switches a run's process gets, each module path resolved: empty outside tests. A test's in-process runner
|
|
191
169
|
* takes the same (test/support.mjs startInProcessRunner). */
|
|
@@ -244,7 +222,7 @@ export declare function offersEnvOf(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
|
244
222
|
/** The server's reading of `base`, whole: its secrets, saved keys among them (`env`), the harnesses' offers, probed from
|
|
245
223
|
* env without the tool keys (offersEnvOf), and its capabilities made from both under its learning switch (`learning`,
|
|
246
224
|
* AGENTRUN_SERVE_LEARNING's when not given), its tool settings (`toolSettings`, what each web tool resolves to) and the
|
|
247
|
-
* box offers (`boxes`, what the
|
|
225
|
+
* box offers (`boxes`, what the server found at the start, place-offers.ts), with whether a revision that names no
|
|
248
226
|
* model runs (needsOf). The server makes it once at its start and then remakes only the parts a write changes
|
|
249
227
|
* (startHolding), so a key saved later can make a harness, a provider or the default model available with no restart.
|
|
250
228
|
* `gradeModel` is its `--grade-model`. */
|
|
@@ -259,6 +237,7 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
|
|
|
259
237
|
version: string;
|
|
260
238
|
platform: NodeJS.Platform;
|
|
261
239
|
};
|
|
240
|
+
/** What runs a run here (the contract's `runtimes`, informational): this server's runners, over its one store. */
|
|
262
241
|
runtimes: string[];
|
|
263
242
|
/** The harnesses a revision may name (`definition.harness`), whether this server runs each, and how many at once. */
|
|
264
243
|
harnesses: {
|
|
@@ -290,8 +269,8 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
|
|
|
290
269
|
priced: boolean | null;
|
|
291
270
|
source: typeof import("./model.js").MODEL_SOURCES[number];
|
|
292
271
|
route_prefix: string | null;
|
|
293
|
-
fast: string | null;
|
|
294
272
|
default: string | null;
|
|
273
|
+
fast: string | null;
|
|
295
274
|
strong: string | null;
|
|
296
275
|
};
|
|
297
276
|
/** What grades a run's proposed notes: the model this server names for it (learning.ts gradeModelOf), or null when
|
|
@@ -303,14 +282,14 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
|
|
|
303
282
|
* web tool, what it resolves to on each harness under this server's tool settings; `key`, the tool key that unlocks
|
|
304
283
|
* it (tool-keys.ts), when one does. */
|
|
305
284
|
tools: ({
|
|
306
|
-
providers?:
|
|
285
|
+
providers?: string[] | undefined;
|
|
307
286
|
provider?: string | undefined;
|
|
308
|
-
default_provider?:
|
|
287
|
+
default_provider?: string | undefined;
|
|
309
288
|
resolves?: Record<"opencode" | "codex" | "pi" | "claude-agent", import("./tool-plane.js").Resolution> | undefined;
|
|
310
289
|
why?: Record<"opencode" | "codex" | "pi" | "claude-agent", string> | undefined;
|
|
311
|
-
permission: "deny" | "
|
|
312
|
-
default_permission: "deny" | "
|
|
313
|
-
permissions: ("deny" | "
|
|
290
|
+
permission: "deny" | "allow" | "ask";
|
|
291
|
+
default_permission: "deny" | "allow" | "ask";
|
|
292
|
+
permissions: ("deny" | "allow" | "ask")[];
|
|
314
293
|
harnesses: ("opencode" | "codex" | "pi" | "claude-agent")[];
|
|
315
294
|
missing?: string[] | undefined;
|
|
316
295
|
reason?: string | undefined;
|
|
@@ -324,14 +303,14 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
|
|
|
324
303
|
summary: string;
|
|
325
304
|
} | {
|
|
326
305
|
key: string | undefined;
|
|
327
|
-
providers?:
|
|
306
|
+
providers?: string[] | undefined;
|
|
328
307
|
provider?: string | undefined;
|
|
329
|
-
default_provider?:
|
|
308
|
+
default_provider?: string | undefined;
|
|
330
309
|
resolves?: Record<"opencode" | "codex" | "pi" | "claude-agent", import("./tool-plane.js").Resolution> | undefined;
|
|
331
310
|
why?: Record<"opencode" | "codex" | "pi" | "claude-agent", string> | undefined;
|
|
332
|
-
permission: "deny" | "
|
|
333
|
-
default_permission: "deny" | "
|
|
334
|
-
permissions: ("deny" | "
|
|
311
|
+
permission: "deny" | "allow" | "ask";
|
|
312
|
+
default_permission: "deny" | "allow" | "ask";
|
|
313
|
+
permissions: ("deny" | "allow" | "ask")[];
|
|
335
314
|
harnesses: ("opencode" | "codex" | "pi" | "claude-agent")[];
|
|
336
315
|
missing?: string[] | undefined;
|
|
337
316
|
reason?: string | undefined;
|
|
@@ -425,7 +404,7 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
|
|
|
425
404
|
efforts: ("low" | "medium" | "high")[];
|
|
426
405
|
thinking: ("low" | "medium" | "high" | "xhigh" | "max")[];
|
|
427
406
|
/** The browser a run's `browser` tool drives: the vendor it resolves to under the server's settings when the tool is
|
|
428
|
-
* available here (tools[]),
|
|
407
|
+
* available here (tools[]), a browser provider's id (tool-plane.ts BROWSER_VENDOR_IDS), else none. */
|
|
429
408
|
browser: string;
|
|
430
409
|
/** A tool setting's `permission` (definition.tool_settings, /v2/settings/tools): allow, ask or deny, which the tool
|
|
431
410
|
* gate holds every tool call to (tool-gate.ts); an ask is answered at POST /runs/{id}/approvals/{approval_id}. */
|
|
@@ -453,7 +432,7 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
|
|
|
453
432
|
* which always exists (seal-key.ts), so MCP credentials are always kept sealed. */
|
|
454
433
|
mcp_client: {
|
|
455
434
|
transports: string[];
|
|
456
|
-
auth: ("headers" | "none" | "bearer" | "oauth" | "github_app")[];
|
|
435
|
+
auth: ("headers" | "none" | "bearer" | "oauth" | "github_app" | "per_run")[];
|
|
457
436
|
at_rest: string;
|
|
458
437
|
harnesses: string[];
|
|
459
438
|
};
|
|
@@ -509,6 +488,12 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
|
|
|
509
488
|
};
|
|
510
489
|
};
|
|
511
490
|
}>;
|
|
491
|
+
/** The capabilities document GET /v2/capabilities answers for `env`: each harness's offer resolved, its `default_model`
|
|
492
|
+
* included (harnessOffers), and whether a revision that names no model runs here (`models.ready`, and what it `needs`
|
|
493
|
+
* when not), so what this returns is what the route serves and what the document's schema holds.
|
|
494
|
+
* `learning` is the server's learning switch (`--learning`), AGENTRUN_SERVE_LEARNING's when not given; with this
|
|
495
|
+
* server's tool settings, what each web tool resolves to (tool-plane.ts); `boxes`, the box offers its places show;
|
|
496
|
+
* `gradeModel`, its `--grade-model`. */
|
|
512
497
|
export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number, learning?: LearningMode, toolSettings?: ToolSettingsMap, boxes?: readonly BoxOffer[], gradeModel?: string): Promise<{
|
|
513
498
|
backend: string;
|
|
514
499
|
contract: string;
|
|
@@ -517,6 +502,7 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
|
|
|
517
502
|
version: string;
|
|
518
503
|
platform: NodeJS.Platform;
|
|
519
504
|
};
|
|
505
|
+
/** What runs a run here (the contract's `runtimes`, informational): this server's runners, over its one store. */
|
|
520
506
|
runtimes: string[];
|
|
521
507
|
/** The harnesses a revision may name (`definition.harness`), whether this server runs each, and how many at once. */
|
|
522
508
|
harnesses: {
|
|
@@ -548,8 +534,8 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
|
|
|
548
534
|
priced: boolean | null;
|
|
549
535
|
source: typeof import("./model.js").MODEL_SOURCES[number];
|
|
550
536
|
route_prefix: string | null;
|
|
551
|
-
fast: string | null;
|
|
552
537
|
default: string | null;
|
|
538
|
+
fast: string | null;
|
|
553
539
|
strong: string | null;
|
|
554
540
|
};
|
|
555
541
|
/** What grades a run's proposed notes: the model this server names for it (learning.ts gradeModelOf), or null when
|
|
@@ -561,14 +547,14 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
|
|
|
561
547
|
* web tool, what it resolves to on each harness under this server's tool settings; `key`, the tool key that unlocks
|
|
562
548
|
* it (tool-keys.ts), when one does. */
|
|
563
549
|
tools: ({
|
|
564
|
-
providers?:
|
|
550
|
+
providers?: string[] | undefined;
|
|
565
551
|
provider?: string | undefined;
|
|
566
|
-
default_provider?:
|
|
552
|
+
default_provider?: string | undefined;
|
|
567
553
|
resolves?: Record<"opencode" | "codex" | "pi" | "claude-agent", import("./tool-plane.js").Resolution> | undefined;
|
|
568
554
|
why?: Record<"opencode" | "codex" | "pi" | "claude-agent", string> | undefined;
|
|
569
|
-
permission: "deny" | "
|
|
570
|
-
default_permission: "deny" | "
|
|
571
|
-
permissions: ("deny" | "
|
|
555
|
+
permission: "deny" | "allow" | "ask";
|
|
556
|
+
default_permission: "deny" | "allow" | "ask";
|
|
557
|
+
permissions: ("deny" | "allow" | "ask")[];
|
|
572
558
|
harnesses: ("opencode" | "codex" | "pi" | "claude-agent")[];
|
|
573
559
|
missing?: string[] | undefined;
|
|
574
560
|
reason?: string | undefined;
|
|
@@ -582,14 +568,14 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
|
|
|
582
568
|
summary: string;
|
|
583
569
|
} | {
|
|
584
570
|
key: string | undefined;
|
|
585
|
-
providers?:
|
|
571
|
+
providers?: string[] | undefined;
|
|
586
572
|
provider?: string | undefined;
|
|
587
|
-
default_provider?:
|
|
573
|
+
default_provider?: string | undefined;
|
|
588
574
|
resolves?: Record<"opencode" | "codex" | "pi" | "claude-agent", import("./tool-plane.js").Resolution> | undefined;
|
|
589
575
|
why?: Record<"opencode" | "codex" | "pi" | "claude-agent", string> | undefined;
|
|
590
|
-
permission: "deny" | "
|
|
591
|
-
default_permission: "deny" | "
|
|
592
|
-
permissions: ("deny" | "
|
|
576
|
+
permission: "deny" | "allow" | "ask";
|
|
577
|
+
default_permission: "deny" | "allow" | "ask";
|
|
578
|
+
permissions: ("deny" | "allow" | "ask")[];
|
|
593
579
|
harnesses: ("opencode" | "codex" | "pi" | "claude-agent")[];
|
|
594
580
|
missing?: string[] | undefined;
|
|
595
581
|
reason?: string | undefined;
|
|
@@ -683,7 +669,7 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
|
|
|
683
669
|
efforts: ("low" | "medium" | "high")[];
|
|
684
670
|
thinking: ("low" | "medium" | "high" | "xhigh" | "max")[];
|
|
685
671
|
/** The browser a run's `browser` tool drives: the vendor it resolves to under the server's settings when the tool is
|
|
686
|
-
* available here (tools[]),
|
|
672
|
+
* available here (tools[]), a browser provider's id (tool-plane.ts BROWSER_VENDOR_IDS), else none. */
|
|
687
673
|
browser: string;
|
|
688
674
|
/** A tool setting's `permission` (definition.tool_settings, /v2/settings/tools): allow, ask or deny, which the tool
|
|
689
675
|
* gate holds every tool call to (tool-gate.ts); an ask is answered at POST /runs/{id}/approvals/{approval_id}. */
|
|
@@ -711,7 +697,7 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
|
|
|
711
697
|
* which always exists (seal-key.ts), so MCP credentials are always kept sealed. */
|
|
712
698
|
mcp_client: {
|
|
713
699
|
transports: string[];
|
|
714
|
-
auth: ("headers" | "none" | "bearer" | "oauth" | "github_app")[];
|
|
700
|
+
auth: ("headers" | "none" | "bearer" | "oauth" | "github_app" | "per_run")[];
|
|
715
701
|
at_rest: string;
|
|
716
702
|
harnesses: string[];
|
|
717
703
|
};
|