@parcha/agentrun-serve 0.1.0-beta.43 → 0.1.0-beta.45
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 +231 -0
- package/README.md +580 -320
- package/dist/acp-package.d.ts +28 -0
- package/dist/acp-package.js +23 -0
- package/dist/adapter-facts.d.ts +8 -1
- package/dist/adapter-facts.js +9 -1
- package/dist/adapters.d.ts +5 -0
- package/dist/adapters.js +36 -3
- package/dist/agent-delete.d.ts +50 -0
- package/dist/agent-delete.js +125 -0
- package/dist/agents-store.d.ts +9 -3
- package/dist/agents-store.js +22 -8
- package/dist/agents.d.ts +5 -1
- package/dist/agents.js +8 -4
- package/dist/api-only.d.ts +8 -3
- package/dist/api-only.js +10 -4
- package/dist/archil-routes.d.ts +5 -1
- package/dist/archil-routes.js +57 -2
- package/dist/browser-wait-ended.d.ts +2 -0
- package/dist/browser-wait-ended.js +2 -0
- package/dist/calendar/ics-faux.d.ts +3 -1
- package/dist/calendar/ics-faux.js +12 -2
- package/dist/calendar/tools.js +5 -2
- package/dist/chatgpt-plan.js +3 -1
- package/dist/claude-login.d.ts +135 -0
- package/dist/claude-login.js +244 -0
- package/dist/cli.js +92 -22
- package/dist/composio-preset.d.ts +4 -3
- package/dist/composio-preset.js +81 -11
- package/dist/composio-triggers.d.ts +34 -2
- package/dist/composio-triggers.js +261 -31
- package/dist/computer-attach.d.ts +40 -5
- package/dist/computer-attach.js +130 -15
- package/dist/computer-keys.d.ts +3 -0
- package/dist/computer-keys.js +7 -1
- package/dist/computer-live.js +3 -2
- package/dist/computer-lost.d.ts +11 -0
- package/dist/computer-lost.js +19 -0
- package/dist/computer-record.d.ts +10 -2
- package/dist/computer-record.js +50 -18
- package/dist/computer-setting.d.ts +1 -0
- package/dist/computer-setting.js +2 -2
- package/dist/computers.d.ts +21 -10
- package/dist/computers.js +39 -28
- package/dist/console/assets/index-3O2Yl6hZ.js +701 -0
- package/dist/console/assets/index-DaFsZuzQ.css +1 -0
- package/dist/console/index.html +2 -2
- package/dist/decisions.d.ts +1 -1
- package/dist/dial-relay.d.ts +29 -0
- package/dist/dial-relay.js +94 -0
- package/dist/email/tools.js +10 -5
- package/dist/env-proxy.d.ts +2 -0
- package/dist/env-proxy.js +35 -0
- package/dist/errors.d.ts +4 -1
- package/dist/errors.js +10 -4
- package/dist/faux-computers.d.ts +8 -2
- package/dist/faux-computers.js +83 -6
- package/dist/harness-archive.d.ts +67 -0
- package/dist/harness-archive.js +177 -0
- package/dist/harness-goose.d.ts +34 -0
- package/dist/harness-goose.js +87 -0
- package/dist/harness-install.d.ts +21 -0
- package/dist/harness-install.js +24 -11
- package/dist/harness-opencode/adapter.js +1 -1
- package/dist/harness-table.d.ts +59 -3
- package/dist/harness-table.js +119 -14
- package/dist/harness.d.ts +17 -1
- package/dist/harness.js +22 -11
- package/dist/host.d.ts +12 -10
- package/dist/host.js +19 -16
- package/dist/import-worker.d.ts +3 -0
- package/dist/import-worker.js +7 -5
- package/dist/import.d.ts +22 -1
- package/dist/import.js +141 -28
- package/dist/key-check.js +3 -0
- package/dist/learn/audit.d.ts +6 -6
- package/dist/learn/audit.js +3 -7
- package/dist/learn/check.d.ts +26 -89
- package/dist/learn/check.js +58 -336
- package/dist/learn/commit.d.ts +63 -90
- package/dist/learn/commit.js +124 -316
- package/dist/learn/compile.d.ts +53 -50
- package/dist/learn/compile.js +88 -103
- package/dist/learn/corrections.d.ts +13 -0
- package/dist/learn/corrections.js +23 -0
- package/dist/learn/delete.d.ts +17 -0
- package/dist/learn/delete.js +42 -0
- package/dist/learn/folder.d.ts +35 -47
- package/dist/learn/folder.js +118 -134
- package/dist/learn/index.d.ts +3 -5
- package/dist/learn/index.js +6 -9
- package/dist/learn/learning.sh +45 -15
- package/dist/learn/promote.d.ts +20 -2
- package/dist/learn/promote.js +17 -4
- package/dist/learn/{skills.d.ts → workflow-draft.d.ts} +34 -38
- package/dist/learn/{skills.js → workflow-draft.js} +65 -59
- package/dist/learn/workflow-nodes.d.ts +22 -1
- package/dist/learn/workflow-nodes.js +29 -10
- package/dist/learned-workflow.js +2 -2
- package/dist/learning-cost.d.ts +127 -13
- package/dist/learning-cost.js +142 -10
- package/dist/learning-routes.d.ts +99 -170
- package/dist/learning-routes.js +199 -420
- package/dist/learning-run.d.ts +19 -40
- package/dist/learning-run.js +23 -93
- package/dist/learning-setting.d.ts +4 -4
- package/dist/learning-setting.js +6 -6
- package/dist/learning-words.d.ts +28 -74
- package/dist/learning-words.js +64 -162
- package/dist/learning.d.ts +62 -393
- package/dist/learning.js +101 -651
- package/dist/listen-first.d.ts +30 -0
- package/dist/listen-first.js +115 -0
- package/dist/live-reach.d.ts +25 -2
- package/dist/live-reach.js +46 -4
- package/dist/llms.txt +2 -1
- package/dist/local-models.d.ts +3 -11
- package/dist/local-models.js +5 -6
- package/dist/mcp-servers-store.d.ts +16 -16
- package/dist/model-form.js +6 -5
- package/dist/model.d.ts +12 -4
- package/dist/model.js +41 -16
- package/dist/native/binding.js +1 -1
- package/dist/native/connection.js +1 -1
- package/dist/native/discovery.js +1 -1
- package/dist/native/instructions.d.ts +3 -0
- package/dist/native/instructions.js +5 -3
- package/dist/native/remote-worker-bridge.js +9 -43
- package/dist/native/remote.d.ts +8 -15
- package/dist/native/remote.js +3 -3
- package/dist/native/schema.js +1 -1
- package/dist/native/types.d.ts +2 -2
- package/dist/openapi.js +375 -347
- package/dist/owner.d.ts +8 -0
- package/dist/owner.js +11 -0
- package/dist/paid-calls.d.ts +14 -0
- package/dist/paid-calls.js +31 -1
- package/dist/particle-provider.d.ts +11 -0
- package/dist/particle-provider.js +135 -0
- package/dist/place.d.ts +8 -3
- package/dist/place.js +13 -9
- package/dist/port-models.d.ts +12 -4
- package/dist/port-models.js +28 -11
- package/dist/print.d.ts +27 -0
- package/dist/print.js +21 -0
- package/dist/provider.d.ts +7 -0
- package/dist/provider.js +30 -2
- package/dist/reflect-range.js +2 -3
- package/dist/run-launch.d.ts +14 -28
- package/dist/run-launch.js +9 -12
- package/dist/run-learning-served.d.ts +16 -90
- package/dist/run-listing.d.ts +34 -0
- package/dist/run-listing.js +128 -0
- package/dist/run-model-key.d.ts +64 -0
- package/dist/run-model-key.js +147 -0
- package/dist/run-timeline-served.js +5 -3
- package/dist/run-trace.d.ts +97 -0
- package/dist/run-trace.js +253 -0
- package/dist/run-view.d.ts +15 -0
- package/dist/run-view.js +9 -0
- package/dist/runnable.js +2 -1
- package/dist/runner/adapter-loop.d.ts +14 -6
- package/dist/runner/adapter-loop.js +25 -14
- package/dist/runner/adapter-run-spec.d.ts +22 -7
- package/dist/runner/adapter-run-spec.js +130 -77
- package/dist/runner/adapters/index.d.ts +4 -2
- package/dist/runner/adapters/index.js +35 -4
- package/dist/runner/adapters/pi.d.ts +4 -12
- package/dist/runner/adapters/pi.js +2 -2
- package/dist/runner/audit.d.ts +5 -1
- package/dist/runner/audit.js +31 -12
- package/dist/runner/beside.d.ts +7 -2
- package/dist/runner/beside.js +41 -9
- package/dist/runner/claim-secrets.d.ts +66 -1
- package/dist/runner/claim-secrets.js +136 -3
- package/dist/runner/cli-run-spec.d.ts +2 -1
- package/dist/runner/cli-run-spec.js +82 -59
- package/dist/runner/commands.d.ts +3 -6
- package/dist/runner/conformance/harness.d.ts +6 -0
- package/dist/runner/conformance/harness.js +16 -5
- package/dist/runner/dispatch.d.ts +2 -2
- package/dist/runner/end-of-run.d.ts +6 -14
- package/dist/runner/end-of-run.js +8 -33
- package/dist/runner/feedback-round.d.ts +5 -4
- package/dist/runner/feedback-round.js +14 -10
- package/dist/runner/github-app.js +3 -1
- package/dist/runner/harness-loops.d.ts +0 -8
- package/dist/runner/harness-loops.js +30 -56
- package/dist/runner/held.d.ts +170 -0
- package/dist/runner/held.js +57 -0
- package/dist/runner/journal-kinds.d.ts +7 -3
- package/dist/runner/journal-kinds.js +2 -3
- package/dist/runner/learned-first.d.ts +40 -0
- package/dist/runner/learned-first.js +32 -0
- package/dist/runner/learning-end.d.ts +77 -66
- package/dist/runner/learning-end.js +250 -299
- package/dist/runner/learning-seed.d.ts +15 -33
- package/dist/runner/learning-seed.js +24 -45
- package/dist/runner/loop-contract.d.ts +8 -3
- package/dist/runner/loop-contract.js +4 -0
- package/dist/runner/loop.js +6 -2
- package/dist/runner/main.d.ts +18 -9
- package/dist/runner/main.js +82 -22
- package/dist/runner/mcp-run.d.ts +11 -0
- package/dist/runner/mcp-run.js +67 -0
- package/dist/runner/memory-claim.d.ts +14 -6
- package/dist/runner/memory-claim.js +18 -9
- package/dist/runner/model-route.d.ts +7 -4
- package/dist/runner/model-route.js +22 -10
- package/dist/runner/native-loop.d.ts +0 -7
- package/dist/runner/native-loop.js +9 -101
- package/dist/runner/promotion.d.ts +13 -6
- package/dist/runner/promotion.js +63 -17
- package/dist/runner/reflect-hook.d.ts +64 -91
- package/dist/runner/reflect-hook.js +112 -206
- package/dist/runner/run-channel.d.ts +43 -0
- package/dist/runner/run-channel.js +467 -0
- package/dist/runner/run-child-host.d.ts +169 -0
- package/dist/runner/run-child-host.js +1222 -0
- package/dist/runner/run-child.d.ts +1 -0
- package/dist/runner/run-child.js +254 -0
- package/dist/runner/run-errors.d.ts +2 -0
- package/dist/runner/run-errors.js +20 -0
- package/dist/runner/runner.js +58 -9
- package/dist/runner/sdk-ask.d.ts +78 -0
- package/dist/runner/sdk-ask.js +158 -0
- package/dist/runner/sdk-loop.d.ts +2 -4
- package/dist/runner/sdk-loop.js +29 -49
- package/dist/runner/store-secrets.d.ts +5 -3
- package/dist/runner/store-secrets.js +14 -6
- package/dist/runner/workflow-first.d.ts +5 -0
- package/dist/runner/workflow-first.js +4 -0
- package/dist/runner/workflow-spec.js +17 -4
- package/dist/runs-over-store.d.ts +21 -32
- package/dist/runs-over-store.js +44 -41
- package/dist/sdk/runs.d.ts +6 -11
- package/dist/sdk/runs.js +20 -41
- package/dist/sdk/schema.js +3 -4
- package/dist/sdk/workflows.d.ts +1 -1
- package/dist/seal-key.d.ts +5 -0
- package/dist/seal-key.js +7 -0
- package/dist/secrets.d.ts +3 -0
- package/dist/secrets.js +16 -3
- package/dist/server.d.ts +119 -83
- package/dist/server.js +1121 -419
- package/dist/sign-ins-store.d.ts +8 -0
- package/dist/sign-ins-store.js +36 -1
- package/dist/skills.js +1 -1
- package/dist/store/index.d.ts +3 -3
- package/dist/store/index.js +2 -2
- package/dist/store/journal/storage.js +3 -0
- package/dist/store/postgres/migrations/0017_run_listing.sql +83 -0
- package/dist/store/postgres/migrations/0018_trigger_template.sql +6 -0
- package/dist/store/postgres/migrations/0019_runner_relays.sql +28 -0
- package/dist/store/schema.d.ts +53 -4
- package/dist/store/schema.js +137 -6
- package/dist/store/seal.d.ts +20 -2
- package/dist/store/seal.js +24 -8
- package/dist/store/sqlite/connection.d.ts +2 -0
- package/dist/store/sqlite/connection.js +3 -1
- package/dist/store/sqlite/run-launch.d.ts +4 -1
- package/dist/store/sqlite/run-launch.js +12 -0
- package/dist/store/sqlite/run-patch.d.ts +0 -17
- package/dist/store/sqlite/run-patch.js +4 -33
- package/dist/store/sqlite/store.d.ts +3 -2
- package/dist/store/sqlite/store.js +360 -75
- package/dist/store/sqlite/worker.js +25 -0
- package/dist/store/store.d.ts +231 -39
- package/dist/store/store.js +25 -3
- package/dist/store-reads/analytics.js +11 -1
- package/dist/store-reads/learning.d.ts +131 -194
- package/dist/store-reads/learning.js +292 -301
- package/dist/store-reads/loop.d.ts +0 -1
- package/dist/store-reads/loop.js +1 -1
- package/dist/store-reads/stats.js +13 -3
- package/dist/store-view.d.ts +34 -2
- package/dist/store-view.js +108 -41
- package/dist/telemetry.d.ts +59 -0
- package/dist/telemetry.js +153 -0
- package/dist/template-eval.d.ts +3 -6
- package/dist/template-eval.js +22 -36
- package/dist/templates.d.ts +2 -1
- package/dist/templates.js +6 -3
- package/dist/timeline/index.d.ts +1 -1
- package/dist/timeline/index.js +1 -1
- package/dist/timeline/timeline.d.ts +5 -1
- package/dist/timeline/timeline.js +16 -0
- package/dist/tool-gate.d.ts +0 -7
- package/dist/tool-gate.js +1 -15
- package/dist/tool-keys-store.d.ts +1 -1
- package/dist/tool-keys.d.ts +6 -4
- package/dist/tool-keys.js +12 -6
- package/dist/tool-plane.d.ts +12 -12
- package/dist/tools.d.ts +13 -13
- package/dist/tools.js +29 -9
- package/dist/trigger-adapter.d.ts +3 -0
- package/dist/trigger-adapters.d.ts +4 -0
- package/dist/trigger-adapters.js +13 -0
- package/dist/trigger-composio.d.ts +58 -1
- package/dist/trigger-composio.js +160 -6
- package/dist/triggers.d.ts +64 -5
- package/dist/triggers.js +141 -17
- package/dist/validate.d.ts +11 -7
- package/dist/validate.js +9 -8
- package/dist/webhooks.d.ts +4 -1
- package/dist/webhooks.js +11 -4
- package/dist/workspace/agent-computer.d.ts +2 -0
- package/dist/workspace/agent-computer.js +2 -0
- package/dist/workspace/archil-claim.d.ts +7 -0
- package/dist/workspace/archil-claim.js +29 -0
- package/dist/workspace/archil.d.ts +9 -1
- package/dist/workspace/archil.js +165 -3
- package/dist/workspace/attach.d.ts +3 -1
- package/dist/workspace/attach.js +2 -0
- package/dist/workspace/attached-computers.d.ts +16 -5
- package/dist/workspace/attached-computers.js +25 -9
- package/dist/workspace/computer-deps.js +1 -1
- package/dist/workspace/computer-for-claim.d.ts +22 -8
- package/dist/workspace/computer-for-claim.js +339 -46
- package/dist/workspace/computer-hold.js +2 -1
- package/dist/workspace/computer-kept.d.ts +11 -1
- package/dist/workspace/computer-kept.js +24 -3
- package/dist/workspace/resolve-computer.d.ts +41 -21
- package/dist/workspace/resolve-computer.js +172 -64
- package/dist/workspace/revision-skills.d.ts +1 -2
- package/dist/workspace/revision-skills.js +3 -4
- package/dist/workspace/run-workspace.d.ts +1 -1
- package/dist/workspace/run-workspace.js +5 -0
- package/dist/workspace/synced-folder.d.ts +85 -0
- package/dist/workspace/synced-folder.js +230 -0
- package/dist/workspace/workspace.d.ts +4 -0
- package/launcher/agentrun-serve +1 -1
- package/package.json +10 -9
- package/templates/README.md +7 -7
- package/templates/inbound-lead/agent.md +3 -3
- package/templates/inbound-lead/evals/learned-correction/case.yaml +3 -3
- package/templates/inbound-lead/evals/learned-correction/fixtures/corrections.md +1 -0
- package/templates/inbound-lead/evals/learned-correction/graders/applies-correction.md +22 -0
- package/templates/inbound-lead/evals/learned-correction/graders/learned-origin.md +1 -1
- package/templates/inbound-lead/evals/learned-correction/prompt.md +1 -1
- package/templates/inbound-lead/lead.schema.json +6 -5
- package/templates/inbound-lead/rules/RUBRIC.md +4 -4
- package/templates/inbound-lead/skills/lead/SKILL.md +4 -4
- package/templates/market-monitor/evals/learned-preference/case.yaml +4 -4
- package/templates/market-monitor/evals/learned-preference/fixtures/corrections.md +1 -0
- package/templates/market-monitor/evals/learned-preference/graders/omits-junior-post.md +3 -3
- package/templates/market-monitor/evals/learned-preference/prompt.md +1 -1
- package/templates/release-notes/evals/learned-style/case.yaml +4 -4
- package/templates/release-notes/evals/learned-style/fixtures/corrections.md +1 -0
- package/templates/release-notes/evals/learned-style/graders/same-changes.md +2 -2
- package/templates/release-notes/evals/learned-style/prompt.md +1 -1
- package/dist/console/assets/index-BrcDSBD8.css +0 -1
- package/dist/console/assets/index-Bz6IWncl.js +0 -711
- package/dist/learn/grade.d.ts +0 -138
- package/dist/learn/grade.js +0 -682
- package/dist/learn/notes.d.ts +0 -81
- package/dist/learn/notes.js +0 -178
- package/dist/learn/reflect.d.ts +0 -77
- package/dist/learn/reflect.js +0 -228
- package/dist/learn/relevance.d.ts +0 -24
- package/dist/learn/relevance.js +0 -91
- package/dist/learn/seed-check.d.ts +0 -74
- package/dist/learn/seed-check.js +0 -103
- package/dist/learning-batch.d.ts +0 -291
- package/dist/learning-batch.js +0 -600
- package/dist/learning-evals.d.ts +0 -33
- package/dist/learning-evals.js +0 -98
- package/dist/native/context.d.ts +0 -6
- package/dist/native/context.js +0 -22
- package/dist/propose.d.ts +0 -52
- package/dist/propose.js +0 -224
- package/dist/runner/learning-ask.d.ts +0 -47
- package/dist/runner/learning-ask.js +0 -128
- package/dist/runner/learning-dispatch.d.ts +0 -45
- package/dist/runner/learning-dispatch.js +0 -99
- package/dist/runner/learning-factory.d.ts +0 -16
- package/dist/runner/learning-factory.js +0 -50
- package/dist/runner/learning-loop.d.ts +0 -273
- package/dist/runner/learning-loop.js +0 -521
- package/dist/usage.d.ts +0 -11
- package/dist/usage.js +0 -11
- package/templates/inbound-lead/evals/learned-correction/fixtures/learning/MEMORY.md +0 -1
- package/templates/inbound-lead/evals/learned-correction/fixtures/learning/no-agencies.md +0 -14
- package/templates/inbound-lead/evals/learned-correction/graders/applies-note.md +0 -21
- package/templates/market-monitor/evals/learned-preference/fixtures/learning/MEMORY.md +0 -1
- package/templates/market-monitor/evals/learned-preference/fixtures/learning/skip-junior-job-posts.md +0 -8
- package/templates/release-notes/evals/learned-style/fixtures/learning/MEMORY.md +0 -1
- package/templates/release-notes/evals/learned-style/fixtures/learning/say-agent-not-bot.md +0 -13
package/dist/learn/grade.d.ts
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { type LearnedNote } from "./notes.js";
|
|
2
|
-
/** What the grader asks of each new note, and when it keeps one. The one statement of it. */
|
|
3
|
-
export declare const GRADE_RUBRIC: string;
|
|
4
|
-
/** A note's file and its whole text. */
|
|
5
|
-
export type NoteText = {
|
|
6
|
-
readonly file: string;
|
|
7
|
-
readonly text: string;
|
|
8
|
-
};
|
|
9
|
-
/** An active note as the index lists it (a LearnedNote will do). */
|
|
10
|
-
export type IndexEntry = Pick<LearnedNote, "file" | "name" | "description">;
|
|
11
|
-
export type GradeInput = {
|
|
12
|
-
/** The run id: it names the run in the prompt and seeds the fence token. */
|
|
13
|
-
readonly run: string;
|
|
14
|
-
/** The agent's standing instructions, as the host keeps them: the prompt holds their first GRADE_CAPS.instructions
|
|
15
|
-
* characters. */
|
|
16
|
-
readonly instructions?: string;
|
|
17
|
-
/** Native source policy must be supplied whole. A fixed larger bound accommodates layered project configuration;
|
|
18
|
-
* it does not change the managed instruction cap or the overall grader prompt bound. */
|
|
19
|
-
readonly nativeInstructions?: true;
|
|
20
|
-
/** Every active note on main, as the index lists it: the prompt holds each one's index line, cut to
|
|
21
|
-
* GRADE_CAPS.indexLine. */
|
|
22
|
-
readonly active: readonly IndexEntry[];
|
|
23
|
-
/** The whole text of each active note the new notes supersede, and of no other. */
|
|
24
|
-
readonly superseded: readonly NoteText[];
|
|
25
|
-
/** The new notes the run proposes, each checked. */
|
|
26
|
-
readonly proposed: readonly NoteText[];
|
|
27
|
-
/** The skill and workflow draft the run proposes beside them, each checked, by path in the folder: a skill's
|
|
28
|
-
* `skills/<name>/SKILL.md`, a draft's `workflows/<name>/workflow.json` with its `README.md`. */
|
|
29
|
-
readonly files?: readonly NoteText[];
|
|
30
|
-
/** Each draft's dry run, by its workflow.json's path (skills.ts draftDryRun): passed, or not run and why. The prompt
|
|
31
|
-
* says it under the draft, each detail cut to DRY_RUN_DETAIL with unseen characters taken out. */
|
|
32
|
-
readonly dryRuns?: Readonly<Record<string, {
|
|
33
|
-
readonly status: string;
|
|
34
|
-
readonly detail?: string;
|
|
35
|
-
}>>;
|
|
36
|
-
/** The skill of each draft's name as the folder holds it (`skills/<name>/SKILL.md`), shown under its draft for Format,
|
|
37
|
-
* never graded; one whose draft is not among `files` is not shown. */
|
|
38
|
-
readonly drafted?: readonly NoteText[];
|
|
39
|
-
/** What the user said in the run, in order: the messages the run was sent, never the host's end-of-run turn. The
|
|
40
|
-
* prompt holds every one, each cut to GRADE_CAPS.askedMessage, with unseen characters taken out, while together
|
|
41
|
-
* they fit GRADE_CAPS.askedTotal (askedOf). The host cuts them of its secrets first. */
|
|
42
|
-
readonly asked?: readonly string[];
|
|
43
|
-
/** What triggers sent the run that their owner did not write (a webhook body, a Slack or GitHub event), in order, each
|
|
44
|
-
* with its source: never what the user said. Shown apart, each as the user's are (cut, shortened, in the same
|
|
45
|
-
* budget, after them). */
|
|
46
|
-
readonly triggered?: readonly {
|
|
47
|
-
readonly source: string;
|
|
48
|
-
readonly text: string;
|
|
49
|
-
}[];
|
|
50
|
-
/** Why each draft (by its workflow.json's path) waits for its owner's OK whatever the grade (skills.ts unpricedLine:
|
|
51
|
-
* a step calling an MCP tool with no declared price). Said under the draft; parseVerdict holds it. */
|
|
52
|
-
readonly held?: Readonly<Record<string, readonly string[]>>;
|
|
53
|
-
};
|
|
54
|
-
/** What bounds the grader's prompt, in UTF-16 units, as a completion counts them. `prompt` is the most it ever is:
|
|
55
|
-
* the fixed text, the instructions cut to `instructions`, INDEX_LINES + CAPS.supersedes index lines cut to
|
|
56
|
-
* `indexLine`, the user's messages (each cut to `askedMessage`, `askedTotal` in all), and CAPS.supersedes superseded and
|
|
57
|
-
* CAPS.newNotes new notes of at most CAPS.note bytes each (and the host's compiled_into line), fenced, come to less. `askedTotal` is forty messages at the
|
|
58
|
-
* cap: a run's messages are its input and each follow-up, a handful in a real run, so all of them are shown. */
|
|
59
|
-
export declare const GRADE_CAPS: Readonly<{
|
|
60
|
-
prompt: 200000;
|
|
61
|
-
instructions: 16000;
|
|
62
|
-
indexLine: 300;
|
|
63
|
-
askedMessage: 1000;
|
|
64
|
-
askedTail: 300;
|
|
65
|
-
askedTotal: 40000;
|
|
66
|
-
}>;
|
|
67
|
-
export declare const NATIVE_GRADE_INSTRUCTION_BYTES = 65536;
|
|
68
|
-
/** The grader's judgment of one new note: `keep` (true for a pending one too), `pending` when it waits for the user's
|
|
69
|
-
* OK (a risky note, whoever's idea it was), and
|
|
70
|
-
* `origin`, `you` for what the user asked in their own words, else `run`. `question` is the rubric's question it
|
|
71
|
-
* failed, or `Risky` for one the grader holds. `note`: a skill the grader re-filed as a note (its decision `note`: a
|
|
72
|
-
* standing rule for every reply), the note it is kept as instead (skillAsNote), merged in its place. */
|
|
73
|
-
export type VerdictItem = {
|
|
74
|
-
readonly file: string;
|
|
75
|
-
readonly keep: boolean;
|
|
76
|
-
readonly pending?: true;
|
|
77
|
-
readonly origin?: "you" | "run";
|
|
78
|
-
readonly question?: string;
|
|
79
|
-
readonly why: string;
|
|
80
|
-
readonly note?: NoteText;
|
|
81
|
-
};
|
|
82
|
-
/** The whole proposal's verdict, item by item: `merge` when any item is kept (the kept ones merge, the dropped ones are
|
|
83
|
-
* left out), unless an item is dropped as Planted (nothing from that run is kept) or the grader kept every item and
|
|
84
|
-
* still said no merge. */
|
|
85
|
-
export type Verdict = {
|
|
86
|
-
readonly merge: boolean;
|
|
87
|
-
readonly reason: string;
|
|
88
|
-
readonly items: readonly VerdictItem[];
|
|
89
|
-
};
|
|
90
|
-
/** The verdict when the grader's answer cannot be read: never a merge. */
|
|
91
|
-
/** Why a verdict is no merge when the grader's answer could not be read at all: the host asks once more on it. */
|
|
92
|
-
export declare const UNREADABLE_REASON = "the grader's verdict could not be read";
|
|
93
|
-
/** Why a verdict is no merge when the grader kept every item and still said no merge: its answer contradicts itself, so
|
|
94
|
-
* the host asks once more on it, the contradiction named (CONTRADICTION_ASK), as it does on an answer it cannot read. */
|
|
95
|
-
export declare const CONTRADICTED_REASON = "the grader's verdict contradicted itself: it kept every item and said not to merge";
|
|
96
|
-
/** Why a verdict is no merge when the grade, asked again because it contradicted itself, contradicted itself again: the
|
|
97
|
-
* learning run sets it (runner/learning-loop.ts), never parseVerdict, which reads one answer. */
|
|
98
|
-
export declare const CONTRADICTED_TWICE_REASON = "the grader's verdict contradicted itself twice: it kept every item and said not to merge, asked again";
|
|
99
|
-
/** What the grade is told when it is asked again after an answer that kept every item and said no merge. */
|
|
100
|
-
export declare const CONTRADICTION_ASK = "Your last answer said \"merge\": false while it kept every item (each one keep or pending). Both cannot hold: merge is true when any item is kept or pending. Answer again in the same format: keep or hold each item that may be kept, and drop each one that may not, with its question.";
|
|
101
|
-
/** The files the grader gives one item for, in order: the new notes', then each skill and draft's (gradedFiles). */
|
|
102
|
-
export declare const gradedFiles: (proposed: readonly NoteText[], files?: readonly NoteText[]) => string[];
|
|
103
|
-
/** The items the grader judges, with their texts, in gradedFiles' order: what parseVerdict reads, a note's text for the
|
|
104
|
-
* mark its run's turn may have set (runMarkedRisky). */
|
|
105
|
-
export declare const gradedItems: (proposed: readonly NoteText[], files?: readonly NoteText[]) => NoteText[];
|
|
106
|
-
/** A user's message as the grader reads it, within GRADE_CAPS.askedMessage: whole when it fits; else its head, a line
|
|
107
|
-
* saying how many characters were left out in the middle, and its last GRADE_CAPS.askedTail characters, so a rule
|
|
108
|
-
* taken back at a long message's end is still read. The host cuts it of its secrets first, whole, so no part of one
|
|
109
|
-
* sits at either seam. */
|
|
110
|
-
export declare function shortMessage(text: string): string;
|
|
111
|
-
/** The prompt a host sends its grader for what run `run` proposes, once the checker has passed it: the instructions, the
|
|
112
|
-
* index lines of the active notes, the notes the proposal supersedes in full and the new notes, each fenced as data,
|
|
113
|
-
* and never more than GRADE_CAPS.prompt (GRADE_CAPS). Throws on input no checked proposal holds: a run id out of
|
|
114
|
-
* shape, a file name that is no note's or named twice, a new note that is not one or is active already, a superseded
|
|
115
|
-
* note that is not active or that the new notes do not supersede (or one they supersede and that is not given), a
|
|
116
|
-
* count or a note over its cap, or an unseen character. */
|
|
117
|
-
export declare function gradePrompt(input: GradeInput): string;
|
|
118
|
-
/** The why of an item the grader kept while saying it is not general (general false), when it gave no why. */
|
|
119
|
-
export declare const NOT_GENERAL = "It is tied to the one case it came from, so it is not kept.";
|
|
120
|
-
/** The why of an item the grader kept without saying it is general: the gate fails closed. */
|
|
121
|
-
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.";
|
|
122
|
-
/** The words a re-filed skill's item says when it can't be kept as a note (skillAsNote gave none): dropped, and the
|
|
123
|
-
* next run is told where such a rule goes. */
|
|
124
|
-
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.";
|
|
125
|
-
/** The words a re-filed skill's item says when the run keeps CAPS.newNotes new notes already: dropped, as a ninth note
|
|
126
|
-
* would take the run past its cap, and the next run is told where such a rule goes. */
|
|
127
|
-
export declare const NOTES_FULL: string;
|
|
128
|
-
/** A skill's SKILL.md (`file`, `text`) re-filed as the note it should have been (a standing rule for every reply is a
|
|
129
|
-
* note, which every run reads, not a skill, which a run loads on demand): `<name>.md`, named after the skill, its
|
|
130
|
-
* description the skill's, of type feedback, its body the skill's body. Undefined when it would be no note (its name
|
|
131
|
-
* not a note's file name, no description, out of a note's shape (checkNote), or over a run's note cap, CAPS.runNote:
|
|
132
|
-
* the host adds its origin and pending lines at the merge, as it does to a run's own note). */
|
|
133
|
-
export declare function skillAsNote(file: string, text: string): NoteText | undefined;
|
|
134
|
-
/** The grader's verdict from its answer, failing closed: anything it cannot read, an item missing, named twice or for a
|
|
135
|
-
* file it was not asked to judge, or a merge with an item not kept, is no merge. `proposed` are the new notes the
|
|
136
|
-
* 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
|
|
137
|
-
* workflow.json). Throws only when `proposed` is not a list a checked proposal could hold, never on the answer. */
|
|
138
|
-
export declare function parseVerdict(text: unknown, proposed: readonly NoteText[] | readonly string[], held?: Readonly<Record<string, readonly string[]>>): Verdict;
|