@parcha/agentrun-serve 0.1.0-beta.33 → 0.1.0-beta.35
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 +368 -0
- package/README.md +341 -208
- package/dist/adapters.d.ts +3 -4
- package/dist/adapters.js +18 -15
- package/dist/agent-rows.d.ts +99 -0
- package/dist/agent-rows.js +1 -0
- package/dist/agents-store.d.ts +6 -2
- package/dist/agents-store.js +75 -25
- package/dist/agents.d.ts +9 -125
- package/dist/agents.js +15 -305
- package/dist/answer-json.d.ts +23 -0
- package/dist/answer-json.js +58 -0
- package/dist/api-only.d.ts +1 -1
- package/dist/api-only.js +2 -2
- package/dist/archil-settings.d.ts +11 -1
- package/dist/archil-settings.js +10 -0
- package/dist/bash-read-only.d.ts +35 -0
- package/dist/bash-read-only.js +778 -0
- package/dist/box-settings.d.ts +3 -23
- package/dist/box-settings.js +7 -51
- package/dist/boxes.d.ts +17 -0
- package/dist/boxes.js +27 -20
- package/dist/browser-commands.d.ts +5 -2
- package/dist/browser-commands.js +4 -4
- package/dist/browser-computer.d.ts +5 -0
- package/dist/browser-computer.js +21 -0
- package/dist/browser-cost.d.ts +9 -6
- package/dist/browser-cost.js +95 -51
- package/dist/browser-live.d.ts +7 -20
- package/dist/browser-live.js +15 -93
- package/dist/browser-person.d.ts +18 -51
- package/dist/browser-person.js +94 -277
- package/dist/budget.d.ts +0 -5
- package/dist/budget.js +0 -5
- package/dist/cap.d.ts +14 -8
- package/dist/cap.js +19 -9
- package/dist/cli.js +71 -18
- package/dist/closed-pipes.d.ts +2 -0
- package/dist/closed-pipes.js +13 -0
- package/dist/computer-commands.d.ts +2 -0
- package/dist/computer-commands.js +2 -0
- package/dist/computer-keys.d.ts +20 -10
- package/dist/computer-keys.js +36 -54
- package/dist/computer-setting.d.ts +20 -3
- package/dist/computer-setting.js +58 -10
- package/dist/computers.d.ts +35 -2
- package/dist/computers.js +72 -11
- package/dist/confine.d.ts +120 -0
- package/dist/confine.js +436 -0
- package/dist/console/assets/index-B7NKTU8E.css +1 -0
- package/dist/console/assets/index-CXZMgJE7.js +550 -0
- package/dist/console/index.html +2 -2
- package/dist/content-filter.d.ts +7 -0
- package/dist/content-filter.js +23 -0
- package/dist/decision-cap.d.ts +7 -29
- package/dist/decision-cap.js +3 -94
- package/dist/decision-rows.d.ts +1 -1
- package/dist/decision-rows.js +1 -1
- package/dist/docker-daemon.d.ts +31 -0
- package/dist/docker-daemon.js +56 -0
- package/dist/effort-guidance.js +4 -3
- package/dist/environment.d.ts +0 -3
- package/dist/environment.js +3 -5
- package/dist/errors.d.ts +1 -2
- package/dist/errors.js +9 -9
- package/dist/explain.js +3 -1
- package/dist/filed-answer.d.ts +32 -0
- package/dist/filed-answer.js +160 -0
- package/dist/files.d.ts +1 -3
- package/dist/files.js +2 -4
- package/dist/github-connection.d.ts +1 -1
- package/dist/github-connection.js +25 -7
- package/dist/github-faux.d.ts +26 -0
- package/dist/github-faux.js +76 -0
- package/dist/github.d.ts +6 -2
- package/dist/github.js +5 -3
- package/dist/graph-served.d.ts +5 -3
- package/dist/graph-served.js +14 -6
- package/dist/graph-view.d.ts +3 -5
- package/dist/graph-view.js +9 -16
- package/dist/handed-values.d.ts +9 -0
- package/dist/handed-values.js +26 -0
- package/dist/harness-install.d.ts +1 -7
- package/dist/harness-install.js +1 -18
- package/dist/harness-opencode/adapter.d.ts +7 -0
- package/dist/harness-opencode/adapter.js +23 -6
- package/dist/harness-opencode/harness.js +0 -1
- package/dist/harness-opencode/host/policy.js +2 -2
- package/dist/harness-opencode/index.d.ts +1 -1
- package/dist/harness-opencode/index.js +1 -1
- package/dist/harness-opencode/verify.d.ts +17 -0
- package/dist/harness-opencode/verify.js +30 -10
- package/dist/harness-table.js +6 -1
- package/dist/heard.js +1 -1
- package/dist/held-fd.d.ts +5 -0
- package/dist/held-fd.js +14 -0
- package/dist/host-calls.d.ts +20 -0
- package/dist/host-calls.js +12 -0
- package/dist/host-tools.d.ts +4 -21
- package/dist/host-tools.js +4 -61
- package/dist/host.d.ts +2 -4
- package/dist/host.js +2 -7
- package/dist/import-summary.d.ts +1 -5
- package/dist/import-summary.js +0 -21
- package/dist/import.d.ts +6 -6
- package/dist/import.js +14 -15
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/key-refusal.d.ts +5 -1
- package/dist/key-refusal.js +19 -4
- package/dist/learn/check.d.ts +8 -2
- package/dist/learn/check.js +85 -31
- package/dist/learn/folder.d.ts +11 -4
- package/dist/learn/folder.js +17 -19
- package/dist/learn/grade.d.ts +18 -1
- package/dist/learn/grade.js +108 -14
- package/dist/learn/index.d.ts +5 -5
- package/dist/learn/index.js +5 -5
- package/dist/learn/learning.sh +1 -14
- package/dist/learn/notes.d.ts +14 -3
- package/dist/learn/notes.js +16 -6
- package/dist/learn/reflect.d.ts +31 -2
- package/dist/learn/reflect.js +83 -6
- package/dist/learn/relevance.d.ts +24 -0
- package/dist/learn/relevance.js +91 -0
- package/dist/learn/secrets.d.ts +7 -1
- package/dist/learn/secrets.js +86 -19
- package/dist/learn/skills.d.ts +159 -18
- package/dist/learn/skills.js +644 -64
- package/dist/learned-nodes.d.ts +14 -0
- package/dist/learned-nodes.js +8 -0
- package/dist/learned-workflow.d.ts +41 -6
- package/dist/learned-workflow.js +153 -18
- package/dist/learning-routes.d.ts +49 -4
- package/dist/learning-routes.js +113 -31
- package/dist/learning-run.d.ts +16 -31
- package/dist/learning-run.js +31 -38
- package/dist/learning-words.d.ts +12 -5
- package/dist/learning-words.js +18 -9
- package/dist/learning.d.ts +91 -97
- package/dist/learning.js +176 -320
- package/dist/live/stream.js +1 -1
- package/dist/live/translate.js +12 -2
- package/dist/llm.d.ts +4 -1
- package/dist/llm.js +4 -2
- package/dist/local-models.d.ts +11 -5
- package/dist/local-models.js +13 -8
- package/dist/mcp-gateway.d.ts +17 -49
- package/dist/mcp-gateway.js +55 -136
- package/dist/mcp-oauth.d.ts +10 -14
- package/dist/mcp-oauth.js +14 -32
- package/dist/mcp-probe.d.ts +0 -7
- package/dist/mcp-probe.js +4 -10
- package/dist/mcp-servers-store.d.ts +18 -18
- package/dist/mcp-servers-store.js +12 -14
- package/dist/mcp-store.js +3 -4
- package/dist/mcp.js +4 -3
- package/dist/model.d.ts +9 -7
- package/dist/model.js +51 -27
- package/dist/monid.d.ts +0 -2
- package/dist/monid.js +3 -6
- package/dist/openapi.d.ts +8 -1
- package/dist/openapi.js +156 -58
- package/dist/page.d.ts +1 -3
- package/dist/page.js +6 -18
- package/dist/paid-calls.d.ts +21 -27
- package/dist/paid-calls.js +26 -61
- package/dist/pause.d.ts +2 -19
- package/dist/pause.js +5 -74
- package/dist/port-models.d.ts +10 -3
- package/dist/port-models.js +26 -6
- package/dist/propose.d.ts +2 -0
- package/dist/propose.js +80 -45
- package/dist/push-handler.d.ts +1 -1
- package/dist/reflect-range.d.ts +25 -0
- package/dist/reflect-range.js +30 -0
- package/dist/refusal-words.d.ts +5 -1
- package/dist/refusal-words.js +5 -1
- package/dist/rows.d.ts +1 -1
- package/dist/run-cut.d.ts +0 -6
- package/dist/run-cut.js +0 -6
- package/dist/run-db.d.ts +2 -11
- package/dist/run-db.js +2 -37
- package/dist/run-launch.d.ts +21 -2
- package/dist/run-launch.js +14 -5
- package/dist/run-learning-served.d.ts +21 -4
- package/dist/run-learning-served.js +23 -13
- package/dist/run-reads-over-store.d.ts +5 -3
- package/dist/run-reads-over-store.js +25 -14
- package/dist/run-secrets.d.ts +1 -1
- package/dist/run-timeline-served.d.ts +5 -1
- package/dist/run-timeline-served.js +27 -6
- package/dist/run-view.d.ts +37 -22
- package/dist/run-view.js +85 -38
- package/dist/runnable.d.ts +21 -10
- package/dist/runnable.js +35 -12
- package/dist/runner/adapter-loop.d.ts +36 -5
- package/dist/runner/adapter-loop.js +663 -69
- package/dist/runner/adapter-run-spec.d.ts +42 -8
- package/dist/runner/adapter-run-spec.js +186 -52
- package/dist/runner/adapters/index.js +11 -1
- package/dist/runner/adapters/pi.d.ts +40 -2
- package/dist/runner/adapters/pi.js +110 -27
- package/dist/runner/beside.d.ts +38 -3
- package/dist/runner/beside.js +54 -5
- package/dist/runner/claim-secrets.d.ts +16 -1
- package/dist/runner/claim-secrets.js +62 -14
- package/dist/runner/cli-run-spec.d.ts +5 -0
- package/dist/runner/cli-run-spec.js +159 -41
- package/dist/runner/commands.js +1 -1
- package/dist/runner/computer-journal.d.ts +15 -2
- package/dist/runner/computer-journal.js +41 -5
- package/dist/runner/conformance/harness.d.ts +1 -0
- package/dist/runner/conformance/harness.js +123 -13
- package/dist/runner/conformance/subject.d.ts +4 -1
- package/dist/runner/dispatch.d.ts +8 -1
- package/dist/runner/dispatch.js +81 -7
- package/dist/runner/end-of-run.d.ts +8 -2
- package/dist/runner/end-of-run.js +10 -4
- package/dist/runner/github-app.d.ts +7 -2
- package/dist/runner/github-app.js +47 -16
- package/dist/runner/harness-loops.d.ts +15 -2
- package/dist/runner/harness-loops.js +38 -2
- package/dist/runner/journal-kinds.d.ts +60 -6
- package/dist/runner/journal-kinds.js +43 -5
- package/dist/runner/journal-reader.d.ts +1 -1
- package/dist/runner/journal-reader.js +2 -2
- package/dist/runner/learning-ask.d.ts +4 -0
- package/dist/runner/learning-ask.js +15 -1
- package/dist/runner/learning-end.d.ts +18 -3
- package/dist/runner/learning-end.js +194 -20
- package/dist/runner/learning-loop.d.ts +7 -0
- package/dist/runner/learning-loop.js +36 -8
- package/dist/runner/learning-seed.d.ts +6 -0
- package/dist/runner/learning-seed.js +6 -0
- package/dist/runner/loop-contract.d.ts +4 -0
- package/dist/runner/main.d.ts +61 -9
- package/dist/runner/main.js +144 -20
- package/dist/runner/mcp-claim.d.ts +3 -0
- package/dist/runner/mcp-claim.js +7 -3
- package/dist/runner/mcp-github.d.ts +11 -2
- package/dist/runner/mcp-github.js +55 -4
- package/dist/runner/mcp-run.d.ts +2 -0
- package/dist/runner/mcp-run.js +16 -5
- package/dist/runner/memory-claim.d.ts +9 -0
- package/dist/runner/memory-claim.js +25 -0
- package/dist/runner/metrics.d.ts +46 -1
- package/dist/runner/metrics.js +156 -1
- package/dist/runner/model-route.d.ts +16 -0
- package/dist/runner/model-route.js +134 -10
- package/dist/runner/reflect-hook.d.ts +12 -1
- package/dist/runner/reflect-hook.js +33 -3
- package/dist/runner/runner.d.ts +20 -0
- package/dist/runner/runner.js +146 -18
- package/dist/runner/spec-holds.d.ts +7 -2
- package/dist/runner/spec-holds.js +4 -3
- package/dist/runner/store-port.d.ts +1 -1
- package/dist/runner/store-secrets.d.ts +3 -3
- package/dist/runner/store-secrets.js +8 -12
- package/dist/runner/text-tools.d.ts +44 -0
- package/dist/runner/text-tools.js +237 -0
- package/dist/runner/workflow-host.d.ts +7 -2
- package/dist/runner/workflow-host.js +3 -1
- package/dist/runner/workflow-loop.d.ts +10 -1
- package/dist/runner/workflow-loop.js +14 -6
- package/dist/runner/workflow-spec.d.ts +21 -0
- package/dist/runner/workflow-spec.js +217 -93
- package/dist/runs-over-store.d.ts +14 -3
- package/dist/runs-over-store.js +100 -23
- package/dist/seal-key.d.ts +0 -2
- package/dist/seal-key.js +5 -45
- package/dist/sealed-settings-store.d.ts +19 -4
- package/dist/sealed-settings-store.js +9 -9
- package/dist/sealing.d.ts +4 -0
- package/dist/sealing.js +20 -0
- package/dist/secret-cut.d.ts +1 -1
- package/dist/secret-cut.js +1 -1
- package/dist/secret-name.d.ts +9 -0
- package/dist/secret-name.js +15 -0
- package/dist/secret-writes.d.ts +0 -1
- package/dist/secret-writes.js +0 -1
- package/dist/server-fs.d.ts +4 -0
- package/dist/server-fs.js +8 -2
- package/dist/server-lock.d.ts +0 -24
- package/dist/server-lock.js +5 -85
- package/dist/server-secrets-store.d.ts +4 -4
- package/dist/server-secrets-store.js +9 -31
- package/dist/server-secrets.d.ts +4 -9
- package/dist/server-secrets.js +12 -36
- package/dist/server.d.ts +37 -56
- package/dist/server.js +322 -134
- package/dist/sign-ins-store.d.ts +34 -36
- package/dist/sign-ins-store.js +27 -38
- package/dist/sign-ins.d.ts +2 -119
- package/dist/sign-ins.js +5 -311
- package/dist/standard-webhooks.d.ts +1 -1
- package/dist/standard-webhooks.js +1 -1
- package/dist/stats.d.ts +3 -2
- package/dist/stats.js +1 -1
- package/dist/stop-signals.d.ts +4 -2
- package/dist/stop-signals.js +5 -3
- package/dist/store/agent-body.d.ts +12 -2
- package/dist/store/agent-body.js +22 -4
- package/dist/store/deadline.d.ts +18 -0
- package/dist/store/deadline.js +45 -0
- package/dist/store/index.d.ts +2 -2
- package/dist/store/index.js +2 -2
- package/dist/store/open.d.ts +6 -3
- package/dist/store/open.js +2 -2
- package/dist/store/postgres/connection.d.ts +22 -2
- package/dist/store/postgres/connection.js +211 -41
- package/dist/store/postgres/migrate.d.ts +4 -0
- package/dist/store/postgres/migrate.js +9 -2
- package/dist/store/postgres/migrations/0003_commands_one_answer.check.sql +19 -0
- package/dist/store/postgres/migrations/0003_commands_one_answer.sql +13 -0
- package/dist/store/postgres/store.d.ts +9 -2
- package/dist/store/postgres/store.js +9 -0
- package/dist/store/schema.js +1 -1
- package/dist/store/seal.js +2 -2
- package/dist/store/sqlite/connection.js +14 -5
- package/dist/store/sqlite/run-patch.d.ts +3 -0
- package/dist/store/sqlite/run-patch.js +3 -0
- package/dist/store/sqlite/store.js +41 -12
- package/dist/store/store.d.ts +35 -6
- package/dist/store/store.js +12 -2
- package/dist/store-reads/cap.d.ts +1 -1
- package/dist/store-reads/cap.js +22 -4
- package/dist/store-reads/journal.d.ts +9 -6
- package/dist/store-reads/journal.js +129 -18
- package/dist/store-reads/learning.d.ts +82 -8
- package/dist/store-reads/learning.js +184 -11
- package/dist/store-reads/workflow.d.ts +1 -1
- package/dist/store-reads/workflow.js +1 -1
- package/dist/store-view.d.ts +19 -1
- package/dist/store-view.js +95 -27
- package/dist/template-eval.d.ts +60 -4
- package/dist/template-eval.js +120 -54
- package/dist/templates.d.ts +33 -14
- package/dist/templates.js +82 -46
- package/dist/timeline/group.d.ts +33 -0
- package/dist/timeline/group.js +77 -0
- package/dist/timeline/index.d.ts +7 -0
- package/dist/timeline/index.js +7 -0
- package/dist/timeline/labels.d.ts +79 -0
- package/dist/timeline/labels.js +150 -0
- package/dist/timeline/origin.d.ts +56 -0
- package/dist/timeline/origin.js +92 -0
- package/dist/timeline/render-text.d.ts +11 -0
- package/dist/timeline/render-text.js +62 -0
- package/dist/timeline/timeline.d.ts +282 -0
- package/dist/timeline/timeline.js +1308 -0
- package/dist/timeline/util.d.ts +17 -0
- package/dist/timeline/util.js +49 -0
- package/dist/tool-budget.d.ts +18 -0
- package/dist/tool-budget.js +50 -0
- package/dist/tool-gate.d.ts +47 -218
- package/dist/tool-gate.js +87 -545
- package/dist/tool-keys-store.d.ts +11 -12
- package/dist/tool-keys-store.js +24 -31
- package/dist/tool-keys.d.ts +5 -101
- package/dist/tool-keys.js +8 -267
- package/dist/tool-plane.d.ts +23 -52
- package/dist/tool-plane.js +23 -81
- package/dist/tool-settings-store.d.ts +1 -2
- package/dist/tool-settings-store.js +5 -8
- package/dist/tools.d.ts +67 -25
- package/dist/tools.js +170 -119
- package/dist/trigger-adapter.d.ts +2 -2
- package/dist/trigger-targets.d.ts +13 -1
- package/dist/trigger-targets.js +31 -1
- package/dist/triggers.d.ts +2 -2
- package/dist/triggers.js +3 -3
- package/dist/turn-end.d.ts +1 -1
- package/dist/turn-end.js +1 -1
- package/dist/turns.d.ts +0 -6
- package/dist/turns.js +0 -19
- package/dist/uploads.d.ts +28 -5
- package/dist/uploads.js +83 -10
- package/dist/usage.d.ts +1 -49
- package/dist/usage.js +3 -84
- package/dist/validate.d.ts +4 -0
- package/dist/validate.js +33 -14
- package/dist/webhooks.d.ts +102 -76
- package/dist/webhooks.js +266 -233
- package/dist/workflow-run.d.ts +114 -0
- package/dist/workflow-run.js +144 -0
- package/dist/workspace/archil-claim.d.ts +2 -2
- package/dist/workspace/archil-claim.js +4 -3
- package/dist/workspace/archil-disk.d.ts +10 -1
- package/dist/workspace/archil-disk.js +4 -0
- package/dist/workspace/archil-exec.d.ts +12 -2
- package/dist/workspace/archil-exec.js +16 -0
- package/dist/workspace/archil.d.ts +2 -2
- package/dist/workspace/archil.js +25 -5
- package/dist/workspace/attach.js +2 -0
- package/dist/workspace/beneath.d.ts +19 -0
- package/dist/workspace/beneath.js +106 -0
- package/dist/workspace/computer-deps.d.ts +26 -9
- package/dist/workspace/computer-deps.js +144 -43
- package/dist/workspace/computer-for-claim.d.ts +17 -14
- package/dist/workspace/computer-for-claim.js +99 -26
- package/dist/workspace/computer-hold.d.ts +6 -1
- package/dist/workspace/computer-hold.js +6 -1
- package/dist/workspace/computer-janitor.d.ts +47 -0
- package/dist/workspace/computer-janitor.js +182 -0
- package/dist/workspace/computer-ledger.d.ts +1 -8
- package/dist/workspace/computer-ledger.js +0 -3
- package/dist/workspace/computer-providers.d.ts +5 -3
- package/dist/workspace/computer-providers.js +11 -9
- package/dist/workspace/grep-worker.d.ts +5 -0
- package/dist/workspace/grep-worker.js +9 -6
- package/dist/workspace/hands.d.ts +5 -2
- package/dist/workspace/hands.js +4 -3
- package/dist/workspace/index.d.ts +6 -5
- package/dist/workspace/index.js +4 -4
- package/dist/workspace/local.d.ts +14 -2
- package/dist/workspace/local.js +170 -43
- package/dist/workspace/paths.js +3 -2
- package/dist/workspace/pi-env.d.ts +4 -0
- package/dist/workspace/pi-env.js +3 -2
- package/dist/workspace/resolve-computer.d.ts +55 -10
- package/dist/workspace/resolve-computer.js +66 -14
- package/dist/workspace/run-tools.d.ts +15 -31
- package/dist/workspace/run-tools.js +19 -30
- package/dist/workspace/workspace.d.ts +5 -0
- package/dist/workspace-paths.d.ts +0 -17
- package/dist/workspace-paths.js +1 -41
- package/dist/workspace.d.ts +0 -17
- package/dist/workspace.js +4 -110
- package/package.json +14 -14
- package/skills/agentrun-serve/SKILL.md +1 -1
- package/templates/README.md +11 -5
- package/templates/code-review/evals/mentions-defused/case.yaml +15 -0
- package/templates/code-review/evals/mentions-defused/fixtures/github-mcp.json +254 -0
- package/templates/code-review/evals/mentions-defused/graders/no-pings.md +16 -0
- package/templates/code-review/evals/mentions-defused/graders/posted-a-review.md +5 -0
- package/templates/code-review/evals/mentions-defused/graders/schema.md +5 -0
- package/templates/code-review/evals/mentions-defused/prompt.md +10 -0
- package/templates/kyb/evals/clean-public-company/graders/no-opensanctions.md +5 -0
- package/templates/kyb/evals/opensanctions-on/case.yaml +5 -0
- package/templates/kyb/evals/opensanctions-on/graders/licence-and-evidence.md +18 -0
- package/templates/kyb/evals/opensanctions-on/graders/schema.md +5 -0
- package/templates/kyb/evals/opensanctions-on/prompt.md +11 -0
- package/templates/market-monitor/agent.md +2 -2
- package/templates/market-monitor/skills/monitor/SKILL.md +6 -4
- package/templates/release-notes/agent.md +11 -0
- package/dist/bound-files.d.ts +0 -4
- package/dist/bound-files.js +0 -164
- package/dist/coding-tools.d.ts +0 -47
- package/dist/coding-tools.js +0 -189
- package/dist/computer-adb.d.ts +0 -12
- package/dist/computer-adb.js +0 -14
- package/dist/console/assets/index-Dn0ngwG9.js +0 -535
- package/dist/console/assets/index-DvW6Aled.css +0 -1
- package/dist/grade.d.ts +0 -63
- package/dist/grade.js +0 -150
- package/dist/mcp-servers.d.ts +0 -269
- package/dist/mcp-servers.js +0 -456
- package/dist/packs.d.ts +0 -71
- package/dist/packs.js +0 -180
- package/dist/sealed-settings.d.ts +0 -60
- package/dist/sealed-settings.js +0 -171
- package/dist/sessions.d.ts +0 -6
- package/dist/sessions.js +0 -109
- package/dist/workspace/computer-serves.d.ts +0 -12
- package/dist/workspace/computer-serves.js +0 -15
|
@@ -19,8 +19,8 @@ import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
|
|
|
19
19
|
import { dropPostgresSchema, openPostgresStore, openStore, RunFinal, StoreConstraint, storeTarget } from "../../store/index.js";
|
|
20
20
|
import { sendCommand } from "../commands.js";
|
|
21
21
|
import { callsOf, journalRecords, messagesOf } from "../journal-reader.js";
|
|
22
|
-
import { KINDS } from "../journal-kinds.js";
|
|
23
|
-
import { timelineReducer } from "
|
|
22
|
+
import { KINDS, MESSAGE_SENT_AGAIN } from "../journal-kinds.js";
|
|
23
|
+
import { timelineReducer } from "../../timeline/index.js";
|
|
24
24
|
import { emptyState, translate } from "../../live/translate.js";
|
|
25
25
|
/** The one row a person's stop gives on the live timeline (live/translate.ts STOPPED_BY_YOU), the same on every harness. */
|
|
26
26
|
const STOPPED_BY_YOU = "Stopped by you";
|
|
@@ -119,19 +119,16 @@ function crashAt(point, holder) {
|
|
|
119
119
|
return {
|
|
120
120
|
beforeIntent: async () => (point === "beforeIntent" ? crash() : undefined),
|
|
121
121
|
beforeResult: async () => (point === "beforeResult" ? crash() : undefined),
|
|
122
|
+
afterMessageSent: async () => (point === "afterMessageSent" ? crash() : undefined),
|
|
122
123
|
};
|
|
123
124
|
}
|
|
124
125
|
/** The Postgres store each registered subject's worlds open (registerHarnessConformance's `storeUrl`), by the subject
|
|
125
126
|
* object the suite's cases are handed: none for the data directory's SQLite store. */
|
|
126
127
|
const STORE_URLS = new WeakMap();
|
|
127
|
-
/** Cases a Postgres store can't pass yet, each with what it waits on: they run on SQLite and are skipped on Postgres.
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
};
|
|
128
|
+
/** Cases a Postgres store can't pass yet, each with what it waits on: they run on SQLite and are skipped on Postgres. None
|
|
129
|
+
* today. */
|
|
130
|
+
const POSTGRES_PENDING = {};
|
|
131
131
|
/** A store in a data directory of its own, one queued run, and runners started on it (each its own connection). */
|
|
132
|
-
/** The suite's short lease, for the crash cases: a crashed runner's claim must run out for the second runner to take
|
|
133
|
-
* the run over. */
|
|
134
|
-
const TAKEOVER = {};
|
|
135
132
|
/** The stores' clock skew a runner process reads (child.ts): the file holds the milliseconds the clock moved, so the
|
|
136
133
|
* process's store moves with the case's (runOut). */
|
|
137
134
|
export const storeClockOf = (file) => {
|
|
@@ -630,6 +627,88 @@ const CASES = [
|
|
|
630
627
|
assert.ok((await w.commandRow(steer.id)).takenAt !== null, "the steer row is taken");
|
|
631
628
|
},
|
|
632
629
|
},
|
|
630
|
+
{
|
|
631
|
+
id: "message-mid-turn-kept",
|
|
632
|
+
title: "messages sent mid-turn are never dropped: each is taken, in order, and the model answers each",
|
|
633
|
+
async body(subject, t) {
|
|
634
|
+
const w = await world(subject, t);
|
|
635
|
+
const { tools, letSlowGo, slowStarted } = suiteTools();
|
|
636
|
+
// A harness that steers places a message in the turn in flight (steer-mid-turn); one that does not (a CLI's: its
|
|
637
|
+
// adapter's facts say steer false) sends each as a turn of its own once the turn ends, in the order they came. Either
|
|
638
|
+
// way the model reads it, and its row is taken, never refused after the API accepted it (#2174).
|
|
639
|
+
const steers = subject.facts?.steer !== false;
|
|
640
|
+
const texts = steers ? ["check the totals"] : ["check the totals", "and the dates"];
|
|
641
|
+
// The model's steps: the call, then what it says after it (the steer it read, when it steers), then, for each message
|
|
642
|
+
// sent as a turn of its own, that message (the last the person sent).
|
|
643
|
+
const script = [{ call: "slow" }, { sayLastSteer: true }, ...(steers ? [] : texts.map(() => ({ sayLastSteer: true })))];
|
|
644
|
+
await w.start("runner-a", { script, tools, hooks: quiet });
|
|
645
|
+
await slowStarted;
|
|
646
|
+
const rows = [];
|
|
647
|
+
for (const text of texts)
|
|
648
|
+
rows.push(await sendCommand(w.server, RUN, { kind: "steer", body: { text } }));
|
|
649
|
+
// The tool goes on once every message is with the loop: the turn in flight has them, never a timer.
|
|
650
|
+
await until(() => rows.every((row) => w.handedOver(row.id)), "the messages handed to the loop mid-turn");
|
|
651
|
+
letSlowGo();
|
|
652
|
+
await w.ended("ended");
|
|
653
|
+
const { calls, messages } = await w.read();
|
|
654
|
+
const slow = calls.find((call) => call.tool === "slow");
|
|
655
|
+
assert.ok(slow?.endEntry !== undefined && slow.status === "done", `slow ran to its end: ${JSON.stringify(calls)}`);
|
|
656
|
+
const sent = texts.map((text) => messages.find((message) => message.role !== "model" && message.text === text));
|
|
657
|
+
assert.ok(sent.every((message) => message !== undefined), `each message is in the journal: ${JSON.stringify(messages)}`);
|
|
658
|
+
for (const [i, message] of sent.entries()) {
|
|
659
|
+
assert.ok(message.entry > slow.endEntry, `"${texts[i]}" comes after the call it was sent during: ${JSON.stringify(messages)}`);
|
|
660
|
+
if (i > 0)
|
|
661
|
+
assert.ok(message.entry > sent[i - 1].entry, `in the order they came: ${JSON.stringify(messages)}`);
|
|
662
|
+
const answered = messages.find((one) => one.role === "model" && one.entry > message.entry && one.text.includes(texts[i]));
|
|
663
|
+
assert.ok(answered, `the model answered "${texts[i]}": ${JSON.stringify(messages)}`);
|
|
664
|
+
}
|
|
665
|
+
for (const row of rows) {
|
|
666
|
+
const taken = await w.commandRow(row.id);
|
|
667
|
+
assert.ok(taken.takenAt !== null && taken.refused === null, `its row is taken, not refused: ${JSON.stringify(taken)}`);
|
|
668
|
+
}
|
|
669
|
+
},
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
id: "message-resent-after-crash",
|
|
673
|
+
title: "a message sent as its own turn by a runner lost before its row was taken is sent again by the next, and the timeline says so",
|
|
674
|
+
async body(subject, t) {
|
|
675
|
+
const w = await world(subject, t);
|
|
676
|
+
const { tools, letSlowGo, slowStarted } = suiteTools();
|
|
677
|
+
const text = "check the totals";
|
|
678
|
+
// The call, then the turn's words, then the message's turn (sent once by runner-a, again by runner-b), each saying
|
|
679
|
+
// the message it was given.
|
|
680
|
+
const script = [{ call: "slow" }, { sayLastSteer: true }, { sayLastSteer: true }, { sayLastSteer: true }];
|
|
681
|
+
const holder = {};
|
|
682
|
+
await w.start("runner-a", { script, tools, hooks: crashAt("afterMessageSent", holder) }, holder);
|
|
683
|
+
await slowStarted;
|
|
684
|
+
const row = await sendCommand(w.server, RUN, { kind: "steer", body: { text } });
|
|
685
|
+
await until(() => w.handedOver(row.id), "the message handed to the loop mid-turn");
|
|
686
|
+
letSlowGo();
|
|
687
|
+
// runner-a dies once the session holds the message, before the commit that records it and takes its row.
|
|
688
|
+
await until(() => holder.crashed, "the crash after the message was sent", EVENT_WAIT_MS);
|
|
689
|
+
assert.equal((await w.commandRow(row.id)).takenAt, null, "the row is untaken when runner-a is lost");
|
|
690
|
+
await w.claimsSettled("runner-a");
|
|
691
|
+
w.runOut();
|
|
692
|
+
await w.start("runner-b", { script, tools, hooks: quiet });
|
|
693
|
+
await w.ended("ended", EVENT_WAIT_MS);
|
|
694
|
+
const { messages } = await w.read();
|
|
695
|
+
const sent = messages.filter((message) => message.role !== "model" && message.text === text);
|
|
696
|
+
assert.ok(sent.length >= 1, `the message is on the record: ${JSON.stringify(messages)}`);
|
|
697
|
+
assert.ok(messages.some((message) => message.role === "model" && message.text.includes(text) && message.entry > sent[0].entry), `the model answered it: ${JSON.stringify(messages)}`);
|
|
698
|
+
const taken = await w.commandRow(row.id);
|
|
699
|
+
assert.ok(taken.takenAt !== null && taken.refused === null, `its row is taken once runner-b sent it: ${JSON.stringify(taken)}`);
|
|
700
|
+
// Never silent: the timeline says the message went again, once, before it.
|
|
701
|
+
const rows = await w.liveRows();
|
|
702
|
+
const again = rows.filter((one) => one.summary === MESSAGE_SENT_AGAIN);
|
|
703
|
+
const shown = JSON.stringify(rows.map((one) => [one.kind, one.summary]));
|
|
704
|
+
assert.deepEqual(again.map((one) => one.kind), ["phase"], `one row says it was sent again: ${shown}`);
|
|
705
|
+
// Just before the message it was said of: the person's row of it is the next message row.
|
|
706
|
+
const at = rows.indexOf(again[0]);
|
|
707
|
+
const message = rows.findIndex((one, i) => i > at && one.kind === "user_message");
|
|
708
|
+
assert.ok(message > at && rows[message].text === text, `the notice comes right before the message it was sent again: ${shown}`);
|
|
709
|
+
assert.ok(!rows.slice(0, at).some((one) => one.kind === "user_message" && one.text === text), `no row of the message before the notice: ${shown}`);
|
|
710
|
+
},
|
|
711
|
+
},
|
|
633
712
|
{
|
|
634
713
|
id: "stop-ends-turn",
|
|
635
714
|
title: "stop ends the turn; the run says why",
|
|
@@ -705,10 +784,13 @@ const CASES = [
|
|
|
705
784
|
await sendCommand(w.server, RUN, { kind: "deny", body: { approval: callId, note: "not on a Friday" } });
|
|
706
785
|
await w.ended("ended");
|
|
707
786
|
assert.equal(ran.asked, 0, "denied, it never ran");
|
|
708
|
-
const { answers, messages } = await w.read();
|
|
787
|
+
const { answers, messages, calls } = await w.read();
|
|
709
788
|
// The fields this case is about; its time is the loop's clock's (adapter-pi-approval-entries pins it).
|
|
710
789
|
assert.deepEqual(answers.map(({ callId: id, approved, decision, note }) => ({ callId: id, approved, decision, note })), [{ callId, approved: false, decision: "deny", note: "not on a Friday" }], "the answer is a deny that keeps the note");
|
|
711
|
-
|
|
790
|
+
// What the model said after the asked call: its answer to the refusal. What it said with the call, before the gate
|
|
791
|
+
// asked (a CLI's "Calling asked."), is on the record before the call's row, as pi keeps a call's text in its message.
|
|
792
|
+
const asked = calls.find((call) => call.callId === callId);
|
|
793
|
+
const said = messages.filter((message) => message.role === "model" && message.entry > (asked?.startEntry ?? -1)).map((message) => message.text);
|
|
712
794
|
assert.equal(said.length, 1, `the model answered once: ${JSON.stringify(messages)}`);
|
|
713
795
|
// Main's words for a call a person denied (tool-gate.ts refusedText), the note with them. The harness may frame a
|
|
714
796
|
// refusal its own way (pi: a blocked call's error) around them.
|
|
@@ -798,6 +880,31 @@ const CASES = [
|
|
|
798
880
|
assert.deepEqual(calls.map((call) => [call.tool, call.status]), [["asked", "done"]]);
|
|
799
881
|
},
|
|
800
882
|
},
|
|
883
|
+
{
|
|
884
|
+
id: "approval-race",
|
|
885
|
+
title: "an approve and a deny sent at once write one answer: the store refuses the other (one answer per approval), and the run acts on the one written",
|
|
886
|
+
async body(subject, t) {
|
|
887
|
+
const w = await world(subject, t);
|
|
888
|
+
const { tools, ran } = suiteTools();
|
|
889
|
+
await w.start("runner-a", { script: [{ call: "asked" }, { say: "done" }], tools, hooks: quiet });
|
|
890
|
+
await w.ended("parked");
|
|
891
|
+
const callId = await w.askedCall();
|
|
892
|
+
// Both sent before either is awaited (on Postgres, each on its own pooled connection). Whichever is written first, the
|
|
893
|
+
// store's one-answer index refuses the other: no order is imposed, so the case holds for either winner.
|
|
894
|
+
const settled = await Promise.allSettled([
|
|
895
|
+
sendCommand(w.server, RUN, { kind: "approve", body: { approval: callId } }),
|
|
896
|
+
sendCommand(w.server, RUN, { kind: "deny", body: { approval: callId } }),
|
|
897
|
+
]);
|
|
898
|
+
const won = settled.filter((r) => r.status === "fulfilled");
|
|
899
|
+
const lost = settled.filter((r) => r.status === "rejected");
|
|
900
|
+
assert.equal(won.length, 1, `one answer is written, not both: ${JSON.stringify(settled.map((r) => r.status))}`);
|
|
901
|
+
assert.ok(lost[0]?.reason instanceof StoreConstraint, `the other is refused by the store: ${String(lost[0]?.reason)}`);
|
|
902
|
+
await w.ended("ended");
|
|
903
|
+
const winner = won[0].value;
|
|
904
|
+
assert.equal(ran.asked, winner.kind === "approve" ? 1 : 0, "the run acted on the answer written, never the other");
|
|
905
|
+
assert.equal((await w.commandRow(winner.id)).refused, null, "the answer written stands");
|
|
906
|
+
},
|
|
907
|
+
},
|
|
801
908
|
{
|
|
802
909
|
id: "message-never-answers",
|
|
803
910
|
title: "a message that answers nothing (a trigger's, answers: false) never answers a waiting call, whatever its words",
|
|
@@ -879,12 +986,13 @@ const CASES = [
|
|
|
879
986
|
},
|
|
880
987
|
},
|
|
881
988
|
];
|
|
989
|
+
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)";
|
|
882
990
|
const CLI_NEVER_RERUNS = "a CLI never reruns a call that started; only the model calls again (its adapter's facts: rerunsStarted false)";
|
|
883
991
|
/** The cases a harness's declared facts rule out, each with why: what it does by design, not what it cannot model yet. */
|
|
884
992
|
export function factsRuleOut(facts) {
|
|
885
993
|
if (!facts)
|
|
886
994
|
return {};
|
|
887
|
-
const noSteer = `${facts.id} takes no message mid-turn (its adapter's facts: steer false), so
|
|
995
|
+
const noSteer = `${facts.id} takes no message mid-turn (its adapter's facts: steer false), so a message sent while it works is never placed in the turn in flight: it is the run's next turn (message-mid-turn-kept)`;
|
|
888
996
|
return {
|
|
889
997
|
// steer-origin steers the turn in flight too: its message is taken mid-turn, or never.
|
|
890
998
|
...(facts.steer ? {} : { "steer-mid-turn": noSteer, "steer-origin": noSteer }),
|
|
@@ -918,7 +1026,9 @@ export function registerHarnessConformance(given, { test, storeUrl }) {
|
|
|
918
1026
|
const ruledOut = factsRuleOut(subject.facts);
|
|
919
1027
|
for (const entry of CASES) {
|
|
920
1028
|
const processCase = entry.id.endsWith("-process");
|
|
921
|
-
|
|
1029
|
+
// A harness that steers (any whose facts do not say steer false, as message-mid-turn-kept reads them) places a message
|
|
1030
|
+
// in the turn in flight, its row taken in the commit of its submission: it never sends one as a turn of its own.
|
|
1031
|
+
const byFacts = ruledOut[entry.id] ?? (entry.id === "message-resent-after-crash" && subject.facts?.steer !== false ? STEERS_IN_TURN : undefined);
|
|
922
1032
|
const notYet = subject.unsupported?.[entry.id] ?? (processCase && !subject.process ? "it names no module a runner process can load (subject.process)" : undefined);
|
|
923
1033
|
const onPostgres = storeUrl ? POSTGRES_PENDING[entry.id] : undefined;
|
|
924
1034
|
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;
|
|
@@ -46,6 +46,9 @@ export interface KernelHooks {
|
|
|
46
46
|
beforeBooking?(): Promise<void>;
|
|
47
47
|
/** The adapter loop waits for its session's paid requests to be booked (bookingsSettled, with one still unbooked). */
|
|
48
48
|
awaitingBookings?(): void;
|
|
49
|
+
/** A message taken mid-turn was sent as a turn of its own (the adapter loop's sendAfterTurn): the session holds it, and
|
|
50
|
+
* the commit that records it and takes its row has not run yet. */
|
|
51
|
+
afterMessageSent?(): Promise<void>;
|
|
49
52
|
}
|
|
50
53
|
export interface ConformanceSetup {
|
|
51
54
|
readonly script: readonly ScriptStep[];
|
|
@@ -54,7 +57,7 @@ export interface ConformanceSetup {
|
|
|
54
57
|
/** The run's agent, for the subject's spec to name (AdapterRunSpec.agentId): the end-of-run step is asked with it. */
|
|
55
58
|
readonly agentId?: string;
|
|
56
59
|
}
|
|
57
|
-
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" | "cancel-ends-for-good" | "cancel-parked" | "deny-note" | "steer-origin" | "stop-ends-turn" | "park-on-ask" | "approval-names-its-call" | "approval-double-click" | "message-never-answers" | "end-of-run-answer" | "fault-effects-once" | "fault-restarts-bounded" | "length-ends-failed" | "length-mid-run";
|
|
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";
|
|
58
61
|
export interface ConformanceSubject {
|
|
59
62
|
/** The harness's name, as the suite's tests are titled. */
|
|
60
63
|
readonly name: string;
|
|
@@ -7,7 +7,7 @@ export interface DispatchDeps {
|
|
|
7
7
|
launchOf(runId: string): Promise<{
|
|
8
8
|
readonly body: unknown;
|
|
9
9
|
}>;
|
|
10
|
-
/** The loop factory for a run launched with `harness`, built from its `launch` record and its run id (so the
|
|
10
|
+
/** The loop factory for a run launched with `harness`, built from its `launch` record and its run id (so the resolver may
|
|
11
11
|
* read the run's revision — a workflow revision runs on the workflow loop whatever its harness name), or undefined when
|
|
12
12
|
* this runner does not run it (the run fails in words). pi is the adapter loop with adapterRunSpecFromLaunch; a built-in
|
|
13
13
|
* learning run names "learning"; the CLI harnesses name their own. May be async (the revision read). */
|
|
@@ -24,6 +24,13 @@ export declare class LaunchUnreadable extends Error {
|
|
|
24
24
|
name: string;
|
|
25
25
|
constructor(runId: string);
|
|
26
26
|
}
|
|
27
|
+
/** The first wait before a buffered row whose delivery threw is tried again, and the most any later wait (doubling)
|
|
28
|
+
* grows to. */
|
|
29
|
+
export declare const REPLAY_RETRY_FIRST_MS = 250;
|
|
30
|
+
export declare const REPLAY_RETRY_MAX_MS = 5000;
|
|
31
|
+
/** How many times in all a buffered row's delivery is tried before the dispatch stops trying it on this claim: a row that
|
|
32
|
+
* fails for a lasting reason is said once and left untaken for the run's next claim, never tried for the whole run. */
|
|
33
|
+
export declare const REPLAY_TRIES = 5;
|
|
27
34
|
/** The loop factory the runner holds for every run: `createDispatchLoop(deps)` picks each run's harness loop at its
|
|
28
35
|
* claim. The inner loop gets the same LoopDeps the dispatch does, so the runner's fence, flush, live and end-of-run
|
|
29
36
|
* channels reach it unchanged. */
|
package/dist/runner/dispatch.js
CHANGED
|
@@ -25,6 +25,13 @@ export class LaunchUnreadable extends Error {
|
|
|
25
25
|
super(`run ${runId}: its launch record could not be read as a launch (it names no place, or is not an object).`);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
+
/** The first wait before a buffered row whose delivery threw is tried again, and the most any later wait (doubling)
|
|
29
|
+
* grows to. */
|
|
30
|
+
export const REPLAY_RETRY_FIRST_MS = 250;
|
|
31
|
+
export const REPLAY_RETRY_MAX_MS = 5_000;
|
|
32
|
+
/** How many times in all a buffered row's delivery is tried before the dispatch stops trying it on this claim: a row that
|
|
33
|
+
* fails for a lasting reason is said once and left untaken for the run's next claim, never tried for the whole run. */
|
|
34
|
+
export const REPLAY_TRIES = 5;
|
|
28
35
|
/** The loop factory the runner holds for every run: `createDispatchLoop(deps)` picks each run's harness loop at its
|
|
29
36
|
* claim. The inner loop gets the same LoopDeps the dispatch does, so the runner's fence, flush, live and end-of-run
|
|
30
37
|
* channels reach it unchanged. */
|
|
@@ -62,16 +69,83 @@ function dispatchLoop(deps, loopDeps) {
|
|
|
62
69
|
// buffered row and no buffered stop is lost between choosing the loop and replaying what was buffered.
|
|
63
70
|
inner = factory(innerDeps);
|
|
64
71
|
const end = inner.start(claim);
|
|
65
|
-
// Replay the buffered commands through the inner loop in order, each awaited, then let its `delivered` resolve.
|
|
72
|
+
// Replay the buffered commands through the inner loop in order, each awaited, then let its `delivered` resolve. A
|
|
73
|
+
// command whose delivery throws is never thrown out of here, where nothing would catch it and the runner's process
|
|
74
|
+
// would go down. The runner already moved past its row (the dispatch said it holds it), so the dispatch tries it again
|
|
75
|
+
// itself while the inner loop runs, as the runner tries again a row whose delivery threw (a store that failed for a
|
|
76
|
+
// moment), up to REPLAY_TRIES times. Once the inner loop has ended, or the tries are spent, a row still not delivered
|
|
77
|
+
// stays untaken (the store's take is the inner loop's own commit), so the run's next claim delivers it again and
|
|
78
|
+
// nobody's words are lost.
|
|
66
79
|
const buffered = early.splice(0);
|
|
67
|
-
void (
|
|
80
|
+
void replay(claim.runId, inner, buffered, end);
|
|
81
|
+
// The buffered stop, not awaited here (start() returns the inner loop's end): an inner stop that throws is said in
|
|
82
|
+
// the log, never an unhandled rejection, which would end the runner process and every run it holds.
|
|
83
|
+
if (earlyStop) {
|
|
84
|
+
inner.stop(earlyStop).catch((error) => {
|
|
85
|
+
const text = error?.message ?? String(error);
|
|
86
|
+
console.warn(`[runner] run ${claim.runId}: its stop failed: ${loopDeps.redact ? loopDeps.redact(text) : text}`);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
return end;
|
|
90
|
+
}
|
|
91
|
+
/** Hands each of `buffered` to `loop` once, in order, then lets the loop's `delivered` resolve; the ones whose delivery
|
|
92
|
+
* threw are tried again, in order, until each goes through, the loop has ended, or a row has been tried REPLAY_TRIES
|
|
93
|
+
* times (said once; it and the failed rows after it are left untaken for the run's next claim). Never rejects. */
|
|
94
|
+
async function replay(runId, loop, buffered, end, tries = REPLAY_TRIES) {
|
|
95
|
+
let ended = false;
|
|
96
|
+
const loopEnded = end.then(() => undefined, () => undefined).then(() => void (ended = true));
|
|
97
|
+
let lastError;
|
|
98
|
+
const delivers = async (command) => {
|
|
99
|
+
try {
|
|
100
|
+
await loop.command(command);
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
catch (error) {
|
|
104
|
+
lastError = error;
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
// What went wrong, cut of the values the run holds (LoopDeps.redact), as the log may not show them.
|
|
109
|
+
const why = () => {
|
|
110
|
+
const text = lastError?.message ?? String(lastError);
|
|
111
|
+
return loopDeps.redact ? loopDeps.redact(text) : text;
|
|
112
|
+
};
|
|
113
|
+
const failed = [];
|
|
114
|
+
try {
|
|
115
|
+
// Every row is tried once before the inner loop's `delivered` resolves, a later one even when an earlier one threw:
|
|
116
|
+
// a loop that waits on `delivered` (a run reopened by a follow-up) never goes on with a row still held here.
|
|
68
117
|
for (const command of buffered)
|
|
69
|
-
await
|
|
118
|
+
if (!(await delivers(command)))
|
|
119
|
+
failed.push(command);
|
|
120
|
+
}
|
|
121
|
+
finally {
|
|
70
122
|
replayed();
|
|
71
|
-
}
|
|
72
|
-
if (
|
|
73
|
-
|
|
74
|
-
|
|
123
|
+
}
|
|
124
|
+
if (failed.length === 0)
|
|
125
|
+
return;
|
|
126
|
+
console.warn(`[runner] ${runId}: a ${failed[0].kind} row held before its loop was chosen was not delivered (${why()}); it is tried again while the loop runs, up to ${tries} times in all`);
|
|
127
|
+
// How many times the first row still to deliver has been tried: once, in the pass above.
|
|
128
|
+
let tried = 1;
|
|
129
|
+
for (let wait = REPLAY_RETRY_FIRST_MS; failed.length > 0 && !ended; wait = Math.min(wait * 2, REPLAY_RETRY_MAX_MS)) {
|
|
130
|
+
if (tried >= tries) {
|
|
131
|
+
console.warn(`[runner] ${runId}: a ${failed[0].kind} row held before its loop was chosen was tried ${tried} times and not delivered (${why()}); it and the ${failed.length - 1} after it are left untaken, for the run's next claim`);
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
let timer;
|
|
135
|
+
await Promise.race([loopEnded, new Promise((resolve) => (timer = setTimeout(resolve, wait)))]);
|
|
136
|
+
clearTimeout(timer);
|
|
137
|
+
if (ended)
|
|
138
|
+
break;
|
|
139
|
+
// The first row again; once it goes through, the rows after it at once, in order, until one throws.
|
|
140
|
+
while (failed.length > 0 && !ended) {
|
|
141
|
+
tried += 1;
|
|
142
|
+
if (!(await delivers(failed[0])))
|
|
143
|
+
break;
|
|
144
|
+
failed.shift();
|
|
145
|
+
// Every row left was tried once in the first pass.
|
|
146
|
+
tried = 1;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
75
149
|
}
|
|
76
150
|
return {
|
|
77
151
|
start(claim) {
|
|
@@ -10,12 +10,18 @@ export declare const reflectRequestId: (runId: string, again?: boolean) => strin
|
|
|
10
10
|
* is answered from its submission, never asked of the model twice. */
|
|
11
11
|
export declare const REFLECT_AGAIN = ":again";
|
|
12
12
|
/** Where the end-of-run turn began in a run's journal: the entry its input placed, from the input submission under the
|
|
13
|
-
* turn's request id;
|
|
14
|
-
*
|
|
13
|
+
* turn's request id; else, on a CLI harness, the turn's prompt the CLI record wrote as it asked the turn (`entries`:
|
|
14
|
+
* adapter-loop.ts asking, an end-of-run-turn entry of the person's, written before the turn's submission, which only
|
|
15
|
+
* its answer writes). Undefined before either, or for a run that asked none. Every entry from it on, until the run's
|
|
16
|
+
* end, is the turn's (the server's labelled: after the entry before it). */
|
|
15
17
|
export declare function reflectFrom(submissions: readonly {
|
|
16
18
|
readonly type?: string;
|
|
17
19
|
readonly requestId?: string;
|
|
18
20
|
readonly entry?: unknown;
|
|
21
|
+
}[], entries?: readonly {
|
|
22
|
+
readonly kind?: string;
|
|
23
|
+
readonly id?: unknown;
|
|
24
|
+
readonly data?: unknown;
|
|
19
25
|
}[]): number | undefined;
|
|
20
26
|
/** The refusal of the end-of-run turn's write or edit under work/.learning/: the tool gate's one text (NOTE_ONLY_TEXT), so
|
|
21
27
|
* the adapter loop's refusal and the gate's are the same words. */
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// answer's note blocks, never from a file it writes there. The words and the rule are the tool gate's own
|
|
4
4
|
// (tool-gate.ts NOTE_ONLY_TEXT, underLearning), kept equal by a test.
|
|
5
5
|
import { posix, resolve, sep, join } from "node:path";
|
|
6
|
+
import { KINDS } from "./journal-kinds.js";
|
|
6
7
|
/** The prefix of the end-of-run turn's request id: the server's own (turns.ts REFLECT_REQUEST). */
|
|
7
8
|
export const REFLECT_PREFIX = "learn-reflect-";
|
|
8
9
|
/** The label a reader puts on the end-of-run turn's rows and messages: the server's (learning.ts LEARNING_LABEL). */
|
|
@@ -15,11 +16,16 @@ export const reflectRequestId = (runId, again = false) => `${REFLECT_PREFIX}${ru
|
|
|
15
16
|
* is answered from its submission, never asked of the model twice. */
|
|
16
17
|
export const REFLECT_AGAIN = ":again";
|
|
17
18
|
/** Where the end-of-run turn began in a run's journal: the entry its input placed, from the input submission under the
|
|
18
|
-
* turn's request id;
|
|
19
|
-
*
|
|
20
|
-
|
|
19
|
+
* turn's request id; else, on a CLI harness, the turn's prompt the CLI record wrote as it asked the turn (`entries`:
|
|
20
|
+
* adapter-loop.ts asking, an end-of-run-turn entry of the person's, written before the turn's submission, which only
|
|
21
|
+
* its answer writes). Undefined before either, or for a run that asked none. Every entry from it on, until the run's
|
|
22
|
+
* end, is the turn's (the server's labelled: after the entry before it). */
|
|
23
|
+
export function reflectFrom(submissions, entries = []) {
|
|
21
24
|
const placed = submissions.filter((record) => record.type === "input" && typeof record.requestId === "string" && record.requestId.startsWith(REFLECT_PREFIX) && record.entry !== undefined);
|
|
22
|
-
|
|
25
|
+
if (placed.length)
|
|
26
|
+
return Math.min(...placed.map((record) => Number(record.entry)));
|
|
27
|
+
const asked = entries.find((entry) => entry.kind === KINDS.endOfRunTurn && entry.data?.role === "person");
|
|
28
|
+
return asked === undefined ? undefined : Number(asked.id);
|
|
23
29
|
}
|
|
24
30
|
/** The refusal of the end-of-run turn's write or edit under work/.learning/: the tool gate's one text (NOTE_ONLY_TEXT), so
|
|
25
31
|
* the adapter loop's refusal and the gate's are the same words. */
|
|
@@ -7,10 +7,15 @@ export type GithubAppAccessAt = GithubAppAccess & {
|
|
|
7
7
|
/** The GitHub App access for one claim of a run whose first input is `firstInput` (run_launch's), or undefined when this
|
|
8
8
|
* server has no App the runner can open. Its mint goes to https://api.github.com (GITHUB_API): the App's JWT, signed
|
|
9
9
|
* with its key and good for every installation, goes nowhere else. `api` is a test runner's fake GitHub, given in the
|
|
10
|
-
* runner's own options (AdapterSpecDeps.githubApi); nothing kept, no environment variable and no flag reaches it.
|
|
10
|
+
* runner's own options (AdapterSpecDeps.githubApi); nothing kept, no environment variable and no flag reaches it.
|
|
11
|
+
* `fromGitHub`: the run's first input is a github trigger's firing (its launch's inputOrigin), whose payload tag names
|
|
12
|
+
* the repository and installation; any other run's tag is never read, only its owner's words. `hold`: each token minted
|
|
13
|
+
* joins the run's redactor (its `cut`), the first and every one after. */
|
|
11
14
|
export declare function githubAppAccess(store: {
|
|
12
15
|
readonly triggerSettings: Pick<TriggerSettings, "get">;
|
|
13
|
-
}, sealKey: Buffer | undefined, firstInput: unknown, { api, now }?: {
|
|
16
|
+
}, sealKey: Buffer | undefined, firstInput: unknown, { api, now, fromGitHub, hold }?: {
|
|
14
17
|
api?: string;
|
|
15
18
|
now?: () => number;
|
|
19
|
+
fromGitHub?: boolean;
|
|
20
|
+
hold?: (values: string[]) => void;
|
|
16
21
|
}): Promise<GithubAppAccessAt | undefined>;
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
// The runner's side of a github_app MCP server (runner/mcp-github.ts): the server's GitHub App, read from the store at each
|
|
2
|
-
// claim, bound into the mint the claim step calls, with the run's repository. The App's id and
|
|
3
|
-
// server sealed in trigger_settings (adapter "github", scope "server", AAD
|
|
4
|
-
// sealed-settings-store.ts writes them), opened here with the runner's seal key
|
|
2
|
+
// claim and again before each mint, bound into the mint the claim step calls, with the run's repository. The App's id and
|
|
3
|
+
// private key are the rows the server sealed in trigger_settings (adapter "github", scope "server", AAD
|
|
4
|
+
// trigger_settings|github|server|<field>, as sealed-settings-store.ts writes them), opened here with the runner's seal key.
|
|
5
5
|
// No App (never connected, disconnected, or rows that do not open under this key): no access, and such a server's calls
|
|
6
|
-
// are refused in words (GITHUB_UNUSABLE.noAccess).
|
|
7
|
-
|
|
8
|
-
import {
|
|
6
|
+
// are refused in words (GITHUB_UNUSABLE.noAccess). An App disconnected or replaced while a run holds a token: its next
|
|
7
|
+
// mint is refused as disconnected, and the claim step drops and revokes the token it holds.
|
|
8
|
+
import { unseal } from "../sealing.js";
|
|
9
|
+
import { GITHUB_API, GITHUB_FIELDS, GITHUB_SCOPE, githubCall, githubTargetOf, mintInstallationToken } from "../github.js";
|
|
9
10
|
import { isObject } from "../validate.js";
|
|
10
11
|
const ADAPTER = "github";
|
|
11
12
|
const aad = (field) => `trigger_settings|${ADAPTER}|${GITHUB_SCOPE}|${field}`;
|
|
12
|
-
/** The
|
|
13
|
-
*
|
|
14
|
-
|
|
15
|
-
* runner's own options (AdapterSpecDeps.githubApi); nothing kept, no environment variable and no flag reaches it. */
|
|
16
|
-
export async function githubAppAccess(store, sealKey, firstInput, { api = GITHUB_API, now = Date.now } = {}) {
|
|
17
|
-
if (!sealKey)
|
|
18
|
-
return undefined;
|
|
13
|
+
/** The server's App as the store holds it now, opened with `sealKey`: its id and private key, or undefined when there is none
|
|
14
|
+
* this key opens. */
|
|
15
|
+
async function appOf(store, sealKey) {
|
|
19
16
|
const rows = (await store.triggerSettings.get(ADAPTER)).filter((row) => row.scope === GITHUB_SCOPE);
|
|
20
17
|
const open = (field) => {
|
|
21
18
|
const row = rows.find((r) => r.field === field);
|
|
@@ -30,8 +27,42 @@ export async function githubAppAccess(store, sealKey, firstInput, { api = GITHUB
|
|
|
30
27
|
};
|
|
31
28
|
const appId = open(GITHUB_FIELDS.appId);
|
|
32
29
|
const pem = open(GITHUB_FIELDS.privateKey);
|
|
33
|
-
|
|
30
|
+
return appId && pem ? { appId, pem } : undefined;
|
|
31
|
+
}
|
|
32
|
+
/** The GitHub App access for one claim of a run whose first input is `firstInput` (run_launch's), or undefined when this
|
|
33
|
+
* server has no App the runner can open. Its mint goes to https://api.github.com (GITHUB_API): the App's JWT, signed
|
|
34
|
+
* with its key and good for every installation, goes nowhere else. `api` is a test runner's fake GitHub, given in the
|
|
35
|
+
* runner's own options (AdapterSpecDeps.githubApi); nothing kept, no environment variable and no flag reaches it.
|
|
36
|
+
* `fromGitHub`: the run's first input is a github trigger's firing (its launch's inputOrigin), whose payload tag names
|
|
37
|
+
* the repository and installation; any other run's tag is never read, only its owner's words. `hold`: each token minted
|
|
38
|
+
* joins the run's redactor (its `cut`), the first and every one after. */
|
|
39
|
+
export async function githubAppAccess(store, sealKey, firstInput, { api = GITHUB_API, now = Date.now, fromGitHub = false, hold } = {}) {
|
|
40
|
+
if (!sealKey)
|
|
41
|
+
return undefined;
|
|
42
|
+
const app = await appOf(store, sealKey);
|
|
43
|
+
if (!app)
|
|
34
44
|
return undefined;
|
|
35
|
-
const target = githubTargetOf(isObject(firstInput) ? firstInput.content : firstInput);
|
|
36
|
-
return {
|
|
45
|
+
const target = githubTargetOf(isObject(firstInput) ? firstInput.content : firstInput, { payload: fromGitHub });
|
|
46
|
+
return {
|
|
47
|
+
api,
|
|
48
|
+
target,
|
|
49
|
+
// The App read again before each mint: one disconnected or replaced since the claim makes no token for this run.
|
|
50
|
+
mint: async (to) => {
|
|
51
|
+
// A read that fails throws on: the step's github_failed path keeps the token held until it expires, never a disconnect.
|
|
52
|
+
const still = await appOf(store, sealKey);
|
|
53
|
+
if (!still || still.appId !== app.appId || still.pem !== app.pem)
|
|
54
|
+
return { ok: false, reason: "disconnected", message: "the GitHub App was disconnected or replaced on this server" };
|
|
55
|
+
const minted = await mintInstallationToken(api, app.appId, app.pem, to, now());
|
|
56
|
+
if (minted.ok)
|
|
57
|
+
hold?.([minted.token]);
|
|
58
|
+
return minted;
|
|
59
|
+
},
|
|
60
|
+
// Before each call: the App as the store holds it now, the same id and key, or the run's token stops.
|
|
61
|
+
same: async () => {
|
|
62
|
+
const still = await appOf(store, sealKey);
|
|
63
|
+
return Boolean(still && still.appId === app.appId && still.pem === app.pem);
|
|
64
|
+
},
|
|
65
|
+
// An installation token revokes itself (DELETE /installation/token, the token its own credential): no App needed.
|
|
66
|
+
revoke: async (token) => void (await githubCall(api, "/installation/token", { method: "DELETE", jwt: token }).catch(() => undefined)),
|
|
67
|
+
};
|
|
37
68
|
}
|
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
import type { RunLaunch } from "../run-launch.js";
|
|
2
2
|
import { type AdapterSpecDeps } from "./adapter-run-spec.js";
|
|
3
|
-
import type
|
|
3
|
+
import { type GradeRouteAsk } from "./learning-dispatch.js";
|
|
4
|
+
import type { GraderRoute } from "./learning-ask.js";
|
|
5
|
+
import { ClaimRefused, type LoopFactory } from "./loop-contract.js";
|
|
6
|
+
/** A claimed run whose harness this host's memory never holds: its message is the host's words (neverFits). A claim
|
|
7
|
+
* refused for good, so a parked run it wakes fails too, never retried as a resume (runner.ts finish). */
|
|
8
|
+
export declare class NeverFits extends ClaimRefused {
|
|
9
|
+
name: string;
|
|
10
|
+
}
|
|
4
11
|
/** The dispatch's `resolve`, built from the runner's deps: it reads the run's revision (for a workflow revision) and
|
|
5
12
|
* returns the loop the run runs on, or undefined when this runner does not run it (the dispatch fails it in words). */
|
|
6
13
|
export declare function resolveRunnerLoop(deps: AdapterSpecDeps): (harness: string, launch: RunLaunch, runId: string) => Promise<LoopFactory | undefined>;
|
|
14
|
+
/** The route a grade asks for (gradeModelFor: the grade model the server named, else the agent's own), from the runner's
|
|
15
|
+
* one route (`routeOf`), through gradeRouteOf. A grade model the server named (--grade-model, else AGENT_MODEL_STRONG)
|
|
16
|
+
* is the strong tier's: it goes with that tier's settings, sent whole as AGENT_MODEL_STRONG is (never cut to its bare id
|
|
17
|
+
* by AGENT_MODEL_GATEWAY_IDS) and priced at AGENT_MODEL_STRONG_PRICE. The agent's own model goes as its runs' does, on
|
|
18
|
+
* the default tier. */
|
|
19
|
+
export declare function gradeRouteFor(grade: GradeRouteAsk, env: NodeJS.ProcessEnv, routeOf: AdapterSpecDeps["routeOf"]): Promise<GraderRoute>;
|
|
7
20
|
/** The loop factory the runner holds for every run (its createLoop), built from the runner's deps over the one store: the
|
|
8
|
-
* dispatch (dispatch.ts) reads each run's launch and asks
|
|
21
|
+
* dispatch (dispatch.ts) reads each run's launch and asks resolveRunnerLoop for its harness loop. The server
|
|
9
22
|
* start and the test server pass this to startRunner. */
|
|
10
23
|
export declare function dispatchRunner(deps: AdapterSpecDeps): LoopFactory;
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
// The runner's dispatch switch (design 2.1: "the runner takes every run"): which loop a claimed run runs, by its revision
|
|
2
|
+
// and the harness its launch names. The runner holds one dispatch loop (dispatch.ts) for every run; at the claim the
|
|
3
|
+
// dispatch reads the launch and asks this switch for the run's inner loop:
|
|
4
|
+
// - a workflow revision runs on the workflow loop (createWorkflowLoop), whatever its harness name (a workflow's default
|
|
5
|
+
// harness is pi), so the revision is read here to tell it from an agentic pi run;
|
|
6
|
+
// - a built-in learning run (its launch names harness "learning") runs on the learning loop;
|
|
7
|
+
// - pi runs on the kernel's adapter loop with the run's pi spec (adapterRunSpecFromLaunch);
|
|
8
|
+
// - a CLI harness (claude-agent, codex, opencode) runs on the adapter loop with its own adapter;
|
|
9
|
+
// - anything else fails the run in words (the dispatch's UnknownHarness).
|
|
10
|
+
import { hostMemory, neverFits } from "../host.js";
|
|
1
11
|
import { resolveHarness } from "./adapters/index.js";
|
|
2
12
|
import { adapterRunSpecFromLaunch, PI_WIRES } from "./adapter-run-spec.js";
|
|
3
13
|
import { createAdapterLoop } from "./adapter-loop.js";
|
|
@@ -5,8 +15,14 @@ import { savedModelKeys, withModelKeys } from "./claim-secrets.js";
|
|
|
5
15
|
import { createDispatchLoop } from "./dispatch.js";
|
|
6
16
|
import { cliRunSpecFromLaunch } from "./cli-run-spec.js";
|
|
7
17
|
import { gradeModelFor, gradeRouteOf, learningLoopOf } from "./learning-dispatch.js";
|
|
18
|
+
import { ClaimRefused } from "./loop-contract.js";
|
|
8
19
|
import { createWorkflowLoop, isWorkflowRevision } from "./workflow-loop.js";
|
|
9
20
|
import { workflowSpecOf } from "./workflow-spec.js";
|
|
21
|
+
/** A claimed run whose harness this host's memory never holds: its message is the host's words (neverFits). A claim
|
|
22
|
+
* refused for good, so a parked run it wakes fails too, never retried as a resume (runner.ts finish). */
|
|
23
|
+
export class NeverFits extends ClaimRefused {
|
|
24
|
+
name = "NeverFits";
|
|
25
|
+
}
|
|
10
26
|
/** The dispatch's `resolve`, built from the runner's deps: it reads the run's revision (for a workflow revision) and
|
|
11
27
|
* returns the loop the run runs on, or undefined when this runner does not run it (the dispatch fails it in words). */
|
|
12
28
|
export function resolveRunnerLoop(deps) {
|
|
@@ -38,9 +54,10 @@ export function resolveRunnerLoop(deps) {
|
|
|
38
54
|
routeOf: async (grade) => {
|
|
39
55
|
const base = deps.env ?? process.env;
|
|
40
56
|
const env = withModelKeys(base, await savedModelKeys({ store: deps.store, sealKey: deps.sealKey, env: base }));
|
|
41
|
-
return
|
|
57
|
+
return gradeRouteFor(grade, env, deps.routeOf);
|
|
42
58
|
},
|
|
43
59
|
...(deps.log ? { log: deps.log } : {}),
|
|
60
|
+
...(deps.gradeBound ? { gradeBound: deps.gradeBound } : {}),
|
|
44
61
|
});
|
|
45
62
|
}
|
|
46
63
|
// The harness's own entry decides which spec builds the run, by the entry's facts and never the harness's name: an entry
|
|
@@ -48,6 +65,13 @@ export function resolveRunnerLoop(deps) {
|
|
|
48
65
|
// runs the pi spec (adapterRunSpecFromLaunch). A harness with no entry is unknown here: the dispatch fails it in words.
|
|
49
66
|
const runner = resolveHarness(harness);
|
|
50
67
|
if (runner) {
|
|
68
|
+
// A run this host's memory never holds (host.ts neverFits: one run of its harness is more than the host has for runs)
|
|
69
|
+
// fails at its claim, in the words a start of it is refused in here (harness.ts harnessOffers): a run another host
|
|
70
|
+
// started, or one left before this host's memory shrank. Claimed alone (runner.ts claimByMemory), it would run past
|
|
71
|
+
// the host's memory and its OOM kill would take every run on it.
|
|
72
|
+
const tooBig = neverFits(harness, hostMemory());
|
|
73
|
+
if (tooBig)
|
|
74
|
+
throw new NeverFits(tooBig);
|
|
51
75
|
// A run that learns supplies its own end-of-run step (reflect + proposal over its store) from its spec builder now,
|
|
52
76
|
// where the run's Archil claim is: a Mode 2 run's learning folder is on its claim's disk, not this machine's local
|
|
53
77
|
// path (adapter-run-spec.ts / cli-run-spec.ts endOfRun). The loop prefers the spec's step over its deps' (stepOf); a
|
|
@@ -59,8 +83,20 @@ export function resolveRunnerLoop(deps) {
|
|
|
59
83
|
return undefined;
|
|
60
84
|
};
|
|
61
85
|
}
|
|
86
|
+
/** The route a grade asks for (gradeModelFor: the grade model the server named, else the agent's own), from the runner's
|
|
87
|
+
* one route (`routeOf`), through gradeRouteOf. A grade model the server named (--grade-model, else AGENT_MODEL_STRONG)
|
|
88
|
+
* is the strong tier's: it goes with that tier's settings, sent whole as AGENT_MODEL_STRONG is (never cut to its bare id
|
|
89
|
+
* by AGENT_MODEL_GATEWAY_IDS) and priced at AGENT_MODEL_STRONG_PRICE. The agent's own model goes as its runs' does, on
|
|
90
|
+
* the default tier. */
|
|
91
|
+
export function gradeRouteFor(grade, env, routeOf) {
|
|
92
|
+
return gradeRouteOf(gradeModelFor(grade), env, (model) => (grade.model !== undefined && model === grade.model
|
|
93
|
+
// The runner's environment under the grader as its strong model: every key it holds read through it, a non-enumerable
|
|
94
|
+
// one (a launcher-held or Settings key) too, which a copy would drop.
|
|
95
|
+
? routeOf(undefined, Object.create(env, { AGENT_MODEL_STRONG: { value: model, enumerable: true } }), "strong", PI_WIRES)
|
|
96
|
+
: routeOf(model, env, "default", PI_WIRES)));
|
|
97
|
+
}
|
|
62
98
|
/** The loop factory the runner holds for every run (its createLoop), built from the runner's deps over the one store: the
|
|
63
|
-
* dispatch (dispatch.ts) reads each run's launch and asks
|
|
99
|
+
* dispatch (dispatch.ts) reads each run's launch and asks resolveRunnerLoop for its harness loop. The server
|
|
64
100
|
* start and the test server pass this to startRunner. */
|
|
65
101
|
export function dispatchRunner(deps) {
|
|
66
102
|
return createDispatchLoop({
|