@parcha/agentrun-serve 0.1.0-beta.33 → 0.1.0-beta.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +368 -0
- package/README.md +341 -208
- package/dist/adapters.d.ts +3 -4
- package/dist/adapters.js +18 -15
- package/dist/agent-rows.d.ts +99 -0
- package/dist/agent-rows.js +1 -0
- package/dist/agents-store.d.ts +6 -2
- package/dist/agents-store.js +75 -25
- package/dist/agents.d.ts +9 -125
- package/dist/agents.js +15 -305
- package/dist/answer-json.d.ts +23 -0
- package/dist/answer-json.js +58 -0
- package/dist/api-only.d.ts +1 -1
- package/dist/api-only.js +2 -2
- package/dist/archil-settings.d.ts +11 -1
- package/dist/archil-settings.js +10 -0
- package/dist/bash-read-only.d.ts +35 -0
- package/dist/bash-read-only.js +778 -0
- package/dist/box-settings.d.ts +3 -23
- package/dist/box-settings.js +7 -51
- package/dist/boxes.d.ts +17 -0
- package/dist/boxes.js +27 -20
- package/dist/browser-commands.d.ts +5 -2
- package/dist/browser-commands.js +4 -4
- package/dist/browser-computer.d.ts +5 -0
- package/dist/browser-computer.js +21 -0
- package/dist/browser-cost.d.ts +9 -6
- package/dist/browser-cost.js +95 -51
- package/dist/browser-live.d.ts +7 -20
- package/dist/browser-live.js +15 -93
- package/dist/browser-person.d.ts +18 -51
- package/dist/browser-person.js +94 -277
- package/dist/budget.d.ts +0 -5
- package/dist/budget.js +0 -5
- package/dist/cap.d.ts +14 -8
- package/dist/cap.js +19 -9
- package/dist/cli.js +71 -18
- package/dist/closed-pipes.d.ts +2 -0
- package/dist/closed-pipes.js +13 -0
- package/dist/computer-commands.d.ts +2 -0
- package/dist/computer-commands.js +2 -0
- package/dist/computer-keys.d.ts +20 -10
- package/dist/computer-keys.js +36 -54
- package/dist/computer-setting.d.ts +20 -3
- package/dist/computer-setting.js +58 -10
- package/dist/computers.d.ts +35 -2
- package/dist/computers.js +72 -11
- package/dist/confine.d.ts +120 -0
- package/dist/confine.js +436 -0
- package/dist/console/assets/index-B7NKTU8E.css +1 -0
- package/dist/console/assets/index-CXZMgJE7.js +550 -0
- package/dist/console/index.html +2 -2
- package/dist/content-filter.d.ts +7 -0
- package/dist/content-filter.js +23 -0
- package/dist/decision-cap.d.ts +7 -29
- package/dist/decision-cap.js +3 -94
- package/dist/decision-rows.d.ts +1 -1
- package/dist/decision-rows.js +1 -1
- package/dist/docker-daemon.d.ts +31 -0
- package/dist/docker-daemon.js +56 -0
- package/dist/effort-guidance.js +4 -3
- package/dist/environment.d.ts +0 -3
- package/dist/environment.js +3 -5
- package/dist/errors.d.ts +1 -2
- package/dist/errors.js +9 -9
- package/dist/explain.js +3 -1
- package/dist/filed-answer.d.ts +32 -0
- package/dist/filed-answer.js +160 -0
- package/dist/files.d.ts +1 -3
- package/dist/files.js +2 -4
- package/dist/github-connection.d.ts +1 -1
- package/dist/github-connection.js +25 -7
- package/dist/github-faux.d.ts +26 -0
- package/dist/github-faux.js +76 -0
- package/dist/github.d.ts +6 -2
- package/dist/github.js +5 -3
- package/dist/graph-served.d.ts +5 -3
- package/dist/graph-served.js +14 -6
- package/dist/graph-view.d.ts +3 -5
- package/dist/graph-view.js +9 -16
- package/dist/handed-values.d.ts +9 -0
- package/dist/handed-values.js +26 -0
- package/dist/harness-install.d.ts +1 -7
- package/dist/harness-install.js +1 -18
- package/dist/harness-opencode/adapter.d.ts +7 -0
- package/dist/harness-opencode/adapter.js +23 -6
- package/dist/harness-opencode/harness.js +0 -1
- package/dist/harness-opencode/host/policy.js +2 -2
- package/dist/harness-opencode/index.d.ts +1 -1
- package/dist/harness-opencode/index.js +1 -1
- package/dist/harness-opencode/verify.d.ts +17 -0
- package/dist/harness-opencode/verify.js +30 -10
- package/dist/harness-table.js +6 -1
- package/dist/heard.js +1 -1
- package/dist/held-fd.d.ts +5 -0
- package/dist/held-fd.js +14 -0
- package/dist/host-calls.d.ts +20 -0
- package/dist/host-calls.js +12 -0
- package/dist/host-tools.d.ts +4 -21
- package/dist/host-tools.js +4 -61
- package/dist/host.d.ts +2 -4
- package/dist/host.js +2 -7
- package/dist/import-summary.d.ts +1 -5
- package/dist/import-summary.js +0 -21
- package/dist/import.d.ts +6 -6
- package/dist/import.js +14 -15
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/key-refusal.d.ts +5 -1
- package/dist/key-refusal.js +19 -4
- package/dist/learn/check.d.ts +8 -2
- package/dist/learn/check.js +85 -31
- package/dist/learn/folder.d.ts +11 -4
- package/dist/learn/folder.js +17 -19
- package/dist/learn/grade.d.ts +18 -1
- package/dist/learn/grade.js +108 -14
- package/dist/learn/index.d.ts +5 -5
- package/dist/learn/index.js +5 -5
- package/dist/learn/learning.sh +1 -14
- package/dist/learn/notes.d.ts +14 -3
- package/dist/learn/notes.js +16 -6
- package/dist/learn/reflect.d.ts +31 -2
- package/dist/learn/reflect.js +83 -6
- package/dist/learn/relevance.d.ts +24 -0
- package/dist/learn/relevance.js +91 -0
- package/dist/learn/secrets.d.ts +7 -1
- package/dist/learn/secrets.js +86 -19
- package/dist/learn/skills.d.ts +159 -18
- package/dist/learn/skills.js +644 -64
- package/dist/learned-nodes.d.ts +14 -0
- package/dist/learned-nodes.js +8 -0
- package/dist/learned-workflow.d.ts +41 -6
- package/dist/learned-workflow.js +153 -18
- package/dist/learning-routes.d.ts +49 -4
- package/dist/learning-routes.js +113 -31
- package/dist/learning-run.d.ts +16 -31
- package/dist/learning-run.js +31 -38
- package/dist/learning-words.d.ts +12 -5
- package/dist/learning-words.js +18 -9
- package/dist/learning.d.ts +91 -97
- package/dist/learning.js +176 -320
- package/dist/live/stream.js +1 -1
- package/dist/live/translate.js +12 -2
- package/dist/llm.d.ts +4 -1
- package/dist/llm.js +4 -2
- package/dist/local-models.d.ts +11 -5
- package/dist/local-models.js +13 -8
- package/dist/mcp-gateway.d.ts +17 -49
- package/dist/mcp-gateway.js +55 -136
- package/dist/mcp-oauth.d.ts +10 -14
- package/dist/mcp-oauth.js +14 -32
- package/dist/mcp-probe.d.ts +0 -7
- package/dist/mcp-probe.js +4 -10
- package/dist/mcp-servers-store.d.ts +18 -18
- package/dist/mcp-servers-store.js +12 -14
- package/dist/mcp-store.js +3 -4
- package/dist/mcp.js +4 -3
- package/dist/model.d.ts +9 -7
- package/dist/model.js +51 -27
- package/dist/monid.d.ts +0 -2
- package/dist/monid.js +3 -6
- package/dist/openapi.d.ts +8 -1
- package/dist/openapi.js +156 -58
- package/dist/page.d.ts +1 -3
- package/dist/page.js +6 -18
- package/dist/paid-calls.d.ts +21 -27
- package/dist/paid-calls.js +26 -61
- package/dist/pause.d.ts +2 -19
- package/dist/pause.js +5 -74
- package/dist/port-models.d.ts +10 -3
- package/dist/port-models.js +26 -6
- package/dist/propose.d.ts +2 -0
- package/dist/propose.js +80 -45
- package/dist/push-handler.d.ts +1 -1
- package/dist/reflect-range.d.ts +25 -0
- package/dist/reflect-range.js +30 -0
- package/dist/refusal-words.d.ts +5 -1
- package/dist/refusal-words.js +5 -1
- package/dist/rows.d.ts +1 -1
- package/dist/run-cut.d.ts +0 -6
- package/dist/run-cut.js +0 -6
- package/dist/run-db.d.ts +2 -11
- package/dist/run-db.js +2 -37
- package/dist/run-launch.d.ts +21 -2
- package/dist/run-launch.js +14 -5
- package/dist/run-learning-served.d.ts +21 -4
- package/dist/run-learning-served.js +23 -13
- package/dist/run-reads-over-store.d.ts +5 -3
- package/dist/run-reads-over-store.js +25 -14
- package/dist/run-secrets.d.ts +1 -1
- package/dist/run-timeline-served.d.ts +5 -1
- package/dist/run-timeline-served.js +27 -6
- package/dist/run-view.d.ts +37 -22
- package/dist/run-view.js +85 -38
- package/dist/runnable.d.ts +21 -10
- package/dist/runnable.js +35 -12
- package/dist/runner/adapter-loop.d.ts +36 -5
- package/dist/runner/adapter-loop.js +663 -69
- package/dist/runner/adapter-run-spec.d.ts +42 -8
- package/dist/runner/adapter-run-spec.js +186 -52
- package/dist/runner/adapters/index.js +11 -1
- package/dist/runner/adapters/pi.d.ts +40 -2
- package/dist/runner/adapters/pi.js +110 -27
- package/dist/runner/beside.d.ts +38 -3
- package/dist/runner/beside.js +54 -5
- package/dist/runner/claim-secrets.d.ts +16 -1
- package/dist/runner/claim-secrets.js +62 -14
- package/dist/runner/cli-run-spec.d.ts +5 -0
- package/dist/runner/cli-run-spec.js +159 -41
- package/dist/runner/commands.js +1 -1
- package/dist/runner/computer-journal.d.ts +15 -2
- package/dist/runner/computer-journal.js +41 -5
- package/dist/runner/conformance/harness.d.ts +1 -0
- package/dist/runner/conformance/harness.js +123 -13
- package/dist/runner/conformance/subject.d.ts +4 -1
- package/dist/runner/dispatch.d.ts +8 -1
- package/dist/runner/dispatch.js +81 -7
- package/dist/runner/end-of-run.d.ts +8 -2
- package/dist/runner/end-of-run.js +10 -4
- package/dist/runner/github-app.d.ts +7 -2
- package/dist/runner/github-app.js +47 -16
- package/dist/runner/harness-loops.d.ts +15 -2
- package/dist/runner/harness-loops.js +38 -2
- package/dist/runner/journal-kinds.d.ts +60 -6
- package/dist/runner/journal-kinds.js +43 -5
- package/dist/runner/journal-reader.d.ts +1 -1
- package/dist/runner/journal-reader.js +2 -2
- package/dist/runner/learning-ask.d.ts +4 -0
- package/dist/runner/learning-ask.js +15 -1
- package/dist/runner/learning-end.d.ts +18 -3
- package/dist/runner/learning-end.js +194 -20
- package/dist/runner/learning-loop.d.ts +7 -0
- package/dist/runner/learning-loop.js +36 -8
- package/dist/runner/learning-seed.d.ts +6 -0
- package/dist/runner/learning-seed.js +6 -0
- package/dist/runner/loop-contract.d.ts +4 -0
- package/dist/runner/main.d.ts +61 -9
- package/dist/runner/main.js +144 -20
- package/dist/runner/mcp-claim.d.ts +3 -0
- package/dist/runner/mcp-claim.js +7 -3
- package/dist/runner/mcp-github.d.ts +11 -2
- package/dist/runner/mcp-github.js +55 -4
- package/dist/runner/mcp-run.d.ts +2 -0
- package/dist/runner/mcp-run.js +16 -5
- package/dist/runner/memory-claim.d.ts +9 -0
- package/dist/runner/memory-claim.js +25 -0
- package/dist/runner/metrics.d.ts +46 -1
- package/dist/runner/metrics.js +156 -1
- package/dist/runner/model-route.d.ts +16 -0
- package/dist/runner/model-route.js +134 -10
- package/dist/runner/reflect-hook.d.ts +12 -1
- package/dist/runner/reflect-hook.js +33 -3
- package/dist/runner/runner.d.ts +20 -0
- package/dist/runner/runner.js +146 -18
- package/dist/runner/spec-holds.d.ts +7 -2
- package/dist/runner/spec-holds.js +4 -3
- package/dist/runner/store-port.d.ts +1 -1
- package/dist/runner/store-secrets.d.ts +3 -3
- package/dist/runner/store-secrets.js +8 -12
- package/dist/runner/text-tools.d.ts +44 -0
- package/dist/runner/text-tools.js +237 -0
- package/dist/runner/workflow-host.d.ts +7 -2
- package/dist/runner/workflow-host.js +3 -1
- package/dist/runner/workflow-loop.d.ts +10 -1
- package/dist/runner/workflow-loop.js +14 -6
- package/dist/runner/workflow-spec.d.ts +21 -0
- package/dist/runner/workflow-spec.js +217 -93
- package/dist/runs-over-store.d.ts +14 -3
- package/dist/runs-over-store.js +100 -23
- package/dist/seal-key.d.ts +0 -2
- package/dist/seal-key.js +5 -45
- package/dist/sealed-settings-store.d.ts +19 -4
- package/dist/sealed-settings-store.js +9 -9
- package/dist/sealing.d.ts +4 -0
- package/dist/sealing.js +20 -0
- package/dist/secret-cut.d.ts +1 -1
- package/dist/secret-cut.js +1 -1
- package/dist/secret-name.d.ts +9 -0
- package/dist/secret-name.js +15 -0
- package/dist/secret-writes.d.ts +0 -1
- package/dist/secret-writes.js +0 -1
- package/dist/server-fs.d.ts +4 -0
- package/dist/server-fs.js +8 -2
- package/dist/server-lock.d.ts +0 -24
- package/dist/server-lock.js +5 -85
- package/dist/server-secrets-store.d.ts +4 -4
- package/dist/server-secrets-store.js +9 -31
- package/dist/server-secrets.d.ts +4 -9
- package/dist/server-secrets.js +12 -36
- package/dist/server.d.ts +37 -56
- package/dist/server.js +322 -134
- package/dist/sign-ins-store.d.ts +34 -36
- package/dist/sign-ins-store.js +27 -38
- package/dist/sign-ins.d.ts +2 -119
- package/dist/sign-ins.js +5 -311
- package/dist/standard-webhooks.d.ts +1 -1
- package/dist/standard-webhooks.js +1 -1
- package/dist/stats.d.ts +3 -2
- package/dist/stats.js +1 -1
- package/dist/stop-signals.d.ts +4 -2
- package/dist/stop-signals.js +5 -3
- package/dist/store/agent-body.d.ts +12 -2
- package/dist/store/agent-body.js +22 -4
- package/dist/store/deadline.d.ts +18 -0
- package/dist/store/deadline.js +45 -0
- package/dist/store/index.d.ts +2 -2
- package/dist/store/index.js +2 -2
- package/dist/store/open.d.ts +6 -3
- package/dist/store/open.js +2 -2
- package/dist/store/postgres/connection.d.ts +22 -2
- package/dist/store/postgres/connection.js +211 -41
- package/dist/store/postgres/migrate.d.ts +4 -0
- package/dist/store/postgres/migrate.js +9 -2
- package/dist/store/postgres/migrations/0003_commands_one_answer.check.sql +19 -0
- package/dist/store/postgres/migrations/0003_commands_one_answer.sql +13 -0
- package/dist/store/postgres/store.d.ts +9 -2
- package/dist/store/postgres/store.js +9 -0
- package/dist/store/schema.js +1 -1
- package/dist/store/seal.js +2 -2
- package/dist/store/sqlite/connection.js +14 -5
- package/dist/store/sqlite/run-patch.d.ts +3 -0
- package/dist/store/sqlite/run-patch.js +3 -0
- package/dist/store/sqlite/store.js +41 -12
- package/dist/store/store.d.ts +35 -6
- package/dist/store/store.js +12 -2
- package/dist/store-reads/cap.d.ts +1 -1
- package/dist/store-reads/cap.js +22 -4
- package/dist/store-reads/journal.d.ts +9 -6
- package/dist/store-reads/journal.js +129 -18
- package/dist/store-reads/learning.d.ts +82 -8
- package/dist/store-reads/learning.js +184 -11
- package/dist/store-reads/workflow.d.ts +1 -1
- package/dist/store-reads/workflow.js +1 -1
- package/dist/store-view.d.ts +19 -1
- package/dist/store-view.js +95 -27
- package/dist/template-eval.d.ts +60 -4
- package/dist/template-eval.js +120 -54
- package/dist/templates.d.ts +33 -14
- package/dist/templates.js +82 -46
- package/dist/timeline/group.d.ts +33 -0
- package/dist/timeline/group.js +77 -0
- package/dist/timeline/index.d.ts +7 -0
- package/dist/timeline/index.js +7 -0
- package/dist/timeline/labels.d.ts +79 -0
- package/dist/timeline/labels.js +150 -0
- package/dist/timeline/origin.d.ts +56 -0
- package/dist/timeline/origin.js +92 -0
- package/dist/timeline/render-text.d.ts +11 -0
- package/dist/timeline/render-text.js +62 -0
- package/dist/timeline/timeline.d.ts +282 -0
- package/dist/timeline/timeline.js +1308 -0
- package/dist/timeline/util.d.ts +17 -0
- package/dist/timeline/util.js +49 -0
- package/dist/tool-budget.d.ts +18 -0
- package/dist/tool-budget.js +50 -0
- package/dist/tool-gate.d.ts +47 -218
- package/dist/tool-gate.js +87 -545
- package/dist/tool-keys-store.d.ts +11 -12
- package/dist/tool-keys-store.js +24 -31
- package/dist/tool-keys.d.ts +5 -101
- package/dist/tool-keys.js +8 -267
- package/dist/tool-plane.d.ts +23 -52
- package/dist/tool-plane.js +23 -81
- package/dist/tool-settings-store.d.ts +1 -2
- package/dist/tool-settings-store.js +5 -8
- package/dist/tools.d.ts +67 -25
- package/dist/tools.js +170 -119
- package/dist/trigger-adapter.d.ts +2 -2
- package/dist/trigger-targets.d.ts +13 -1
- package/dist/trigger-targets.js +31 -1
- package/dist/triggers.d.ts +2 -2
- package/dist/triggers.js +3 -3
- package/dist/turn-end.d.ts +1 -1
- package/dist/turn-end.js +1 -1
- package/dist/turns.d.ts +0 -6
- package/dist/turns.js +0 -19
- package/dist/uploads.d.ts +28 -5
- package/dist/uploads.js +83 -10
- package/dist/usage.d.ts +1 -49
- package/dist/usage.js +3 -84
- package/dist/validate.d.ts +4 -0
- package/dist/validate.js +33 -14
- package/dist/webhooks.d.ts +102 -76
- package/dist/webhooks.js +266 -233
- package/dist/workflow-run.d.ts +114 -0
- package/dist/workflow-run.js +144 -0
- package/dist/workspace/archil-claim.d.ts +2 -2
- package/dist/workspace/archil-claim.js +4 -3
- package/dist/workspace/archil-disk.d.ts +10 -1
- package/dist/workspace/archil-disk.js +4 -0
- package/dist/workspace/archil-exec.d.ts +12 -2
- package/dist/workspace/archil-exec.js +16 -0
- package/dist/workspace/archil.d.ts +2 -2
- package/dist/workspace/archil.js +25 -5
- package/dist/workspace/attach.js +2 -0
- package/dist/workspace/beneath.d.ts +19 -0
- package/dist/workspace/beneath.js +106 -0
- package/dist/workspace/computer-deps.d.ts +26 -9
- package/dist/workspace/computer-deps.js +144 -43
- package/dist/workspace/computer-for-claim.d.ts +17 -14
- package/dist/workspace/computer-for-claim.js +99 -26
- package/dist/workspace/computer-hold.d.ts +6 -1
- package/dist/workspace/computer-hold.js +6 -1
- package/dist/workspace/computer-janitor.d.ts +47 -0
- package/dist/workspace/computer-janitor.js +182 -0
- package/dist/workspace/computer-ledger.d.ts +1 -8
- package/dist/workspace/computer-ledger.js +0 -3
- package/dist/workspace/computer-providers.d.ts +5 -3
- package/dist/workspace/computer-providers.js +11 -9
- package/dist/workspace/grep-worker.d.ts +5 -0
- package/dist/workspace/grep-worker.js +9 -6
- package/dist/workspace/hands.d.ts +5 -2
- package/dist/workspace/hands.js +4 -3
- package/dist/workspace/index.d.ts +6 -5
- package/dist/workspace/index.js +4 -4
- package/dist/workspace/local.d.ts +14 -2
- package/dist/workspace/local.js +170 -43
- package/dist/workspace/paths.js +3 -2
- package/dist/workspace/pi-env.d.ts +4 -0
- package/dist/workspace/pi-env.js +3 -2
- package/dist/workspace/resolve-computer.d.ts +55 -10
- package/dist/workspace/resolve-computer.js +66 -14
- package/dist/workspace/run-tools.d.ts +15 -31
- package/dist/workspace/run-tools.js +19 -30
- package/dist/workspace/workspace.d.ts +5 -0
- package/dist/workspace-paths.d.ts +0 -17
- package/dist/workspace-paths.js +1 -41
- package/dist/workspace.d.ts +0 -17
- package/dist/workspace.js +4 -110
- package/package.json +14 -14
- package/skills/agentrun-serve/SKILL.md +1 -1
- package/templates/README.md +11 -5
- package/templates/code-review/evals/mentions-defused/case.yaml +15 -0
- package/templates/code-review/evals/mentions-defused/fixtures/github-mcp.json +254 -0
- package/templates/code-review/evals/mentions-defused/graders/no-pings.md +16 -0
- package/templates/code-review/evals/mentions-defused/graders/posted-a-review.md +5 -0
- package/templates/code-review/evals/mentions-defused/graders/schema.md +5 -0
- package/templates/code-review/evals/mentions-defused/prompt.md +10 -0
- package/templates/kyb/evals/clean-public-company/graders/no-opensanctions.md +5 -0
- package/templates/kyb/evals/opensanctions-on/case.yaml +5 -0
- package/templates/kyb/evals/opensanctions-on/graders/licence-and-evidence.md +18 -0
- package/templates/kyb/evals/opensanctions-on/graders/schema.md +5 -0
- package/templates/kyb/evals/opensanctions-on/prompt.md +11 -0
- package/templates/market-monitor/agent.md +2 -2
- package/templates/market-monitor/skills/monitor/SKILL.md +6 -4
- package/templates/release-notes/agent.md +11 -0
- package/dist/bound-files.d.ts +0 -4
- package/dist/bound-files.js +0 -164
- package/dist/coding-tools.d.ts +0 -47
- package/dist/coding-tools.js +0 -189
- package/dist/computer-adb.d.ts +0 -12
- package/dist/computer-adb.js +0 -14
- package/dist/console/assets/index-Dn0ngwG9.js +0 -535
- package/dist/console/assets/index-DvW6Aled.css +0 -1
- package/dist/grade.d.ts +0 -63
- package/dist/grade.js +0 -150
- package/dist/mcp-servers.d.ts +0 -269
- package/dist/mcp-servers.js +0 -456
- package/dist/packs.d.ts +0 -71
- package/dist/packs.js +0 -180
- package/dist/sealed-settings.d.ts +0 -60
- package/dist/sealed-settings.js +0 -171
- package/dist/sessions.d.ts +0 -6
- package/dist/sessions.js +0 -109
- package/dist/workspace/computer-serves.d.ts +0 -12
- package/dist/workspace/computer-serves.js +0 -15
package/dist/learn/skills.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { assertWorkflowCapabilities, desugarWorkflow, inspectWorkflow, validateWorkflow } from "@parcha/agentrun-dsl";
|
|
1
|
+
import type { assertWorkflowCapabilities, desugarWorkflow, dryRunWorkflow, inspectWorkflow, resolveSchemaForWorkflow, validateWorkflow } from "@parcha/agentrun-dsl";
|
|
2
2
|
/** Where a skill and a workflow draft live in the folder. */
|
|
3
3
|
export declare const SKILLS_DIR = "skills";
|
|
4
4
|
export declare const WORKFLOWS_DIR = "workflows";
|
|
@@ -16,54 +16,159 @@ export type LearnedPlace = {
|
|
|
16
16
|
export declare function learnedPlace(path: string): LearnedPlace | undefined;
|
|
17
17
|
/** Whether `name` is a good name for a folder of `kind`. */
|
|
18
18
|
export declare const learnedName: (kind: LearnedPlace["kind"], name: string) => boolean;
|
|
19
|
-
/**
|
|
20
|
-
|
|
19
|
+
/** Why a front matter does not read one way, by frontMatter: the words a refusal says. */
|
|
20
|
+
export declare const UNCLEAR_FRONT = "its front matter does not read one way: each line a `key: value` at its left edge, a comment, or a line of the value above it";
|
|
21
|
+
/** A SKILL.md's or a draft README's front matter, read one way, as the one reader of what it says of itself (its keys,
|
|
22
|
+
* its name, its description, its status): each key to its value in order, or undefined when it does not read one way,
|
|
23
|
+
* since another reader (a harness's YAML) could then read a key, a status among them, this one does not. It reads one
|
|
24
|
+
* way when it starts the text (`---`), closes on a `---` line (the last line or not), and each line between is blank,
|
|
25
|
+
* a comment at its left edge, `key: value` at its left edge (a key set once), or a line of the value above it: any
|
|
26
|
+
* indented line under a `key:` with nothing after it (its nested value, a mapping or a list among them), an indented
|
|
27
|
+
* line of a `>` or `|` block, or of a plain value that wraps (one that reads as no key of its own), an indented comment
|
|
28
|
+
* under a plain value being no part of it. A quoted value is read as YAML reads it (unquote: its escapes decoded); a
|
|
29
|
+
* nested, block or wrapped value's lines are joined by one space. Anything else (an indented first line, an indented
|
|
30
|
+
* `key:` under a value, a list at the left edge, a key set twice, a YAML explicit key `? key`, which every writer here
|
|
31
|
+
* would have to edit in its own form) reads no way. */
|
|
32
|
+
export declare function frontMatter(text: string): ReadonlyMap<string, string> | undefined;
|
|
33
|
+
/** Every value a SKILL.md's or a draft README's front matter holds, as YAML reads it (frontMatter: escapes decoded):
|
|
34
|
+
* what a check for secrets reads beside the text as stored, since the decoded value is the one a harness is served
|
|
35
|
+
* (servedSkill). None for a text whose front matter does not read one way. */
|
|
36
|
+
export declare function frontValues(text: string): string[];
|
|
37
|
+
/** The keys a SKILL.md's or a draft README's front matter sets, in order (frontMatter's); undefined for a text whose
|
|
38
|
+
* front matter does not read one way. */
|
|
21
39
|
export declare function frontKeys(text: string): string[] | undefined;
|
|
22
40
|
/** The front matter keys a learned skill or draft README may hold: what a skill is (its name and when to use it). Claude
|
|
23
41
|
* Code reads directives from more (hooks, allowed-tools, context, agent, model, ...): a hook is a shell command its CLI
|
|
24
42
|
* runs. `status` is the host's (a held one). */
|
|
25
43
|
export declare const LEARNED_KEYS: readonly string[];
|
|
26
|
-
/** `text`, a learned skill's SKILL.md, as a run is given it: front matter with its name and its description alone,
|
|
27
|
-
*
|
|
28
|
-
*
|
|
44
|
+
/** `text`, a learned skill's SKILL.md, as a run is given it: front matter with its name and its description alone, as
|
|
45
|
+
* the one reader reads them (frontMatter), each quoted as JSON writes it, which every YAML reads back as that very
|
|
46
|
+
* string (never null, a boolean, a number or a date), written again whatever else its file holds (servedSkill is the
|
|
47
|
+
* one door a learned skill reaches a harness by), then its body as it is. A text with no front matter, or one whose front
|
|
48
|
+
* matter reads no way, is as it is: never served with its fields emptied. A learned one of those is never active, so
|
|
49
|
+
* never given; a revision's own is the harness's to check, as its author wrote it. */
|
|
29
50
|
export declare function servedSkill(text: string): string;
|
|
51
|
+
/** Skills as a harness that loads them through servedSkill is handed them (OpenCode, adapters.ts opencodeOf): each
|
|
52
|
+
* SKILL.md as servedSkill writes it, its other files as they are. Its table entry's check and the learned skills' room
|
|
53
|
+
* (learning.ts chooseSkills) read this same form, so a set the check takes is never one that grew past its limit after. */
|
|
54
|
+
export declare const servedSkills: <T extends {
|
|
55
|
+
files: Record<string, string>;
|
|
56
|
+
}>(skills: readonly T[]) => T[];
|
|
30
57
|
/** Why a `SKILL.md` for the skill `name`, or a draft's `README.md` for the workflow `name`, is out of shape; empty when
|
|
31
58
|
* it is not. Its front matter names the folder's name and a description. */
|
|
32
59
|
export declare function skillProblems(text: string, name: string): string[];
|
|
33
|
-
/** A SKILL.md's or a draft README's front matter as a reader shows it: its name, description and status,
|
|
34
|
-
* when it is not there; undefined for a text
|
|
60
|
+
/** A SKILL.md's or a draft README's front matter as a reader shows it (frontMatter): its name, description and status,
|
|
61
|
+
* each absent when it is not there; undefined for a text whose front matter does not read one way. */
|
|
35
62
|
export declare function learnedFront(text: string): {
|
|
36
63
|
name?: string;
|
|
37
64
|
description?: string;
|
|
38
65
|
status?: string;
|
|
39
66
|
} | undefined;
|
|
40
|
-
/** Whether a SKILL.md or a draft's README.md sets `status`, which only the host does (`held`). */
|
|
67
|
+
/** Whether a SKILL.md or a draft's README.md sets `status`, which only the host does (`held`) (frontMatter). */
|
|
41
68
|
export declare const setsStatus: (text: string) => boolean;
|
|
42
69
|
/** A skill or a draft the grader held for its owner's OK: its SKILL.md, or its draft's README.md, says `status:
|
|
43
|
-
* pending
|
|
70
|
+
* pending` (learnedStatus). No run is given a held skill or workflow until a person approves it. */
|
|
44
71
|
export declare const isHeld: (text: string) => boolean;
|
|
72
|
+
/** Whether `text`'s status, when it sets one, is one plain line, `status: <value>` with nothing of it on the lines after
|
|
73
|
+
* (no quoted value that runs on, no block, no wrapped line): the only status the host's writers (released,
|
|
74
|
+
* retiredLearned), which take the `status:` line out whole, can edit. One set any other way reads unclear (learnedStatus:
|
|
75
|
+
* retired), never held or active, and no writer edits it, so a write never leaves part of it behind. The host writes
|
|
76
|
+
* only one-line statuses (held, retiredLearned). */
|
|
77
|
+
export declare const statusOnOneLine: (text: string) => boolean;
|
|
45
78
|
/** `text`, a SKILL.md or a draft's README.md, as the host merges one the grader held for its owner's OK: `status:
|
|
46
79
|
* pending` last in its front matter, with LF line ends. Throws on a text with no front matter, which the checker never
|
|
47
80
|
* passes. */
|
|
48
81
|
export declare function held(text: string): string;
|
|
49
82
|
/** `text`, a held SKILL.md or draft README.md, as the host leaves it when its owner approves it: its front matter with
|
|
50
|
-
* no `status` line, so it is given to every later run. Throws on a text with no front matter. */
|
|
83
|
+
* no `status` or `retired_from` line, so it is given to every later run. Throws on a text with no front matter. */
|
|
51
84
|
export declare function released(text: string): string;
|
|
52
|
-
/**
|
|
53
|
-
*
|
|
85
|
+
/** The status a retired SKILL.md or draft README.md goes back to when a person restores it (`retired_from`, which its
|
|
86
|
+
* retire recorded), read by the one reader (frontMatter: its quoting, its one-line rule): `active` only when it reads
|
|
87
|
+
* `active` one way, on one plain line; `pending` otherwise, a retire that recorded none or one that reads unclear among
|
|
88
|
+
* them (fail closed: only an approval makes a skill or a draft active). */
|
|
89
|
+
export declare function retiredFrom(text: string): "active" | "pending";
|
|
90
|
+
/** Whether a retired SKILL.md or draft README.md can be restored by the host's writer: its front matter reads one way
|
|
91
|
+
* (frontMatter), and its `status` and `retired_from` are each one plain line, the only ones the writer takes out whole.
|
|
92
|
+
* One that is not is refused until it is written so (a restore never edits half a value). */
|
|
93
|
+
export declare const restorable: (text: string) => boolean;
|
|
94
|
+
/** `text`, a retired SKILL.md or draft README.md, as the host leaves it when a person restores it: back in the status its
|
|
95
|
+
* retire recorded (retiredFrom), active, or waiting for its owner's OK. Throws on a text whose front matter does not read
|
|
96
|
+
* one way, or whose status is not one plain line (released). */
|
|
97
|
+
export declare const restoredLearned: (text: string) => string;
|
|
98
|
+
/** What a SKILL.md or a draft's README.md says of itself, the one reader of it (frontMatter), the server's and, through
|
|
99
|
+
* the folder's snapshot, the console's: `pending` while it waits for its owner's OK, `retired` once a person retired
|
|
100
|
+
* it, `active` when it sets no status or `active`. A front matter that does not read one way, or a status that is none
|
|
101
|
+
* of these, is `retired`: never active, since another reader could read it as held or retired; no run is given it, and
|
|
102
|
+
* a restore refuses it until it reads one way. A run is given only an active one. */
|
|
54
103
|
export declare function learnedStatus(text: string): "active" | "pending" | "retired";
|
|
55
|
-
/** `text`, a SKILL.md or a draft's README.md, as a person's retire leaves it: `status: retired`
|
|
56
|
-
*
|
|
104
|
+
/** `text`, a SKILL.md or a draft's README.md, as a person's retire leaves it: `status: retired` and `retired_from`, the
|
|
105
|
+
* status it had (active, or pending while it waited for its owner's OK), last in its front matter (any such lines before
|
|
106
|
+
* them dropped), so no later run is given it and its restore gives that status back. Throws on a text with no front
|
|
107
|
+
* matter. */
|
|
57
108
|
export declare function retiredLearned(text: string): string;
|
|
58
109
|
/** A draft's `README.md` as the host writes it, from the workflow's name and the one-line description its block gives. */
|
|
59
110
|
export declare const readmeOf: (name: string, description: string) => string;
|
|
60
111
|
/** A workflow block's two files: its `description:` front matter written as the draft's README.md (readmeOf), and the
|
|
61
112
|
* JSON after it as its workflow.json. A block with no front matter, or none that says what the draft is for, gives a
|
|
62
|
-
* README with no description, which the checker refuses; what the JSON holds is the checker's to judge.
|
|
113
|
+
* README with no description, which the checker refuses; what the JSON holds is the checker's to judge. `example`, its
|
|
114
|
+
* `example:` front matter line as written (the run's own input to the workflow, one JSON object): what its dry run runs
|
|
115
|
+
* on (draftDryRun), and never a file's: the README holds its name and description alone, so the run's input, which can
|
|
116
|
+
* be a customer's data, is never kept in the learning folder. */
|
|
63
117
|
export declare function draftFiles(name: string, block: string): {
|
|
64
118
|
json: string;
|
|
65
119
|
readme: string;
|
|
120
|
+
example?: string;
|
|
66
121
|
};
|
|
122
|
+
/** How a draft's dry run went (draftDryRun): `passed`, the path its one input took ran on synthetic values (not every
|
|
123
|
+
* branch or body); `not_run`, a check could not run (`detail` says which), so it is no proof; `failed`, `detail` says
|
|
124
|
+
* where. */
|
|
125
|
+
export type DraftDryRun = {
|
|
126
|
+
readonly status: "passed" | "not_run" | "failed";
|
|
127
|
+
readonly detail?: string;
|
|
128
|
+
};
|
|
129
|
+
/** The words a draft that failed its dry run is left out with, before why: a re-ask reads them (reflect-hook.ts). */
|
|
130
|
+
export declare const DRY_RUN_FAILED = "its dry run failed";
|
|
131
|
+
/** The most of a value a draft's dry run may synthesize from one of its schemas (the DSL's synthesizeInstance builds
|
|
132
|
+
* each in the host, before any step it counts): an array's minItems and a string's minLength each, and the values and
|
|
133
|
+
* string characters the schema's whole synthesized instance holds. Past any of them the draft is refused statically
|
|
134
|
+
* (draftProblems), and a dry run handed one anyway stands down as not run before anything is built (draftDryRun). */
|
|
135
|
+
export declare const SYNTH_MIN_ITEMS = 100;
|
|
136
|
+
export declare const SYNTH_MIN_LENGTH = 1000;
|
|
137
|
+
export declare const SYNTH_VALUES = 2000;
|
|
138
|
+
export declare const SYNTH_CHARS = 64000;
|
|
139
|
+
type Synthesized = {
|
|
140
|
+
values: number;
|
|
141
|
+
chars: number;
|
|
142
|
+
};
|
|
143
|
+
/** What the DSL's synthesizeInstance would build of `schema` over `definitions`, counted without building it. */
|
|
144
|
+
export declare const synthesizedSize: (schema: unknown, definitions?: Readonly<Record<string, unknown>>) => Synthesized;
|
|
145
|
+
/** The most iterations one loop of a learned draft may run (its maxIters), and the most nested loops may run together
|
|
146
|
+
* (their maxIters multiplied, outermost to innermost). A loop's iterations are work the dry run does in the host whether
|
|
147
|
+
* or not its body asks a model (an empty map, a predicate), so they are bounded here, not only by the dry run's steps. */
|
|
148
|
+
export declare const LEARNED_MAX_ITERS = 50;
|
|
149
|
+
export declare const LEARNED_LOOP_ITERS = 1000;
|
|
150
|
+
/** Why `doc`'s loops could run too long: a loop whose maxIters is past LEARNED_MAX_ITERS, or nested loops whose maxIters
|
|
151
|
+
* multiply past LEARNED_LOOP_ITERS, a composed workflow node's child's included. Read from the JSON alone, at node
|
|
152
|
+
* positions only (eachWorkflow): a literal shaped like a loop is data. */
|
|
153
|
+
export declare function loopProblems(doc: unknown): string[];
|
|
154
|
+
/** How the dry run resolves a schema before it synthesizes it (the DSL's resolveSchemaForWorkflow): its `$ref`s to the
|
|
155
|
+
* workflow's other schemas filled into its definitions, whatever definitions it gives of its own. */
|
|
156
|
+
export type SchemaResolver = {
|
|
157
|
+
readonly resolveSchemaForWorkflow: typeof resolveSchemaForWorkflow;
|
|
158
|
+
};
|
|
159
|
+
/** Why a dry run of `doc` would build too much in the host: a schema whose minItems or minLength is past its cap, or
|
|
160
|
+
* whose synthesized instance holds more values or characters than SYNTH_VALUES or SYNTH_CHARS. Empty when none. Each
|
|
161
|
+
* schema is counted as the dry run reads it, after the same resolution (`dsl.resolveSchemaForWorkflow`), so a `$ref` a
|
|
162
|
+
* schema's own (even empty) definitions would hide is counted as the dry run fills it in. Building nothing. */
|
|
163
|
+
export declare function synthesisProblems(doc: unknown, dsl: SchemaResolver): string[];
|
|
164
|
+
/** A draft's workflow.json `json` dry-run by the workflow DSL (dryRunWorkflow) on `example` (its block's `example:`
|
|
165
|
+
* line, one JSON object), else on an input synthesized from its input schema. Every model, Jev and tool-call answer is
|
|
166
|
+
* synthesized from the node's output schema: no request is sent, nothing is paid, no tool runs, and no code it holds
|
|
167
|
+
* runs in this process (refuseCode). Only a draft the static checks pass is dry-run (propose.ts). It checks the wiring
|
|
168
|
+
* at run time (the state each step reads, its output's path and schema), never the answers. */
|
|
169
|
+
export declare function draftDryRun(dsl: {
|
|
170
|
+
readonly dryRunWorkflow: typeof dryRunWorkflow;
|
|
171
|
+
} & SchemaResolver, json: string, example?: string): Promise<DraftDryRun>;
|
|
67
172
|
/** The refusal for a draft that names a tool when the host gave no tool list: the check fails closed. */
|
|
68
173
|
export declare const NO_TOOL_LIST = "no tool list was given, so a draft that names a tool is refused";
|
|
69
174
|
export type DraftProblem = {
|
|
@@ -72,7 +177,7 @@ export type DraftProblem = {
|
|
|
72
177
|
};
|
|
73
178
|
/** What a draft is read with: the workflow DSL's own validation and inspection. The caller loads the DSL (`await
|
|
74
179
|
* import("@parcha/agentrun-dsl")`), which the server only ever loads when it needs it, and hands it here. */
|
|
75
|
-
export type DraftReader = {
|
|
180
|
+
export type DraftReader = SchemaResolver & {
|
|
76
181
|
readonly validateWorkflow: typeof validateWorkflow;
|
|
77
182
|
readonly inspectWorkflow: typeof inspectWorkflow;
|
|
78
183
|
readonly desugarWorkflow: typeof desugarWorkflow;
|
|
@@ -90,6 +195,36 @@ export declare const LEARNED_NODES = "a learned workflow runs model and tool-cal
|
|
|
90
195
|
/** Where a deny was set (tool-gate.ts SettingFrom), and its words (tool-gate.ts denyPlace), kept here so the learn
|
|
91
196
|
* module needs no import of the gate. */
|
|
92
197
|
type SettingFrom = "agent" | "server" | "default";
|
|
198
|
+
/** An MCP tool a learned workflow's call node may run, by its address (`via: "tool"`, `tool: "mcp:<server>/<tool>"`,
|
|
199
|
+
* LS-07): its server's name as a server is named (mcp-probe.ts MCP_SERVER_NAME) and one tool's name in MCP's own
|
|
200
|
+
* charset, never a wildcard. The one rule for it: the tools a draft may name (tools.ts learnedWorkflowTools), the
|
|
201
|
+
* end-of-run prompt that prints them (reflect.ts), and what the grader is told of a draft (grade.ts). */
|
|
202
|
+
export declare const LEARNED_MCP_TOOL: RegExp;
|
|
203
|
+
/** The MCP tools a draft's call nodes run, each once, in the order they come (LS-07): every call node in `doc`, nested
|
|
204
|
+
* ones too, whose tool is an MCP tool's address. Read from the JSON as it is, for the grader's words; never a check. */
|
|
205
|
+
export declare function draftMcpTools(doc: unknown): string[];
|
|
206
|
+
/** One step of a learned workflow that runs an MCP tool with no declared per-call price: its label, the tool and its
|
|
207
|
+
* server. */
|
|
208
|
+
export type UnpricedCall = {
|
|
209
|
+
readonly label: string;
|
|
210
|
+
readonly tool: string;
|
|
211
|
+
readonly server: string;
|
|
212
|
+
};
|
|
213
|
+
/** The call nodes of a learned workflow (`doc`, its parsed workflow.json, nested ones too) whose tool is an MCP tool
|
|
214
|
+
* (LEARNED_MCP_TOOL) that `priceOf` gives no price for (mcp-probe.ts McpPrices: none declared). Such a tool runs "not
|
|
215
|
+
* metered", outside the run's cost and cap (mcp-gateway.ts), so a learned workflow that calls one unattended waits for
|
|
216
|
+
* its owner's OK whatever the grade (LS-07): a structural fact, held in code. Each step once, in order. */
|
|
217
|
+
export declare function unpricedCalls(doc: unknown, priceOf: (tool: string) => number | undefined): UnpricedCall[];
|
|
218
|
+
/** Why a learned workflow that calls `call` waits for its owner's OK, in a person's words. */
|
|
219
|
+
export declare const unpricedLine: (call: UnpricedCall) => string;
|
|
220
|
+
/** Every string a learned workflow's workflow.json decodes to, each object's keys too, as JSON.parse reads them (its
|
|
221
|
+
* escapes decoded: what draftProblems and a learned call's run read, and a model node is given). Text a scan of the
|
|
222
|
+
* stored JSON misses, spelled in \u escapes, is there as it will be read. None for a text that does not parse (the
|
|
223
|
+
* checks refuse it as no workflow). */
|
|
224
|
+
export declare function decodedStrings(json: string): string[] | "too_deep";
|
|
225
|
+
/** How deep a learned workflow's JSON may nest (decodedStrings): far past any workflow the DSL writes, a node's schemas
|
|
226
|
+
* included, and short of what a walk of it could not bound. */
|
|
227
|
+
export declare const DECODED_DEPTH = 100;
|
|
93
228
|
/** The most turns a learned workflow's model node runs (learned-workflow.ts hands its runner this cap): an agent node
|
|
94
229
|
* that asks for more is refused at learn time and before a call, never when it comes up after earlier nodes spent. */
|
|
95
230
|
export declare const LEARNED_MAX_TURNS = 8;
|
|
@@ -99,5 +234,11 @@ export declare const LEARNED_MAX_TURNS = 8;
|
|
|
99
234
|
* apply_patch) is never on the list. A model node that names any tool is refused (MODEL_NODE_TOOLS), and a node the
|
|
100
235
|
* learned runner cannot run (LEARNED_NODES: a judge's). With no list it
|
|
101
236
|
* fails closed: a draft the DSL refuses only once given an empty list names a tool. */
|
|
102
|
-
|
|
237
|
+
/** The MCP tools set to ask a learned call would ask its approver about (`asked`, learnedDraftTools), and whether a card
|
|
238
|
+
* names them all (`fits`: learned-workflow.ts learnedAskFits, the gate's own rule, handed in so it is never copied). */
|
|
239
|
+
export type DraftAsk = {
|
|
240
|
+
readonly asked: readonly string[];
|
|
241
|
+
readonly fits: (asks: readonly string[]) => boolean;
|
|
242
|
+
};
|
|
243
|
+
export declare function draftProblems(dsl: DraftReader, text: string, tools?: readonly string[], gated?: Readonly<Record<string, string>>, deniedBy?: Readonly<Record<string, SettingFrom>>, ask?: DraftAsk): DraftProblem[];
|
|
103
244
|
export {};
|