@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,692 @@
|
|
|
1
|
+
import {
|
|
2
|
+
replace2,
|
|
3
|
+
keyIn2,
|
|
4
|
+
limited
|
|
5
|
+
} from "./index-caep3sde.js";
|
|
6
|
+
|
|
7
|
+
// replica/dir.ts
|
|
8
|
+
import { dirname } from "node:path";
|
|
9
|
+
|
|
10
|
+
// replica/replica.ts
|
|
11
|
+
import { createHash } from "node:crypto";
|
|
12
|
+
function md5(bytes) {
|
|
13
|
+
return createHash("md5").update(bytes).digest("hex");
|
|
14
|
+
}
|
|
15
|
+
function byKey(left, right) {
|
|
16
|
+
return left.key < right.key ? -1 : left.key > right.key ? 1 : 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// replica/dir.ts
|
|
20
|
+
class DirReplica2 {
|
|
21
|
+
dir;
|
|
22
|
+
fs;
|
|
23
|
+
name;
|
|
24
|
+
constructor(dir, fs) {
|
|
25
|
+
this.dir = dir;
|
|
26
|
+
this.fs = fs;
|
|
27
|
+
this.name = dir;
|
|
28
|
+
}
|
|
29
|
+
async put(key, bytes) {
|
|
30
|
+
await replace2(this.fs, this.path(key), bytes);
|
|
31
|
+
}
|
|
32
|
+
async get(key) {
|
|
33
|
+
const path = this.path(key);
|
|
34
|
+
if (!await this.fs.exists(path)) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
return this.fs.readBytes(path);
|
|
38
|
+
}
|
|
39
|
+
async list(key) {
|
|
40
|
+
const found = [];
|
|
41
|
+
const walk = async (at) => {
|
|
42
|
+
const dir = this.path(at);
|
|
43
|
+
for (const name of await this.fs.readdir(dir).catch(() => [])) {
|
|
44
|
+
const child = at === "" ? name : `${at}/${name}`;
|
|
45
|
+
const stat = await this.fs.stat(`${dir}/${name}`).catch(() => null);
|
|
46
|
+
if (stat?.isDirectory()) {
|
|
47
|
+
await walk(child);
|
|
48
|
+
} else if (stat !== null && !name.endsWith(".tmp")) {
|
|
49
|
+
const bytes = await this.fs.readBytes(`${dir}/${name}`);
|
|
50
|
+
found.push({ key: child, size: bytes.length, md5: md5(bytes) });
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
await walk(key);
|
|
55
|
+
return found.sort(byKey);
|
|
56
|
+
}
|
|
57
|
+
async delete(key) {
|
|
58
|
+
const path = this.path(key);
|
|
59
|
+
await this.fs.rm(path, { force: true });
|
|
60
|
+
for (let dir = dirname(path);dir.startsWith(`${this.dir}/`); dir = dirname(dir)) {
|
|
61
|
+
if ((await this.fs.readdir(dir).catch(() => [null])).length > 0) {
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
await this.fs.rm(dir, { recursive: true, force: true });
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
path(key) {
|
|
68
|
+
return keyIn2(this.dir, key);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
// replica/place.ts
|
|
72
|
+
import { isAbsolute, resolve } from "node:path";
|
|
73
|
+
|
|
74
|
+
// replica/aws-sign.ts
|
|
75
|
+
import { createHash as createHash2, createHmac } from "node:crypto";
|
|
76
|
+
|
|
77
|
+
class AwsSigner {
|
|
78
|
+
credentials;
|
|
79
|
+
region;
|
|
80
|
+
service;
|
|
81
|
+
constructor(credentials, region, service) {
|
|
82
|
+
this.credentials = credentials;
|
|
83
|
+
this.region = region;
|
|
84
|
+
this.service = service;
|
|
85
|
+
}
|
|
86
|
+
sign(request, at) {
|
|
87
|
+
const stamp = at.toISOString().replace(/[-:]/g, "").replace(/\.\d+/, "");
|
|
88
|
+
const day = stamp.slice(0, 8);
|
|
89
|
+
const headers = {
|
|
90
|
+
...Object.fromEntries(Object.entries(request.headers).map(([name, value]) => [
|
|
91
|
+
name.toLowerCase(),
|
|
92
|
+
value
|
|
93
|
+
])),
|
|
94
|
+
host: request.url.host,
|
|
95
|
+
"x-amz-date": stamp
|
|
96
|
+
};
|
|
97
|
+
if (this.credentials.sessionToken !== undefined) {
|
|
98
|
+
headers["x-amz-security-token"] = this.credentials.sessionToken;
|
|
99
|
+
}
|
|
100
|
+
const names = Object.keys(headers).sort();
|
|
101
|
+
const canonical = [
|
|
102
|
+
request.method,
|
|
103
|
+
request.url.pathname,
|
|
104
|
+
canonicalQuery(request.url),
|
|
105
|
+
names.map((name) => `${name}:${headers[name]?.trim()}
|
|
106
|
+
`).join(""),
|
|
107
|
+
names.join(";"),
|
|
108
|
+
headers["x-amz-content-sha256"] ?? sha256(request.body)
|
|
109
|
+
].join(`
|
|
110
|
+
`);
|
|
111
|
+
const scope = `${day}/${this.region}/${this.service}/aws4_request`;
|
|
112
|
+
const toSign = ["AWS4-HMAC-SHA256", stamp, scope, sha256(canonical)].join(`
|
|
113
|
+
`);
|
|
114
|
+
let key = `AWS4${this.credentials.secretAccessKey}`;
|
|
115
|
+
for (const part of [day, this.region, this.service, "aws4_request"]) {
|
|
116
|
+
key = createHmac("sha256", key).update(part).digest();
|
|
117
|
+
}
|
|
118
|
+
const signature = createHmac("sha256", key).update(toSign).digest("hex");
|
|
119
|
+
return {
|
|
120
|
+
...headers,
|
|
121
|
+
Authorization: `AWS4-HMAC-SHA256 Credential=${this.credentials.accessKeyId}/${scope}, SignedHeaders=${names.join(";")}, Signature=${signature}`
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
function sha256(body) {
|
|
126
|
+
return createHash2("sha256").update(body).digest("hex");
|
|
127
|
+
}
|
|
128
|
+
function canonicalQuery(url) {
|
|
129
|
+
return [...url.searchParams.entries()].map(([name, value]) => [encode(name), encode(value)]).sort(([ak, av], [bk, bv]) => ak === bk ? av < bv ? -1 : 1 : ak < bk ? -1 : 1).map(([name, value]) => `${name}=${value}`).join("&");
|
|
130
|
+
}
|
|
131
|
+
function encode(text) {
|
|
132
|
+
return encodeURIComponent(text).replace(/[!'()*]/g, (char) => `%${char.charCodeAt(0).toString(16).toUpperCase()}`);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// replica/s3.ts
|
|
136
|
+
class S3Replica2 {
|
|
137
|
+
opts;
|
|
138
|
+
name;
|
|
139
|
+
fetch;
|
|
140
|
+
now;
|
|
141
|
+
prefix;
|
|
142
|
+
constructor(opts) {
|
|
143
|
+
this.opts = opts;
|
|
144
|
+
this.fetch = opts.fetch ?? fetch;
|
|
145
|
+
this.now = opts.now ?? (() => new Date);
|
|
146
|
+
this.prefix = opts.prefix?.replace(/^\/+|\/+$/g, "") ?? "";
|
|
147
|
+
this.name = `s3://${opts.bucket}${this.prefix === "" ? "" : `/${this.prefix}`}`;
|
|
148
|
+
}
|
|
149
|
+
async put(key, bytes) {
|
|
150
|
+
await this.send("PUT", this.url(key), bytes);
|
|
151
|
+
}
|
|
152
|
+
async get(key) {
|
|
153
|
+
const response = await this.send("GET", this.url(key), "", [404]);
|
|
154
|
+
return response.status === 404 ? null : new Uint8Array(await response.arrayBuffer());
|
|
155
|
+
}
|
|
156
|
+
async list(key) {
|
|
157
|
+
const under = this.full(key);
|
|
158
|
+
const found = [];
|
|
159
|
+
let token = null;
|
|
160
|
+
do {
|
|
161
|
+
const url = this.at("");
|
|
162
|
+
url.searchParams.set("list-type", "2");
|
|
163
|
+
if (under !== "") {
|
|
164
|
+
url.searchParams.set("prefix", `${under}/`);
|
|
165
|
+
}
|
|
166
|
+
if (token !== null) {
|
|
167
|
+
url.searchParams.set("continuation-token", token);
|
|
168
|
+
}
|
|
169
|
+
const page = parseList(await (await this.send("GET", url, "")).text());
|
|
170
|
+
for (const object of page.objects) {
|
|
171
|
+
found.push({ ...object, key: this.relative(object.key) });
|
|
172
|
+
}
|
|
173
|
+
token = page.next;
|
|
174
|
+
} while (token !== null);
|
|
175
|
+
return found.sort(byKey);
|
|
176
|
+
}
|
|
177
|
+
async delete(key) {
|
|
178
|
+
await this.send("DELETE", this.url(key), "", [404]);
|
|
179
|
+
}
|
|
180
|
+
full(key) {
|
|
181
|
+
return keyIn2(this.prefix, key);
|
|
182
|
+
}
|
|
183
|
+
relative(key) {
|
|
184
|
+
return this.prefix === "" ? key : key.slice(this.prefix.length + 1);
|
|
185
|
+
}
|
|
186
|
+
url(key) {
|
|
187
|
+
return this.at(this.full(key));
|
|
188
|
+
}
|
|
189
|
+
at(key) {
|
|
190
|
+
const path = [this.opts.bucket, ...key.split("/")].filter((part) => part !== "").map(encode).join("/");
|
|
191
|
+
return new URL(`${this.opts.endpoint.replace(/\/+$/, "")}/${path}`);
|
|
192
|
+
}
|
|
193
|
+
async send(method, url, body, allowed = []) {
|
|
194
|
+
const signer = new AwsSigner(await this.opts.credentials(), this.opts.region ?? "us-east-1", "s3");
|
|
195
|
+
const headers = signer.sign({
|
|
196
|
+
method,
|
|
197
|
+
url,
|
|
198
|
+
headers: { "x-amz-content-sha256": sha256(body) },
|
|
199
|
+
body
|
|
200
|
+
}, this.now());
|
|
201
|
+
const response = await this.fetch(url, {
|
|
202
|
+
method,
|
|
203
|
+
headers,
|
|
204
|
+
body: method === "PUT" ? new Uint8Array(encodeBody(body)) : undefined
|
|
205
|
+
});
|
|
206
|
+
if (!response.ok && !allowed.includes(response.status)) {
|
|
207
|
+
const text = await response.text().catch(() => "");
|
|
208
|
+
throw new Error(`${this.name}: ${method} ${url.pathname} answered ${response.status}${errorCode(text)}`);
|
|
209
|
+
}
|
|
210
|
+
return response;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
function parseList(xml) {
|
|
214
|
+
const objects = [...xml.matchAll(/<Contents>([\s\S]*?)<\/Contents>/g)].map(([, body]) => ({
|
|
215
|
+
key: unescapeXml(tag(body ?? "", "Key")),
|
|
216
|
+
size: Number(tag(body ?? "", "Size")),
|
|
217
|
+
md5: unescapeXml(tag(body ?? "", "ETag")).replace(/"/g, "")
|
|
218
|
+
}));
|
|
219
|
+
const truncated = tag(xml, "IsTruncated") === "true";
|
|
220
|
+
const next = tag(xml, "NextContinuationToken");
|
|
221
|
+
return { objects, next: truncated && next !== "" ? unescapeXml(next) : null };
|
|
222
|
+
}
|
|
223
|
+
function tag(xml, name) {
|
|
224
|
+
return xml.match(new RegExp(`<${name}>([\\s\\S]*?)</${name}>`))?.[1] ?? "";
|
|
225
|
+
}
|
|
226
|
+
function unescapeXml(text) {
|
|
227
|
+
return text.replace(/"/g, '"').replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&");
|
|
228
|
+
}
|
|
229
|
+
function errorCode(xml) {
|
|
230
|
+
const code = tag(xml, "Code");
|
|
231
|
+
return code === "" ? "" : `: ${code}`;
|
|
232
|
+
}
|
|
233
|
+
function encodeBody(body) {
|
|
234
|
+
return typeof body === "string" ? new TextEncoder().encode(body) : body;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// replica/place.ts
|
|
238
|
+
var REPLICA_ACCESS_KEY2 = "REPLICA_ACCESS_KEY";
|
|
239
|
+
var REPLICA_SECRET_KEY2 = "REPLICA_SECRET_KEY";
|
|
240
|
+
var ASKED = {
|
|
241
|
+
purpose: "the access key and secret of the bucket this project's `splates.config.ts` names as its `replica`, which splates copies the project's records into a few seconds behind every change",
|
|
242
|
+
instructions: "In the store's control panel, make an access key limited to the bucket if it can be, and paste its key id as REPLICA_ACCESS_KEY and its secret as REPLICA_SECRET_KEY."
|
|
243
|
+
};
|
|
244
|
+
function openReplica2(place, {
|
|
245
|
+
root,
|
|
246
|
+
fs,
|
|
247
|
+
creds
|
|
248
|
+
}) {
|
|
249
|
+
if (place.provider === "dir") {
|
|
250
|
+
return new DirReplica2(isAbsolute(place.path) ? place.path : resolve(root, place.path), fs);
|
|
251
|
+
}
|
|
252
|
+
let asked = false;
|
|
253
|
+
return new S3Replica2({
|
|
254
|
+
...place,
|
|
255
|
+
credentials: async () => {
|
|
256
|
+
const accessKeyId = await creds.credentials.get(REPLICA_ACCESS_KEY2);
|
|
257
|
+
const secretAccessKey = await creds.credentials.get(REPLICA_SECRET_KEY2);
|
|
258
|
+
if (accessKeyId !== undefined && secretAccessKey !== undefined) {
|
|
259
|
+
return { accessKeyId, secretAccessKey };
|
|
260
|
+
}
|
|
261
|
+
if (!asked) {
|
|
262
|
+
asked = true;
|
|
263
|
+
for (const name of [REPLICA_ACCESS_KEY2, REPLICA_SECRET_KEY2]) {
|
|
264
|
+
await creds.request(name, { scope: "project", task: null, ...ASKED });
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
throw new Error(`no ${REPLICA_ACCESS_KEY2} and ${REPLICA_SECRET_KEY2} yet: fill them on the Creds page`);
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
// replica/replicator.ts
|
|
272
|
+
import { Duration } from "../../core/time/index.js";
|
|
273
|
+
import { z as z2 } from "zod";
|
|
274
|
+
|
|
275
|
+
// replica/layout.ts
|
|
276
|
+
import { z } from "zod";
|
|
277
|
+
var MANIFEST = "manifest.json";
|
|
278
|
+
function valueKey(key) {
|
|
279
|
+
return `values/${key}`;
|
|
280
|
+
}
|
|
281
|
+
function chunkKey(key, to, last) {
|
|
282
|
+
return `logs/${key}/${String(to).padStart(10, "0")}-${last}.jsonl`;
|
|
283
|
+
}
|
|
284
|
+
function lineHash(line) {
|
|
285
|
+
return sha256(line).slice(0, 12);
|
|
286
|
+
}
|
|
287
|
+
function readListing(keys) {
|
|
288
|
+
const values = new Map;
|
|
289
|
+
const logs = new Map;
|
|
290
|
+
for (const { key, md5 } of keys) {
|
|
291
|
+
if (key.startsWith("values/")) {
|
|
292
|
+
values.set(key.slice("values/".length), md5);
|
|
293
|
+
continue;
|
|
294
|
+
}
|
|
295
|
+
const chunk = key.match(/^logs\/(.+)\/(\d{10})-([0-9a-f]{12})\.jsonl$/);
|
|
296
|
+
if (chunk?.[1] === undefined) {
|
|
297
|
+
continue;
|
|
298
|
+
}
|
|
299
|
+
const chunks = logs.get(chunk[1]) ?? [];
|
|
300
|
+
chunks.push({ key, to: Number(chunk[2]), last: chunk[3] ?? "" });
|
|
301
|
+
logs.set(chunk[1], chunks);
|
|
302
|
+
}
|
|
303
|
+
for (const chunks of logs.values()) {
|
|
304
|
+
chunks.sort((left, right) => left.to - right.to);
|
|
305
|
+
}
|
|
306
|
+
return { values, logs };
|
|
307
|
+
}
|
|
308
|
+
var MANIFEST_SCHEMA = z.object({
|
|
309
|
+
version: z.literal(1),
|
|
310
|
+
origin: z.string(),
|
|
311
|
+
host: z.string(),
|
|
312
|
+
caughtUpAt: z.number().nullable()
|
|
313
|
+
});
|
|
314
|
+
async function readManifest(replica) {
|
|
315
|
+
const bytes = await replica.get(MANIFEST);
|
|
316
|
+
if (bytes === null) {
|
|
317
|
+
return null;
|
|
318
|
+
}
|
|
319
|
+
const parsed = MANIFEST_SCHEMA.safeParse(JSON.parse(new TextDecoder().decode(bytes)));
|
|
320
|
+
if (!parsed.success) {
|
|
321
|
+
throw new Error(`${replica.name} has a ${MANIFEST} splates cannot read`);
|
|
322
|
+
}
|
|
323
|
+
return parsed.data;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
// replica/shipped.ts
|
|
327
|
+
var KEPT_BACK = /(^|\/)creds\.json$|\.lock(\/|$)|\.tmp$|^replica\.json$/;
|
|
328
|
+
function replicated2(key) {
|
|
329
|
+
return !KEPT_BACK.test(key);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
// replica/replicator.ts
|
|
333
|
+
class Replicator2 {
|
|
334
|
+
opts;
|
|
335
|
+
batch;
|
|
336
|
+
maxRetry;
|
|
337
|
+
values = new Map;
|
|
338
|
+
logs = new Map;
|
|
339
|
+
pending = new Set;
|
|
340
|
+
behindSince = null;
|
|
341
|
+
caughtUpAt = null;
|
|
342
|
+
error = null;
|
|
343
|
+
origin = null;
|
|
344
|
+
failures = 0;
|
|
345
|
+
watch = null;
|
|
346
|
+
scheduled = null;
|
|
347
|
+
flushing = null;
|
|
348
|
+
stopped = false;
|
|
349
|
+
recordedAs = "";
|
|
350
|
+
claimed = false;
|
|
351
|
+
constructor(opts) {
|
|
352
|
+
this.opts = opts;
|
|
353
|
+
this.batch = opts.batch ?? Duration.secs(3);
|
|
354
|
+
this.maxRetry = opts.maxRetry ?? Duration.mins(5);
|
|
355
|
+
}
|
|
356
|
+
async start() {
|
|
357
|
+
this.watch = this.opts.storage.watch("", { recursive: true });
|
|
358
|
+
this.watch.events.on("changed", (key) => this.changed(key));
|
|
359
|
+
await this.flush();
|
|
360
|
+
}
|
|
361
|
+
status() {
|
|
362
|
+
return {
|
|
363
|
+
replica: this.opts.replica.name,
|
|
364
|
+
caughtUpAt: this.caughtUpAt,
|
|
365
|
+
pending: this.pending.size,
|
|
366
|
+
behindSince: this.behindSince,
|
|
367
|
+
error: this.error
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
static async recorded(storage) {
|
|
371
|
+
const record = await storage.document(RECORD_KEY, { schema: RECORD }).read();
|
|
372
|
+
return record?.status ?? null;
|
|
373
|
+
}
|
|
374
|
+
static async adopt(storage, origin) {
|
|
375
|
+
await storage.document(RECORD_KEY, { schema: RECORD }).update((current) => ({ ...current, origin }));
|
|
376
|
+
}
|
|
377
|
+
async flush() {
|
|
378
|
+
while (this.flushing !== null) {
|
|
379
|
+
await this.flushing;
|
|
380
|
+
}
|
|
381
|
+
this.scheduled?.dispose();
|
|
382
|
+
this.scheduled = null;
|
|
383
|
+
this.flushing = this.run().finally(() => {
|
|
384
|
+
this.flushing = null;
|
|
385
|
+
});
|
|
386
|
+
await this.flushing;
|
|
387
|
+
}
|
|
388
|
+
async run() {
|
|
389
|
+
if (this.origin === null && !await this.catchUp()) {
|
|
390
|
+
await this.record();
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
await this.ship();
|
|
394
|
+
await this.record();
|
|
395
|
+
}
|
|
396
|
+
dispose() {
|
|
397
|
+
this.stopped = true;
|
|
398
|
+
this.watch?.dispose();
|
|
399
|
+
this.scheduled?.dispose();
|
|
400
|
+
}
|
|
401
|
+
changed(key) {
|
|
402
|
+
if (key === CREDS_KEY && this.error !== null && !this.stopped) {
|
|
403
|
+
this.flush();
|
|
404
|
+
}
|
|
405
|
+
if (!replicated2(key)) {
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
this.pending.add(key);
|
|
409
|
+
this.behindSince ??= this.opts.clock.now();
|
|
410
|
+
if (this.origin !== null) {
|
|
411
|
+
this.schedule(this.batch);
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
schedule(after) {
|
|
415
|
+
if (this.scheduled !== null || this.stopped) {
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
418
|
+
this.scheduled = this.opts.timer.setTimeout(() => {
|
|
419
|
+
this.scheduled = null;
|
|
420
|
+
this.flush();
|
|
421
|
+
}, after);
|
|
422
|
+
}
|
|
423
|
+
async catchUp() {
|
|
424
|
+
const { storage, replica } = this.opts;
|
|
425
|
+
try {
|
|
426
|
+
const manifest = await this.manifest();
|
|
427
|
+
const origin = await this.ownOrigin();
|
|
428
|
+
if (manifest !== null && manifest.origin !== origin) {
|
|
429
|
+
this.error = `${replica.name} holds the records of another server, last caught up on ${manifest.host}: restore from it, or give this project's replica its own prefix`;
|
|
430
|
+
this.opts.log.error(this.error);
|
|
431
|
+
return false;
|
|
432
|
+
}
|
|
433
|
+
const listing = readListing(await replica.list(""));
|
|
434
|
+
this.values = listing.values;
|
|
435
|
+
this.logs = listing.logs;
|
|
436
|
+
this.origin = origin;
|
|
437
|
+
this.caughtUpAt = manifest?.caughtUpAt ?? null;
|
|
438
|
+
const keys = new Set([
|
|
439
|
+
...await storage.keys(""),
|
|
440
|
+
...this.values.keys(),
|
|
441
|
+
...this.logs.keys()
|
|
442
|
+
]);
|
|
443
|
+
for (const key of keys) {
|
|
444
|
+
if (replicated2(key)) {
|
|
445
|
+
this.pending.add(key);
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
this.behindSince ??= this.opts.clock.now();
|
|
449
|
+
} catch (error) {
|
|
450
|
+
this.failed(error);
|
|
451
|
+
return false;
|
|
452
|
+
}
|
|
453
|
+
return true;
|
|
454
|
+
}
|
|
455
|
+
async ship() {
|
|
456
|
+
const keys = [...this.pending].sort();
|
|
457
|
+
this.pending.clear();
|
|
458
|
+
const startedAt = this.opts.clock.now();
|
|
459
|
+
const failed = [];
|
|
460
|
+
await limited(keys, CONCURRENCY, async (key) => {
|
|
461
|
+
try {
|
|
462
|
+
await this.shipKey(key);
|
|
463
|
+
} catch (error) {
|
|
464
|
+
failed.push(error);
|
|
465
|
+
this.pending.add(key);
|
|
466
|
+
}
|
|
467
|
+
});
|
|
468
|
+
if (failed.length === 0 && (keys.length > 0 || !this.claimed)) {
|
|
469
|
+
try {
|
|
470
|
+
await this.writeManifest(this.pending.size === 0 ? startedAt : null);
|
|
471
|
+
} catch (error) {
|
|
472
|
+
failed.push(error);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
if (failed.length > 0) {
|
|
476
|
+
this.failed(failed[0]);
|
|
477
|
+
return;
|
|
478
|
+
}
|
|
479
|
+
this.failures = 0;
|
|
480
|
+
this.error = null;
|
|
481
|
+
if (this.pending.size === 0) {
|
|
482
|
+
this.behindSince = null;
|
|
483
|
+
} else {
|
|
484
|
+
this.schedule(this.batch);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
async shipKey(key) {
|
|
488
|
+
const { storage, replica } = this.opts;
|
|
489
|
+
const chunks = this.logs.get(key) ?? [];
|
|
490
|
+
const last = chunks.at(-1);
|
|
491
|
+
const kept = await storage.copy(key, last === undefined ? 0 : last.to - 1);
|
|
492
|
+
if (kept?.kind !== "value" && this.values.has(key)) {
|
|
493
|
+
await replica.delete(valueKey(key));
|
|
494
|
+
this.values.delete(key);
|
|
495
|
+
}
|
|
496
|
+
if (kept?.kind !== "log" && chunks.length > 0) {
|
|
497
|
+
await this.dropChunks(key);
|
|
498
|
+
}
|
|
499
|
+
if (kept?.kind === "value") {
|
|
500
|
+
const hash = md5(kept.bytes);
|
|
501
|
+
if (this.values.get(key) !== hash) {
|
|
502
|
+
await replica.put(valueKey(key), kept.bytes);
|
|
503
|
+
this.values.set(key, hash);
|
|
504
|
+
}
|
|
505
|
+
} else if (kept?.kind === "log") {
|
|
506
|
+
await this.shipLines(key, kept, last);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
async shipLines(key, kept, last) {
|
|
510
|
+
let lines = kept.lines;
|
|
511
|
+
let from = 0;
|
|
512
|
+
if (last !== undefined) {
|
|
513
|
+
const [overlap, ...after] = kept.lines;
|
|
514
|
+
if (kept.count >= last.to && overlap !== undefined && lineHash(overlap) === last.last) {
|
|
515
|
+
lines = after;
|
|
516
|
+
from = last.to;
|
|
517
|
+
} else {
|
|
518
|
+
await this.dropChunks(key);
|
|
519
|
+
const again = await this.opts.storage.copy(key);
|
|
520
|
+
lines = again?.kind === "log" ? again.lines : [];
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
const final = lines.at(-1);
|
|
524
|
+
if (final === undefined) {
|
|
525
|
+
return;
|
|
526
|
+
}
|
|
527
|
+
const chunk = {
|
|
528
|
+
key: chunkKey(key, from + lines.length, lineHash(final)),
|
|
529
|
+
to: from + lines.length,
|
|
530
|
+
last: lineHash(final)
|
|
531
|
+
};
|
|
532
|
+
await this.opts.replica.put(chunk.key, new TextEncoder().encode(lines.map((line) => `${line}
|
|
533
|
+
`).join("")));
|
|
534
|
+
this.logs.set(key, [...this.logs.get(key) ?? [], chunk]);
|
|
535
|
+
}
|
|
536
|
+
async dropChunks(key) {
|
|
537
|
+
for (const chunk of this.logs.get(key) ?? []) {
|
|
538
|
+
await this.opts.replica.delete(chunk.key);
|
|
539
|
+
}
|
|
540
|
+
this.logs.delete(key);
|
|
541
|
+
}
|
|
542
|
+
manifest() {
|
|
543
|
+
return readManifest(this.opts.replica);
|
|
544
|
+
}
|
|
545
|
+
async writeManifest(at) {
|
|
546
|
+
if (at !== null) {
|
|
547
|
+
this.caughtUpAt = at;
|
|
548
|
+
}
|
|
549
|
+
const manifest = {
|
|
550
|
+
version: 1,
|
|
551
|
+
origin: this.origin ?? "",
|
|
552
|
+
host: this.opts.host,
|
|
553
|
+
caughtUpAt: this.caughtUpAt
|
|
554
|
+
};
|
|
555
|
+
await this.opts.replica.put(MANIFEST, new TextEncoder().encode(`${JSON.stringify(manifest, null, "\t")}
|
|
556
|
+
`));
|
|
557
|
+
this.claimed = true;
|
|
558
|
+
}
|
|
559
|
+
async ownOrigin() {
|
|
560
|
+
const kept = await this.opts.storage.document(RECORD_KEY, { schema: RECORD }).update((current) => current ?? { origin: crypto.randomUUID() });
|
|
561
|
+
return kept.origin;
|
|
562
|
+
}
|
|
563
|
+
async record() {
|
|
564
|
+
const status = this.status();
|
|
565
|
+
const text = JSON.stringify(status);
|
|
566
|
+
if (text === this.recordedAs) {
|
|
567
|
+
return;
|
|
568
|
+
}
|
|
569
|
+
this.recordedAs = text;
|
|
570
|
+
try {
|
|
571
|
+
await this.opts.storage.document(RECORD_KEY, { schema: RECORD }).update((current) => ({
|
|
572
|
+
origin: current?.origin ?? this.origin ?? crypto.randomUUID(),
|
|
573
|
+
status
|
|
574
|
+
}));
|
|
575
|
+
} catch (error) {
|
|
576
|
+
this.recordedAs = "";
|
|
577
|
+
this.opts.log.error(`replica status not recorded: ${error}`);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
failed(error) {
|
|
581
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
582
|
+
if (message !== this.error) {
|
|
583
|
+
this.opts.log.error(`replica ${this.opts.replica.name}: ${message}`);
|
|
584
|
+
}
|
|
585
|
+
this.error = message;
|
|
586
|
+
this.failures++;
|
|
587
|
+
const wait = Math.min(this.batch.ms * 2 ** this.failures, this.maxRetry.ms);
|
|
588
|
+
this.schedule(Duration.ms(wait));
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
var RECORD_KEY = "replica.json";
|
|
592
|
+
var CREDS_KEY = "creds.json";
|
|
593
|
+
var STATUS = z2.object({
|
|
594
|
+
replica: z2.string(),
|
|
595
|
+
caughtUpAt: z2.number().nullable(),
|
|
596
|
+
pending: z2.number(),
|
|
597
|
+
behindSince: z2.number().nullable(),
|
|
598
|
+
error: z2.string().nullable()
|
|
599
|
+
});
|
|
600
|
+
var RECORD = z2.object({
|
|
601
|
+
origin: z2.string(),
|
|
602
|
+
status: STATUS.optional()
|
|
603
|
+
});
|
|
604
|
+
var CONCURRENCY = 8;
|
|
605
|
+
// replica/restore.ts
|
|
606
|
+
async function restoreFromReplica2(replica, {
|
|
607
|
+
target,
|
|
608
|
+
fs,
|
|
609
|
+
format,
|
|
610
|
+
force
|
|
611
|
+
}) {
|
|
612
|
+
const manifest = await readManifest(replica);
|
|
613
|
+
if (manifest === null) {
|
|
614
|
+
throw new Error(`nothing to restore: ${replica.name} holds no records yet`);
|
|
615
|
+
}
|
|
616
|
+
const present = await target.exists();
|
|
617
|
+
if (present && !force) {
|
|
618
|
+
throw new Error("this project already has records here: restore over them with --force, which leaves them aside");
|
|
619
|
+
}
|
|
620
|
+
const listing = readListing(await replica.list(""));
|
|
621
|
+
const stamp = listing.values.has("format") ? Number(new TextDecoder().decode(await need(replica, "values/format"))) : format;
|
|
622
|
+
if (stamp > format) {
|
|
623
|
+
throw new Error(`the replica's records are in format ${stamp}, newer than this splates's ${format}: update splates first`);
|
|
624
|
+
}
|
|
625
|
+
const staging = `${await target.dir()}/restoring.tmp`;
|
|
626
|
+
await fs.rm(staging, { recursive: true, force: true });
|
|
627
|
+
await fs.mkdir(staging, { recursive: true });
|
|
628
|
+
try {
|
|
629
|
+
let values = 0;
|
|
630
|
+
let logs = 0;
|
|
631
|
+
for (const key of listing.values.keys()) {
|
|
632
|
+
if (!replicated2(key)) {
|
|
633
|
+
continue;
|
|
634
|
+
}
|
|
635
|
+
await replace2(fs, `${staging}/${key}`, await need(replica, `values/${key}`));
|
|
636
|
+
values++;
|
|
637
|
+
}
|
|
638
|
+
for (const [key, chunks] of listing.logs) {
|
|
639
|
+
if (!replicated2(key)) {
|
|
640
|
+
continue;
|
|
641
|
+
}
|
|
642
|
+
const parts = [];
|
|
643
|
+
for (const chunk of chunks) {
|
|
644
|
+
parts.push(await need(replica, chunk.key));
|
|
645
|
+
}
|
|
646
|
+
await replace2(fs, `${staging}/${key}`, join(parts));
|
|
647
|
+
logs++;
|
|
648
|
+
}
|
|
649
|
+
const replaced = present ? await target.moveAside(`the replica ${replica.name}, restored here`) : null;
|
|
650
|
+
await target.import(staging, stamp);
|
|
651
|
+
await target.clearMoved();
|
|
652
|
+
await Replicator2.adopt(await target.open(), manifest.origin);
|
|
653
|
+
return { values, logs, host: manifest.host, replaced };
|
|
654
|
+
} finally {
|
|
655
|
+
target.dispose();
|
|
656
|
+
await fs.rm(staging, { recursive: true, force: true });
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
async function need(replica, key) {
|
|
660
|
+
const bytes = await replica.get(key);
|
|
661
|
+
if (bytes === null) {
|
|
662
|
+
throw new Error(`${replica.name} lists ${key} but no longer holds it`);
|
|
663
|
+
}
|
|
664
|
+
return bytes;
|
|
665
|
+
}
|
|
666
|
+
function join(parts) {
|
|
667
|
+
const whole = new Uint8Array(parts.reduce((sum, part) => sum + part.length, 0));
|
|
668
|
+
let at = 0;
|
|
669
|
+
for (const part of parts) {
|
|
670
|
+
whole.set(part, at);
|
|
671
|
+
at += part.length;
|
|
672
|
+
}
|
|
673
|
+
return whole;
|
|
674
|
+
}
|
|
675
|
+
// replica/status.ts
|
|
676
|
+
import { Duration as Duration2, timeAgo } from "../../core/time/index.js";
|
|
677
|
+
function statusLines2(status, named, now) {
|
|
678
|
+
if (status === null) {
|
|
679
|
+
return [
|
|
680
|
+
named ? "no replica yet: `splates server` starts it as it serves the project" : "no replica: name one as `replica` in splates.config.ts, and `splates server` keeps it"
|
|
681
|
+
];
|
|
682
|
+
}
|
|
683
|
+
const ago = (at) => timeAgo(Duration2.ms(now - at));
|
|
684
|
+
const { replica, caughtUpAt, behindSince, pending, error } = status;
|
|
685
|
+
return [
|
|
686
|
+
`replica: ${replica}`,
|
|
687
|
+
`caught up: ${caughtUpAt === null ? "never" : `${ago(caughtUpAt)} (${new Date(caughtUpAt).toISOString()})`}`,
|
|
688
|
+
`behind by: ${behindSince === null ? "nothing" : `${pending} change${pending === 1 ? "" : "s"}, the oldest ${ago(behindSince)}`}`,
|
|
689
|
+
...error === null ? [] : [`failing: ${error}`]
|
|
690
|
+
];
|
|
691
|
+
}
|
|
692
|
+
export { DirReplica2, S3Replica2, REPLICA_ACCESS_KEY2, REPLICA_SECRET_KEY2, openReplica2, replicated2, Replicator2, restoreFromReplica2, statusLines2 };
|