@stringsync/splates 0.0.61 → 1.13.3
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/README.md +2 -2
- package/artifact.d.ts +2 -2
- package/blockers.d.ts +1 -1
- package/config.d.ts +12 -0
- package/config.js +0 -0
- package/creds.d.ts +2 -2
- package/evals.d.ts +2 -2
- package/flags.d.ts +4 -4
- package/handoff.d.ts +3 -4
- package/hook.d.ts +2 -2
- package/index.js +108 -108
- package/lane.d.ts +2 -2
- package/mirror.d.ts +14 -0
- package/mirror.js +22 -0
- package/package.json +12 -4
- package/projects.d.ts +2 -2
- package/queue.d.ts +2 -2
- package/replica.d.ts +2 -2
- package/server.d.ts +2 -2
- package/setup.d.ts +2 -2
- package/ship.d.ts +2 -2
- package/slots.d.ts +2 -2
- package/splates.d.ts +2 -2
- package/task.d.ts +2 -2
- package/tunnel.d.ts +2 -2
- package/vendor/@stringsync/splates-server/LICENSE +21 -0
- package/vendor/@stringsync/splates-server/age.d.ts +2 -0
- package/vendor/@stringsync/splates-server/agents/acp-extensions.d.ts +92 -0
- package/vendor/@stringsync/splates-server/agents/agents.d.ts +19 -0
- package/vendor/@stringsync/splates-server/agents/compaction.d.ts +17 -0
- package/vendor/@stringsync/splates-server/agents/connection.d.ts +191 -0
- package/vendor/@stringsync/splates-server/agents/errors.d.ts +8 -0
- package/vendor/@stringsync/splates-server/agents/fold.d.ts +45 -0
- package/vendor/@stringsync/splates-server/agents/index.d.ts +16 -0
- package/vendor/@stringsync/splates-server/agents/index.js +60 -0
- package/vendor/@stringsync/splates-server/agents/process.d.ts +67 -0
- package/vendor/@stringsync/splates-server/agents/scratch.d.ts +7 -0
- package/vendor/@stringsync/splates-server/agents/shared-browser.d.ts +47 -0
- package/vendor/@stringsync/splates-server/agents/start-lock.d.ts +24 -0
- package/vendor/@stringsync/splates-server/agents/stream.d.ts +91 -0
- package/vendor/@stringsync/splates-server/agents/tool-calls.d.ts +18 -0
- package/vendor/@stringsync/splates-server/agents/watch.d.ts +46 -0
- package/vendor/@stringsync/splates-server/agents/watched.d.ts +43 -0
- package/vendor/@stringsync/splates-server/artifacts/artifact.d.ts +33 -0
- package/vendor/@stringsync/splates-server/artifacts/artifacts.d.ts +162 -0
- package/vendor/@stringsync/splates-server/artifacts/attach.d.ts +31 -0
- package/vendor/@stringsync/splates-server/artifacts/attachments.d.ts +50 -0
- package/vendor/@stringsync/splates-server/artifacts/index.d.ts +8 -0
- package/vendor/@stringsync/splates-server/artifacts/index.js +38 -0
- package/vendor/@stringsync/splates-server/artifacts/room.d.ts +46 -0
- package/vendor/@stringsync/splates-server/artifacts/routes.d.ts +22 -0
- package/vendor/@stringsync/splates-server/artifacts/viewers.d.ts +6 -0
- package/vendor/@stringsync/splates-server/auto-pick/classes.d.ts +29 -0
- package/vendor/@stringsync/splates-server/auto-pick/classify.d.ts +60 -0
- package/vendor/@stringsync/splates-server/auto-pick/clef.d.ts +15 -0
- package/vendor/@stringsync/splates-server/auto-pick/decide.d.ts +78 -0
- package/vendor/@stringsync/splates-server/auto-pick/defaults.d.ts +3 -0
- package/vendor/@stringsync/splates-server/auto-pick/follow-up.d.ts +25 -0
- package/vendor/@stringsync/splates-server/auto-pick/index.d.ts +24 -0
- package/vendor/@stringsync/splates-server/auto-pick/jev.d.ts +38 -0
- package/vendor/@stringsync/splates-server/auto-pick/judge.d.ts +21 -0
- package/vendor/@stringsync/splates-server/auto-pick/judged.d.ts +33 -0
- package/vendor/@stringsync/splates-server/auto-pick/key.d.ts +6 -0
- package/vendor/@stringsync/splates-server/auto-pick/lift.d.ts +18 -0
- package/vendor/@stringsync/splates-server/auto-pick/queue.d.ts +30 -0
- package/vendor/@stringsync/splates-server/auto-pick/rank.d.ts +10 -0
- package/vendor/@stringsync/splates-server/auto-pick/record.d.ts +19 -0
- package/vendor/@stringsync/splates-server/auto-pick/routes.d.ts +25 -0
- package/vendor/@stringsync/splates-server/auto-pick/rule-names.d.ts +9 -0
- package/vendor/@stringsync/splates-server/auto-pick/rules-routes.d.ts +49 -0
- package/vendor/@stringsync/splates-server/auto-pick/rules.d.ts +97 -0
- package/vendor/@stringsync/splates-server/auto-pick/start.d.ts +79 -0
- package/vendor/@stringsync/splates-server/auto-pick/store.d.ts +25 -0
- package/vendor/@stringsync/splates-server/auto-pick/system-one.d.ts +60 -0
- package/vendor/@stringsync/splates-server/auto-pick/trial.d.ts +32 -0
- package/vendor/@stringsync/splates-server/board/backlog.d.ts +4 -0
- package/vendor/@stringsync/splates-server/board/blocked-warning.d.ts +7 -0
- package/vendor/@stringsync/splates-server/board/browser.d.ts +8 -0
- package/vendor/@stringsync/splates-server/board/change-lane.d.ts +12 -0
- package/vendor/@stringsync/splates-server/board/deferral.d.ts +87 -0
- package/vendor/@stringsync/splates-server/board/elsewhere-links.d.ts +26 -0
- package/vendor/@stringsync/splates-server/board/elsewhere.d.ts +119 -0
- package/vendor/@stringsync/splates-server/board/index.d.ts +21 -0
- package/vendor/@stringsync/splates-server/board/index.js +112 -0
- package/vendor/@stringsync/splates-server/board/lane.d.ts +69 -0
- package/vendor/@stringsync/splates-server/board/lanes-from-tags.d.ts +17 -0
- package/vendor/@stringsync/splates-server/board/lanes.d.ts +117 -0
- package/vendor/@stringsync/splates-server/board/routes.d.ts +54 -0
- package/vendor/@stringsync/splates-server/board/store.d.ts +74 -0
- package/vendor/@stringsync/splates-server/board/task-edit.d.ts +81 -0
- package/vendor/@stringsync/splates-server/board/task-file.d.ts +24 -0
- package/vendor/@stringsync/splates-server/board/task-journal.d.ts +9 -0
- package/vendor/@stringsync/splates-server/board/task-lanes.d.ts +95 -0
- package/vendor/@stringsync/splates-server/board/task-list.d.ts +40 -0
- package/vendor/@stringsync/splates-server/board/task.d.ts +301 -0
- package/vendor/@stringsync/splates-server/board/tasks.d.ts +172 -0
- package/vendor/@stringsync/splates-server/chunk-files-jkqj87yx.js +14 -0
- package/vendor/@stringsync/splates-server/chunk-maps-mnjqydx4.txt +1 -0
- package/vendor/@stringsync/splates-server/chunks-3jkzx1q9.txt +1 -0
- package/vendor/@stringsync/splates-server/comma-list.d.ts +2 -0
- package/vendor/@stringsync/splates-server/comma-list.js +6 -0
- package/vendor/@stringsync/splates-server/config/browser.d.ts +1 -0
- package/vendor/@stringsync/splates-server/config/config.d.ts +210 -0
- package/vendor/@stringsync/splates-server/config/index.d.ts +6 -0
- package/vendor/@stringsync/splates-server/config/index.js +42 -0
- package/vendor/@stringsync/splates-server/config/legacy-names.d.ts +70 -0
- package/vendor/@stringsync/splates-server/config/legacy-ps.d.ts +32 -0
- package/vendor/@stringsync/splates-server/config/load.d.ts +46 -0
- package/vendor/@stringsync/splates-server/config/source.d.ts +7 -0
- package/vendor/@stringsync/splates-server/config/type-config.d.ts +14 -0
- package/vendor/@stringsync/splates-server/conversations/answered.d.ts +7 -0
- package/vendor/@stringsync/splates-server/conversations/archive.d.ts +16 -0
- package/vendor/@stringsync/splates-server/conversations/background.d.ts +21 -0
- package/vendor/@stringsync/splates-server/conversations/browser.d.ts +12 -0
- package/vendor/@stringsync/splates-server/conversations/choice.d.ts +8 -0
- package/vendor/@stringsync/splates-server/conversations/compact.d.ts +6 -0
- package/vendor/@stringsync/splates-server/conversations/conversation.d.ts +420 -0
- package/vendor/@stringsync/splates-server/conversations/conversations.d.ts +181 -0
- package/vendor/@stringsync/splates-server/conversations/entry.d.ts +286 -0
- package/vendor/@stringsync/splates-server/conversations/events.d.ts +36 -0
- package/vendor/@stringsync/splates-server/conversations/files.d.ts +62 -0
- package/vendor/@stringsync/splates-server/conversations/given.d.ts +18 -0
- package/vendor/@stringsync/splates-server/conversations/heard.d.ts +8 -0
- package/vendor/@stringsync/splates-server/conversations/host.d.ts +176 -0
- package/vendor/@stringsync/splates-server/conversations/index.d.ts +22 -0
- package/vendor/@stringsync/splates-server/conversations/index.js +80 -0
- package/vendor/@stringsync/splates-server/conversations/listing.d.ts +15 -0
- package/vendor/@stringsync/splates-server/conversations/log.d.ts +117 -0
- package/vendor/@stringsync/splates-server/conversations/messages.d.ts +23 -0
- package/vendor/@stringsync/splates-server/conversations/name.d.ts +38 -0
- package/vendor/@stringsync/splates-server/conversations/options.d.ts +87 -0
- package/vendor/@stringsync/splates-server/conversations/outside.d.ts +14 -0
- package/vendor/@stringsync/splates-server/conversations/reference.d.ts +2 -0
- package/vendor/@stringsync/splates-server/conversations/routes.d.ts +109 -0
- package/vendor/@stringsync/splates-server/conversations/search.d.ts +15 -0
- package/vendor/@stringsync/splates-server/conversations/spent.d.ts +19 -0
- package/vendor/@stringsync/splates-server/conversations/state.d.ts +606 -0
- package/vendor/@stringsync/splates-server/conversations/stream.d.ts +34 -0
- package/vendor/@stringsync/splates-server/conversations/transcript.d.ts +9 -0
- package/vendor/@stringsync/splates-server/conversations/tree.d.ts +11 -0
- package/vendor/@stringsync/splates-server/conversations/turn-end.d.ts +30 -0
- package/vendor/@stringsync/splates-server/conversations/turns.d.ts +134 -0
- package/vendor/@stringsync/splates-server/conversations/updates.d.ts +21 -0
- package/vendor/@stringsync/splates-server/creds/creds.d.ts +86 -0
- package/vendor/@stringsync/splates-server/creds/index.d.ts +6 -0
- package/vendor/@stringsync/splates-server/creds/index.js +28 -0
- package/vendor/@stringsync/splates-server/creds/key-file.d.ts +21 -0
- package/vendor/@stringsync/splates-server/creds/requests.d.ts +54 -0
- package/vendor/@stringsync/splates-server/creds/routes.d.ts +16 -0
- package/vendor/@stringsync/splates-server/creds/stores.d.ts +37 -0
- package/vendor/@stringsync/splates-server/dictate/connection.d.ts +18 -0
- package/vendor/@stringsync/splates-server/dictate/dictate.d.ts +16 -0
- package/vendor/@stringsync/splates-server/dictate/index.d.ts +4 -0
- package/vendor/@stringsync/splates-server/dictate/personal.d.ts +26 -0
- package/vendor/@stringsync/splates-server/dictate/transcriber.d.ts +16 -0
- package/vendor/@stringsync/splates-server/dictate/vocabulary.d.ts +12 -0
- package/vendor/@stringsync/splates-server/evals/agents-routes.d.ts +27 -0
- package/vendor/@stringsync/splates-server/evals/agents.d.ts +25 -0
- package/vendor/@stringsync/splates-server/evals/contract.d.ts +73 -0
- package/vendor/@stringsync/splates-server/evals/done.d.ts +11 -0
- package/vendor/@stringsync/splates-server/evals/import.d.ts +10 -0
- package/vendor/@stringsync/splates-server/evals/index.d.ts +19 -0
- package/vendor/@stringsync/splates-server/evals/index.js +40 -0
- package/vendor/@stringsync/splates-server/evals/inspect.d.ts +66 -0
- package/vendor/@stringsync/splates-server/evals/launch-routes.d.ts +39 -0
- package/vendor/@stringsync/splates-server/evals/launch.d.ts +123 -0
- package/vendor/@stringsync/splates-server/evals/routes.d.ts +39 -0
- package/vendor/@stringsync/splates-server/evals/store.d.ts +17 -0
- package/vendor/@stringsync/splates-server/evals/target.d.ts +3 -0
- package/vendor/@stringsync/splates-server/evals/types.d.ts +105 -0
- package/vendor/@stringsync/splates-server/exit.d.ts +55 -0
- package/vendor/@stringsync/splates-server/exit.js +12 -0
- package/vendor/@stringsync/splates-server/git-identity.d.ts +17 -0
- package/vendor/@stringsync/splates-server/git-process.d.ts +8 -0
- package/vendor/@stringsync/splates-server/git.d.ts +168 -0
- package/vendor/@stringsync/splates-server/hooks/commands.d.ts +31 -0
- package/vendor/@stringsync/splates-server/hooks/edit.d.ts +24 -0
- package/vendor/@stringsync/splates-server/hooks/events.d.ts +20 -0
- package/vendor/@stringsync/splates-server/hooks/groomer.d.ts +8 -0
- package/vendor/@stringsync/splates-server/hooks/index.d.ts +17 -0
- package/vendor/@stringsync/splates-server/hooks/index.js +61 -0
- package/vendor/@stringsync/splates-server/hooks/now.d.ts +9 -0
- package/vendor/@stringsync/splates-server/hooks/routes.d.ts +39 -0
- package/vendor/@stringsync/splates-server/hooks/runner.d.ts +75 -0
- package/vendor/@stringsync/splates-server/hooks/runs.d.ts +38 -0
- package/vendor/@stringsync/splates-server/hooks/schedule.d.ts +10 -0
- package/vendor/@stringsync/splates-server/hooks/scheduler.d.ts +28 -0
- package/vendor/@stringsync/splates-server/hooks/store.d.ts +110 -0
- package/vendor/@stringsync/splates-server/index-01z7ycdk.js +6 -0
- package/vendor/@stringsync/splates-server/index-0jttnv86.js +1309 -0
- package/vendor/@stringsync/splates-server/index-5axhdy8c.js +692 -0
- package/vendor/@stringsync/splates-server/index-76t8y8h5.js +779 -0
- package/vendor/@stringsync/splates-server/index-7s01973c.js +2356 -0
- package/vendor/@stringsync/splates-server/index-acbcm66f.js +1468 -0
- package/vendor/@stringsync/splates-server/index-caep3sde.js +27140 -0
- package/vendor/@stringsync/splates-server/index-e9z7s5hh.js +641 -0
- package/vendor/@stringsync/splates-server/index-g18nxyn7.js +99 -0
- package/vendor/@stringsync/splates-server/index-kmzdvvt0.js +23 -0
- package/vendor/@stringsync/splates-server/index-raqrwzdq.js +952 -0
- package/vendor/@stringsync/splates-server/index-t9w5a8ed.js +60 -0
- package/vendor/@stringsync/splates-server/limited.d.ts +8 -0
- package/vendor/@stringsync/splates-server/log.d.ts +14 -0
- package/vendor/@stringsync/splates-server/log.js +32 -0
- package/vendor/@stringsync/splates-server/merge/attribution.d.ts +24 -0
- package/vendor/@stringsync/splates-server/merge/batch.d.ts +119 -0
- package/vendor/@stringsync/splates-server/merge/blame.d.ts +21 -0
- package/vendor/@stringsync/splates-server/merge/branches.d.ts +151 -0
- package/vendor/@stringsync/splates-server/merge/charge.d.ts +18 -0
- package/vendor/@stringsync/splates-server/merge/clear-gate.d.ts +7 -0
- package/vendor/@stringsync/splates-server/merge/cores.d.ts +60 -0
- package/vendor/@stringsync/splates-server/merge/estimates.d.ts +28 -0
- package/vendor/@stringsync/splates-server/merge/finish.d.ts +43 -0
- package/vendor/@stringsync/splates-server/merge/follow.d.ts +50 -0
- package/vendor/@stringsync/splates-server/merge/gate.d.ts +108 -0
- package/vendor/@stringsync/splates-server/merge/github-app.d.ts +99 -0
- package/vendor/@stringsync/splates-server/merge/github-refused.d.ts +5 -0
- package/vendor/@stringsync/splates-server/merge/groups.d.ts +8 -0
- package/vendor/@stringsync/splates-server/merge/index.d.ts +19 -0
- package/vendor/@stringsync/splates-server/merge/index.js +46 -0
- package/vendor/@stringsync/splates-server/merge/landed.d.ts +28 -0
- package/vendor/@stringsync/splates-server/merge/landing.d.ts +38 -0
- package/vendor/@stringsync/splates-server/merge/local-landing.d.ts +11 -0
- package/vendor/@stringsync/splates-server/merge/merge-state.d.ts +37 -0
- package/vendor/@stringsync/splates-server/merge/merge.d.ts +45 -0
- package/vendor/@stringsync/splates-server/merge/output.d.ts +19 -0
- package/vendor/@stringsync/splates-server/merge/phases.d.ts +27 -0
- package/vendor/@stringsync/splates-server/merge/pre-lock.d.ts +28 -0
- package/vendor/@stringsync/splates-server/merge/preflight.d.ts +16 -0
- package/vendor/@stringsync/splates-server/merge/queue-failures.d.ts +11 -0
- package/vendor/@stringsync/splates-server/merge/rebase.d.ts +34 -0
- package/vendor/@stringsync/splates-server/merge/recent-failures.d.ts +10 -0
- package/vendor/@stringsync/splates-server/merge/refusal.d.ts +58 -0
- package/vendor/@stringsync/splates-server/merge/split.d.ts +34 -0
- package/vendor/@stringsync/splates-server/merge/steps.d.ts +37 -0
- package/vendor/@stringsync/splates-server/merge/test-report.d.ts +29 -0
- package/vendor/@stringsync/splates-server/merge/timing.d.ts +20 -0
- package/vendor/@stringsync/splates-server/merge/trunk.d.ts +69 -0
- package/vendor/@stringsync/splates-server/models/codex-limits.d.ts +19 -0
- package/vendor/@stringsync/splates-server/models/effort.d.ts +22 -0
- package/vendor/@stringsync/splates-server/models/index.d.ts +13 -0
- package/vendor/@stringsync/splates-server/models/index.js +76 -0
- package/vendor/@stringsync/splates-server/models/kimi-limits.d.ts +37 -0
- package/vendor/@stringsync/splates-server/models/kimi-usage.d.ts +19 -0
- package/vendor/@stringsync/splates-server/models/kimi.d.ts +10 -0
- package/vendor/@stringsync/splates-server/models/limits.d.ts +32 -0
- package/vendor/@stringsync/splates-server/models/models.d.ts +36 -0
- package/vendor/@stringsync/splates-server/models/offered.d.ts +47 -0
- package/vendor/@stringsync/splates-server/models/opencode-usage.d.ts +37 -0
- package/vendor/@stringsync/splates-server/models/roster.d.ts +130 -0
- package/vendor/@stringsync/splates-server/plans/asked.d.ts +99 -0
- package/vendor/@stringsync/splates-server/plans/browser.d.ts +13 -0
- package/vendor/@stringsync/splates-server/plans/decided.d.ts +12 -0
- package/vendor/@stringsync/splates-server/plans/demo.d.ts +29 -0
- package/vendor/@stringsync/splates-server/plans/index.d.ts +16 -0
- package/vendor/@stringsync/splates-server/plans/index.js +137 -0
- package/vendor/@stringsync/splates-server/plans/needs.d.ts +131 -0
- package/vendor/@stringsync/splates-server/plans/permission.d.ts +64 -0
- package/vendor/@stringsync/splates-server/plans/plan.d.ts +223 -0
- package/vendor/@stringsync/splates-server/plans/prompts.d.ts +148 -0
- package/vendor/@stringsync/splates-server/plans/reply.d.ts +45 -0
- package/vendor/@stringsync/splates-server/plans/run-command.d.ts +21 -0
- package/vendor/@stringsync/splates-server/plans/store.d.ts +26 -0
- package/vendor/@stringsync/splates-server/plans/unanswered.d.ts +15 -0
- package/vendor/@stringsync/splates-server/ports/index.d.ts +8 -0
- package/vendor/@stringsync/splates-server/ports/index.js +36 -0
- package/vendor/@stringsync/splates-server/ports/list.d.ts +22 -0
- package/vendor/@stringsync/splates-server/ports/routes.d.ts +64 -0
- package/vendor/@stringsync/splates-server/ports/slot-tunnel.d.ts +24 -0
- package/vendor/@stringsync/splates-server/ports/slot.d.ts +28 -0
- package/vendor/@stringsync/splates-server/ports/slots.d.ts +150 -0
- package/vendor/@stringsync/splates-server/ports/socket.d.ts +26 -0
- package/vendor/@stringsync/splates-server/ports/task-ports.d.ts +39 -0
- package/vendor/@stringsync/splates-server/prices/index.d.ts +2 -0
- package/vendor/@stringsync/splates-server/prices/prices.d.ts +65 -0
- package/vendor/@stringsync/splates-server/projects/everywhere-routes.d.ts +110 -0
- package/vendor/@stringsync/splates-server/projects/everywhere.d.ts +43 -0
- package/vendor/@stringsync/splates-server/projects/general.d.ts +4 -0
- package/vendor/@stringsync/splates-server/projects/index.d.ts +10 -0
- package/vendor/@stringsync/splates-server/projects/index.js +36 -0
- package/vendor/@stringsync/splates-server/projects/init.d.ts +28 -0
- package/vendor/@stringsync/splates-server/projects/picker.d.ts +64 -0
- package/vendor/@stringsync/splates-server/projects/projects.d.ts +155 -0
- package/vendor/@stringsync/splates-server/projects/reaches.d.ts +26 -0
- package/vendor/@stringsync/splates-server/push/index.d.ts +2 -0
- package/vendor/@stringsync/splates-server/push/notices.d.ts +44 -0
- package/vendor/@stringsync/splates-server/push/push.d.ts +91 -0
- package/vendor/@stringsync/splates-server/queue/commands.d.ts +44 -0
- package/vendor/@stringsync/splates-server/queue/index.d.ts +7 -0
- package/vendor/@stringsync/splates-server/queue/index.js +44 -0
- package/vendor/@stringsync/splates-server/queue/moves.d.ts +15 -0
- package/vendor/@stringsync/splates-server/queue/name.d.ts +9 -0
- package/vendor/@stringsync/splates-server/queue/order.d.ts +50 -0
- package/vendor/@stringsync/splates-server/queue/runner.d.ts +129 -0
- package/vendor/@stringsync/splates-server/records/elsewhere.d.ts +27 -0
- package/vendor/@stringsync/splates-server/records/events.d.ts +556 -0
- package/vendor/@stringsync/splates-server/records/format.d.ts +92 -0
- package/vendor/@stringsync/splates-server/records/home.d.ts +72 -0
- package/vendor/@stringsync/splates-server/records/index.d.ts +10 -0
- package/vendor/@stringsync/splates-server/records/index.js +40 -0
- package/vendor/@stringsync/splates-server/records/journal.d.ts +65 -0
- package/vendor/@stringsync/splates-server/records/lease-lock.d.ts +29 -0
- package/vendor/@stringsync/splates-server/records/migration.d.ts +94 -0
- package/vendor/@stringsync/splates-server/records/one-task-store.d.ts +15 -0
- package/vendor/@stringsync/splates-server/records/repository.d.ts +137 -0
- package/vendor/@stringsync/splates-server/records/task-files.d.ts +8 -0
- package/vendor/@stringsync/splates-server/records/task-stages.d.ts +7 -0
- package/vendor/@stringsync/splates-server/records/to-sqlite.d.ts +3 -0
- package/vendor/@stringsync/splates-server/replica/aws-sign.d.ts +30 -0
- package/vendor/@stringsync/splates-server/replica/dir.d.ts +17 -0
- package/vendor/@stringsync/splates-server/replica/index.d.ts +14 -0
- package/vendor/@stringsync/splates-server/replica/index.js +29 -0
- package/vendor/@stringsync/splates-server/replica/layout.d.ts +45 -0
- package/vendor/@stringsync/splates-server/replica/place.d.ts +31 -0
- package/vendor/@stringsync/splates-server/replica/replica.d.ts +37 -0
- package/vendor/@stringsync/splates-server/replica/replicator.d.ts +102 -0
- package/vendor/@stringsync/splates-server/replica/restore.d.ts +40 -0
- package/vendor/@stringsync/splates-server/replica/s3.d.ts +45 -0
- package/vendor/@stringsync/splates-server/replica/shipped.d.ts +2 -0
- package/vendor/@stringsync/splates-server/replica/status.d.ts +18 -0
- package/vendor/@stringsync/splates-server/server/assets.d.ts +35 -0
- package/vendor/@stringsync/splates-server/server/automations.d.ts +26 -0
- package/vendor/@stringsync/splates-server/server/chunk-files.d.ts +4 -0
- package/vendor/@stringsync/splates-server/server/conflict-watch.d.ts +22 -0
- package/vendor/@stringsync/splates-server/server/early-warning.d.ts +7 -0
- package/vendor/@stringsync/splates-server/server/general.d.ts +53 -0
- package/vendor/@stringsync/splates-server/server/groomer.d.ts +53 -0
- package/vendor/@stringsync/splates-server/server/held.d.ts +10 -0
- package/vendor/@stringsync/splates-server/server/http.d.ts +76 -0
- package/vendor/@stringsync/splates-server/server/index.d.ts +16 -0
- package/vendor/@stringsync/splates-server/server/index.js +14342 -0
- package/vendor/@stringsync/splates-server/server/interrupt.d.ts +24 -0
- package/vendor/@stringsync/splates-server/server/loop-watch.d.ts +12 -0
- package/vendor/@stringsync/splates-server/server/migrations.d.ts +46 -0
- package/vendor/@stringsync/splates-server/server/options.d.ts +143 -0
- package/vendor/@stringsync/splates-server/server/pages.d.ts +35 -0
- package/vendor/@stringsync/splates-server/server/ports.d.ts +11 -0
- package/vendor/@stringsync/splates-server/server/premerge.d.ts +61 -0
- package/vendor/@stringsync/splates-server/server/project-watch.d.ts +94 -0
- package/vendor/@stringsync/splates-server/server/project.d.ts +239 -0
- package/vendor/@stringsync/splates-server/server/pulse.d.ts +8 -0
- package/vendor/@stringsync/splates-server/server/release.d.ts +41 -0
- package/vendor/@stringsync/splates-server/server/replicas.d.ts +23 -0
- package/vendor/@stringsync/splates-server/server/restart.d.ts +177 -0
- package/vendor/@stringsync/splates-server/server/runtime-deps.d.ts +19 -0
- package/vendor/@stringsync/splates-server/server/server.d.ts +19 -0
- package/vendor/@stringsync/splates-server/server/servers.d.ts +31 -0
- package/vendor/@stringsync/splates-server/server/serving.d.ts +28 -0
- package/vendor/@stringsync/splates-server/server/shared.d.ts +14 -0
- package/vendor/@stringsync/splates-server/server/skills.d.ts +16 -0
- package/vendor/@stringsync/splates-server/server/sockets.d.ts +13 -0
- package/vendor/@stringsync/splates-server/server/start-settings.d.ts +15 -0
- package/vendor/@stringsync/splates-server/server/start.d.ts +21 -0
- package/vendor/@stringsync/splates-server/server/suite-grant.d.ts +26 -0
- package/vendor/@stringsync/splates-server/server/supervise.d.ts +81 -0
- package/vendor/@stringsync/splates-server/server/ticketed-lock.d.ts +80 -0
- package/vendor/@stringsync/splates-server/server/update-records.d.ts +8 -0
- package/vendor/@stringsync/splates-server/server/update.d.ts +56 -0
- package/vendor/@stringsync/splates-server/server/versions.d.ts +53 -0
- package/vendor/@stringsync/splates-server/setup/area-auto-pick.d.ts +7 -0
- package/vendor/@stringsync/splates-server/setup/area-dictation.d.ts +3 -0
- package/vendor/@stringsync/splates-server/setup/area-droplet.d.ts +3 -0
- package/vendor/@stringsync/splates-server/setup/area-evals.d.ts +3 -0
- package/vendor/@stringsync/splates-server/setup/area-github.d.ts +8 -0
- package/vendor/@stringsync/splates-server/setup/area-native.d.ts +7 -0
- package/vendor/@stringsync/splates-server/setup/area-opencode.d.ts +5 -0
- package/vendor/@stringsync/splates-server/setup/area-remote.d.ts +3 -0
- package/vendor/@stringsync/splates-server/setup/area-replica.d.ts +3 -0
- package/vendor/@stringsync/splates-server/setup/area-workers.d.ts +5 -0
- package/vendor/@stringsync/splates-server/setup/areas.d.ts +7 -0
- package/vendor/@stringsync/splates-server/setup/checks.d.ts +8 -0
- package/vendor/@stringsync/splates-server/setup/fields.d.ts +69 -0
- package/vendor/@stringsync/splates-server/setup/index.d.ts +8 -0
- package/vendor/@stringsync/splates-server/setup/index.js +25 -0
- package/vendor/@stringsync/splates-server/setup/opencode-model-error.d.ts +3 -0
- package/vendor/@stringsync/splates-server/setup/opencode-models.d.ts +44 -0
- package/vendor/@stringsync/splates-server/setup/opencode-recipe.d.ts +33 -0
- package/vendor/@stringsync/splates-server/setup/opencode-routes.d.ts +17 -0
- package/vendor/@stringsync/splates-server/setup/opencode.d.ts +61 -0
- package/vendor/@stringsync/splates-server/setup/project.d.ts +10 -0
- package/vendor/@stringsync/splates-server/setup/routes.d.ts +31 -0
- package/vendor/@stringsync/splates-server/setup/setup.d.ts +235 -0
- package/vendor/@stringsync/splates-server/setup/step-problem.d.ts +3 -0
- package/vendor/@stringsync/splates-server/setup/undo.d.ts +80 -0
- package/vendor/@stringsync/splates-server/ship/approval-watch.d.ts +57 -0
- package/vendor/@stringsync/splates-server/ship/approval.d.ts +17 -0
- package/vendor/@stringsync/splates-server/ship/cascade-routes.d.ts +25 -0
- package/vendor/@stringsync/splates-server/ship/cascade.d.ts +70 -0
- package/vendor/@stringsync/splates-server/ship/commands.d.ts +26 -0
- package/vendor/@stringsync/splates-server/ship/git.d.ts +31 -0
- package/vendor/@stringsync/splates-server/ship/graph.d.ts +60 -0
- package/vendor/@stringsync/splates-server/ship/history.d.ts +51 -0
- package/vendor/@stringsync/splates-server/ship/index.d.ts +28 -0
- package/vendor/@stringsync/splates-server/ship/live.d.ts +40 -0
- package/vendor/@stringsync/splates-server/ship/mechanical.d.ts +30 -0
- package/vendor/@stringsync/splates-server/ship/npm-terminal.d.ts +14 -0
- package/vendor/@stringsync/splates-server/ship/plan.d.ts +90 -0
- package/vendor/@stringsync/splates-server/ship/progress.d.ts +3 -0
- package/vendor/@stringsync/splates-server/ship/published-notice.d.ts +29 -0
- package/vendor/@stringsync/splates-server/ship/record.d.ts +55 -0
- package/vendor/@stringsync/splates-server/ship/registry.d.ts +13 -0
- package/vendor/@stringsync/splates-server/ship/release-events.d.ts +47 -0
- package/vendor/@stringsync/splates-server/ship/release-steps.d.ts +66 -0
- package/vendor/@stringsync/splates-server/ship/routes.d.ts +14 -0
- package/vendor/@stringsync/splates-server/ship/run.d.ts +132 -0
- package/vendor/@stringsync/splates-server/ship/selection.d.ts +36 -0
- package/vendor/@stringsync/splates-server/ship/served.d.ts +4 -0
- package/vendor/@stringsync/splates-server/ship/stages.d.ts +69 -0
- package/vendor/@stringsync/splates-server/ship/steps.d.ts +69 -0
- package/vendor/@stringsync/splates-server/ship/token-request.d.ts +11 -0
- package/vendor/@stringsync/splates-server/ship/token.d.ts +21 -0
- package/vendor/@stringsync/splates-server/spend/adapters.d.ts +5 -0
- package/vendor/@stringsync/splates-server/spend/billing.d.ts +38 -0
- package/vendor/@stringsync/splates-server/spend/index.d.ts +15 -0
- package/vendor/@stringsync/splates-server/spend/plans.d.ts +45 -0
- package/vendor/@stringsync/splates-server/spend/providers.d.ts +45 -0
- package/vendor/@stringsync/splates-server/spend/rates.d.ts +23 -0
- package/vendor/@stringsync/splates-server/spend/report.d.ts +39 -0
- package/vendor/@stringsync/splates-server/spend/routes.d.ts +46 -0
- package/vendor/@stringsync/splates-server/spend/spend.d.ts +15 -0
- package/vendor/@stringsync/splates-server/spend/totals.d.ts +63 -0
- package/vendor/@stringsync/splates-server/spend/turn.d.ts +39 -0
- package/vendor/@stringsync/splates-server/stats/adherence.d.ts +40 -0
- package/vendor/@stringsync/splates-server/stats/baselines.d.ts +55 -0
- package/vendor/@stringsync/splates-server/stats/budget-routes.d.ts +21 -0
- package/vendor/@stringsync/splates-server/stats/fact-tasks.d.ts +19 -0
- package/vendor/@stringsync/splates-server/stats/finding-facts.d.ts +37 -0
- package/vendor/@stringsync/splates-server/stats/findings.d.ts +89 -0
- package/vendor/@stringsync/splates-server/stats/index.d.ts +12 -0
- package/vendor/@stringsync/splates-server/stats/index.js +30 -0
- package/vendor/@stringsync/splates-server/stats/landed.d.ts +14 -0
- package/vendor/@stringsync/splates-server/stats/outcomes.d.ts +207 -0
- package/vendor/@stringsync/splates-server/stats/overrides.d.ts +19 -0
- package/vendor/@stringsync/splates-server/stats/routes.d.ts +23 -0
- package/vendor/@stringsync/splates-server/stats/scry-models.d.ts +22 -0
- package/vendor/@stringsync/splates-server/stats/skill-checks.d.ts +59 -0
- package/vendor/@stringsync/splates-server/stats/stats.d.ts +176 -0
- package/vendor/@stringsync/splates-server/stats/task-log.d.ts +67 -0
- package/vendor/@stringsync/splates-server/storage/atomic.d.ts +13 -0
- package/vendor/@stringsync/splates-server/storage/collection.d.ts +30 -0
- package/vendor/@stringsync/splates-server/storage/document.d.ts +26 -0
- package/vendor/@stringsync/splates-server/storage/fs-collection.d.ts +26 -0
- package/vendor/@stringsync/splates-server/storage/fs-document.d.ts +16 -0
- package/vendor/@stringsync/splates-server/storage/fs-log.d.ts +31 -0
- package/vendor/@stringsync/splates-server/storage/fs.d.ts +48 -0
- package/vendor/@stringsync/splates-server/storage/index.d.ts +11 -0
- package/vendor/@stringsync/splates-server/storage/index.js +18 -0
- package/vendor/@stringsync/splates-server/storage/json.d.ts +10 -0
- package/vendor/@stringsync/splates-server/storage/key.d.ts +7 -0
- package/vendor/@stringsync/splates-server/storage/log.d.ts +60 -0
- package/vendor/@stringsync/splates-server/storage/schema.d.ts +7 -0
- package/vendor/@stringsync/splates-server/storage/sqlite-collection.d.ts +31 -0
- package/vendor/@stringsync/splates-server/storage/sqlite-db.d.ts +62 -0
- package/vendor/@stringsync/splates-server/storage/sqlite-document.d.ts +20 -0
- package/vendor/@stringsync/splates-server/storage/sqlite-import.d.ts +11 -0
- package/vendor/@stringsync/splates-server/storage/sqlite-keys.d.ts +17 -0
- package/vendor/@stringsync/splates-server/storage/sqlite-lock.d.ts +25 -0
- package/vendor/@stringsync/splates-server/storage/sqlite-log.d.ts +31 -0
- package/vendor/@stringsync/splates-server/storage/sqlite.d.ts +53 -0
- package/vendor/@stringsync/splates-server/storage/storage.d.ts +87 -0
- package/vendor/@stringsync/splates-server/table.d.ts +5 -0
- package/vendor/@stringsync/splates-server/tasks/add.d.ts +45 -0
- package/vendor/@stringsync/splates-server/tasks/browser.d.ts +5 -0
- package/vendor/@stringsync/splates-server/tasks/checkpoint.d.ts +39 -0
- package/vendor/@stringsync/splates-server/tasks/claim.d.ts +14 -0
- package/vendor/@stringsync/splates-server/tasks/conflicts.d.ts +19 -0
- package/vendor/@stringsync/splates-server/tasks/diff.d.ts +29 -0
- package/vendor/@stringsync/splates-server/tasks/dispatched.d.ts +15 -0
- package/vendor/@stringsync/splates-server/tasks/editors.d.ts +22 -0
- package/vendor/@stringsync/splates-server/tasks/finished.d.ts +81 -0
- package/vendor/@stringsync/splates-server/tasks/follow.d.ts +48 -0
- package/vendor/@stringsync/splates-server/tasks/index.d.ts +30 -0
- package/vendor/@stringsync/splates-server/tasks/index.js +90 -0
- package/vendor/@stringsync/splates-server/tasks/landings.d.ts +17 -0
- package/vendor/@stringsync/splates-server/tasks/list.d.ts +18 -0
- package/vendor/@stringsync/splates-server/tasks/merge-output.d.ts +13 -0
- package/vendor/@stringsync/splates-server/tasks/open.d.ts +15 -0
- package/vendor/@stringsync/splates-server/tasks/overlaps.d.ts +16 -0
- package/vendor/@stringsync/splates-server/tasks/path.d.ts +13 -0
- package/vendor/@stringsync/splates-server/tasks/recommend.d.ts +30 -0
- package/vendor/@stringsync/splates-server/tasks/remove.d.ts +47 -0
- package/vendor/@stringsync/splates-server/tasks/retry.d.ts +35 -0
- package/vendor/@stringsync/splates-server/tasks/routes.d.ts +23 -0
- package/vendor/@stringsync/splates-server/tasks/show.d.ts +137 -0
- package/vendor/@stringsync/splates-server/tasks/snapshot.d.ts +86 -0
- package/vendor/@stringsync/splates-server/tasks/started-records.d.ts +71 -0
- package/vendor/@stringsync/splates-server/tasks/wait.d.ts +47 -0
- package/vendor/@stringsync/splates-server/tasks/worktree-checkouts.d.ts +10 -0
- package/vendor/@stringsync/splates-server/tasks/worktree-service.d.ts +151 -0
- package/vendor/@stringsync/splates-server/tasks/worktree.d.ts +342 -0
- package/vendor/@stringsync/splates-server/terminal/connection.d.ts +19 -0
- package/vendor/@stringsync/splates-server/terminal/held.d.ts +22 -0
- package/vendor/@stringsync/splates-server/terminal/index.d.ts +7 -0
- package/vendor/@stringsync/splates-server/terminal/pty.d.ts +45 -0
- package/vendor/@stringsync/splates-server/terminal/remote-pty.d.ts +34 -0
- package/vendor/@stringsync/splates-server/terminal/shell.d.ts +70 -0
- package/vendor/@stringsync/splates-server/terminal/spawn.d.ts +22 -0
- package/vendor/@stringsync/splates-server/terminal/terminal.d.ts +52 -0
- package/vendor/@stringsync/splates-server/tunnel/access.d.ts +61 -0
- package/vendor/@stringsync/splates-server/tunnel/cloudflare-api.d.ts +25 -0
- package/vendor/@stringsync/splates-server/tunnel/cloudflare-error.d.ts +5 -0
- package/vendor/@stringsync/splates-server/tunnel/cloudflared.d.ts +43 -0
- package/vendor/@stringsync/splates-server/tunnel/index.d.ts +14 -0
- package/vendor/@stringsync/splates-server/tunnel/index.js +70 -0
- package/vendor/@stringsync/splates-server/tunnel/machine.d.ts +18 -0
- package/vendor/@stringsync/splates-server/tunnel/provider.d.ts +37 -0
- package/vendor/@stringsync/splates-server/tunnel/remove.d.ts +35 -0
- package/vendor/@stringsync/splates-server/tunnel/saved-ports-host.d.ts +26 -0
- package/vendor/@stringsync/splates-server/tunnel/saved.d.ts +63 -0
- package/vendor/@stringsync/splates-server/tunnel/setup.d.ts +123 -0
- package/vendor/@stringsync/splates-server/tunnel/tunnel.d.ts +38 -0
- package/vendor/@stringsync/splates-server/workers/admin.d.ts +37 -0
- package/vendor/@stringsync/splates-server/workers/call-host.d.ts +68 -0
- package/vendor/@stringsync/splates-server/workers/channel.d.ts +90 -0
- package/vendor/@stringsync/splates-server/workers/connection.d.ts +24 -0
- package/vendor/@stringsync/splates-server/workers/coordinator-state.d.ts +44 -0
- package/vendor/@stringsync/splates-server/workers/daemon.d.ts +128 -0
- package/vendor/@stringsync/splates-server/workers/darwin-footprint.d.ts +7 -0
- package/vendor/@stringsync/splates-server/workers/darwin-temperature.d.ts +7 -0
- package/vendor/@stringsync/splates-server/workers/frame-too-large.d.ts +5 -0
- package/vendor/@stringsync/splates-server/workers/git.d.ts +11 -0
- package/vendor/@stringsync/splates-server/workers/gone.d.ts +36 -0
- package/vendor/@stringsync/splates-server/workers/identity.d.ts +30 -0
- package/vendor/@stringsync/splates-server/workers/index.d.ts +40 -0
- package/vendor/@stringsync/splates-server/workers/index.js +90 -0
- package/vendor/@stringsync/splates-server/workers/lifecycle.d.ts +14 -0
- package/vendor/@stringsync/splates-server/workers/list.d.ts +93 -0
- package/vendor/@stringsync/splates-server/workers/load.d.ts +55 -0
- package/vendor/@stringsync/splates-server/workers/local-id.d.ts +11 -0
- package/vendor/@stringsync/splates-server/workers/local-update.d.ts +81 -0
- package/vendor/@stringsync/splates-server/workers/log-file.d.ts +24 -0
- package/vendor/@stringsync/splates-server/workers/machine.d.ts +47 -0
- package/vendor/@stringsync/splates-server/workers/orphan.d.ts +31 -0
- package/vendor/@stringsync/splates-server/workers/os-sensors.d.ts +49 -0
- package/vendor/@stringsync/splates-server/workers/placement.d.ts +39 -0
- package/vendor/@stringsync/splates-server/workers/process-host.d.ts +60 -0
- package/vendor/@stringsync/splates-server/workers/process.d.ts +33 -0
- package/vendor/@stringsync/splates-server/workers/protocol.d.ts +153 -0
- package/vendor/@stringsync/splates-server/workers/pty-host.d.ts +35 -0
- package/vendor/@stringsync/splates-server/workers/queue.d.ts +39 -0
- package/vendor/@stringsync/splates-server/workers/records.d.ts +43 -0
- package/vendor/@stringsync/splates-server/workers/registry.d.ts +101 -0
- package/vendor/@stringsync/splates-server/workers/replay.d.ts +25 -0
- package/vendor/@stringsync/splates-server/workers/routes.d.ts +119 -0
- package/vendor/@stringsync/splates-server/workers/run-options.d.ts +11 -0
- package/vendor/@stringsync/splates-server/workers/run.d.ts +10 -0
- package/vendor/@stringsync/splates-server/workers/scheduler.d.ts +171 -0
- package/vendor/@stringsync/splates-server/workers/server-of.d.ts +23 -0
- package/vendor/@stringsync/splates-server/workers/server-socket.d.ts +25 -0
- package/vendor/@stringsync/splates-server/workers/session.d.ts +240 -0
- package/vendor/@stringsync/splates-server/workers/socket.d.ts +21 -0
- package/vendor/@stringsync/splates-server/workers/unix-listener.d.ts +23 -0
- package/vendor/@stringsync/splates-server/workers/unix-socket.d.ts +30 -0
- package/vendor/@stringsync/splates-server/workers/websocket-socket.d.ts +24 -0
- package/vendor/@stringsync/splates-server/workers/worker.d.ts +98 -0
- package/vendor/core/LICENSE +21 -0
- package/vendor/core/abort/aborts.d.ts +10 -0
- package/vendor/core/abort/index.d.ts +1 -0
- package/vendor/core/abort/index.js +24 -0
- package/vendor/core/assert/assert-error.d.ts +4 -0
- package/vendor/core/assert/assert.d.ts +24 -0
- package/vendor/core/assert/ensure.d.ts +18 -0
- package/vendor/core/assert/index.d.ts +3 -0
- package/vendor/core/assert/index.js +75 -0
- package/vendor/core/cmd/cli.d.ts +70 -0
- package/vendor/core/cmd/command.d.ts +96 -0
- package/vendor/core/cmd/deps.d.ts +12 -0
- package/vendor/core/cmd/help.d.ts +16 -0
- package/vendor/core/cmd/index.d.ts +6 -0
- package/vendor/core/cmd/index.js +477 -0
- package/vendor/core/cmd/middleware.d.ts +15 -0
- package/vendor/core/cmd/timed.d.ts +15 -0
- package/vendor/core/creds/credential-proxy.d.ts +55 -0
- package/vendor/core/creds/credential-source.d.ts +19 -0
- package/vendor/core/creds/credentials.d.ts +28 -0
- package/vendor/core/creds/dotenv-file.d.ts +22 -0
- package/vendor/core/creds/environment.d.ts +18 -0
- package/vendor/core/creds/index.d.ts +8 -0
- package/vendor/core/creds/index.js +337 -0
- package/vendor/core/creds/memory-secret-store.d.ts +33 -0
- package/vendor/core/creds/secret-store.d.ts +14 -0
- package/vendor/core/creds/system-secret-store.d.ts +49 -0
- package/vendor/core/dictate/buffered-sink.d.ts +9 -0
- package/vendor/core/dictate/cue.d.ts +10 -0
- package/vendor/core/dictate/dictation-failure.d.ts +5 -0
- package/vendor/core/dictate/dictation-link.d.ts +18 -0
- package/vendor/core/dictate/dictation-message.d.ts +24 -0
- package/vendor/core/dictate/dictation-relay.d.ts +28 -0
- package/vendor/core/dictate/index.d.ts +10 -0
- package/vendor/core/dictate/index.js +132 -0
- package/vendor/core/dictate/microphone.d.ts +42 -0
- package/vendor/core/dictate/openai-transcriber.d.ts +22 -0
- package/vendor/core/dictate/openai-transcription.d.ts +27 -0
- package/vendor/core/dictate/pcm.d.ts +5 -0
- package/vendor/core/dictate/pcm16-encoder.d.ts +20 -0
- package/vendor/core/dictate/server.d.ts +1 -0
- package/vendor/core/dictate/server.js +153 -0
- package/vendor/core/dictate/transcriber.d.ts +23 -0
- package/vendor/core/disposable/async-disposer.d.ts +15 -0
- package/vendor/core/disposable/async-resource.d.ts +4 -0
- package/vendor/core/disposable/disposables.d.ts +8 -0
- package/vendor/core/disposable/disposer.d.ts +13 -0
- package/vendor/core/disposable/index.d.ts +5 -0
- package/vendor/core/disposable/index.js +96 -0
- package/vendor/core/disposable/resource.d.ts +4 -0
- package/vendor/core/events/dispatcher.d.ts +18 -0
- package/vendor/core/events/eventful.d.ts +7 -0
- package/vendor/core/events/events.d.ts +14 -0
- package/vendor/core/events/index.d.ts +4 -0
- package/vendor/core/events/index.js +75 -0
- package/vendor/core/events/noop-events.d.ts +6 -0
- package/vendor/core/id/counter-id-provider.d.ts +6 -0
- package/vendor/core/id/id-provider.d.ts +7 -0
- package/vendor/core/id/index.d.ts +3 -0
- package/vendor/core/id/index.js +17 -0
- package/vendor/core/id/uuid-provider.d.ts +11 -0
- package/vendor/core/index-qk5dj664.js +4 -0
- package/vendor/core/log/color.d.ts +22 -0
- package/vendor/core/log/composite-logger.d.ts +7 -0
- package/vendor/core/log/console-logger.d.ts +6 -0
- package/vendor/core/log/index.d.ts +8 -0
- package/vendor/core/log/index.js +154 -0
- package/vendor/core/log/level-prefix-logger.d.ts +12 -0
- package/vendor/core/log/logger.d.ts +12 -0
- package/vendor/core/log/mdc-logger.d.ts +14 -0
- package/vendor/core/log/memory-logger.d.ts +8 -0
- package/vendor/core/log/prefix-logger.d.ts +12 -0
- package/vendor/core/md/index.d.ts +2 -0
- package/vendor/core/md/index.js +182 -0
- package/vendor/core/md/markdown.d.ts +56 -0
- package/vendor/core/md/writer.d.ts +22 -0
- package/vendor/core/push/base64url.d.ts +2 -0
- package/vendor/core/push/encrypt.d.ts +12 -0
- package/vendor/core/push/index.d.ts +4 -0
- package/vendor/core/push/index.js +137 -0
- package/vendor/core/push/push-failure.d.ts +7 -0
- package/vendor/core/push/pusher.d.ts +24 -0
- package/vendor/core/push/vapid.d.ts +18 -0
- package/vendor/core/push/web-pusher.d.ts +20 -0
- package/vendor/core/ship/artifact/artifact.d.ts +52 -0
- package/vendor/core/ship/bundle/bun-bundle.d.ts +71 -0
- package/vendor/core/ship/bundle/bundle-artifact.d.ts +21 -0
- package/vendor/core/ship/bundle/bundle.d.ts +13 -0
- package/vendor/core/ship/bundle/published.d.ts +45 -0
- package/vendor/core/ship/bundle/reach.d.ts +43 -0
- package/vendor/core/ship/bundle/vendor-bundle.d.ts +47 -0
- package/vendor/core/ship/cut.d.ts +64 -0
- package/vendor/core/ship/dry-run.d.ts +63 -0
- package/vendor/core/ship/git/cli-git.d.ts +25 -0
- package/vendor/core/ship/git/git-artifact.d.ts +23 -0
- package/vendor/core/ship/git/git.d.ts +19 -0
- package/vendor/core/ship/github/cli-github.d.ts +31 -0
- package/vendor/core/ship/github/cli-workflows.d.ts +25 -0
- package/vendor/core/ship/github/github-artifact.d.ts +18 -0
- package/vendor/core/ship/github/github.d.ts +10 -0
- package/vendor/core/ship/github/login.d.ts +3 -0
- package/vendor/core/ship/github/workflows.d.ts +27 -0
- package/vendor/core/ship/index.d.ts +26 -0
- package/vendor/core/ship/index.js +3203 -0
- package/vendor/core/ship/mirror/agent-files.d.ts +6 -0
- package/vendor/core/ship/mirror/mirror-build.d.ts +63 -0
- package/vendor/core/ship/mirror/mirror-guard.d.ts +10 -0
- package/vendor/core/ship/mirror/mirror-options.d.ts +75 -0
- package/vendor/core/ship/mirror/mirror-step.d.ts +109 -0
- package/vendor/core/ship/mirror/mirror-tooling.d.ts +59 -0
- package/vendor/core/ship/mirror/source-manifest.d.ts +27 -0
- package/vendor/core/ship/order.d.ts +15 -0
- package/vendor/core/ship/publish-workflow.d.ts +32 -0
- package/vendor/core/ship/registry/github-actions.d.ts +76 -0
- package/vendor/core/ship/registry/npm-registry.d.ts +70 -0
- package/vendor/core/ship/registry/registry-artifact.d.ts +31 -0
- package/vendor/core/ship/registry/registry.d.ts +85 -0
- package/vendor/core/ship/release-file.d.ts +22 -0
- package/vendor/core/ship/release-options.d.ts +122 -0
- package/vendor/core/ship/release.d.ts +61 -0
- package/vendor/core/ship/releases.d.ts +119 -0
- package/vendor/core/ship/shipped.d.ts +54 -0
- package/vendor/core/ship/skill-artifact.d.ts +27 -0
- package/vendor/core/ship/step-events.d.ts +91 -0
- package/vendor/core/ship/step-runner.d.ts +16 -0
- package/vendor/core/ship/step.d.ts +49 -0
- package/vendor/core/ship/trust.d.ts +11 -0
- package/vendor/core/ship/version.d.ts +9 -0
- package/vendor/core/ship/workspace/manifest-workspace.d.ts +61 -0
- package/vendor/core/ship/workspace/workspace.d.ts +29 -0
- package/vendor/core/skills/index.d.ts +1 -0
- package/vendor/core/skills/index.js +77 -0
- package/vendor/core/skills/project-skills.d.ts +53 -0
- package/vendor/core/system/fs/fs.d.ts +58 -0
- package/vendor/core/system/fs/node-fs.d.ts +18 -0
- package/vendor/core/system/glob/glob.d.ts +11 -0
- package/vendor/core/system/glob/node-glob.d.ts +12 -0
- package/vendor/core/system/heavy/heavy-jobs.d.ts +84 -0
- package/vendor/core/system/host-mapper/file-host-mapper.d.ts +20 -0
- package/vendor/core/system/host-mapper/host-mapper.d.ts +11 -0
- package/vendor/core/system/host-mapper/noop-host-mapper.d.ts +4 -0
- package/vendor/core/system/index.d.ts +25 -0
- package/vendor/core/system/index.js +1385 -0
- package/vendor/core/system/ip-provider/darwin-ip-provider.d.ts +6 -0
- package/vendor/core/system/ip-provider/ip-provider.d.ts +8 -0
- package/vendor/core/system/ip-provider/linux-ip-provider.d.ts +6 -0
- package/vendor/core/system/ip-provider/platform-ip-provider.d.ts +6 -0
- package/vendor/core/system/ip-provider/sequential-ip-provider.d.ts +6 -0
- package/vendor/core/system/ip-provider/static-ip-provider.d.ts +8 -0
- package/vendor/core/system/ip-provider/win32-ip-provider.d.ts +6 -0
- package/vendor/core/system/lock/file-lock.d.ts +50 -0
- package/vendor/core/system/lock/lock.d.ts +11 -0
- package/vendor/core/system/lock/memory-lock.d.ts +13 -0
- package/vendor/core/system/port-provider/open-port-provider.d.ts +38 -0
- package/vendor/core/system/port-provider/port-provider.d.ts +14 -0
- package/vendor/core/system/process-like/process-like.d.ts +22 -0
- package/vendor/core/system/ps/file-process.d.ts +40 -0
- package/vendor/core/system/ps/listening.d.ts +20 -0
- package/vendor/core/system/ps/node-ps.d.ts +39 -0
- package/vendor/core/system/ps/ps.d.ts +161 -0
- package/vendor/core/system/ps/reap.d.ts +22 -0
- package/vendor/core/system/undumpable.d.ts +32 -0
- package/vendor/core/system/walk.d.ts +10 -0
- package/vendor/core/time/clock/clock.d.ts +5 -0
- package/vendor/core/time/clock/system-clock.d.ts +5 -0
- package/vendor/core/time/debouncer.d.ts +25 -0
- package/vendor/core/time/duration.d.ts +38 -0
- package/vendor/core/time/index.d.ts +13 -0
- package/vendor/core/time/index.js +271 -0
- package/vendor/core/time/sleep.d.ts +2 -0
- package/vendor/core/time/stopwatch.d.ts +34 -0
- package/vendor/core/time/throttler.d.ts +26 -0
- package/vendor/core/time/time-ago.d.ts +14 -0
- package/vendor/core/time/timeouts.d.ts +12 -0
- package/vendor/core/time/timer/system-timer.d.ts +7 -0
- package/vendor/core/time/timer/timer.d.ts +11 -0
- package/vendor/core/time/wall-clock/system-wall-clock.d.ts +4 -0
- package/vendor/core/time/wall-clock/wall-clock.d.ts +14 -0
- package/waiting.d.ts +2 -2
- package/worker.d.ts +2 -2
|
@@ -0,0 +1,952 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fail2
|
|
3
|
+
} from "./index-t9w5a8ed.js";
|
|
4
|
+
import {
|
|
5
|
+
pickableAgents
|
|
6
|
+
} from "./index-acbcm66f.js";
|
|
7
|
+
import {
|
|
8
|
+
body
|
|
9
|
+
} from "./index-caep3sde.js";
|
|
10
|
+
import {
|
|
11
|
+
evalsDoneReference2
|
|
12
|
+
} from "./index-0jttnv86.js";
|
|
13
|
+
|
|
14
|
+
// evals/agents.ts
|
|
15
|
+
import { z } from "zod";
|
|
16
|
+
var NATIVE_AGENTS = ["claude", "codex", "opencode", "kimi"];
|
|
17
|
+
var FORMAT = 1;
|
|
18
|
+
var EVAL_AGENTS = z.object({
|
|
19
|
+
format: z.literal(FORMAT),
|
|
20
|
+
agents: z.array(z.object({
|
|
21
|
+
agent: z.enum(NATIVE_AGENTS),
|
|
22
|
+
model: z.string().min(1).optional(),
|
|
23
|
+
effort: z.string().min(1).optional()
|
|
24
|
+
}))
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
class EvalAgentsStore2 {
|
|
28
|
+
path;
|
|
29
|
+
fs;
|
|
30
|
+
constructor(path, fs) {
|
|
31
|
+
this.path = path;
|
|
32
|
+
this.fs = fs;
|
|
33
|
+
}
|
|
34
|
+
async agents() {
|
|
35
|
+
const raw = await this.fs.read(this.path).catch(() => null);
|
|
36
|
+
if (raw === null) {
|
|
37
|
+
return [];
|
|
38
|
+
}
|
|
39
|
+
let json;
|
|
40
|
+
try {
|
|
41
|
+
json = JSON.parse(raw);
|
|
42
|
+
} catch {
|
|
43
|
+
fail2("usage", `${this.path} is not JSON: fix or delete it`, {
|
|
44
|
+
path: this.path
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
return this.checked(json, `${this.path} is not eval agents`).agents;
|
|
48
|
+
}
|
|
49
|
+
async save(agents) {
|
|
50
|
+
const checked = this.checked({ format: FORMAT, agents }, "not eval agents");
|
|
51
|
+
const seen = new Set;
|
|
52
|
+
for (const pick of checked.agents) {
|
|
53
|
+
const key = JSON.stringify([pick.agent, pick.model, pick.effort]);
|
|
54
|
+
if (seen.has(key)) {
|
|
55
|
+
fail2("usage", "not eval agents: an agent names the same model and thinking level once", { path: this.path });
|
|
56
|
+
}
|
|
57
|
+
seen.add(key);
|
|
58
|
+
}
|
|
59
|
+
await this.fs.mkdir(this.path.slice(0, this.path.lastIndexOf("/")), {
|
|
60
|
+
recursive: true
|
|
61
|
+
});
|
|
62
|
+
const tmp = `${this.path}.${crypto.randomUUID()}.tmp`;
|
|
63
|
+
await this.fs.write(tmp, `${JSON.stringify(checked, null, "\t")}
|
|
64
|
+
`);
|
|
65
|
+
await this.fs.rename(tmp, this.path);
|
|
66
|
+
}
|
|
67
|
+
checked(value, what) {
|
|
68
|
+
const parsed = EVAL_AGENTS.safeParse(value);
|
|
69
|
+
if (!parsed.success) {
|
|
70
|
+
const issue = parsed.error.issues[0];
|
|
71
|
+
fail2("usage", `${what}: ${issue?.path.join(".") || "the agents"}: ${issue?.message}`, { path: this.path });
|
|
72
|
+
}
|
|
73
|
+
return parsed.data;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
// evals/agents-routes.ts
|
|
77
|
+
class EvalAgentsRoutes2 {
|
|
78
|
+
opts;
|
|
79
|
+
store;
|
|
80
|
+
constructor(opts) {
|
|
81
|
+
this.opts = opts;
|
|
82
|
+
this.store = new EvalAgentsStore2(`${opts.home}/eval-agents.json`, opts.fs);
|
|
83
|
+
}
|
|
84
|
+
read = async () => Response.json(await this.view());
|
|
85
|
+
save = async (request) => {
|
|
86
|
+
const { agents } = await body(request);
|
|
87
|
+
await this.store.save(agents);
|
|
88
|
+
return Response.json(await this.view());
|
|
89
|
+
};
|
|
90
|
+
async view() {
|
|
91
|
+
let agents = [];
|
|
92
|
+
let problem = null;
|
|
93
|
+
try {
|
|
94
|
+
agents = await this.store.agents();
|
|
95
|
+
} catch (error) {
|
|
96
|
+
if (!(error instanceof Error)) {
|
|
97
|
+
throw error;
|
|
98
|
+
}
|
|
99
|
+
problem = error.message;
|
|
100
|
+
}
|
|
101
|
+
const roster = await pickableAgents(this.opts.fs, this.opts.home);
|
|
102
|
+
return {
|
|
103
|
+
agents,
|
|
104
|
+
problem,
|
|
105
|
+
roster: roster.filter((each) => NATIVE_AGENTS.includes(each.id))
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
// evals/contract.ts
|
|
110
|
+
import { readFile } from "node:fs/promises";
|
|
111
|
+
import { join, resolve, sep } from "node:path";
|
|
112
|
+
var CONTRACT_FORMAT2 = "splates-evals/1";
|
|
113
|
+
var RESULTS_FILE2 = "results.jsonl";
|
|
114
|
+
function isContractBatch(saved) {
|
|
115
|
+
return typeof saved === "object" && saved !== null && saved.format === CONTRACT_FORMAT2 && Array.isArray(saved.cells);
|
|
116
|
+
}
|
|
117
|
+
function contractRunId2(batch, cell) {
|
|
118
|
+
return `${batch}#${cell}`;
|
|
119
|
+
}
|
|
120
|
+
async function contractCells(dir, id, batch) {
|
|
121
|
+
const results = await resultsOf(dir);
|
|
122
|
+
const targets = [];
|
|
123
|
+
const grid = batch.cells.map((cell) => {
|
|
124
|
+
const target = contractTarget(cell.target);
|
|
125
|
+
if (!targets.some((each) => each.key === target.key)) {
|
|
126
|
+
targets.push(target);
|
|
127
|
+
}
|
|
128
|
+
const result = results.get(cell.id);
|
|
129
|
+
return {
|
|
130
|
+
scenario: cell.case,
|
|
131
|
+
aspect: cell.group ?? "",
|
|
132
|
+
requirement: cell.about ?? "",
|
|
133
|
+
target: target.key,
|
|
134
|
+
repetition: cell.repetition ?? 0,
|
|
135
|
+
run: result === undefined ? null : runOf(contractRunId2(id, cell.id), result)
|
|
136
|
+
};
|
|
137
|
+
});
|
|
138
|
+
return { targets, grid };
|
|
139
|
+
}
|
|
140
|
+
async function contractDetail(dir, id, batch, cell) {
|
|
141
|
+
const planned = batch.cells.find((each) => each.id === cell);
|
|
142
|
+
const result = (await resultsOf(dir)).get(cell);
|
|
143
|
+
if (planned === undefined || result === undefined) {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
const detail = await detailOf(dir, result.detail);
|
|
147
|
+
return {
|
|
148
|
+
...runOf(contractRunId2(id, cell), result),
|
|
149
|
+
producer: batch.producer ?? null,
|
|
150
|
+
scenario: planned.case,
|
|
151
|
+
aspect: planned.group ?? "",
|
|
152
|
+
requirement: planned.about ?? "",
|
|
153
|
+
target: contractTarget(planned.target),
|
|
154
|
+
repetition: planned.repetition ?? 0,
|
|
155
|
+
input: detail.input ?? "",
|
|
156
|
+
rubric: detail.rubric ?? null,
|
|
157
|
+
checks: detail.checks ?? [],
|
|
158
|
+
judge: detail.judge ?? null,
|
|
159
|
+
reply: detail.reply ?? "",
|
|
160
|
+
transcript: detail.transcript ?? []
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
function contractTarget(target) {
|
|
164
|
+
const agent = target.agent ?? "";
|
|
165
|
+
const variant = target.variant ?? null;
|
|
166
|
+
return {
|
|
167
|
+
key: `${agent}/${target.model}${target.effort === undefined ? "" : `@${target.effort}`}${variant === null ? "" : ` @${variant}`}`,
|
|
168
|
+
agent,
|
|
169
|
+
model: target.model,
|
|
170
|
+
effort: target.effort ?? null,
|
|
171
|
+
skill: variant
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
function runOf(id, result) {
|
|
175
|
+
return {
|
|
176
|
+
id,
|
|
177
|
+
status: result.status,
|
|
178
|
+
tokens: result.tokens ?? null,
|
|
179
|
+
costUsd: result.costUsd ?? null,
|
|
180
|
+
milliseconds: result.milliseconds ?? 0,
|
|
181
|
+
...result.status === "error" && result.reason !== undefined ? { error: result.reason } : {},
|
|
182
|
+
...result.score === undefined ? {} : { score: result.score },
|
|
183
|
+
...result.reason === undefined ? {} : { reason: result.reason },
|
|
184
|
+
...result.url === undefined ? {} : { url: result.url }
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
async function resultsOf(dir) {
|
|
188
|
+
const text = await readFile(join(dir, RESULTS_FILE2), "utf8").catch((error) => {
|
|
189
|
+
if (error.code === "ENOENT") {
|
|
190
|
+
return "";
|
|
191
|
+
}
|
|
192
|
+
throw error;
|
|
193
|
+
});
|
|
194
|
+
const results = new Map;
|
|
195
|
+
for (const line of text.split(`
|
|
196
|
+
`)) {
|
|
197
|
+
const result = parsed(line);
|
|
198
|
+
if (result !== null) {
|
|
199
|
+
results.set(result.cell, result);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
return results;
|
|
203
|
+
}
|
|
204
|
+
function parsed(line) {
|
|
205
|
+
if (line.trim() === "") {
|
|
206
|
+
return null;
|
|
207
|
+
}
|
|
208
|
+
try {
|
|
209
|
+
const result = JSON.parse(line);
|
|
210
|
+
return typeof result.cell === "string" && (result.status === "pass" || result.status === "fail" || result.status === "error") ? result : null;
|
|
211
|
+
} catch {
|
|
212
|
+
return null;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
async function detailOf(dir, name) {
|
|
216
|
+
if (name === undefined) {
|
|
217
|
+
return {};
|
|
218
|
+
}
|
|
219
|
+
const path = resolve(dir, name);
|
|
220
|
+
if (!path.startsWith(resolve(dir) + sep)) {
|
|
221
|
+
return {};
|
|
222
|
+
}
|
|
223
|
+
return readFile(path, "utf8").then((text) => JSON.parse(text), () => ({}));
|
|
224
|
+
}
|
|
225
|
+
// evals/target.ts
|
|
226
|
+
function targetName2(target) {
|
|
227
|
+
return [
|
|
228
|
+
target.agent,
|
|
229
|
+
target.model,
|
|
230
|
+
target.effort,
|
|
231
|
+
target.skill === null ? null : `@${target.skill}`
|
|
232
|
+
].filter((part) => part !== null && part !== "").join(" ");
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// evals/done.ts
|
|
236
|
+
var CUT = 240;
|
|
237
|
+
var TALLY = ["pass", "fail", "error", "unreadable", "pending"];
|
|
238
|
+
function evalsDonePrompt2(grid, details) {
|
|
239
|
+
const tally = TALLY.filter((status) => grid.tally[status]).map((status) => `${grid.tally[status]} ${status}`).join(" · ");
|
|
240
|
+
const cost = [
|
|
241
|
+
grid.tokens === null ? null : `${grid.tokens.toLocaleString()} tokens`,
|
|
242
|
+
grid.costUsd === null ? null : `$${grid.costUsd.toFixed(2)}`
|
|
243
|
+
].filter((part) => part !== null);
|
|
244
|
+
const scenarios = [...new Set(grid.grid.map((cell) => cell.scenario))];
|
|
245
|
+
const table = [
|
|
246
|
+
`| Scenario | ${grid.targets.map(targetName2).join(" | ")} |`,
|
|
247
|
+
`| --- |${" --- |".repeat(grid.targets.length)}`,
|
|
248
|
+
...scenarios.map((scenario) => `| \`${scenario}\` | ${grid.targets.map((target) => outcomes(grid.grid.filter((cell) => cell.scenario === scenario && cell.target === target.key))).join(" | ")} |`)
|
|
249
|
+
];
|
|
250
|
+
const missed = (runs) => runs.map((run) => {
|
|
251
|
+
const held = [
|
|
252
|
+
...run.checks.filter((check) => !check.pass).map((check) => ` - Check \`${check.id}\`: ${check.about}${check.error === undefined ? "" : ` (${cut(check.error)})`}`),
|
|
253
|
+
...run.judge?.pass === false ? [` - Judge: ${cut(run.judge.reason)}`] : [],
|
|
254
|
+
...run.error === undefined ? [] : [` - Error: ${cut(run.error)}`]
|
|
255
|
+
];
|
|
256
|
+
return [
|
|
257
|
+
`- \`${run.scenario}\` on ${targetName2(run.target)}, repetition ${run.repetition + 1}: ${run.status}`,
|
|
258
|
+
...held,
|
|
259
|
+
` - Reply: ${run.reply === "" ? "(none)" : cut(JSON.stringify(run.reply))}`,
|
|
260
|
+
` - Run: \`${run.id}\`, in full with \`splates dev eval show ${run.id}\``
|
|
261
|
+
].join(`
|
|
262
|
+
`);
|
|
263
|
+
});
|
|
264
|
+
const failed = missed(details.filter((run) => run.status !== "error"));
|
|
265
|
+
const errored = missed(details.filter((run) => run.status === "error"));
|
|
266
|
+
const sections = [
|
|
267
|
+
...failed.length === 0 ? [] : [`Not passing:
|
|
268
|
+
|
|
269
|
+
${failed.join(`
|
|
270
|
+
`)}`],
|
|
271
|
+
...errored.length === 0 ? [] : [
|
|
272
|
+
`Errors, the harness's or the setup's, never the skill's:
|
|
273
|
+
|
|
274
|
+
${errored.join(`
|
|
275
|
+
`)}`
|
|
276
|
+
]
|
|
277
|
+
];
|
|
278
|
+
return `${evalsDoneReference2(grid.id)}
|
|
279
|
+
|
|
280
|
+
The run your run evals card asked for is done: ${grid.cells} ${grid.cells === 1 ? "cell" : "cells"}${tally === "" ? "" : ` · ${tally}`}${cost.length === 0 ? "" : ` · ${cost.join(" · ")}`}.
|
|
281
|
+
|
|
282
|
+
${table.join(`
|
|
283
|
+
`)}
|
|
284
|
+
${sections.length === 0 ? `
|
|
285
|
+
Every run passed.` : `
|
|
286
|
+
${sections.join(`
|
|
287
|
+
|
|
288
|
+
`)}`}
|
|
289
|
+
`;
|
|
290
|
+
}
|
|
291
|
+
function outcomes(cells) {
|
|
292
|
+
if (cells.length === 0) {
|
|
293
|
+
return "not run";
|
|
294
|
+
}
|
|
295
|
+
const statuses = cells.map((cell) => cell.run?.status ?? "pending");
|
|
296
|
+
if (statuses.length === 1) {
|
|
297
|
+
return statuses[0] ?? "pending";
|
|
298
|
+
}
|
|
299
|
+
const count = (status) => statuses.filter((each) => each === status).length;
|
|
300
|
+
const graded = statuses.filter((each) => each !== "error" && each !== "pending").length;
|
|
301
|
+
return [
|
|
302
|
+
`${count("pass")}/${graded} pass`,
|
|
303
|
+
...["error", "pending"].filter((status) => count(status) > 0).map((status) => `${count(status)} ${status}`)
|
|
304
|
+
].join(", ");
|
|
305
|
+
}
|
|
306
|
+
function cut(text) {
|
|
307
|
+
return text.length <= CUT ? text : `${text.slice(0, CUT)}…`;
|
|
308
|
+
}
|
|
309
|
+
// evals/import.ts
|
|
310
|
+
import { mkdir, writeFile } from "node:fs/promises";
|
|
311
|
+
import { join as join2 } from "node:path";
|
|
312
|
+
async function writeImported2(dir, imported) {
|
|
313
|
+
await mkdir(dir, { recursive: true });
|
|
314
|
+
for (const [cell, detail] of imported.details) {
|
|
315
|
+
await writeFile(join2(dir, `${cell}.json`), JSON.stringify(detail));
|
|
316
|
+
}
|
|
317
|
+
await writeFile(join2(dir, RESULTS_FILE2), imported.results.map((result) => `${JSON.stringify(result)}
|
|
318
|
+
`).join(""));
|
|
319
|
+
await writeFile(join2(dir, "batch.json"), JSON.stringify(imported.batch));
|
|
320
|
+
}
|
|
321
|
+
// evals/inspect.ts
|
|
322
|
+
function inspectBatch2(log, passAt) {
|
|
323
|
+
const samples = log.samples ?? [];
|
|
324
|
+
const cells = samples.map((sample, index) => ({
|
|
325
|
+
id: `c${index}`,
|
|
326
|
+
case: String(sample.id),
|
|
327
|
+
group: log.eval.task,
|
|
328
|
+
target: { model: log.eval.model },
|
|
329
|
+
repetition: (sample.epoch ?? 1) - 1
|
|
330
|
+
}));
|
|
331
|
+
return {
|
|
332
|
+
batch: {
|
|
333
|
+
format: CONTRACT_FORMAT2,
|
|
334
|
+
startedAt: new Date(log.stats?.started_at ?? log.eval.created ?? Date.now()).toISOString(),
|
|
335
|
+
title: `${log.eval.task} on ${log.eval.model}`,
|
|
336
|
+
cells
|
|
337
|
+
},
|
|
338
|
+
results: samples.map((sample, index) => resultOf(`c${index}`, sample, passAt)),
|
|
339
|
+
details: new Map(samples.map((sample, index) => [`c${index}`, detailOf2(sample, passAt)]))
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
function resultOf(cell, sample, passAt) {
|
|
343
|
+
const usage = Object.values(sample.model_usage ?? {});
|
|
344
|
+
const tokens = sum(usage.map((each) => each.total_tokens));
|
|
345
|
+
const costUsd = sum(usage.map((each) => each.total_cost));
|
|
346
|
+
const measured = {
|
|
347
|
+
...tokens === undefined ? {} : { tokens },
|
|
348
|
+
...costUsd === undefined ? {} : { costUsd },
|
|
349
|
+
...typeof sample.total_time === "number" ? { milliseconds: Math.round(sample.total_time * 1000) } : {},
|
|
350
|
+
detail: `${cell}.json`
|
|
351
|
+
};
|
|
352
|
+
if (sample.error) {
|
|
353
|
+
return {
|
|
354
|
+
cell,
|
|
355
|
+
status: "error",
|
|
356
|
+
reason: sample.error.message ?? "the sample errored",
|
|
357
|
+
...measured
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
const scores = Object.entries(sample.scores ?? {});
|
|
361
|
+
if (scores.length === 0) {
|
|
362
|
+
return {
|
|
363
|
+
cell,
|
|
364
|
+
status: "error",
|
|
365
|
+
reason: "no scorer scored it",
|
|
366
|
+
...measured
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
const values = scores.map(([, score]) => scoreValue(score.value));
|
|
370
|
+
const known = values.filter((value) => value !== null);
|
|
371
|
+
const score = known.length === 0 ? undefined : known.reduce((total, value) => total + value, 0) / known.length;
|
|
372
|
+
return {
|
|
373
|
+
cell,
|
|
374
|
+
status: values.every((value) => value !== null && value >= passAt) ? "pass" : "fail",
|
|
375
|
+
...score === undefined || score < 0 || score > 1 ? {} : { score },
|
|
376
|
+
...reasonOf(scores) === "" ? {} : { reason: reasonOf(scores) },
|
|
377
|
+
...measured
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
function detailOf2(sample, passAt) {
|
|
381
|
+
const target = [sample.target ?? []].flat();
|
|
382
|
+
return {
|
|
383
|
+
input: typeof sample.input === "string" ? sample.input : sample.input.map(textOf).join(`
|
|
384
|
+
|
|
385
|
+
`),
|
|
386
|
+
...target.length === 0 ? {} : { rubric: target.join(`
|
|
387
|
+
`) },
|
|
388
|
+
reply: sample.output?.completion ?? "",
|
|
389
|
+
checks: Object.entries(sample.scores ?? {}).map(([name, score]) => {
|
|
390
|
+
const value = scoreValue(score.value);
|
|
391
|
+
return {
|
|
392
|
+
id: name,
|
|
393
|
+
about: score.explanation ?? score.answer ?? String(score.value),
|
|
394
|
+
pass: value !== null && value >= passAt
|
|
395
|
+
};
|
|
396
|
+
}),
|
|
397
|
+
transcript: transcriptOf(sample.messages ?? [])
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
function scoreValue(value) {
|
|
401
|
+
if (typeof value === "number") {
|
|
402
|
+
return value;
|
|
403
|
+
}
|
|
404
|
+
if (typeof value === "boolean") {
|
|
405
|
+
return value ? 1 : 0;
|
|
406
|
+
}
|
|
407
|
+
if (typeof value === "string") {
|
|
408
|
+
const letter = { C: 1, P: 0.5, I: 0, N: 0 }[value];
|
|
409
|
+
if (letter !== undefined) {
|
|
410
|
+
return letter;
|
|
411
|
+
}
|
|
412
|
+
const lower = value.toLowerCase();
|
|
413
|
+
if (lower === "yes" || lower === "true") {
|
|
414
|
+
return 1;
|
|
415
|
+
}
|
|
416
|
+
if (lower === "no" || lower === "false") {
|
|
417
|
+
return 0;
|
|
418
|
+
}
|
|
419
|
+
const number = Number(value);
|
|
420
|
+
return value.trim() === "" || Number.isNaN(number) ? null : number;
|
|
421
|
+
}
|
|
422
|
+
return null;
|
|
423
|
+
}
|
|
424
|
+
function reasonOf(scores) {
|
|
425
|
+
const reasons = scores.filter(([, score]) => score.explanation);
|
|
426
|
+
if (reasons.length === 1) {
|
|
427
|
+
return reasons[0]?.[1].explanation ?? "";
|
|
428
|
+
}
|
|
429
|
+
return reasons.map(([name, score]) => `${name}: ${score.explanation}`).join(`
|
|
430
|
+
`);
|
|
431
|
+
}
|
|
432
|
+
function transcriptOf(messages) {
|
|
433
|
+
const outputs = new Map(messages.filter((message) => message.role === "tool" && message.tool_call_id).map((message) => [message.tool_call_id, textOf(message)]));
|
|
434
|
+
return messages.flatMap((message) => {
|
|
435
|
+
if (message.role === "tool") {
|
|
436
|
+
return [];
|
|
437
|
+
}
|
|
438
|
+
const text = textOf(message);
|
|
439
|
+
return [
|
|
440
|
+
...text === "" ? [] : [{ kind: "text", text: `${message.role}: ${text}` }],
|
|
441
|
+
...(message.tool_calls ?? []).map((call) => ({
|
|
442
|
+
kind: "tool",
|
|
443
|
+
name: call.function,
|
|
444
|
+
input: JSON.stringify(call.arguments),
|
|
445
|
+
output: outputs.get(call.id) ?? null
|
|
446
|
+
}))
|
|
447
|
+
];
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
function textOf(message) {
|
|
451
|
+
if (typeof message.content === "string") {
|
|
452
|
+
return message.content;
|
|
453
|
+
}
|
|
454
|
+
return message.content.map((part) => part.text ?? "").filter((text) => text !== "").join(`
|
|
455
|
+
`);
|
|
456
|
+
}
|
|
457
|
+
function sum(values) {
|
|
458
|
+
const known = values.filter((value) => typeof value === "number");
|
|
459
|
+
return known.length === 0 ? undefined : known.reduce((total, value) => total + value, 0);
|
|
460
|
+
}
|
|
461
|
+
// evals/launch.ts
|
|
462
|
+
import { readdir } from "node:fs/promises";
|
|
463
|
+
import { Dispatcher } from "../../core/events/index.js";
|
|
464
|
+
function targetOf(pick) {
|
|
465
|
+
return `${pick.agent}${pick.model === undefined ? "" : `:${pick.model}`}${pick.effort === undefined ? "" : `@${pick.effort}`}`;
|
|
466
|
+
}
|
|
467
|
+
var TAIL = 20;
|
|
468
|
+
|
|
469
|
+
class EvalLaunches2 {
|
|
470
|
+
ps;
|
|
471
|
+
dispatcher = new Dispatcher;
|
|
472
|
+
events = this.dispatcher.events;
|
|
473
|
+
launches = new Map;
|
|
474
|
+
watching = new Set;
|
|
475
|
+
record;
|
|
476
|
+
writing = Promise.resolve();
|
|
477
|
+
disposing = false;
|
|
478
|
+
constructor(ps, storage) {
|
|
479
|
+
this.ps = ps;
|
|
480
|
+
this.record = storage.document("eval-launches.json");
|
|
481
|
+
}
|
|
482
|
+
async scenarios(commands, cwd = null) {
|
|
483
|
+
if (commands.list === null) {
|
|
484
|
+
return [];
|
|
485
|
+
}
|
|
486
|
+
const { exitCode, stdout, stderr } = await this.ps.spawnCapture(["sh", "-c", commands.list], { cwd: cwd ?? commands.root });
|
|
487
|
+
if (exitCode !== 0) {
|
|
488
|
+
fail2("hook_failed", tailOf(`${stdout}${stderr}`) || `evals.list exited ${exitCode}`, {});
|
|
489
|
+
}
|
|
490
|
+
return stdout.split(`
|
|
491
|
+
`).flatMap((line) => {
|
|
492
|
+
const each = parsed2(line);
|
|
493
|
+
return each === null || typeof each.case !== "string" || each.case === "" ? [] : [
|
|
494
|
+
{
|
|
495
|
+
id: each.case,
|
|
496
|
+
group: typeof each.group === "string" ? each.group : null,
|
|
497
|
+
about: typeof each.about === "string" ? each.about : null
|
|
498
|
+
}
|
|
499
|
+
];
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
async plan(commands, spec) {
|
|
503
|
+
if (commands.plan === null) {
|
|
504
|
+
return { cells: null, usd: null, refused: false, output: "" };
|
|
505
|
+
}
|
|
506
|
+
const { exitCode, stdout, stderr } = await this.ps.spawnCapture(["sh", "-c", commands.plan], { cwd: spec.cwd ?? commands.root, env: envOf(commands, spec) });
|
|
507
|
+
const said = stdout.split(`
|
|
508
|
+
`).map(parsed2).findLast((each) => each !== null);
|
|
509
|
+
const number = (value) => typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
510
|
+
return {
|
|
511
|
+
cells: number(said?.cells),
|
|
512
|
+
usd: exitCode === 0 ? number(said?.usd) : null,
|
|
513
|
+
refused: exitCode !== 0,
|
|
514
|
+
output: tailOf(`${stdout}${stderr}`)
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
async start(commands, spec) {
|
|
518
|
+
if (commands.run === null) {
|
|
519
|
+
fail2("not_found", "this project names no evals.run in splates.config.ts", {});
|
|
520
|
+
}
|
|
521
|
+
const id = idOf(commands, spec.key);
|
|
522
|
+
const held = this.launches.get(id);
|
|
523
|
+
if (held !== undefined && held.status === "running") {
|
|
524
|
+
return this.read(held);
|
|
525
|
+
}
|
|
526
|
+
const known = new Set(await batchesIn(commands.results));
|
|
527
|
+
const child = this.ps.start(["sh", "-c", commands.run], {
|
|
528
|
+
cwd: spec.cwd ?? commands.root,
|
|
529
|
+
env: envOf(commands, spec)
|
|
530
|
+
});
|
|
531
|
+
const launch = {
|
|
532
|
+
id: crypto.randomUUID(),
|
|
533
|
+
key: spec.key,
|
|
534
|
+
status: "running",
|
|
535
|
+
batch: null,
|
|
536
|
+
output: "",
|
|
537
|
+
recordId: id,
|
|
538
|
+
commands,
|
|
539
|
+
spec,
|
|
540
|
+
child,
|
|
541
|
+
known,
|
|
542
|
+
stopping: false
|
|
543
|
+
};
|
|
544
|
+
this.launches.set(id, launch);
|
|
545
|
+
try {
|
|
546
|
+
await this.save(launch, true);
|
|
547
|
+
} catch (error) {
|
|
548
|
+
this.launches.delete(id);
|
|
549
|
+
launch.child.kill();
|
|
550
|
+
throw error;
|
|
551
|
+
}
|
|
552
|
+
this.running(launch);
|
|
553
|
+
const watching = this.watch(launch);
|
|
554
|
+
this.watching.add(watching);
|
|
555
|
+
watching.then(() => this.watching.delete(watching), () => {});
|
|
556
|
+
return this.read(launch);
|
|
557
|
+
}
|
|
558
|
+
async resume(commands) {
|
|
559
|
+
const current = new Map(commands.map((each) => [each.root, each]));
|
|
560
|
+
for (const [id, saved] of Object.entries(await this.record.read() ?? {})) {
|
|
561
|
+
if (saved.launch.status !== "running" || this.launches.get(id)?.status === "running") {
|
|
562
|
+
continue;
|
|
563
|
+
}
|
|
564
|
+
const commandsNow = current.get(saved.commands.root);
|
|
565
|
+
if (commandsNow?.run != null) {
|
|
566
|
+
await this.start(commandsNow, saved.spec);
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
async get(commands, key) {
|
|
571
|
+
const id = idOf(commands, key);
|
|
572
|
+
const launch = this.launches.get(id);
|
|
573
|
+
return launch === undefined ? (await this.record.read())?.[id]?.launch ?? null : this.read(launch);
|
|
574
|
+
}
|
|
575
|
+
async stop(commands, key) {
|
|
576
|
+
const launch = this.launches.get(idOf(commands, key));
|
|
577
|
+
if (launch === undefined) {
|
|
578
|
+
return null;
|
|
579
|
+
}
|
|
580
|
+
if (launch.status === "running") {
|
|
581
|
+
launch.stopping = true;
|
|
582
|
+
launch.child.kill();
|
|
583
|
+
}
|
|
584
|
+
return this.read(launch);
|
|
585
|
+
}
|
|
586
|
+
async disposeAsync() {
|
|
587
|
+
this.disposing = true;
|
|
588
|
+
for (const launch of this.launches.values()) {
|
|
589
|
+
if (launch.status === "running") {
|
|
590
|
+
launch.child.kill();
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
await Promise.all(this.watching);
|
|
594
|
+
}
|
|
595
|
+
async watch(launch) {
|
|
596
|
+
const words = [launch.child.stdout, launch.child.stderr].map(async (stream) => {
|
|
597
|
+
for await (const text of decoded(stream)) {
|
|
598
|
+
launch.output = tailOf(launch.output + text);
|
|
599
|
+
}
|
|
600
|
+
});
|
|
601
|
+
const code = await launch.child.exited;
|
|
602
|
+
await Promise.all(words);
|
|
603
|
+
await this.read(launch);
|
|
604
|
+
if (this.disposing && !launch.stopping) {
|
|
605
|
+
return;
|
|
606
|
+
}
|
|
607
|
+
launch.status = launch.stopping ? "stopped" : code === 0 ? "done" : launch.batch === null ? "refused" : "done";
|
|
608
|
+
await this.save(launch);
|
|
609
|
+
if (launch.status === "done" && launch.batch !== null && launch.spec.conversation != null) {
|
|
610
|
+
this.dispatcher.dispatch("finished", {
|
|
611
|
+
launch: viewOf(launch),
|
|
612
|
+
results: launch.commands.results,
|
|
613
|
+
conversation: launch.spec.conversation
|
|
614
|
+
});
|
|
615
|
+
} else {
|
|
616
|
+
this.running(launch);
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
running(launch) {
|
|
620
|
+
const conversation = launch.spec.conversation;
|
|
621
|
+
if (conversation == null) {
|
|
622
|
+
return;
|
|
623
|
+
}
|
|
624
|
+
this.dispatcher.dispatch("running", {
|
|
625
|
+
conversation,
|
|
626
|
+
running: [...this.launches.values()].some((each) => each.status === "running" && each.spec.conversation === conversation)
|
|
627
|
+
});
|
|
628
|
+
}
|
|
629
|
+
async read(launch) {
|
|
630
|
+
if (launch.batch === null) {
|
|
631
|
+
const made = (await batchesIn(launch.commands.results)).filter((each) => !launch.known.has(each));
|
|
632
|
+
launch.batch = made.sort().at(-1) ?? null;
|
|
633
|
+
if (launch.batch !== null) {
|
|
634
|
+
await this.save(launch);
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
return viewOf(launch);
|
|
638
|
+
}
|
|
639
|
+
save(launch, replace = false) {
|
|
640
|
+
const saved = {
|
|
641
|
+
launch: viewOf(launch),
|
|
642
|
+
commands: launch.commands,
|
|
643
|
+
spec: launch.spec
|
|
644
|
+
};
|
|
645
|
+
const writing = this.writing.then(async () => {
|
|
646
|
+
await this.record.update((current) => {
|
|
647
|
+
const all = current ?? {};
|
|
648
|
+
if (!replace && all[launch.recordId]?.launch.id !== launch.id) {
|
|
649
|
+
return all;
|
|
650
|
+
}
|
|
651
|
+
return { ...all, [launch.recordId]: saved };
|
|
652
|
+
});
|
|
653
|
+
});
|
|
654
|
+
this.writing = writing.catch(() => {});
|
|
655
|
+
return writing;
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
function envOf(commands, spec) {
|
|
659
|
+
return {
|
|
660
|
+
SPLATES_EVALS_CASES: spec.scenarios.join(`
|
|
661
|
+
`),
|
|
662
|
+
SPLATES_EVALS_TARGETS: spec.agents.map(targetOf).join(`
|
|
663
|
+
`),
|
|
664
|
+
SPLATES_EVALS_RESULTS: commands.results,
|
|
665
|
+
...spec.reps === undefined ? {} : { SPLATES_EVALS_REPS: String(spec.reps) },
|
|
666
|
+
...spec.baseline === null ? {} : { SPLATES_EVALS_BASELINE: spec.baseline }
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
function idOf(commands, key) {
|
|
670
|
+
return `${commands.root}
|
|
671
|
+
${key}`;
|
|
672
|
+
}
|
|
673
|
+
async function batchesIn(results) {
|
|
674
|
+
return (await readdir(results, { withFileTypes: true }).catch(() => [])).filter((each) => each.isDirectory()).map((each) => each.name);
|
|
675
|
+
}
|
|
676
|
+
function parsed2(line) {
|
|
677
|
+
try {
|
|
678
|
+
const value = JSON.parse(line);
|
|
679
|
+
return typeof value === "object" && value !== null && !Array.isArray(value) ? value : null;
|
|
680
|
+
} catch {
|
|
681
|
+
return null;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
function viewOf(launch) {
|
|
685
|
+
return {
|
|
686
|
+
id: launch.id,
|
|
687
|
+
key: launch.key,
|
|
688
|
+
status: launch.status,
|
|
689
|
+
batch: launch.batch,
|
|
690
|
+
output: launch.output
|
|
691
|
+
};
|
|
692
|
+
}
|
|
693
|
+
async function* decoded(stream) {
|
|
694
|
+
const decoder = new TextDecoder;
|
|
695
|
+
for await (const chunk of stream) {
|
|
696
|
+
yield decoder.decode(chunk, { stream: true });
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
function tailOf(text) {
|
|
700
|
+
return text.trim().split(`
|
|
701
|
+
`).slice(-TAIL).join(`
|
|
702
|
+
`);
|
|
703
|
+
}
|
|
704
|
+
// evals/launch-routes.ts
|
|
705
|
+
import { existsSync } from "node:fs";
|
|
706
|
+
class EvalLaunchRoutes2 {
|
|
707
|
+
launches;
|
|
708
|
+
projects;
|
|
709
|
+
dirs;
|
|
710
|
+
constructor(launches, projects, dirs = { cwdOf: async () => null }) {
|
|
711
|
+
this.launches = launches;
|
|
712
|
+
this.projects = projects;
|
|
713
|
+
this.dirs = dirs;
|
|
714
|
+
}
|
|
715
|
+
scenarios = async (request) => {
|
|
716
|
+
const commands = await this.commands(request);
|
|
717
|
+
if (commands.list === null) {
|
|
718
|
+
fail2("not_found", "this project names no evals.list in splates.config.ts", {});
|
|
719
|
+
}
|
|
720
|
+
const conversation = new URL(request.url).searchParams.get("conversation");
|
|
721
|
+
return Response.json(await this.launches.scenarios(commands, await this.cwdOf(conversation)));
|
|
722
|
+
};
|
|
723
|
+
plan = async (request) => {
|
|
724
|
+
const commands = await this.runnable(request);
|
|
725
|
+
const sent = await body(request);
|
|
726
|
+
return Response.json(await this.launches.plan(commands, {
|
|
727
|
+
...this.spec(sent),
|
|
728
|
+
cwd: await this.cwdOf(this.conversation(sent))
|
|
729
|
+
}));
|
|
730
|
+
};
|
|
731
|
+
start = async (request) => {
|
|
732
|
+
const commands = await this.runnable(request);
|
|
733
|
+
const sent = await body(request);
|
|
734
|
+
const spec = this.spec(sent);
|
|
735
|
+
const { key } = sent;
|
|
736
|
+
if (typeof key !== "string" || key === "") {
|
|
737
|
+
fail2("usage", "a run names its card by `key`", {});
|
|
738
|
+
}
|
|
739
|
+
const conversation = this.conversation(sent);
|
|
740
|
+
return Response.json(await this.launches.start(commands, {
|
|
741
|
+
...spec,
|
|
742
|
+
key,
|
|
743
|
+
conversation,
|
|
744
|
+
cwd: await this.cwdOf(conversation)
|
|
745
|
+
}));
|
|
746
|
+
};
|
|
747
|
+
read = async (request) => Response.json(await this.launches.get(await this.commands(request), this.key(request)));
|
|
748
|
+
stop = async (request) => Response.json(await this.launches.stop(await this.commands(request), this.key(request)));
|
|
749
|
+
async commands(request) {
|
|
750
|
+
const commands = await this.projects.commandsOf(request);
|
|
751
|
+
if (commands === null) {
|
|
752
|
+
fail2("not_found", "this project names no evals in splates.config.ts", {});
|
|
753
|
+
}
|
|
754
|
+
return commands;
|
|
755
|
+
}
|
|
756
|
+
async runnable(request) {
|
|
757
|
+
const commands = await this.commands(request);
|
|
758
|
+
if (commands.run === null) {
|
|
759
|
+
fail2("not_found", "this project names no evals.run in splates.config.ts", {});
|
|
760
|
+
}
|
|
761
|
+
return commands;
|
|
762
|
+
}
|
|
763
|
+
async cwdOf(id) {
|
|
764
|
+
const cwd = id === null || id === "" ? null : await this.dirs.cwdOf(id);
|
|
765
|
+
return cwd !== null && existsSync(cwd) ? cwd : null;
|
|
766
|
+
}
|
|
767
|
+
conversation(sent) {
|
|
768
|
+
const { conversation } = sent;
|
|
769
|
+
if (conversation != null && typeof conversation !== "string") {
|
|
770
|
+
fail2("usage", "a run's conversation is its id", {});
|
|
771
|
+
}
|
|
772
|
+
return conversation ?? null;
|
|
773
|
+
}
|
|
774
|
+
key(request) {
|
|
775
|
+
return new URL(request.url).searchParams.get("key") ?? "";
|
|
776
|
+
}
|
|
777
|
+
spec(sent) {
|
|
778
|
+
const { skill, scenarios, agents, baseline, reps } = sent;
|
|
779
|
+
if (typeof skill !== "string" || skill === "") {
|
|
780
|
+
fail2("usage", "a run names the skill or suite of its card", {});
|
|
781
|
+
}
|
|
782
|
+
if (!Array.isArray(scenarios) || scenarios.length === 0 || !scenarios.every((each) => typeof each === "string" && each !== "")) {
|
|
783
|
+
fail2("usage", "pick at least one scenario", {});
|
|
784
|
+
}
|
|
785
|
+
if (!Array.isArray(agents) || agents.length === 0) {
|
|
786
|
+
fail2("usage", "pick at least one agent to run on", {});
|
|
787
|
+
}
|
|
788
|
+
for (const pick of agents) {
|
|
789
|
+
if (typeof pick?.agent !== "string" || !NATIVE_AGENTS.includes(pick.agent)) {
|
|
790
|
+
fail2("usage", `an agent is one of ${NATIVE_AGENTS.join(", ")}`, {});
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
if (baseline != null && typeof baseline !== "string") {
|
|
794
|
+
fail2("usage", "the baseline is a revision", {});
|
|
795
|
+
}
|
|
796
|
+
if (reps != null && (typeof reps !== "number" || !Number.isInteger(reps) || reps < 1)) {
|
|
797
|
+
fail2("usage", "repetitions are a whole number of at least 1", {});
|
|
798
|
+
}
|
|
799
|
+
return {
|
|
800
|
+
skill,
|
|
801
|
+
scenarios,
|
|
802
|
+
agents,
|
|
803
|
+
baseline: baseline ?? null,
|
|
804
|
+
...reps == null ? {} : { reps }
|
|
805
|
+
};
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
// evals/routes.ts
|
|
809
|
+
import { homedir } from "node:os";
|
|
810
|
+
import { resolve as resolve2, sep as sep2 } from "node:path";
|
|
811
|
+
|
|
812
|
+
// evals/store.ts
|
|
813
|
+
import { readdir as readdir2, readFile as readFile2 } from "node:fs/promises";
|
|
814
|
+
import { join as join3 } from "node:path";
|
|
815
|
+
class EvalStore2 {
|
|
816
|
+
directory;
|
|
817
|
+
constructor(directory) {
|
|
818
|
+
this.directory = directory;
|
|
819
|
+
}
|
|
820
|
+
async batches() {
|
|
821
|
+
const grids = await Promise.all((await this.ids()).map((id) => this.grid(id)));
|
|
822
|
+
return grids.filter((grid) => grid !== null).map(({ grid: _, ...batch }) => batch).sort((first, second) => second.startedAt.localeCompare(first.startedAt));
|
|
823
|
+
}
|
|
824
|
+
async grid(id) {
|
|
825
|
+
const dir = join3(this.directory, id);
|
|
826
|
+
const saved = await readJson(join3(dir, "batch.json")).catch(() => null);
|
|
827
|
+
if (!isContractBatch(saved)) {
|
|
828
|
+
return null;
|
|
829
|
+
}
|
|
830
|
+
const { targets, grid } = await contractCells(dir, id, saved);
|
|
831
|
+
return gridOf(id, saved.title ?? null, saved.producer ?? null, saved.startedAt, targets, grid);
|
|
832
|
+
}
|
|
833
|
+
async run(id) {
|
|
834
|
+
const hash = id.lastIndexOf("#");
|
|
835
|
+
const batch = id.slice(0, Math.max(0, hash));
|
|
836
|
+
const dir = join3(this.directory, batch);
|
|
837
|
+
const saved = hash === -1 ? null : await readJson(join3(dir, "batch.json")).catch(() => null);
|
|
838
|
+
const detail = isContractBatch(saved) ? await contractDetail(dir, batch, saved, id.slice(hash + 1)) : null;
|
|
839
|
+
if (detail === null) {
|
|
840
|
+
throw new Error(`no eval run ${id}`);
|
|
841
|
+
}
|
|
842
|
+
return detail;
|
|
843
|
+
}
|
|
844
|
+
async ids() {
|
|
845
|
+
const entries = await readdir2(this.directory, {
|
|
846
|
+
withFileTypes: true
|
|
847
|
+
}).catch(() => []);
|
|
848
|
+
return entries.filter((entry) => entry.isDirectory()).map((entry) => entry.name);
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
function gridOf(id, skill, producer, startedAt, targets, grid) {
|
|
852
|
+
const tally = {};
|
|
853
|
+
for (const cell of grid) {
|
|
854
|
+
const status = cell.run?.status ?? "pending";
|
|
855
|
+
tally[status] = (tally[status] ?? 0) + 1;
|
|
856
|
+
}
|
|
857
|
+
const runs = grid.flatMap((cell) => cell.run === null ? [] : [cell.run]);
|
|
858
|
+
return {
|
|
859
|
+
id,
|
|
860
|
+
skill,
|
|
861
|
+
producer,
|
|
862
|
+
startedAt,
|
|
863
|
+
targets,
|
|
864
|
+
tally,
|
|
865
|
+
cells: grid.length,
|
|
866
|
+
tokens: total(runs.map((each) => each.tokens)),
|
|
867
|
+
costUsd: total(runs.map((each) => each.costUsd)),
|
|
868
|
+
grid
|
|
869
|
+
};
|
|
870
|
+
}
|
|
871
|
+
async function readJson(path) {
|
|
872
|
+
const text = await readFile2(path, "utf8").catch((error) => {
|
|
873
|
+
if (error.code === "ENOENT") {
|
|
874
|
+
return null;
|
|
875
|
+
}
|
|
876
|
+
throw error;
|
|
877
|
+
});
|
|
878
|
+
return text === null ? null : JSON.parse(text);
|
|
879
|
+
}
|
|
880
|
+
function total(values) {
|
|
881
|
+
const known = values.filter((each) => each !== null);
|
|
882
|
+
return known.length === 0 ? null : known.reduce((sum, each) => sum + each, 0);
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
// evals/routes.ts
|
|
886
|
+
class EvalRoutes2 {
|
|
887
|
+
opts;
|
|
888
|
+
stores = new Map;
|
|
889
|
+
constructor(opts) {
|
|
890
|
+
this.opts = opts;
|
|
891
|
+
}
|
|
892
|
+
list = async (request) => {
|
|
893
|
+
const directory = await this.opts.directory(request);
|
|
894
|
+
return Response.json(directory === null ? null : await this.storeOf(directory).batches());
|
|
895
|
+
};
|
|
896
|
+
batch = async (request) => {
|
|
897
|
+
const id = new URL(request.url).searchParams.get("id") ?? "";
|
|
898
|
+
const grid = await (await this.opened(request)).store.grid(id);
|
|
899
|
+
if (grid === null) {
|
|
900
|
+
fail2("not_found", `no eval batch ${id}`, { id });
|
|
901
|
+
}
|
|
902
|
+
return Response.json(grid);
|
|
903
|
+
};
|
|
904
|
+
run = async (request) => {
|
|
905
|
+
const id = new URL(request.url).searchParams.get("id") ?? "";
|
|
906
|
+
const { directory, store } = await this.opened(request);
|
|
907
|
+
const hash = id.lastIndexOf("#");
|
|
908
|
+
if (hash === -1 || !resolve2(directory, id.slice(0, hash)).startsWith(directory + sep2)) {
|
|
909
|
+
fail2("usage", `no eval run ${id}`, { id });
|
|
910
|
+
}
|
|
911
|
+
return Response.json(await store.run(id).catch(() => fail2("not_found", `no eval run ${id}`, { id })));
|
|
912
|
+
};
|
|
913
|
+
async donePrompt(directory, id) {
|
|
914
|
+
const store = this.storeOf(directory);
|
|
915
|
+
const grid = await store.grid(id);
|
|
916
|
+
if (grid === null) {
|
|
917
|
+
return null;
|
|
918
|
+
}
|
|
919
|
+
const missed = grid.grid.flatMap((cell) => cell.run === null || cell.run.status === "pass" ? [] : [cell.run.id]);
|
|
920
|
+
const details = await Promise.all(missed.map((run) => store.run(run).catch(() => null)));
|
|
921
|
+
return evalsDonePrompt2(grid, details.filter((each) => each !== null));
|
|
922
|
+
}
|
|
923
|
+
async opened(request) {
|
|
924
|
+
const directory = await this.opts.directory(request);
|
|
925
|
+
if (directory === null) {
|
|
926
|
+
fail2("not_found", "this project names no evals.results in splates.config.ts", {});
|
|
927
|
+
}
|
|
928
|
+
return { directory, store: this.storeOf(directory) };
|
|
929
|
+
}
|
|
930
|
+
storeOf(directory) {
|
|
931
|
+
let store = this.stores.get(directory);
|
|
932
|
+
if (store === undefined) {
|
|
933
|
+
store = new EvalStore2(directory);
|
|
934
|
+
this.stores.set(directory, store);
|
|
935
|
+
}
|
|
936
|
+
return store;
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
function projectEvalCommands2(ps, root, evals) {
|
|
940
|
+
if (evals === null) {
|
|
941
|
+
return null;
|
|
942
|
+
}
|
|
943
|
+
const { results } = evals;
|
|
944
|
+
return {
|
|
945
|
+
root,
|
|
946
|
+
results: results === "~" || results.startsWith("~/") ? resolve2(ps.env("HOME") ?? homedir(), results.slice(2)) : resolve2(root, results),
|
|
947
|
+
list: evals.list ?? null,
|
|
948
|
+
run: evals.run ?? null,
|
|
949
|
+
plan: evals.plan ?? null
|
|
950
|
+
};
|
|
951
|
+
}
|
|
952
|
+
export { EvalAgentsStore2, EvalAgentsRoutes2, CONTRACT_FORMAT2, RESULTS_FILE2, contractRunId2, targetName2, evalsDonePrompt2, writeImported2, inspectBatch2, EvalLaunches2, EvalLaunchRoutes2, EvalStore2, EvalRoutes2, projectEvalCommands2 };
|