@parcha/agentrun-serve 0.1.0-beta.37 → 0.1.0-beta.38
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 +282 -0
- package/README.md +155 -92
- package/dist/agent-rows.d.ts +1 -1
- package/dist/agents-store.d.ts +35 -3
- package/dist/agents-store.js +39 -14
- 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/browser-cost.js +52 -93
- package/dist/cap.d.ts +0 -390
- package/dist/cap.js +4 -937
- package/dist/catalog.js +1 -1
- package/dist/composio-preset.d.ts +17 -0
- package/dist/composio-preset.js +43 -1
- package/dist/computer-calls.d.ts +36 -24
- package/dist/computer-calls.js +110 -27
- package/dist/computer-live.d.ts +5 -0
- package/dist/computer-live.js +12 -0
- package/dist/computer-setting.d.ts +15 -2
- package/dist/computer-setting.js +20 -4
- package/dist/computer-view.d.ts +3 -2
- package/dist/computer-view.js +5 -4
- package/dist/computer-viewer.js +26 -12
- package/dist/computers.d.ts +4 -1
- package/dist/computers.js +12 -6
- package/dist/console/assets/index-CjqQirbo.css +1 -0
- package/dist/console/assets/index-b6-XY5A9.js +576 -0
- package/dist/console/index.html +2 -2
- package/dist/console-links.d.ts +2 -0
- package/dist/console-links.js +3 -0
- package/dist/decisions.js +4 -0
- package/dist/faux-computers.js +4 -2
- package/dist/harness-opencode/adapter.js +7 -3
- package/dist/harness-opencode/facts.js +0 -2
- package/dist/harness-opencode/host/policy.d.ts +2 -5
- package/dist/harness-opencode/host/policy.js +8 -32
- package/dist/harness-table.d.ts +0 -2
- package/dist/harness-table.js +0 -2
- package/dist/host-tools.d.ts +1 -5
- package/dist/host-tools.js +7 -10
- package/dist/hosted-search.d.ts +0 -2
- package/dist/hosted-search.js +0 -21
- package/dist/key-words.d.ts +3 -2
- package/dist/key-words.js +4 -2
- package/dist/learn/check.d.ts +6 -1
- package/dist/learn/check.js +12 -4
- package/dist/learn/commit.d.ts +10 -0
- package/dist/learn/commit.js +18 -4
- package/dist/learn/compile.d.ts +243 -0
- package/dist/learn/compile.js +471 -0
- package/dist/learn/general.d.ts +3 -0
- package/dist/learn/general.js +4 -2
- package/dist/learn/grade.d.ts +1 -1
- package/dist/learn/grade.js +7 -6
- package/dist/learn/notes.d.ts +8 -0
- package/dist/learn/notes.js +18 -0
- package/dist/learn/promote.d.ts +253 -0
- package/dist/learn/promote.js +428 -0
- package/dist/learn/refit.d.ts +39 -0
- package/dist/learn/refit.js +236 -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 +17 -9
- package/dist/learn/skills.js +132 -42
- package/dist/learn/workflow-nodes.d.ts +15 -0
- package/dist/learn/workflow-nodes.js +44 -0
- package/dist/learned-nodes.d.ts +50 -2
- package/dist/learned-nodes.js +41 -2
- package/dist/learned-workflow.d.ts +19 -3
- package/dist/learned-workflow.js +105 -26
- package/dist/learning-batch.d.ts +2 -2
- package/dist/learning-batch.js +1 -1
- package/dist/learning-cost.d.ts +18 -6
- package/dist/learning-cost.js +15 -7
- package/dist/learning-routes.d.ts +14 -2
- package/dist/learning-routes.js +14 -3
- package/dist/learning-words.d.ts +7 -0
- package/dist/learning-words.js +7 -0
- package/dist/learning.d.ts +31 -6
- package/dist/learning.js +7 -4
- package/dist/llm.js +0 -3
- 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 +107 -0
- package/dist/mcp-probe.d.ts +8 -9
- package/dist/mcp-probe.js +16 -33
- package/dist/mcp-servers-store.d.ts +89 -22
- package/dist/mcp-servers-store.js +131 -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.d.ts +13 -0
- package/dist/model.js +46 -15
- package/dist/monid.d.ts +51 -25
- package/dist/monid.js +226 -140
- package/dist/openapi.js +336 -66
- package/dist/paid-calls.d.ts +26 -29
- package/dist/paid-calls.js +46 -102
- package/dist/propose.d.ts +7 -1
- package/dist/propose.js +18 -6
- package/dist/provider.js +9 -2
- package/dist/reflect-range.js +2 -1
- package/dist/rows.d.ts +5 -3
- package/dist/rows.js +15 -4
- package/dist/run-launch.d.ts +13 -0
- package/dist/run-launch.js +6 -0
- package/dist/run-learning-served.d.ts +13 -2
- package/dist/run-manifest.d.ts +5 -0
- package/dist/run-manifest.js +20 -0
- package/dist/run-secrets.js +2 -3
- package/dist/run-timeline-served.js +5 -2
- package/dist/run-view.d.ts +17 -6
- package/dist/run-view.js +51 -22
- package/dist/runnable.d.ts +0 -3
- package/dist/runnable.js +37 -29
- package/dist/runner/adapter-loop.d.ts +24 -10
- package/dist/runner/adapter-loop.js +852 -314
- package/dist/runner/adapter-run-spec.d.ts +12 -6
- package/dist/runner/adapter-run-spec.js +97 -46
- package/dist/runner/adapters/pi-computer.d.ts +3 -1
- package/dist/runner/adapters/pi-computer.js +13 -5
- package/dist/runner/adapters/pi.d.ts +16 -7
- package/dist/runner/adapters/pi.js +94 -33
- package/dist/runner/cli-run-spec.js +67 -27
- package/dist/runner/computer-channel.js +2 -1
- package/dist/runner/conformance/harness.d.ts +3 -0
- package/dist/runner/conformance/harness.js +145 -4
- package/dist/runner/conformance/subject.d.ts +11 -4
- package/dist/runner/end-of-run.d.ts +6 -5
- package/dist/runner/end-of-run.js +9 -6
- package/dist/runner/feedback-round.d.ts +52 -0
- package/dist/runner/feedback-round.js +79 -0
- package/dist/runner/journal-kinds.d.ts +24 -6
- package/dist/runner/journal-kinds.js +15 -0
- package/dist/runner/learning-end.d.ts +54 -19
- package/dist/runner/learning-end.js +272 -99
- package/dist/runner/learning-loop.d.ts +19 -1
- package/dist/runner/learning-loop.js +5 -2
- 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 +16 -1
- package/dist/runner/loop.js +21 -1
- package/dist/runner/mcp-claim.d.ts +5 -1
- package/dist/runner/mcp-claim.js +66 -50
- package/dist/runner/mcp-run.d.ts +16 -52
- package/dist/runner/mcp-run.js +12 -84
- package/dist/runner/meta-tools.d.ts +37 -0
- package/dist/runner/meta-tools.js +268 -0
- package/dist/runner/metrics.js +14 -3
- package/dist/runner/model-route.js +12 -3
- package/dist/runner/monid-run.d.ts +16 -0
- package/dist/runner/monid-run.js +96 -0
- package/dist/runner/promotion.d.ts +80 -0
- package/dist/runner/promotion.js +562 -0
- package/dist/runner/reflect-hook.d.ts +36 -21
- package/dist/runner/reflect-hook.js +138 -49
- package/dist/runner/runner.js +26 -4
- package/dist/runner/sessions.d.ts +8 -3
- package/dist/runner/sessions.js +5 -1
- package/dist/runner/step-guard.d.ts +62 -0
- package/dist/runner/step-guard.js +93 -0
- package/dist/runner/subagent.d.ts +0 -3
- package/dist/runner/subagent.js +7 -12
- package/dist/runner/workflow-first.d.ts +216 -0
- package/dist/runner/workflow-first.js +303 -0
- package/dist/runner/workflow-loop.js +17 -10
- package/dist/runner/workflow-spec.d.ts +1 -0
- package/dist/runner/workflow-spec.js +7 -3
- package/dist/runs-over-store.d.ts +11 -2
- package/dist/runs-over-store.js +21 -11
- package/dist/server.d.ts +88 -16
- package/dist/server.js +380 -87
- package/dist/settings-wake.d.ts +8 -6
- package/dist/settings-wake.js +13 -7
- package/dist/store/agent-body.d.ts +14 -3
- package/dist/store/agent-body.js +14 -10
- package/dist/store/command-wake.d.ts +3 -2
- package/dist/store/command-wake.js +4 -4
- 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/schema.d.ts +9 -0
- package/dist/store/schema.js +28 -8
- package/dist/store/sqlite/connection.d.ts +2 -2
- package/dist/store/sqlite/connection.js +2 -2
- package/dist/store/sqlite/run-patch.js +19 -7
- package/dist/store/sqlite/store.js +59 -18
- package/dist/store/store.d.ts +46 -14
- package/dist/store-reads/journal.d.ts +25 -1
- package/dist/store-reads/journal.js +63 -49
- package/dist/store-reads/learning.d.ts +101 -15
- package/dist/store-reads/learning.js +195 -61
- package/dist/store-reads/loop.d.ts +61 -0
- package/dist/store-reads/loop.js +111 -0
- package/dist/store-view.d.ts +3 -2
- package/dist/store-view.js +35 -17
- package/dist/template-eval.d.ts +18 -9
- package/dist/template-eval.js +91 -66
- 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 +218 -46
- package/dist/templates.js +493 -181
- package/dist/timeline/computer.d.ts +48 -0
- package/dist/timeline/computer.js +169 -0
- package/dist/timeline/index.d.ts +4 -3
- package/dist/timeline/index.js +4 -3
- package/dist/timeline/labels.d.ts +6 -2
- package/dist/timeline/labels.js +93 -2
- package/dist/timeline/origin.d.ts +19 -5
- package/dist/timeline/origin.js +11 -4
- package/dist/timeline/timeline.d.ts +11 -17
- package/dist/timeline/timeline.js +24 -9
- package/dist/tool-gate.d.ts +73 -46
- package/dist/tool-gate.js +133 -66
- package/dist/tool-keys.d.ts +4 -1
- package/dist/tool-keys.js +8 -3
- package/dist/tool-list.d.ts +26 -0
- package/dist/tool-list.js +43 -0
- package/dist/tool-names.d.ts +71 -0
- package/dist/tool-names.js +99 -0
- package/dist/tool-plane.d.ts +29 -27
- package/dist/tool-plane.js +65 -37
- package/dist/tools.d.ts +22 -6
- package/dist/tools.js +24 -20
- package/dist/validate.d.ts +15 -7
- package/dist/validate.js +91 -44
- package/dist/web-fetch.d.ts +1 -7
- package/dist/web-fetch.js +2 -22
- package/dist/workspace/computer-deps.d.ts +3 -0
- package/dist/workspace/computer-deps.js +5 -2
- package/dist/workspace/computer-for-claim.d.ts +6 -0
- package/dist/workspace/computer-for-claim.js +32 -14
- package/dist/workspace/computer-hold.js +7 -1
- package/dist/workspace/computer-script.d.ts +23 -7
- package/dist/workspace/computer-script.js +48 -14
- package/dist/workspace/index.d.ts +2 -2
- package/dist/workspace/index.js +1 -1
- package/dist/workspace/kind-skills/desktop/SKILL.md +13 -0
- package/dist/workspace/kind-skills/phone/SKILL.md +4 -0
- package/dist/workspace/local.js +2 -2
- package/dist/workspace/resolve-computer.d.ts +21 -1
- package/dist/workspace/resolve-computer.js +32 -14
- package/dist/workspace/run-tools.d.ts +28 -10
- package/dist/workspace/run-tools.js +39 -11
- package/dist/{tool-budget.d.ts → wrap-up.d.ts} +1 -18
- package/dist/wrap-up.js +21 -0
- package/launcher/agentrun-serve +4 -2
- package/package.json +9 -9
- package/templates/README.md +111 -45
- package/templates/code-review/agent.md +30 -14
- 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 +2 -2
- 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/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/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 +3 -2
- package/templates/code-review/skills/review/REVIEWER.md +3 -2
- package/templates/code-review/skills/review/SKILL.md +4 -3
- 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 +4 -3
- 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 +4 -3
- 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/tool-blurbs.d.ts +0 -4
- package/dist/tool-blurbs.js +0 -28
- package/dist/tool-budget.js +0 -62
- 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
|
@@ -23,8 +23,7 @@ import { createWorkflowExtension } from "../workflow/task.js";
|
|
|
23
23
|
import { readWorkflowRun, startWorkflowRevision, workflowCarry } from "../workflow-run.js";
|
|
24
24
|
import { KINDS } from "./journal-kinds.js";
|
|
25
25
|
import { stopEnd } from "./loop-contract.js";
|
|
26
|
-
|
|
27
|
-
const CUT_STEP_MS = 2_000;
|
|
26
|
+
import { END_PATCH_MS, END_PATCH_UNKNOWN } from "./loop.js";
|
|
28
27
|
/** A paused run's words, its row's summary while it waits for a resume. */
|
|
29
28
|
export const PAUSED_WORDS = "Paused.";
|
|
30
29
|
/** Whether a revision runs on the workflow loop (the runner's dispatch picks it by the revision's kind): a workflow
|
|
@@ -180,25 +179,26 @@ function workflowLoop(specOf, deps) {
|
|
|
180
179
|
await append(deps.journal(claim), BACKGROUND_CONTEXT, KINDS.pause, { takes: take }, { run: { state: "parked", summary: PAUSED_WORDS }, take });
|
|
181
180
|
return { state: "parked" };
|
|
182
181
|
}
|
|
183
|
-
/** The end's cost and metrics from the spec, bounded
|
|
182
|
+
/** The end's cost and metrics from the spec, bounded as the adapter loop's (END_PATCH_MS): late or failing, the end
|
|
183
|
+
* says both are unknown (END_PATCH_UNKNOWN). */
|
|
184
184
|
const endPatchOf = async (spec, data) => {
|
|
185
185
|
if (!spec.endPatch)
|
|
186
186
|
return {};
|
|
187
187
|
let timer;
|
|
188
|
-
const late = new Promise((resolve) => (timer = setTimeout(() => resolve("late"),
|
|
188
|
+
const late = new Promise((resolve) => (timer = setTimeout(() => resolve("late"), END_PATCH_MS)));
|
|
189
189
|
try {
|
|
190
190
|
const patch = await Promise.race([spec.endPatch(data), late]);
|
|
191
191
|
if (patch === "late") {
|
|
192
|
-
console.warn(`[runner] ${runId}: its end's patch gave no answer within ${
|
|
193
|
-
return
|
|
192
|
+
console.warn(`[runner] ${runId}: its end's patch gave no answer within ${END_PATCH_MS / 1000} s; the end is written with its cost and metrics unknown`);
|
|
193
|
+
return END_PATCH_UNKNOWN;
|
|
194
194
|
}
|
|
195
195
|
return patch ?? {};
|
|
196
196
|
}
|
|
197
197
|
catch (error) {
|
|
198
198
|
// Cut of every secret the runner holds (LoopDeps.redact): an error's text may echo one.
|
|
199
199
|
const text = error?.message ?? String(error);
|
|
200
|
-
console.warn(`[runner] ${runId}: its end's patch failed: ${deps.redact ? deps.redact(text) : text}`);
|
|
201
|
-
return
|
|
200
|
+
console.warn(`[runner] ${runId}: its end's patch failed: ${deps.redact ? deps.redact(text) : text}; the end is written with its cost and metrics unknown`);
|
|
201
|
+
return END_PATCH_UNKNOWN;
|
|
202
202
|
}
|
|
203
203
|
finally {
|
|
204
204
|
clearTimeout(timer);
|
|
@@ -309,11 +309,18 @@ function workflowLoop(specOf, deps) {
|
|
|
309
309
|
await append(journal, BACKGROUND_CONTEXT, KINDS.budget, budget, { run: { state: "parked", summary: parked.words } });
|
|
310
310
|
return { state: "parked" };
|
|
311
311
|
}
|
|
312
|
-
|
|
312
|
+
const endOf = (carry) => {
|
|
313
313
|
const state = carry.state === "failed" ? "failed" : carry.state === "stopped" ? "stopped" : "ended";
|
|
314
314
|
const outcome = carry.state === "escalated" ? "escalated" : carry.state === "stopped" ? carry.outcome : undefined;
|
|
315
315
|
const base = { state, summary: carry.summary, ...(outcome ? { outcome } : {}), ...(carry.output !== undefined ? { output: carry.output } : {}), ...(carry.review ? { review: carry.review } : {}) };
|
|
316
|
-
|
|
316
|
+
return { state, outcome, base };
|
|
317
|
+
};
|
|
318
|
+
async function writeEnd(journal, context, ended) {
|
|
319
|
+
const patch = await endPatchOf(spec, endOf(ended).base);
|
|
320
|
+
// A person's stop that came while the end waited on its patch (up to END_PATCH_MS on a busy store) is this end's, as a
|
|
321
|
+
// stop before it is: the run ends stopped whatever the workflow's own outcome, never completed with the stop taken.
|
|
322
|
+
const carry = stopReason?.kind === "command" && ended.state !== "stopped" ? stopEnd(stopReason.cancel) : ended;
|
|
323
|
+
const { state, outcome, base } = endOf(carry);
|
|
317
324
|
const data = { ...base, ...(patch.costUsd !== undefined ? { costUsd: patch.costUsd } : {}), ...(patch.metrics !== undefined ? { metrics: patch.metrics } : {}) };
|
|
318
325
|
const runPatch = {
|
|
319
326
|
state, summary: carry.summary,
|
|
@@ -79,6 +79,7 @@ interface DecisionProviders {
|
|
|
79
79
|
* provider, and returns the spec. The model proxies and the booking are started per claim (release closes them). */
|
|
80
80
|
export declare function workflowSpecOf(deps: WorkflowSpecDeps): (claim: {
|
|
81
81
|
runId: string;
|
|
82
|
+
runner?: string;
|
|
82
83
|
}, run?: WorkflowSpecRun) => Promise<WorkflowRunSpec>;
|
|
83
84
|
/** The run's rule with a park on a refusal: `before` (runCap's one rule for the model session) is asked, and on a refusal
|
|
84
85
|
* the run parks through the loop's hook (parkOf decides room vs for good from the refusal), the same as the pi adapter's
|
|
@@ -307,7 +307,7 @@ export function workflowSpecOf(deps) {
|
|
|
307
307
|
// The run's ONE cap over the journal's sessions: its model requests and its decisions admit by the one rule and
|
|
308
308
|
// book on one ledger (runCap's runBooking over the sessions), so each is judged on the run's whole spend and a
|
|
309
309
|
// refusal's figures are the run's. Wired now the Harness is open; the proxies' hooks forward to the model booking.
|
|
310
|
-
const sessions = journalSessions(harness, context, { flush: () => deps.store.flush() });
|
|
310
|
+
const sessions = journalSessions(harness, context, { flush: () => deps.store.flush(), ...(claim.runner === undefined ? {} : { claim: { runId: claim.runId, runner: claim.runner } }) });
|
|
311
311
|
const writer = await sessions.open(SESSION);
|
|
312
312
|
const run = runCap({ sessions: sessions, capUsd: () => effectiveCapUsd, mode: claimed.mode, now, modelOf: capModelOf });
|
|
313
313
|
booking = await modelPortFor(writer, {
|
|
@@ -318,6 +318,10 @@ export function workflowSpecOf(deps) {
|
|
|
318
318
|
onEvent: async (event) => { if (event.type === "request_start")
|
|
319
319
|
await deps.store.flush(); },
|
|
320
320
|
});
|
|
321
|
+
// An earlier claim's requests, before the workflow sends anything: one this runner's lost claim saw answer, its
|
|
322
|
+
// record refused, is booked at what it reported (waiting, bounded, for one still in flight); one a dead runner left
|
|
323
|
+
// is booked cut (the kernel's bookCut). Read as before for the cap: cut or open, a request counts at its hold and bound.
|
|
324
|
+
await booking.bookCut();
|
|
321
325
|
// The run's decisions book on the same cap, under their own session (DECISION_SESSION); created now the Harness is
|
|
322
326
|
// open, so a decision node (which runs after this) reaches it through the deferred reference. The flush makes each
|
|
323
327
|
// decision's hold durable before it is sent, as a model request's is.
|
|
@@ -483,7 +487,7 @@ export function callHoldOf(tool, input, env, modelOfTier) {
|
|
|
483
487
|
if (planeOf(env)[tool] !== "parallel")
|
|
484
488
|
return NO_HOLD(tool);
|
|
485
489
|
const fee = tool === "web_search" ? parallelSearchFee(searchArgs(input).n) : parallelExtractFee(1);
|
|
486
|
-
// Who charges for it (main's charge row's charged_by), as
|
|
490
|
+
// Who charges for it (main's charge row's charged_by), as paidRequest names it: the hold is the record its request books under.
|
|
487
491
|
return { usd: fee.usd, name: fee.name, basis: fee.basis, chargedBy: fee.by };
|
|
488
492
|
}
|
|
489
493
|
if (tool === "llm") {
|
|
@@ -989,7 +993,7 @@ function bookedNodeTools(binding, paid, park) {
|
|
|
989
993
|
...tool,
|
|
990
994
|
execute: (args, api, context) => {
|
|
991
995
|
const ledger = paid();
|
|
992
|
-
return bookedIn(ledger ? { call: api.callId,
|
|
996
|
+
return bookedIn(ledger ? { call: api.callId, paid: ledger, pause: async (refusal) => park({ message: refusal.refuse, forGood: false, ...(refusal.figures ? { figures: refusal.figures } : {}) }) } : undefined, () => tool.execute(args, api, context));
|
|
993
997
|
},
|
|
994
998
|
})),
|
|
995
999
|
};
|
|
@@ -7,7 +7,7 @@ import { type Place } from "./place.js";
|
|
|
7
7
|
import { type RepoBinding } from "./run-repo.js";
|
|
8
8
|
import { type LaunchDisk, type RunLaunch } from "./run-launch.js";
|
|
9
9
|
import { type ApprovalDecision, type RunMoment } from "./run-view.js";
|
|
10
|
-
import { type NewRevision, type RunOrigin, type RunRow, type Store } from "./store/index.js";
|
|
10
|
+
import { type NewRevision, type RevisionRow, type RunOrigin, type RunRow, type Store } from "./store/index.js";
|
|
11
11
|
import { type ToolSettingsMap } from "./tool-plane.js";
|
|
12
12
|
import type { RunTrigger } from "./triggers.js";
|
|
13
13
|
import { type Json } from "./validate.js";
|
|
@@ -85,7 +85,9 @@ export declare function raiseCap(store: RunsStore, moment: RunMoment, cap: numbe
|
|
|
85
85
|
* again changes nothing, another is 409 already-answered — and a run with no such waiting call is 404. Two answers at once
|
|
86
86
|
* each write or lose to the store's one-answer index, and the one that loses reads the one that won. The note is the
|
|
87
87
|
* person's words, carried on the command for the run's gate. */
|
|
88
|
-
export declare function approve(store: RunsStore, moment: RunMoment, id: string, decision: "allow" | "deny", note?: string): Promise<void>;
|
|
88
|
+
export declare function approve(store: RunsStore, moment: RunMoment, id: string, decision: "allow" | "deny", note?: string, confirmed?: boolean): Promise<void>;
|
|
89
|
+
/** A UUIDv7 run id: time-ordered, so a listing by start time is stable, and unique per run. */
|
|
90
|
+
export declare function uuidv7(now?: number): string;
|
|
89
91
|
/** The pieces a start needs that live in the server's request layer, not here: the leaf validators (the create body's field
|
|
90
92
|
* issues, the revision a run pins, a run's input against its schema, the hint told from the revision, a revision this host
|
|
91
93
|
* cannot run), the uploads check, the place fallback, the title's redaction, the plane's settings and key environment, and
|
|
@@ -111,6 +113,10 @@ export interface StartDeps {
|
|
|
111
113
|
runnable(revision: Revision, place: Place, options: {
|
|
112
114
|
capped: boolean;
|
|
113
115
|
}): Promise<void>;
|
|
116
|
+
/** The revision a run starts on, its MCP tools pinned: one that grants an MCP tool and was saved with no pin (before
|
|
117
|
+
* pins were made at save, or an inline agent's version stored then) is pinned once, at its first run (server.ts
|
|
118
|
+
* pinFirst); any other as it is. */
|
|
119
|
+
pinFirst?(revision: Revision): Promise<Revision>;
|
|
114
120
|
/** The uploaded files named by file_ids, ready to copy; throws when one is not ready (server.ts uploads.readyFiles). The
|
|
115
121
|
* copy into the run's work/ is the runner's at its claim; this only checks they are ready before the run starts. */
|
|
116
122
|
readyFiles(ids: readonly unknown[]): Promise<unknown>;
|
|
@@ -200,6 +206,9 @@ export interface InlineAgent {
|
|
|
200
206
|
readonly revision: NewRevision & {
|
|
201
207
|
readonly note?: string;
|
|
202
208
|
};
|
|
209
|
+
/** The revision its version already has here (Agents.externalRevision), when this is not the version's first run: the
|
|
210
|
+
* run starts on it, as a run of a stored agent starts on its revision. */
|
|
211
|
+
readonly stored?: RevisionRow;
|
|
203
212
|
}
|
|
204
213
|
/** Starts a run of an agent given inline, as POST /agents/{id}/runs starts a run of a stored one: the same checks over the
|
|
205
214
|
* revision the definition makes (prepareLaunch), then ONE transaction (store.runs.createInline) that writes the agent on
|
package/dist/runs-over-store.js
CHANGED
|
@@ -26,6 +26,7 @@ import { launchBody } from "./run-launch.js";
|
|
|
26
26
|
import { raiseFollowUpId } from "./run-view.js";
|
|
27
27
|
import { sendCommand } from "./runner/commands.js";
|
|
28
28
|
import { AnswerTaken, ExternalBodyConflict, RunFinal, StoreConstraint } from "./store/index.js";
|
|
29
|
+
import { canonical } from "./store/agent-body.js";
|
|
29
30
|
import { toolingOf } from "./tools.js";
|
|
30
31
|
import { planeFor } from "./tool-plane.js";
|
|
31
32
|
import { clip } from "./web-fetch-direct.js";
|
|
@@ -296,7 +297,7 @@ async function endBefore(store, runId, { before = Number.POSITIVE_INFINITY, take
|
|
|
296
297
|
* again changes nothing, another is 409 already-answered — and a run with no such waiting call is 404. Two answers at once
|
|
297
298
|
* each write or lose to the store's one-answer index, and the one that loses reads the one that won. The note is the
|
|
298
299
|
* person's words, carried on the command for the run's gate. */
|
|
299
|
-
export async function approve(store, moment, id, decision, note) {
|
|
300
|
+
export async function approve(store, moment, id, decision, note, confirmed = false) {
|
|
300
301
|
const settle = (given) => {
|
|
301
302
|
if (given.decision !== decision)
|
|
302
303
|
throw alreadyAnswered(id, given.decision, given.ended === true);
|
|
@@ -315,6 +316,9 @@ export async function approve(store, moment, id, decision, note) {
|
|
|
315
316
|
}
|
|
316
317
|
if (!(moment.approvalIds?.has(id) ?? false))
|
|
317
318
|
throw new ApiError("not_found", `The run ${moment.id} has no tool call ${id} waiting for approval.`);
|
|
319
|
+
// A call its run's pin marks destructive takes a second, explicit confirm to allow: nothing is written without it.
|
|
320
|
+
if (decision === "allow" && !confirmed && moment.destructiveIds?.has(id))
|
|
321
|
+
throw invalid([{ field: "confirm_destructive", reason: "missing", message: `The tool call ${id} is one its MCP server marks destructive: an allow of it is sent with confirm_destructive true, after a second confirm.` }]);
|
|
318
322
|
const ending = await endBefore(store, moment.id);
|
|
319
323
|
if (ending)
|
|
320
324
|
throw alreadyAnswered(id, ending.decision);
|
|
@@ -352,7 +356,7 @@ export async function approve(store, moment, id, decision, note) {
|
|
|
352
356
|
}
|
|
353
357
|
// ---- start -----------------------------------------------------------------------------------------------------------
|
|
354
358
|
/** A UUIDv7 run id: time-ordered, so a listing by start time is stable, and unique per run. */
|
|
355
|
-
function uuidv7(now = Date.now()) {
|
|
359
|
+
export function uuidv7(now = Date.now()) {
|
|
356
360
|
const bytes = randomBytes(16);
|
|
357
361
|
bytes.writeUIntBE(now, 0, 6);
|
|
358
362
|
bytes[6] = (bytes[6] & 0x0f) | 0x70;
|
|
@@ -393,7 +397,7 @@ async function learningStartFor(deps, entry, revision, rbody, input, use) {
|
|
|
393
397
|
const notesLeftOut = left.map((note) => options.shown.name(note.file));
|
|
394
398
|
// The learned skills the seed offers the run, by name: each with its files (one over a run's skill budget at all is held
|
|
395
399
|
// by its size and never laid) and no host secret in it, as chooseSkills leaves them out. The claim lays them; the
|
|
396
|
-
//
|
|
400
|
+
// agent's impact counts the runs each served.
|
|
397
401
|
const skills = (seeded.seed.skills ?? []).flatMap(({ name, files }) => (files && !options.shown.holds(name) && !Object.entries(files).some(([path, text]) => options.shown.holds(path) || options.shown.holds(text)) ? [name] : []));
|
|
398
402
|
// The learned workflows its learned_workflow tool runs, by name, as the claim chooses them (chooseWorkflows): what the
|
|
399
403
|
// agent's impact counts a run as started from, beside its notes and skills.
|
|
@@ -444,6 +448,8 @@ async function withHeldFiles(deps, runId, launch, write) {
|
|
|
444
448
|
throw error;
|
|
445
449
|
}
|
|
446
450
|
}
|
|
451
|
+
/** 409 external_body_conflict: a version that already ran here, given with a different definition. */
|
|
452
|
+
const bodyConflict = ({ source, kind, id, version }) => new ApiError("external_body_conflict", `${source} ${kind} ${id} version ${version} already ran here with a different definition. A version's definition never changes here: publish a new version and run that.`, { details: { external: { source, kind, id, version } } });
|
|
447
453
|
/** Starts a run of an agent given inline, as POST /agents/{id}/runs starts a run of a stored one: the same checks over the
|
|
448
454
|
* revision the definition makes (prepareLaunch), then ONE transaction (store.runs.createInline) that writes the agent on
|
|
449
455
|
* its reference's first run and the revision on its version's first run, or reads them, then the run and its launch. The
|
|
@@ -451,8 +457,11 @@ async function withHeldFiles(deps, runId, launch, write) {
|
|
|
451
457
|
* earlier ones. A different definition under a version already run is 409 external_body_conflict, nothing written; under
|
|
452
458
|
* `origin`, a key that already started a run gets that run, as startRun's. */
|
|
453
459
|
export async function startInline(store, deps, inline, body, { origin, sealed } = {}) {
|
|
454
|
-
const { external, revision } = inline;
|
|
460
|
+
const { external, revision, stored: storedRevision } = inline;
|
|
455
461
|
const ref = externalKey(external);
|
|
462
|
+
// A version's body never changes here: a different one is refused before anything else is read or written.
|
|
463
|
+
if (storedRevision && canonical(storedRevision.body) !== canonical(revision.body))
|
|
464
|
+
throw bodyConflict(external);
|
|
456
465
|
const mapped = await store.agents.byExternal(ref);
|
|
457
466
|
const stored = mapped ? await getAgent(store, mapped.id) : null;
|
|
458
467
|
// A version's first run brings the agent's name and description up to it, in the start's own transaction (createInline),
|
|
@@ -467,21 +476,19 @@ export async function startInline(store, deps, inline, body, { origin, sealed }
|
|
|
467
476
|
};
|
|
468
477
|
// A store revision is the revision the run path reads as a pi Revision (its body is the revision body), as pinnedOf hands
|
|
469
478
|
// one across.
|
|
470
|
-
const { launch } = await prepareLaunch(deps, entry, body, { revision: revision });
|
|
479
|
+
const { launch } = await prepareLaunch(deps, entry, body, { revision: (storedRevision ?? revision) });
|
|
471
480
|
const runId = (deps.newRunId ?? uuidv7)();
|
|
472
481
|
try {
|
|
473
482
|
return await withHeldFiles(deps, runId, launch, () => store.runs.createInline({
|
|
474
483
|
agent: { id: entry.agent.id, name: inline.name, description: inline.description, ref },
|
|
475
|
-
revision: { id: revision.id, version: external.version, kind: revision.kind, body: revision.body, skills: revision.skills, ...(revision.note !== undefined ? { note: revision.note } : {}) },
|
|
484
|
+
revision: { id: revision.id, version: external.version, kind: revision.kind, body: revision.body, skills: revision.skills, ...(revision.note !== undefined ? { note: revision.note } : {}), ...(revision.mcpPin !== undefined ? { mcpPin: revision.mcpPin } : {}) },
|
|
476
485
|
run: { id: runId, ...(origin ? { origin } : {}) },
|
|
477
486
|
launch: { body: launchBody(launch), ...(sealed ? { sealed: sealed(runId) } : {}) },
|
|
478
487
|
}));
|
|
479
488
|
}
|
|
480
489
|
catch (error) {
|
|
481
|
-
if (error instanceof ExternalBodyConflict)
|
|
482
|
-
|
|
483
|
-
throw new ApiError("external_body_conflict", `${source} ${kind} ${id} version ${version} already ran here with a different definition. A version's definition never changes here: publish a new version and run that.`, { details: { external: { source, kind, id, version } } });
|
|
484
|
-
}
|
|
490
|
+
if (error instanceof ExternalBodyConflict)
|
|
491
|
+
throw bodyConflict(external);
|
|
485
492
|
if (origin && error instanceof StoreConstraint) {
|
|
486
493
|
const existing = await store.runOfOrigin(origin.key);
|
|
487
494
|
const row = existing && (await store.runs.get(existing.runId));
|
|
@@ -531,7 +538,9 @@ export async function prepareLaunch(deps, entry, body, { trigger, capped = false
|
|
|
531
538
|
throw invalid([{ field: "cap_mode", reason: "not_allowed", message: "cap_mode says how a run's cap prices its requests, and this run has no cap: give it a max_cost_usd, or set the agent's." }]);
|
|
532
539
|
const capMode = cap === undefined ? undefined : typeof body.cap_mode === "string" ? body.cap_mode : rbody.capMode;
|
|
533
540
|
const place = resolvePlace(rbody.place, deps.fallbackPlace(revision.kind, revision.kind === "agentic" ? (rbody.tools ?? []) : []));
|
|
534
|
-
|
|
541
|
+
// Checked as pinned: an earlier revision with no pin is pinned now, once (StartDeps.pinFirst); one that could not be, as
|
|
542
|
+
// its server could not be listed, is refused with the rest (runnable).
|
|
543
|
+
await deps.runnable(deps.pinFirst ? await deps.pinFirst(revision) : revision, place, { capped: cap !== undefined });
|
|
535
544
|
// A held computer (computer-held.ts): only one that speaks the protocol, its kind as the claim reads it (the
|
|
536
545
|
// revision's computer, else its place's).
|
|
537
546
|
const hold = holdOf(body, (settingOfDefinition(rbody)?.computer ?? computerOfPlace(place)).kind);
|
|
@@ -590,6 +599,7 @@ export async function prepareLaunch(deps, entry, body, { trigger, capped = false
|
|
|
590
599
|
...(deps.boxAllowSet ? { boxAllowSet: true } : {}),
|
|
591
600
|
...(fileIds.length ? { files: fileIds } : {}),
|
|
592
601
|
...(learning ? { learning } : {}),
|
|
602
|
+
...(body.workflow_first === false ? { workflowFirst: false } : {}),
|
|
593
603
|
...(trigger ? { trigger } : {}),
|
|
594
604
|
...(from ? { inputOrigin: from } : {}),
|
|
595
605
|
...(model ? { model } : {}),
|
package/dist/server.d.ts
CHANGED
|
@@ -47,6 +47,9 @@ export type ServeOptions = {
|
|
|
47
47
|
* alone use): an MCP server's URL may be on loopback, at its save, preview and sign-in, and for the runner beside it.
|
|
48
48
|
* Never inferred; absent, loopback is refused there in words saying how to say so. */
|
|
49
49
|
mcpLoopback?: boolean;
|
|
50
|
+
/** A template eval's own scratch server (template-eval.ts), never set by the CLI: an MCP server's save may say, in its
|
|
51
|
+
* `source`, which package need the eval's fake stands in for. Every other server records what made a server. */
|
|
52
|
+
mcpStandIns?: boolean;
|
|
50
53
|
/** The address to listen on (default 127.0.0.1). On any other address every `Host` name is served and the token is
|
|
51
54
|
* the only lock: put TLS in front of it. */
|
|
52
55
|
host?: string;
|
|
@@ -176,6 +179,9 @@ export type ServeOptions = {
|
|
|
176
179
|
beforeSubmit?: (runId: string, content: string) => Promise<void> | void;
|
|
177
180
|
/** A test's seam: the folder the template packages are read from, in place of the package's own (templates.ts). */
|
|
178
181
|
templates?: string;
|
|
182
|
+
/** A test's seam: the GitHub a template import reads, its API's origin and the one host it may be sent to, in place of
|
|
183
|
+
* GitHub's own (template-source.ts GITHUB_HOSTS). */
|
|
184
|
+
templateImportApi?: string;
|
|
179
185
|
/** The waits before each try again of a webhook delivery (default 5 s, 5 min, 30 min, 2 h, 5 h and 10 h: webhooks.ts RETRY_MS). */
|
|
180
186
|
webhookRetryMs?: readonly number[];
|
|
181
187
|
/** Whether the outbound webhook may send to a private network or this machine: off by default, so no caller of the API
|
|
@@ -315,9 +321,11 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
|
|
|
315
321
|
default_provider?: string | undefined;
|
|
316
322
|
resolves?: Record<"opencode" | "codex" | "pi" | "claude-agent", import("./tool-plane.js").Resolution> | undefined;
|
|
317
323
|
why?: Record<"opencode" | "codex" | "pi" | "claude-agent", string> | undefined;
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
324
|
+
default_permission: "ask" | "deny" | "allow";
|
|
325
|
+
permissions: ("ask" | "deny" | "allow")[];
|
|
326
|
+
fallback_allow_reads?: true | undefined;
|
|
327
|
+
allow_reads?: true | undefined;
|
|
328
|
+
permission: "ask" | "deny" | "allow";
|
|
321
329
|
harnesses: ("opencode" | "codex" | "pi" | "claude-agent")[];
|
|
322
330
|
missing?: string[] | undefined;
|
|
323
331
|
reason?: string | undefined;
|
|
@@ -329,6 +337,20 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
|
|
|
329
337
|
blurb?: string | undefined;
|
|
330
338
|
name: string;
|
|
331
339
|
summary: string;
|
|
340
|
+
} | {
|
|
341
|
+
default_permission: "ask" | "deny" | "allow";
|
|
342
|
+
permissions: ("ask" | "deny" | "allow")[];
|
|
343
|
+
fallback_allow_reads?: true | undefined;
|
|
344
|
+
allow_reads?: true | undefined;
|
|
345
|
+
permission: "ask" | "deny" | "allow";
|
|
346
|
+
name: string;
|
|
347
|
+
summary: string;
|
|
348
|
+
blurb: string;
|
|
349
|
+
nodes: boolean;
|
|
350
|
+
calls: boolean;
|
|
351
|
+
meta: true;
|
|
352
|
+
available: boolean;
|
|
353
|
+
harnesses: ("opencode" | "codex" | "pi" | "claude-agent")[];
|
|
332
354
|
} | {
|
|
333
355
|
key: string | undefined;
|
|
334
356
|
providers?: string[] | undefined;
|
|
@@ -336,9 +358,11 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
|
|
|
336
358
|
default_provider?: string | undefined;
|
|
337
359
|
resolves?: Record<"opencode" | "codex" | "pi" | "claude-agent", import("./tool-plane.js").Resolution> | undefined;
|
|
338
360
|
why?: Record<"opencode" | "codex" | "pi" | "claude-agent", string> | undefined;
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
361
|
+
default_permission: "ask" | "deny" | "allow";
|
|
362
|
+
permissions: ("ask" | "deny" | "allow")[];
|
|
363
|
+
fallback_allow_reads?: true | undefined;
|
|
364
|
+
allow_reads?: true | undefined;
|
|
365
|
+
permission: "ask" | "deny" | "allow";
|
|
342
366
|
harnesses: ("opencode" | "codex" | "pi" | "claude-agent")[];
|
|
343
367
|
missing?: string[] | undefined;
|
|
344
368
|
reason?: string | undefined;
|
|
@@ -350,6 +374,21 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
|
|
|
350
374
|
blurb?: string | undefined;
|
|
351
375
|
name: string;
|
|
352
376
|
summary: string;
|
|
377
|
+
} | {
|
|
378
|
+
key: string | undefined;
|
|
379
|
+
default_permission: "ask" | "deny" | "allow";
|
|
380
|
+
permissions: ("ask" | "deny" | "allow")[];
|
|
381
|
+
fallback_allow_reads?: true | undefined;
|
|
382
|
+
allow_reads?: true | undefined;
|
|
383
|
+
permission: "ask" | "deny" | "allow";
|
|
384
|
+
name: string;
|
|
385
|
+
summary: string;
|
|
386
|
+
blurb: string;
|
|
387
|
+
nodes: boolean;
|
|
388
|
+
calls: boolean;
|
|
389
|
+
meta: true;
|
|
390
|
+
available: boolean;
|
|
391
|
+
harnesses: ("opencode" | "codex" | "pi" | "claude-agent")[];
|
|
353
392
|
})[];
|
|
354
393
|
/** How this server holds its secrets (secrets.ts, the launcher), and what that does not cover. */
|
|
355
394
|
secrets: {
|
|
@@ -362,7 +401,7 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
|
|
|
362
401
|
* `models.default`, `models.strong`) with the tools it names of `node_tools`; a node that names no thinking level
|
|
363
402
|
* thinks at the run's effort, or medium. */
|
|
364
403
|
workflows: {
|
|
365
|
-
nodes: ("agent" | "decide" | "
|
|
404
|
+
nodes: ("agent" | "decide" | "report" | "extract")[];
|
|
366
405
|
node_tools: string[];
|
|
367
406
|
adapters: string[];
|
|
368
407
|
decisions: {
|
|
@@ -462,7 +501,7 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
|
|
|
462
501
|
transports: string[];
|
|
463
502
|
auth: ("headers" | "none" | "bearer" | "oauth" | "github_app" | "per_run")[];
|
|
464
503
|
at_rest: string;
|
|
465
|
-
harnesses:
|
|
504
|
+
harnesses: ("opencode" | "codex" | "pi" | "claude-agent")[];
|
|
466
505
|
};
|
|
467
506
|
/** This server's learning switch (`--learning`): on, a run learns when its agent says `learning: true`; off, none does. */
|
|
468
507
|
learning: "on" | "off";
|
|
@@ -581,9 +620,11 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
|
|
|
581
620
|
default_provider?: string | undefined;
|
|
582
621
|
resolves?: Record<"opencode" | "codex" | "pi" | "claude-agent", import("./tool-plane.js").Resolution> | undefined;
|
|
583
622
|
why?: Record<"opencode" | "codex" | "pi" | "claude-agent", string> | undefined;
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
623
|
+
default_permission: "ask" | "deny" | "allow";
|
|
624
|
+
permissions: ("ask" | "deny" | "allow")[];
|
|
625
|
+
fallback_allow_reads?: true | undefined;
|
|
626
|
+
allow_reads?: true | undefined;
|
|
627
|
+
permission: "ask" | "deny" | "allow";
|
|
587
628
|
harnesses: ("opencode" | "codex" | "pi" | "claude-agent")[];
|
|
588
629
|
missing?: string[] | undefined;
|
|
589
630
|
reason?: string | undefined;
|
|
@@ -595,6 +636,20 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
|
|
|
595
636
|
blurb?: string | undefined;
|
|
596
637
|
name: string;
|
|
597
638
|
summary: string;
|
|
639
|
+
} | {
|
|
640
|
+
default_permission: "ask" | "deny" | "allow";
|
|
641
|
+
permissions: ("ask" | "deny" | "allow")[];
|
|
642
|
+
fallback_allow_reads?: true | undefined;
|
|
643
|
+
allow_reads?: true | undefined;
|
|
644
|
+
permission: "ask" | "deny" | "allow";
|
|
645
|
+
name: string;
|
|
646
|
+
summary: string;
|
|
647
|
+
blurb: string;
|
|
648
|
+
nodes: boolean;
|
|
649
|
+
calls: boolean;
|
|
650
|
+
meta: true;
|
|
651
|
+
available: boolean;
|
|
652
|
+
harnesses: ("opencode" | "codex" | "pi" | "claude-agent")[];
|
|
598
653
|
} | {
|
|
599
654
|
key: string | undefined;
|
|
600
655
|
providers?: string[] | undefined;
|
|
@@ -602,9 +657,11 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
|
|
|
602
657
|
default_provider?: string | undefined;
|
|
603
658
|
resolves?: Record<"opencode" | "codex" | "pi" | "claude-agent", import("./tool-plane.js").Resolution> | undefined;
|
|
604
659
|
why?: Record<"opencode" | "codex" | "pi" | "claude-agent", string> | undefined;
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
660
|
+
default_permission: "ask" | "deny" | "allow";
|
|
661
|
+
permissions: ("ask" | "deny" | "allow")[];
|
|
662
|
+
fallback_allow_reads?: true | undefined;
|
|
663
|
+
allow_reads?: true | undefined;
|
|
664
|
+
permission: "ask" | "deny" | "allow";
|
|
608
665
|
harnesses: ("opencode" | "codex" | "pi" | "claude-agent")[];
|
|
609
666
|
missing?: string[] | undefined;
|
|
610
667
|
reason?: string | undefined;
|
|
@@ -616,6 +673,21 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
|
|
|
616
673
|
blurb?: string | undefined;
|
|
617
674
|
name: string;
|
|
618
675
|
summary: string;
|
|
676
|
+
} | {
|
|
677
|
+
key: string | undefined;
|
|
678
|
+
default_permission: "ask" | "deny" | "allow";
|
|
679
|
+
permissions: ("ask" | "deny" | "allow")[];
|
|
680
|
+
fallback_allow_reads?: true | undefined;
|
|
681
|
+
allow_reads?: true | undefined;
|
|
682
|
+
permission: "ask" | "deny" | "allow";
|
|
683
|
+
name: string;
|
|
684
|
+
summary: string;
|
|
685
|
+
blurb: string;
|
|
686
|
+
nodes: boolean;
|
|
687
|
+
calls: boolean;
|
|
688
|
+
meta: true;
|
|
689
|
+
available: boolean;
|
|
690
|
+
harnesses: ("opencode" | "codex" | "pi" | "claude-agent")[];
|
|
619
691
|
})[];
|
|
620
692
|
/** How this server holds its secrets (secrets.ts, the launcher), and what that does not cover. */
|
|
621
693
|
secrets: {
|
|
@@ -628,7 +700,7 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
|
|
|
628
700
|
* `models.default`, `models.strong`) with the tools it names of `node_tools`; a node that names no thinking level
|
|
629
701
|
* thinks at the run's effort, or medium. */
|
|
630
702
|
workflows: {
|
|
631
|
-
nodes: ("agent" | "decide" | "
|
|
703
|
+
nodes: ("agent" | "decide" | "report" | "extract")[];
|
|
632
704
|
node_tools: string[];
|
|
633
705
|
adapters: string[];
|
|
634
706
|
decisions: {
|
|
@@ -728,7 +800,7 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
|
|
|
728
800
|
transports: string[];
|
|
729
801
|
auth: ("headers" | "none" | "bearer" | "oauth" | "github_app" | "per_run")[];
|
|
730
802
|
at_rest: string;
|
|
731
|
-
harnesses:
|
|
803
|
+
harnesses: ("opencode" | "codex" | "pi" | "claude-agent")[];
|
|
732
804
|
};
|
|
733
805
|
/** This server's learning switch (`--learning`): on, a run learns when its agent says `learning: true`; off, none does. */
|
|
734
806
|
learning: "on" | "off";
|