@parcha/agentrun-serve 0.1.0-beta.37 → 0.1.0-beta.39
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 +700 -0
- package/README.md +441 -177
- package/dist/adapters.d.ts +4 -1
- package/dist/adapters.js +4 -2
- package/dist/agent-rows.d.ts +1 -3
- package/dist/agents-store.d.ts +35 -3
- package/dist/agents-store.js +48 -23
- package/dist/answer-json.d.ts +34 -1
- package/dist/answer-json.js +91 -9
- package/dist/api-only.d.ts +1 -1
- package/dist/api-only.js +2 -2
- package/dist/bash-read-only.js +2 -1
- package/dist/browser-cost.js +52 -93
- package/dist/cap-short.d.ts +12 -0
- package/dist/cap-short.js +60 -0
- package/dist/cap.d.ts +3 -400
- package/dist/cap.js +6 -942
- package/dist/catalog.d.ts +0 -5
- package/dist/catalog.js +2 -6
- package/dist/chatgpt-plan.d.ts +163 -0
- package/dist/chatgpt-plan.js +549 -0
- package/dist/cli.js +26 -6
- package/dist/composio-preset.d.ts +25 -0
- package/dist/composio-preset.js +51 -8
- package/dist/composio-triggers.d.ts +113 -0
- package/dist/composio-triggers.js +411 -0
- package/dist/computer-calls.d.ts +36 -24
- package/dist/computer-calls.js +110 -27
- package/dist/computer-commands.d.ts +2 -0
- package/dist/computer-commands.js +7 -3
- package/dist/computer-live.d.ts +12 -2
- package/dist/computer-live.js +21 -5
- package/dist/computer-routes.d.ts +2 -2
- package/dist/computer-routes.js +2 -2
- package/dist/computer-setting.d.ts +15 -2
- package/dist/computer-setting.js +20 -4
- package/dist/computer-view.d.ts +18 -2
- package/dist/computer-view.js +21 -6
- package/dist/computer-viewer.js +40 -13
- package/dist/computers.d.ts +8 -2
- package/dist/computers.js +18 -8
- package/dist/console/assets/index-BNhZs-jp.css +1 -0
- package/dist/console/assets/index-BQv5aOGB.js +700 -0
- package/dist/console/index.html +2 -2
- package/dist/console-links.d.ts +2 -0
- package/dist/console-links.js +6 -3
- package/dist/decision-cap.d.ts +2 -5
- package/dist/decision-cap.js +3 -6
- package/dist/decision-rows.js +11 -11
- package/dist/decisions.js +4 -0
- package/dist/email/account.d.ts +84 -0
- package/dist/email/account.js +159 -0
- package/dist/email/answer.d.ts +10 -0
- package/dist/email/answer.js +182 -0
- package/dist/email/email-faux.d.ts +95 -0
- package/dist/email/email-faux.js +849 -0
- package/dist/email/labels.d.ts +1 -0
- package/dist/email/labels.js +84 -0
- package/dist/email/mail.d.ts +186 -0
- package/dist/email/mail.js +380 -0
- package/dist/email/names.d.ts +20 -0
- package/dist/email/names.js +40 -0
- package/dist/email/routes.d.ts +9 -0
- package/dist/email/routes.js +50 -0
- package/dist/email/tools.d.ts +20 -0
- package/dist/email/tools.js +517 -0
- package/dist/environment.d.ts +17 -2
- package/dist/environment.js +36 -8
- package/dist/errors.d.ts +6 -0
- package/dist/errors.js +12 -0
- package/dist/eval-mailbox.d.ts +103 -0
- package/dist/eval-mailbox.js +236 -0
- package/dist/faux-computers.js +4 -2
- package/dist/graph-view.d.ts +9 -2
- package/dist/graph-view.js +6 -2
- package/dist/harness-install.d.ts +28 -2
- package/dist/harness-install.js +147 -59
- package/dist/harness-opencode/adapter.js +2 -22
- package/dist/harness-opencode/facts.js +5 -4
- package/dist/harness-opencode/host/policy.d.ts +4 -5
- package/dist/harness-opencode/host/policy.js +14 -33
- package/dist/harness-opencode/index.d.ts +1 -1
- package/dist/harness-opencode/index.js +1 -1
- package/dist/harness-opencode/versions.d.ts +6 -0
- package/dist/harness-opencode/versions.js +6 -0
- package/dist/harness-table.d.ts +0 -2
- package/dist/harness-table.js +8 -7
- package/dist/harness.d.ts +12 -0
- package/dist/harness.js +15 -3
- package/dist/host-tools.d.ts +1 -5
- package/dist/host-tools.js +7 -10
- package/dist/hosted-search.d.ts +3 -3
- package/dist/hosted-search.js +51 -32
- package/dist/import-sources.d.ts +1 -1
- package/dist/import-sources.js +3 -3
- package/dist/import.d.ts +21 -0
- package/dist/import.js +186 -1
- package/dist/key-check.d.ts +0 -2
- package/dist/key-check.js +3 -4
- package/dist/key-refusal.d.ts +8 -2
- package/dist/key-refusal.js +16 -13
- package/dist/key-words.d.ts +3 -2
- package/dist/key-words.js +4 -2
- package/dist/learn/check.d.ts +24 -4
- package/dist/learn/check.js +340 -7
- package/dist/learn/commit.d.ts +10 -0
- package/dist/learn/commit.js +18 -4
- package/dist/learn/compile.d.ts +250 -0
- package/dist/learn/compile.js +507 -0
- package/dist/learn/general.d.ts +3 -0
- package/dist/learn/general.js +4 -2
- package/dist/learn/grade.d.ts +5 -1
- package/dist/learn/grade.js +11 -7
- package/dist/learn/notes.d.ts +8 -0
- package/dist/learn/notes.js +18 -0
- package/dist/learn/promote.d.ts +308 -0
- package/dist/learn/promote.js +321 -0
- package/dist/learn/refit.d.ts +48 -0
- package/dist/learn/refit.js +264 -0
- package/dist/learn/reflect.d.ts +5 -25
- package/dist/learn/reflect.js +14 -131
- package/dist/learn/replay-calls.d.ts +63 -0
- package/dist/learn/replay-calls.js +158 -0
- package/dist/learn/skills.d.ts +19 -16
- package/dist/learn/skills.js +157 -53
- package/dist/learn/workflow-nodes.d.ts +15 -0
- package/dist/learn/workflow-nodes.js +44 -0
- package/dist/learned-nodes.d.ts +58 -2
- package/dist/learned-nodes.js +68 -5
- package/dist/learned-workflow.d.ts +58 -32
- package/dist/learned-workflow.js +215 -77
- package/dist/learning-batch.d.ts +2 -2
- package/dist/learning-batch.js +4 -4
- package/dist/learning-cost.d.ts +41 -11
- package/dist/learning-cost.js +31 -13
- package/dist/learning-routes.d.ts +12 -2
- package/dist/learning-routes.js +34 -6
- package/dist/learning-words.d.ts +8 -1
- package/dist/learning-words.js +11 -1
- package/dist/learning.d.ts +26 -1
- package/dist/learning.js +7 -4
- package/dist/link-check.d.ts +27 -0
- package/dist/link-check.js +164 -0
- package/dist/llm.js +0 -3
- package/dist/local-models.d.ts +33 -2
- package/dist/local-models.js +43 -5
- package/dist/mcp-gateway.d.ts +12 -20
- package/dist/mcp-gateway.js +16 -44
- package/dist/mcp-oauth.d.ts +5 -0
- package/dist/mcp-oauth.js +1 -1
- package/dist/mcp-pin-first.d.ts +37 -0
- package/dist/mcp-pin-first.js +113 -0
- package/dist/mcp-probe.d.ts +8 -9
- package/dist/mcp-probe.js +16 -33
- package/dist/mcp-secret-writes.js +3 -0
- package/dist/mcp-servers-store.d.ts +102 -26
- package/dist/mcp-servers-store.js +151 -25
- package/dist/mcp-sources.d.ts +39 -0
- package/dist/mcp-sources.js +74 -0
- package/dist/mcp-store.d.ts +11 -0
- package/dist/mcp-store.js +16 -2
- package/dist/mcp-wire.d.ts +22 -0
- package/dist/mcp-wire.js +36 -0
- package/dist/mcp.js +3 -3
- package/dist/meta-tool-names.d.ts +1 -0
- package/dist/meta-tool-names.js +3 -0
- package/dist/model-form.d.ts +11 -0
- package/dist/model-form.js +17 -1
- package/dist/model.d.ts +39 -6
- package/dist/model.js +171 -32
- package/dist/monid.d.ts +50 -29
- package/dist/monid.js +234 -143
- package/dist/native/binding.d.ts +13 -0
- package/dist/native/binding.js +57 -0
- package/dist/native/cli.d.ts +2 -0
- package/dist/native/cli.js +48 -0
- package/dist/native/connection.d.ts +8 -0
- package/dist/native/connection.js +94 -0
- package/dist/native/context.d.ts +6 -0
- package/dist/native/context.js +22 -0
- package/dist/native/discovery.d.ts +27 -0
- package/dist/native/discovery.js +404 -0
- package/dist/native/environment.d.ts +4 -0
- package/dist/native/environment.js +18 -0
- package/dist/native/history.d.ts +20 -0
- package/dist/native/history.js +147 -0
- package/dist/native/instructions.d.ts +21 -0
- package/dist/native/instructions.js +173 -0
- package/dist/native/remote-worker-bridge.d.ts +3 -0
- package/dist/native/remote-worker-bridge.js +278 -0
- package/dist/native/remote.d.ts +187 -0
- package/dist/native/remote.js +492 -0
- package/dist/native/runtime.d.ts +17 -0
- package/dist/native/runtime.js +316 -0
- package/dist/native/runtimes.d.ts +66 -0
- package/dist/native/runtimes.js +41 -0
- package/dist/native/schema.d.ts +46 -0
- package/dist/native/schema.js +41 -0
- package/dist/native/types.d.ts +87 -0
- package/dist/native/types.js +1 -0
- package/dist/observation/http.d.ts +4 -0
- package/dist/observation/http.js +140 -0
- package/dist/observation/observer.d.ts +301 -0
- package/dist/observation/observer.js +919 -0
- package/dist/observation/schema.d.ts +52 -0
- package/dist/observation/schema.js +154 -0
- package/dist/openapi.d.ts +1 -0
- package/dist/openapi.js +705 -126
- package/dist/paid-calls.d.ts +34 -32
- package/dist/paid-calls.js +52 -104
- package/dist/place-offers.d.ts +4 -8
- package/dist/place-offers.js +4 -9
- package/dist/port-models.d.ts +7 -2
- package/dist/port-models.js +5 -2
- package/dist/print.d.ts +4 -2
- package/dist/print.js +4 -3
- package/dist/propose.d.ts +8 -3
- package/dist/propose.js +28 -7
- package/dist/provider.d.ts +5 -1
- package/dist/provider.js +17 -2
- package/dist/push-handler.d.ts +3 -2
- package/dist/push-handler.js +20 -6
- package/dist/reflect-range.js +2 -1
- package/dist/refusal-words.d.ts +11 -0
- package/dist/refusal-words.js +13 -2
- package/dist/rows.d.ts +5 -3
- package/dist/rows.js +15 -4
- package/dist/run-launch.d.ts +23 -1
- package/dist/run-launch.js +17 -4
- package/dist/run-learning-served.d.ts +84 -0
- package/dist/run-manifest.d.ts +8 -0
- package/dist/run-manifest.js +33 -1
- package/dist/run-reads-over-store.d.ts +3 -3
- package/dist/run-reads-over-store.js +13 -10
- package/dist/run-secrets.js +2 -3
- package/dist/run-timeline-served.d.ts +3 -2
- package/dist/run-timeline-served.js +12 -10
- package/dist/run-view.d.ts +59 -41
- package/dist/run-view.js +128 -64
- package/dist/runnable.d.ts +13 -8
- package/dist/runnable.js +77 -60
- package/dist/runner/adapter-loop.d.ts +60 -15
- package/dist/runner/adapter-loop.js +1406 -464
- package/dist/runner/adapter-run-spec.d.ts +45 -14
- package/dist/runner/adapter-run-spec.js +200 -116
- package/dist/runner/adapters/pi.d.ts +40 -7
- package/dist/runner/adapters/pi.js +149 -38
- package/dist/runner/beside.d.ts +3 -1
- package/dist/runner/beside.js +24 -8
- package/dist/runner/claim-secrets.d.ts +3 -1
- package/dist/runner/claim-secrets.js +28 -4
- package/dist/runner/cli-run-spec.d.ts +30 -0
- package/dist/runner/cli-run-spec.js +150 -66
- package/dist/runner/computer-channel.d.ts +5 -2
- package/dist/runner/computer-channel.js +5 -3
- package/dist/runner/computer-journal.d.ts +6 -0
- package/dist/runner/computer-journal.js +8 -10
- package/dist/runner/conformance/harness.d.ts +3 -0
- package/dist/runner/conformance/harness.js +149 -5
- package/dist/runner/conformance/subject.d.ts +11 -4
- package/dist/runner/end-of-run.d.ts +8 -5
- package/dist/runner/end-of-run.js +11 -6
- package/dist/runner/feedback-round.d.ts +79 -0
- package/dist/runner/feedback-round.js +127 -0
- package/dist/runner/harness-loops.js +17 -0
- package/dist/runner/journal-kinds.d.ts +55 -13
- package/dist/runner/journal-kinds.js +19 -0
- package/dist/runner/learning-dispatch.d.ts +3 -2
- package/dist/runner/learning-dispatch.js +6 -6
- package/dist/runner/learning-end.d.ts +58 -19
- package/dist/runner/learning-end.js +316 -115
- package/dist/runner/learning-factory.d.ts +3 -0
- package/dist/runner/learning-factory.js +8 -2
- package/dist/runner/learning-loop.d.ts +21 -1
- package/dist/runner/learning-loop.js +24 -6
- package/dist/runner/learning-seed.d.ts +4 -0
- package/dist/runner/learning-seed.js +14 -0
- package/dist/runner/loop-contract.d.ts +19 -3
- package/dist/runner/loop.d.ts +34 -1
- package/dist/runner/loop.js +55 -1
- package/dist/runner/main.d.ts +6 -1
- package/dist/runner/main.js +26 -4
- package/dist/runner/mcp-claim.d.ts +5 -1
- package/dist/runner/mcp-claim.js +66 -50
- package/dist/runner/mcp-run.d.ts +20 -53
- package/dist/runner/mcp-run.js +22 -88
- package/dist/runner/meta-tools.d.ts +44 -0
- package/dist/runner/meta-tools.js +344 -0
- package/dist/runner/metrics.d.ts +80 -21
- package/dist/runner/metrics.js +128 -42
- package/dist/runner/model-route.d.ts +12 -3
- package/dist/runner/model-route.js +149 -19
- package/dist/runner/monid-run.d.ts +18 -0
- package/dist/runner/monid-run.js +170 -0
- package/dist/runner/native-loop.d.ts +11 -0
- package/dist/runner/native-loop.js +438 -0
- package/dist/runner/promotion.d.ts +146 -0
- package/dist/runner/promotion.js +803 -0
- package/dist/runner/redact.js +3 -0
- package/dist/runner/reflect-hook.d.ts +36 -21
- package/dist/runner/reflect-hook.js +147 -49
- package/dist/runner/runner.d.ts +7 -1
- package/dist/runner/runner.js +34 -8
- package/dist/runner/sdk-loop.d.ts +7 -0
- package/dist/runner/sdk-loop.js +470 -0
- package/dist/runner/sessions.d.ts +8 -3
- package/dist/runner/sessions.js +5 -1
- package/dist/runner/spec-holds.d.ts +16 -2
- package/dist/runner/spec-holds.js +42 -14
- package/dist/runner/step-guard.d.ts +62 -0
- package/dist/runner/step-guard.js +93 -0
- package/dist/runner/store-secrets.js +17 -2
- package/dist/runner/subagent.d.ts +0 -3
- package/dist/runner/subagent.js +7 -12
- package/dist/runner/workflow-first.d.ts +226 -0
- package/dist/runner/workflow-first.js +293 -0
- package/dist/runner/workflow-loop.d.ts +1 -1
- package/dist/runner/workflow-loop.js +32 -19
- package/dist/runner/workflow-spec.d.ts +5 -1
- package/dist/runner/workflow-spec.js +63 -48
- package/dist/runs-over-store.d.ts +41 -4
- package/dist/runs-over-store.js +64 -22
- package/dist/sdk/runs.d.ts +115 -0
- package/dist/sdk/runs.js +422 -0
- package/dist/sdk/schema.d.ts +175 -0
- package/dist/sdk/schema.js +138 -0
- package/dist/sdk/workflows.d.ts +22 -0
- package/dist/sdk/workflows.js +39 -0
- package/dist/secrets.d.ts +2 -0
- package/dist/secrets.js +19 -1
- package/dist/server.d.ts +108 -20
- package/dist/server.js +874 -157
- package/dist/settings-wake.d.ts +8 -6
- package/dist/settings-wake.js +13 -7
- package/dist/skill-route.d.ts +3 -0
- package/dist/skill-route.js +16 -0
- package/dist/skills/agentrun-serve/SKILL.md +368 -0
- package/dist/stats.d.ts +10 -10
- package/dist/store/agent-body.d.ts +22 -7
- package/dist/store/agent-body.js +23 -14
- package/dist/store/command-wake.d.ts +3 -2
- package/dist/store/command-wake.js +4 -4
- package/dist/store/index.d.ts +1 -1
- package/dist/store/native-command-owner.d.ts +10 -0
- package/dist/store/native-command-owner.js +47 -0
- package/dist/store/postgres/connection.js +3 -1
- package/dist/store/postgres/migrations/0010_imported_templates.sql +18 -0
- package/dist/store/postgres/migrations/0011_revision_mcp_pin.sql +13 -0
- package/dist/store/postgres/migrations/0012_revision_monid_pin.sql +4 -0
- package/dist/store/postgres/migrations/0013_native_command_owner.sql +6 -0
- package/dist/store/postgres/migrations/0014_run_cost_upper_bound.sql +6 -0
- package/dist/store/postgres/store.js +3 -0
- package/dist/store/schema.d.ts +16 -0
- package/dist/store/schema.js +47 -8
- package/dist/store/sqlite/connection.d.ts +2 -2
- package/dist/store/sqlite/connection.js +2 -2
- package/dist/store/sqlite/run-patch.d.ts +8 -1
- package/dist/store/sqlite/run-patch.js +33 -10
- package/dist/store/sqlite/store.js +184 -28
- package/dist/store/store.d.ts +98 -21
- package/dist/store-reads/analytics.d.ts +7 -7
- package/dist/store-reads/analytics.js +23 -5
- package/dist/store-reads/cap.js +8 -6
- package/dist/store-reads/journal.d.ts +30 -1
- package/dist/store-reads/journal.js +141 -83
- package/dist/store-reads/learning.d.ts +179 -13
- package/dist/store-reads/learning.js +230 -68
- package/dist/store-reads/loop.d.ts +61 -0
- package/dist/store-reads/loop.js +111 -0
- package/dist/store-reads/runs.d.ts +5 -0
- package/dist/store-reads/runs.js +3 -2
- package/dist/store-view.d.ts +3 -2
- package/dist/store-view.js +109 -37
- package/dist/template-eval.d.ts +87 -16
- package/dist/template-eval.js +605 -120
- package/dist/template-github-permissions.d.ts +2 -2
- package/dist/template-github-permissions.js +2 -1
- package/dist/template-import.d.ts +31 -0
- package/dist/template-import.js +121 -0
- package/dist/template-source.d.ts +51 -0
- package/dist/template-source.js +371 -0
- package/dist/templates.d.ts +274 -52
- package/dist/templates.js +670 -201
- package/dist/text-urls.d.ts +38 -0
- package/dist/text-urls.js +170 -0
- package/dist/timeline/computer.d.ts +48 -0
- package/dist/timeline/computer.js +169 -0
- package/dist/timeline/index.d.ts +7 -5
- package/dist/timeline/index.js +7 -5
- package/dist/timeline/labels.d.ts +11 -4
- package/dist/timeline/labels.js +122 -8
- package/dist/timeline/origin.d.ts +20 -6
- package/dist/timeline/origin.js +13 -6
- package/dist/timeline/render-text.js +1 -1
- package/dist/timeline/timeline.d.ts +76 -20
- package/dist/timeline/timeline.js +184 -39
- package/dist/timeline/util.d.ts +5 -0
- package/dist/timeline/util.js +44 -8
- package/dist/timeline/web-calls.d.ts +17 -0
- package/dist/timeline/web-calls.js +106 -0
- package/dist/tool-gate.d.ts +103 -76
- package/dist/tool-gate.js +200 -127
- package/dist/tool-keys.d.ts +4 -1
- package/dist/tool-keys.js +8 -3
- package/dist/tool-list.d.ts +29 -0
- package/dist/tool-list.js +50 -0
- package/dist/tool-names.d.ts +76 -0
- package/dist/tool-names.js +101 -0
- package/dist/tool-plane.d.ts +34 -28
- package/dist/tool-plane.js +72 -37
- package/dist/tools.d.ts +59 -15
- package/dist/tools.js +46 -42
- package/dist/trigger-adapter.d.ts +85 -5
- package/dist/trigger-adapter.js +6 -0
- package/dist/trigger-adapters.js +3 -1
- package/dist/trigger-composio.d.ts +10 -0
- package/dist/trigger-composio.js +122 -0
- package/dist/trigger-email.d.ts +4 -0
- package/dist/trigger-email.js +228 -0
- package/dist/trigger-signatures.d.ts +6 -10
- package/dist/trigger-signatures.js +16 -16
- package/dist/trigger-targets.d.ts +1 -1
- package/dist/trigger-targets.js +4 -3
- package/dist/trigger-webhook.js +6 -4
- package/dist/triggers.d.ts +94 -9
- package/dist/triggers.js +263 -62
- package/dist/uploads.d.ts +9 -0
- package/dist/uploads.js +27 -0
- package/dist/validate.d.ts +15 -7
- package/dist/validate.js +91 -50
- package/dist/web-fake.d.ts +56 -0
- package/dist/web-fake.js +102 -0
- package/dist/web-fetch-direct.d.ts +3 -0
- package/dist/web-fetch-direct.js +4 -1
- package/dist/web-fetch.d.ts +6 -8
- package/dist/web-fetch.js +10 -53
- package/dist/web-search.d.ts +51 -2
- package/dist/web-search.js +116 -18
- package/dist/webhooks.d.ts +2 -1
- package/dist/webhooks.js +5 -1
- package/dist/workflow/node-runner.js +10 -2
- package/dist/workspace/archil-claim.d.ts +3 -0
- package/dist/workspace/archil-claim.js +9 -2
- package/dist/workspace/computer-deps.d.ts +25 -9
- package/dist/workspace/computer-deps.js +82 -38
- package/dist/workspace/computer-for-claim.d.ts +60 -4
- package/dist/workspace/computer-for-claim.js +203 -45
- package/dist/workspace/computer-hold.js +7 -1
- package/dist/workspace/computer-janitor.d.ts +10 -3
- package/dist/workspace/computer-janitor.js +96 -29
- package/dist/workspace/computer-kept.d.ts +82 -0
- package/dist/workspace/computer-kept.js +147 -0
- package/dist/workspace/computer-mcp.js +4 -3
- package/dist/workspace/computer-ports.d.ts +23 -3
- package/dist/workspace/computer-ports.js +115 -5
- package/dist/workspace/index.d.ts +2 -3
- package/dist/workspace/index.js +1 -2
- package/dist/workspace/kind-skills/desktop/SKILL.md +31 -11
- package/dist/workspace/kind-skills/phone/SKILL.md +29 -14
- package/dist/workspace/local.js +2 -2
- package/dist/workspace/resolve-computer.d.ts +33 -1
- package/dist/workspace/resolve-computer.js +37 -16
- package/dist/workspace/revision-skills.d.ts +6 -2
- package/dist/workspace/revision-skills.js +12 -5
- package/dist/workspace/run-end-computers.d.ts +30 -0
- package/dist/workspace/run-end-computers.js +137 -0
- package/dist/workspace/run-tools.d.ts +40 -23
- package/dist/workspace/run-tools.js +46 -19
- package/dist/wrap-up.d.ts +35 -0
- package/dist/wrap-up.js +48 -0
- package/launcher/agentrun-serve +4 -2
- package/package.json +13 -9
- package/skills/agentrun-serve/SKILL.md +248 -10
- package/templates/README.md +220 -60
- package/templates/TOOLS.md +168 -0
- package/templates/code-review/agent.md +46 -16
- package/templates/code-review/evals/clean-refactor/case.yaml +2 -1
- package/templates/code-review/evals/clean-refactor/graders/head-sha.md +6 -0
- package/templates/code-review/evals/injection/case.yaml +2 -1
- package/templates/code-review/evals/injection/graders/head-sha.md +6 -0
- package/templates/code-review/evals/mentions-defused/case.yaml +3 -3
- package/templates/code-review/evals/mentions-defused/fixtures/github-mcp.json +0 -23
- package/templates/code-review/evals/mentions-defused/graders/head-sha.md +6 -0
- package/templates/code-review/evals/never-flag/case.yaml +2 -1
- package/templates/code-review/evals/never-flag/graders/head-sha.md +6 -0
- package/templates/code-review/evals/null-name/case.yaml +2 -1
- package/templates/code-review/evals/null-name/graders/head-sha.md +6 -0
- package/templates/code-review/evals/off-by-one/case.yaml +2 -1
- package/templates/code-review/evals/off-by-one/graders/head-sha.md +6 -0
- package/templates/code-review/evals/off-by-one/graders/no-repo-reads.md +2 -1
- package/templates/code-review/evals/other-repo/case.yaml +16 -0
- package/templates/code-review/evals/other-repo/fixtures/github-mcp.json +130 -0
- package/templates/code-review/evals/other-repo/graders/head-sha.md +6 -0
- package/templates/code-review/evals/other-repo/graders/no-canary.md +6 -0
- package/templates/code-review/evals/other-repo/graders/no-other-repo.md +8 -0
- package/templates/code-review/evals/other-repo/graders/refused-not-quoted.md +18 -0
- package/templates/code-review/evals/other-repo/prompt.md +10 -0
- package/templates/code-review/evals/pasted-by-reference/case.yaml +5 -0
- package/templates/code-review/evals/pasted-by-reference/graders/by-reference.md +15 -0
- package/templates/code-review/evals/pasted-by-reference/graders/head-sha.md +6 -0
- package/templates/code-review/evals/pasted-by-reference/prompt.md +31 -0
- package/templates/code-review/evals/re-review/case.yaml +2 -1
- package/templates/code-review/evals/re-review/graders/head-sha.md +6 -0
- package/templates/code-review/evals/re-review-open/case.yaml +2 -1
- package/templates/code-review/evals/re-review-open/graders/head-sha.md +6 -0
- package/templates/code-review/evals/repo-rule/case.yaml +2 -1
- package/templates/code-review/evals/repo-rule/graders/head-sha.md +6 -0
- package/templates/code-review/evals/two-defects/case.yaml +2 -1
- package/templates/code-review/evals/two-defects/graders/head-sha.md +6 -0
- package/templates/code-review/rules/CODEREVIEW.md +1 -1
- package/templates/code-review/skills/review/DEEP.md +5 -4
- package/templates/code-review/skills/review/REVIEWER.md +5 -4
- package/templates/code-review/skills/review/SKILL.md +11 -6
- package/templates/code-review/{findings.schema.json → skills/review/findings.schema.json} +1 -0
- package/templates/inbound-lead/agent.md +26 -16
- package/templates/inbound-lead/evals/injection-in-form/graders/no-exfil.md +16 -0
- package/templates/inbound-lead/evals/injection-in-form/prompt.md +2 -2
- package/templates/inbound-lead/evals/write-back/case.yaml +2 -6
- package/templates/inbound-lead/evals/write-back/fixtures/fake-hubspot.json +34 -225
- package/templates/inbound-lead/evals/write-back/graders/note-and-score.md +10 -14
- package/templates/inbound-lead/evals/write-back/graders/writes-once.md +7 -0
- package/templates/inbound-lead/evals/write-back/prompt.md +1 -1
- package/templates/inbound-lead/evals/write-back-wrong-record/case.yaml +3 -7
- package/templates/inbound-lead/evals/write-back-wrong-record/fixtures/fake-hubspot.json +34 -225
- package/templates/inbound-lead/evals/write-back-wrong-record/graders/form-id.md +17 -0
- package/templates/inbound-lead/evals/write-back-wrong-record/graders/no-write.md +3 -3
- package/templates/inbound-lead/evals/write-back-wrong-record/prompt.md +2 -2
- package/templates/inbound-lead/skills/lead/SKILL.md +23 -27
- package/templates/kyb/agent.md +15 -5
- package/templates/kyb/evals/adverse-media/prompt.md +2 -7
- package/templates/kyb/evals/canada-active-filed/prompt.md +2 -6
- package/templates/kyb/evals/clean-public-company/prompt.md +2 -6
- package/templates/kyb/evals/injection-in-page/prompt.md +3 -7
- package/templates/kyb/evals/name-collision/prompt.md +2 -6
- package/templates/kyb/evals/no-invention/prompt.md +2 -6
- package/templates/kyb/evals/opensanctions-on/prompt.md +2 -6
- package/templates/kyb/evals/sanctioned-entity/prompt.md +2 -6
- package/templates/kyb/kyb.schema.json +8 -7
- package/templates/kyb/skills/kyb/SKILL.md +9 -6
- package/templates/market-monitor/agent.md +19 -12
- package/templates/market-monitor/evals/post-happens/case.yaml +4 -4
- package/templates/market-monitor/evals/post-happens/fixtures/slack-mcp.json +13 -9
- package/templates/market-monitor/evals/post-happens/graders/post-is-digest.md +1 -1
- package/templates/market-monitor/evals/post-happens/graders/posted-once.md +3 -3
- package/templates/market-monitor/skills/monitor/SKILL.md +6 -4
- package/templates/release-notes/agent.md +32 -10
- package/templates/release-notes/evals/draft-not-publish/case.yaml +5 -4
- package/templates/release-notes/evals/draft-not-publish/fixtures/github-mcp.json +29 -51
- package/templates/release-notes/evals/every-pr-accounted/case.yaml +2 -1
- package/templates/release-notes/evals/issue-write-refused/case.yaml +5 -4
- package/templates/release-notes/evals/issue-write-refused/fixtures/github-mcp.json +29 -51
- package/templates/release-notes/evals/late-arrival/case.yaml +6 -5
- package/templates/release-notes/evals/late-arrival/fixtures/github-mcp.json +29 -51
- package/templates/release-notes/evals/learned-style/case.yaml +2 -1
- package/templates/release-notes/evals/no-pr-numbers-on-top/case.yaml +2 -1
- package/templates/release-notes/evals/other-repo/case.yaml +24 -0
- package/templates/release-notes/evals/other-repo/fixtures/github-mcp.json +907 -0
- package/templates/release-notes/evals/other-repo/graders/no-canary.md +7 -0
- package/templates/release-notes/evals/other-repo/graders/no-other-repo.md +8 -0
- package/templates/release-notes/evals/other-repo/graders/refused-not-quoted.md +18 -0
- package/templates/release-notes/evals/other-repo/prompt.md +32 -0
- package/templates/release-notes/evals/upgrade-line/case.yaml +2 -1
- package/templates/release-notes/evals/user-facing-only/case.yaml +2 -1
- package/templates/release-notes/notes.schema.json +1 -1
- package/templates/release-notes/skills/release-notes/SKILL.md +26 -17
- package/dist/console/assets/index-Cn6JX1uH.js +0 -563
- package/dist/console/assets/index-DRN62V5v.css +0 -1
- package/dist/host-calls.d.ts +0 -20
- package/dist/host-calls.js +0 -12
- package/dist/runner/adapters/pi-computer.d.ts +0 -7
- package/dist/runner/adapters/pi-computer.js +0 -43
- package/dist/tool-blurbs.d.ts +0 -4
- package/dist/tool-blurbs.js +0 -28
- package/dist/tool-budget.d.ts +0 -38
- package/dist/tool-budget.js +0 -62
- package/dist/workspace/computer-script.d.ts +0 -37
- package/dist/workspace/computer-script.js +0 -138
- package/templates/code-review/evals/clean-refactor/graders/schema.md +0 -5
- package/templates/code-review/evals/injection/graders/schema.md +0 -5
- package/templates/code-review/evals/mentions-defused/graders/schema.md +0 -5
- package/templates/code-review/evals/never-flag/graders/schema.md +0 -5
- package/templates/code-review/evals/null-name/graders/schema.md +0 -5
- package/templates/code-review/evals/off-by-one/graders/schema.md +0 -5
- package/templates/code-review/evals/re-review/graders/schema.md +0 -5
- package/templates/code-review/evals/re-review-open/graders/schema.md +0 -5
- package/templates/code-review/evals/repo-rule/graders/schema.md +0 -5
- package/templates/code-review/evals/two-defects/graders/schema.md +0 -5
- package/templates/inbound-lead/evals/clear-disqualifier/graders/schema.md +0 -5
- package/templates/inbound-lead/evals/injection-in-form/graders/schema.md +0 -5
- package/templates/inbound-lead/evals/learned-correction/graders/schema.md +0 -5
- package/templates/inbound-lead/evals/strong-fit/graders/schema.md +0 -5
- package/templates/inbound-lead/evals/thin-data/graders/schema.md +0 -5
- package/templates/inbound-lead/evals/write-back/graders/schema.md +0 -5
- package/templates/inbound-lead/evals/write-back/graders/writes-twice.md +0 -7
- package/templates/inbound-lead/evals/write-back-wrong-record/graders/proves-record.md +0 -18
- package/templates/inbound-lead/evals/write-back-wrong-record/graders/schema.md +0 -5
- package/templates/kyb/evals/adverse-media/graders/schema.md +0 -5
- package/templates/kyb/evals/canada-active-filed/graders/schema.md +0 -5
- package/templates/kyb/evals/clean-public-company/graders/schema.md +0 -5
- package/templates/kyb/evals/injection-in-page/graders/schema.md +0 -5
- package/templates/kyb/evals/name-collision/graders/schema.md +0 -5
- package/templates/kyb/evals/no-invention/graders/schema.md +0 -5
- package/templates/kyb/evals/opensanctions-on/graders/schema.md +0 -5
- package/templates/kyb/evals/sanctioned-entity/graders/schema.md +0 -5
- package/templates/market-monitor/evals/blocked-source/graders/schema.md +0 -5
- package/templates/market-monitor/evals/every-competitor-named/graders/schema.md +0 -5
- package/templates/market-monitor/evals/learned-preference/graders/schema.md +0 -5
- package/templates/market-monitor/evals/no-repeats/graders/schema.md +0 -5
- package/templates/market-monitor/evals/nothing-changed/graders/schema.md +0 -5
- package/templates/market-monitor/evals/post-happens/graders/schema.md +0 -5
- package/templates/market-monitor/evals/pricing-change/graders/schema.md +0 -5
- package/templates/market-monitor/evals/pricing-moved/graders/schema.md +0 -5
- package/templates/release-notes/evals/draft-not-publish/graders/schema.md +0 -5
- package/templates/release-notes/evals/every-pr-accounted/graders/schema.md +0 -5
- package/templates/release-notes/evals/issue-write-refused/graders/schema.md +0 -5
- package/templates/release-notes/evals/late-arrival/graders/schema.md +0 -5
- package/templates/release-notes/evals/learned-style/graders/schema.md +0 -5
- package/templates/release-notes/evals/no-pr-numbers-on-top/graders/schema.md +0 -5
- package/templates/release-notes/evals/upgrade-line/graders/schema.md +0 -5
- package/templates/release-notes/evals/user-facing-only/graders/schema.md +0 -5
package/dist/run-view.js
CHANGED
|
@@ -10,11 +10,15 @@ import { chargedTool, isMessageRow, NOTE_SUFFIX, registerLabel, registerTurnEndi
|
|
|
10
10
|
import { CAP_TOLERANCE, FIT_TOLERANCE, money, roomRefusal } from "./cap.js";
|
|
11
11
|
import { APPROVAL_ROW, previewOf } from "./tool-gate.js";
|
|
12
12
|
import { ASK_TOOL } from "./tools.js";
|
|
13
|
+
import { EMAIL_FILE, EMAIL_SEND, fileSummary, sendSummary } from "./email/names.js";
|
|
14
|
+
// The email tools' timeline lines (registerLabel), registered as this module loads.
|
|
15
|
+
import "./email/labels.js";
|
|
13
16
|
import { LEARNING_LABEL } from "./learning.js";
|
|
14
17
|
import { builtinHarness } from "./harness-table.js";
|
|
15
18
|
import { cutStrings, redacted, withoutLoopback } from "./key-refusal.js";
|
|
16
19
|
import { pointerHash } from "./sign-ins-store.js";
|
|
17
20
|
import { MIN_SECRET } from "./learn/secrets.js";
|
|
21
|
+
import { costWordsOf, usageParts } from "./runner/metrics.js";
|
|
18
22
|
import { KINDS } from "./runner/journal-kinds.js";
|
|
19
23
|
import { ENDED_WHILE_WAITING, STOPPED_WHILE_WAITING } from "./refusal-words.js";
|
|
20
24
|
/** The run's newest usage row, which carries its cost. */
|
|
@@ -24,6 +28,13 @@ export const costOf = (rows) => {
|
|
|
24
28
|
const usage = usageOf(rows);
|
|
25
29
|
return usage ? (usage.usage?.usd ?? null) : 0;
|
|
26
30
|
};
|
|
31
|
+
/** The run's cost in its usage row's own words (a bound with its exact part and holds, an unknown cost with what is
|
|
32
|
+
* known), for a reader that joins it with more charges (costWordsOf over usageParts): undefined before any request
|
|
33
|
+
* (nothing spent), `{ usd: null }` for a usage row that says nothing. */
|
|
34
|
+
export const usageWordsOf = (rows) => {
|
|
35
|
+
const usage = usageOf(rows);
|
|
36
|
+
return usage ? (usage.usage ?? { usd: null }) : undefined;
|
|
37
|
+
};
|
|
27
38
|
/** Whether `row` carries a paid tool's charge counted here: `tool`'s alone when given, every other tool's with `others`
|
|
28
39
|
* (chargedTool: a charge's own `phase` row, or a browser call's row its charges fold into). */
|
|
29
40
|
const chargeOf = (row, tool, others) => {
|
|
@@ -37,51 +48,44 @@ export const toolCostOf = (rows, tool, others = false) => rows.reduce((sum, row)
|
|
|
37
48
|
/** What a run's paid tools are known to have charged (`tool`'s alone, when given; every other tool's with `others`): each
|
|
38
49
|
* charge's line that names its cost, a charge of unknown cost adding nothing (a browser call's row, what is known of it). */
|
|
39
50
|
export const knownToolCostOf = (rows, tool, others = false) => rows.reduce((sum, row) => (!chargeOf(row, tool, others) ? sum : sum + (row.usage.usd ?? row.usage.so_far_usd ?? 0)), 0);
|
|
40
|
-
/** A run's cost for its views
|
|
41
|
-
*
|
|
51
|
+
/** A run's cost for its views, in the words its Cost says it (costsofar/1, cutathold/1): its usage row's, joined with a
|
|
52
|
+
* workflow's booked decisions (`decisions`, their parts; null when they could not be read, which says nothing) by the
|
|
53
|
+
* one rule (costWordsOf over usageParts), so a bound on the row stays a bound, its exact part apart: any charge of no
|
|
54
|
+
* known cost makes the cost unknown with the exact charges alone known, never a hold. With no decisions and no usage
|
|
55
|
+
* row: what the store kept when it carried the run back (`stored`, exact; 0 before any request, unknown when it kept
|
|
56
|
+
* none). A usage row that says unknown, or says nothing, stays unknown: what the store kept dates from before a
|
|
42
57
|
* follow-up. */
|
|
43
|
-
export function
|
|
58
|
+
export function costWordsOfView(rows, stored, decisions) {
|
|
44
59
|
const usage = usageOf(rows);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return models === null || decisions === null ? null : models + decisions;
|
|
49
|
-
}
|
|
50
|
-
if (!usage)
|
|
51
|
-
return stored === undefined ? 0 : stored;
|
|
52
|
-
return usage.usage?.usd ?? null;
|
|
60
|
+
if (decisions === undefined && !usage)
|
|
61
|
+
return { usd: stored === undefined ? 0 : stored };
|
|
62
|
+
return costWordsOf([usageParts(usageWordsOf(rows)), ...(decisions !== undefined ? [decisions] : [])]);
|
|
53
63
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
const models = !usage ? { known: 0, unpriced: 0 } : usage.usd !== null ? { known: usage.usd, unpriced: 0 } : usage.so_far_usd !== undefined && usage.unpriced !== undefined ? { known: usage.so_far_usd, unpriced: usage.unpriced } : undefined;
|
|
59
|
-
if (!models)
|
|
60
|
-
return undefined;
|
|
61
|
-
const unpriced = models.unpriced + (decisions?.unpriced ?? 0);
|
|
62
|
-
return unpriced > 0 ? { so_far_usd: Math.round((models.known + (decisions?.known ?? 0)) * 1e6) / 1e6, unpriced } : undefined;
|
|
64
|
+
/** Whether a run's cost (`usd`) is $0 because every model request went to a free model (one whose known price is $0 for
|
|
65
|
+
* every token): its usage row says so (`free`, from the run's booking). Never for a cost above $0 or unknown. */
|
|
66
|
+
export function freeOf(rows, usd) {
|
|
67
|
+
return usd === 0 && usageOf(rows)?.usage?.free === true ? { free: true } : undefined;
|
|
63
68
|
}
|
|
64
69
|
/** An amount in an over-cap row's or failure's words, to the cent ($0.38020940000000003 is $0.38; $1 is $1), as money
|
|
65
|
-
* says it; `centsUp` to the cent above, for what a run went over by
|
|
70
|
+
* says it; `centsUp` to the cent above, for what a run went over by, so it never reads $0 or under. */
|
|
66
71
|
export const cents = (usd) => money(Math.round(usd * 100) / 100);
|
|
67
72
|
export const centsUp = (usd) => money(Math.ceil(usd * 100 - 1e-9) / 100);
|
|
68
|
-
/** Whether a run that spent `usd` passed its `cap` by no more than `bound`, the bounds of the requests that ended since
|
|
69
|
-
* its cost last fit (bounds.ts): a cache miss an expected-cost cap (cap.ts) admits the risk of, never a cap the run's own
|
|
70
|
-
* rule broke. */
|
|
71
|
-
export const overByMiss = (usd, cap, bound) => bound > 0 && usd - cap <= bound + FIT_TOLERANCE;
|
|
72
73
|
/** The row that says a run's booked spend passed its cap, and by how much, after its usage row: a request's cost is
|
|
73
|
-
* booked once it answers, never clipped
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
|
|
77
|
-
export function withOverCap(rows, cap, bound = 0) {
|
|
74
|
+
* booked once it answers, never clipped. Each request is held at its worst case, so only a cost its admission never
|
|
75
|
+
* priced passes the cap: one carrying a native web search is held at an allowance, not a bound, and a provider may bill
|
|
76
|
+
* past its list price. The next request is then refused. */
|
|
77
|
+
export function withOverCap(rows, cap) {
|
|
78
78
|
const at = rows.findLastIndex((row) => row.kind === "usage");
|
|
79
79
|
const usd = rows[at]?.usage?.usd;
|
|
80
80
|
if (cap === undefined || typeof usd !== "number" || usd <= cap + FIT_TOLERANCE)
|
|
81
81
|
return rows;
|
|
82
82
|
const { usage: _, ...usage } = rows[at];
|
|
83
|
-
//
|
|
84
|
-
|
|
83
|
+
// What is known spent: a figure that counts a hold (`upper_bound`) is the most it can have cost, its exact part
|
|
84
|
+
// (usageParts) the spend. Past the cap by its exact part: spent, said so; by its holds alone: at most, never "spent".
|
|
85
|
+
const parts = usageParts(rows[at].usage);
|
|
86
|
+
const spent = parts?.known ?? usd;
|
|
87
|
+
// In cents: what it went over by rounded up.
|
|
88
|
+
const summary = spent > cap + FIT_TOLERANCE ? `Spent ${cents(spent)}, ${centsUp(spent - cap)} over the run's cap of ${cents(cap)}` : `At most ${cents(usd)} spent, at most ${centsUp(usd - cap)} over the run's cap of ${cents(cap)}`;
|
|
85
89
|
const over = { ...usage, id: `${usage.id}:over_cap`, kind: "phase", summary, text: null };
|
|
86
90
|
return [...rows.slice(0, at + 1), over, ...rows.slice(at + 1)];
|
|
87
91
|
}
|
|
@@ -111,6 +115,8 @@ export function withAsks(rows) {
|
|
|
111
115
|
}
|
|
112
116
|
/** A call withdrawn with its run (a cancel, or a stop while it waited): never run, and an answer after is 409. */
|
|
113
117
|
export const withdrawn = (answer) => answer?.decision === "canceled" || answer?.decision === "withdrawn";
|
|
118
|
+
/** An ask's price as its card shows it (tool-gate.ts ApprovalPrice); undefined for none, or one of no known shape. */
|
|
119
|
+
const priceOfAsk = (price) => (typeof price === "number" || price === "not metered" || price === "priced by usage" ? price : undefined);
|
|
114
120
|
const dataOf = (entry) => entry.data;
|
|
115
121
|
/** The tool calls a run waits (or waited) for a person's approval on, from its journal's `agentrun.ask` entries, by the
|
|
116
122
|
* call's id: a re-ask of the same call keeps the first request, as the gate's park did; one with an answer is resolved,
|
|
@@ -131,13 +137,15 @@ export function asksOf(entries) {
|
|
|
131
137
|
const d = dataOf(entry);
|
|
132
138
|
if (typeof d?.callId !== "string" || map.has(d.callId))
|
|
133
139
|
continue;
|
|
140
|
+
const price = priceOfAsk(d.price);
|
|
134
141
|
map.set(d.callId, {
|
|
135
142
|
id: d.callId,
|
|
136
143
|
tool: d.tool,
|
|
137
144
|
call_id: d.callId,
|
|
138
145
|
args_json: JSON.stringify(d.args ?? {}) ?? "{}",
|
|
139
146
|
requested_at: d.requestedAt,
|
|
140
|
-
...(
|
|
147
|
+
...(price !== undefined ? { price } : {}),
|
|
148
|
+
...(d.destructive === true ? { destructive: true } : {}),
|
|
141
149
|
...(answered.has(d.callId) ? { resolved: true } : {}),
|
|
142
150
|
});
|
|
143
151
|
}
|
|
@@ -168,9 +176,12 @@ export function answersOf(entries, { final } = {}) {
|
|
|
168
176
|
const given = out[d.callId];
|
|
169
177
|
if (given && !((decision === "withdrawn" || decision === "canceled") && d.superseded))
|
|
170
178
|
continue;
|
|
171
|
-
|
|
172
|
-
//
|
|
173
|
-
|
|
179
|
+
// The answer it overrode: one given before it, or, for a deny its tool's setting gave over a person's allow taken with
|
|
180
|
+
// it (adapter-loop.ts deniedBySetting), the allow its entry keeps.
|
|
181
|
+
const superseded = given ? { superseded: { decision: given.decision, answered_at: given.answered_at, ...(given.note !== undefined ? { note: given.note } : {}), ...(given.by ? { by: given.by } : {}) } } : d.superseded ? { superseded: { decision: d.superseded.decision, answered_at: d.superseded.answeredAt ?? "" } } : {};
|
|
182
|
+
// A deny a person's message gave keeps that it was (`by`): its row reads "Declined by your message"; so does an answer
|
|
183
|
+
// the tool's setting gave (an allow, or a deny set since the call asked).
|
|
184
|
+
out[d.callId] = { decision, ...(d.note !== undefined ? { note: d.note } : {}), answered_at: d.answeredAt ?? "", ...(decision === "deny" && d.by === "message" ? { by: "message" } : (decision === "allow" || decision === "deny") && d.by === "setting" ? { by: "setting" } : {}), ...superseded };
|
|
174
185
|
}
|
|
175
186
|
// How the run ended after each entry: the state of the first agentrun.end at or after it, else the final row's.
|
|
176
187
|
let endedAs = final;
|
|
@@ -251,17 +262,18 @@ export const activePauseOf = (entries) => activePark(entries)?.id;
|
|
|
251
262
|
export const raiseFollowUpId = (pause) => `agentrun:raise:${pause}`;
|
|
252
263
|
/** The budget card a run parked at its cap shows (pending, kind budget), from its agentrun.budget entry, the same way the
|
|
253
264
|
* file-backed view built it from the run's pause mark (runs.ts workflowBudgetPending): its cap (the run's launch cap, else
|
|
254
|
-
* the park's), what
|
|
255
|
-
* those by the view's one formula
|
|
256
|
-
*
|
|
265
|
+
* the park's), what it had spent, what it held for steps still running and the least the refused step needs, the raise
|
|
266
|
+
* offered (recomputed from those by the view's one formula, the holds counted with the spend so it covers them), and the
|
|
267
|
+
* cap's words at the run's last meaningful row. Undefined when no park is active. */
|
|
257
268
|
export function budgetOf(entries, run) {
|
|
258
269
|
const mark = activeBudget(entries);
|
|
259
270
|
if (!mark)
|
|
260
271
|
return undefined;
|
|
261
272
|
const p = mark.pending;
|
|
262
273
|
const cap = run.meta.max_cost_usd ?? p.cap_usd;
|
|
274
|
+
const held = p.held_usd ?? 0;
|
|
263
275
|
const figures = p.spent_usd !== undefined && p.needs_usd !== undefined
|
|
264
|
-
? { spent_usd: micro(p.spent_usd), needs_usd: micro(p.needs_usd), ...(p.least_cap_usd !== undefined ? { least_cap_usd: p.least_cap_usd } : {}), suggested_cap_usd: suggestedCap(cap, p.spent_usd, p.needs_usd)
|
|
276
|
+
? { spent_usd: micro(p.spent_usd), held_usd: micro(held), needs_usd: micro(p.needs_usd), ...(p.least_cap_usd !== undefined ? { least_cap_usd: p.least_cap_usd } : {}), suggested_cap_usd: suggestedCap(cap, p.spent_usd + held, p.needs_usd) }
|
|
265
277
|
: {};
|
|
266
278
|
// A workflow's pause names the node whose step waits (null when not known); an agentic run's names none.
|
|
267
279
|
return { kind: "budget", cap_usd: cap, ...figures, said: mark.words, at: meaningful(run.rows)?.timestamp ?? run.updatedAt, ...(mark.node !== undefined ? { node: mark.node } : {}) };
|
|
@@ -283,6 +295,11 @@ export const stoppedAt = (meta, rows) => {
|
|
|
283
295
|
return !rows.some((r) => isMessageRow(r) && placeOf(r.id) > at);
|
|
284
296
|
};
|
|
285
297
|
export const stopped = (run) => stoppedAt(run.meta, run.rows);
|
|
298
|
+
/** A turn a person's stop ended, where the run still stands: statusOf's stop read (input_required and idle, by the stop
|
|
299
|
+
* mark, stopped). The run read, the run list and the run.needs_input webhook all say `pending` kind stopped by this
|
|
300
|
+
* one test, so they never disagree. A turn its harness ended on its own reads the same pair with no stop mark, and is
|
|
301
|
+
* not this. */
|
|
302
|
+
export const stoppedTurn = (run, read) => read.status === "input_required" && read.state === "idle" && stopped(run);
|
|
286
303
|
/** The tool call that waits for a person's answer: requested in the run's store, not resolved there, not answered. */
|
|
287
304
|
export const waitingApproval = (run) => [...(run.approvals?.values() ?? [])].find((a) => !a.resolved && !run.meta.approvals?.[a.id]);
|
|
288
305
|
/** One answered (allow or deny) whose answer the run's process has not acted on yet. */
|
|
@@ -292,9 +309,6 @@ export const actingOn = (run) => [...(run.approvals?.values() ?? [])].some((a) =
|
|
|
292
309
|
export const shownArgs = (approval, redact) => previewOf(redact(approval.args_json));
|
|
293
310
|
/** A dollar figure to a millionth, as the timeline's cost.usd is. */
|
|
294
311
|
export const micro = (usd) => Math.round(usd * 1e6) / 1e6;
|
|
295
|
-
/** A bound to a millionth, rounded up, so "at most" holds. No bound is 0, never -0: the ceiling of a hair under 0 is -0,
|
|
296
|
-
* which the budget card would print as "-0". */
|
|
297
|
-
export const microUp = (usd) => Math.ceil(usd * 1e6 - 1e-9) / 1e6 + 0;
|
|
298
312
|
/** How many of the refused request's least a run paused at its cap is offered on top of what was taken (suggestedCap). */
|
|
299
313
|
export const SUGGESTED_RAISE_FACTOR = 10;
|
|
300
314
|
/** The raise a run paused at its cap is offered: what the cap counted as taken plus SUGGESTED_RAISE_FACTOR times the
|
|
@@ -352,9 +366,27 @@ export const pendingOf = (rows) => {
|
|
|
352
366
|
return last?.kind === "waiting" ? { kind: "question", question: last.text ?? last.summary ?? "", asked_at: last.timestamp } : null;
|
|
353
367
|
};
|
|
354
368
|
/** The run's pending approval (`pending`, kind approval): the call that waits; else undefined. */
|
|
369
|
+
/** The tools whose approval card says what the call does in words: email_send's to whom and what, email_file's which
|
|
370
|
+
* message and where. */
|
|
371
|
+
const SUMMARIES = { [EMAIL_SEND]: sendSummary, [EMAIL_FILE]: fileSummary };
|
|
372
|
+
/** A call's approval summary, where its tool has one (SUMMARIES), redacted as its arguments are. */
|
|
373
|
+
function summaryOf(approval, redact) {
|
|
374
|
+
const summarize = Object.hasOwn(SUMMARIES, approval.tool) ? SUMMARIES[approval.tool] : undefined;
|
|
375
|
+
if (!summarize)
|
|
376
|
+
return {};
|
|
377
|
+
let args;
|
|
378
|
+
try {
|
|
379
|
+
args = JSON.parse(approval.args_json);
|
|
380
|
+
}
|
|
381
|
+
catch {
|
|
382
|
+
return {};
|
|
383
|
+
}
|
|
384
|
+
const summary = summarize(args);
|
|
385
|
+
return summary === undefined ? {} : { summary: redact(summary) };
|
|
386
|
+
}
|
|
355
387
|
export const approvalOf = (run, redact) => {
|
|
356
388
|
const waiting = waitingApproval(run);
|
|
357
|
-
return waiting ? { kind: "approval", id: waiting.id, tool: waiting.tool, call_id: waiting.call_id, args_preview: shownArgs(waiting, redact), requested_at: waiting.requested_at, ...(waiting.price !== undefined ? { price: waiting.price } : {}) } : undefined;
|
|
389
|
+
return waiting ? { kind: "approval", id: waiting.id, tool: waiting.tool, call_id: waiting.call_id, args_preview: shownArgs(waiting, redact), ...summaryOf(waiting, redact), requested_at: waiting.requested_at, ...(waiting.price !== undefined ? { price: waiting.price } : {}), ...(waiting.destructive ? { destructive: true } : {}) } : undefined;
|
|
358
390
|
};
|
|
359
391
|
/** A run whose agent asked for the person in its browser waits on their hand-back: what it asked them to do, when it is
|
|
360
392
|
* done, and when the ask expires. Never the session's tag or the live view's link. The two texts are the model's, so
|
|
@@ -460,7 +492,7 @@ export function momentOf(run, facts, live) {
|
|
|
460
492
|
// counted but not shown), or a question its turn ended on.
|
|
461
493
|
waitsOnPerson: run.kind === "agentic" && (waiting !== undefined || pausedAt(run, { inFlight: false }) !== undefined || (status === "input_required" && state === "waiting")),
|
|
462
494
|
...(waiting ? { waitingApprovalId: waiting.id } : {}),
|
|
463
|
-
...(run.approvals ? { approvalIds: new Set(run.approvals.keys()) } : {}),
|
|
495
|
+
...(run.approvals ? { approvalIds: new Set(run.approvals.keys()), destructiveIds: new Set([...run.approvals.values()].filter((one) => one.destructive).map((one) => one.id)) } : {}),
|
|
464
496
|
...(answered ? { answeredApprovals: Object.fromEntries(Object.entries(answered).map(([id, a]) => [id, { decision: a.decision, ...(a.ended ? { ended: true } : {}) }])) } : {}),
|
|
465
497
|
};
|
|
466
498
|
}
|
|
@@ -541,8 +573,9 @@ export async function rowShown(deps, agentId, browser, handed, damaged = false)
|
|
|
541
573
|
const values = [...deps.serverSecrets(), ...pointers.refs.filter((ref) => ref.length >= MIN_SECRET)];
|
|
542
574
|
return (text) => withoutLoopback(redacted(text, values));
|
|
543
575
|
}
|
|
544
|
-
/** A call that waited for approval, once its outcome shows below its approval: its own rows (the call's,
|
|
545
|
-
* only that it was held. A client folds them into the call's step, at the call's place above the
|
|
576
|
+
/** A call that waited for approval and was declined, once its outcome shows below its approval: its own rows (the call's,
|
|
577
|
+
* its result's) say only that it was held. A client folds them into the call's step, at the call's place above the
|
|
578
|
+
* approval row. (One allowed reads as any call that ran, once it ran.) */
|
|
546
579
|
export const HELD = "Held for your approval";
|
|
547
580
|
/** At most this many code points of a person's note on a row's summary; the record keeps it whole. */
|
|
548
581
|
export const NOTE_CHARS = 200;
|
|
@@ -564,6 +597,8 @@ export function noteShown(note, redact) {
|
|
|
564
597
|
* ran and where its result went, or that it failed; a note sent with an allow is shown nowhere, as on main. */
|
|
565
598
|
export function outcomeSays(tool, answer, failed, redact) {
|
|
566
599
|
if (answer.decision === "deny") {
|
|
600
|
+
if (answer.by === "setting")
|
|
601
|
+
return `AgentRun: ${deniedSince(tool, answer)}`;
|
|
567
602
|
if (answer.by === "message")
|
|
568
603
|
return `AgentRun: Your message declined ${tool}.`;
|
|
569
604
|
const note = noteShown(answer.note, redact);
|
|
@@ -576,10 +611,17 @@ export function outcomeSays(tool, answer, failed, redact) {
|
|
|
576
611
|
* An empty result says so: "Its result: (no output)", never "Its result:" and nothing. */
|
|
577
612
|
export function outcomeShows(tool, answer, rest, failed) {
|
|
578
613
|
if (answer.decision === "deny")
|
|
579
|
-
return `${answer.by === "message" ? `Your message declined ${tool}.` : `You declined ${tool}.`}${rest.trim() ? `\n${rest.trim()}` : ""}`;
|
|
614
|
+
return `${answer.by === "setting" ? `${deniedSince(tool, answer)}.` : answer.by === "message" ? `Your message declined ${tool}.` : `You declined ${tool}.`}${rest.trim() ? `\n${rest.trim()}` : ""}`;
|
|
580
615
|
const head = `${tool} ${answer.by === "setting" ? "ran, as its setting allows it" : "ran once you allowed it"}${failed ? ", and failed" : ""}.`;
|
|
581
616
|
return rest.trim() ? `${head} Its result:\n${rest}` : `${head} Its result: (no output)`;
|
|
582
617
|
}
|
|
618
|
+
/** A call refused by a deny its tool's setting gained while it waited (adapter-loop.ts deniedBySetting), as its outcome
|
|
619
|
+
* says it: that the person allowed it first, when they did (the allow the deny overrode). */
|
|
620
|
+
const deniedSince = (tool, answer) => answer.superseded?.decision === "allow" ? `You allowed ${tool}, but it is now set to deny on this server, so it was not run` : `${tool} was not run: it is now set to deny on this server`;
|
|
621
|
+
/** The own rows of a call refused so. */
|
|
622
|
+
const DENIED_SINCE = "Not run: its tool is now set to deny on this server";
|
|
623
|
+
/** How an allowed call came to run, as its own result row says it beside its outcome. */
|
|
624
|
+
const ranAs = (answer) => (answer.by === "setting" ? "ran, as its setting allows it" : "ran once you allowed it");
|
|
583
625
|
/** A call's own rows (its call's, its result's) before its outcome shows: what came of the approval so far. */
|
|
584
626
|
function callSays(answer) {
|
|
585
627
|
if (!answer)
|
|
@@ -596,12 +638,20 @@ const unrefused = (row) => {
|
|
|
596
638
|
const { refused: _refused, ...rest } = row;
|
|
597
639
|
return rest;
|
|
598
640
|
};
|
|
641
|
+
/** A row made from a call's own row for its approval or for what came of it: without the `refused` mark (unrefused), and
|
|
642
|
+
* without the computer calls the call made, which are its own result row's alone, as a call that never waited has
|
|
643
|
+
* them (a sum over rows counts each once). */
|
|
644
|
+
const madeFrom = (row) => {
|
|
645
|
+
const { computer_calls: _calls, computer_calls_dropped: _dropped, ...rest } = unrefused(row);
|
|
646
|
+
return rest;
|
|
647
|
+
};
|
|
599
648
|
/** A synthesized row's id: the approval's own, so a pass over rows this function gave drops and remakes it. */
|
|
600
649
|
const approvalRowId = (callId) => `approval:${callId}`;
|
|
601
650
|
/** The rows of a run whose calls waited for approval, as the runner writes it (store-view.ts): the gate's ask
|
|
602
651
|
* (agentrun.ask, `asks`) and the person's answer (agentrun.answer, `answers`) are journal entries, and an allowed call runs
|
|
603
|
-
* in place, so its result row is its real result; a denied one's is the refusal. Each such call reads in order: its
|
|
604
|
-
*
|
|
652
|
+
* in place, so its result row is its real result; a denied one's is the refusal. Each such call reads in order: its call,
|
|
653
|
+
* then the approval row at the ask's time, then its result, then, once there is one, the outcome row (before a result is
|
|
654
|
+
* in, the approval row and any outcome follow its own rows); its own rows say only that it was held once the
|
|
605
655
|
* outcome shows below, and before that what came of the approval so far. Arguments and notes go through `redact`, the
|
|
606
656
|
* run's redactor, before any cut. The rows this function makes are dropped first, so a pass over its own output gives the
|
|
607
657
|
* same rows. */
|
|
@@ -628,30 +678,44 @@ export function withApprovalRows(rows, asks, answers, redact) {
|
|
|
628
678
|
const answer = answers[approval.id];
|
|
629
679
|
const result = given.find((other) => other.kind === "tool_result" && other.tool_use_id === approval.call_id);
|
|
630
680
|
// The outcome shows once there is one: a deny's at once, an allow's when its call's result is in.
|
|
631
|
-
const
|
|
632
|
-
const
|
|
633
|
-
|
|
681
|
+
const ran = answer?.decision === "allow" && result !== undefined;
|
|
682
|
+
const outcome = answer?.decision === "deny" || ran;
|
|
683
|
+
// An allowed call that ran reads as any call (its summary, its status), its result row saying too how it came to run;
|
|
684
|
+
// one a deny set since refused says so; any other only that it was held, or what came of its approval so far.
|
|
685
|
+
// Said once: a pass over its own output keeps the words it added.
|
|
686
|
+
const said = ran ? `(${ranAs(answer)})` : "";
|
|
687
|
+
const own = ran ? (row.kind === "tool_result" && !row.summary?.endsWith(said) ? { ...row, summary: row.summary ? `${row.summary} ${said}` : said } : row)
|
|
688
|
+
: answer?.decision === "deny" && answer.by === "setting" ? { ...row, summary: DENIED_SINCE }
|
|
689
|
+
: { ...row, summary: outcome ? HELD : callSays(answer), tool_status: null };
|
|
690
|
+
// The approval row sits above the call's result once there is one (the ask came before the call ran), else below its
|
|
691
|
+
// last own row; the outcome rows below its last own row.
|
|
692
|
+
const askHere = row.id === (result?.id ?? lastOf.get(approval.call_id));
|
|
693
|
+
const last = lastOf.get(approval.call_id) === row.id;
|
|
694
|
+
if (!askHere && !last)
|
|
634
695
|
return [own];
|
|
635
696
|
const args = shownArgs(approval, redact);
|
|
636
|
-
// A served row keeps the place it was first served at (rows.ts). The
|
|
637
|
-
//
|
|
638
|
-
//
|
|
697
|
+
// A served row keeps the place it was first served at (rows.ts). The approval row is served while the call waits, above
|
|
698
|
+
// the result yet to come, so it keeps its id. The call's result comes in after the answer (the park writes none), so the
|
|
699
|
+
// outcome rows take a new id once it is there: served anew below the result, as a person reads it.
|
|
639
700
|
const at = result ? `${approvalRowId(approval.call_id)}:after` : approvalRowId(approval.call_id);
|
|
640
|
-
const head = !answer ? "Waiting for your approval" : answer.decision === "canceled" ? "Withdrawn when the run was cancelled" : answer.decision === "withdrawn" ? (answer.ended ? "Withdrawn when the run ended" : "Withdrawn when the run was stopped") : answer.by === "message" ? "Declined by your message" : answer.by === "setting" ? "Allowed by the tool's setting" : "Asked your approval";
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
701
|
+
const head = !answer ? "Waiting for your approval" : answer.decision === "canceled" ? "Withdrawn when the run was cancelled" : answer.decision === "withdrawn" ? (answer.ended ? "Withdrawn when the run ended" : "Withdrawn when the run was stopped") : answer.by === "message" ? "Declined by your message" : answer.by === "setting" ? (answer.decision === "deny" ? "Denied by the tool's setting on this server" : "Allowed by the tool's setting") : "Asked your approval";
|
|
702
|
+
// Its time is the ask's (the gate's requestedAt), never the row it was made from.
|
|
703
|
+
const when = approval.requested_at ? { timestamp: approval.requested_at, created_at: approval.requested_at } : {};
|
|
704
|
+
const asked = { ...madeFrom(row), ...when, id: approvalRowId(approval.call_id), kind: APPROVAL_ROW, summary: `${head}: ${approval.tool} ${clip(args, 400)}`, text: args, tool_name: approval.tool, tool_status: null, tool_input_preview: clip(args, 500), tool_result_preview: null, tool_result_size_bytes: null };
|
|
705
|
+
const placed = !askHere ? [own] : result ? [asked, own] : [own, asked];
|
|
706
|
+
if (!last || !outcome)
|
|
707
|
+
return placed;
|
|
644
708
|
const failed = answer.decision === "allow" && result?.tool_status === "failed";
|
|
645
709
|
// The result's words: a tool_result row keeps them as its preview (the renderer's, redacted and cut), its text empty.
|
|
646
|
-
const told = { ...
|
|
710
|
+
const told = { ...madeFrom(result ?? row), id: `${at}:outcome`, kind: "phase", origin: "server", summary: outcomeSays(approval.tool, answer, failed, redact), text: outcomeShows(approval.tool, answer, redact(result?.text || result?.tool_result_preview || ""), failed), tool_name: null, tool_use_id: null, tool_status: null, tool_input_preview: null, tool_result_preview: null, tool_result_size_bytes: null };
|
|
647
711
|
// A person's message that declined the call (runs-over-store.ts message: a deny carrying their words) is theirs as any
|
|
648
712
|
// message is: its own row, between the approval and what came of it, as main's declineBy kept it.
|
|
649
713
|
if (answer.decision === "deny" && answer.by === "message" && answer.note) {
|
|
650
714
|
const words = redact(answer.note);
|
|
651
|
-
const { origin: _origin, ...base } =
|
|
715
|
+
const { origin: _origin, ...base } = madeFrom(result ?? row);
|
|
652
716
|
const theirs = { ...base, id: `${at}:message`, kind: "user_message", summary: clip(`You: ${words.split("\n", 1)[0]}`, 500), text: words, tool_name: null, tool_use_id: null, tool_status: null, tool_input_preview: null, tool_result_preview: null, tool_result_size_bytes: null };
|
|
653
|
-
return [
|
|
717
|
+
return [...placed, theirs, told];
|
|
654
718
|
}
|
|
655
|
-
return [
|
|
719
|
+
return [...placed, told];
|
|
656
720
|
});
|
|
657
721
|
}
|
package/dist/runnable.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { type InputIssue } from "./errors.js";
|
|
2
2
|
import { type HarnessCapability } from "./harness.js";
|
|
3
|
-
import { type ModelRef } from "./model.js";
|
|
3
|
+
import { type ModelNeeds, type ModelRef } from "./model.js";
|
|
4
4
|
import type { BoxOffer } from "./place-offers.js";
|
|
5
5
|
import { type ToolSettingsMap } from "./tool-plane.js";
|
|
6
|
+
import type { MonidPinBody } from "./store/agent-body.js";
|
|
6
7
|
import type { McpTool } from "@parcha/agentrun-kernel";
|
|
7
8
|
import type { ShellPlace } from "@parcha/agentrun-kernel/kernel";
|
|
8
|
-
/** The harnesses an agent's MCP tools run on here. */
|
|
9
|
-
export declare const MCP_HARNESSES: readonly string[];
|
|
10
9
|
/** A revision's computer setting: a kind, its provider, the image it starts from, and a sandbox's GPUs
|
|
11
10
|
* (computer-setting.ts). */
|
|
12
11
|
export type RevisionComputer = {
|
|
@@ -25,6 +24,7 @@ export type RevisionShape = {
|
|
|
25
24
|
instructions: string;
|
|
26
25
|
tools?: readonly string[];
|
|
27
26
|
model?: string;
|
|
27
|
+
thinking?: string;
|
|
28
28
|
harness?: string;
|
|
29
29
|
place?: {
|
|
30
30
|
mode: string;
|
|
@@ -34,7 +34,6 @@ export type RevisionShape = {
|
|
|
34
34
|
unnamed?: true;
|
|
35
35
|
toolSettings?: ToolSettingsMap;
|
|
36
36
|
approvals?: "never";
|
|
37
|
-
maxToolCalls?: number;
|
|
38
37
|
} | {
|
|
39
38
|
kind: "workflow";
|
|
40
39
|
workflow: unknown;
|
|
@@ -52,7 +51,8 @@ export type RevisionShape = {
|
|
|
52
51
|
* not bind), `missing` (a bound tool's unset variables), `adapter`, `decision` (a decision provider's unset key), `codeNodes`
|
|
53
52
|
* (code nodes this server does not run), `shell` (a shell or executor call), `tier`, `harness`, `box` (the place's,
|
|
54
53
|
* which this server does not have) and `denied` (a tool a workflow's call node calls that is set to deny) name it for a
|
|
55
|
-
* run's 409 details; `notGrantable` a tool no setup makes grantable (a known MCP meta tool, mcp-meta.ts), with why.
|
|
54
|
+
* run's 409 details; `notGrantable` a tool no setup makes grantable (a known MCP meta tool, mcp-meta.ts), with why.
|
|
55
|
+
* `short`: a save's cap below what its model needs for one more step and an answer, a warning alone (cap-short.ts). */
|
|
56
56
|
export type Blocker = InputIssue & {
|
|
57
57
|
host: boolean;
|
|
58
58
|
tool?: string;
|
|
@@ -77,6 +77,7 @@ export type Blocker = InputIssue & {
|
|
|
77
77
|
denied?: string;
|
|
78
78
|
asks?: string;
|
|
79
79
|
unpriced?: true;
|
|
80
|
+
short?: true;
|
|
80
81
|
};
|
|
81
82
|
/**
|
|
82
83
|
* The model `harness` runs an agentic revision on here: `ref`, its own `provider/model-id`, or with none this host's
|
|
@@ -90,6 +91,7 @@ export declare function harnessModel(env: NodeJS.ProcessEnv, harness: string, re
|
|
|
90
91
|
} | {
|
|
91
92
|
why: string;
|
|
92
93
|
host: boolean;
|
|
94
|
+
needs?: ModelNeeds;
|
|
93
95
|
} | {
|
|
94
96
|
refused: string;
|
|
95
97
|
} | undefined>;
|
|
@@ -99,20 +101,23 @@ export declare const NOT_SET_UP = "not_set_up_here";
|
|
|
99
101
|
* `new Function` transform, which is no sandbox. Off by default. */
|
|
100
102
|
export declare const CODE_NODES_ENV = "AGENTRUN_SERVE_CODE_NODES";
|
|
101
103
|
/** What keeps `revision` from running in `env` under the server's tool `settings` (tool-plane.ts). `boxes`: what this
|
|
102
|
-
* server found at its start (place-offers.ts); none, every box is unavailable. `offers`: the harnesses' offers
|
|
104
|
+
* server found at its start (place-offers.ts); none, every box is unavailable. `monid`: its pin. `offers`: the harnesses' offers
|
|
103
105
|
* the server already holds (its reading); none given, they are probed here. `computerReady`: whether an agent's computer
|
|
104
106
|
* setting can be had here now, or its refusal (resolve-computer.ts computerReadiness); none given, the box check.
|
|
105
107
|
* `shellOf`: where a run of an agent with that computer setting has its shell here now (resolve-computer.ts
|
|
106
108
|
* runShellOf, in the server's mode): a sandbox-only tool on the runner is let by it (Mode 2's Archil exec runs bash);
|
|
107
|
-
* none given, the runner has no shell.
|
|
108
|
-
|
|
109
|
+
* none given, the runner has no shell. `capUsd`: a save's cap (with `capped`), whose shortfall for one more step and an
|
|
110
|
+
* answer is a warning of its own (`short`, cap-short.ts); a run's check never names one. */
|
|
111
|
+
export declare function blockersOf(env: NodeJS.ProcessEnv, revision: RevisionShape, settings?: ToolSettingsMap, { capped, capUsd, boxes, offers, mcp, monid, decisionPrice, computerReady, shellOf }?: {
|
|
109
112
|
capped?: boolean;
|
|
113
|
+
capUsd?: number;
|
|
110
114
|
boxes?: readonly BoxOffer[];
|
|
111
115
|
offers?: readonly HarnessCapability[];
|
|
112
116
|
mcp?: (server: string) => readonly (McpTool & {
|
|
113
117
|
grantable?: false;
|
|
114
118
|
reason?: string;
|
|
115
119
|
})[] | undefined;
|
|
120
|
+
monid?: MonidPinBody;
|
|
116
121
|
decisionPrice?: (model: string) => Promise<unknown>;
|
|
117
122
|
computerReady?: (setting: RevisionComputer) => Promise<{
|
|
118
123
|
readonly ok: true;
|