@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
|
@@ -16,12 +16,15 @@ import { fileURLToPath } from "node:url";
|
|
|
16
16
|
import { tmpdir } from "node:os";
|
|
17
17
|
import { join } from "node:path";
|
|
18
18
|
import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
|
|
19
|
+
import { DEFER_CATALOG_OVER } from "@parcha/agentrun-kernel";
|
|
19
20
|
import { AnswerTaken, dropPostgresSchema, openPostgresStore, openStore, RunFinal, storeTarget, Unanswered } from "../../store/index.js";
|
|
20
21
|
import { sendCommand } from "../commands.js";
|
|
21
22
|
import { callsOf, journalRecords, messagesOf } from "../journal-reader.js";
|
|
22
23
|
import { KINDS, MESSAGE_SENT_AGAIN } from "../journal-kinds.js";
|
|
23
24
|
import { timelineReducer } from "../../timeline/index.js";
|
|
24
25
|
import { emptyState, translate } from "../../live/translate.js";
|
|
26
|
+
import { servedTimelineRows } from "../../run-timeline-served.js";
|
|
27
|
+
import { STOPPED_WHILE_WAITING } from "../../refusal-words.js";
|
|
25
28
|
/** The one row a person's stop gives on the live timeline (live/translate.ts STOPPED_BY_YOU), the same on every harness. */
|
|
26
29
|
const STOPPED_BY_YOU = "Stopped by you";
|
|
27
30
|
import { startRunner } from "../runner.js";
|
|
@@ -106,6 +109,14 @@ export function suiteTools(countFile) {
|
|
|
106
109
|
};
|
|
107
110
|
return { tools, ran, letSlowGo: () => letGo(), slowStarted: started };
|
|
108
111
|
}
|
|
112
|
+
/** Catalog tools (an MCP server's, by wire name) that do nothing, enough of them to pass DEFER_CATALOG_OVER: a run with that
|
|
113
|
+
* many has its catalog deferred (not listed) and is offered tools_search and tools_call, which the meta cases need. */
|
|
114
|
+
export function fillerTools(count = DEFER_CATALOG_OVER + 1) {
|
|
115
|
+
return Object.fromEntries(Array.from({ length: count }, (_, index) => {
|
|
116
|
+
const name = `mcp__idle__tool_${index}`;
|
|
117
|
+
return [name, { name, replaySafe: true, ask: false, run: async () => "idle" }];
|
|
118
|
+
}));
|
|
119
|
+
}
|
|
109
120
|
const quiet = { beforeIntent: async () => { }, beforeResult: async () => { } };
|
|
110
121
|
/** Hooks that crash the runner held in `holder` at `point`, once: kill() and never resolve. */
|
|
111
122
|
function crashAt(point, holder) {
|
|
@@ -348,6 +359,8 @@ async function world(subject, t, timing = STEADY) {
|
|
|
348
359
|
}
|
|
349
360
|
return reducer.rows();
|
|
350
361
|
};
|
|
362
|
+
/** The run's Timeline rows as GET /runs/{id}/timeline serves them (run-timeline-served.ts), its approval rows among them. */
|
|
363
|
+
const servedRows = () => servedTimelineRows({ serverSecrets: () => [], keyEnv: () => ({}) }, server, RUN, BACKGROUND_CONTEXT);
|
|
351
364
|
const commandRow = async (id) => (await server.commands(RUN, id - 1)).find((row) => row.id === id);
|
|
352
365
|
/** The call the run asked a person about: its ask entry's callId, which an approve or deny names as its approval. */
|
|
353
366
|
const askedCall = async () => {
|
|
@@ -357,7 +370,7 @@ async function world(subject, t, timing = STEADY) {
|
|
|
357
370
|
assert.ok(ask, "the run wrote its ask");
|
|
358
371
|
return String(ask.data.callId);
|
|
359
372
|
};
|
|
360
|
-
return { dir, storeUrl: url, storeEnv, clockFile, runOut, runOutUnknown, claimsSettled, server, start, run, read, ended, began, commandRow, askedCall, events, handedOver: (id) => handed.has(id), liveRows };
|
|
373
|
+
return { dir, storeUrl: url, storeEnv, clockFile, runOut, runOutUnknown, claimsSettled, server, start, run, read, ended, began, commandRow, askedCall, events, handedOver: (id) => handed.has(id), liveRows, servedRows };
|
|
361
374
|
}
|
|
362
375
|
/**
|
|
363
376
|
* The claim's fence, as the stalled process's own events show it: once it went on (`continuedAt`, its lease run out and no
|
|
@@ -443,10 +456,9 @@ function saidTakenOver(rows, runner) {
|
|
|
443
456
|
assert.ok(said.includes(`Resumed after its runner (${runner}) was lost`), `the timeline says the run went on after ${runner} was lost: ${JSON.stringify(said)}; its rows ${JSON.stringify(rows.map((row) => [row.kind, row.summary]))}`);
|
|
444
457
|
}
|
|
445
458
|
/** A crash at `point` during a call of `tool`, then a second runner's resume: the run ends. */
|
|
446
|
-
async function crashThenResume(subject, t, tool, point) {
|
|
459
|
+
async function crashThenResume(subject, t, tool, point, script = [{ call: tool }, { say: "done" }]) {
|
|
447
460
|
const w = await world(subject, t);
|
|
448
461
|
const { tools, ran } = suiteTools();
|
|
449
|
-
const script = [{ call: tool }, { say: "done" }];
|
|
450
462
|
const holder = {};
|
|
451
463
|
await w.start("runner-a", { script, tools, hooks: crashAt(point, holder) }, holder);
|
|
452
464
|
// An unanswered first claim is run out while it waits: it never reaches the crash point otherwise.
|
|
@@ -1055,7 +1067,128 @@ const CASES = [
|
|
|
1055
1067
|
assert.deepEqual(messages.filter((message) => message.role === "model").map((message) => message.text), ["Part of it", "done"]);
|
|
1056
1068
|
},
|
|
1057
1069
|
},
|
|
1070
|
+
{
|
|
1071
|
+
id: "meta-search",
|
|
1072
|
+
title: "tools_search finds the session's own tools by what they do, with their schemas, and never itself, tools_call or codemode",
|
|
1073
|
+
async body(subject, t) {
|
|
1074
|
+
const w = await world(subject, t);
|
|
1075
|
+
const { tools: suite } = suiteTools();
|
|
1076
|
+
const tools = { ...suite, ...fillerTools() };
|
|
1077
|
+
await w.start("runner-a", { script: [{ call: "tools_search", args: { query: "asked" } }, { sayLastResult: true }], tools, hooks: quiet });
|
|
1078
|
+
await w.ended("ended");
|
|
1079
|
+
const said = await modelSaid(w);
|
|
1080
|
+
const names = [...said.matchAll(/"name":\s*"([^"]+)"/g)].map((match) => match[1]);
|
|
1081
|
+
assert.equal(names[0], "asked", `the tool named in the query ranks first: ${said}`);
|
|
1082
|
+
assert.ok(names.every((name) => name in tools), `only the session's own tools: ${said}`);
|
|
1083
|
+
assert.match(said, /"input_schema"/, `each with its input schema: ${said}`);
|
|
1084
|
+
},
|
|
1085
|
+
},
|
|
1086
|
+
{
|
|
1087
|
+
id: "meta-call-park",
|
|
1088
|
+
title: "tools_call is asked about as the tool it calls: an ask parks the run, and the approved call runs once",
|
|
1089
|
+
async body(subject, t) {
|
|
1090
|
+
const w = await world(subject, t);
|
|
1091
|
+
const { tools: suite, ran } = suiteTools();
|
|
1092
|
+
const tools = { ...suite, ...fillerTools() };
|
|
1093
|
+
await w.start("runner-a", { script: [{ call: "tools_call", args: { name: "asked", args: {} } }, { sayLastResult: true }], tools, hooks: quiet });
|
|
1094
|
+
const parked = await w.ended("parked");
|
|
1095
|
+
assert.equal(ran.asked, 0, "the asked tool waits for its answer");
|
|
1096
|
+
const callId = await w.askedCall();
|
|
1097
|
+
assert.match(callId, /\/call$/, `the ask is the nested call's own, under the calling one's id: ${callId}`);
|
|
1098
|
+
await nestedRowsShown(w, "tools_call", [{ tool: "asked", waits: true }]);
|
|
1099
|
+
await sendCommand(w.server, RUN, { kind: "approve", body: { approval: callId } });
|
|
1100
|
+
const row = await w.ended("ended");
|
|
1101
|
+
assert.ok(row.epoch > parked.epoch, "resumed under a new claim");
|
|
1102
|
+
assert.equal(ran.asked, 1, "approved, it ran once");
|
|
1103
|
+
assert.match(await modelSaid(w), /asked done/, "its outcome is tools_call's answer");
|
|
1104
|
+
await nestedRowsShown(w, "tools_call", [{ tool: "asked", result: /asked done/ }]);
|
|
1105
|
+
},
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
id: "meta-call-deny",
|
|
1109
|
+
title: "a person's deny of a call made through tools_call refuses it in the gate's words: it never runs",
|
|
1110
|
+
async body(subject, t) {
|
|
1111
|
+
const w = await world(subject, t);
|
|
1112
|
+
const { tools: suite, ran } = suiteTools();
|
|
1113
|
+
const tools = { ...suite, ...fillerTools() };
|
|
1114
|
+
await w.start("runner-a", { script: [{ call: "tools_call", args: { name: "asked", args: {} } }, { sayLastResult: true }], tools, hooks: quiet });
|
|
1115
|
+
await w.ended("parked");
|
|
1116
|
+
await sendCommand(w.server, RUN, { kind: "deny", body: { approval: await w.askedCall(), note: "not now" } });
|
|
1117
|
+
await w.ended("ended");
|
|
1118
|
+
assert.equal(ran.asked, 0, "denied, it never ran");
|
|
1119
|
+
assert.match(await modelSaid(w), /The user denied this asked call\. It was not run: nothing was sent and nothing was charged\. Reason: not now/, "the model read the refusal of the tool it called");
|
|
1120
|
+
},
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
id: "meta-codemode-park",
|
|
1124
|
+
title: "a codemode script's ask parks the run; approved, the script runs again with its recorded calls answered from their records, the asked call runs once, its outcome is the answer, and the rest of the script never runs",
|
|
1125
|
+
async body(subject, t) {
|
|
1126
|
+
const w = await world(subject, t);
|
|
1127
|
+
const { tools, ran } = suiteTools();
|
|
1128
|
+
const script = "const a = await tools.read({});\nconst b = await tools.asked({});\nawait tools.effect({});\nreturn [a, b];";
|
|
1129
|
+
await w.start("runner-a", { script: [{ call: "codemode", args: { script } }, { sayLastResult: true }], tools, hooks: quiet });
|
|
1130
|
+
await w.ended("parked");
|
|
1131
|
+
assert.deepEqual([ran.read, ran.asked, ran.effect], [1, 0, 0], "the script's read ran, and its asked call waits");
|
|
1132
|
+
await nestedRowsShown(w, "codemode", [{ tool: "read", result: /^read$/ }, { tool: "asked", waits: true }]);
|
|
1133
|
+
await sendCommand(w.server, RUN, { kind: "approve", body: { approval: await w.askedCall() } });
|
|
1134
|
+
await w.ended("ended");
|
|
1135
|
+
assert.deepEqual([ran.read, ran.asked, ran.effect], [1, 1, 0], "the read was answered from its record, the asked call ran once, and the effect after it never ran");
|
|
1136
|
+
const said = await modelSaid(w);
|
|
1137
|
+
assert.match(said, /asked done/, `the asked call's outcome is the script's answer: ${said}`);
|
|
1138
|
+
assert.match(said, /The rest of the script did not run/, `the answer says the rest did not run: ${said}`);
|
|
1139
|
+
await nestedRowsShown(w, "codemode", [{ tool: "read", result: /^read$/ }, { tool: "asked", result: /asked done/ }]);
|
|
1140
|
+
},
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
id: "meta-codemode-stop",
|
|
1144
|
+
title: "a person's stop while a codemode script's call waits for its approval: the call reads that it was not run, never interrupted",
|
|
1145
|
+
async body(subject, t) {
|
|
1146
|
+
const w = await world(subject, t);
|
|
1147
|
+
const { tools, ran } = suiteTools();
|
|
1148
|
+
const script = "const a = await tools.read({});\nconst b = await tools.asked({});\nreturn [a, b];";
|
|
1149
|
+
await w.start("runner-a", { script: [{ call: "codemode", args: { script } }, { sayLastResult: true }], tools, hooks: quiet });
|
|
1150
|
+
await w.ended("parked");
|
|
1151
|
+
await sendCommand(w.server, RUN, { kind: "stop" });
|
|
1152
|
+
await w.ended("stopped");
|
|
1153
|
+
assert.equal(ran.asked, 0, "stopped while it waited, the asked call never ran");
|
|
1154
|
+
await nestedRowsShown(w, "codemode", [{ tool: "read", result: /^read$/ }, { tool: "asked", result: new RegExp(`^${STOPPED_WHILE_WAITING}`) }]);
|
|
1155
|
+
},
|
|
1156
|
+
},
|
|
1157
|
+
{
|
|
1158
|
+
id: "meta-codemode-crash",
|
|
1159
|
+
title: "a crash after a codemode script's call's intent: the script runs again, the call is told interrupted, never run twice, and the script ends there",
|
|
1160
|
+
async body(subject, t) {
|
|
1161
|
+
const script = "await tools.effect({});\nawait tools.read({});\nreturn 'end';";
|
|
1162
|
+
const { ran } = await crashThenResume(subject, t, "effect", "beforeResult", [{ call: "codemode", args: { script } }, { say: "done" }]);
|
|
1163
|
+
assert.equal(ran.effect, 1, "the effect ran once, never again after the crash");
|
|
1164
|
+
assert.equal(ran.read, 0, "the script ended at the interrupted call: nothing after it ran");
|
|
1165
|
+
},
|
|
1166
|
+
},
|
|
1058
1167
|
];
|
|
1168
|
+
/** The one Timeline rule for a call that nests calls (tools_call, codemode), the same on every harness: the call's own row,
|
|
1169
|
+
* then each call it made as its own rows (its id `<the call's id>/<key>`), a finished one's result row with its output,
|
|
1170
|
+
* and one that waits for a person with its approval row, as a call the model made itself shows them. `nested`: each call
|
|
1171
|
+
* it made, by tool, with what its result says (`result`) or that it waits (`waits`). */
|
|
1172
|
+
async function nestedRowsShown(w, parent, nested) {
|
|
1173
|
+
const rows = await w.servedRows();
|
|
1174
|
+
const seen = JSON.stringify(rows.map((row) => [row.kind, row.tool_use_id, row.summary]));
|
|
1175
|
+
const id = rows.find((row) => row.kind === "tool_use" && row.tool_name === parent)?.tool_use_id;
|
|
1176
|
+
assert.ok(id, `${parent} has its own row: ${seen}`);
|
|
1177
|
+
for (const one of nested) {
|
|
1178
|
+
const own = (kind) => rows.find((row) => row.kind === kind && row.tool_name === one.tool && row.tool_use_id?.startsWith(`${id}/`));
|
|
1179
|
+
const use = own("tool_use");
|
|
1180
|
+
assert.ok(use, `the ${one.tool} call ${parent} made has its own row, under ${parent}'s id: ${seen}`);
|
|
1181
|
+
if (one.result)
|
|
1182
|
+
assert.match(own("tool_result")?.tool_result_preview ?? "", one.result, `the ${one.tool} call ${parent} made has its result row: ${seen}`);
|
|
1183
|
+
if (one.waits)
|
|
1184
|
+
assert.ok(rows.some((row) => row.kind === "tool_approval_requested" && row.tool_use_id === use.tool_use_id && /^Waiting for your approval: /.test(row.summary ?? "")), `the ${one.tool} call ${parent} made waits with its approval row: ${seen}`);
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
/** What the model said, all of it, in order: a case that says its last result reads it here. */
|
|
1188
|
+
async function modelSaid(w) {
|
|
1189
|
+
const { messages } = await w.read();
|
|
1190
|
+
return messages.filter((message) => message.role === "model").map((message) => message.text).join("\n");
|
|
1191
|
+
}
|
|
1059
1192
|
const STEERS_IN_TURN = "it places a message sent mid-turn in the turn in flight, its row taken in its submission's commit, so it never sends one as a turn of its own (message-resent-after-crash)";
|
|
1060
1193
|
const CLI_NEVER_RERUNS = "a CLI never reruns a call that started; only the model calls again (its adapter's facts: rerunsStarted false)";
|
|
1061
1194
|
/** The cases a harness's declared facts rule out, each with why: what it does by design, not what it cannot model yet. */
|
|
@@ -1073,8 +1206,16 @@ export function factsRuleOut(facts) {
|
|
|
1073
1206
|
? { "length-ends-failed": `${facts.id} resumes an answer its output limit cut itself, up to ${facts.recoversCutAnswers} times in one turn (its adapter's facts: recoversCutAnswers ${facts.recoversCutAnswers})` }
|
|
1074
1207
|
: {}),
|
|
1075
1208
|
...(facts.recoversCutAnswers === 0 ? { "length-mid-run": `a cut ends ${facts.id}'s turn, as pi's does (its adapter's facts: recoversCutAnswers 0)` } : {}),
|
|
1209
|
+
...(facts.ownToolSearch ? { "meta-search": OWN_TOOL_SEARCH(facts.id), "meta-call-park": OWN_TOOL_SEARCH(facts.id), "meta-call-deny": OWN_TOOL_SEARCH(facts.id) } : {}),
|
|
1210
|
+
...(facts.ownCodemode ? { "meta-codemode-park": OWN_CODEMODE(facts.id), "meta-codemode-stop": OWN_CODEMODE(facts.id), "meta-codemode-crash": OWN_CODEMODE(facts.id) } : {}),
|
|
1076
1211
|
};
|
|
1077
1212
|
}
|
|
1213
|
+
/** Why a harness that defers a run's MCP tools itself has no case of the host's tools_search or tools_call. */
|
|
1214
|
+
const OWN_TOOL_SEARCH = (id) => `${id} defers a run's MCP tools behind a tool search of its own (its adapter's facts: ownToolSearch), so the host offers no tools_search or tools_call beside it`;
|
|
1215
|
+
/** Why a harness that runs scripts itself has no case of the host's codemode. */
|
|
1216
|
+
const OWN_CODEMODE = (id) => `${id} runs the model's scripts in its own code mode (its adapter's facts: ownCodemode), so the host offers no codemode beside it`;
|
|
1217
|
+
/** The cases of the host's tools over a session's tools (runner/meta-tools.ts), which only the adapter loop gives. */
|
|
1218
|
+
const META_CASES = new Set(["meta-search", "meta-call-park", "meta-call-deny", "meta-codemode-park", "meta-codemode-stop", "meta-codemode-crash"]);
|
|
1078
1219
|
/** What a run whose answer was cut at the model's output limit says (loop-contract.ts cutAtLimit). */
|
|
1079
1220
|
const CUT_AT_LIMIT = /^the model stopped at its output limit( \(\d+ tokens\))? before finishing its answer$/;
|
|
1080
1221
|
/** The run once it is released in a final state, whichever: a case reads which. */
|
|
@@ -1099,7 +1240,7 @@ export function registerHarnessConformance(given, { test, storeUrl }) {
|
|
|
1099
1240
|
// A harness that steers (any whose facts do not say steer false, as message-mid-turn-kept reads them) places a message
|
|
1100
1241
|
// in the turn in flight, its row taken in the commit of its submission: it never sends one as a turn of its own.
|
|
1101
1242
|
const byFacts = ruledOut[entry.id] ?? (entry.id === "message-resent-after-crash" && subject.facts?.steer !== false ? STEERS_IN_TURN : undefined);
|
|
1102
|
-
const notYet = subject.unsupported?.[entry.id] ?? (processCase && !subject.process ? "it names no module a runner process can load (subject.process)" : undefined);
|
|
1243
|
+
const notYet = subject.unsupported?.[entry.id] ?? (processCase && !subject.process ? "it names no module a runner process can load (subject.process)" : undefined) ?? (subject.metaTools === false && META_CASES.has(entry.id) ? "its loop gives its sessions no tools_search, tools_call or codemode (they are the adapter loop's: runner/meta-tools.ts)" : undefined);
|
|
1103
1244
|
const onPostgres = storeUrl ? POSTGRES_PENDING[entry.id] : undefined;
|
|
1104
1245
|
const skip = byFacts ? `${subject.name} does not do this by design: ${byFacts}` : notYet ? `${subject.name} cannot model this yet: ${notYet}` : onPostgres ? `on Postgres, ${onPostgres}` : undefined;
|
|
1105
1246
|
test(`${subject.name}: ${entry.title}`, { timeout: CASE_TIMEOUT_MS, ...(skip ? { skip } : {}) }, (t) => entry.body(subject, t));
|
|
@@ -3,7 +3,7 @@ import type { CallRecord } from "../journal-reader.js";
|
|
|
3
3
|
import type { Journal, LoopFactory } from "../loop-contract.js";
|
|
4
4
|
/** One step of the model's script: call a tool, say a text, or say the text of the last steer it was given. */
|
|
5
5
|
export type ScriptStep = {
|
|
6
|
-
readonly call: ToolName;
|
|
6
|
+
readonly call: ToolName | MetaToolName;
|
|
7
7
|
readonly args?: Record<string, unknown>;
|
|
8
8
|
}
|
|
9
9
|
/** `cut`: the model stops at its output limit as it says it (stopReason "length"): the text is unfinished. */
|
|
@@ -20,8 +20,10 @@ export type ScriptStep = {
|
|
|
20
20
|
/** The suite's tools. effect changes something outside the run; read does not; slow runs until the suite lets it go
|
|
21
21
|
* (or its signal is aborted); asked is one the gate asks a person about. */
|
|
22
22
|
export type ToolName = "effect" | "read" | "slow" | "asked";
|
|
23
|
+
/** The host's tools over the suite's (runner/meta-tools.ts), which the adapter loop gives every session beside them. */
|
|
24
|
+
export type MetaToolName = "tools_search" | "tools_call" | "codemode";
|
|
23
25
|
export interface SuiteTool {
|
|
24
|
-
readonly name:
|
|
26
|
+
readonly name: string;
|
|
25
27
|
/** May run again after a crash: it changes nothing outside the run. */
|
|
26
28
|
readonly replaySafe: boolean;
|
|
27
29
|
/** The gate asks a person before it runs: the run parks. */
|
|
@@ -52,12 +54,12 @@ export interface KernelHooks {
|
|
|
52
54
|
}
|
|
53
55
|
export interface ConformanceSetup {
|
|
54
56
|
readonly script: readonly ScriptStep[];
|
|
55
|
-
readonly tools: Readonly<Record<
|
|
57
|
+
readonly tools: Readonly<Record<string, SuiteTool>>;
|
|
56
58
|
readonly hooks: KernelHooks;
|
|
57
59
|
/** The run's agent, for the subject's spec to name (AdapterRunSpec.agentId): the end-of-run step is asked with it. */
|
|
58
60
|
readonly agentId?: string;
|
|
59
61
|
}
|
|
60
|
-
export type ConformanceCase = "crash-before-intent" | "crash-after-intent" | "crash-before-intent-process" | "crash-after-intent-process" | "stalled-past-lease-process" | "replay-safe-rerun" | "steer-mid-turn" | "message-mid-turn-kept" | "message-resent-after-crash" | "cancel-ends-for-good" | "cancel-parked" | "deny-note" | "steer-origin" | "stop-ends-turn" | "park-on-ask" | "approval-names-its-call" | "approval-double-click" | "approval-race" | "message-never-answers" | "end-of-run-answer" | "fault-effects-once" | "fault-restarts-bounded" | "length-ends-failed" | "length-mid-run";
|
|
62
|
+
export type ConformanceCase = "crash-before-intent" | "crash-after-intent" | "crash-before-intent-process" | "crash-after-intent-process" | "stalled-past-lease-process" | "replay-safe-rerun" | "steer-mid-turn" | "message-mid-turn-kept" | "message-resent-after-crash" | "cancel-ends-for-good" | "cancel-parked" | "deny-note" | "steer-origin" | "stop-ends-turn" | "park-on-ask" | "approval-names-its-call" | "approval-double-click" | "approval-race" | "message-never-answers" | "end-of-run-answer" | "fault-effects-once" | "fault-restarts-bounded" | "length-ends-failed" | "length-mid-run" | "meta-search" | "meta-call-park" | "meta-call-deny" | "meta-codemode-park" | "meta-codemode-stop" | "meta-codemode-crash";
|
|
61
63
|
export interface ConformanceSubject {
|
|
62
64
|
/** The harness's name, as the suite's tests are titled. */
|
|
63
65
|
readonly name: string;
|
|
@@ -76,7 +78,12 @@ export interface ConformanceSubject {
|
|
|
76
78
|
readonly steer: boolean;
|
|
77
79
|
readonly rerunsStarted?: false;
|
|
78
80
|
readonly recoversCutAnswers?: number;
|
|
81
|
+
readonly ownCodemode?: true;
|
|
82
|
+
readonly ownToolSearch?: true;
|
|
79
83
|
};
|
|
84
|
+
/** False for a loop that gives its sessions no tools_search, tools_call or codemode (they are the adapter loop's,
|
|
85
|
+
* runner/meta-tools.ts): their cases are skipped, saying so. */
|
|
86
|
+
readonly metaTools?: false;
|
|
80
87
|
/** Cases this harness cannot model yet, each with why: reported as skipped with that reason, never as passed. */
|
|
81
88
|
readonly unsupported?: Partial<Record<ConformanceCase, string>>;
|
|
82
89
|
/** How the suite reads this subject's calls, when they are not the kernel's call records: a workflow's calls are the DSL
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
export declare const REFLECT_PREFIX = "learn-reflect-";
|
|
3
3
|
/** The label a reader puts on the end-of-run turn's rows and messages: the server's (learning.ts LEARNING_LABEL). */
|
|
4
4
|
export declare const REFLECT_LABEL = "learning";
|
|
5
|
-
/** The end-of-run turn's request id, one per round of a run
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
|
|
5
|
+
/** The end-of-run turn's request id, one per round of a run, and one per `step` of a round (a turn of its own after the
|
|
6
|
+
* look-back: the compile turn's attempts, `compile-<n>`): pi answers a repeat of it from its submission, so a turn
|
|
7
|
+
* asked again on a later claim is never asked of the model twice. A run's first end is round 1; an end after a
|
|
8
|
+
* follow-up opened the run again is the next round, whose turn is asked of the model anew under an id of its own. The
|
|
9
|
+
* server's own prefix, so the run's readers tell the turn's rows apart by it (reflectRanges). */
|
|
10
|
+
export declare const reflectRequestId: (runId: string, again?: boolean, round?: number, step?: string) => string;
|
|
10
11
|
/** The suffix of the end-of-run turn's re-ask's request id (EndOfRunTurn ask's `again`): one per round too, so a repeat
|
|
11
12
|
* is answered from its submission, never asked of the model twice. */
|
|
12
13
|
export declare const REFLECT_AGAIN = ":again";
|
|
@@ -8,16 +8,19 @@ import { KINDS } from "./journal-kinds.js";
|
|
|
8
8
|
export const REFLECT_PREFIX = "learn-reflect-";
|
|
9
9
|
/** The label a reader puts on the end-of-run turn's rows and messages: the server's (learning.ts LEARNING_LABEL). */
|
|
10
10
|
export const REFLECT_LABEL = "learning";
|
|
11
|
-
/** The end-of-run turn's request id, one per round of a run
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
|
|
11
|
+
/** The end-of-run turn's request id, one per round of a run, and one per `step` of a round (a turn of its own after the
|
|
12
|
+
* look-back: the compile turn's attempts, `compile-<n>`): pi answers a repeat of it from its submission, so a turn
|
|
13
|
+
* asked again on a later claim is never asked of the model twice. A run's first end is round 1; an end after a
|
|
14
|
+
* follow-up opened the run again is the next round, whose turn is asked of the model anew under an id of its own. The
|
|
15
|
+
* server's own prefix, so the run's readers tell the turn's rows apart by it (reflectRanges). */
|
|
16
|
+
export const reflectRequestId = (runId, again = false, round = 1, step) => `${REFLECT_PREFIX}${runId}${round > 1 ? `${REFLECT_ROUND}${round}` : ""}${step !== undefined ? `:${step}` : again ? REFLECT_AGAIN : ""}`;
|
|
16
17
|
/** The suffix of the end-of-run turn's re-ask's request id (EndOfRunTurn ask's `again`): one per round too, so a repeat
|
|
17
18
|
* is answered from its submission, never asked of the model twice. */
|
|
18
19
|
export const REFLECT_AGAIN = ":again";
|
|
19
20
|
/** What names a later round in the end-of-run turn's request id, before its number. */
|
|
20
21
|
const REFLECT_ROUND = ":round-";
|
|
22
|
+
/** What a round's re-ask or step adds to its request id (reflectRequestId): the round is the id without it. */
|
|
23
|
+
const REFLECT_STEP = /:(?:again|compile-\d+)$/;
|
|
21
24
|
/** Each round of the end-of-run turn in a run's journal, oldest first: each begins at the entry its input placed, from the
|
|
22
25
|
* input submissions under its request ids (its re-ask's within it); else, on a CLI harness, at the turn's prompt the CLI
|
|
23
26
|
* record wrote as it asked it (`entries`: adapter-loop.ts answering, an end-of-run-turn entry of the person's with its
|
|
@@ -29,7 +32,7 @@ export function reflectRanges(submissions, entries = []) {
|
|
|
29
32
|
const note = (requestId, entry) => {
|
|
30
33
|
if (!Number.isFinite(entry))
|
|
31
34
|
return;
|
|
32
|
-
const round = requestId.
|
|
35
|
+
const round = requestId.replace(REFLECT_STEP, "");
|
|
33
36
|
starts.set(round, Math.min(starts.get(round) ?? entry, entry));
|
|
34
37
|
};
|
|
35
38
|
for (const record of submissions) {
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { Grade } from "../learn/promote.js";
|
|
2
|
+
import type { RunPath } from "../learning-cost.js";
|
|
3
|
+
import { type Store } from "../store/store.js";
|
|
4
|
+
export declare const FEEDBACK_ROUNDS: readonly ["revise", "look_back"];
|
|
5
|
+
export type FeedbackRound = (typeof FEEDBACK_ROUNDS)[number];
|
|
6
|
+
/** The most characters a grade's words (`label`) may hold. */
|
|
7
|
+
export declare const LABEL_MAX = 4000;
|
|
8
|
+
/** A feedback round, as its steer's body carries it (`feedback`) and its FEEDBACK entry keeps it: the round, whether the
|
|
9
|
+
* grade said right, the workflow a revision is asked of, and the grade's words (`text`). */
|
|
10
|
+
export interface FeedbackData {
|
|
11
|
+
readonly round: FeedbackRound;
|
|
12
|
+
readonly correct: boolean;
|
|
13
|
+
readonly workflow?: string;
|
|
14
|
+
readonly text: string;
|
|
15
|
+
}
|
|
16
|
+
/** What a grade asks for: `revise` for a wrong grade of a run its learned workflow answered alone, `look_back` for a
|
|
17
|
+
* graded run the agent finished when the grade has words, else none (undefined). A replay run is never graded. */
|
|
18
|
+
export declare function feedbackRoundOf(grade: {
|
|
19
|
+
readonly correct: boolean;
|
|
20
|
+
readonly path: RunPath;
|
|
21
|
+
readonly workflow?: string;
|
|
22
|
+
}, label: string | undefined): FeedbackRound | undefined;
|
|
23
|
+
/** The grade's words as the round says them: its `label`, else, for a wrong grade, that it was wrong and the fields a
|
|
24
|
+
* right answer holds (`expected`). */
|
|
25
|
+
export declare function feedbackWords(correct: boolean, label: string | undefined, expected: Readonly<Record<string, unknown>> | undefined): string;
|
|
26
|
+
/** The feedback round a steer's body asks for (`body.feedback`, the server's own: server.ts gradeRun writes it, and the
|
|
27
|
+
* message API never does), else undefined. */
|
|
28
|
+
export declare function feedbackOf(body: unknown): FeedbackData | undefined;
|
|
29
|
+
/** The feedback round the run's root `entries` say its next end closes: its newest FEEDBACK entry when no end came after
|
|
30
|
+
* it, else undefined. */
|
|
31
|
+
export declare function pendingFeedbackOf(entries: readonly {
|
|
32
|
+
readonly kind: string;
|
|
33
|
+
readonly data?: unknown;
|
|
34
|
+
}[]): FeedbackData | undefined;
|
|
35
|
+
/** What the end-of-run turn of a feedback round is told before its prompt: for a run whose agent never took the job (its
|
|
36
|
+
* learned workflow answered alone, so its session saw nothing), the job and what the workflow answered first
|
|
37
|
+
* (`job`, `served`); then the grade and its words. The look-back keeps notes only: a revision's ask to give the workflow
|
|
38
|
+
* again changed is the compile turn's, after it (learning-end.ts compileAskOf reads the round, learn/compile.ts asks). */
|
|
39
|
+
export declare function feedbackAsk(feedback: FeedbackData, seen?: {
|
|
40
|
+
readonly job: string;
|
|
41
|
+
readonly served: {
|
|
42
|
+
readonly workflow: string;
|
|
43
|
+
readonly answer: string;
|
|
44
|
+
};
|
|
45
|
+
}): string;
|
|
46
|
+
/** Opens run `grade.run` again on the feedback round its grade asks for (feedbackRoundOf), with the grade's words
|
|
47
|
+
* (`label`, else feedbackWords'), and says which: only a run that learns (its launch's learning start, never one that
|
|
48
|
+
* only uses what was learned, nor a notes-only run's revision ask), neither archived nor of an archived agent (closed
|
|
49
|
+
* history: a grade of it starts no paid work), and one the store opens again (an agentic run that answered or that a
|
|
50
|
+
* person stopped). Null when the grade asks for nothing more, or the run can't be opened again (the grade is kept either
|
|
51
|
+
* way). */
|
|
52
|
+
export declare function openFeedbackRound(store: Pick<Store, "runs" | "agents">, grade: Grade, label: string | undefined): Promise<FeedbackRound | null>;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { readLaunchBody } from "../run-launch.js";
|
|
2
|
+
import { RunFinal } from "../store/store.js";
|
|
3
|
+
import { KINDS } from "./journal-kinds.js";
|
|
4
|
+
import { servedAnswerText } from "./workflow-first.js";
|
|
5
|
+
export const FEEDBACK_ROUNDS = ["revise", "look_back"];
|
|
6
|
+
/** The most characters a grade's words (`label`) may hold. */
|
|
7
|
+
export const LABEL_MAX = 4000;
|
|
8
|
+
/** What a grade asks for: `revise` for a wrong grade of a run its learned workflow answered alone, `look_back` for a
|
|
9
|
+
* graded run the agent finished when the grade has words, else none (undefined). A replay run is never graded. */
|
|
10
|
+
export function feedbackRoundOf(grade, label) {
|
|
11
|
+
if (grade.path === "workflow")
|
|
12
|
+
return !grade.correct && grade.workflow ? "revise" : undefined;
|
|
13
|
+
if (grade.path === "agent" || grade.path === "handed_back")
|
|
14
|
+
return label ? "look_back" : undefined;
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
/** The grade's words as the round says them: its `label`, else, for a wrong grade, that it was wrong and the fields a
|
|
18
|
+
* right answer holds (`expected`). */
|
|
19
|
+
export function feedbackWords(correct, label, expected) {
|
|
20
|
+
if (label?.trim())
|
|
21
|
+
return label.trim();
|
|
22
|
+
if (correct)
|
|
23
|
+
return "A reviewer graded this run's answer right.";
|
|
24
|
+
return `A reviewer graded this run's answer wrong.${expected ? ` A right answer holds: ${JSON.stringify(expected)}` : ""}`;
|
|
25
|
+
}
|
|
26
|
+
/** The feedback round a steer's body asks for (`body.feedback`, the server's own: server.ts gradeRun writes it, and the
|
|
27
|
+
* message API never does), else undefined. */
|
|
28
|
+
export function feedbackOf(body) {
|
|
29
|
+
const fed = body?.feedback;
|
|
30
|
+
const text = body?.text;
|
|
31
|
+
if (!fed || typeof fed !== "object" || !FEEDBACK_ROUNDS.includes(fed.round) || typeof fed.correct !== "boolean" || typeof text !== "string")
|
|
32
|
+
return undefined;
|
|
33
|
+
return { round: fed.round, correct: fed.correct, ...(typeof fed.workflow === "string" ? { workflow: fed.workflow } : {}), text };
|
|
34
|
+
}
|
|
35
|
+
/** The feedback round the run's root `entries` say its next end closes: its newest FEEDBACK entry when no end came after
|
|
36
|
+
* it, else undefined. */
|
|
37
|
+
export function pendingFeedbackOf(entries) {
|
|
38
|
+
const at = entries.findLastIndex((entry) => entry.kind === KINDS.feedback);
|
|
39
|
+
if (at < 0 || entries.slice(at + 1).some((entry) => entry.kind === KINDS.end))
|
|
40
|
+
return undefined;
|
|
41
|
+
return feedbackOf({ feedback: entries[at].data, text: entries[at].data?.text });
|
|
42
|
+
}
|
|
43
|
+
/** What the end-of-run turn of a feedback round is told before its prompt: for a run whose agent never took the job (its
|
|
44
|
+
* learned workflow answered alone, so its session saw nothing), the job and what the workflow answered first
|
|
45
|
+
* (`job`, `served`); then the grade and its words. The look-back keeps notes only: a revision's ask to give the workflow
|
|
46
|
+
* again changed is the compile turn's, after it (learning-end.ts compileAskOf reads the round, learn/compile.ts asks). */
|
|
47
|
+
export function feedbackAsk(feedback, seen) {
|
|
48
|
+
const graded = `A reviewer graded ${seen ? "that" : "this run's"} answer ${feedback.correct ? "right" : "wrong"}. What they said:`;
|
|
49
|
+
return [...(seen ? [seen.job, servedAnswerText(seen.served.workflow, seen.served.answer)] : []), graded, "", feedback.text].join("\n\n").replace(/\n{3,}/g, "\n\n");
|
|
50
|
+
}
|
|
51
|
+
/** Opens run `grade.run` again on the feedback round its grade asks for (feedbackRoundOf), with the grade's words
|
|
52
|
+
* (`label`, else feedbackWords'), and says which: only a run that learns (its launch's learning start, never one that
|
|
53
|
+
* only uses what was learned, nor a notes-only run's revision ask), neither archived nor of an archived agent (closed
|
|
54
|
+
* history: a grade of it starts no paid work), and one the store opens again (an agentic run that answered or that a
|
|
55
|
+
* person stopped). Null when the grade asks for nothing more, or the run can't be opened again (the grade is kept either
|
|
56
|
+
* way). */
|
|
57
|
+
export async function openFeedbackRound(store, grade, label) {
|
|
58
|
+
const words = label?.trim() ? label.trim() : undefined;
|
|
59
|
+
const round = feedbackRoundOf(grade, words);
|
|
60
|
+
if (!round)
|
|
61
|
+
return null;
|
|
62
|
+
const run = await store.runs.get(grade.run);
|
|
63
|
+
if (!run || run.archivedAt !== null || (await store.agents.get(run.agentId))?.archivedAt !== null)
|
|
64
|
+
return null;
|
|
65
|
+
const launched = await store.runs.launch(grade.run).catch(() => undefined);
|
|
66
|
+
const learning = launched ? readLaunchBody(launched.body)?.learning : undefined;
|
|
67
|
+
if (!learning || learning.use || (round === "revise" && learning.notesOnly))
|
|
68
|
+
return null;
|
|
69
|
+
const feedback = { round, correct: grade.correct, ...(round === "revise" && grade.workflow ? { workflow: grade.workflow } : {}) };
|
|
70
|
+
try {
|
|
71
|
+
await store.runs.reopen(grade.run, { kind: "steer", body: { text: feedbackWords(grade.correct, words, grade.expected), feedback } });
|
|
72
|
+
return round;
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
if (error instanceof RunFinal)
|
|
76
|
+
return null;
|
|
77
|
+
throw error;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -60,6 +60,11 @@ export declare const KINDS: {
|
|
|
60
60
|
* (adapter-loop.ts pauseFor), and a claim lost before that restores it from here (pendingPauseOf). No run patch, and
|
|
61
61
|
* neither a call nor a message, so the reader passes over it. */
|
|
62
62
|
readonly pausePending: "agentrun.pause.pending";
|
|
63
|
+
/** On the run's model session (resume log, never read as a call or a message): the session's recent requests as the
|
|
64
|
+
* cap's expected pricing reads them (the kernel's RecentRequest list, recentAfter), written each time one answers.
|
|
65
|
+
* A later claim or pass starts from the newest record, so its first request reads the cache a recent answer left warm
|
|
66
|
+
* when it ended under CACHE_WARM_MS ago by the cap's clock, and uncached after that (adapter-loop.ts recentIn). */
|
|
67
|
+
readonly capRecent: "agentrun.cap.recent";
|
|
63
68
|
/** A workflow call node's effect, as it starts and as it ends (pause.ts NodeLine: its path, item, tool, label, input,
|
|
64
69
|
* then its status and output or error), on the run's node-log session (NODE_LOG_SESSION): the run's graph lists its
|
|
65
70
|
* effects from these. Written as the effect runs, never for one the driver answers from its receipt. */
|
|
@@ -69,10 +74,20 @@ export declare const KINDS: {
|
|
|
69
74
|
* same submission pi's adapter writes, so the step reads both alike. Neither a call nor a message: the reader passes
|
|
70
75
|
* over it, and the turn is never on the run's visible record. */
|
|
71
76
|
readonly endOfRunTurn: "agentrun.end-of-run.turn";
|
|
77
|
+
/** What an end-of-run turn kept as it was first asked (its `keep`, by its `requestId`), for a harness that keeps its own
|
|
78
|
+
* record (pi; a CLI's record keeps it on its endOfRunTurn prompt): written once, before the turn's first request, so a
|
|
79
|
+
* later claim that asks the same turn again reads the first ask's (the commit of main a compile turn was asked at among
|
|
80
|
+
* them), never its own. Neither a call nor a message: the reader passes over it. */
|
|
81
|
+
readonly endOfRunKept: "agentrun.end-of-run.kept";
|
|
72
82
|
/** What a learning run's claim laid of its seed: the learned skills it was given (`skills`, by name) and the learned
|
|
73
83
|
* workflows its learned_workflow tool runs (`workflows`, by name). Written once per claim, on the root; the newest is
|
|
74
84
|
* what the run was given. Neither a call nor a message. */
|
|
75
85
|
readonly learningLaid: "agentrun.learning.laid";
|
|
86
|
+
/** A grade's feedback round (runner/feedback-round.ts): the run opened again on a grade's words, asked no turn of the
|
|
87
|
+
* job's; its next end's end-of-run turn reads them (`text`, the `round`, whether the grade said right, the workflow a
|
|
88
|
+
* revision is asked of). Written on the root by the commit that takes the round's steer row. Neither a call nor a
|
|
89
|
+
* message: pi never reads it, and the Timeline shows its words as the reviewer's. */
|
|
90
|
+
readonly feedback: "agentrun.feedback";
|
|
76
91
|
/** A workflow run's model node's execution, as the runner kept it before running it (workflow-spec.ts onModelNode):
|
|
77
92
|
* `{ path, tier?, model }`, its execution path, the tier it asked for (absent for none) and the model id the run's route
|
|
78
93
|
* sent it to. On the node log (NODE_LOG_SESSION), for GET /runs/{id}/graph's nodes' `model` (graph-view.ts). Neither a
|
|
@@ -173,12 +188,13 @@ export interface CallStartData {
|
|
|
173
188
|
readonly input: unknown;
|
|
174
189
|
/** May run again after a crash (it changes nothing outside the run): the tool registry's own flag. */
|
|
175
190
|
readonly replaySafe: boolean;
|
|
176
|
-
/** Written as
|
|
177
|
-
*
|
|
191
|
+
/** Written as its CLI's tool bridge's gate asked about it (adapter-loop.ts bridgeGate), before any answer: nothing is sent
|
|
192
|
+
* until its agentrun.call.sent mark (KINDS.callSent). The bridge holds the call and hands the CLI nothing while it waits,
|
|
193
|
+
* so no waiting result shows for it, as on pi. */
|
|
178
194
|
readonly parked?: true;
|
|
179
|
-
/**
|
|
180
|
-
*
|
|
181
|
-
readonly
|
|
195
|
+
/** A tool that only nests calls (tools_call, codemode; HostTool.nests): its calls start after it, each its own, and it
|
|
196
|
+
* runs again whole after a crash, so a start a crash left open is never ended interrupted (adapter-loop.ts). */
|
|
197
|
+
readonly nests?: true;
|
|
182
198
|
/** The harness's working directory (a CLI's), which an absolute path in `input` is built from: the run's rows name a
|
|
183
199
|
* path under it by its name in the workspace (store-reads/journal.ts runTimeline). */
|
|
184
200
|
readonly cwd?: string;
|
|
@@ -232,8 +248,10 @@ export interface AskData {
|
|
|
232
248
|
readonly args?: unknown;
|
|
233
249
|
/** When it was asked (ISO), from the loop's clock; a re-ask on a resume keeps the first. */
|
|
234
250
|
readonly requestedAt?: string;
|
|
235
|
-
/** Its approval price (the spec's
|
|
251
|
+
/** Its approval price (a catalog tool's, the spec's mcp priceOf); null when it has none. */
|
|
236
252
|
readonly price?: ApprovalPrice | null;
|
|
253
|
+
/** An MCP tool its run's pin marks destructive (tool-gate.ts toolEffect): an allow of it needs confirm_destructive. */
|
|
254
|
+
readonly destructive?: true;
|
|
237
255
|
}
|
|
238
256
|
/** How an ask was answered: approved, denied, withdrawn (a stop while the call waited) or canceled (a cancel). */
|
|
239
257
|
export type AnswerDecision = "allow" | "deny" | "withdrawn" | "canceled";
|
|
@@ -60,6 +60,11 @@ export const KINDS = {
|
|
|
60
60
|
* (adapter-loop.ts pauseFor), and a claim lost before that restores it from here (pendingPauseOf). No run patch, and
|
|
61
61
|
* neither a call nor a message, so the reader passes over it. */
|
|
62
62
|
pausePending: "agentrun.pause.pending",
|
|
63
|
+
/** On the run's model session (resume log, never read as a call or a message): the session's recent requests as the
|
|
64
|
+
* cap's expected pricing reads them (the kernel's RecentRequest list, recentAfter), written each time one answers.
|
|
65
|
+
* A later claim or pass starts from the newest record, so its first request reads the cache a recent answer left warm
|
|
66
|
+
* when it ended under CACHE_WARM_MS ago by the cap's clock, and uncached after that (adapter-loop.ts recentIn). */
|
|
67
|
+
capRecent: "agentrun.cap.recent",
|
|
63
68
|
/** A workflow call node's effect, as it starts and as it ends (pause.ts NodeLine: its path, item, tool, label, input,
|
|
64
69
|
* then its status and output or error), on the run's node-log session (NODE_LOG_SESSION): the run's graph lists its
|
|
65
70
|
* effects from these. Written as the effect runs, never for one the driver answers from its receipt. */
|
|
@@ -69,10 +74,20 @@ export const KINDS = {
|
|
|
69
74
|
* same submission pi's adapter writes, so the step reads both alike. Neither a call nor a message: the reader passes
|
|
70
75
|
* over it, and the turn is never on the run's visible record. */
|
|
71
76
|
endOfRunTurn: "agentrun.end-of-run.turn",
|
|
77
|
+
/** What an end-of-run turn kept as it was first asked (its `keep`, by its `requestId`), for a harness that keeps its own
|
|
78
|
+
* record (pi; a CLI's record keeps it on its endOfRunTurn prompt): written once, before the turn's first request, so a
|
|
79
|
+
* later claim that asks the same turn again reads the first ask's (the commit of main a compile turn was asked at among
|
|
80
|
+
* them), never its own. Neither a call nor a message: the reader passes over it. */
|
|
81
|
+
endOfRunKept: "agentrun.end-of-run.kept",
|
|
72
82
|
/** What a learning run's claim laid of its seed: the learned skills it was given (`skills`, by name) and the learned
|
|
73
83
|
* workflows its learned_workflow tool runs (`workflows`, by name). Written once per claim, on the root; the newest is
|
|
74
84
|
* what the run was given. Neither a call nor a message. */
|
|
75
85
|
learningLaid: "agentrun.learning.laid",
|
|
86
|
+
/** A grade's feedback round (runner/feedback-round.ts): the run opened again on a grade's words, asked no turn of the
|
|
87
|
+
* job's; its next end's end-of-run turn reads them (`text`, the `round`, whether the grade said right, the workflow a
|
|
88
|
+
* revision is asked of). Written on the root by the commit that takes the round's steer row. Neither a call nor a
|
|
89
|
+
* message: pi never reads it, and the Timeline shows its words as the reviewer's. */
|
|
90
|
+
feedback: "agentrun.feedback",
|
|
76
91
|
/** A workflow run's model node's execution, as the runner kept it before running it (workflow-spec.ts onModelNode):
|
|
77
92
|
* `{ path, tier?, model }`, its execution path, the tier it asked for (absent for none) and the model id the run's route
|
|
78
93
|
* sent it to. On the node log (NODE_LOG_SESSION), for GET /runs/{id}/graph's nodes' `model` (graph-view.ts). Neither a
|