@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
|
@@ -1,5 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
// The claim's resolver: an agent's computer setting {kind, provider, image?, gpu?}, in the server's mode, read against the computer
|
|
2
|
+
// module's kind registry (its setting kinds and provider entries), gives how to start the computer for the run, whether
|
|
3
|
+
// it mounts the run's folder, and which of the kernel's ports it fills; or a refusal in words that name the setting
|
|
4
|
+
// (Settings → Computers). The runner's harness start calls it at the claim, starts the computer, and hands it to
|
|
5
|
+
// runTools (run-tools.ts), which follows the mount decided here. Pure until start: the registry, the saved keys and the
|
|
6
|
+
// launch of a vendor's computer are passed in, so a new provider is one entry in the registry and changes nothing here.
|
|
7
|
+
//
|
|
8
|
+
// The run's folder is mounted only when the kind has files and exec AND the provider mounts the mode's folder: Mode 1's
|
|
9
|
+
// is a folder of this machine (a bind), Mode 2's is on Archil (an archil mount). A sandbox must mount it: Mode 1 refuses
|
|
10
|
+
// a sandbox that is not Docker's (only a bind reaches this machine), Mode 2 refuses Docker's (it cannot mount Archil). A
|
|
11
|
+
// desktop, a phone and a browser are allowed in both modes: a desktop mounts only where its provider mounts the mode's
|
|
12
|
+
// folder and it offers files and exec; a phone and a browser never do. A provider whose required keys are not all saved
|
|
13
|
+
// is refused here, before anything starts; start hands the provider its declared keys alone. A sandbox's GPUs are held
|
|
14
|
+
// to what its provider declares, with the mode's folder as their mount, in the computer package's checkGpu words (a GPU
|
|
15
|
+
// with an Archil mount is refused where the provider has not proven it), and go into the computer's spec.
|
|
16
|
+
//
|
|
17
|
+
// Where the run's shell is follows the mount (shellPlaceOf): in the computer that mounts the folder; with none, Archil's
|
|
18
|
+
// serverless exec in Mode 2 (bash only); in Mode 1 none at all, since the folder is one of this server's own and a
|
|
19
|
+
// command there would run on the server itself. runShellOf reads it off a setting before anything starts (the tool
|
|
20
|
+
// plane shows bash unavailable by it), and the claim's runTools takes the same rule over the computer it started.
|
|
21
|
+
import { hostToolDefs } from "@parcha/agentrun-kernel/kernel";
|
|
22
|
+
import { configurationOf, imagesOf } from "@parcha/agentrun-computer";
|
|
2
23
|
import { noDockerWords } from "../docker-daemon.js";
|
|
24
|
+
import { gpuRefused } from "../gpu-words.js";
|
|
25
|
+
import { recordedClient } from "../computer-calls.js";
|
|
3
26
|
/** A provider's keys as the claim reads them: each key its registry entry declares, by `keyOf` (the server's reader:
|
|
4
27
|
* key-meta.ts keyReader, the environment's value, else the saved one); a key with no value is left out. */
|
|
5
28
|
export const providerKeys = (registry, keyOf) => async (provider) => {
|
|
@@ -31,8 +54,11 @@ export const noNetworkRefusal = (label, kind) => `This agent's computer is a ${l
|
|
|
31
54
|
* claim launches it, and asks only once its launch fails (ClaimSide.daemon). Absent: not asked.
|
|
32
55
|
*
|
|
33
56
|
* `boxAllow`: this server's allow setting (box-settings.ts boxAllowOf). Under "none", a computer whose provider makes no
|
|
34
|
-
* "none" is refused (noNetworkRefusal), as the claim refuses it. Absent: not asked.
|
|
35
|
-
|
|
57
|
+
* "none" is refused (noNetworkRefusal), as the claim refuses it. Absent: not asked.
|
|
58
|
+
*
|
|
59
|
+
* `hostWhy`: why this machine cannot run a provider's computers, in words that say how to fix it (computers.ts
|
|
60
|
+
* hostCommandRefusals, read at the server's start: the phone's adb not on PATH), or undefined. Absent: not asked. */
|
|
61
|
+
export async function computerReadiness(setting, mode, registry, keyOf, answers, boxAllow, hostWhy) {
|
|
36
62
|
const resolved = await resolveComputer(setting, mode, registry, {
|
|
37
63
|
keysOf: providerKeys(registry, keyOf),
|
|
38
64
|
// A setting is given, so the Mode 1 default (the only asker) is never read; and nothing is launched.
|
|
@@ -50,6 +76,9 @@ export async function computerReadiness(setting, mode, registry, keyOf, answers,
|
|
|
50
76
|
if (!said.up)
|
|
51
77
|
return { refused: `This agent's computer is a ${entry.label} ${resolved.kind}, and this server cannot run it: ${said.reason.replace(/[.!?]+$/, "")}.`, box: entry.id };
|
|
52
78
|
}
|
|
79
|
+
const host = entry ? hostWhy?.(entry.id) : undefined;
|
|
80
|
+
if (host)
|
|
81
|
+
return { refused: `This agent's computer is a ${entry.label} ${resolved.kind}, and this server cannot run it: ${host.replace(/[.!?]+$/, "")}.` };
|
|
53
82
|
if (boxAllow === "none" && entry && needsNetwork(entry.network))
|
|
54
83
|
return { refused: noNetworkRefusal(entry.label, resolved.kind) };
|
|
55
84
|
return { ok: true };
|
|
@@ -114,6 +143,21 @@ export function runShellOf(setting, mode, registry) {
|
|
|
114
143
|
return "none";
|
|
115
144
|
return shellPlaceOf(mounts, mode);
|
|
116
145
|
}
|
|
146
|
+
/** What a choice of computer leaves out of the shell, in plain words: shown beside it (GET /v2/computers shell_note) and
|
|
147
|
+
* said by the save's refusal of a tool it leaves out. A computer that mounts the folder leaves nothing out. */
|
|
148
|
+
export const SHELL_NOTES = Object.freeze({
|
|
149
|
+
local: "No computer: bash runs in a fresh container on the folder's own storage; background commands need a computer.",
|
|
150
|
+
none: "No computer on this server: the agent gets the file tools only, no shell. Pick a computer to run commands.",
|
|
151
|
+
});
|
|
152
|
+
/** The host tools a run with its shell at `shell` gets, by name: the kernel registry's own list (hostToolDefs), never a
|
|
153
|
+
* second one: the file tools always, bash with a shell, the five background tools on a computer. */
|
|
154
|
+
export const hostToolsOf = (shell) => hostToolDefs({ maxExecS: 600, shell }).map((def) => def.name);
|
|
155
|
+
/** A computer choice as an agent's settings show it: where its runs have their shell (runShellOf), the host tools that
|
|
156
|
+
* gives, and what it leaves out, in words (none for a computer that mounts the folder). */
|
|
157
|
+
export function shellChoiceOf(setting, mode, registry) {
|
|
158
|
+
const shell = runShellOf(setting, mode, registry);
|
|
159
|
+
return { shell, host_tools: hostToolsOf(shell), ...(shell === "computer" ? {} : { shell_note: SHELL_NOTES[shell] }) };
|
|
160
|
+
}
|
|
117
161
|
/** The server's default where an agent has no computer setting: in Mode 1 a sandbox on the first provider that binds a
|
|
118
162
|
* folder of this machine and answers here (Docker), else none; in Mode 2 none. */
|
|
119
163
|
async function defaultSetting(mode, registry, side) {
|
|
@@ -148,6 +192,9 @@ export async function resolveComputer(given, mode, registry, side) {
|
|
|
148
192
|
// The configurations of the provider that serve the kind; none, and the registry says why, by its closest one.
|
|
149
193
|
const serving = servingOf(registry, entry, kind);
|
|
150
194
|
if (serving.length === 0) {
|
|
195
|
+
const own = registry.unservedWhy?.(entry, kind);
|
|
196
|
+
if (own !== undefined)
|
|
197
|
+
return { refused: `${own}, or pick ${pick}` };
|
|
151
198
|
const why = entry.capabilities.map((one) => registry.servingRefusals(one, kind)).sort((a, b) => a.length - b.length)[0] ?? [];
|
|
152
199
|
return { refused: `${entry.label} gives no ${kind} computer${why.length > 0 ? `: ${why.join("; ")}` : ""}. Pick ${pick}` };
|
|
153
200
|
}
|
|
@@ -173,14 +220,24 @@ export async function resolveComputer(given, mode, registry, side) {
|
|
|
173
220
|
return { refused: `Mode 2 keeps workspaces on Archil; a local Docker computer can't mount them. Pick a remote sandbox for this agent's computer in ${SETTINGS}, or no computer.` };
|
|
174
221
|
return { refused: `A ${entry.label} sandbox can't mount the run's folder from Archil: pick another sandbox for this agent's computer in ${SETTINGS}.` };
|
|
175
222
|
}
|
|
176
|
-
// Its GPUs, a sandbox's alone: in
|
|
177
|
-
// the mode's folder as the mount it takes (a sandbox here always mounts it).
|
|
223
|
+
// Its GPUs, a sandbox's alone: in gpuRefused's words, against what the configuration the setting selected declares,
|
|
224
|
+
// with the mode's folder as the mount it takes (a sandbox here always mounts it). A GPU computer that can't mount the
|
|
225
|
+
// folder is told so, and what to use instead.
|
|
178
226
|
const gpu = kind === "sandbox" && setting.gpu ? setting.gpu : undefined;
|
|
179
227
|
if (gpu) {
|
|
180
|
-
const
|
|
181
|
-
if (
|
|
182
|
-
return { refused:
|
|
228
|
+
const refused = gpuRefused(gpu, configuration.gpu, { kind: mode === 1 ? "bind" : "archil" }, entry.label);
|
|
229
|
+
if (refused?.folder)
|
|
230
|
+
return { refused: refused.words };
|
|
231
|
+
if (refused)
|
|
232
|
+
return { refused: `A ${entry.label} sandbox can't have this agent's GPUs: ${refused.words}. Change the GPUs or the provider for this agent's computer in ${SETTINGS}.` };
|
|
183
233
|
}
|
|
234
|
+
// The agent's own computer, kept between its runs: only where the configuration keeps one, and never one that mounts
|
|
235
|
+
// the run's folder (a later run would find an earlier run's folder in it).
|
|
236
|
+
const persistent = setting.persistent === true;
|
|
237
|
+
if (persistent && configuration.persistence === undefined)
|
|
238
|
+
return { refused: `A ${entry.label} ${kind} keeps no computer for an agent between runs (it declares no persistence): turn persistent off, or pick a computer that keeps one, for this agent's computer in ${SETTINGS}.` };
|
|
239
|
+
if (persistent && mounts)
|
|
240
|
+
return { refused: `A ${entry.label} ${kind} mounts each run's folder, so it can't be kept between runs: turn persistent off for this agent's computer in ${SETTINGS}.` };
|
|
184
241
|
// Its keys: every required one saved, before anything starts; only declared names go to the provider.
|
|
185
242
|
const saved = await side.keysOf(entry.id);
|
|
186
243
|
const has = (name) => typeof saved[name] === "string" && saved[name] !== "";
|
|
@@ -201,7 +258,7 @@ export async function resolveComputer(given, mode, registry, side) {
|
|
|
201
258
|
const mount = mounts ? await workspace.mountSpec() : undefined;
|
|
202
259
|
let launched;
|
|
203
260
|
try {
|
|
204
|
-
launched = await side.launch(entry, { kind, keys, configuration, ...(mount ? { mount } : {}), ...(gpu ? { gpu: { type: gpu.type, count: gpu.count } } : {}), ...(signal ? { signal } : {}) });
|
|
261
|
+
launched = await side.launch(entry, { kind, keys, configuration, ...(mount ? { mount } : {}), ...(gpu ? { gpu: { type: gpu.type, count: gpu.count } } : {}), ...(persistent ? { persistent: true } : {}), ...(signal ? { signal } : {}) });
|
|
205
262
|
}
|
|
206
263
|
catch (error) {
|
|
207
264
|
// A provider that binds a folder of this machine (Docker) whose daemon does not answer: the one wording.
|
|
@@ -221,20 +278,21 @@ export async function resolveComputer(given, mode, registry, side) {
|
|
|
221
278
|
}
|
|
222
279
|
/** The started computer as runTools takes it, or what it lacks, in words. */
|
|
223
280
|
function runComputerOf(kind, launched, check) {
|
|
224
|
-
const groups = launched.groups;
|
|
225
281
|
// The run's browser tool opens a browser's sessions through its provider.
|
|
226
282
|
if (kind === "browser")
|
|
227
283
|
return launched.browser ? { kind, browser: launched.browser } : "it gave no CDP connection";
|
|
228
|
-
const {
|
|
229
|
-
if (!client)
|
|
284
|
+
const { hello } = launched;
|
|
285
|
+
if (!launched.client)
|
|
230
286
|
return "it gave no computer protocol client";
|
|
287
|
+
// Each call the agent's tools make is recorded on the tool call's row (computer-calls.ts): the run's one client.
|
|
288
|
+
const client = recordedClient(launched.client);
|
|
231
289
|
if (kind === "phone")
|
|
232
|
-
return { kind, computer: { client },
|
|
290
|
+
return hello ? { kind, computer: { client }, hello } : "it gave no hello";
|
|
233
291
|
if (check && !launched.readBack)
|
|
234
292
|
return "it gave no read-back of its mount";
|
|
235
293
|
const readBack = launched.readBack ? () => launched.readBack() : async () => ({ ok: false, error: { code: "unsupported", message: "nothing is mounted in this computer" } });
|
|
236
294
|
const computer = { id: launched.id, client, readBack };
|
|
237
295
|
if (kind === "sandbox")
|
|
238
296
|
return check ? { kind, computer, check } : "a sandbox mounts the run's folder";
|
|
239
|
-
return { kind, computer,
|
|
297
|
+
return hello ? { kind, computer, hello, ...(check ? { check } : {}) } : "it gave no hello";
|
|
240
298
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Settings } from "../store/index.js";
|
|
2
|
+
import type { LaunchDisk } from "../run-launch.js";
|
|
3
|
+
import type { ArchilControlOptions } from "./archil-mount-credential.js";
|
|
4
|
+
/** The disk a run uses, and whose it is: the launch's (a customer's) or its agent's. */
|
|
5
|
+
export interface RunDisk {
|
|
6
|
+
readonly diskId: string;
|
|
7
|
+
readonly kind: "launch" | "agent";
|
|
8
|
+
}
|
|
9
|
+
export interface RunDiskOptions {
|
|
10
|
+
/** The store's settings: the agent's stored disk and the server's id. */
|
|
11
|
+
readonly store: {
|
|
12
|
+
readonly settings: Pick<Settings, "get" | "put" | "putIfAbsent">;
|
|
13
|
+
};
|
|
14
|
+
readonly agentId: string;
|
|
15
|
+
/** The run, when the claim is a run's: the agent's disk it first resolves to is kept for it (a reopened run mounts that one). */
|
|
16
|
+
readonly runId?: string;
|
|
17
|
+
/** The disk the run's launch record names, when it names one. */
|
|
18
|
+
readonly launch?: LaunchDisk;
|
|
19
|
+
/** The control plane of the account key's region, with the key. */
|
|
20
|
+
readonly control: ArchilControlOptions;
|
|
21
|
+
readonly signal?: AbortSignal;
|
|
22
|
+
/** How long a disk just made may read `creating` before the run is refused (default 120 s). */
|
|
23
|
+
readonly availableMs?: number;
|
|
24
|
+
}
|
|
25
|
+
/** The words of the plan's disk limit, its number when Archil said it. */
|
|
26
|
+
export declare const diskLimitWords: (limit: number | undefined) => string;
|
|
27
|
+
/** Why disk `diskId`, named by a launch, can't hold a run here, in words naming the region; undefined when it can. A call
|
|
28
|
+
* that fails (Archil not reached, or refusing the key) throws its ArchilDiskError. */
|
|
29
|
+
export declare function launchDiskProblem(control: ArchilControlOptions, diskId: string, context?: {
|
|
30
|
+
readonly signal?: AbortSignal;
|
|
31
|
+
}): Promise<string | undefined>;
|
|
32
|
+
/** The run's disk: the launch's, checked again to be in the key's region; else the agent's, made now when it has none.
|
|
33
|
+
* Refused in words (ArchilClaimRefused) naming the disk or the region, never a key. */
|
|
34
|
+
export declare function runDiskOf(options: RunDiskOptions): Promise<RunDisk>;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// The disk a run keeps its folder on, in Archil mode: the one its launch names (a disk per customer, run-launch.ts
|
|
2
|
+
// archilDisk kind "launch"), else its agent's own. The claim resolves it before its mount credential is minted, so the
|
|
3
|
+
// token is minted, mounted, revoked and reclaimed on that disk alone, and Archil refuses it on any other.
|
|
4
|
+
// - A launch's disk is not agentrun's: it is read (GET /api/disks/{id}) to check it is in the account key's region, and
|
|
5
|
+
// never made, renamed or removed. The server reads it at the launch (a 422 before any run is made) and the claim
|
|
6
|
+
// again, for a disk removed in between; one in another region, or none of that id, is refused in words naming the
|
|
7
|
+
// region.
|
|
8
|
+
// - The agent's disk is stored on the agent (archil-settings.ts agentDiskOf). An agent with none yet has it made now, on
|
|
9
|
+
// its first run that uses it (never at the agent's creation: an agent whose runs all name a disk never has one), named
|
|
10
|
+
// agentrun-<server id>-i-<agent id> (diskNameOf), idempotent by that name. The plan's disk limit refuses the run in words.
|
|
11
|
+
import { agentDiskOf, diskNameOf, keepRunDisk, runDiskKept, serverIdOf, storeAgentDisk } from "../archil-settings.js";
|
|
12
|
+
import { ArchilClaimRefused } from "./archil-claim.js";
|
|
13
|
+
import { ArchilDiskLimit, availableDisk, ensureDisk, getDisk } from "./archil-disks.js";
|
|
14
|
+
/** The words of the plan's disk limit, its number when Archil said it. */
|
|
15
|
+
export const diskLimitWords = (limit) => limit === undefined ? "your Archil plan's disk limit is reached; upgrade or delete an agent" : `your Archil plan allows ${limit} disks; upgrade or delete an agent`;
|
|
16
|
+
/** Why disk `diskId`, named by a launch, can't hold a run here, in words naming the region; undefined when it can. A call
|
|
17
|
+
* that fails (Archil not reached, or refusing the key) throws its ArchilDiskError. */
|
|
18
|
+
export async function launchDiskProblem(control, diskId, context = {}) {
|
|
19
|
+
const region = control.region;
|
|
20
|
+
const disk = await getDisk(control, diskId, context);
|
|
21
|
+
if (disk === undefined)
|
|
22
|
+
return `Archil has no disk ${diskId} in region ${region}, the region of this server's Archil key: name a disk in ${region}.`;
|
|
23
|
+
if (disk.region !== "" && disk.region !== region)
|
|
24
|
+
return `The disk ${diskId} is in region ${disk.region}, and this server's Archil key is for region ${region}: name a disk in ${region}.`;
|
|
25
|
+
return undefined;
|
|
26
|
+
}
|
|
27
|
+
/** The run's disk: the launch's, checked again to be in the key's region; else the agent's, made now when it has none.
|
|
28
|
+
* Refused in words (ArchilClaimRefused) naming the disk or the region, never a key. */
|
|
29
|
+
export async function runDiskOf(options) {
|
|
30
|
+
const { launch, control, signal } = options;
|
|
31
|
+
const region = control.region;
|
|
32
|
+
if (launch?.kind === "launch") {
|
|
33
|
+
const problem = await launchDiskProblem(control, launch.diskId, signal ? { signal } : {}).catch((error) => {
|
|
34
|
+
throw new ArchilClaimRefused(`This run's Archil disk ${launch.diskId} could not be read: ${error.message}`, { cause: error });
|
|
35
|
+
});
|
|
36
|
+
if (problem !== undefined)
|
|
37
|
+
throw new ArchilClaimRefused(problem);
|
|
38
|
+
return { diskId: launch.diskId, kind: "launch" };
|
|
39
|
+
}
|
|
40
|
+
const stored = await agentDiskOf(options.store, options.agentId);
|
|
41
|
+
/** Waits for a pending disk to read available, then clears its pending mark (unless it was removed or replaced meanwhile). */
|
|
42
|
+
const ready = async (diskId) => {
|
|
43
|
+
await availableDisk(control, diskId, { ...(options.availableMs !== undefined ? { timeoutMs: options.availableMs } : {}), ...(signal ? { signal } : {}) });
|
|
44
|
+
const now = await agentDiskOf(options.store, options.agentId);
|
|
45
|
+
if (now?.diskId === diskId && !now.removing)
|
|
46
|
+
await storeAgentDisk(options.store, options.agentId, { diskId });
|
|
47
|
+
};
|
|
48
|
+
const readyReused = (diskId) => ready(diskId).catch((error) => {
|
|
49
|
+
throw new ArchilClaimRefused(`This agent's Archil disk ${diskId} is not ready in region ${region}: ${error.message}`, { cause: error });
|
|
50
|
+
});
|
|
51
|
+
// A launch that names no disk resolved to its agent's on its first claim, and that disk was kept for the run: a later
|
|
52
|
+
// claim of the same run (a reopened one) mounts it or is refused, never another disk.
|
|
53
|
+
const kept = launch === undefined && options.runId !== undefined ? await runDiskKept(options.store, options.runId) : undefined;
|
|
54
|
+
const bound = launch?.kind === "agent" ? launch.diskId : kept;
|
|
55
|
+
// The agent's disk as its launch recorded it is mounted only while it is still the agent's and not being removed: a
|
|
56
|
+
// run launched while DELETE /v2/agents/{id}/archil ran is refused, never started on a disk being deleted.
|
|
57
|
+
if (bound !== undefined) {
|
|
58
|
+
if (stored?.diskId !== bound || stored.removing)
|
|
59
|
+
throw new ArchilClaimRefused(`This run's Archil disk ${bound} was its agent's, and it ${stored?.diskId === bound ? "is being" : "has been"} removed: start a new run, and it gets the agent's new disk.`);
|
|
60
|
+
if (stored.pending)
|
|
61
|
+
await readyReused(bound);
|
|
62
|
+
return { diskId: bound, kind: "agent" };
|
|
63
|
+
}
|
|
64
|
+
const keep = async (diskId) => {
|
|
65
|
+
if (options.runId !== undefined)
|
|
66
|
+
await keepRunDisk(options.store, options.runId, diskId);
|
|
67
|
+
return { diskId, kind: "agent" };
|
|
68
|
+
};
|
|
69
|
+
if (stored?.removing)
|
|
70
|
+
throw new ArchilClaimRefused(`This agent's Archil disk ${stored.diskId} is being removed: start a new run once that is done, and it gets a new disk.`);
|
|
71
|
+
if (stored !== undefined) {
|
|
72
|
+
if (stored.pending)
|
|
73
|
+
await readyReused(stored.diskId);
|
|
74
|
+
return keep(stored.diskId);
|
|
75
|
+
}
|
|
76
|
+
const name = diskNameOf(await serverIdOf(options.store), options.agentId);
|
|
77
|
+
let id;
|
|
78
|
+
try {
|
|
79
|
+
id = (await ensureDisk(control, name, signal ? { signal } : {})).id;
|
|
80
|
+
// Stored before the wait, as pending, so a disk that never becomes available is still the agent's (DELETE
|
|
81
|
+
// /v2/agents/{id}/archil finds it, and the plan's slot it takes is never lost) and a claim that finds it waits.
|
|
82
|
+
await storeAgentDisk(options.store, options.agentId, { diskId: id, pending: true });
|
|
83
|
+
await ready(id);
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
if (error instanceof ArchilDiskLimit)
|
|
87
|
+
throw new ArchilClaimRefused(`This agent's Archil disk can't be made: ${diskLimitWords(error.limit)}.`, { cause: error });
|
|
88
|
+
throw new ArchilClaimRefused(`This agent's Archil disk ${name} can't be made in region ${region}: ${error.message}`, { cause: error });
|
|
89
|
+
}
|
|
90
|
+
return keep(id);
|
|
91
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import type { Context } from "@earendil-works/chord";
|
|
1
|
+
import type { Context } from "@earendil-works/chord/context";
|
|
2
2
|
import type { HostTool } from "@parcha/agentrun-kernel";
|
|
3
|
-
import { type CapabilityKind, type Registry } from "@parcha/agentrun-kernel/kernel";
|
|
4
|
-
import type { ComputerClient,
|
|
3
|
+
import { type CapabilityKind, type ComputerPort, type Executor, type Registry } from "@parcha/agentrun-kernel/kernel";
|
|
4
|
+
import type { ComputerClient, HelloResult } from "@parcha/agentrun-computer";
|
|
5
|
+
import { type Card } from "@parcha/agentrun-computer/surface";
|
|
5
6
|
import type { AttachableComputer, MountCheck } from "./attach.js";
|
|
7
|
+
import { ScriptGuard } from "./computer-script.js";
|
|
6
8
|
import { type PiAnswer, type PiExecutor } from "./executors.js";
|
|
7
9
|
import { type Hands } from "./hands.js";
|
|
8
10
|
import { type ClaimBrowser, type ShellPlace } from "./resolve-computer.js";
|
|
@@ -11,12 +13,13 @@ import type { Workspace } from "./workspace.js";
|
|
|
11
13
|
* The run's computer, as runTools takes it, by its kind:
|
|
12
14
|
* - sandbox: the run's folder is mounted in it, always; `check` is the mount check attach runs (the claim's epoch bound
|
|
13
15
|
* in);
|
|
14
|
-
* - desktop:
|
|
15
|
-
* files and exec;
|
|
16
|
-
* - phone:
|
|
16
|
+
* - desktop: the computer's tools; the folder is attached only when its provider mounts it (`check` given) and it
|
|
17
|
+
* offers files and exec;
|
|
18
|
+
* - phone: the computer's tools; never attached;
|
|
17
19
|
* - browser: what the run's browser tool drives it by (its CDP URL through its provider); no tools of the registry's,
|
|
18
20
|
* never attached.
|
|
19
|
-
* `
|
|
21
|
+
* `hello`: what a desktop or a phone said it is when the claim connected it; its groups say which of the computer's
|
|
22
|
+
* tools it has, and its surface is made from it.
|
|
20
23
|
*/
|
|
21
24
|
export type RunComputer = {
|
|
22
25
|
readonly kind: "sandbox";
|
|
@@ -25,22 +28,29 @@ export type RunComputer = {
|
|
|
25
28
|
} | {
|
|
26
29
|
readonly kind: "desktop";
|
|
27
30
|
readonly computer: AttachableComputer;
|
|
28
|
-
readonly
|
|
31
|
+
readonly hello: HelloResult;
|
|
29
32
|
readonly check?: MountCheck;
|
|
30
33
|
} | {
|
|
31
34
|
readonly kind: "phone";
|
|
32
35
|
readonly computer: {
|
|
33
36
|
readonly client: ComputerClient;
|
|
34
37
|
};
|
|
35
|
-
readonly
|
|
38
|
+
readonly hello: HelloResult;
|
|
36
39
|
} | {
|
|
37
40
|
readonly kind: "browser";
|
|
38
41
|
readonly browser: ClaimBrowser;
|
|
39
42
|
};
|
|
40
|
-
/** A desktop's or a phone's
|
|
41
|
-
* holds it waits for hand-back; a
|
|
42
|
-
* agent's ask for the person (`handoff`, computer_request_handoff's port), through the same hold. */
|
|
43
|
-
export type RunHold = (ports: Pick<Hands, "
|
|
43
|
+
/** A desktop's or a phone's port as a person's hold on the computer gives it back: each look or act made while the
|
|
44
|
+
* person holds it waits for hand-back; a look then runs, an act then is refused (the take-over's own words). With it,
|
|
45
|
+
* the agent's ask for the person (`handoff`, computer_request_handoff's port), through the same hold. */
|
|
46
|
+
export type RunHold = (ports: Pick<Hands, "computer">) => Pick<Hands, "computer" | "handoff">;
|
|
47
|
+
/** A desktop's or a phone's surface as a harness's own script runtime binds it (pi's code mode): its card, which the
|
|
48
|
+
* script prelude builds `computer` from, and the run's port, held by the person's take-over as the tools' is. */
|
|
49
|
+
export type ScriptComputer = {
|
|
50
|
+
readonly card: Card;
|
|
51
|
+
readonly port: ComputerPort; /** What the script's shell and files are held to (computer-script.ts ScriptGuard). */
|
|
52
|
+
readonly guard: ScriptGuard;
|
|
53
|
+
};
|
|
44
54
|
/** The run's scratch in its own folder: bash's TMPDIR. */
|
|
45
55
|
export declare const TMP_DIR = ".agentrun/tmp";
|
|
46
56
|
/** What runHands binds for a run. */
|
|
@@ -52,8 +62,8 @@ export type RunHands = {
|
|
|
52
62
|
readonly shell: ShellPlace;
|
|
53
63
|
/** The computer's kinds whose tools the run gets, past files and a shell. */
|
|
54
64
|
readonly kinds: readonly CapabilityKind[];
|
|
55
|
-
/**
|
|
56
|
-
readonly
|
|
65
|
+
/** What the computer offers (its groups): which of the computer's tools are listed to the model. */
|
|
66
|
+
readonly groups: readonly string[];
|
|
57
67
|
readonly maxExecS: number;
|
|
58
68
|
/** The name the model knows the run's folder by: /workspace in a computer, the folder's own path otherwise. */
|
|
59
69
|
readonly cwd: string;
|
|
@@ -65,8 +75,11 @@ export type RunHands = {
|
|
|
65
75
|
readonly read: PiExecutor;
|
|
66
76
|
readonly write: PiExecutor;
|
|
67
77
|
readonly edit: PiExecutor;
|
|
68
|
-
readonly bash?: PiExecutor;
|
|
78
|
+
readonly bash?: PiExecutor; /** computer_script's run in serve's isolate, with a desktop or a phone. */
|
|
79
|
+
readonly computer_script?: Executor;
|
|
69
80
|
};
|
|
81
|
+
/** A desktop's or a phone's surface for a harness's own script runtime; none for any other computer. */
|
|
82
|
+
readonly computer?: ScriptComputer;
|
|
70
83
|
/** The run's end, after its background processes are ended and before the computer is let go: bash's full outputs
|
|
71
84
|
* and its TMPDIR swept. */
|
|
72
85
|
sweep(): Promise<void>;
|
|
@@ -123,14 +136,18 @@ export type RunTools = {
|
|
|
123
136
|
readonly hands: Hands;
|
|
124
137
|
/** Where the run's shell is (runHands' shell): its gate reads its defaults by it (tool-gate.ts defaultPermission). */
|
|
125
138
|
readonly shell: ShellPlace;
|
|
126
|
-
/** The tools the claimed computer brings by its kind, as its groups offer them: a desktop's
|
|
127
|
-
*
|
|
139
|
+
/** The tools the claimed computer brings by its kind, as its groups offer them: a desktop's or a phone's
|
|
140
|
+
* (computer_observe, computer_act, computer_screenshot, computer_script, computer_request_handoff), by the kernel
|
|
141
|
+
* registry's own list. None with no computer, for
|
|
128
142
|
* a sandbox, or for a browser (its own binding lists its tools). An agent names its computer, never these tools
|
|
129
143
|
* (definition.tools refuses them), so a run binds them beside what it was granted (withKindTools). */
|
|
130
144
|
readonly kindTools: readonly string[];
|
|
131
145
|
/** The registry's tools `names` names, as the kernel's HostTool an adapter's session takes, each call through the
|
|
132
146
|
* run's gate decided before its intent, each answer kept in `results` (bindTools). */
|
|
133
147
|
hostTools(names: readonly string[], results?: ToolResults): HostTool[];
|
|
148
|
+
/** A desktop's or a phone's surface for a harness's own script runtime (pi's code mode binds `computer` over it); none
|
|
149
|
+
* for any other computer. */
|
|
150
|
+
readonly computer?: ScriptComputer;
|
|
134
151
|
/** The run's end, before the computer is let go: its background processes ended (TERM, then KILL 3 s later; none with
|
|
135
152
|
* no computer), then bash's full outputs and TMPDIR swept. */
|
|
136
153
|
end(): Promise<void>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { COMPUTER_TOOLS, createRegistry, endBackground } from "@parcha/agentrun-kernel/kernel";
|
|
2
|
+
import { createSurface } from "@parcha/agentrun-computer/surface";
|
|
3
|
+
import { portOf } from "./computer-ports.js";
|
|
4
|
+
import { computerScriptExecutor, ScriptGuard } from "./computer-script.js";
|
|
3
5
|
import { answerText, piExecutor } from "./executors.js";
|
|
4
6
|
import { ARCHIL_MAX_EXEC_S, handsOf, MAX_EXEC_S, shellEnv } from "./hands.js";
|
|
5
7
|
import { policyEnv, policyPrelude } from "../bash-read-only.js";
|
|
@@ -11,28 +13,17 @@ import { shellPlaceOf } from "./resolve-computer.js";
|
|
|
11
13
|
function mountedIn(computer) {
|
|
12
14
|
if (computer?.kind === "sandbox")
|
|
13
15
|
return computer;
|
|
14
|
-
if (computer?.kind === "desktop" && computer.check && computer.groups.includes("files") && computer.groups.includes("exec"))
|
|
16
|
+
if (computer?.kind === "desktop" && computer.check && computer.hello.groups.includes("files") && computer.hello.groups.includes("exec"))
|
|
15
17
|
return { computer: computer.computer, check: computer.check };
|
|
16
18
|
return undefined;
|
|
17
19
|
}
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const input = computer.groups.includes("input.pointer") || computer.groups.includes("input.keys");
|
|
26
|
-
return screen && input ? { ports: { screen: screenOf(client), input: inputOf(client) }, kinds: ["desktop"], without: [] } : { ports: {}, kinds: [], without: [] };
|
|
27
|
-
}
|
|
28
|
-
if (computer?.kind === "phone") {
|
|
29
|
-
if (!computer.groups.includes("screen") || !computer.groups.includes("input.touch"))
|
|
30
|
-
return { ports: {}, kinds: [], without: [] };
|
|
31
|
-
const tree = computer.groups.includes("apps.ui_tree");
|
|
32
|
-
const keys = computer.groups.includes("input.keys");
|
|
33
|
-
return { ports: { phone: phoneOf(computer.computer.client, { tree, keys }) }, kinds: ["phone"], without: [...(tree ? [] : ["phone_tree"]), ...(keys ? [] : ["phone_key"])] };
|
|
34
|
-
}
|
|
35
|
-
return { ports: {}, kinds: [], without: [] };
|
|
20
|
+
/** A desktop's or a phone's port, over its surface, the kind whose tools the run gets, its groups, and the script's
|
|
21
|
+
* executor for its card; none for any other computer. */
|
|
22
|
+
async function portsOf(computer, guard) {
|
|
23
|
+
if (computer?.kind !== "desktop" && computer?.kind !== "phone")
|
|
24
|
+
return { ports: {}, kinds: [], groups: [] };
|
|
25
|
+
const surface = createSurface(computer.computer.client, computer.hello);
|
|
26
|
+
return { ports: { computer: portOf(surface) }, kinds: [computer.kind], groups: surface.card.groups, script: computerScriptExecutor(surface.card, guard), card: surface.card };
|
|
36
27
|
}
|
|
37
28
|
/** The run's scratch in its own folder: bash's TMPDIR. */
|
|
38
29
|
export const TMP_DIR = ".agentrun/tmp";
|
|
@@ -64,9 +55,9 @@ export async function runHands(workspace, computer, options) {
|
|
|
64
55
|
const tools = Object.fromEntries([...fileTools(), bashTool()].map((tool) => [tool.name, tool]));
|
|
65
56
|
const read = mounted === undefined ? tools.read : readAnywhereInComputer(tools.read, attached, names, env);
|
|
66
57
|
const executor = (tool) => piExecutor(tool, fileEnv, options.context);
|
|
67
|
-
const
|
|
68
|
-
const
|
|
69
|
-
const { ports, kinds,
|
|
58
|
+
const guard = new ScriptGuard({ env: policyEnv(options.bashPolicy), prelude });
|
|
59
|
+
const own = await portsOf(computer, guard);
|
|
60
|
+
const { ports, kinds, groups, script, card } = options.hold !== undefined && own.ports.computer ? { ...own, ports: options.hold(own.ports) } : own;
|
|
70
61
|
return {
|
|
71
62
|
workspace: attached,
|
|
72
63
|
// The computer's processes, for the five background tools: the attached Workspace's own; none when the folder is not
|
|
@@ -74,11 +65,12 @@ export async function runHands(workspace, computer, options) {
|
|
|
74
65
|
hands: { ...handsOf(attached, { maxExecS, env, ...(prelude ? { prelude } : {}), ...network, ...(mounted === undefined ? {} : { processes: attached.process }) }), ...ports },
|
|
75
66
|
shell,
|
|
76
67
|
kinds,
|
|
77
|
-
|
|
68
|
+
groups,
|
|
78
69
|
maxExecS,
|
|
79
70
|
cwd,
|
|
80
71
|
names,
|
|
81
|
-
executors: { read: executor(read), write: executor(tools.write), edit: executor(tools.edit), ...(shell === "none" ? {} : { bash: executor(tools.bash) }) },
|
|
72
|
+
executors: { read: executor(read), write: executor(tools.write), edit: executor(tools.edit), ...(shell === "none" ? {} : { bash: executor(tools.bash) }), ...(script ? { computer_script: script } : {}) },
|
|
73
|
+
...(card && ports.computer ? { computer: { card, port: ports.computer, guard } } : {}),
|
|
82
74
|
async sweep() {
|
|
83
75
|
// Through the run's own Workspace, not the computer's: the sweep holds whether or not the computer still answers.
|
|
84
76
|
for (const dir of [OUTPUT_DIR, TMP_DIR])
|
|
@@ -122,7 +114,9 @@ export function bindTools(run, registry, names, options = {}) {
|
|
|
122
114
|
const isError = given.isError === true || given.error !== undefined;
|
|
123
115
|
const answer = { text: isError || SAYS_PATH.has(name) ? workspaceRelative(said, works) : said, isError };
|
|
124
116
|
options.results?.set(callId, answer);
|
|
125
|
-
|
|
117
|
+
// A computer tool's value beside its words: what a script's nested call reads (Codex's code mode), and an MCP
|
|
118
|
+
// client's structuredContent.
|
|
119
|
+
return { ...answer, ...(given.images?.length ? { images: given.images } : {}), ...(given.structured !== undefined && !isError ? { structured: given.structured } : {}) };
|
|
126
120
|
},
|
|
127
121
|
}];
|
|
128
122
|
});
|
|
@@ -138,8 +132,8 @@ export function bindTools(run, registry, names, options = {}) {
|
|
|
138
132
|
*/
|
|
139
133
|
export async function runTools(workspace, computer, options) {
|
|
140
134
|
const run = await runHands(workspace, computer, options);
|
|
141
|
-
const registry = createRegistry({ maxExecS: run.maxExecS, shell: run.shell, kinds: run.kinds,
|
|
142
|
-
const brought = new Set(
|
|
135
|
+
const registry = createRegistry({ maxExecS: run.maxExecS, shell: run.shell, kinds: run.kinds, groups: run.groups, executors: run.executors });
|
|
136
|
+
const brought = new Set(COMPUTER_TOOLS);
|
|
143
137
|
return {
|
|
144
138
|
workspace: run.workspace,
|
|
145
139
|
registry,
|
|
@@ -147,6 +141,7 @@ export async function runTools(workspace, computer, options) {
|
|
|
147
141
|
shell: run.shell,
|
|
148
142
|
kindTools: registry.list().map((def) => def.name).filter((name) => brought.has(name)),
|
|
149
143
|
hostTools: (names, results) => bindTools(run, registry, names, results ? { results } : {}),
|
|
144
|
+
...(run.computer ? { computer: run.computer } : {}),
|
|
150
145
|
async end() {
|
|
151
146
|
await endBackground(run.hands);
|
|
152
147
|
await run.sweep();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Store } from "../store/index.js";
|
|
2
2
|
import type { KeyEnv } from "../key-meta.js";
|
|
3
3
|
import { type ArchilDisk, type ArchilDiskOptions } from "./archil-disk.js";
|
|
4
4
|
import { type Workspace } from "./workspace.js";
|
|
@@ -11,7 +11,8 @@ export interface ServerRunWorkspaceOptions {
|
|
|
11
11
|
readonly sealKey: Buffer | undefined;
|
|
12
12
|
/** Makes the Archil disk (default archilDisk): a test's fake. */
|
|
13
13
|
readonly makeDisk?: (options: ArchilDiskOptions) => ArchilDisk;
|
|
14
|
-
/** The server's environment: an ARCHIL_API_KEY there is the account key, over a saved one
|
|
14
|
+
/** The server's environment: an ARCHIL_API_KEY there is the account key, over a saved one, and the Archil settings
|
|
15
|
+
* there (ARCHIL_SETTINGS_ENV) the region and S3 URL, over the saved row. */
|
|
15
16
|
readonly env?: KeyEnv;
|
|
16
17
|
}
|
|
17
18
|
/** `workspace` with its reads only: read, list, stat and grep pass through; everything else is refused. */
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
// The server's read-only view of a run's folder: what the server reads a run's files through (its file routes), with no
|
|
2
2
|
// runner claim. Mode 1: the run's local folder (runFolder). Mode 2 (the server's Archil settings present): the run's
|
|
3
|
-
// folder on the
|
|
3
|
+
// folder on the run's Archil disk (runKey; the disk its launch record names, else its agent's), its account key by the
|
|
4
|
+
// one resolver (archil-key.ts: the server's
|
|
4
5
|
// ARCHIL_API_KEY, else the sealed row), with no claim around it: no exec, no spill sweep, no mount credential, no mount.
|
|
5
6
|
//
|
|
6
7
|
// Read-only: read, list, stat and grep work as the run's own Workspace answers them (a link is never followed). Every
|
|
7
8
|
// call that would change the folder, run something in it, or put it in a computer is refused with REFUSED in plain words:
|
|
8
9
|
// only the run's runner writes its folder.
|
|
9
10
|
import { lstat } from "node:fs/promises";
|
|
10
|
-
import { loadArchilSettings } from "../archil-settings.js";
|
|
11
|
+
import { agentDiskOf, loadArchilSettings } from "../archil-settings.js";
|
|
12
|
+
import { readLaunchBody } from "../run-launch.js";
|
|
13
|
+
import { StoreLaunchMissing } from "../store/index.js";
|
|
11
14
|
import { ArchilClaimRefused } from "./archil-claim.js";
|
|
12
15
|
import { archilDisk } from "./archil-disk.js";
|
|
13
16
|
import { archilApiKey } from "./archil-key.js";
|
|
@@ -38,6 +41,11 @@ export function readOnlyWorkspace(workspace) {
|
|
|
38
41
|
attach: refuse,
|
|
39
42
|
};
|
|
40
43
|
}
|
|
44
|
+
/** The disk run `runId` keeps its folder on: its launch record's, else its agent's, or undefined when it has none yet. */
|
|
45
|
+
async function runDiskIdOf(store, runId, agentId) {
|
|
46
|
+
const named = await store.runs.launch(runId).then((row) => readLaunchBody(row.body)?.archilDisk, (error) => (error instanceof StoreLaunchMissing ? undefined : Promise.reject(error)));
|
|
47
|
+
return named?.diskId ?? (await agentDiskOf(store, agentId))?.diskId;
|
|
48
|
+
}
|
|
41
49
|
/**
|
|
42
50
|
* Run `runId`'s folder as the server reads it, read-only; null when there is no such run, or its folder is not there yet.
|
|
43
51
|
* In Mode 2, an Archil account key that is not saved, or a server with no seal key, is UNAVAILABLE in words that name
|
|
@@ -47,7 +55,12 @@ export async function serverRunWorkspace(store, runId, options) {
|
|
|
47
55
|
const run = await store.runs.get(runId);
|
|
48
56
|
if (run === undefined)
|
|
49
57
|
return null;
|
|
50
|
-
const settings = await loadArchilSettings(store);
|
|
58
|
+
const settings = await loadArchilSettings(store, options.env);
|
|
59
|
+
// The run's disk (Mode 2): the one its launch record names, else its agent's; none yet when its agent has no disk (its
|
|
60
|
+
// first run was not claimed), so it has no folder.
|
|
61
|
+
const diskId = settings === undefined ? undefined : await runDiskIdOf(store, runId, run.agentId);
|
|
62
|
+
if (settings !== undefined && diskId === undefined)
|
|
63
|
+
return null;
|
|
51
64
|
let workspace;
|
|
52
65
|
if (settings === undefined) {
|
|
53
66
|
const folder = runFolder(options.data, run.agentId, runId);
|
|
@@ -66,7 +79,7 @@ export async function serverRunWorkspace(store, runId, options) {
|
|
|
66
79
|
let disk;
|
|
67
80
|
try {
|
|
68
81
|
const { value } = await archilApiKey({ env: options.env ?? {}, keys: store.sealedKeys, sealKey: options.sealKey });
|
|
69
|
-
disk = (options.makeDisk ?? archilDisk)({ disk:
|
|
82
|
+
disk = (options.makeDisk ?? archilDisk)({ disk: diskId, region: settings.region, s3BaseUrl: settings.s3Url, key: () => value });
|
|
70
83
|
}
|
|
71
84
|
catch (error) {
|
|
72
85
|
if (error instanceof ArchilClaimRefused)
|
package/dist/workspace.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// A run's work/ as this server reads it (the console's file view and listing, a skill's SKILL.md), and an agent's home as
|
|
2
|
-
// it reads and writes it: never through a link. Each read and write goes through
|
|
2
|
+
// it reads and writes it: never through a link. Each read and write goes through the confinement (confine.ts), which
|
|
3
3
|
// walks down from the root on held directory handles without following, so a component swapped for a link between a
|
|
4
4
|
// check and the open is refused, not followed. On top of it: the path must be the root joined with its own names (a link
|
|
5
5
|
// anywhere on the way, even one pointing inside the root, is refused), only regular files and directories are read, and a
|