@parcha/agentrun-serve 0.1.0-beta.35 → 0.1.0-beta.37
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 +298 -0
- package/README.md +417 -219
- package/dist/adapters.d.ts +12 -2
- package/dist/adapters.js +27 -2
- package/dist/agent-rows.d.ts +2 -1
- package/dist/agents-store.d.ts +2 -0
- package/dist/agents-store.js +9 -4
- package/dist/api-only.d.ts +2 -1
- package/dist/api-only.js +3 -1
- package/dist/archil-routes.d.ts +40 -7
- package/dist/archil-routes.js +167 -54
- package/dist/archil-settings.d.ts +79 -7
- package/dist/archil-settings.js +140 -14
- 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/attach-images.d.ts +15 -0
- package/dist/attach-images.js +59 -0
- package/dist/background.d.ts +0 -6
- package/dist/background.js +0 -28
- package/dist/box-image.d.ts +1 -97
- package/dist/box-image.js +4 -284
- package/dist/box-paths.d.ts +2 -7
- package/dist/box-paths.js +7 -13
- package/dist/box-settings.d.ts +0 -11
- package/dist/box-settings.js +4 -29
- package/dist/browser-commands.js +1 -1
- package/dist/browser-computer.d.ts +47 -3
- package/dist/browser-computer.js +286 -18
- package/dist/browser-cost.d.ts +1 -1
- package/dist/browser-live.d.ts +20 -8
- package/dist/browser-live.js +50 -27
- package/dist/browser-person.d.ts +19 -2
- package/dist/browser-person.js +55 -6
- package/dist/browser-wait-ended.d.ts +23 -0
- package/dist/browser-wait-ended.js +42 -0
- package/dist/cap.d.ts +12 -57
- package/dist/cap.js +20 -160
- package/dist/catalog.d.ts +1 -12
- package/dist/catalog.js +3 -33
- package/dist/cli.js +17 -26
- package/dist/composio-preset.d.ts +36 -0
- package/dist/composio-preset.js +179 -0
- package/dist/computer-attach.d.ts +125 -0
- package/dist/computer-attach.js +330 -0
- package/dist/computer-calls.d.ts +48 -0
- package/dist/computer-calls.js +126 -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 +160 -0
- package/dist/computer-live.js +643 -0
- package/dist/computer-routes.d.ts +1 -4
- package/dist/computer-routes.js +3 -5
- package/dist/computer-setting.d.ts +2 -0
- package/dist/computer-setting.js +38 -1
- package/dist/computer-view.d.ts +24 -2
- package/dist/computer-view.js +51 -3
- package/dist/computer-viewer.d.ts +6 -0
- package/dist/computer-viewer.js +297 -0
- package/dist/computers.d.ts +79 -12
- package/dist/computers.js +147 -28
- package/dist/console/assets/index-Cn6JX1uH.js +563 -0
- package/dist/console/assets/index-DRN62V5v.css +1 -0
- package/dist/console/index.html +2 -2
- package/dist/docker-daemon.d.ts +2 -2
- package/dist/docker-daemon.js +2 -2
- package/dist/errors.js +5 -5
- package/dist/faux-computers.d.ts +9 -20
- package/dist/faux-computers.js +56 -24
- package/dist/files.d.ts +1 -9
- package/dist/files.js +1 -9
- package/dist/github-connection.d.ts +10 -2
- package/dist/github-connection.js +65 -2
- package/dist/github-faux.js +1 -1
- package/dist/github.d.ts +22 -2
- package/dist/github.js +42 -8
- package/dist/gpu-words.d.ts +14 -0
- package/dist/gpu-words.js +21 -0
- package/dist/graph-view.d.ts +3 -1
- package/dist/graph-view.js +25 -1
- package/dist/handed-values.d.ts +1 -1
- package/dist/handed-values.js +1 -1
- package/dist/harness-install.d.ts +60 -3
- package/dist/harness-install.js +322 -34
- package/dist/harness.d.ts +1 -0
- package/dist/harness.js +36 -2
- package/dist/host-tools.d.ts +9 -10
- package/dist/host-tools.js +7 -7
- package/dist/hosted-search.d.ts +5 -4
- package/dist/hosted-search.js +2 -7
- 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/index.d.ts +1 -3
- package/dist/index.js +1 -2
- package/dist/key-refusal.d.ts +1 -1
- package/dist/key-refusal.js +2 -2
- package/dist/learn/check.d.ts +11 -2
- package/dist/learn/check.js +124 -6
- package/dist/learn/commit.d.ts +43 -7
- package/dist/learn/commit.js +166 -22
- package/dist/learn/folder.d.ts +11 -0
- package/dist/learn/folder.js +37 -1
- package/dist/learn/general.d.ts +66 -0
- package/dist/learn/general.js +73 -0
- package/dist/learn/grade.d.ts +22 -1
- package/dist/learn/grade.js +107 -16
- package/dist/learn/index.d.ts +1 -1
- package/dist/learn/index.js +1 -1
- package/dist/learn/learning.sh +12 -1
- package/dist/learn/notes.d.ts +3 -0
- package/dist/learn/notes.js +3 -0
- package/dist/learn/reflect.d.ts +14 -2
- package/dist/learn/reflect.js +54 -30
- package/dist/learn/skills.d.ts +37 -5
- package/dist/learn/skills.js +60 -7
- package/dist/learned-nodes.d.ts +6 -2
- package/dist/learned-workflow.d.ts +43 -9
- package/dist/learned-workflow.js +128 -37
- package/dist/learning-batch.d.ts +283 -0
- package/dist/learning-batch.js +574 -0
- package/dist/learning-cost.d.ts +79 -0
- package/dist/learning-cost.js +69 -0
- package/dist/learning-evals.d.ts +33 -0
- package/dist/learning-evals.js +98 -0
- package/dist/learning-routes.d.ts +32 -4
- package/dist/learning-routes.js +48 -12
- package/dist/learning-words.d.ts +9 -0
- package/dist/learning-words.js +12 -2
- package/dist/learning.d.ts +39 -19
- package/dist/learning.js +88 -46
- 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/mcp-gateway.d.ts +9 -0
- package/dist/mcp-gateway.js +60 -11
- package/dist/mcp-oauth.d.ts +57 -7
- package/dist/mcp-oauth.js +133 -18
- package/dist/mcp-private-hosts.d.ts +4 -4
- package/dist/mcp-private-hosts.js +20 -12
- package/dist/mcp-probe.d.ts +27 -3
- package/dist/mcp-probe.js +106 -29
- package/dist/mcp-secret-writes.js +8 -0
- package/dist/mcp-servers-store.d.ts +38 -15
- package/dist/mcp-servers-store.js +120 -23
- package/dist/mcp-store.d.ts +10 -4
- package/dist/mcp-store.js +17 -6
- package/dist/model-form.d.ts +26 -0
- package/dist/model-form.js +80 -0
- package/dist/model.d.ts +5 -5
- package/dist/model.js +29 -16
- package/dist/openapi.d.ts +2 -0
- package/dist/openapi.js +586 -64
- package/dist/owner.d.ts +0 -1
- package/dist/owner.js +0 -2
- package/dist/page.d.ts +18 -0
- package/dist/page.js +48 -20
- package/dist/paid-calls.d.ts +1 -1
- package/dist/paid-calls.js +1 -1
- package/dist/place-offers.d.ts +96 -0
- package/dist/place-offers.js +202 -0
- package/dist/place.d.ts +9 -13
- package/dist/place.js +21 -32
- package/dist/port-models.d.ts +2 -1
- package/dist/port-models.js +5 -3
- package/dist/print.d.ts +16 -9
- package/dist/print.js +15 -17
- package/dist/propose.d.ts +4 -0
- package/dist/propose.js +34 -11
- package/dist/provider.js +3 -2
- package/dist/reflect-range.d.ts +8 -1
- package/dist/reflect-range.js +1 -1
- package/dist/run-cut.d.ts +5 -0
- package/dist/run-cut.js +19 -0
- package/dist/run-launch.d.ts +28 -3
- package/dist/run-launch.js +14 -4
- package/dist/run-learning-served.d.ts +2 -2
- package/dist/run-manifest.d.ts +2 -2
- package/dist/run-manifest.js +2 -2
- 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 +3 -3
- package/dist/run-timeline-served.d.ts +1 -1
- package/dist/run-timeline-served.js +56 -44
- package/dist/run-view.d.ts +8 -5
- package/dist/run-view.js +18 -10
- package/dist/runnable.d.ts +2 -2
- package/dist/runnable.js +6 -2
- package/dist/runner/adapter-loop.d.ts +39 -8
- package/dist/runner/adapter-loop.js +770 -83
- package/dist/runner/adapter-run-spec.d.ts +36 -7
- package/dist/runner/adapter-run-spec.js +171 -37
- package/dist/runner/adapters/pi-computer.d.ts +7 -0
- package/dist/runner/adapters/pi-computer.js +43 -0
- package/dist/runner/adapters/pi.d.ts +20 -7
- package/dist/runner/adapters/pi.js +111 -26
- package/dist/runner/beside.d.ts +7 -3
- package/dist/runner/beside.js +26 -12
- 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 +27 -3
- package/dist/runner/cli-run-spec.js +198 -74
- package/dist/runner/commands.d.ts +8 -2
- package/dist/runner/commands.js +31 -6
- package/dist/runner/computer-channel.d.ts +34 -0
- package/dist/runner/computer-channel.js +61 -0
- package/dist/runner/conformance/harness.d.ts +0 -1
- package/dist/runner/conformance/harness.js +87 -18
- package/dist/runner/conformance/subject.d.ts +1 -1
- package/dist/runner/dispatch.js +3 -0
- package/dist/runner/end-of-run.d.ts +22 -12
- package/dist/runner/end-of-run.js +38 -16
- package/dist/runner/github-app.d.ts +2 -1
- package/dist/runner/github-app.js +6 -4
- package/dist/runner/harness-loops.js +16 -2
- package/dist/runner/held-run.d.ts +65 -0
- package/dist/runner/held-run.js +158 -0
- package/dist/runner/journal-kinds.d.ts +35 -6
- package/dist/runner/journal-kinds.js +20 -1
- 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 +37 -1
- package/dist/runner/learning-end.js +115 -14
- package/dist/runner/learning-factory.d.ts +1 -1
- package/dist/runner/learning-factory.js +15 -5
- package/dist/runner/learning-loop.d.ts +139 -7
- package/dist/runner/learning-loop.js +369 -32
- package/dist/runner/learning-seed.d.ts +9 -0
- package/dist/runner/learning-seed.js +14 -1
- package/dist/runner/live-ticker.js +1 -0
- package/dist/runner/loop-contract.d.ts +16 -1
- package/dist/runner/loop-contract.js +6 -0
- package/dist/runner/loop.d.ts +10 -2
- package/dist/runner/loop.js +22 -1
- package/dist/runner/main.d.ts +13 -1
- package/dist/runner/main.js +38 -6
- package/dist/runner/mcp-claim.d.ts +11 -4
- package/dist/runner/mcp-claim.js +140 -23
- package/dist/runner/mcp-github.d.ts +4 -2
- package/dist/runner/mcp-github.js +1 -8
- package/dist/runner/mcp-run.d.ts +6 -4
- package/dist/runner/mcp-run.js +16 -3
- package/dist/runner/metrics.d.ts +15 -2
- package/dist/runner/metrics.js +21 -2
- package/dist/runner/model-route.d.ts +3 -0
- package/dist/runner/model-route.js +5 -2
- package/dist/runner/pr-checkout.d.ts +60 -0
- package/dist/runner/pr-checkout.js +176 -0
- package/dist/runner/reflect-hook.d.ts +19 -0
- package/dist/runner/reflect-hook.js +20 -8
- package/dist/runner/runner.d.ts +26 -0
- package/dist/runner/runner.js +231 -27
- package/dist/runner/scratch-sweep.d.ts +13 -0
- package/dist/runner/scratch-sweep.js +62 -0
- package/dist/runner/sessions.d.ts +1 -1
- package/dist/runner/spec-holds.d.ts +8 -3
- package/dist/runner/spec-holds.js +12 -10
- package/dist/runner/store-port.d.ts +7 -2
- package/dist/runner/store-secrets.js +21 -4
- package/dist/runner/subagent.d.ts +44 -0
- package/dist/runner/subagent.js +190 -0
- package/dist/runner/workflow-host.d.ts +24 -3
- package/dist/runner/workflow-host.js +24 -4
- package/dist/runner/workflow-loop.d.ts +6 -3
- package/dist/runner/workflow-loop.js +9 -8
- package/dist/runner/workflow-spec.d.ts +39 -15
- package/dist/runner/workflow-spec.js +143 -40
- package/dist/runs-over-store.d.ts +16 -6
- package/dist/runs-over-store.js +145 -29
- 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/sealing.js +1 -2
- package/dist/secret-cut.d.ts +1 -1
- package/dist/secret-cut.js +1 -1
- 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 +75 -63
- package/dist/server.js +712 -316
- package/dist/settings-wake.d.ts +21 -0
- package/dist/settings-wake.js +59 -0
- package/dist/standard-webhooks.d.ts +4 -1
- package/dist/standard-webhooks.js +8 -4
- package/dist/store/agent-body.d.ts +9 -2
- package/dist/store/agent-body.js +16 -8
- package/dist/store/command-wake.d.ts +12 -0
- package/dist/store/command-wake.js +37 -0
- package/dist/store/deadline.js +9 -5
- package/dist/store/dialect.d.ts +6 -0
- package/dist/store/dialect.js +5 -0
- package/dist/store/index.d.ts +4 -4
- package/dist/store/index.js +2 -2
- package/dist/store/journal/storage.d.ts +3 -2
- package/dist/store/journal/storage.js +15 -6
- package/dist/store/postgres/connection.js +9 -4
- package/dist/store/postgres/dialect.js +4 -0
- package/dist/store/postgres/migrations/0004_runs_outcome_stop_or_cancel.sql +11 -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/schema.d.ts +2 -1
- package/dist/store/schema.js +85 -13
- package/dist/store/seal.d.ts +13 -0
- package/dist/store/seal.js +19 -0
- package/dist/store/sqlite/connection.d.ts +5 -0
- package/dist/store/sqlite/connection.js +88 -47
- package/dist/store/sqlite/run-patch.d.ts +25 -7
- package/dist/store/sqlite/run-patch.js +58 -14
- package/dist/store/sqlite/store.js +331 -59
- package/dist/store/store.d.ts +330 -21
- package/dist/store/store.js +34 -2
- package/dist/store-reads/analytics.js +3 -2
- package/dist/store-reads/cap.d.ts +2 -4
- package/dist/store-reads/cap.js +16 -7
- package/dist/store-reads/decisions.d.ts +3 -3
- package/dist/store-reads/decisions.js +3 -6
- package/dist/store-reads/import-summary.d.ts +1 -1
- package/dist/store-reads/journal.d.ts +5 -4
- package/dist/store-reads/journal.js +118 -27
- package/dist/store-reads/learning.d.ts +34 -4
- package/dist/store-reads/learning.js +137 -23
- package/dist/store-reads/runs.d.ts +7 -5
- package/dist/store-reads/runs.js +17 -10
- package/dist/store-reads/stats.js +5 -1
- package/dist/store-reads/workflow.d.ts +1 -1
- package/dist/store-view.d.ts +5 -0
- package/dist/store-view.js +70 -29
- package/dist/template-eval.js +8 -5
- package/dist/template-github-permissions.d.ts +22 -8
- package/dist/template-github-permissions.js +35 -15
- package/dist/templates.d.ts +64 -0
- package/dist/templates.js +101 -16
- package/dist/timeline/timeline.d.ts +30 -1
- package/dist/timeline/timeline.js +29 -13
- package/dist/timeline/util.d.ts +4 -0
- package/dist/timeline/util.js +14 -0
- package/dist/tool-blurbs.js +1 -0
- package/dist/tool-budget.d.ts +27 -7
- package/dist/tool-budget.js +21 -9
- package/dist/tool-gate.d.ts +23 -10
- package/dist/tool-gate.js +60 -44
- package/dist/tool-plane.d.ts +46 -28
- package/dist/tool-plane.js +73 -31
- package/dist/tools.d.ts +31 -38
- package/dist/tools.js +117 -74
- 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 +26 -6
- package/dist/trigger-signatures.js +44 -8
- 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 +10 -6
- package/dist/triggers.js +37 -7
- package/dist/turn-end.d.ts +0 -3
- package/dist/turn-end.js +0 -3
- package/dist/turns.js +16 -1
- package/dist/usage-lines.d.ts +1 -1
- package/dist/validate.d.ts +6 -0
- package/dist/validate.js +41 -4
- package/dist/web-fetch.d.ts +1 -1
- package/dist/web-search.d.ts +10 -5
- package/dist/web-search.js +7 -6
- package/dist/webhooks.d.ts +147 -103
- package/dist/webhooks.js +564 -324
- package/dist/workflow/decision-recovery.d.ts +23 -0
- package/dist/workflow/decision-recovery.js +80 -0
- package/dist/workflow/decisions.d.ts +134 -0
- package/dist/workflow/decisions.js +46 -0
- package/dist/workflow/host-session.d.ts +5 -0
- package/dist/workflow/host-session.js +85 -0
- package/dist/workflow/host-tools.d.ts +3 -0
- package/dist/workflow/host-tools.js +3 -0
- package/dist/workflow/node-runner.d.ts +113 -0
- package/dist/workflow/node-runner.js +270 -0
- package/dist/workflow/node.d.ts +89 -0
- package/dist/workflow/node.js +101 -0
- package/dist/workflow/operator-error.d.ts +4 -0
- package/dist/workflow/operator-error.js +4 -0
- package/dist/workflow/pi-versions.d.ts +32 -0
- package/dist/workflow/pi-versions.js +65 -0
- package/dist/workflow/record-file.d.ts +10 -0
- package/dist/workflow/record-file.js +56 -0
- package/dist/workflow/record-tool.d.ts +77 -0
- package/dist/workflow/record-tool.js +126 -0
- package/dist/workflow/record.d.ts +151 -0
- package/dist/workflow/record.js +401 -0
- package/dist/workflow/run-error.d.ts +16 -0
- package/dist/workflow/run-error.js +26 -0
- package/dist/workflow/runner.d.ts +6 -0
- package/dist/workflow/runner.js +240 -0
- package/dist/workflow/store.d.ts +23 -0
- package/dist/workflow/store.js +242 -0
- package/dist/workflow/task.d.ts +133 -0
- package/dist/workflow/task.js +412 -0
- package/dist/workflow/thinking.d.ts +3 -0
- package/dist/workflow/thinking.js +7 -0
- package/dist/workflow/tool-context.d.ts +21 -0
- package/dist/workflow/tool-context.js +13 -0
- package/dist/workflow/types.d.ts +126 -0
- package/dist/workflow/types.js +1 -0
- package/dist/workflow-run.d.ts +2 -2
- package/dist/workspace/agent-computer.d.ts +137 -0
- package/dist/workspace/agent-computer.js +292 -0
- package/dist/workspace/archil-claim.d.ts +11 -0
- package/dist/workspace/archil-claim.js +18 -10
- package/dist/workspace/archil-disks.d.ts +49 -0
- package/dist/workspace/archil-disks.js +185 -0
- package/dist/workspace/archil-exec.js +2 -3
- package/dist/workspace/archil-mount-credential.d.ts +20 -4
- package/dist/workspace/archil-mount-credential.js +13 -4
- package/dist/workspace/attached-computers.d.ts +41 -0
- package/dist/workspace/attached-computers.js +114 -0
- package/dist/workspace/computer-deps.d.ts +32 -17
- package/dist/workspace/computer-deps.js +37 -14
- package/dist/workspace/computer-for-claim.d.ts +58 -13
- package/dist/workspace/computer-for-claim.js +267 -26
- package/dist/workspace/computer-hold.d.ts +11 -27
- package/dist/workspace/computer-hold.js +36 -56
- package/dist/workspace/computer-janitor.d.ts +3 -2
- package/dist/workspace/computer-janitor.js +43 -9
- package/dist/workspace/computer-ledger.d.ts +5 -1
- package/dist/workspace/computer-ledger.js +11 -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 +37 -0
- package/dist/workspace/computer-script.js +138 -0
- package/dist/workspace/executors.d.ts +1 -1
- package/dist/workspace/index.d.ts +7 -4
- package/dist/workspace/index.js +4 -1
- package/dist/workspace/kind-skills/desktop/SKILL.md +119 -84
- package/dist/workspace/kind-skills/phone/SKILL.md +100 -85
- package/dist/workspace/resolve-computer.d.ts +45 -11
- package/dist/workspace/resolve-computer.js +72 -14
- package/dist/workspace/run-disk.d.ts +34 -0
- package/dist/workspace/run-disk.js +91 -0
- package/dist/workspace/run-tools.d.ts +35 -18
- package/dist/workspace/run-tools.js +24 -29
- package/dist/workspace/server-run-workspace.d.ts +3 -2
- package/dist/workspace/server-run-workspace.js +17 -4
- package/dist/workspace.js +1 -1
- package/package.json +19 -21
- package/templates/README.md +9 -6
- package/templates/code-review/agent.md +27 -11
- package/templates/code-review/evals/clean-refactor/graders/coverage.md +4 -0
- package/templates/code-review/evals/clean-refactor/graders/risk.md +5 -0
- package/templates/code-review/evals/injection/graders/ignores.md +1 -1
- package/templates/code-review/evals/never-flag/case.yaml +3 -0
- package/templates/code-review/evals/never-flag/graders/only-p0.md +4 -0
- package/templates/code-review/evals/never-flag/graders/schema.md +5 -0
- package/templates/code-review/evals/never-flag/prompt.md +30 -0
- package/templates/code-review/evals/null-name/graders/finds.md +1 -1
- package/templates/code-review/evals/off-by-one/graders/finds.md +1 -1
- package/templates/code-review/evals/off-by-one/graders/no-repo-reads.md +6 -5
- package/templates/code-review/evals/re-review/graders/resolves.md +1 -1
- package/templates/code-review/evals/re-review/prompt.md +1 -1
- package/templates/code-review/evals/re-review-open/case.yaml +3 -0
- package/templates/code-review/evals/re-review-open/graders/schema.md +5 -0
- package/templates/code-review/evals/re-review-open/graders/stays-open.md +4 -0
- package/templates/code-review/evals/re-review-open/prompt.md +27 -0
- package/templates/code-review/evals/repo-rule/graders/cites.md +1 -1
- package/templates/code-review/evals/two-defects/case.yaml +3 -0
- package/templates/code-review/evals/two-defects/graders/both.md +4 -0
- package/templates/code-review/evals/two-defects/graders/schema.md +5 -0
- package/templates/code-review/evals/two-defects/prompt.md +25 -0
- package/templates/code-review/findings.schema.json +131 -27
- package/templates/code-review/rules/CODEREVIEW.md +76 -0
- package/templates/code-review/skills/review/DEEP.md +130 -0
- package/templates/code-review/skills/review/REVIEWER.md +116 -0
- package/templates/code-review/skills/review/SKILL.md +104 -154
- package/templates/market-monitor/agent.md +1 -1
- package/dist/box/record.d.ts +0 -6
- package/dist/box/record.js +0 -41
- package/dist/box/sweep.d.ts +0 -53
- package/dist/box/sweep.js +0 -193
- package/dist/box-egress-vm.d.ts +0 -118
- package/dist/box-egress-vm.js +0 -354
- package/dist/box-egress.d.ts +0 -105
- package/dist/box-egress.js +0 -256
- package/dist/box-relay-vm.d.ts +0 -84
- package/dist/box-relay-vm.js +0 -437
- package/dist/box-relay.d.ts +0 -36
- package/dist/box-relay.js +0 -207
- package/dist/boxes.d.ts +0 -109
- package/dist/boxes.js +0 -249
- package/dist/budget.d.ts +0 -71
- package/dist/budget.js +0 -199
- package/dist/console/assets/index-B7NKTU8E.css +0 -1
- package/dist/console/assets/index-CXZMgJE7.js +0 -550
- package/dist/daytona-api.d.ts +0 -10
- package/dist/daytona-api.js +0 -20
- package/dist/egress-proxy.d.ts +0 -45
- package/dist/egress-proxy.js +0 -416
- package/dist/egress-table.d.ts +0 -24
- package/dist/egress-table.js +0 -165
- package/dist/run-db.d.ts +0 -53
- package/dist/run-db.js +0 -116
- package/templates/code-review/rules/REVIEW.md +0 -41
package/dist/learn/commit.js
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
// the folder's snapshot and the bodies it names. A main that moved under it (the script's exit 3) is computed again on
|
|
5
5
|
// the main that won, as long as no oid the caller read (`graded`, `ifMatch`) changed: a change it did not see is a
|
|
6
6
|
// conflict, never written over. A folder with no main yet is made in the same call (the script's init first).
|
|
7
|
-
import { isHeld, held } from "./skills.js";
|
|
8
|
-
import { buildIndex, INDEX_FILE, INDEX_LINES, mergedNote, NOTE_FILE, parseNoteFile, supersede } from "./notes.js";
|
|
7
|
+
import { isHeld, held, retiredLearned } from "./skills.js";
|
|
8
|
+
import { buildIndex, INDEX_FILE, INDEX_LINES, mergedNote, NOTE_FILE, parseNoteFile, ruleOf, supersede } from "./notes.js";
|
|
9
9
|
import { mergeProblems, supersededBy } from "./check.js";
|
|
10
|
-
import { FolderRefused, FolderTooLarge, readLearning, readRunDiff, readSnapshot, snapshotNotes, topOf, writeLearning } from "./folder.js";
|
|
10
|
+
import { FolderRefused, FolderTooLarge, readLearning, readRunDiff, readSnapshot, runDiffKey, snapshotNotes, textsAt, topOf, writeLearning } from "./folder.js";
|
|
11
11
|
/** The blob `path` is on the snapshot's main: the index, a note, a learned folder's file. */
|
|
12
12
|
function blobOf(snapshot, path) {
|
|
13
13
|
if (!snapshot)
|
|
@@ -39,22 +39,32 @@ function heldText(path, text) {
|
|
|
39
39
|
/**
|
|
40
40
|
* One write on the folder's main, one exec of the learning script: a run's merge or a person's write, as `change` says.
|
|
41
41
|
* `ok` with the new main (its commit) and the paths the commit changed; `conflict` when an oid the caller read is
|
|
42
|
-
* another blob on main now; `refused` when the folder as it would be is refused (
|
|
43
|
-
*
|
|
42
|
+
* another blob on main now; `refused` when the folder as it would be is refused (the index past its lines, a note out
|
|
43
|
+
* of shape); a new note named like one main holds, or of a rule one holds, is left out alone (`left`); `unavailable` when the workspace or the exec failed (retry later). A merge whose
|
|
44
44
|
* run already merged here is `ok` with the commit that holds it, and writes nothing.
|
|
45
45
|
*/
|
|
46
46
|
export async function learningCommit(ws, change, opts = {}) {
|
|
47
47
|
try {
|
|
48
48
|
if (change.kind === "merge") {
|
|
49
|
-
const known = await readRunDiff(ws, change.runId);
|
|
49
|
+
const known = await readRunDiff(ws, runDiffKey(change.runId, change.round));
|
|
50
50
|
if (known) {
|
|
51
|
-
|
|
51
|
+
// Its merge is on main already (a retry after a crash, say): the new notes it did not write it left out, said
|
|
52
|
+
// again as the merge's own settle says them against main now (`taken` for a name main holds with another rule,
|
|
53
|
+
// else `same`), so a resumed merge says what the first said.
|
|
54
|
+
const written = new Set(known.files.map((file) => file.path));
|
|
55
|
+
const unwritten = change.files.filter(({ path }) => isNote(path) && !written.has(path));
|
|
56
|
+
const left = unwritten.length ? await readLearning(ws, async ({ snapshot, body }) => {
|
|
57
|
+
const settled = new Map((await settledNotes({ ...change, files: unwritten }, snapshot, body)).map(({ path, reason }) => [path, reason]));
|
|
58
|
+
return unwritten.map(({ path }) => ({ path, reason: settled.get(path) === "taken" ? "taken" : "same" }));
|
|
59
|
+
}) : [];
|
|
60
|
+
return { ok: true, main: (await readSnapshot(ws))?.main ?? known.merge, commit: known.merge, files: [...written], ...(left.length ? { left } : {}), already: true };
|
|
52
61
|
}
|
|
53
62
|
}
|
|
54
63
|
const done = await writeLearning(ws, async ({ snapshot, body }) => (change.kind === "merge" ? mergeOf(change, snapshot, body) : personOf(change, snapshot)), opts.retries ?? 3);
|
|
55
64
|
if (!("pending" in done.result))
|
|
56
65
|
return done.result;
|
|
57
|
-
|
|
66
|
+
const left = done.result.left?.length ? { left: done.result.left } : {};
|
|
67
|
+
return { ok: true, main: done.main, commit: done.main, files: done.snapshot?.log[0]?.commit === done.main ? done.snapshot.log[0].files : [], ...left };
|
|
58
68
|
}
|
|
59
69
|
catch (error) {
|
|
60
70
|
// The script's exit 4: a file changed since the seed is a conflict; a name held on main by a file that is no note
|
|
@@ -73,23 +83,66 @@ export async function learningCommit(ws, change, opts = {}) {
|
|
|
73
83
|
* MEMORY.md rebuilt from what is active then. */
|
|
74
84
|
async function mergeOf(change, snapshot, body) {
|
|
75
85
|
const held = new Set(change.held ?? []);
|
|
86
|
+
const replaced = new Set(change.replace ?? []);
|
|
87
|
+
const left = await settledNotes(change, snapshot, body);
|
|
88
|
+
const leftOut = new Set(left.map(({ path }) => path));
|
|
76
89
|
// Each new note as main keeps it (mergedNote): its own origin, `status: pending` when held, the run's risky mark gone.
|
|
77
90
|
// A skill's SKILL.md or a draft's README.md held: `status: pending` last in its front matter.
|
|
78
|
-
const files = new Map(change.files.map(({ path, text }) => {
|
|
91
|
+
const files = new Map(change.files.filter(({ path }) => !leftOut.has(path)).map(({ path, text }) => {
|
|
79
92
|
if (isNote(path) && blobOf(snapshot, path) === undefined) {
|
|
80
93
|
const note = parseNoteFile(path, text);
|
|
81
94
|
return [path, Array.isArray(note) ? text : mergedNote(text, { origin: note.origin, pending: held.has(path) })];
|
|
82
95
|
}
|
|
83
96
|
return [path, held.has(path) ? heldText(path, text) : text];
|
|
84
97
|
}));
|
|
98
|
+
// Each re-filed skill main holds, not retired, retired in this write (`retire`), unless its note was left out as taken.
|
|
99
|
+
const retiring = [];
|
|
100
|
+
// The rules main's active notes hold now, apart from the notes this merge supersedes: a skill retires only while its rule
|
|
101
|
+
// has an active note, the re-filed note written here or another main holds as this merge commits (a person may have
|
|
102
|
+
// edited or retired it since the grade read main), so the rule is never left with no active copy.
|
|
103
|
+
const superseding = new Set([...(change.supersede ?? []).map(({ path }) => path), ...[...files].filter(([path]) => isNote(path) && !held.has(path)).flatMap(([path, text]) => {
|
|
104
|
+
const one = parseNoteFile(path, text);
|
|
105
|
+
return Array.isArray(one) ? [] : one.supersedes;
|
|
106
|
+
})]);
|
|
107
|
+
const holding = new Set();
|
|
108
|
+
if (change.retire?.length) {
|
|
109
|
+
for (const one of snapshotNotes(snapshot).filter((note) => note.status === "active" && !superseding.has(note.file))) {
|
|
110
|
+
const text = parseNoteFile(one.file, await body(one.file, blobOf(snapshot, one.file)));
|
|
111
|
+
if (!Array.isArray(text))
|
|
112
|
+
holding.add(ruleOf(text.body));
|
|
113
|
+
}
|
|
114
|
+
for (const [path, text] of files) {
|
|
115
|
+
// A replacement written here counts held or not: a pending note retires its skill as before (the owner's OK makes it
|
|
116
|
+
// the rule); only one that is not written at all (left out, or gone from main) must find another holder.
|
|
117
|
+
const one = isNote(path) ? parseNoteFile(path, text) : undefined;
|
|
118
|
+
if (one && !Array.isArray(one))
|
|
119
|
+
holding.add(ruleOf(one.body));
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
for (const { skill, note, rule } of change.retire ?? []) {
|
|
123
|
+
if (left.some((one) => one.path === note && one.reason === "taken"))
|
|
124
|
+
continue;
|
|
125
|
+
if (!holding.has(rule))
|
|
126
|
+
continue;
|
|
127
|
+
const oid = blobOf(snapshot, skill);
|
|
128
|
+
const item = snapshot?.skills.find((one) => one.files.some((file) => file.path === skill));
|
|
129
|
+
if (oid === undefined || !item || item.status === "retired")
|
|
130
|
+
continue;
|
|
131
|
+
files.set(skill, retiredLearned(await body(skill, oid)));
|
|
132
|
+
retiring.push(skill);
|
|
133
|
+
}
|
|
134
|
+
// Nothing left to write: every new note is one main holds already, or a name it holds. No commit.
|
|
135
|
+
if (![...files.keys()].length)
|
|
136
|
+
return { result: { ok: true, main: snapshot?.main ?? "", commit: snapshot?.main ?? "", files: [], left } };
|
|
85
137
|
const notes = snapshotNotes(snapshot);
|
|
86
138
|
const active = new Set(notes.filter((note) => note.status === "active").map((note) => note.file));
|
|
87
139
|
const refused = [];
|
|
88
|
-
const fresh = [...files].filter(([path]) => isNote(path) && blobOf(snapshot, path) === undefined).flatMap(([path, text]) => {
|
|
140
|
+
const fresh = [...files].filter(([path]) => isNote(path) && (blobOf(snapshot, path) === undefined || replaced.has(path))).flatMap(([path, text]) => {
|
|
89
141
|
const note = parseNoteFile(path, text);
|
|
90
142
|
return Array.isArray(note) ? [] : [note];
|
|
91
143
|
});
|
|
92
|
-
|
|
144
|
+
// A note written over main's by its own name supersedes that note by being it: never a mark of itself.
|
|
145
|
+
const marks = change.supersede ?? [...supersededBy(fresh)].filter(([path, by]) => path !== by).map(([path, by]) => ({ path, by }));
|
|
93
146
|
// The verdict was on the blobs the grade read: one this merge would write (mark or replace) that is another blob on
|
|
94
147
|
// main now is the caller's conflict, named by the note that would mark it. One it leaves alone (a held note marks
|
|
95
148
|
// nothing) is not written over, so it stands.
|
|
@@ -117,7 +170,7 @@ async function mergeOf(change, snapshot, body) {
|
|
|
117
170
|
// A merge adds notes and marks the ones they supersede: it never writes over another note main holds.
|
|
118
171
|
if (blobOf(snapshot, path) === undefined)
|
|
119
172
|
added.push(note);
|
|
120
|
-
else if (!marks.some((one) => one.path === path))
|
|
173
|
+
else if (!marks.some((one) => one.path === path) && !replaced.has(path))
|
|
121
174
|
refused.push({ rule: "exists", path, detail: "the folder has a note by this name" });
|
|
122
175
|
}
|
|
123
176
|
// mergeProblems asks of the new notes what a merge always asks: a free name, what they supersede active and named
|
|
@@ -129,15 +182,71 @@ async function mergeOf(change, snapshot, body) {
|
|
|
129
182
|
const marked = new Set(written.map((note) => note.file));
|
|
130
183
|
files.set(INDEX_FILE, buildIndex([...notes.filter((note) => !marked.has(note.file)), ...written]));
|
|
131
184
|
return {
|
|
132
|
-
result: { pending: true },
|
|
185
|
+
result: { pending: true, ...(left.length ? { left } : {}) },
|
|
133
186
|
change: {
|
|
134
|
-
by: { run: change.runId, reason: change.reason },
|
|
187
|
+
by: { run: change.runId, reason: change.reason, ...(change.round !== undefined && change.round > 1 ? { round: change.round } : {}) },
|
|
135
188
|
writes: [...files].map(([path, text]) => ({ path, text })),
|
|
136
189
|
absent: added.map((note) => note.file),
|
|
137
|
-
...(change.seed ? { same: change.files.filter(({ path }) => !isNote(path)).map(({ path }) => ({ commit: change.seed, path })) } : {}),
|
|
190
|
+
...(change.seed ? { same: [...change.files.filter(({ path }) => !isNote(path)).map(({ path }) => path), ...retiring].map((path) => ({ commit: change.seed, path })) } : {}),
|
|
138
191
|
},
|
|
139
192
|
};
|
|
140
193
|
}
|
|
194
|
+
/** Each new note of a merge settled against main as `snapshot` has it, one note at a time and never a refusal of the
|
|
195
|
+
* merge: a name main holds a note by (and the merge does not replace) is left out, `same` when main's note says the
|
|
196
|
+
* same rule, else `taken`; a rule main's active notes hold under another name, or an earlier note of this merge holds,
|
|
197
|
+
* is left out as `same` (notes.ts ruleOf), unless the note supersedes the note it repeats (an update). */
|
|
198
|
+
async function settledNotes(change, snapshot, body) {
|
|
199
|
+
const replaced = new Set(change.replace ?? []);
|
|
200
|
+
const left = [];
|
|
201
|
+
const newNotes = change.files.filter(({ path }) => isNote(path));
|
|
202
|
+
if (newNotes.length) {
|
|
203
|
+
// The notes this merge supersedes (its own marks, or what its new notes not held for the owner's OK supersede by
|
|
204
|
+
// their front matter) keep no rule after it: a copy of their rule under another name is no duplicate, so a rule is
|
|
205
|
+
// never left with no active note.
|
|
206
|
+
const held = new Set(change.held ?? []);
|
|
207
|
+
const going = new Set([...(change.supersede ?? []).map(({ path }) => path), ...newNotes.filter(({ path }) => !held.has(path)).flatMap(({ path, text }) => {
|
|
208
|
+
const note = parseNoteFile(path, text);
|
|
209
|
+
return Array.isArray(note) ? [] : note.supersedes;
|
|
210
|
+
})]);
|
|
211
|
+
const rules = new Map();
|
|
212
|
+
// Every rule main's active notes hold, whoever this merge supersedes: an update of that holder takes the rule over
|
|
213
|
+
// from an earlier note of this merge that repeated it, whatever their order.
|
|
214
|
+
const onMainRules = new Map();
|
|
215
|
+
for (const note of snapshotNotes(snapshot).filter((one) => one.status === "active")) {
|
|
216
|
+
const text = parseNoteFile(note.file, await body(note.file, blobOf(snapshot, note.file)));
|
|
217
|
+
if (Array.isArray(text))
|
|
218
|
+
continue;
|
|
219
|
+
onMainRules.set(ruleOf(text.body), note.file);
|
|
220
|
+
if (!going.has(note.file))
|
|
221
|
+
rules.set(ruleOf(text.body), note.file);
|
|
222
|
+
}
|
|
223
|
+
for (const { path, text } of newNotes) {
|
|
224
|
+
const note = parseNoteFile(path, text);
|
|
225
|
+
if (Array.isArray(note))
|
|
226
|
+
continue;
|
|
227
|
+
const rule = ruleOf(note.body);
|
|
228
|
+
const onMain = blobOf(snapshot, path);
|
|
229
|
+
if (onMain !== undefined && !replaced.has(path)) {
|
|
230
|
+
const theirs = parseNoteFile(path, await body(path, onMain));
|
|
231
|
+
// The same rule only when main's note keeps it active: a retired or superseded one is a name main holds.
|
|
232
|
+
left.push({ path, reason: !Array.isArray(theirs) && theirs.status === "active" && ruleOf(theirs.body) === rule ? "same" : "taken" });
|
|
233
|
+
continue;
|
|
234
|
+
}
|
|
235
|
+
const holder = rules.get(rule);
|
|
236
|
+
if (holder !== undefined && holder !== path && !note.supersedes.includes(holder)) {
|
|
237
|
+
const original = onMainRules.get(rule);
|
|
238
|
+
// An update of the rule's holder on main, after a copy of it: the update holds the rule, the copy is the repeat.
|
|
239
|
+
if (original === undefined || holder === original || !note.supersedes.includes(original) || held.has(path)) {
|
|
240
|
+
left.push({ path, reason: "same" });
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
243
|
+
left.push({ path: holder, reason: "same" });
|
|
244
|
+
}
|
|
245
|
+
rules.set(rule, path);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
return left;
|
|
249
|
+
}
|
|
141
250
|
/** A person's write on main as the snapshot has it: the file and what the action also changes, MEMORY.md rebuilt. */
|
|
142
251
|
async function personOf(change, snapshot) {
|
|
143
252
|
const current = blobOf(snapshot, change.file);
|
|
@@ -159,24 +268,59 @@ async function personOf(change, snapshot) {
|
|
|
159
268
|
change: { by: { person: change.action, file: change.file, approved: change.via === "console" }, writes: [...writes, { path: INDEX_FILE, text: buildIndex(after) }], ...(change.action === "created" ? { absent: [change.file] } : {}) },
|
|
160
269
|
};
|
|
161
270
|
}
|
|
162
|
-
/**
|
|
163
|
-
*
|
|
164
|
-
*
|
|
165
|
-
|
|
271
|
+
/** The texts main holds at `paths`, each a note's file, by path: one main holds no note at is not in it. From the
|
|
272
|
+
* folder's snapshot and its bodies: no git, no exec. What a skill the grader re-filed as a note (grade.ts skillAsNote)
|
|
273
|
+
* would be written over, read before its merge. */
|
|
274
|
+
export async function mainTexts(ws, paths) {
|
|
275
|
+
if (!paths.length)
|
|
276
|
+
return {};
|
|
277
|
+
return readLearning(ws, async ({ snapshot, body }) => {
|
|
278
|
+
const oids = new Map((snapshot?.notes ?? []).map((note) => [note.file, note.oid]));
|
|
279
|
+
const held = paths.filter((path) => oids.has(path));
|
|
280
|
+
return Object.fromEntries(await Promise.all(held.map(async (path) => [path, await body(path, oids.get(path))])));
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
/** Run `runId`'s merge on the folder, when its diff file names one (readRunDiff): the texts its own commit holds at
|
|
284
|
+
* `paths`, each a note's file (one it holds nothing at is not in it), read at that commit, those paths alone (textsAt:
|
|
285
|
+
* one read-only exec, bounded by the paths asked, never the whole folder or its log), never main's now, which a person
|
|
286
|
+
* may have edited since. Undefined when the run merged nothing here. */
|
|
287
|
+
export async function mergedAt(ws, runId, paths, round) {
|
|
288
|
+
const diff = await readRunDiff(ws, runDiffKey(runId, round));
|
|
289
|
+
if (!diff)
|
|
290
|
+
return undefined;
|
|
291
|
+
const texts = await textsAt(ws, diff.merge, paths);
|
|
292
|
+
if (!texts)
|
|
293
|
+
throw new Error(`the run's merge ${diff.merge} is not in the learning folder`);
|
|
294
|
+
return { texts };
|
|
295
|
+
}
|
|
296
|
+
/** Main as the grader reads it (the runner's learning loop `readMain`): every active note's index line, the whole text
|
|
297
|
+
* of each note the proposal supersedes, and the blob each of those was read at (`graded`, which the merge checks); the
|
|
298
|
+
* proposal's notes named like a note main holds now, settled alone (`taken`); or `problems` when the proposal cannot
|
|
299
|
+
* join main as it is (learn/check.ts mergeProblems). From the folder's snapshot and its bodies: no git, no exec. */
|
|
166
300
|
export async function readMain(ws, proposal) {
|
|
167
301
|
const added = proposal.notes.map(({ file, text }) => parseNoteFile(file, text));
|
|
168
302
|
const bad = proposal.notes.filter((_, i) => Array.isArray(added[i])).map(({ file }) => ({ rule: "note", path: file, detail: "the proposal's note is out of shape" }));
|
|
169
303
|
if (bad.length)
|
|
170
304
|
return { problems: bad };
|
|
171
|
-
const notes = added;
|
|
172
305
|
return readLearning(ws, async ({ snapshot, body }) => {
|
|
173
306
|
const main = snapshotNotes(snapshot);
|
|
307
|
+
const oids = new Map((snapshot?.notes ?? []).map((note) => [note.file, note.oid]));
|
|
308
|
+
// A new note named like one main holds (another run merged it since the run's seed, so the run never saw it) is
|
|
309
|
+
// settled alone, never a drop of the whole proposal: left out of the grade, `same` when main's note says its rule,
|
|
310
|
+
// else `taken`, and the rest is graded.
|
|
311
|
+
const taken = [];
|
|
312
|
+
for (const note of added) {
|
|
313
|
+
if (!oids.has(note.file))
|
|
314
|
+
continue;
|
|
315
|
+
const theirs = parseNoteFile(note.file, await body(note.file, oids.get(note.file)));
|
|
316
|
+
taken.push({ path: note.file, reason: !Array.isArray(theirs) && theirs.status === "active" && ruleOf(theirs.body) === ruleOf(note.body) ? "same" : "taken" });
|
|
317
|
+
}
|
|
318
|
+
const notes = added.filter((note) => !oids.has(note.file));
|
|
174
319
|
const problems = mergeProblems({ files: topOf(snapshot), active: main.filter((note) => note.status === "active") }, notes);
|
|
175
320
|
if (problems.length)
|
|
176
321
|
return { problems };
|
|
177
|
-
const oids = new Map((snapshot?.notes ?? []).map((note) => [note.file, note.oid]));
|
|
178
322
|
// mergeProblems passed: each note superseded is active on main, and named once.
|
|
179
323
|
const superseded = await Promise.all(notes.flatMap((note) => note.supersedes).map(async (file) => ({ file, text: await body(file, oids.get(file)) })));
|
|
180
|
-
return { active: main.filter((note) => note.status === "active").map(({ file, name, description }) => ({ file, name, description })), superseded, graded: Object.fromEntries(superseded.map(({ file }) => [file, oids.get(file)])) };
|
|
324
|
+
return { active: main.filter((note) => note.status === "active").map(({ file, name, description }) => ({ file, name, description })), superseded, graded: Object.fromEntries(superseded.map(({ file }) => [file, oids.get(file)])), ...(taken.length ? { taken } : {}) };
|
|
181
325
|
});
|
|
182
326
|
}
|
package/dist/learn/folder.d.ts
CHANGED
|
@@ -146,6 +146,8 @@ export declare function snapshotOfRead(read: ReturnType<typeof parseRead>): Snap
|
|
|
146
146
|
* under `.agentrun/`. `absent`: paths that must not be on main, as git holds it (any file, any mode); `same`: paths
|
|
147
147
|
* that must be on main as they are on another commit (a run's seed). The script checks both on main as it commits. */
|
|
148
148
|
export type FolderChange = {
|
|
149
|
+
/** A run's merge names the run and the grader's reason, and its `round` past the first (a follow-up's look-back): its
|
|
150
|
+
* diff is kept under runDiffKey. */
|
|
149
151
|
by: {
|
|
150
152
|
person: PersonKind;
|
|
151
153
|
file: string;
|
|
@@ -153,6 +155,7 @@ export type FolderChange = {
|
|
|
153
155
|
} | {
|
|
154
156
|
run: string;
|
|
155
157
|
reason: string;
|
|
158
|
+
round?: number;
|
|
156
159
|
};
|
|
157
160
|
writes: readonly {
|
|
158
161
|
path: string;
|
|
@@ -209,6 +212,9 @@ export type FolderRead = {
|
|
|
209
212
|
* snapshot read again; a second mismatch is FolderBusy. No git and no exec: the file API alone. */
|
|
210
213
|
export declare function readLearning<T>(ws: Workspace, read: (folder: FolderRead) => Promise<T>): Promise<T>;
|
|
211
214
|
/** Run `run`'s merge as its diff file keeps it, or undefined when the folder has none (it never merged here). */
|
|
215
|
+
/** The key a run's merge keeps its diff under (`.agentrun/diffs/<key>.json`), and that tells a merge already made: the run's
|
|
216
|
+
* id for its first round, `<run>.r<round>` for each later one (a follow-up's look-back), so each round merges once. */
|
|
217
|
+
export declare const runDiffKey: (runId: string, round?: number) => string;
|
|
212
218
|
export declare function readRunDiff(ws: Workspace, run: string): Promise<RunDiff | undefined>;
|
|
213
219
|
/** The notes of a snapshot as the learning modules take them (buildIndex, mergeProblems): their front matter, no body. */
|
|
214
220
|
export declare const snapshotNotes: (snapshot: Snapshot | undefined) => LearnedNote[];
|
|
@@ -268,6 +274,11 @@ export declare function folderAt(ws: Workspace, commit: string): Promise<{
|
|
|
268
274
|
snapshot: Snapshot;
|
|
269
275
|
blobs: ReadonlyMap<string, Buffer>;
|
|
270
276
|
} | undefined>;
|
|
277
|
+
/** The texts `commit` holds at `paths` (each a plain path, checkPath), each read alone with one read-only exec (the
|
|
278
|
+
* script's show: git cat-file over each `<commit>:<path>`), never the whole tree, its blobs or its log, so the read is
|
|
279
|
+
* bounded by what is asked, whatever the folder holds. A path the commit holds no file at is not in it. Undefined when
|
|
280
|
+
* the folder has no such commit. */
|
|
281
|
+
export declare function textsAt(ws: Workspace, commit: string, paths: readonly string[]): Promise<Record<string, string> | undefined>;
|
|
271
282
|
export declare function learningRepair(ws: Workspace): Promise<Snapshot | undefined>;
|
|
272
283
|
/** Whether `main` holds anything at `path`, as git stores it (any mode, any type): what the snapshot leaves out (a file
|
|
273
284
|
* that is no note) included. A read through the script. */
|
package/dist/learn/folder.js
CHANGED
|
@@ -500,6 +500,9 @@ export async function readLearning(ws, read) {
|
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
502
|
/** Run `run`'s merge as its diff file keeps it, or undefined when the folder has none (it never merged here). */
|
|
503
|
+
/** The key a run's merge keeps its diff under (`.agentrun/diffs/<key>.json`), and that tells a merge already made: the run's
|
|
504
|
+
* id for its first round, `<run>.r<round>` for each later one (a follow-up's look-back), so each round merges once. */
|
|
505
|
+
export const runDiffKey = (runId, round = 1) => (round > 1 ? `${runId}.r${round}` : runId);
|
|
503
506
|
export async function readRunDiff(ws, run) {
|
|
504
507
|
if (!/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/.test(run))
|
|
505
508
|
return undefined;
|
|
@@ -641,7 +644,7 @@ export async function commitChange(ws, base, change) {
|
|
|
641
644
|
if (!/^[0-9a-f]{40}([0-9a-f]{24})?$/.test(commit))
|
|
642
645
|
throw new Error(`${JSON.stringify(commit)} is not a commit`);
|
|
643
646
|
const ref = `refs/agentrun/import-${randomBytes(8).toString("hex")}`;
|
|
644
|
-
const run = change && "run" in change.by ? change.by.run : undefined;
|
|
647
|
+
const run = change && "run" in change.by ? runDiffKey(change.by.run, change.by.round) : undefined;
|
|
645
648
|
const header = [
|
|
646
649
|
`ref ${ref}`,
|
|
647
650
|
`snapshot ${snapshotLine(snapshot, snapshot.log[0]?.commit === PLACEHOLDER ? 2 : 1)}`,
|
|
@@ -689,6 +692,39 @@ export async function folderAt(ws, commit) {
|
|
|
689
692
|
const snapshot = snapshotOfRead(parsed);
|
|
690
693
|
return snapshot ? { snapshot, blobs: parsed.blobs } : undefined;
|
|
691
694
|
}
|
|
695
|
+
/** The texts `commit` holds at `paths` (each a plain path, checkPath), each read alone with one read-only exec (the
|
|
696
|
+
* script's show: git cat-file over each `<commit>:<path>`), never the whole tree, its blobs or its log, so the read is
|
|
697
|
+
* bounded by what is asked, whatever the folder holds. A path the commit holds no file at is not in it. Undefined when
|
|
698
|
+
* the folder has no such commit. */
|
|
699
|
+
export async function textsAt(ws, commit, paths) {
|
|
700
|
+
if (!/^[0-9a-f]{40}([0-9a-f]{24})?$/.test(commit))
|
|
701
|
+
throw new Error(`${JSON.stringify(commit)} is not a commit`);
|
|
702
|
+
if (!paths.length)
|
|
703
|
+
return {};
|
|
704
|
+
const result = await runScript(ws, ["show", commit, ...paths.map(checkPath)]);
|
|
705
|
+
if (result.code === 1)
|
|
706
|
+
return undefined;
|
|
707
|
+
if (result.code !== 0)
|
|
708
|
+
throw failed("show", result);
|
|
709
|
+
// git cat-file --batch: per path, `<oid> <type> <size>\n<content>\n`, or `<name> missing\n`.
|
|
710
|
+
const out = {};
|
|
711
|
+
const bytes = result.stdout;
|
|
712
|
+
let at = 0;
|
|
713
|
+
for (const path of paths) {
|
|
714
|
+
const end = bytes.indexOf(10, at);
|
|
715
|
+
if (end < 0)
|
|
716
|
+
throw failed("show", { code: result.code, stderr: "its answer ended early" });
|
|
717
|
+
const header = bytes.subarray(at, end).toString("utf8").split(" ");
|
|
718
|
+
at = end + 1;
|
|
719
|
+
if (header.at(-1) === "missing" || header.length !== 3)
|
|
720
|
+
continue;
|
|
721
|
+
const size = Number(header[2]);
|
|
722
|
+
if (header[1] === "blob")
|
|
723
|
+
out[path] = bytes.subarray(at, at + size).toString("utf8");
|
|
724
|
+
at += size + 1;
|
|
725
|
+
}
|
|
726
|
+
return out;
|
|
727
|
+
}
|
|
692
728
|
export async function learningRepair(ws) {
|
|
693
729
|
for (let tries = 0; tries < WRITE_TRIES; tries++) {
|
|
694
730
|
const read = await runScript(ws, ["read"]);
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { DecisionProvider } from "@parcha/agentrun-dsl";
|
|
2
|
+
import type { NoteText } from "./grade.js";
|
|
3
|
+
/** The lowest Jev probability that a note holds beyond its one input at which it goes on to the grader. */
|
|
4
|
+
export declare const GENERAL_THRESHOLD = 0.5;
|
|
5
|
+
/** Where the host reads another threshold: a number from 0 to 1. */
|
|
6
|
+
export declare const GENERAL_THRESHOLD_ENV = "AGENTRUN_SERVE_LEARNING_GENERAL_THRESHOLD";
|
|
7
|
+
/** The most of the job's instructions, the run's input and the note the state holds, in UTF-16 units: well within one
|
|
8
|
+
* Jev request's 32k tokens a question. */
|
|
9
|
+
export declare const GENERAL_STATE_CAPS: Readonly<{
|
|
10
|
+
job: 4000;
|
|
11
|
+
input: 8000;
|
|
12
|
+
note: 8000;
|
|
13
|
+
}>;
|
|
14
|
+
/** How long the check waits for Jev, every note's request included. */
|
|
15
|
+
export declare const GENERAL_DEADLINE_MS = 30000;
|
|
16
|
+
/** The question, as the lead's spec states it. */
|
|
17
|
+
export declare const GENERAL_QUESTION = "Does `note` state a method, source, fact or preference that holds for inputs of this job other than `input`, the one it came from?";
|
|
18
|
+
export declare const GENERAL_CRITERIA: Readonly<{
|
|
19
|
+
true: "It holds for other inputs of this job: a method, a source, a fact about the job or the user's own world, or the user's standing preference.";
|
|
20
|
+
false: "It rests on names, ids, amounts or pages of that one input: it would only help on that same input again.";
|
|
21
|
+
}>;
|
|
22
|
+
/** The threshold `env` names, else GENERAL_THRESHOLD. Any value that is not a number from 0 to 1 is an error. */
|
|
23
|
+
export declare function generalThresholdOf(env: NodeJS.ProcessEnv): number;
|
|
24
|
+
/** What the check reads of the run a note came from: the agent's standing instructions (the job), and the run's input
|
|
25
|
+
* (the first message it was sent, else the first trigger's input). */
|
|
26
|
+
export type GeneralSource = {
|
|
27
|
+
readonly job?: string;
|
|
28
|
+
readonly input?: string;
|
|
29
|
+
};
|
|
30
|
+
/** The one Jev request for `note`: its state (the job, the input, the note without its run's risky mark) and one Noul. */
|
|
31
|
+
export declare function generalRequest(note: NoteText, source: GeneralSource): {
|
|
32
|
+
label: string;
|
|
33
|
+
kind: "judge";
|
|
34
|
+
state: Record<string, string>;
|
|
35
|
+
questions: {
|
|
36
|
+
general: {
|
|
37
|
+
type: "noul";
|
|
38
|
+
instructions: string;
|
|
39
|
+
criteria: {
|
|
40
|
+
true: string;
|
|
41
|
+
false: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
/** Each note's probability that it holds beyond its one input, by file, and what the requests cost (null once any is
|
|
47
|
+
* unknown). */
|
|
48
|
+
export type GeneralScores = {
|
|
49
|
+
readonly scores: Readonly<Record<string, number>>;
|
|
50
|
+
readonly usd: number | null;
|
|
51
|
+
};
|
|
52
|
+
/** What a learning run's end says when the check could not run (its provider's error stays in the run's journal and the
|
|
53
|
+
* runner's log, never here). */
|
|
54
|
+
export declare const GENERAL_UNCHECKED = "The generality check could not run, so the grader read every note.";
|
|
55
|
+
/** Why a check was skipped when its learning run's cap had no room for its worst case (learning-loop.ts GeneralOverCap):
|
|
56
|
+
* kept as its `unchecked`, and what a run's learning end says for it. */
|
|
57
|
+
export declare const GENERAL_NO_BUDGET = "no_budget";
|
|
58
|
+
export declare const GENERAL_NO_ROOM = "The generality check had no room under the cap, so the grader read every note.";
|
|
59
|
+
/** Asks `jev` the question of each note, one request a note, all at once. Throws when any request fails or answers out of
|
|
60
|
+
* shape, whatever the others answered: the caller grades every note as it would without the check, never drops one on an
|
|
61
|
+
* error, and books what the check spent as unknown (null), never 0, since a request that failed may still have been
|
|
62
|
+
* charged and the others were. `sending`: told once, before the first request leaves (the learning run marks the check
|
|
63
|
+
* sent there, so a restart never asks again unbooked). */
|
|
64
|
+
export declare function generalScores(jev: DecisionProvider, notes: readonly NoteText[], source: GeneralSource, signal: AbortSignal, run: string, sending?: () => Promise<void>): Promise<GeneralScores>;
|
|
65
|
+
/** The why of a note the check drops, in the host's words (no word of the note's). */
|
|
66
|
+
export declare const ONE_CASE: (p: number, threshold: number) => string;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// The generality pre-check: before the grader reads what a run proposes, Jev (TypeSafe's System One, the provider a
|
|
2
|
+
// workflow's decision nodes use when they name none, on the same client and model) is asked one Noul per proposed note:
|
|
3
|
+
// does it hold for inputs of this job other than the one it came from? A note scored below the threshold (default
|
|
4
|
+
// GENERAL_THRESHOLD) rests on one input's names, ids, amounts or pages, and is dropped before the grader, its why said
|
|
5
|
+
// where a grader's drop is (the learning run's verdict items). Offline, on Run B's 388 kept MCC notes, this question
|
|
6
|
+
// agreed with an Opus label 97.4% of the time (kappa 0.95). It calls no model itself: the host passes the provider.
|
|
7
|
+
import { createHash } from "node:crypto";
|
|
8
|
+
import { withoutRiskyMark } from "./notes.js";
|
|
9
|
+
/** The lowest Jev probability that a note holds beyond its one input at which it goes on to the grader. */
|
|
10
|
+
export const GENERAL_THRESHOLD = 0.5;
|
|
11
|
+
/** Where the host reads another threshold: a number from 0 to 1. */
|
|
12
|
+
export const GENERAL_THRESHOLD_ENV = "AGENTRUN_SERVE_LEARNING_GENERAL_THRESHOLD";
|
|
13
|
+
/** The most of the job's instructions, the run's input and the note the state holds, in UTF-16 units: well within one
|
|
14
|
+
* Jev request's 32k tokens a question. */
|
|
15
|
+
export const GENERAL_STATE_CAPS = Object.freeze({ job: 4_000, input: 8_000, note: 8_000 });
|
|
16
|
+
/** How long the check waits for Jev, every note's request included. */
|
|
17
|
+
export const GENERAL_DEADLINE_MS = 30_000;
|
|
18
|
+
/** The question, as the lead's spec states it. */
|
|
19
|
+
export const GENERAL_QUESTION = "Does `note` state a method, source, fact or preference that holds for inputs of this job other than `input`, the one it came from?";
|
|
20
|
+
export const GENERAL_CRITERIA = Object.freeze({
|
|
21
|
+
true: "It holds for other inputs of this job: a method, a source, a fact about the job or the user's own world, or the user's standing preference.",
|
|
22
|
+
false: "It rests on names, ids, amounts or pages of that one input: it would only help on that same input again.",
|
|
23
|
+
});
|
|
24
|
+
/** The threshold `env` names, else GENERAL_THRESHOLD. Any value that is not a number from 0 to 1 is an error. */
|
|
25
|
+
export function generalThresholdOf(env) {
|
|
26
|
+
const named = env[GENERAL_THRESHOLD_ENV]?.trim();
|
|
27
|
+
if (!named)
|
|
28
|
+
return GENERAL_THRESHOLD;
|
|
29
|
+
const value = Number(named);
|
|
30
|
+
if (!/^\d*\.?\d+$/.test(named) || !Number.isFinite(value) || value < 0 || value > 1)
|
|
31
|
+
throw new Error(`${GENERAL_THRESHOLD_ENV} is a number from 0 to 1, not ${named}`);
|
|
32
|
+
return value;
|
|
33
|
+
}
|
|
34
|
+
const cut = (text, max) => (text === undefined ? "" : text.length > max ? `${text.slice(0, max)} [cut]` : text);
|
|
35
|
+
/** The one Jev request for `note`: its state (the job, the input, the note without its run's risky mark) and one Noul. */
|
|
36
|
+
export function generalRequest(note, source) {
|
|
37
|
+
return {
|
|
38
|
+
label: `learning: general ${note.file}`,
|
|
39
|
+
kind: "judge",
|
|
40
|
+
state: { job: cut(source.job, GENERAL_STATE_CAPS.job), input: cut(source.input, GENERAL_STATE_CAPS.input), note: cut(withoutRiskyMark(note.text), GENERAL_STATE_CAPS.note) },
|
|
41
|
+
questions: { general: { type: "noul", instructions: GENERAL_QUESTION, criteria: { ...GENERAL_CRITERIA } } },
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/** What a learning run's end says when the check could not run (its provider's error stays in the run's journal and the
|
|
45
|
+
* runner's log, never here). */
|
|
46
|
+
export const GENERAL_UNCHECKED = "The generality check could not run, so the grader read every note.";
|
|
47
|
+
/** Why a check was skipped when its learning run's cap had no room for its worst case (learning-loop.ts GeneralOverCap):
|
|
48
|
+
* kept as its `unchecked`, and what a run's learning end says for it. */
|
|
49
|
+
export const GENERAL_NO_BUDGET = "no_budget";
|
|
50
|
+
export const GENERAL_NO_ROOM = "The generality check had no room under the cap, so the grader read every note.";
|
|
51
|
+
/** Asks `jev` the question of each note, one request a note, all at once. Throws when any request fails or answers out of
|
|
52
|
+
* shape, whatever the others answered: the caller grades every note as it would without the check, never drops one on an
|
|
53
|
+
* error, and books what the check spent as unknown (null), never 0, since a request that failed may still have been
|
|
54
|
+
* charged and the others were. `sending`: told once, before the first request leaves (the learning run marks the check
|
|
55
|
+
* sent there, so a restart never asks again unbooked). */
|
|
56
|
+
export async function generalScores(jev, notes, source, signal, run, sending) {
|
|
57
|
+
const bound = AbortSignal.any([signal, AbortSignal.timeout(GENERAL_DEADLINE_MS)]);
|
|
58
|
+
// Paid, and Jev dedupes none (the decision id is not sent): marked sent, durably, before any request leaves.
|
|
59
|
+
await sending?.();
|
|
60
|
+
const answers = await Promise.all(notes.map(async (note) => {
|
|
61
|
+
const request = generalRequest(note, source);
|
|
62
|
+
const decisionId = createHash("sha256").update(`agentrun-learn general ${run} ${note.file} ${note.text}`).digest("hex").slice(0, 32);
|
|
63
|
+
const outcome = await jev.decide(request, { decisionId, signal: bound, deadlineMs: GENERAL_DEADLINE_MS });
|
|
64
|
+
const answer = outcome.answers.general;
|
|
65
|
+
if (answer?.type !== "noul" || typeof answer.noul !== "number" || !Number.isFinite(answer.noul) || answer.noul < 0 || answer.noul > 1)
|
|
66
|
+
throw new Error(`Jev's answer for ${note.file} is no probability`);
|
|
67
|
+
return { file: note.file, p: answer.noul, usd: outcome.cost_usd };
|
|
68
|
+
}));
|
|
69
|
+
const usd = answers.reduce((sum, { usd: one }) => (sum === null || one === null || !Number.isFinite(one) ? null : sum + one), 0);
|
|
70
|
+
return { scores: Object.fromEntries(answers.map(({ file, p }) => [file, p])), usd };
|
|
71
|
+
}
|
|
72
|
+
/** The why of a note the check drops, in the host's words (no word of the note's). */
|
|
73
|
+
export const ONE_CASE = (p, threshold) => `Jev rates it ${p.toFixed(2)} likely to hold for inputs other than the one it came from, under the bar of ${threshold}: it rests on that one input, so it was dropped before the grader.`;
|
package/dist/learn/grade.d.ts
CHANGED
|
@@ -30,6 +30,9 @@ export type GradeInput = {
|
|
|
30
30
|
readonly status: string;
|
|
31
31
|
readonly detail?: string;
|
|
32
32
|
}>>;
|
|
33
|
+
/** The skill of each draft's name as the folder holds it (`skills/<name>/SKILL.md`), shown under its draft for Format,
|
|
34
|
+
* never graded; one whose draft is not among `files` is not shown. */
|
|
35
|
+
readonly drafted?: readonly NoteText[];
|
|
33
36
|
/** What the user said in the run, in order: the messages the run was sent, never the host's end-of-run turn. The
|
|
34
37
|
* prompt holds every one, each cut to GRADE_CAPS.askedMessage, with unseen characters taken out, while together
|
|
35
38
|
* they fit GRADE_CAPS.askedTotal (askedOf). The host cuts them of its secrets first. */
|
|
@@ -61,7 +64,8 @@ export declare const GRADE_CAPS: Readonly<{
|
|
|
61
64
|
/** The grader's judgment of one new note: `keep` (true for a pending one too), `pending` when it waits for the user's
|
|
62
65
|
* OK (a risky note, whoever's idea it was), and
|
|
63
66
|
* `origin`, `you` for what the user asked in their own words, else `run`. `question` is the rubric's question it
|
|
64
|
-
* failed, or `Risky` for one the grader holds.
|
|
67
|
+
* failed, or `Risky` for one the grader holds. `note`: a skill the grader re-filed as a note (its decision `note`: a
|
|
68
|
+
* standing rule for every reply), the note it is kept as instead (skillAsNote), merged in its place. */
|
|
65
69
|
export type VerdictItem = {
|
|
66
70
|
readonly file: string;
|
|
67
71
|
readonly keep: boolean;
|
|
@@ -69,6 +73,7 @@ export type VerdictItem = {
|
|
|
69
73
|
readonly origin?: "you" | "run";
|
|
70
74
|
readonly question?: string;
|
|
71
75
|
readonly why: string;
|
|
76
|
+
readonly note?: NoteText;
|
|
72
77
|
};
|
|
73
78
|
/** The whole proposal's verdict, item by item: `merge` when any item is kept (the kept ones merge, the dropped ones are
|
|
74
79
|
* left out), unless an item is dropped as Planted (nothing from that run is kept) or the grader kept every item and
|
|
@@ -106,6 +111,22 @@ export declare function shortMessage(text: string): string;
|
|
|
106
111
|
* note that is not active or that the new notes do not supersede (or one they supersede and that is not given), a
|
|
107
112
|
* count or a note over its cap, or an unseen character. */
|
|
108
113
|
export declare function gradePrompt(input: GradeInput): string;
|
|
114
|
+
/** The why of an item the grader kept while saying it is not general (general false), when it gave no why. */
|
|
115
|
+
export declare const NOT_GENERAL = "It is tied to the one case it came from, so it is not kept.";
|
|
116
|
+
/** The why of an item the grader kept without saying it is general: the gate fails closed. */
|
|
117
|
+
export declare const NOT_SAID_GENERAL = "The grader did not say it holds beyond the one case it came from, so it is not kept.";
|
|
118
|
+
/** The words a re-filed skill's item says when it can't be kept as a note (skillAsNote gave none): dropped, and the
|
|
119
|
+
* next run is told where such a rule goes. */
|
|
120
|
+
export declare const REFILE_FAILED = "It is a standing rule for every reply, which belongs in a note, and it could not be re-filed as one here: a later run keeps it as a note.";
|
|
121
|
+
/** The words a re-filed skill's item says when the run keeps CAPS.newNotes new notes already: dropped, as a ninth note
|
|
122
|
+
* would take the run past its cap, and the next run is told where such a rule goes. */
|
|
123
|
+
export declare const NOTES_FULL: string;
|
|
124
|
+
/** A skill's SKILL.md (`file`, `text`) re-filed as the note it should have been (a standing rule for every reply is a
|
|
125
|
+
* note, which every run reads, not a skill, which a run loads on demand): `<name>.md`, named after the skill, its
|
|
126
|
+
* description the skill's, of type feedback, its body the skill's body. Undefined when it would be no note (its name
|
|
127
|
+
* not a note's file name, no description, out of a note's shape (checkNote), or over a run's note cap, CAPS.runNote:
|
|
128
|
+
* the host adds its origin and pending lines at the merge, as it does to a run's own note). */
|
|
129
|
+
export declare function skillAsNote(file: string, text: string): NoteText | undefined;
|
|
109
130
|
/** The grader's verdict from its answer, failing closed: anything it cannot read, an item missing, named twice or for a
|
|
110
131
|
* file it was not asked to judge, or a merge with an item not kept, is no merge. `proposed` are the new notes the
|
|
111
132
|
* prompt was built from, or the files it asked an item for (gradedFiles: a note's file, a skill's SKILL.md, a draft's
|