@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/adapters.d.ts
CHANGED
|
@@ -40,12 +40,15 @@ export declare const CODEX_STANDIN_ENV = "AGENTRUN_SERVE_CODEX_STANDIN";
|
|
|
40
40
|
/** For tests: a JSON `{command, args?, env?}` that speaks `opencode serve`'s HTTP API in place of OpenCode. The OpenCode
|
|
41
41
|
* adapter (src/harness-opencode) takes it only under its own guard (AGENTRUN_OPENCODE_STANDIN=1, under a test runner). */
|
|
42
42
|
export declare const OPENCODE_STANDIN_ENV = "AGENTRUN_SERVE_OPENCODE_STANDIN";
|
|
43
|
+
/** Whether a test's stand-in runs in place of harness `id`'s own CLI in `env` (CODEX_STANDIN_ENV, OPENCODE_STANDIN_ENV):
|
|
44
|
+
* its adapter then loads nothing installed, so a run of it needs no first-use install. */
|
|
45
|
+
export declare const standsIn: (id: string, env: NodeJS.ProcessEnv) => boolean;
|
|
43
46
|
/** The event of a harness's own lines in the run's log (its model proxy's refusals and failures): a failed run's message
|
|
44
47
|
* is never taken from one (runs.ts lastLogLine). */
|
|
45
48
|
export declare const HARNESS_LOG_EVENT = "harness";
|
|
46
49
|
/**
|
|
47
50
|
* A harness's log, into the run's log: the run process's stderr, which serve opens on the run's process.log. One JSON
|
|
48
|
-
* line per call
|
|
51
|
+
* line per call (`{at, event, message, ...}`). A request's path loses its query string,
|
|
49
52
|
* and every value of the environment's key-shaped variables is cut out of the line, so a key a client sent in either
|
|
50
53
|
* place, or one serve holds, never reaches the log.
|
|
51
54
|
*/
|
|
@@ -59,7 +62,7 @@ type ModelCost = {
|
|
|
59
62
|
cacheRead: number;
|
|
60
63
|
cacheWrite: number;
|
|
61
64
|
};
|
|
62
|
-
/** A child's command under the run's confinement (
|
|
65
|
+
/** A child's command under the run's confinement (noNewPrivsPrefix): only added in front. */
|
|
63
66
|
export type ConfineChild = (child: Readonly<{
|
|
64
67
|
command: string;
|
|
65
68
|
args: string[];
|
|
@@ -81,6 +84,16 @@ export type AdapterNeeds = {
|
|
|
81
84
|
skills?: readonly SkillFiles[];
|
|
82
85
|
unpriced?: ReadonlySet<string>;
|
|
83
86
|
};
|
|
87
|
+
/** The ConfineChild that starts a child under `prefix` (the argv pi's commands start under, ending in "--"); none when
|
|
88
|
+
* the run confines nothing (macOS), since an adapter refuses a confinement that adds nothing. */
|
|
89
|
+
export declare function confineOf(prefix: readonly string[]): ConfineChild | undefined;
|
|
90
|
+
/** The argv a CLI run's process starts under for no_new_privs: `setpriv --no-new-privs --` on Linux, nothing on macOS
|
|
91
|
+
* (which has no no_new_privs). Where setpriv is not usable it throws (code `SETPRIV_UNAVAILABLE`), so the run is refused,
|
|
92
|
+
* never started unconfined. */
|
|
93
|
+
export declare function noNewPrivsPrefix(options?: {
|
|
94
|
+
noNewPrivs?: boolean;
|
|
95
|
+
setprivPath?: string;
|
|
96
|
+
}): string[];
|
|
84
97
|
/** The model key a run on `harness` (one on an adapter, by its wire's route) of `model` (the revision's; none, the host's default for the
|
|
85
98
|
* harness) takes: the one its requests carry on the route its provider below takes, as key-refusal.ts' runKeyOf names
|
|
86
99
|
* it. codex: the gateway's when AGENT_MODEL_BASE_URL is set, else OpenAI's, or OpenRouter's on OpenRouter's route;
|
package/dist/adapters.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// Claude Agent SDK and codex's Codex are installed on first use into the data's harnesses directory and loaded from there
|
|
5
5
|
// alone (harness-install.ts); opencode's pinned CLI that is missing says so with the one line that installs it: an npm
|
|
6
6
|
// install beside serve, or, when serve runs from npx, the npx line that runs it with the missing package.
|
|
7
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
7
|
+
import { accessSync, constants, existsSync, readFileSync, statSync } from "node:fs";
|
|
8
8
|
import { dirname, join, resolve, sep } from "node:path";
|
|
9
9
|
import { fileURLToPath } from "node:url";
|
|
10
10
|
import { facts as claudeFacts } from "@parcha/agentrun-harness-claude/facts";
|
|
@@ -97,12 +97,15 @@ export const CODEX_STANDIN_ENV = "AGENTRUN_SERVE_CODEX_STANDIN";
|
|
|
97
97
|
/** For tests: a JSON `{command, args?, env?}` that speaks `opencode serve`'s HTTP API in place of OpenCode. The OpenCode
|
|
98
98
|
* adapter (src/harness-opencode) takes it only under its own guard (AGENTRUN_OPENCODE_STANDIN=1, under a test runner). */
|
|
99
99
|
export const OPENCODE_STANDIN_ENV = "AGENTRUN_SERVE_OPENCODE_STANDIN";
|
|
100
|
+
/** Whether a test's stand-in runs in place of harness `id`'s own CLI in `env` (CODEX_STANDIN_ENV, OPENCODE_STANDIN_ENV):
|
|
101
|
+
* its adapter then loads nothing installed, so a run of it needs no first-use install. */
|
|
102
|
+
export const standsIn = (id, env) => (id === codexFacts.id && Boolean(env[CODEX_STANDIN_ENV])) || (id === openCodeFacts.id && Boolean(env[OPENCODE_STANDIN_ENV]));
|
|
100
103
|
/** The event of a harness's own lines in the run's log (its model proxy's refusals and failures): a failed run's message
|
|
101
104
|
* is never taken from one (runs.ts lastLogLine). */
|
|
102
105
|
export const HARNESS_LOG_EVENT = "harness";
|
|
103
106
|
/**
|
|
104
107
|
* A harness's log, into the run's log: the run process's stderr, which serve opens on the run's process.log. One JSON
|
|
105
|
-
* line per call
|
|
108
|
+
* line per call (`{at, event, message, ...}`). A request's path loses its query string,
|
|
106
109
|
* and every value of the environment's key-shaped variables is cut out of the line, so a key a client sent in either
|
|
107
110
|
* place, or one serve holds, never reaches the log.
|
|
108
111
|
*/
|
|
@@ -159,6 +162,35 @@ function unavailable(facts, error, npx, env) {
|
|
|
159
162
|
const hinted = installHint(said, facts.install.npmLine, facts.install.spec, npx, env);
|
|
160
163
|
return new HarnessUnavailable(hinted, hinted === said ? fixOf(facts, error) : undefined);
|
|
161
164
|
}
|
|
165
|
+
/** The ConfineChild that starts a child under `prefix` (the argv pi's commands start under, ending in "--"); none when
|
|
166
|
+
* the run confines nothing (macOS), since an adapter refuses a confinement that adds nothing. */
|
|
167
|
+
export function confineOf(prefix) {
|
|
168
|
+
if (!prefix.length)
|
|
169
|
+
return undefined;
|
|
170
|
+
return (child) => ({ command: prefix[0], args: [...prefix.slice(1), child.command, ...child.args] });
|
|
171
|
+
}
|
|
172
|
+
/** The util-linux `setpriv` a CLI run's process starts under. */
|
|
173
|
+
const SETPRIV = "/usr/bin/setpriv";
|
|
174
|
+
/** The argv a CLI run's process starts under for no_new_privs: `setpriv --no-new-privs --` on Linux, nothing on macOS
|
|
175
|
+
* (which has no no_new_privs). Where setpriv is not usable it throws (code `SETPRIV_UNAVAILABLE`), so the run is refused,
|
|
176
|
+
* never started unconfined. */
|
|
177
|
+
export function noNewPrivsPrefix(options = {}) {
|
|
178
|
+
const noNewPrivs = options.noNewPrivs ?? process.platform !== "darwin";
|
|
179
|
+
if (!noNewPrivs)
|
|
180
|
+
return [];
|
|
181
|
+
const path = options.setprivPath ?? SETPRIV;
|
|
182
|
+
try {
|
|
183
|
+
if (!statSync(path).isFile())
|
|
184
|
+
throw new Error("not a file");
|
|
185
|
+
accessSync(path, constants.X_OK);
|
|
186
|
+
}
|
|
187
|
+
catch (cause) {
|
|
188
|
+
const reason = cause instanceof Error ? cause.message : String(cause);
|
|
189
|
+
throw Object.assign(new Error(`commands run under no_new_privs (and as runAs) through setpriv (util-linux), which is not usable at ${path}: ${reason}. ` +
|
|
190
|
+
"Install util-linux, point setprivPath at it, or pass noNewPrivs: false on a host that already confines commands.", { cause }), { code: "SETPRIV_UNAVAILABLE" });
|
|
191
|
+
}
|
|
192
|
+
return [path, "--no-new-privs", "--"];
|
|
193
|
+
}
|
|
162
194
|
/** The model key a run on `harness` (one on an adapter, by its wire's route) of `model` (the revision's; none, the host's default for the
|
|
163
195
|
* harness) takes: the one its requests carry on the route its provider below takes, as key-refusal.ts' runKeyOf names
|
|
164
196
|
* it. codex: the gateway's when AGENT_MODEL_BASE_URL is set, else OpenAI's, or OpenRouter's on OpenRouter's route;
|
package/dist/agent-rows.d.ts
CHANGED
|
@@ -36,12 +36,14 @@ export type AgenticBody = {
|
|
|
36
36
|
harness?: string;
|
|
37
37
|
place?: RevisionPlace;
|
|
38
38
|
computer?: RevisionComputer;
|
|
39
|
-
learning?: boolean;
|
|
39
|
+
learning?: boolean | "notes";
|
|
40
40
|
toolSettings?: Record<string, Record<string, string>>;
|
|
41
41
|
approvals?: "never";
|
|
42
42
|
maxCostUsd?: number;
|
|
43
43
|
capMode?: string;
|
|
44
44
|
outputSchema?: Record<string, unknown>;
|
|
45
|
+
maxToolCalls?: number;
|
|
46
|
+
checkout?: "pull_request";
|
|
45
47
|
};
|
|
46
48
|
export type WorkflowBody = {
|
|
47
49
|
workflow: Workflow;
|
package/dist/agents-store.d.ts
CHANGED
|
@@ -103,6 +103,7 @@ export declare function agentView(entry: AgentEntry, origin: string, extra?: {
|
|
|
103
103
|
count: number;
|
|
104
104
|
live: number;
|
|
105
105
|
};
|
|
106
|
+
ownComputer?: Record<string, unknown> | null;
|
|
106
107
|
}): {
|
|
107
108
|
created_at: string;
|
|
108
109
|
updated_at: string;
|
|
@@ -124,6 +125,7 @@ export declare function agentView(entry: AgentEntry, origin: string, extra?: {
|
|
|
124
125
|
count: number;
|
|
125
126
|
live: number;
|
|
126
127
|
};
|
|
128
|
+
own_computer: Record<string, unknown> | null;
|
|
127
129
|
region: string;
|
|
128
130
|
home_etag: string;
|
|
129
131
|
archived_at: string | null;
|
package/dist/agents-store.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
// The agents this server holds, over the one store (store.agents);
|
|
2
|
-
// are folded into store/agent-body.ts. An agent is a
|
|
1
|
+
// The agents this server holds, over the one store (store.agents); the body check is store/agent-body.ts. An agent is a
|
|
3
2
|
// row with revisions written once; a definition is one revision; an edit commits the next and makes it current. A
|
|
4
3
|
// revision's body is checked by store/agent-body.ts before anything is written; its skill texts ride on the revision's row.
|
|
5
4
|
// The one server per store (the owner lock) is the sole writer of agents and revisions, so a read-then-write here is not
|
|
@@ -106,14 +105,18 @@ function revisionInputOf(definition, files) {
|
|
|
106
105
|
// permissionOf with the revision's approvals): a call node on a tool set to ask runs under never, as on main.
|
|
107
106
|
if (isObject(definition.workflow))
|
|
108
107
|
return { kind: "workflow", workflow: definition.workflow, ...(definition.approvals === "never" ? { approvals: "never" } : {}), ...common, ...capped };
|
|
109
|
-
const learning = typeof definition.learning === "boolean" ? { learning: definition.learning } : {};
|
|
108
|
+
const learning = typeof definition.learning === "boolean" || definition.learning === "notes" ? { learning: definition.learning } : {};
|
|
110
109
|
return {
|
|
111
110
|
kind: "agentic",
|
|
112
111
|
instructions: definition.instructions,
|
|
113
112
|
...(typeof definition.model === "string" ? { model: definition.model } : {}),
|
|
113
|
+
...(isObject(definition.model_tiers) ? { modelTiers: definition.model_tiers } : {}),
|
|
114
114
|
...(typeof definition.thinking === "string" ? { thinking: definition.thinking } : {}),
|
|
115
115
|
...(definition.approvals === "ask" || definition.approvals === "never" ? { approvals: definition.approvals } : {}),
|
|
116
116
|
...(isObject(definition.output_schema) ? { outputSchema: definition.output_schema } : {}),
|
|
117
|
+
...(definition.checkout === "pull_request" ? { checkout: "pull_request" } : {}),
|
|
118
|
+
// The tool-call budget (tool-budget.ts): 0 keeps none.
|
|
119
|
+
...(typeof definition.max_tool_calls === "number" && definition.max_tool_calls > 0 ? { maxToolCalls: definition.max_tool_calls } : {}),
|
|
117
120
|
...common,
|
|
118
121
|
...learning,
|
|
119
122
|
...capped,
|
|
@@ -131,6 +134,12 @@ function checkVersion(definition, version) {
|
|
|
131
134
|
throw invalid([{ field: "definition.version", reason: "not_an_option", message: `definition.version is ${version} here: the number of the revision this definition leaves current` }]);
|
|
132
135
|
}
|
|
133
136
|
}
|
|
137
|
+
/** The contract's `definition.version` on an edit: past `current`, the number of the agent's current revision. */
|
|
138
|
+
function checkPast(definition, current) {
|
|
139
|
+
if (typeof definition.version === "number" && definition.version <= current) {
|
|
140
|
+
throw invalid([{ field: "definition.version", reason: "not_an_option", message: `definition.version is past ${current} here: the current revision's number` }]);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
134
143
|
/** Whether committing `next` would leave the agent's current revision unchanged: the same kind and body (skills are in the
|
|
135
144
|
* body as their SHA-256, so equal files are an equal body — and equal pins an equal body, keys sorted by the validator). */
|
|
136
145
|
function sameRevision(current, next) {
|
|
@@ -251,7 +260,12 @@ export async function commitAgent(store, read, { definition, skills, note }, { i
|
|
|
251
260
|
checkVersion(definition, now.version);
|
|
252
261
|
return now;
|
|
253
262
|
}
|
|
254
|
-
|
|
263
|
+
// The contract's form takes any version past the current one (the revision is numbered the next all the same); the
|
|
264
|
+
// server's own form names the next revision's number, or none.
|
|
265
|
+
if (contract)
|
|
266
|
+
checkPast(definition, now.version);
|
|
267
|
+
else
|
|
268
|
+
checkVersion(definition, now.revisions + 1);
|
|
255
269
|
try {
|
|
256
270
|
await store.agents.addRevision({ agentId: agent.id, ifCurrent: base, ...revision });
|
|
257
271
|
return (await getAgent(store, agent.id));
|
|
@@ -285,9 +299,13 @@ function editOn(entry, definition, skills, note) {
|
|
|
285
299
|
// No approvals here: an edit that leaves them out asks (openapi.ts DefinitionInput.approvals),
|
|
286
300
|
// so no edit makes an agent unattended by saying nothing. The console's edit sends back the approvals it read.
|
|
287
301
|
...(definition.max_cost_usd === undefined && currentBody.maxCostUsd !== undefined ? { max_cost_usd: currentBody.maxCostUsd } : {}),
|
|
302
|
+
// A tool-call budget is a limit too: an edit of an agentic revision that leaves it out keeps it.
|
|
303
|
+
...(definition.max_tool_calls === undefined && current.kind === "agentic" && !isObject(definition.workflow) && currentBody.maxToolCalls !== undefined ? { max_tool_calls: currentBody.maxToolCalls } : {}),
|
|
288
304
|
...(definition.cap_mode === undefined && currentBody.capMode !== undefined ? { cap_mode: currentBody.capMode } : {}),
|
|
289
305
|
// The structured answer's schema is the agent's contract with its callers: an edit that leaves it out keeps it.
|
|
290
306
|
...(definition.output_schema === undefined && current.kind === "agentic" && !isObject(definition.workflow) && currentBody.outputSchema !== undefined ? { output_schema: currentBody.outputSchema } : {}),
|
|
307
|
+
// So is the checkout its runs start in (none clears it).
|
|
308
|
+
...(definition.checkout === undefined && current.kind === "agentic" && !isObject(definition.workflow) && currentBody.checkout !== undefined ? { checkout: currentBody.checkout } : {}),
|
|
291
309
|
}
|
|
292
310
|
: {};
|
|
293
311
|
return makeRevision({ ...definition, ...carried }, files, note);
|
|
@@ -331,7 +349,7 @@ export function definitionOf(agent, revision, version) {
|
|
|
331
349
|
...(body.capMode !== undefined ? { cap_mode: body.capMode } : {}),
|
|
332
350
|
};
|
|
333
351
|
const kindBody = revision.kind === "agentic"
|
|
334
|
-
? { instructions: body.instructions, ...(body.model ? { model: body.model } : {}), ...(body.thinking ? { thinking: body.thinking } : {}), ...(body.learning !== undefined ? { learning: body.learning } : {}), ...(body.outputSchema !== undefined ? { output_schema: body.outputSchema } : {}), ...common }
|
|
352
|
+
? { instructions: body.instructions, ...(body.model ? { model: body.model } : {}), ...(body.modelTiers ? { model_tiers: body.modelTiers } : {}), ...(body.thinking ? { thinking: body.thinking } : {}), ...(body.learning !== undefined ? { learning: body.learning } : {}), ...(body.outputSchema !== undefined ? { output_schema: body.outputSchema } : {}), ...(body.maxToolCalls !== undefined ? { max_tool_calls: body.maxToolCalls } : {}), ...(body.checkout !== undefined ? { checkout: body.checkout } : {}), ...common }
|
|
335
353
|
: { workflow: body.workflow, ...common };
|
|
336
354
|
return {
|
|
337
355
|
id: agent.id,
|
|
@@ -369,6 +387,8 @@ export function agentView(entry, origin, extra = {}) {
|
|
|
369
387
|
skills: Object.entries(body.skills ?? {}).map(([path, sha]) => ({ path, sha256: sha, size_bytes: entry.sizes.get(sha) ?? null })),
|
|
370
388
|
sign_ins: extra.signIns ?? [],
|
|
371
389
|
runs: extra.runs ?? { count: 0, live: 0 },
|
|
390
|
+
// Its own computer, kept between runs where its setting is persistent: the provider, the computer and its state.
|
|
391
|
+
own_computer: extra.ownComputer ?? null,
|
|
372
392
|
region: "local",
|
|
373
393
|
home_etag: etagOf(entry),
|
|
374
394
|
archived_at: agent.archivedAt == null ? null : new Date(agent.archivedAt).toISOString(),
|
package/dist/api-only.d.ts
CHANGED
|
@@ -2,7 +2,8 @@ import type { Route } from "./server.js";
|
|
|
2
2
|
/** The variable that turns the profile on. */
|
|
3
3
|
export declare const API_ONLY_ENV = "AGENTRUN_API_ONLY";
|
|
4
4
|
/** The routes (server.ts ROUTES, by name) an API-only server serves: a run's launch, read, list, timeline, messages,
|
|
5
|
-
* stop, cancel and cap raise; its files and the uploads a launch names;
|
|
5
|
+
* stop, cancel and cap raise; its files and the uploads a launch names; an agent's Archil disk, read and removed (the
|
|
6
|
+
* agent layer of a run's disk, archil-routes.ts); capabilities, health and usage. */
|
|
6
7
|
export declare const API_ONLY_ROUTES: ReadonlySet<string>;
|
|
7
8
|
/** Whether `env` turns the profile on: `1` or `true` on; unset, empty, `0` or `false` off. Any other value is refused in
|
|
8
9
|
* words (a TypeError), so a typo never leaves the console open on a server meant to be API-only. */
|
package/dist/api-only.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/** The variable that turns the profile on. */
|
|
2
2
|
export const API_ONLY_ENV = "AGENTRUN_API_ONLY";
|
|
3
3
|
/** The routes (server.ts ROUTES, by name) an API-only server serves: a run's launch, read, list, timeline, messages,
|
|
4
|
-
* stop, cancel and cap raise; its files and the uploads a launch names;
|
|
4
|
+
* stop, cancel and cap raise; its files and the uploads a launch names; an agent's Archil disk, read and removed (the
|
|
5
|
+
* agent layer of a run's disk, archil-routes.ts); capabilities, health and usage. */
|
|
5
6
|
export const API_ONLY_ROUTES = new Set([
|
|
6
7
|
"createRun", "createInlineRun",
|
|
8
|
+
"getAgentArchil", "deleteAgentArchil",
|
|
7
9
|
"getRun", "listRuns", "listAllRuns", "getTimeline",
|
|
8
10
|
"sendMessage", "stopRun", "cancelRun", "raiseRunCap",
|
|
9
11
|
"listRunFiles", "readRunFile",
|
package/dist/archil-routes.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { type KeyEnv, type KeyMeta } from "./key-meta.js";
|
|
2
2
|
import type { Store } from "./store/index.js";
|
|
3
|
-
import { type ArchilDisk, type ArchilDiskOptions } from "./workspace/archil-disk.js";
|
|
4
3
|
/** The routes, by their operation names. */
|
|
5
4
|
export declare const ARCHIL_ROUTES: ReadonlySet<string>;
|
|
6
5
|
/** The key names the Archil settings take, as the document names them. */
|
|
7
6
|
export declare const ARCHIL_KEY_NAMES: readonly string[];
|
|
8
|
-
/** The Archil settings as the owner reads them
|
|
7
|
+
/** The Archil settings as the owner reads them, with `source` while on (the server's environment, or saved through the
|
|
8
|
+
* PUT, "console"): the account key as `secret`, its SecretMeta, never a value. */
|
|
9
9
|
export type ArchilView = {
|
|
10
10
|
on: boolean;
|
|
11
|
-
|
|
11
|
+
source?: "env" | "console";
|
|
12
12
|
region?: string;
|
|
13
13
|
s3Url?: string;
|
|
14
14
|
image?: string;
|
|
@@ -21,14 +21,38 @@ export type ArchilTest = {
|
|
|
21
21
|
ok: false;
|
|
22
22
|
why: string;
|
|
23
23
|
};
|
|
24
|
+
/** An agent's disk as GET /v2/agents/{id}/archil answers it: the one agentrun made for it (diskNameOf:
|
|
25
|
+
* agentrun-<server id>-i-<agent id>), or none until its first run that uses it. */
|
|
26
|
+
export type AgentArchilView = {
|
|
27
|
+
on: boolean;
|
|
28
|
+
archil_disk: {
|
|
29
|
+
disk_id: string;
|
|
30
|
+
} | null;
|
|
31
|
+
};
|
|
32
|
+
/** The agent an agent's Archil route acts on, as the dispatch reads it: whether it is archived, whether its source
|
|
33
|
+
* manages it (an inline run's agent), and how many live runs, of any agent, are on a disk (liveRunsOnDisk). */
|
|
34
|
+
export type RemovingAgent = {
|
|
35
|
+
readonly id: string;
|
|
36
|
+
readonly archived: boolean;
|
|
37
|
+
readonly external: boolean;
|
|
38
|
+
readonly liveOn: (diskId: string) => Promise<number>;
|
|
39
|
+
};
|
|
40
|
+
/** How many live runs, of any agent, are on agent `agentId`'s disk `diskId`: a run whose launch names that disk (a run of
|
|
41
|
+
* another agent may name it in its archil_disk), or a run of the agent whose launch names none (its claim takes the
|
|
42
|
+
* agent's disk). A live run whose launch can't be read is counted: the disk is kept while a run might be on it. */
|
|
43
|
+
export declare function liveRunsOnDisk(runs: Pick<Store["runs"], "list" | "launch">, agentId: string, diskId: string): Promise<number>;
|
|
24
44
|
export interface ArchilRoutesOptions {
|
|
25
45
|
/** The server's one store: its settings and sealed keys. */
|
|
26
46
|
readonly store: Pick<Store, "settings" | "sealedKeys">;
|
|
27
47
|
/** The server's seal key: there is always one (seal-key.ts bootSealKey, at the start). */
|
|
28
48
|
readonly sealKey: Buffer;
|
|
29
|
-
/**
|
|
30
|
-
readonly
|
|
31
|
-
|
|
49
|
+
/** Another control plane than the region's, and its fetch: a test's fake. */
|
|
50
|
+
readonly control?: {
|
|
51
|
+
readonly baseUrl?: string;
|
|
52
|
+
readonly fetch?: typeof fetch;
|
|
53
|
+
};
|
|
54
|
+
/** The server's environment: an ARCHIL_API_KEY variable overrides the saved key, and ARCHIL_SETTINGS_ENV the saved
|
|
55
|
+
* settings (source "env"). */
|
|
32
56
|
readonly env?: KeyEnv;
|
|
33
57
|
}
|
|
34
58
|
export declare function createArchilRoutes(options: ArchilRoutesOptions): {
|
|
@@ -36,10 +60,19 @@ export declare function createArchilRoutes(options: ArchilRoutesOptions): {
|
|
|
36
60
|
save: (body: unknown) => Promise<ArchilView>;
|
|
37
61
|
off: () => Promise<ArchilView>;
|
|
38
62
|
test: (signal?: AbortSignal) => Promise<ArchilTest>;
|
|
63
|
+
agentView: (agentId: string) => Promise<AgentArchilView>;
|
|
64
|
+
removeAgentDisk: (agent: RemovingAgent, signal?: AbortSignal) => Promise<AgentArchilView & {
|
|
65
|
+
removed: {
|
|
66
|
+
disk_id: string;
|
|
67
|
+
} | null;
|
|
68
|
+
}>;
|
|
69
|
+
checkLaunchDisk: (diskId: string, signal?: AbortSignal) => Promise<void>;
|
|
39
70
|
};
|
|
40
71
|
export type ArchilRoutes = ReturnType<typeof createArchilRoutes>;
|
|
41
|
-
/** One of the owner's Archil routes at its handler: its answer (sent 200), or an ApiError (sent with its status).
|
|
72
|
+
/** One of the owner's Archil routes at its handler: its answer (sent 200), or an ApiError (sent with its status). An
|
|
73
|
+
* agent's route takes the agent as the dispatch read it. */
|
|
42
74
|
export declare function archilRoute(routes: ArchilRoutes, name: string, request: {
|
|
43
75
|
readonly body?: unknown;
|
|
44
76
|
readonly signal?: AbortSignal;
|
|
77
|
+
readonly agent?: RemovingAgent;
|
|
45
78
|
}): Promise<unknown>;
|