@parcha/agentrun-serve 0.1.0-beta.36 → 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 +452 -0
- package/README.md +311 -142
- 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/attach-conformance-cli.d.ts +1 -0
- package/dist/attach-conformance-cli.js +18 -0
- package/dist/attach-conformance.d.ts +25 -0
- package/dist/attach-conformance.js +343 -0
- package/dist/browser-cost.d.ts +1 -1
- package/dist/browser-cost.js +52 -93
- package/dist/browser-live.d.ts +20 -8
- package/dist/browser-live.js +50 -27
- package/dist/cap.d.ts +0 -407
- package/dist/cap.js +4 -1028
- package/dist/catalog.d.ts +1 -12
- package/dist/catalog.js +4 -34
- package/dist/cli.js +13 -4
- package/dist/composio-preset.d.ts +53 -0
- package/dist/composio-preset.js +221 -0
- package/dist/computer-attach.d.ts +125 -0
- package/dist/computer-attach.js +330 -0
- package/dist/computer-calls.d.ts +60 -0
- package/dist/computer-calls.js +209 -0
- package/dist/computer-channel.d.ts +57 -0
- package/dist/computer-channel.js +115 -0
- package/dist/computer-commands.d.ts +1 -1
- package/dist/computer-held-routes.d.ts +35 -0
- package/dist/computer-held-routes.js +106 -0
- package/dist/computer-held.d.ts +48 -0
- package/dist/computer-held.js +87 -0
- package/dist/computer-keys.d.ts +21 -1
- package/dist/computer-keys.js +53 -11
- package/dist/computer-live.d.ts +165 -0
- package/dist/computer-live.js +655 -0
- package/dist/computer-setting.d.ts +15 -2
- package/dist/computer-setting.js +20 -4
- package/dist/computer-view.d.ts +14 -0
- package/dist/computer-view.js +51 -3
- package/dist/computer-viewer.d.ts +6 -0
- package/dist/computer-viewer.js +311 -0
- package/dist/computers.d.ts +37 -8
- package/dist/computers.js +62 -14
- 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.d.ts +9 -20
- package/dist/faux-computers.js +56 -26
- package/dist/github-connection.d.ts +10 -2
- package/dist/github-connection.js +65 -2
- package/dist/github-faux.js +1 -1
- package/dist/graph-view.d.ts +1 -1
- 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/harness.d.ts +1 -0
- package/dist/harness.js +35 -1
- package/dist/host-tools.d.ts +2 -6
- package/dist/host-tools.js +7 -10
- package/dist/hosted-search.d.ts +5 -6
- package/dist/hosted-search.js +2 -28
- package/dist/import-sources.d.ts +10 -0
- package/dist/import-sources.js +44 -2
- package/dist/import.d.ts +3 -3
- package/dist/import.js +37 -6
- package/dist/key-words.d.ts +3 -2
- package/dist/key-words.js +4 -2
- package/dist/learn/check.d.ts +10 -2
- package/dist/learn/check.js +13 -5
- package/dist/learn/commit.d.ts +14 -2
- package/dist/learn/commit.js +23 -9
- package/dist/learn/compile.d.ts +243 -0
- package/dist/learn/compile.js +471 -0
- package/dist/learn/folder.d.ts +6 -0
- package/dist/learn/folder.js +4 -1
- package/dist/learn/general.d.ts +69 -0
- package/dist/learn/general.js +75 -0
- package/dist/learn/grade.d.ts +5 -1
- package/dist/learn/grade.js +29 -7
- 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 +9 -20
- package/dist/learn/reflect.js +18 -125
- package/dist/learn/replay-calls.d.ts +63 -0
- package/dist/learn/replay-calls.js +158 -0
- package/dist/learn/skills.d.ts +50 -14
- package/dist/learn/skills.js +183 -47
- 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 +43 -3
- package/dist/learned-workflow.js +170 -28
- package/dist/learning-batch.d.ts +283 -0
- package/dist/learning-batch.js +574 -0
- package/dist/learning-cost.d.ts +18 -6
- package/dist/learning-cost.js +15 -7
- package/dist/learning-evals.d.ts +33 -0
- package/dist/learning-evals.js +98 -0
- package/dist/learning-routes.d.ts +37 -2
- package/dist/learning-routes.js +52 -8
- package/dist/learning-words.d.ts +13 -0
- package/dist/learning-words.js +13 -0
- package/dist/learning.d.ts +55 -17
- package/dist/learning.js +91 -48
- package/dist/live/stream.js +6 -3
- package/dist/live/translate.d.ts +4 -3
- package/dist/live/translate.js +8 -4
- package/dist/live-reach.d.ts +37 -0
- package/dist/live-reach.js +62 -0
- package/dist/llm.js +0 -3
- package/dist/mcp-gateway.d.ts +21 -20
- package/dist/mcp-gateway.js +76 -55
- package/dist/mcp-oauth.d.ts +62 -7
- package/dist/mcp-oauth.js +134 -19
- package/dist/mcp-pin-first.d.ts +37 -0
- package/dist/mcp-pin-first.js +107 -0
- package/dist/mcp-private-hosts.d.ts +4 -4
- package/dist/mcp-private-hosts.js +20 -12
- package/dist/mcp-probe.d.ts +27 -11
- package/dist/mcp-probe.js +60 -42
- package/dist/mcp-secret-writes.js +4 -0
- package/dist/mcp-servers-store.d.ts +115 -25
- package/dist/mcp-servers-store.js +241 -43
- package/dist/mcp-sources.d.ts +39 -0
- package/dist/mcp-sources.js +74 -0
- package/dist/mcp-store.d.ts +21 -4
- package/dist/mcp-store.js +33 -8
- package/dist/mcp-wire.d.ts +22 -0
- package/dist/mcp-wire.js +36 -0
- package/dist/mcp.js +3 -3
- package/dist/meta-tool-names.d.ts +1 -0
- package/dist/meta-tool-names.js +3 -0
- package/dist/model-form.d.ts +26 -0
- package/dist/model-form.js +80 -0
- package/dist/model.d.ts +13 -0
- package/dist/model.js +69 -25
- package/dist/monid.d.ts +51 -25
- package/dist/monid.js +226 -140
- package/dist/openapi.js +694 -59
- package/dist/page.d.ts +18 -0
- package/dist/page.js +48 -20
- package/dist/paid-calls.d.ts +26 -29
- package/dist/paid-calls.js +46 -102
- package/dist/place-offers.d.ts +2 -3
- package/dist/place-offers.js +3 -7
- package/dist/place.js +1 -2
- package/dist/print.d.ts +15 -1
- package/dist/print.js +14 -3
- package/dist/propose.d.ts +10 -1
- package/dist/propose.js +30 -10
- package/dist/provider.js +12 -4
- package/dist/reflect-range.d.ts +8 -1
- package/dist/reflect-range.js +3 -2
- package/dist/rows.d.ts +5 -3
- package/dist/rows.js +15 -4
- package/dist/run-launch.d.ts +27 -2
- package/dist/run-launch.js +15 -4
- 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-reads-over-store.d.ts +1 -1
- package/dist/run-repo.d.ts +20 -0
- package/dist/run-repo.js +63 -0
- package/dist/run-secrets.js +2 -3
- package/dist/run-timeline-served.d.ts +1 -1
- package/dist/run-timeline-served.js +5 -2
- package/dist/run-view.d.ts +19 -8
- package/dist/run-view.js +62 -26
- package/dist/runnable.d.ts +0 -3
- package/dist/runnable.js +37 -29
- package/dist/runner/adapter-loop.d.ts +47 -17
- package/dist/runner/adapter-loop.js +1427 -303
- package/dist/runner/adapter-run-spec.d.ts +23 -9
- package/dist/runner/adapter-run-spec.js +162 -56
- package/dist/runner/adapters/pi-computer.d.ts +9 -0
- package/dist/runner/adapters/pi-computer.js +51 -0
- package/dist/runner/adapters/pi.d.ts +25 -11
- package/dist/runner/adapters/pi.js +168 -45
- package/dist/runner/beside.d.ts +7 -3
- package/dist/runner/beside.js +21 -11
- package/dist/runner/claim-secrets.d.ts +4 -0
- package/dist/runner/claim-secrets.js +6 -1
- package/dist/runner/cli-run-spec.d.ts +20 -3
- package/dist/runner/cli-run-spec.js +174 -64
- package/dist/runner/commands.d.ts +3 -1
- package/dist/runner/commands.js +28 -3
- package/dist/runner/computer-channel.d.ts +34 -0
- package/dist/runner/computer-channel.js +62 -0
- package/dist/runner/conformance/harness.d.ts +3 -0
- package/dist/runner/conformance/harness.js +224 -17
- package/dist/runner/conformance/subject.d.ts +12 -5
- package/dist/runner/dispatch.js +3 -0
- package/dist/runner/end-of-run.d.ts +23 -12
- package/dist/runner/end-of-run.js +41 -16
- package/dist/runner/feedback-round.d.ts +52 -0
- package/dist/runner/feedback-round.js +79 -0
- package/dist/runner/github-app.d.ts +2 -1
- package/dist/runner/github-app.js +4 -2
- package/dist/runner/harness-loops.js +15 -1
- package/dist/runner/held-run.d.ts +65 -0
- package/dist/runner/held-run.js +158 -0
- package/dist/runner/journal-kinds.d.ts +44 -7
- package/dist/runner/journal-kinds.js +29 -0
- package/dist/runner/journal-reader.d.ts +5 -4
- package/dist/runner/journal-reader.js +12 -10
- package/dist/runner/learning-ask.d.ts +7 -1
- package/dist/runner/learning-ask.js +21 -6
- package/dist/runner/learning-dispatch.d.ts +22 -0
- package/dist/runner/learning-dispatch.js +77 -10
- package/dist/runner/learning-end.d.ts +69 -13
- package/dist/runner/learning-end.js +340 -87
- package/dist/runner/learning-factory.d.ts +1 -1
- package/dist/runner/learning-factory.js +11 -5
- package/dist/runner/learning-loop.d.ts +86 -8
- package/dist/runner/learning-loop.js +178 -23
- package/dist/runner/learning-seed.d.ts +11 -0
- package/dist/runner/learning-seed.js +27 -0
- package/dist/runner/live-ticker.js +1 -0
- package/dist/runner/loop-contract.d.ts +26 -3
- package/dist/runner/loop.d.ts +21 -2
- package/dist/runner/loop.js +23 -2
- package/dist/runner/main.d.ts +13 -1
- package/dist/runner/main.js +27 -5
- package/dist/runner/mcp-claim.d.ts +15 -8
- package/dist/runner/mcp-claim.js +176 -71
- package/dist/runner/mcp-github.js +1 -1
- package/dist/runner/mcp-run.d.ts +21 -57
- package/dist/runner/mcp-run.js +25 -85
- package/dist/runner/meta-tools.d.ts +37 -0
- package/dist/runner/meta-tools.js +268 -0
- package/dist/runner/metrics.d.ts +11 -2
- package/dist/runner/metrics.js +26 -5
- 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/pr-checkout.d.ts +1 -0
- package/dist/runner/pr-checkout.js +1 -1
- package/dist/runner/promotion.d.ts +80 -0
- package/dist/runner/promotion.js +562 -0
- package/dist/runner/reflect-hook.d.ts +46 -13
- package/dist/runner/reflect-hook.js +149 -48
- package/dist/runner/runner.d.ts +26 -0
- package/dist/runner/runner.js +208 -17
- package/dist/runner/scratch-sweep.d.ts +13 -0
- package/dist/runner/scratch-sweep.js +62 -0
- package/dist/runner/sessions.d.ts +9 -4
- 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/store-port.d.ts +4 -2
- package/dist/runner/store-secrets.js +4 -3
- package/dist/runner/subagent.d.ts +0 -3
- package/dist/runner/subagent.js +10 -13
- package/dist/runner/workflow-first.d.ts +216 -0
- package/dist/runner/workflow-first.js +303 -0
- package/dist/runner/workflow-host.d.ts +6 -1
- package/dist/runner/workflow-host.js +1 -1
- package/dist/runner/workflow-loop.d.ts +1 -1
- package/dist/runner/workflow-loop.js +17 -10
- package/dist/runner/workflow-spec.d.ts +15 -2
- package/dist/runner/workflow-spec.js +63 -23
- package/dist/runs-over-store.d.ts +17 -3
- package/dist/runs-over-store.js +59 -20
- package/dist/seal-key.js +3 -3
- package/dist/sealed-settings-store.d.ts +5 -2
- package/dist/sealed-settings-store.js +10 -4
- package/dist/secret-writes.d.ts +5 -4
- package/dist/secret-writes.js +5 -4
- package/dist/server-secrets-store.d.ts +4 -3
- package/dist/server-secrets-store.js +15 -9
- package/dist/server-secrets.js +3 -2
- package/dist/server.d.ts +119 -18
- package/dist/server.js +841 -202
- package/dist/settings-wake.d.ts +23 -0
- package/dist/settings-wake.js +65 -0
- package/dist/standard-webhooks.d.ts +4 -1
- package/dist/standard-webhooks.js +8 -4
- package/dist/store/agent-body.d.ts +14 -3
- package/dist/store/agent-body.js +14 -10
- package/dist/store/command-wake.d.ts +13 -0
- package/dist/store/command-wake.js +37 -0
- package/dist/store/dialect.d.ts +6 -0
- package/dist/store/dialect.js +5 -0
- package/dist/store/index.d.ts +1 -1
- package/dist/store/journal/storage.d.ts +3 -2
- package/dist/store/journal/storage.js +13 -5
- package/dist/store/postgres/connection.js +3 -1
- package/dist/store/postgres/dialect.js +4 -0
- package/dist/store/postgres/migrations/0005_learning_rounds.sql +14 -0
- package/dist/store/postgres/migrations/0006_run_changes_channel_attempts.sql +57 -0
- package/dist/store/postgres/migrations/0007_viewer_host.sql +11 -0
- package/dist/store/postgres/migrations/0008_paired_computers.sql +30 -0
- package/dist/store/postgres/migrations/0009_commands_answer.sql +10 -0
- package/dist/store/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 +10 -1
- package/dist/store/schema.js +104 -15
- package/dist/store/sqlite/connection.d.ts +2 -2
- package/dist/store/sqlite/connection.js +2 -2
- package/dist/store/sqlite/run-patch.d.ts +7 -5
- package/dist/store/sqlite/run-patch.js +45 -18
- package/dist/store/sqlite/store.js +331 -72
- package/dist/store/store.d.ts +312 -21
- package/dist/store/store.js +12 -1
- package/dist/store-reads/cap.d.ts +1 -1
- package/dist/store-reads/cap.js +8 -1
- package/dist/store-reads/decisions.d.ts +2 -2
- package/dist/store-reads/decisions.js +1 -1
- package/dist/store-reads/import-summary.d.ts +1 -1
- package/dist/store-reads/journal.d.ts +30 -5
- package/dist/store-reads/journal.js +128 -56
- package/dist/store-reads/learning.d.ts +114 -12
- package/dist/store-reads/learning.js +238 -48
- package/dist/store-reads/loop.d.ts +61 -0
- package/dist/store-reads/loop.js +111 -0
- package/dist/store-reads/runs.d.ts +1 -1
- package/dist/store-reads/workflow.d.ts +1 -1
- package/dist/store-view.d.ts +6 -0
- package/dist/store-view.js +59 -26
- package/dist/template-eval.d.ts +18 -9
- package/dist/template-eval.js +95 -68
- package/dist/template-github-permissions.d.ts +24 -10
- package/dist/template-github-permissions.js +36 -15
- 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 +22 -1
- package/dist/timeline/timeline.js +34 -18
- package/dist/timeline/util.d.ts +4 -0
- package/dist/timeline/util.js +14 -0
- package/dist/tool-gate.d.ts +84 -50
- package/dist/tool-gate.js +179 -101
- 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 +33 -27
- package/dist/tool-plane.js +72 -39
- package/dist/tools.d.ts +32 -7
- package/dist/tools.js +37 -24
- package/dist/trigger-adapter.d.ts +4 -0
- package/dist/trigger-secrets-shown.d.ts +2 -2
- package/dist/trigger-secrets-shown.js +1 -1
- package/dist/trigger-signatures.d.ts +25 -6
- package/dist/trigger-signatures.js +41 -7
- package/dist/trigger-targets.d.ts +2 -0
- package/dist/trigger-targets.js +1 -0
- package/dist/trigger-webhook.js +5 -2
- package/dist/triggers.d.ts +7 -3
- package/dist/triggers.js +35 -5
- package/dist/turns.js +16 -1
- package/dist/validate.d.ts +15 -7
- package/dist/validate.js +102 -45
- package/dist/web-fetch.d.ts +2 -8
- package/dist/web-fetch.js +2 -22
- package/dist/web-search.d.ts +10 -5
- package/dist/web-search.js +7 -6
- package/dist/webhooks.d.ts +145 -102
- package/dist/webhooks.js +559 -322
- package/dist/workflow/decisions.d.ts +1 -1
- package/dist/workflow/node-runner.d.ts +2 -1
- package/dist/workflow/node.d.ts +2 -1
- package/dist/workflow/node.js +3 -1
- package/dist/workflow/pi-versions.d.ts +23 -0
- package/dist/workflow/pi-versions.js +57 -0
- package/dist/workflow/record-tool.d.ts +2 -1
- package/dist/workflow/store.d.ts +1 -1
- package/dist/workflow/task.js +3 -2
- package/dist/workflow-run.d.ts +1 -1
- package/dist/workspace/attached-computers.d.ts +41 -0
- package/dist/workspace/attached-computers.js +114 -0
- package/dist/workspace/computer-deps.d.ts +19 -9
- package/dist/workspace/computer-deps.js +24 -9
- package/dist/workspace/computer-for-claim.d.ts +23 -8
- package/dist/workspace/computer-for-claim.js +92 -33
- package/dist/workspace/computer-hold.d.ts +11 -27
- package/dist/workspace/computer-hold.js +41 -55
- package/dist/workspace/computer-ledger.d.ts +3 -1
- package/dist/workspace/computer-ledger.js +4 -0
- package/dist/workspace/computer-mcp.d.ts +25 -0
- package/dist/workspace/computer-mcp.js +41 -0
- package/dist/workspace/computer-ports.d.ts +4 -13
- package/dist/workspace/computer-ports.js +4 -107
- package/dist/workspace/computer-script.d.ts +53 -0
- package/dist/workspace/computer-script.js +172 -0
- package/dist/workspace/executors.d.ts +1 -1
- package/dist/workspace/index.d.ts +4 -2
- package/dist/workspace/index.js +3 -1
- package/dist/workspace/kind-skills/desktop/SKILL.md +132 -84
- package/dist/workspace/kind-skills/phone/SKILL.md +104 -85
- package/dist/workspace/local.js +2 -2
- package/dist/workspace/resolve-computer.d.ts +24 -1
- package/dist/workspace/resolve-computer.js +40 -16
- package/dist/workspace/run-tools.d.ts +56 -21
- package/dist/workspace/run-tools.js +55 -34
- package/dist/wrap-up.d.ts +21 -0
- package/dist/wrap-up.js +21 -0
- package/launcher/agentrun-serve +4 -2
- package/package.json +19 -16
- 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-BI4Byidu.js +0 -550
- package/dist/console/assets/index-C19gUF2n.css +0 -1
- package/dist/run-db.d.ts +0 -53
- package/dist/run-db.js +0 -116
- package/dist/tool-blurbs.d.ts +0 -4
- package/dist/tool-blurbs.js +0 -28
- package/dist/tool-budget.d.ts +0 -26
- package/dist/tool-budget.js +0 -56
- package/dist/workflow/readers.d.ts +0 -36
- package/dist/workflow/readers.js +0 -145
- package/dist/workflow/wal.d.ts +0 -11
- package/dist/workflow/wal.js +0 -106
- 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
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import type { AuthorHostAddendum } from "@parcha/agentrun-dsl";
|
|
2
|
+
import { type PromotionRecord } from "./promote.js";
|
|
3
|
+
/** How many active notes an agent keeps before its look-back compiles its job. */
|
|
4
|
+
export declare const COMPILE_AFTER_NOTES = 3;
|
|
5
|
+
/** How many completed runs an agent has (the ending one counted) before its look-back compiles its job. */
|
|
6
|
+
export declare const COMPILE_AFTER_RUNS = 5;
|
|
7
|
+
/** How many of the agent's last runs (before the ending one, which is in the session already) the compile turn reads. */
|
|
8
|
+
export declare const COMPILE_TRACES = 5;
|
|
9
|
+
/** How many times a refused draft goes back to the model with its errors: at most 1 + COMPILE_RETRIES attempts. */
|
|
10
|
+
export declare const COMPILE_RETRIES = 3;
|
|
11
|
+
/** How many of an agent's runs before the ending one are read for an earlier compile: one there (it may still wait for
|
|
12
|
+
* its grade, or it failed) asks none now, so a job is compiled at most once in that many runs. */
|
|
13
|
+
export declare const COMPILE_QUIET_RUNS = 4;
|
|
14
|
+
/** The longest the compile turn may take, every attempt in it, before the run ends with what it has. */
|
|
15
|
+
export declare const COMPILE_TIMEOUT_MS: number;
|
|
16
|
+
/** The most of a run's trace the compile turn holds, in characters. */
|
|
17
|
+
export declare const TRACE_MAX = 4000;
|
|
18
|
+
/** The most of the agent's notes, together, the compile turn reads, in characters. It reads them whole, every rule kept:
|
|
19
|
+
* notes over it compile nothing, and the record says why (compileTurn), never a workflow from a cut set of rules. */
|
|
20
|
+
export declare const NOTES_MAX = 96000;
|
|
21
|
+
/** A workflow the money rule stopped from running first (runner/workflow-first.ts costLineOf): its name, and its cost a
|
|
22
|
+
* run over its last `runs` served runs against the agent's by hand, in dollars. */
|
|
23
|
+
export interface ReviseAsk {
|
|
24
|
+
readonly workflow: string;
|
|
25
|
+
readonly served_usd: number;
|
|
26
|
+
readonly by_hand_usd: number;
|
|
27
|
+
readonly runs: number;
|
|
28
|
+
}
|
|
29
|
+
/** A workflow its promotion holds (runner/promotion.ts, learn/promote.ts): the run went by hand, and the hold's record
|
|
30
|
+
* says why, from its replay on the agent's graded inputs (`replay`'s numbers) or the graded runs it served (`reason`). */
|
|
31
|
+
export interface HeldAsk {
|
|
32
|
+
readonly workflow: string;
|
|
33
|
+
readonly digest: string;
|
|
34
|
+
readonly source: PromotionRecord["source"];
|
|
35
|
+
readonly reason: string;
|
|
36
|
+
readonly replay?: {
|
|
37
|
+
readonly n: number;
|
|
38
|
+
readonly agree: number;
|
|
39
|
+
readonly agent_acc: number;
|
|
40
|
+
readonly wf_acc: number;
|
|
41
|
+
readonly delta: number;
|
|
42
|
+
readonly handed_back: number;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/** A run its learned workflow answered alone that a grade said was wrong (runner/feedback-round.ts, a `revise` round):
|
|
46
|
+
* the workflow's answer and the grade's words, each cut of the run's secrets. */
|
|
47
|
+
export interface GradedAsk {
|
|
48
|
+
readonly answer: string;
|
|
49
|
+
readonly words: string;
|
|
50
|
+
}
|
|
51
|
+
/** One of the agent's earlier runs as the compile turn reads it: what it was asked, each tool call it made (`tool`, its
|
|
52
|
+
* input as the timeline previews it, and whether it failed), its answer, and what a person said after (feedback). */
|
|
53
|
+
export interface CompileTrace {
|
|
54
|
+
readonly input: string;
|
|
55
|
+
readonly calls: readonly {
|
|
56
|
+
readonly tool: string;
|
|
57
|
+
readonly input: string;
|
|
58
|
+
readonly failed?: true;
|
|
59
|
+
}[];
|
|
60
|
+
readonly answer: string;
|
|
61
|
+
readonly feedback: readonly string[];
|
|
62
|
+
}
|
|
63
|
+
/** What the compile turn is asked with. `mode` new: the job as a new workflow; revise: `workflow`, whose text is
|
|
64
|
+
* `current`, again whole, after it handed this run back (`handedBack`), the money rule stopped it (`revise`), a grade
|
|
65
|
+
* said the answer it gave this run alone was wrong (`graded`) or its promotion holds it (`held`).
|
|
66
|
+
* `reference`: the workflow language as compileReference renders it. `notes`: the agent's active notes, whole.
|
|
67
|
+
* `traces`: its last runs. `input`: this run's input as it was launched, whose fields a workflow's input takes. `tools`:
|
|
68
|
+
* those a call node may run, with what each takes and gives (`described`); `judges`: whether the run has a decision
|
|
69
|
+
* provider (judge, pick and sift nodes are allowed); `jev`: whether one of them is Jev, not denied (guards read it).
|
|
70
|
+
* `outputSchema`: the agent's, when it has one: a run serving the workflow serves its answer shaped to it, else hands the
|
|
71
|
+
* run back (answer-json.ts answerAsServed), so the workflow's final output must be that object. */
|
|
72
|
+
export type CompileAsk = {
|
|
73
|
+
readonly reference: string;
|
|
74
|
+
readonly outputSchema?: unknown;
|
|
75
|
+
readonly notes: readonly {
|
|
76
|
+
readonly file: string;
|
|
77
|
+
readonly text: string;
|
|
78
|
+
}[];
|
|
79
|
+
readonly traces: readonly CompileTrace[];
|
|
80
|
+
readonly input?: Readonly<Record<string, unknown>>;
|
|
81
|
+
readonly tools: readonly string[];
|
|
82
|
+
readonly described?: readonly {
|
|
83
|
+
readonly name: string;
|
|
84
|
+
readonly does: string;
|
|
85
|
+
}[];
|
|
86
|
+
readonly judges: boolean;
|
|
87
|
+
readonly jev?: boolean;
|
|
88
|
+
} & ({
|
|
89
|
+
readonly mode: "new";
|
|
90
|
+
} | {
|
|
91
|
+
readonly mode: "revise";
|
|
92
|
+
readonly workflow: string;
|
|
93
|
+
readonly current?: string;
|
|
94
|
+
/** The commit of main `current` was read at: the revision's conflict base (its merge refuses a change to the workflow
|
|
95
|
+
* on main after this read, never one before it, which the revision was written over). Never told the model. */
|
|
96
|
+
readonly base?: string;
|
|
97
|
+
readonly handedBack?: true;
|
|
98
|
+
readonly revise?: ReviseAsk;
|
|
99
|
+
readonly graded?: GradedAsk;
|
|
100
|
+
readonly held?: HeldAsk;
|
|
101
|
+
});
|
|
102
|
+
/** One attempt of the compile turn: whether its draft passed the checks, and else why not, in the checks' words. */
|
|
103
|
+
export type CompileAttempt = {
|
|
104
|
+
readonly ok: boolean;
|
|
105
|
+
readonly errors: readonly string[];
|
|
106
|
+
};
|
|
107
|
+
/** The compile record a run's learning keeps (SPEC: the `compiled` event): the workflow, the notes it does the work of,
|
|
108
|
+
* every attempt in order, and the kept draft's digest (workflowDigest of its workflow.json: what a run serving it
|
|
109
|
+
* records). `promoted` is read from the agent's promotion records when the run's learning is read (promotedOf), never
|
|
110
|
+
* kept. */
|
|
111
|
+
export type CompiledRecord = {
|
|
112
|
+
readonly workflow: string;
|
|
113
|
+
readonly from_notes: readonly string[];
|
|
114
|
+
readonly attempts: readonly CompileAttempt[];
|
|
115
|
+
readonly digest?: string;
|
|
116
|
+
readonly promoted?: boolean;
|
|
117
|
+
};
|
|
118
|
+
/** Whether the draft a compile kept at `digest` serves (learn/promote.ts records, newest wins): true once promoted, or
|
|
119
|
+
* once a threshold refit of it was (its new revision serves in its place); false while held, or once a newer revision
|
|
120
|
+
* superseded it; undefined while it is replayed or before its first claim decides it. */
|
|
121
|
+
export declare function promotedOf(records: readonly PromotionRecord[], workflow: string, digest: string): boolean | undefined;
|
|
122
|
+
/** The learned workflows whose newest revision other than their champion (learn/promote.ts championOf, which serves while
|
|
123
|
+
* that revision is held) is held: each one's compile turn is asked for a revision (once per hold). A champion's own
|
|
124
|
+
* graded hold counts: with it held there is no champion. */
|
|
125
|
+
export declare function heldNamesOf(records: readonly PromotionRecord[]): Set<string>;
|
|
126
|
+
/** Whether a run's look-back compiles its agent's job: the run completed, the agent has no learned workflow (active or
|
|
127
|
+
* waiting for its owner's OK), none of its last COMPILE_QUIET_RUNS runs compiled, and it keeps COMPILE_AFTER_NOTES
|
|
128
|
+
* active notes or has COMPILE_AFTER_RUNS completed runs. */
|
|
129
|
+
export declare const compileDue: (facts: {
|
|
130
|
+
readonly completed: boolean;
|
|
131
|
+
readonly notes: number;
|
|
132
|
+
readonly runs: number;
|
|
133
|
+
readonly workflows: number;
|
|
134
|
+
readonly compiledLately: boolean;
|
|
135
|
+
}) => boolean;
|
|
136
|
+
/** The threshold a compiled step's guard starts at (SPEC: the guard shape), until the host fits one on graded runs. */
|
|
137
|
+
export declare const GUARD_THRESHOLD = 0.7;
|
|
138
|
+
/** This host's addendum to the DSL's author contract: the node kinds it runs, and its rules, each one the checks hold a
|
|
139
|
+
* draft to (learn/skills.ts draftProblems; propose.ts). `jev`: the run can call Jev (one of its decision providers,
|
|
140
|
+
* not denied), so every step is asked for a guard Jev reads. */
|
|
141
|
+
export declare function learnedHost(options: {
|
|
142
|
+
readonly tools: readonly string[];
|
|
143
|
+
readonly judges: boolean;
|
|
144
|
+
readonly jev?: boolean;
|
|
145
|
+
}): AuthorHostAddendum;
|
|
146
|
+
/** The workflow language for the compile turn, generated: the DSL's own author contract (rendered from its vocabulary, so
|
|
147
|
+
* it names exactly the kinds, fields and predicates its validator admits) with this host's addendum. */
|
|
148
|
+
export declare const compileReference: (dsl: {
|
|
149
|
+
readonly authorContract: (options: {
|
|
150
|
+
host?: AuthorHostAddendum;
|
|
151
|
+
}) => string;
|
|
152
|
+
}, options: {
|
|
153
|
+
readonly tools: readonly string[];
|
|
154
|
+
readonly judges: boolean;
|
|
155
|
+
readonly jev?: boolean;
|
|
156
|
+
}) => string;
|
|
157
|
+
/** The worked example's input, as a run gives it. */
|
|
158
|
+
export declare const EXAMPLE_INPUT: {
|
|
159
|
+
readonly content: "Refund request: order 1043, a $42 kettle that arrived broken, bought 9 days ago.";
|
|
160
|
+
};
|
|
161
|
+
/** The worked example: a whole job, input to answer, that the checks and the dry run pass (a test holds it to them).
|
|
162
|
+
* An extract step reads the facts, a judge asks one typed question of them (with a decision provider), a decide step
|
|
163
|
+
* answers, and an escalate step hands back a case the policy does not cover. With Jev (`jev`) each judgment step is
|
|
164
|
+
* guarded on its own confidence and Jev's (`both`) and the extract step on Jev's; without, the judgment steps on their
|
|
165
|
+
* own confidence alone. */
|
|
166
|
+
export declare function compileExample(judges: boolean, jev?: boolean): Record<string, unknown>;
|
|
167
|
+
/** Whether `text` is a compile ask: `again` for an attempt the checks sent back, true for the first, else false. */
|
|
168
|
+
export declare const askedForCompile: (text: unknown) => "again" | boolean;
|
|
169
|
+
/** What a compiled workflow gives (#2412): the job's answer as the runs gave it, never a summary of it. */
|
|
170
|
+
export declare const OUTPUT_FORMAT = "Its output is the job's answer in the output format your runs gave it, and your skill's when one gives a format: its last node writes it, and `output` names that node's state.";
|
|
171
|
+
/** What the compile turn is told of the agent's output schema, shown whole after it. */
|
|
172
|
+
export declare const SHAPE_LINE = "The workflow's final output must be this object: this agent's output schema. A run it serves answers with its output shaped to it, and an output that can't be (one field where it asks for more) hands every run back. Make the schema its `output` names this one, every field, and have its last node write the whole object: the host's dry run holds its answer to it.";
|
|
173
|
+
/** The compile turn's message. */
|
|
174
|
+
export declare function compilePrompt(ask: CompileAsk): string;
|
|
175
|
+
/** The compile turn asked again: what the checks refused (`errors`, their words, made from the draft's own text, so
|
|
176
|
+
* fenced as data), and the attempt it was. */
|
|
177
|
+
export declare function compileAgain(errors: readonly string[], attempt: number): string;
|
|
178
|
+
/** A compile answer read: the draft's block whole (to check), its name and the notes it says it carries out (only ones
|
|
179
|
+
* the turn was given); `unchanged` for a revision the model kept as it is (never a held one's); else why it can't be
|
|
180
|
+
* read. */
|
|
181
|
+
export type CompileRead = {
|
|
182
|
+
readonly ok: true;
|
|
183
|
+
readonly name: string;
|
|
184
|
+
readonly block: string;
|
|
185
|
+
readonly from_notes: readonly string[];
|
|
186
|
+
} | {
|
|
187
|
+
readonly ok: false;
|
|
188
|
+
readonly unchanged: true;
|
|
189
|
+
} | {
|
|
190
|
+
readonly ok: false;
|
|
191
|
+
readonly error: string;
|
|
192
|
+
};
|
|
193
|
+
/** The compile turn's answer, read: exactly one ````workflow <name> block (a revision's under its own name). */
|
|
194
|
+
export declare function readCompile(answer: string, ask: CompileAsk): CompileRead;
|
|
195
|
+
/** The look-back's answer with the compiled draft in it: its notes and skills (each in a four-backtick block, which reads
|
|
196
|
+
* back as it was read), any draft of its own left out, then `block`. An answer that did not parse gives the draft alone. */
|
|
197
|
+
export declare function withCompiled(answer: string, block: string): string;
|
|
198
|
+
/** What the checks made of an answer, as far as the compile step reads it (runner/reflect-hook.ts Checked). */
|
|
199
|
+
type CheckedLike = {
|
|
200
|
+
readonly state: "proposed";
|
|
201
|
+
readonly workflows: number;
|
|
202
|
+
readonly left?: readonly unknown[];
|
|
203
|
+
readonly proposal: unknown;
|
|
204
|
+
} | {
|
|
205
|
+
readonly state: "dropped";
|
|
206
|
+
readonly reason: string;
|
|
207
|
+
readonly detail?: string;
|
|
208
|
+
readonly problems?: readonly unknown[];
|
|
209
|
+
};
|
|
210
|
+
/** Why the checks did not keep draft `name` from `checked` (each problem's words, its path's in front when it names
|
|
211
|
+
* another file); none when its workflow.json is in the proposal. */
|
|
212
|
+
export declare function draftErrorsOf(checked: CheckedLike | undefined, name: string): string[];
|
|
213
|
+
/** What a draft's guards leave out of the ones the compile turn asked for (learnedHost's rules), one line each: a
|
|
214
|
+
* judgment step with no guard; with Jev, an extract or call step with none, or one reading its own confidence (it
|
|
215
|
+
* reports none); without Jev, a guard that reads it (it would hand every case back). None when every one is there. */
|
|
216
|
+
export declare function guardProblems(doc: unknown, options: {
|
|
217
|
+
readonly jev: boolean;
|
|
218
|
+
}): string[];
|
|
219
|
+
/** The record's workflow when no attempt named one. */
|
|
220
|
+
export declare const UNNAMED = "(unnamed)";
|
|
221
|
+
/** The compile turn, start to end: ask, read, check (`check` over the look-back's answer with the draft in it, then the
|
|
222
|
+
* guards the turn asked for, guardProblems), and on a refusal ask again with the errors, at most 1 + COMPILE_RETRIES
|
|
223
|
+
* times and within `deadlineMs`. What it ends with: `kept` with the answer and what the checks made of it when an
|
|
224
|
+
* attempt passed; else none, with every attempt. Notes over NOTES_MAX ask nothing: one attempt says why. */
|
|
225
|
+
export declare function compileTurn<C extends CheckedLike>(input: {
|
|
226
|
+
/** One attempt's ask (`attempt` from 1), within `deadlineMs`: its answer, or undefined when the turn timed out or failed. */
|
|
227
|
+
readonly ask: (prompt: string, attempt: number, deadlineMs: number) => Promise<{
|
|
228
|
+
answer: string;
|
|
229
|
+
} | undefined>;
|
|
230
|
+
readonly compile: CompileAsk;
|
|
231
|
+
readonly answer: string;
|
|
232
|
+
readonly check: (answer: string) => Promise<C | undefined>;
|
|
233
|
+
readonly deadlineMs?: number;
|
|
234
|
+
readonly now?: () => number;
|
|
235
|
+
}): Promise<{
|
|
236
|
+
record?: CompiledRecord;
|
|
237
|
+
kept?: {
|
|
238
|
+
answer: string;
|
|
239
|
+
checked: C;
|
|
240
|
+
};
|
|
241
|
+
draftErrors: string[];
|
|
242
|
+
}>;
|
|
243
|
+
export {};
|