@narumitw/pi-sync 0.61.0 → 0.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/README.md +46 -25
- package/dist/chunks/{chunk-277VHM2P.ts → chunk-27F5W7DX.ts} +7 -3
- package/dist/chunks/chunk-27F5W7DX.ts.map +7 -0
- package/dist/chunks/{chunk-ZIL6PW5L.ts → chunk-6YKOHBSC.ts} +2 -2
- package/dist/chunks/{chunk-OA4NZLSL.ts → chunk-APZVJAEW.ts} +4 -3
- package/dist/chunks/chunk-CKUGCBHP.ts +114 -0
- package/dist/chunks/chunk-CKUGCBHP.ts.map +7 -0
- package/dist/chunks/chunk-EJDDRS6O.ts +17 -0
- package/dist/chunks/chunk-EJDDRS6O.ts.map +7 -0
- package/dist/chunks/{chunk-JVFCVPPD.ts → chunk-EXDWEFIJ.ts} +87 -147
- package/dist/chunks/chunk-EXDWEFIJ.ts.map +7 -0
- package/dist/chunks/{chunk-4SR3ZYHA.ts → chunk-GELYN4UC.ts} +2 -2
- package/dist/chunks/{chunk-2ZGV5KNC.ts → chunk-HSCAFOT5.ts} +15 -12
- package/dist/chunks/chunk-HSCAFOT5.ts.map +7 -0
- package/dist/chunks/{chunk-YQSFJLJ3.ts → chunk-IBXEM35O.ts} +4 -3
- package/dist/chunks/{chunk-2JHAN3ZO.ts → chunk-JREGWM2B.ts} +3 -3
- package/dist/chunks/chunk-MANNB4WZ.ts +36 -0
- package/dist/chunks/chunk-MANNB4WZ.ts.map +7 -0
- package/dist/chunks/{chunk-EMRFVLZM.ts → chunk-NXWHPVXR.ts} +2 -2
- package/dist/chunks/{chunk-SMVKMYLK.ts → chunk-P4GI7LTT.ts} +2 -2
- package/dist/chunks/{chunk-ZVGRZD4C.ts → chunk-R3SAMXB6.ts} +2 -2
- package/dist/chunks/{chunk-4KTJLJSJ.ts → chunk-S6FUUWV5.ts} +148 -21
- package/dist/chunks/chunk-S6FUUWV5.ts.map +7 -0
- package/dist/chunks/{chunk-PJMM75W5.ts → chunk-SXCH4Q5O.ts} +41 -23
- package/dist/chunks/chunk-SXCH4Q5O.ts.map +7 -0
- package/dist/chunks/{chunk-RNIEVDTR.ts → chunk-T3LABNHF.ts} +2 -2
- package/dist/chunks/{chunk-E3YLRLJM.ts → chunk-UGS6RYDZ.ts} +14 -12
- package/dist/chunks/chunk-UGS6RYDZ.ts.map +7 -0
- package/dist/chunks/{chunk-S3R3W3KF.ts → chunk-UMPA5S7X.ts} +2 -2
- package/dist/chunks/{chunk-EMVZL4PH.ts → chunk-V76KCWHO.ts} +7 -5
- package/dist/chunks/{chunk-EMVZL4PH.ts.map → chunk-V76KCWHO.ts.map} +1 -1
- package/dist/chunks/{chunk-S7F4FOAS.ts → chunk-VQ47JBLF.ts} +5 -5
- package/dist/chunks/{chunk-WP2M67XZ.ts → chunk-WBIOSK76.ts} +2 -2
- package/dist/chunks/chunk-WFBHWYI6.ts +18 -0
- package/dist/chunks/chunk-WFBHWYI6.ts.map +7 -0
- package/dist/chunks/{chunk-HEB6YT64.ts → chunk-ZO52JM4H.ts} +2 -2
- package/dist/chunks/{command-handler-K4XJOGYC.ts → command-handler-VINMQ7ZM.ts} +26 -43
- package/dist/chunks/command-handler-VINMQ7ZM.ts.map +7 -0
- package/dist/chunks/{conflict-review-IGKY2TOJ.ts → conflict-review-PCDFRIVB.ts} +4 -4
- package/dist/chunks/{continuous-record-3XDXDOMV.ts → continuous-record-3SKJ6I3V.ts} +2 -2
- package/dist/chunks/{continuous-storage-HLKCHF6Z.ts → continuous-storage-3EU6I7Z3.ts} +2 -2
- package/dist/chunks/{file-selection-MGGVOKM7.ts → file-selection-KID23GAD.ts} +21 -14
- package/dist/chunks/file-selection-KID23GAD.ts.map +7 -0
- package/dist/chunks/manager-result-dispatcher-GDB74IOP.ts +20 -0
- package/dist/chunks/{manager-ui-KYQ5AZJS.ts → manager-ui-YHDECYKI.ts} +454 -167
- package/dist/chunks/manager-ui-YHDECYKI.ts.map +7 -0
- package/dist/chunks/remote-selection-ui-GPITNEBF.ts +19 -0
- package/dist/chunks/{setup-switch-D6K6PBPC.ts → setup-switch-L54X5U5I.ts} +7 -7
- package/dist/chunks/{setup-wizard-4DYUDHJR.ts → setup-wizard-YO4MCPUF.ts} +15 -11
- package/dist/chunks/{setup-wizard-4DYUDHJR.ts.map → setup-wizard-YO4MCPUF.ts.map} +1 -1
- package/dist/chunks/{snapshot-5HY3M2NL.ts → snapshot-ZUJJZCFW.ts} +2 -2
- package/dist/chunks/{snapshot-transaction-directory-OU2D7R7A.ts → snapshot-transaction-directory-F46JWRAU.ts} +2 -2
- package/dist/chunks/{state-directory-XXHU73Z3.ts → state-directory-CMAIF34J.ts} +2 -2
- package/dist/chunks/{sync-inspection-J3CRBORL.ts → sync-inspection-H2WX5SUT.ts} +5 -5
- package/dist/chunks/{sync-operations-BVWYYKH3.ts → sync-operations-2MZAYHL2.ts} +13 -9
- package/dist/chunks/sync-operations-2MZAYHL2.ts.map +7 -0
- package/dist/chunks/{sync-state-2LMIXJ2C.ts → sync-state-QIT64TKV.ts} +2 -2
- package/dist/daemon/LICENSE +21 -0
- package/dist/daemon/dist/build-version.js +8 -0
- package/dist/daemon/dist/child-sdk.mjs +17 -0
- package/dist/daemon/dist/cli.js +169 -0
- package/dist/daemon/dist/client.js +909 -0
- package/dist/daemon/dist/consent.js +383 -0
- package/dist/daemon/dist/document.js +6 -0
- package/dist/daemon/dist/endpoint.js +91 -0
- package/dist/daemon/dist/engine/backends/backend-factory.js +16 -0
- package/dist/daemon/dist/engine/backends/backend-identity.js +38 -0
- package/dist/daemon/dist/engine/backends/backend-types.js +1 -0
- package/dist/daemon/dist/engine/backends/git/git-backend.js +746 -0
- package/dist/daemon/dist/engine/backends/git/git-config.js +118 -0
- package/dist/daemon/dist/engine/backends/git/git-runner.js +232 -0
- package/dist/daemon/dist/engine/backends/git/git-storage.js +252 -0
- package/dist/daemon/dist/engine/backends/s3/s3-backend.js +444 -0
- package/dist/daemon/dist/engine/backends/s3/s3-client.js +352 -0
- package/dist/daemon/dist/engine/backends/s3/s3-conditions.js +66 -0
- package/dist/daemon/dist/engine/backends/snapshot-pointer.js +22 -0
- package/dist/daemon/dist/engine/backends/sync-backend.js +23 -0
- package/dist/daemon/dist/engine/backends/webdav/webdav-backend.js +542 -0
- package/dist/daemon/dist/engine/backends/webdav/webdav-client.js +326 -0
- package/dist/daemon/dist/engine/backends/webdav/webdav-config.js +73 -0
- package/dist/daemon/dist/engine/commands/command-types.js +1 -0
- package/dist/daemon/dist/engine/host.js +16 -0
- package/dist/daemon/dist/engine/ignore/effective-ignore-policy.js +33 -0
- package/dist/daemon/dist/engine/ignore/ignore-edit.js +102 -0
- package/dist/daemon/dist/engine/ignore/ignore-initialization.js +252 -0
- package/dist/daemon/dist/engine/ignore/ignore-migration-prompt.js +139 -0
- package/dist/daemon/dist/engine/ignore/ignore-settings.js +393 -0
- package/dist/daemon/dist/engine/ignore/ignore-source.js +250 -0
- package/dist/daemon/dist/engine/paths.js +71 -0
- package/dist/daemon/dist/engine/settings/config-errors.js +4 -0
- package/dist/daemon/dist/engine/settings/config-file.js +736 -0
- package/dist/daemon/dist/engine/settings/config.js +344 -0
- package/dist/daemon/dist/engine/settings/settings-management.js +199 -0
- package/dist/daemon/dist/engine/settings/settings-store.js +41 -0
- package/dist/daemon/dist/engine/settings/settings-types.js +1 -0
- package/dist/daemon/dist/engine/settings/settings-validation.js +384 -0
- package/dist/daemon/dist/engine/snapshot/session-paths.js +165 -0
- package/dist/daemon/dist/engine/snapshot/snapshot-apply.js +348 -0
- package/dist/daemon/dist/engine/snapshot/snapshot-bounds.js +20 -0
- package/dist/daemon/dist/engine/snapshot/snapshot-case-replacement.js +82 -0
- package/dist/daemon/dist/engine/snapshot/snapshot-codec.js +61 -0
- package/dist/daemon/dist/engine/snapshot/snapshot-entry-projection.js +78 -0
- package/dist/daemon/dist/engine/snapshot/snapshot-exclude-safety.js +262 -0
- package/dist/daemon/dist/engine/snapshot/snapshot-mutation-queues.js +133 -0
- package/dist/daemon/dist/engine/snapshot/snapshot-paths.js +11 -0
- package/dist/daemon/dist/engine/snapshot/snapshot-payload.js +10 -0
- package/dist/daemon/dist/engine/snapshot/snapshot-reviewed-preimages.js +60 -0
- package/dist/daemon/dist/engine/snapshot/snapshot-root-transition.js +138 -0
- package/dist/daemon/dist/engine/snapshot/snapshot-transaction-directory.js +16 -0
- package/dist/daemon/dist/engine/snapshot/snapshot-transaction-images.js +387 -0
- package/dist/daemon/dist/engine/snapshot/snapshot-transaction-plan.js +68 -0
- package/dist/daemon/dist/engine/snapshot/snapshot-transaction-policy.js +296 -0
- package/dist/daemon/dist/engine/snapshot/snapshot-transaction-stage.js +303 -0
- package/dist/daemon/dist/engine/snapshot/snapshot-transaction-verification.js +78 -0
- package/dist/daemon/dist/engine/snapshot/snapshot-transaction.js +855 -0
- package/dist/daemon/dist/engine/snapshot/snapshot-types.js +9 -0
- package/dist/daemon/dist/engine/snapshot/snapshot.js +678 -0
- package/dist/daemon/dist/engine/state/json-file.js +49 -0
- package/dist/daemon/dist/engine/state/lock-policy.js +2 -0
- package/dist/daemon/dist/engine/state/lock.js +259 -0
- package/dist/daemon/dist/engine/state/lockfile-fs.js +13 -0
- package/dist/daemon/dist/engine/state/merge-baseline-store.js +198 -0
- package/dist/daemon/dist/engine/state/mutation-directory-sync.js +34 -0
- package/dist/daemon/dist/engine/state/operation-availability.js +40 -0
- package/dist/daemon/dist/engine/state/state-directory.js +227 -0
- package/dist/daemon/dist/engine/state/state-types.js +1 -0
- package/dist/daemon/dist/engine/state/sync-state-store.js +54 -0
- package/dist/daemon/dist/engine/sync/agent-candidate.js +207 -0
- package/dist/daemon/dist/engine/sync/agent-plan.js +85 -0
- package/dist/daemon/dist/engine/sync/agent-policy.js +10 -0
- package/dist/daemon/dist/engine/sync/agent-refusal-retry.js +39 -0
- package/dist/daemon/dist/engine/sync/agent-request.js +13 -0
- package/dist/daemon/dist/engine/sync/agent-runner.js +183 -0
- package/dist/daemon/dist/engine/sync/agent-store.js +177 -0
- package/dist/daemon/dist/engine/sync/agent-sync.js +139 -0
- package/dist/daemon/dist/engine/sync/apply-review.js +52 -0
- package/dist/daemon/dist/engine/sync/conflict-artifact-ownership.js +53 -0
- package/dist/daemon/dist/engine/sync/conflict-artifacts.js +158 -0
- package/dist/daemon/dist/engine/sync/conflict-groups.js +76 -0
- package/dist/daemon/dist/engine/sync/conflict-preview.js +53 -0
- package/dist/daemon/dist/engine/sync/conflict-resolution.js +53 -0
- package/dist/daemon/dist/engine/sync/conflict-retention.js +61 -0
- package/dist/daemon/dist/engine/sync/conflict-review.js +73 -0
- package/dist/daemon/dist/engine/sync/content-conflicts.js +70 -0
- package/dist/daemon/dist/engine/sync/continuous-errors.js +66 -0
- package/dist/daemon/dist/engine/sync/continuous-lease.js +206 -0
- package/dist/daemon/dist/engine/sync/continuous-record.js +199 -0
- package/dist/daemon/dist/engine/sync/continuous-storage.js +59 -0
- package/dist/daemon/dist/engine/sync/continuous-sync.js +538 -0
- package/dist/daemon/dist/engine/sync/continuous-watch.js +140 -0
- package/dist/daemon/dist/engine/sync/exclude-policy.js +86 -0
- package/dist/daemon/dist/engine/sync/field-migration.js +20 -0
- package/dist/daemon/dist/engine/sync/file-merge-planner.js +123 -0
- package/dist/daemon/dist/engine/sync/initialization.js +80 -0
- package/dist/daemon/dist/engine/sync/json-document.js +172 -0
- package/dist/daemon/dist/engine/sync/local-field-policy.js +26 -0
- package/dist/daemon/dist/engine/sync/local-fields.js +196 -0
- package/dist/daemon/dist/engine/sync/merge-acceptance.js +29 -0
- package/dist/daemon/dist/engine/sync/merge-apply.js +532 -0
- package/dist/daemon/dist/engine/sync/merge-journal.js +314 -0
- package/dist/daemon/dist/engine/sync/merge-transfer-error.js +64 -0
- package/dist/daemon/dist/engine/sync/merged-sync.js +666 -0
- package/dist/daemon/dist/engine/sync/mutation-owner.js +18 -0
- package/dist/daemon/dist/engine/sync/package-merge.js +82 -0
- package/dist/daemon/dist/engine/sync/partial-progress.js +41 -0
- package/dist/daemon/dist/engine/sync/remote-snapshot.js +119 -0
- package/dist/daemon/dist/engine/sync/resolver-stream.js +34 -0
- package/dist/daemon/dist/engine/sync/session-merge.js +178 -0
- package/dist/daemon/dist/engine/sync/session-push.js +47 -0
- package/dist/daemon/dist/engine/sync/settings-conflicts.js +56 -0
- package/dist/daemon/dist/engine/sync/settings-merge.js +93 -0
- package/dist/daemon/dist/engine/sync/signals.js +8 -0
- package/dist/daemon/dist/engine/sync/startup-timings.js +44 -0
- package/dist/daemon/dist/engine/sync/sync-decision.js +81 -0
- package/dist/daemon/dist/engine/sync/sync-error-guidance.js +55 -0
- package/dist/daemon/dist/engine/sync/sync-errors.js +18 -0
- package/dist/daemon/dist/engine/sync/sync-inspection.js +42 -0
- package/dist/daemon/dist/engine/sync/sync-loaders.js +8 -0
- package/dist/daemon/dist/engine/sync/sync-local.js +40 -0
- package/dist/daemon/dist/engine/sync/sync-mutations.js +754 -0
- package/dist/daemon/dist/engine/sync/sync-operations.js +3 -0
- package/dist/daemon/dist/engine/sync/sync-policy.js +646 -0
- package/dist/daemon/dist/engine/sync/sync-queries.js +212 -0
- package/dist/daemon/dist/engine/sync/sync-state.js +124 -0
- package/dist/daemon/dist/engine/sync/text-merge.js +124 -0
- package/dist/daemon/dist/engine/sync/transfer-freshness.js +82 -0
- package/dist/daemon/dist/engine/types.js +2 -0
- package/dist/daemon/dist/engine/ui/merge-review.js +7 -0
- package/dist/daemon/dist/engine/ui/merged-sync-summary.js +86 -0
- package/dist/daemon/dist/engine/ui/sync-format.js +165 -0
- package/dist/daemon/dist/engine/ui/sync-status.js +30 -0
- package/dist/daemon/dist/engine/ui/terminal-text.js +9 -0
- package/dist/daemon/dist/engine/ui/transfer-changes.js +24 -0
- package/dist/daemon/dist/engine/ui/transfer-review.js +19 -0
- package/dist/daemon/dist/engine-service.js +441 -0
- package/dist/daemon/dist/identity.js +241 -0
- package/dist/daemon/dist/idle-exit.js +77 -0
- package/dist/daemon/dist/index.js +4 -0
- package/dist/daemon/dist/lifecycle-log.js +53 -0
- package/dist/daemon/dist/lifecycle.js +21 -0
- package/dist/daemon/dist/model-signature.js +7 -0
- package/dist/daemon/dist/monitor.js +324 -0
- package/dist/daemon/dist/participant-admission.js +30 -0
- package/dist/daemon/dist/protocol.js +104 -0
- package/dist/daemon/dist/resolver-host.js +78 -0
- package/dist/daemon/dist/server.js +994 -0
- package/dist/daemon/dist/service-host.js +175 -0
- package/dist/daemon/dist/upgrade-repair.js +55 -0
- package/dist/daemon/package.json +3 -0
- package/dist/index.ts +40 -37
- package/dist/index.ts.map +4 -4
- package/dist/package.json +6 -0
- package/docs/daemon-migration.md +27 -16
- package/package.json +9 -3
- package/skills/configure-pi-sync/SKILL.md +24 -46
- package/skills/configure-pi-sync/references/configuration.md +62 -22
- package/src/commands/command-execution.ts +13 -9
- package/src/commands/command-types.ts +1 -0
- package/src/daemon/pi-client.ts +4 -2
- package/src/settings/config.ts +2 -0
- package/src/sync/automatic-sync.ts +9 -2
- package/src/sync/setup-switch.ts +38 -15
- package/src/sync/startup-check.ts +7 -4
- package/src/sync/sync-operations.ts +18 -10
- package/src/ui/excluded-paths-ui.ts +6 -3
- package/src/ui/file-selection.ts +7 -2
- package/src/ui/ignore-file-guidance.ts +7 -0
- package/src/ui/ignore-file-ui.ts +97 -0
- package/src/ui/ignore-migration-prompt.ts +65 -0
- package/src/ui/manager-state.ts +40 -14
- package/src/ui/manager-ui.ts +41 -19
- package/src/ui/remote-selection-ui.ts +88 -28
- package/src/ui/settings-review.ts +26 -0
- package/src/ui/settings-ui.ts +378 -224
- package/src/ui/setup/setup-actions.ts +16 -4
- package/src/ui/setup/setup-prompts.ts +55 -9
- package/src/ui/setup/setup-switcher.ts +24 -11
- package/src/ui/storage-connections-ui.ts +50 -20
- package/src/ui/sync-setups-ui.ts +65 -30
- package/dist/chunks/chunk-277VHM2P.ts.map +0 -7
- package/dist/chunks/chunk-2ZGV5KNC.ts.map +0 -7
- package/dist/chunks/chunk-4KTJLJSJ.ts.map +0 -7
- package/dist/chunks/chunk-E3YLRLJM.ts.map +0 -7
- package/dist/chunks/chunk-ECYCNZOE.ts +0 -12
- package/dist/chunks/chunk-ECYCNZOE.ts.map +0 -7
- package/dist/chunks/chunk-JVFCVPPD.ts.map +0 -7
- package/dist/chunks/chunk-PJMM75W5.ts.map +0 -7
- package/dist/chunks/command-handler-K4XJOGYC.ts.map +0 -7
- package/dist/chunks/file-selection-MGGVOKM7.ts.map +0 -7
- package/dist/chunks/manager-result-dispatcher-4VJVDEUD.ts +0 -19
- package/dist/chunks/manager-ui-KYQ5AZJS.ts.map +0 -7
- package/dist/chunks/remote-selection-ui-W3KOZM3W.ts +0 -18
- package/dist/chunks/sync-operations-BVWYYKH3.ts.map +0 -7
- /package/dist/chunks/{chunk-ZIL6PW5L.ts.map → chunk-6YKOHBSC.ts.map} +0 -0
- /package/dist/chunks/{chunk-OA4NZLSL.ts.map → chunk-APZVJAEW.ts.map} +0 -0
- /package/dist/chunks/{chunk-4SR3ZYHA.ts.map → chunk-GELYN4UC.ts.map} +0 -0
- /package/dist/chunks/{chunk-YQSFJLJ3.ts.map → chunk-IBXEM35O.ts.map} +0 -0
- /package/dist/chunks/{chunk-2JHAN3ZO.ts.map → chunk-JREGWM2B.ts.map} +0 -0
- /package/dist/chunks/{chunk-EMRFVLZM.ts.map → chunk-NXWHPVXR.ts.map} +0 -0
- /package/dist/chunks/{chunk-SMVKMYLK.ts.map → chunk-P4GI7LTT.ts.map} +0 -0
- /package/dist/chunks/{chunk-ZVGRZD4C.ts.map → chunk-R3SAMXB6.ts.map} +0 -0
- /package/dist/chunks/{chunk-RNIEVDTR.ts.map → chunk-T3LABNHF.ts.map} +0 -0
- /package/dist/chunks/{chunk-S3R3W3KF.ts.map → chunk-UMPA5S7X.ts.map} +0 -0
- /package/dist/chunks/{chunk-S7F4FOAS.ts.map → chunk-VQ47JBLF.ts.map} +0 -0
- /package/dist/chunks/{chunk-WP2M67XZ.ts.map → chunk-WBIOSK76.ts.map} +0 -0
- /package/dist/chunks/{chunk-HEB6YT64.ts.map → chunk-ZO52JM4H.ts.map} +0 -0
- /package/dist/chunks/{conflict-review-IGKY2TOJ.ts.map → conflict-review-PCDFRIVB.ts.map} +0 -0
- /package/dist/chunks/{continuous-record-3XDXDOMV.ts.map → continuous-record-3SKJ6I3V.ts.map} +0 -0
- /package/dist/chunks/{continuous-storage-HLKCHF6Z.ts.map → continuous-storage-3EU6I7Z3.ts.map} +0 -0
- /package/dist/chunks/{manager-result-dispatcher-4VJVDEUD.ts.map → manager-result-dispatcher-GDB74IOP.ts.map} +0 -0
- /package/dist/chunks/{remote-selection-ui-W3KOZM3W.ts.map → remote-selection-ui-GPITNEBF.ts.map} +0 -0
- /package/dist/chunks/{setup-switch-D6K6PBPC.ts.map → setup-switch-L54X5U5I.ts.map} +0 -0
- /package/dist/chunks/{snapshot-5HY3M2NL.ts.map → snapshot-ZUJJZCFW.ts.map} +0 -0
- /package/dist/chunks/{snapshot-transaction-directory-OU2D7R7A.ts.map → snapshot-transaction-directory-F46JWRAU.ts.map} +0 -0
- /package/dist/chunks/{state-directory-XXHU73Z3.ts.map → state-directory-CMAIF34J.ts.map} +0 -0
- /package/dist/chunks/{sync-inspection-J3CRBORL.ts.map → sync-inspection-H2WX5SUT.ts.map} +0 -0
- /package/dist/chunks/{sync-state-2LMIXJ2C.ts.map → sync-state-QIT64TKV.ts.map} +0 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
+
import { randomUUID } from "node:crypto";
|
|
3
|
+
import fs from "node:fs/promises";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import lockfile from "proper-lockfile";
|
|
6
|
+
import { readConsent } from "./consent.js";
|
|
7
|
+
import { configureEngineHost } from "./engine/host.js";
|
|
8
|
+
import { canonicalRootGuard, processExists } from "./identity.js";
|
|
9
|
+
import { withCleanup } from "./lifecycle.js";
|
|
10
|
+
const scope = new AsyncLocalStorage();
|
|
11
|
+
/** One service process owns one root; tests must use a separate process per root. */
|
|
12
|
+
export function installServiceHost(root, ignoreFileOperationsAvailable) {
|
|
13
|
+
let poisoned = false;
|
|
14
|
+
const assertRoot = canonicalRootGuard(root);
|
|
15
|
+
function current() {
|
|
16
|
+
const value = scope.getStore();
|
|
17
|
+
if (!value)
|
|
18
|
+
throw new Error("Engine access requires a daemon job.");
|
|
19
|
+
return value;
|
|
20
|
+
}
|
|
21
|
+
function protectedTarget(target, execution) {
|
|
22
|
+
const normalized = path.resolve(target);
|
|
23
|
+
if (execution.liveClients().some((peer) => peer.sessionFile && path.resolve(peer.sessionFile) === normalized))
|
|
24
|
+
throw new Error("A live client's session is protected, including after orderly exit.");
|
|
25
|
+
}
|
|
26
|
+
async function reserve(targets, action) {
|
|
27
|
+
const owner = current();
|
|
28
|
+
assertRoot();
|
|
29
|
+
if (poisoned)
|
|
30
|
+
throw new Error("Daemon ownership cleanup is uncertain; stop and reconcile before retrying.");
|
|
31
|
+
const missing = [...new Set(targets)].filter((target) => !owner.held.has(target)).sort();
|
|
32
|
+
if (!missing.length)
|
|
33
|
+
return action();
|
|
34
|
+
if (!owner.peers)
|
|
35
|
+
return owner.execution.withParticipants((peers) => scope.run({ ...owner, peers }, () => reserve(targets, action)));
|
|
36
|
+
owner.execution.validate();
|
|
37
|
+
for (const target of missing)
|
|
38
|
+
protectedTarget(target, owner.execution);
|
|
39
|
+
const peers = owner.peers.toSorted((a, b) => a.id.localeCompare(b.id));
|
|
40
|
+
const requested = [];
|
|
41
|
+
return withCleanup(async () => {
|
|
42
|
+
for (const peer of peers) {
|
|
43
|
+
owner.execution.validate();
|
|
44
|
+
const reservation = randomUUID();
|
|
45
|
+
requested.push({ client: peer.id, reservation });
|
|
46
|
+
await owner.execution.request("queue-acquire", { reservation, targets: missing, generation: peer.generation, background: !owner.execution.clientId }, peer.id);
|
|
47
|
+
owner.execution.validate();
|
|
48
|
+
}
|
|
49
|
+
for (const target of missing)
|
|
50
|
+
protectedTarget(target, owner.execution);
|
|
51
|
+
return await scope.run({ ...owner, held: new Set([...owner.held, ...missing]) }, action);
|
|
52
|
+
}, async () => {
|
|
53
|
+
// Release by request identity even when a grant response was lost. A cancelled
|
|
54
|
+
// prompt is not evidence that a granted remote writer stopped.
|
|
55
|
+
const results = await Promise.allSettled(requested.map(({ client, reservation }) => {
|
|
56
|
+
const peer = peers.find((peer) => peer.id === client);
|
|
57
|
+
return peer && !processExists(peer.pid)
|
|
58
|
+
? Promise.resolve(true)
|
|
59
|
+
: owner.execution.request("queue-release", { reservation }, client);
|
|
60
|
+
}));
|
|
61
|
+
const failure = results.find((result) => result.status === "rejected");
|
|
62
|
+
if (failure?.status === "rejected") {
|
|
63
|
+
poisoned = true;
|
|
64
|
+
throw new Error("File-queue release is uncertain; stop the daemon and keep grants quarantined until owner exit.", { cause: failure.reason });
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
configureEngineHost({
|
|
69
|
+
ignoreFileOperationsAvailable,
|
|
70
|
+
allowConfigMigration: () => Boolean(readConsent(root)),
|
|
71
|
+
root: () => {
|
|
72
|
+
assertRoot();
|
|
73
|
+
if (poisoned)
|
|
74
|
+
throw new Error("Daemon ownership cleanup is uncertain; stop and reconcile before restarting.");
|
|
75
|
+
return root;
|
|
76
|
+
},
|
|
77
|
+
reserveTargets: reserve,
|
|
78
|
+
mutate: async (target, action) => reserve([target], async () => {
|
|
79
|
+
const owner = current();
|
|
80
|
+
protectedTarget(target, owner.execution);
|
|
81
|
+
const { withFileMutationQueue } = await import("@earendil-works/pi-coding-agent");
|
|
82
|
+
owner.execution.validate();
|
|
83
|
+
return withFileMutationQueue(target, async () => {
|
|
84
|
+
const settings = path.resolve(target) === path.join(root, "settings.json");
|
|
85
|
+
let release;
|
|
86
|
+
if (settings) {
|
|
87
|
+
// Pi's absent-file branch does not reread after locking. Do not race it.
|
|
88
|
+
const info = await fs.lstat(target).catch((error) => {
|
|
89
|
+
if (error.code === "ENOENT")
|
|
90
|
+
return undefined;
|
|
91
|
+
throw error;
|
|
92
|
+
});
|
|
93
|
+
if (!info && owner.execution.liveClients().length)
|
|
94
|
+
throw new Error("Cannot create settings.json while a Pi client is alive; create it through Pi first.");
|
|
95
|
+
if (info?.isSymbolicLink())
|
|
96
|
+
throw new Error("Refusing an aliased settings file.");
|
|
97
|
+
release = await lockfile.lock(target, { realpath: false });
|
|
98
|
+
}
|
|
99
|
+
return withCleanup(async () => {
|
|
100
|
+
owner.execution.validate();
|
|
101
|
+
protectedTarget(target, owner.execution);
|
|
102
|
+
return action();
|
|
103
|
+
}, async () => {
|
|
104
|
+
try {
|
|
105
|
+
await release?.();
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
poisoned = true;
|
|
109
|
+
throw error;
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
}),
|
|
114
|
+
review: async (_ctx, request, signal, isCurrent) => {
|
|
115
|
+
if (!isCurrent() || signal?.aborted)
|
|
116
|
+
return false;
|
|
117
|
+
const result = await current().execution.request("merge-review", request, undefined, signal);
|
|
118
|
+
return result === true && isCurrent() && !signal?.aborted;
|
|
119
|
+
},
|
|
120
|
+
status: (_ctx, value, presentation) => current().execution.emit("status", { value, presentation }),
|
|
121
|
+
});
|
|
122
|
+
return {
|
|
123
|
+
run(execution, action) {
|
|
124
|
+
return scope.run({ execution, held: new Set() }, action);
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
export function createServiceContext(execution) {
|
|
129
|
+
const initial = execution.facts();
|
|
130
|
+
if (!initial)
|
|
131
|
+
throw new Error("This operation needs an attached client.");
|
|
132
|
+
const facts = () => execution.facts() ?? initial;
|
|
133
|
+
const ask = async (kind, payload, signal) => {
|
|
134
|
+
execution.validate();
|
|
135
|
+
return execution.request(kind, payload, undefined, signal);
|
|
136
|
+
};
|
|
137
|
+
return {
|
|
138
|
+
cwd: initial.cwd,
|
|
139
|
+
mode: initial.mode,
|
|
140
|
+
get hasUI() {
|
|
141
|
+
return facts().hasUI;
|
|
142
|
+
},
|
|
143
|
+
// Resolver initialization replaces these only for explicitly model-capable jobs.
|
|
144
|
+
modelRegistry: {
|
|
145
|
+
streamSimple: () => {
|
|
146
|
+
throw new Error("The standalone resolver is unavailable.");
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
sessionManager: {
|
|
150
|
+
getSessionFile: () => facts().sessionFile,
|
|
151
|
+
getSessionId: () => facts().sessionId ?? "",
|
|
152
|
+
getCwd: () => facts().cwd,
|
|
153
|
+
getSessionDir: () => facts().sessionDir ?? path.join(execution.root, "sessions"),
|
|
154
|
+
usesDefaultSessionDir: () => facts().sessionDir === undefined,
|
|
155
|
+
},
|
|
156
|
+
get protectedSessionFiles() {
|
|
157
|
+
return execution.liveClients().flatMap((peer) => (peer.sessionFile ? [peer.sessionFile] : []));
|
|
158
|
+
},
|
|
159
|
+
isIdle: () => execution.participants().every((peer) => peer.idle),
|
|
160
|
+
reload: async () => {
|
|
161
|
+
await ask("reload", {});
|
|
162
|
+
},
|
|
163
|
+
ui: {
|
|
164
|
+
notify: (message, level = "info") => execution.emit("notify", { message, level }),
|
|
165
|
+
setStatus: (_key, value) => execution.emit("status", { value }),
|
|
166
|
+
confirm: async (title, message, options) => (await ask("confirm", { title, message }, options?.signal)) === true,
|
|
167
|
+
select: async (title, items, options) => {
|
|
168
|
+
const result = await ask("select", { title, items, helpText: options?.helpText }, options?.signal);
|
|
169
|
+
if (typeof result !== "string" || !items.includes(result))
|
|
170
|
+
return undefined;
|
|
171
|
+
return result;
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import fs from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import lockfile from "proper-lockfile";
|
|
4
|
+
import { acquireStartupLock } from "./client.js";
|
|
5
|
+
import { revokeRetainedGrants } from "./consent.js";
|
|
6
|
+
import { withStateDirectoryGuardForRoot } from "./engine/state/state-directory.js";
|
|
7
|
+
import { canonicalRootGuard, privateDirectory, processExited, readIdentity, readUpgradeOwner, runtimePaths, upgradeArchivePath, upgradeFile, } from "./identity.js";
|
|
8
|
+
/** Explicit repair never launches or sends requests to a daemon. */
|
|
9
|
+
export async function repairUpgrade(root) {
|
|
10
|
+
const paths = await runtimePaths(root);
|
|
11
|
+
const assertRoot = canonicalRootGuard(paths.root);
|
|
12
|
+
await privateDirectory(paths.directory);
|
|
13
|
+
const releaseStartup = await acquireStartupLock(paths);
|
|
14
|
+
try {
|
|
15
|
+
const pending = await readUpgradeOwner(paths);
|
|
16
|
+
if (!pending)
|
|
17
|
+
return { repaired: false };
|
|
18
|
+
// Exclude direct `serve`. Use a distinct lock key so proper-lockfile can track both locks.
|
|
19
|
+
const releaseOwner = await lockfile.lock(paths.owner, {
|
|
20
|
+
realpath: false,
|
|
21
|
+
lockfilePath: paths.owner,
|
|
22
|
+
stale: 30_000,
|
|
23
|
+
update: 5_000,
|
|
24
|
+
});
|
|
25
|
+
try {
|
|
26
|
+
const identity = await readIdentity(paths);
|
|
27
|
+
if (identity && (identity.instance !== pending.instance || identity.pid !== pending.pid))
|
|
28
|
+
throw new Error("The recorded upgrade owner changed; private state was retained.");
|
|
29
|
+
if (!(await processExited(pending)))
|
|
30
|
+
throw new Error("Cannot verify that the old Pi Sync daemon has exited; private state was retained.");
|
|
31
|
+
assertRoot();
|
|
32
|
+
// The archive also marks a repair in progress before consent or recovery records change.
|
|
33
|
+
const archive = upgradeArchivePath(paths, pending);
|
|
34
|
+
await privateDirectory(archive);
|
|
35
|
+
const revokedGrants = await withStateDirectoryGuardForRoot(paths.root, () => {
|
|
36
|
+
assertRoot();
|
|
37
|
+
return revokeRetainedGrants(paths.root);
|
|
38
|
+
});
|
|
39
|
+
assertRoot();
|
|
40
|
+
// Keep the original bytes private. Move the barrier last so interrupted repair can be retried.
|
|
41
|
+
if (identity)
|
|
42
|
+
await fs.rename(paths.identity, path.join(archive, path.basename(paths.identity)));
|
|
43
|
+
assertRoot();
|
|
44
|
+
const barrier = upgradeFile(paths);
|
|
45
|
+
await fs.rename(barrier, path.join(archive, path.basename(barrier)));
|
|
46
|
+
return { repaired: true, revokedGrants, archive };
|
|
47
|
+
}
|
|
48
|
+
finally {
|
|
49
|
+
await releaseOwner();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
finally {
|
|
53
|
+
await releaseStartup();
|
|
54
|
+
}
|
|
55
|
+
}
|
package/dist/index.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
// @generated by scripts/build-runtime.mjs; do not edit.
|
|
2
2
|
// @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
|
|
3
|
+
import {
|
|
4
|
+
startupTransferEnabled
|
|
5
|
+
} from "./chunks/chunk-WFBHWYI6.ts";
|
|
3
6
|
import {
|
|
4
7
|
createSyncAttentionController,
|
|
5
8
|
readStateForConfig,
|
|
6
9
|
syncStateFingerprint
|
|
7
|
-
} from "./chunks/chunk-
|
|
10
|
+
} from "./chunks/chunk-VQ47JBLF.ts";
|
|
8
11
|
import {
|
|
9
12
|
completeSyncArguments,
|
|
10
13
|
setSyncSetupCompletions,
|
|
@@ -12,25 +15,26 @@ import {
|
|
|
12
15
|
} from "./chunks/chunk-HLCML3OW.ts";
|
|
13
16
|
import {
|
|
14
17
|
withStateDirectoryAccess
|
|
15
|
-
} from "./chunks/chunk-
|
|
18
|
+
} from "./chunks/chunk-T3LABNHF.ts";
|
|
16
19
|
import {
|
|
17
20
|
snapshotOptionsForContext
|
|
18
|
-
} from "./chunks/chunk-
|
|
21
|
+
} from "./chunks/chunk-P4GI7LTT.ts";
|
|
19
22
|
import {
|
|
20
23
|
bindPiDaemonClient,
|
|
21
24
|
installPiDaemonHost,
|
|
22
25
|
piDaemonClient,
|
|
23
26
|
withPiDaemonClient
|
|
24
|
-
} from "./chunks/chunk-
|
|
27
|
+
} from "./chunks/chunk-UGS6RYDZ.ts";
|
|
25
28
|
import {
|
|
26
29
|
combineSignals,
|
|
27
30
|
throwIfAborted
|
|
28
|
-
} from "./chunks/chunk-
|
|
29
|
-
import "./chunks/chunk-
|
|
31
|
+
} from "./chunks/chunk-UMPA5S7X.ts";
|
|
32
|
+
import "./chunks/chunk-ZO52JM4H.ts";
|
|
30
33
|
import {
|
|
34
|
+
configFromSettings,
|
|
31
35
|
loadConfigForCheck,
|
|
32
36
|
syncCheckConfigFingerprint
|
|
33
|
-
} from "./chunks/chunk-
|
|
37
|
+
} from "./chunks/chunk-27F5W7DX.ts";
|
|
34
38
|
import {
|
|
35
39
|
configureSyncStatus,
|
|
36
40
|
createSyncStatusPublisher,
|
|
@@ -38,28 +42,19 @@ import {
|
|
|
38
42
|
} from "./chunks/chunk-H7VOTY5N.ts";
|
|
39
43
|
import {
|
|
40
44
|
errorMessage
|
|
41
|
-
} from "./chunks/chunk-
|
|
42
|
-
import
|
|
45
|
+
} from "./chunks/chunk-6YKOHBSC.ts";
|
|
46
|
+
import {
|
|
47
|
+
syncSessionsSelected
|
|
48
|
+
} from "./chunks/chunk-R3SAMXB6.ts";
|
|
43
49
|
import {
|
|
44
50
|
safeTerminalText
|
|
45
51
|
} from "./chunks/chunk-2JNFEZ3V.ts";
|
|
46
52
|
|
|
47
|
-
// src/sync/agent-policy.ts
|
|
48
|
-
import {
|
|
49
|
-
AGENT_INPUT_BYTES,
|
|
50
|
-
AGENT_MAX_ATTEMPTS,
|
|
51
|
-
AGENT_MAX_TOKENS,
|
|
52
|
-
AGENT_MAX_UNITS,
|
|
53
|
-
AGENT_OUTPUT_BYTES,
|
|
54
|
-
AGENT_TIMEOUT_MS,
|
|
55
|
-
startupTransferEnabled
|
|
56
|
-
} from "@narumitw/pi-sync-daemon/engine/sync/agent-policy";
|
|
57
|
-
|
|
58
53
|
// src/settings/config-errors.ts
|
|
59
|
-
import { isMissingConfigError } from "
|
|
54
|
+
import { isMissingConfigError } from "#pi-sync-daemon/engine/settings/config-errors";
|
|
60
55
|
|
|
61
56
|
// src/sync/startup-timings.ts
|
|
62
|
-
import { createStartupTimings } from "
|
|
57
|
+
import { createStartupTimings } from "#pi-sync-daemon/engine/sync/startup-timings";
|
|
63
58
|
|
|
64
59
|
// src/sync/automatic-sync.ts
|
|
65
60
|
async function startSession(ctx, signal, publish) {
|
|
@@ -74,9 +69,9 @@ async function startSession(ctx, signal, publish) {
|
|
|
74
69
|
const document = await timings.measure("settings read", () => client.readSettings());
|
|
75
70
|
throwIfAborted(signal);
|
|
76
71
|
configureSyncStatus(ctx, document?.parsed.showStatus ?? true);
|
|
77
|
-
const { stateDirectoryMigrationNotice } = await import("./chunks/state-directory-
|
|
72
|
+
const { stateDirectoryMigrationNotice } = await import("./chunks/state-directory-CMAIF34J.ts");
|
|
78
73
|
const notice = stateDirectoryMigrationNotice();
|
|
79
|
-
const { pendingTransactionEntries } = await import("./chunks/snapshot-transaction-directory-
|
|
74
|
+
const { pendingTransactionEntries } = await import("./chunks/snapshot-transaction-directory-F46JWRAU.ts");
|
|
80
75
|
const recoveryNeeded = (await pendingTransactionEntries()).some((entry) => entry.isDirectory());
|
|
81
76
|
throwIfAborted(signal);
|
|
82
77
|
if (!await client.configured() && !recoveryNeeded) {
|
|
@@ -106,11 +101,16 @@ async function startSession(ctx, signal, publish) {
|
|
|
106
101
|
async function autoPushSessions(ctx, signal, _loaders) {
|
|
107
102
|
try {
|
|
108
103
|
const client = piDaemonClient(ctx);
|
|
109
|
-
|
|
104
|
+
const eligible = (config2) => config2.automatic && syncSessionsSelected(config2);
|
|
105
|
+
if (!await client.configured((settings) => eligible(configFromSettings(settings)))) return;
|
|
106
|
+
throwIfAborted(signal);
|
|
107
|
+
const config = await loadConfigForCheck(void 0, signal);
|
|
110
108
|
throwIfAborted(signal);
|
|
109
|
+
if (!eligible(config)) return;
|
|
110
|
+
const automaticFingerprint = syncCheckConfigFingerprint(config);
|
|
111
111
|
await client.run(
|
|
112
112
|
"shutdown",
|
|
113
|
-
{ args: [], yes: true, force: false, stale: false, silent: true, reload: false },
|
|
113
|
+
{ args: [], yes: true, force: false, stale: false, silent: true, reload: false, automaticFingerprint },
|
|
114
114
|
signal
|
|
115
115
|
);
|
|
116
116
|
} catch (error) {
|
|
@@ -165,7 +165,7 @@ function createStartupCheck(loaders, attention, timeoutMs = 3e4, publish) {
|
|
|
165
165
|
task.promise = Promise.resolve().then(async () => {
|
|
166
166
|
try {
|
|
167
167
|
throwIfAborted(signal);
|
|
168
|
-
config = initialConfig ?? await loadConfigForCheck();
|
|
168
|
+
config = initialConfig ?? await loadConfigForCheck(void 0, signal);
|
|
169
169
|
task.transfer = startupTransferEnabled(config);
|
|
170
170
|
throwIfAborted(signal);
|
|
171
171
|
if (!config.automatic && !startupTransferEnabled(config)) return;
|
|
@@ -175,7 +175,7 @@ function createStartupCheck(loaders, attention, timeoutMs = 3e4, publish) {
|
|
|
175
175
|
setSyncStatus(ctx, "sync ...", { activity: "checking" });
|
|
176
176
|
const { inspectSync } = await timings.measure("inspection import", () => loaders.inspection());
|
|
177
177
|
throwIfAborted(signal);
|
|
178
|
-
const currentConfig = await loadConfigForCheck();
|
|
178
|
+
const currentConfig = await loadConfigForCheck(void 0, signal);
|
|
179
179
|
throwIfAborted(signal);
|
|
180
180
|
if (syncCheckConfigFingerprint(currentConfig) !== identity) return;
|
|
181
181
|
const inspection = await timings.measure(
|
|
@@ -183,7 +183,7 @@ function createStartupCheck(loaders, attention, timeoutMs = 3e4, publish) {
|
|
|
183
183
|
() => inspectSync(captured, snapshotOptionsForContext(ctx, captured), signal, void 0, timings)
|
|
184
184
|
);
|
|
185
185
|
throwIfAborted(signal);
|
|
186
|
-
const latest = await loadConfigForCheck();
|
|
186
|
+
const latest = await loadConfigForCheck(void 0, signal);
|
|
187
187
|
throwIfAborted(signal);
|
|
188
188
|
if (syncCheckConfigFingerprint(latest) !== identity) return;
|
|
189
189
|
const state = await withStateDirectoryAccess(() => readStateForConfig(latest));
|
|
@@ -199,7 +199,9 @@ function createStartupCheck(loaders, attention, timeoutMs = 3e4, publish) {
|
|
|
199
199
|
if (startupTransferEnabled(captured) && !inspection.firstSync && inspection.head && inspection.selectionState?.kind === "same") {
|
|
200
200
|
const operations = await timings.measure("operations import", () => loaders.operations());
|
|
201
201
|
throwIfAborted(signal);
|
|
202
|
-
|
|
202
|
+
const transferConfig = await loadConfigForCheck(void 0, signal);
|
|
203
|
+
throwIfAborted(signal);
|
|
204
|
+
if (!isCurrent() || syncCheckConfigFingerprint(transferConfig) !== identity) return;
|
|
203
205
|
if (!ctx.isIdle()) {
|
|
204
206
|
pending = { ctx, signal: sessionSignal, config: captured };
|
|
205
207
|
return;
|
|
@@ -214,6 +216,7 @@ function createStartupCheck(loaders, attention, timeoutMs = 3e4, publish) {
|
|
|
214
216
|
silent: true,
|
|
215
217
|
reload: false,
|
|
216
218
|
auto: true,
|
|
219
|
+
automaticFingerprint: identity,
|
|
217
220
|
signal,
|
|
218
221
|
startupTimings: timings,
|
|
219
222
|
onCommit: () => attention.clearObservation()
|
|
@@ -289,12 +292,12 @@ function createStartupCheck(loaders, attention, timeoutMs = 3e4, publish) {
|
|
|
289
292
|
// src/sync/sync-loaders.ts
|
|
290
293
|
function createSyncLoaders(dependencies) {
|
|
291
294
|
const loaders = {
|
|
292
|
-
commands: cachedModuleLoader(dependencies.loadCommandHandler ?? (() => import("./chunks/command-handler-
|
|
293
|
-
inspection: cachedModuleLoader(dependencies.loadSyncInspection ?? (() => import("./chunks/sync-inspection-
|
|
294
|
-
setupSwitch: cachedModuleLoader(dependencies.loadSetupSwitch ?? (() => import("./chunks/setup-switch-
|
|
295
|
-
snapshot: cachedModuleLoader(dependencies.loadSnapshot ?? (() => import("./chunks/snapshot-
|
|
296
|
-
syncState: cachedModuleLoader(dependencies.loadSyncState ?? (() => import("./chunks/sync-state-
|
|
297
|
-
operations: cachedModuleLoader(dependencies.loadSyncOperations ?? (() => import("./chunks/sync-operations-
|
|
295
|
+
commands: cachedModuleLoader(dependencies.loadCommandHandler ?? (() => import("./chunks/command-handler-VINMQ7ZM.ts"))),
|
|
296
|
+
inspection: cachedModuleLoader(dependencies.loadSyncInspection ?? (() => import("./chunks/sync-inspection-H2WX5SUT.ts"))),
|
|
297
|
+
setupSwitch: cachedModuleLoader(dependencies.loadSetupSwitch ?? (() => import("./chunks/setup-switch-L54X5U5I.ts"))),
|
|
298
|
+
snapshot: cachedModuleLoader(dependencies.loadSnapshot ?? (() => import("./chunks/snapshot-ZUJJZCFW.ts"))),
|
|
299
|
+
syncState: cachedModuleLoader(dependencies.loadSyncState ?? (() => import("./chunks/sync-state-QIT64TKV.ts"))),
|
|
300
|
+
operations: cachedModuleLoader(dependencies.loadSyncOperations ?? (() => import("./chunks/sync-operations-2MZAYHL2.ts")))
|
|
298
301
|
};
|
|
299
302
|
return loaders;
|
|
300
303
|
}
|
|
@@ -388,7 +391,7 @@ function sync(pi, dependencies = {}) {
|
|
|
388
391
|
return;
|
|
389
392
|
}
|
|
390
393
|
if (command === "unlock" || command === "migrate-state") {
|
|
391
|
-
const { stateDirectoryMigrationNotice } = await import("./chunks/state-directory-
|
|
394
|
+
const { stateDirectoryMigrationNotice } = await import("./chunks/state-directory-CMAIF34J.ts");
|
|
392
395
|
if (signal.aborted || owner !== client) return;
|
|
393
396
|
stateDirectoryMigrationNotice();
|
|
394
397
|
}
|