@narumitw/pi-sync 0.60.1 → 0.60.2
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 +12 -0
- package/README.md +5 -5
- package/dist/chunks/{chunk-7AC2RX4M.ts → chunk-277VHM2P.ts} +2 -2
- package/dist/chunks/chunk-277VHM2P.ts.map +7 -0
- package/dist/chunks/{chunk-4RNCZZY7.ts → chunk-3YXBG7BQ.ts} +14 -10
- package/dist/chunks/{chunk-4RNCZZY7.ts.map → chunk-3YXBG7BQ.ts.map} +2 -2
- package/dist/chunks/{chunk-UBE6XWOM.ts → chunk-6W2SNZ5P.ts} +2 -2
- package/dist/chunks/chunk-6W2SNZ5P.ts.map +7 -0
- package/dist/chunks/{chunk-UZUUUY7C.ts → chunk-B53FS4RW.ts} +4 -4
- package/dist/chunks/{chunk-6LHIRS5R.ts → chunk-E7UJHMNW.ts} +5 -5
- package/dist/chunks/chunk-E7UJHMNW.ts.map +7 -0
- package/dist/chunks/{chunk-JZKCOM62.ts → chunk-EMRFVLZM.ts} +2 -2
- package/dist/chunks/chunk-EMRFVLZM.ts.map +7 -0
- package/dist/chunks/{chunk-BWWTOQOW.ts → chunk-FOMZEZER.ts} +100 -53
- package/dist/chunks/chunk-FOMZEZER.ts.map +7 -0
- package/dist/chunks/{chunk-NPT2G4FU.ts → chunk-HEB6YT64.ts} +2 -2
- package/dist/chunks/chunk-HEB6YT64.ts.map +7 -0
- package/dist/chunks/{chunk-J5COV5TY.ts → chunk-HLCML3OW.ts} +2 -2
- package/dist/chunks/{chunk-J5COV5TY.ts.map → chunk-HLCML3OW.ts.map} +1 -1
- package/dist/chunks/{chunk-ZMNVNECV.ts → chunk-KPWZNMKM.ts} +2 -2
- package/dist/chunks/chunk-KPWZNMKM.ts.map +7 -0
- package/dist/chunks/{chunk-YWEYRRQI.ts → chunk-LAXTCSX4.ts} +11 -11
- package/dist/chunks/chunk-LAXTCSX4.ts.map +7 -0
- package/dist/chunks/{chunk-BGGKHHO4.ts → chunk-MCUZFUHY.ts} +7 -7
- package/dist/chunks/{chunk-M7RHV3H6.ts → chunk-OA4NZLSL.ts} +2 -2
- package/dist/chunks/chunk-OA4NZLSL.ts.map +7 -0
- package/dist/chunks/{chunk-CEMFCWIU.ts → chunk-RNIEVDTR.ts} +2 -2
- package/dist/chunks/chunk-RNIEVDTR.ts.map +7 -0
- package/dist/chunks/{chunk-PDBTD2K6.ts → chunk-S3R3W3KF.ts} +2 -2
- package/dist/chunks/chunk-S3R3W3KF.ts.map +7 -0
- package/dist/chunks/{chunk-CZNBKIM5.ts → chunk-SMVKMYLK.ts} +2 -2
- package/dist/chunks/chunk-SMVKMYLK.ts.map +7 -0
- package/dist/chunks/{chunk-JKBUYCPC.ts → chunk-V4AMI3VL.ts} +2 -2
- package/dist/chunks/chunk-V4AMI3VL.ts.map +7 -0
- package/dist/chunks/{chunk-VZCWYXRS.ts → chunk-WP2M67XZ.ts} +2 -2
- package/dist/chunks/chunk-WP2M67XZ.ts.map +7 -0
- package/dist/chunks/{chunk-HNKLBM3U.ts → chunk-ZIL6PW5L.ts} +2 -2
- package/dist/chunks/chunk-ZIL6PW5L.ts.map +7 -0
- package/dist/chunks/{command-handler-FO4XBBHF.ts → command-handler-RTBEFZUX.ts} +19 -19
- package/dist/chunks/{command-handler-FO4XBBHF.ts.map → command-handler-RTBEFZUX.ts.map} +2 -2
- package/dist/chunks/{conflict-review-XBSME2ER.ts → conflict-review-YXROU42F.ts} +4 -4
- package/dist/chunks/{continuous-record-ZHUXVO4E.ts → continuous-record-3XDXDOMV.ts} +2 -2
- package/dist/chunks/continuous-record-3XDXDOMV.ts.map +7 -0
- package/dist/chunks/{continuous-storage-SQBAXACF.ts → continuous-storage-HLKCHF6Z.ts} +2 -2
- package/dist/chunks/continuous-storage-HLKCHF6Z.ts.map +7 -0
- package/dist/chunks/{file-selection-S6CNNNQI.ts → file-selection-DD6X4J2K.ts} +6 -6
- package/dist/chunks/manager-result-dispatcher-4PEUHK7F.ts +18 -0
- package/dist/chunks/{manager-ui-AY5ZU6B4.ts → manager-ui-TNAMQNEU.ts} +25 -25
- package/dist/chunks/manager-ui-TNAMQNEU.ts.map +7 -0
- package/dist/chunks/{remote-selection-ui-GZHPDQ4L.ts → remote-selection-ui-47H7V62F.ts} +8 -8
- package/dist/chunks/{setup-switch-M3BAFGJM.ts → setup-switch-SPZE7HIQ.ts} +8 -8
- package/dist/chunks/{setup-wizard-NFAWP4KF.ts → setup-wizard-5JYKAEIT.ts} +11 -11
- package/dist/chunks/{snapshot-D4SFDP5J.ts → snapshot-5HY3M2NL.ts} +2 -2
- package/dist/chunks/snapshot-5HY3M2NL.ts.map +7 -0
- package/dist/chunks/{snapshot-transaction-directory-TNKBQ3UQ.ts → snapshot-transaction-directory-OU2D7R7A.ts} +2 -2
- package/dist/chunks/snapshot-transaction-directory-OU2D7R7A.ts.map +7 -0
- package/dist/chunks/{state-directory-JZSZVVPX.ts → state-directory-XXHU73Z3.ts} +2 -2
- package/dist/chunks/{sync-inspection-BJ4KPPNO.ts → sync-inspection-5GQEB62G.ts} +5 -5
- package/dist/chunks/sync-inspection-5GQEB62G.ts.map +7 -0
- package/dist/chunks/{sync-operations-TLWER2TT.ts → sync-operations-65HDA67O.ts} +5 -5
- package/dist/chunks/{sync-operations-TLWER2TT.ts.map → sync-operations-65HDA67O.ts.map} +2 -2
- package/dist/chunks/{sync-state-FVCJJ7MY.ts → sync-state-2LMIXJ2C.ts} +2 -2
- package/dist/chunks/sync-state-2LMIXJ2C.ts.map +7 -0
- package/dist/index.ts +22 -22
- package/dist/index.ts.map +1 -1
- package/docs/daemon-migration.md +10 -6
- package/package.json +2 -2
- package/skills/configure-pi-sync/references/configuration.md +8 -4
- package/src/backends/backend-factory.ts +2 -2
- package/src/backends/backend-identity.ts +2 -2
- package/src/backends/backend-types.ts +1 -1
- package/src/backends/git/git-backend.ts +2 -2
- package/src/backends/git/git-config.ts +2 -2
- package/src/backends/git/git-runner.ts +2 -2
- package/src/backends/git/git-storage.ts +2 -2
- package/src/backends/s3/s3-backend.ts +2 -2
- package/src/backends/s3/s3-client.ts +6 -2
- package/src/backends/s3/s3-conditions.ts +2 -2
- package/src/backends/snapshot-pointer.ts +2 -2
- package/src/backends/sync-backend.ts +2 -2
- package/src/backends/webdav/webdav-backend.ts +2 -2
- package/src/backends/webdav/webdav-client.ts +2 -2
- package/src/backends/webdav/webdav-config.ts +2 -2
- package/src/commands/command-execution.ts +1 -1
- package/src/commands/command.ts +1 -1
- package/src/daemon/apply-gate.ts +1 -1
- package/src/daemon/pi-client.ts +105 -54
- package/src/daemon/recovery.ts +1 -1
- package/src/paths.ts +2 -2
- package/src/settings/config-errors.ts +2 -2
- package/src/settings/config-file.ts +2 -2
- package/src/settings/config.ts +2 -2
- package/src/settings/settings-management.ts +2 -2
- package/src/settings/settings-store.ts +2 -2
- package/src/settings/settings-types.ts +1 -1
- package/src/settings/settings-validation.ts +2 -2
- package/src/snapshot/session-paths.ts +2 -2
- package/src/snapshot/snapshot-apply.ts +2 -2
- package/src/snapshot/snapshot-case-replacement.ts +2 -2
- package/src/snapshot/snapshot-codec.ts +2 -2
- package/src/snapshot/snapshot-exclude-safety.ts +2 -2
- package/src/snapshot/snapshot-mutation-queues.ts +2 -2
- package/src/snapshot/snapshot-paths.ts +2 -2
- package/src/snapshot/snapshot-root-transition.ts +2 -2
- package/src/snapshot/snapshot-transaction-directory.ts +2 -2
- package/src/snapshot/snapshot-transaction-plan.ts +2 -2
- package/src/snapshot/snapshot-transaction.ts +2 -2
- package/src/snapshot/snapshot-types.ts +1 -1
- package/src/snapshot/snapshot.ts +2 -2
- package/src/state/json-file.ts +2 -2
- package/src/state/lock-policy.ts +2 -2
- package/src/state/lock.ts +2 -2
- package/src/state/lockfile-fs.ts +2 -2
- package/src/state/merge-baseline-store.ts +2 -2
- package/src/state/mutation-directory-sync.ts +2 -2
- package/src/state/operation-availability.ts +2 -2
- package/src/state/state-directory.ts +2 -2
- package/src/state/state-types.ts +1 -1
- package/src/state/sync-state-store.ts +2 -2
- package/src/sync/agent-candidate.ts +2 -2
- package/src/sync/agent-plan.ts +2 -2
- package/src/sync/agent-policy.ts +2 -2
- package/src/sync/agent-refusal-retry.ts +2 -2
- package/src/sync/agent-request.ts +2 -2
- package/src/sync/agent-runner.ts +2 -2
- package/src/sync/agent-store.ts +2 -2
- package/src/sync/agent-sync.ts +2 -2
- package/src/sync/apply-review.ts +2 -2
- package/src/sync/conflict-artifact-ownership.ts +2 -2
- package/src/sync/conflict-artifacts.ts +2 -2
- package/src/sync/conflict-groups.ts +2 -2
- package/src/sync/conflict-preview.ts +2 -2
- package/src/sync/conflict-resolution.ts +2 -2
- package/src/sync/conflict-retention.ts +2 -2
- package/src/sync/content-conflicts.ts +2 -2
- package/src/sync/continuous-errors.ts +2 -2
- package/src/sync/continuous-lease.ts +2 -2
- package/src/sync/continuous-record.ts +2 -2
- package/src/sync/continuous-storage.ts +2 -2
- package/src/sync/continuous-sync.ts +2 -2
- package/src/sync/continuous-watch.ts +2 -2
- package/src/sync/exclude-policy.ts +2 -2
- package/src/sync/field-migration.ts +2 -2
- package/src/sync/file-merge-planner.ts +6 -2
- package/src/sync/json-document.ts +2 -2
- package/src/sync/local-field-policy.ts +2 -2
- package/src/sync/local-fields.ts +2 -2
- package/src/sync/merge-apply.ts +2 -2
- package/src/sync/merge-journal.ts +2 -2
- package/src/sync/merge-transfer-error.ts +2 -2
- package/src/sync/merged-sync.ts +2 -2
- package/src/sync/mutation-owner.ts +2 -2
- package/src/sync/package-merge.ts +2 -2
- package/src/sync/partial-progress.ts +2 -2
- package/src/sync/remote-snapshot.ts +2 -2
- package/src/sync/session-merge.ts +2 -2
- package/src/sync/settings-conflicts.ts +2 -2
- package/src/sync/settings-merge.ts +2 -2
- package/src/sync/signals.ts +2 -2
- package/src/sync/startup-timings.ts +2 -2
- package/src/sync/sync-decision.ts +2 -2
- package/src/sync/sync-error-guidance.ts +2 -2
- package/src/sync/sync-errors.ts +2 -2
- package/src/sync/sync-inspection.ts +2 -2
- package/src/sync/sync-local.ts +6 -2
- package/src/sync/sync-mutations.ts +2 -2
- package/src/sync/sync-operations.ts +1 -1
- package/src/sync/sync-policy.ts +2 -2
- package/src/sync/sync-queries.ts +2 -2
- package/src/sync/sync-state.ts +2 -2
- package/src/sync/text-merge.ts +2 -2
- package/dist/chunks/chunk-6LHIRS5R.ts.map +0 -7
- package/dist/chunks/chunk-7AC2RX4M.ts.map +0 -7
- package/dist/chunks/chunk-BWWTOQOW.ts.map +0 -7
- package/dist/chunks/chunk-CEMFCWIU.ts.map +0 -7
- package/dist/chunks/chunk-CZNBKIM5.ts.map +0 -7
- package/dist/chunks/chunk-HNKLBM3U.ts.map +0 -7
- package/dist/chunks/chunk-JKBUYCPC.ts.map +0 -7
- package/dist/chunks/chunk-JZKCOM62.ts.map +0 -7
- package/dist/chunks/chunk-M7RHV3H6.ts.map +0 -7
- package/dist/chunks/chunk-NPT2G4FU.ts.map +0 -7
- package/dist/chunks/chunk-PDBTD2K6.ts.map +0 -7
- package/dist/chunks/chunk-UBE6XWOM.ts.map +0 -7
- package/dist/chunks/chunk-VZCWYXRS.ts.map +0 -7
- package/dist/chunks/chunk-YWEYRRQI.ts.map +0 -7
- package/dist/chunks/chunk-ZMNVNECV.ts.map +0 -7
- package/dist/chunks/continuous-record-ZHUXVO4E.ts.map +0 -7
- package/dist/chunks/continuous-storage-SQBAXACF.ts.map +0 -7
- package/dist/chunks/manager-result-dispatcher-I2AMCCE7.ts +0 -18
- package/dist/chunks/manager-ui-AY5ZU6B4.ts.map +0 -7
- package/dist/chunks/snapshot-D4SFDP5J.ts.map +0 -7
- package/dist/chunks/snapshot-transaction-directory-TNKBQ3UQ.ts.map +0 -7
- package/dist/chunks/sync-inspection-BJ4KPPNO.ts.map +0 -7
- package/dist/chunks/sync-state-FVCJJ7MY.ts.map +0 -7
- /package/dist/chunks/{chunk-UZUUUY7C.ts.map → chunk-B53FS4RW.ts.map} +0 -0
- /package/dist/chunks/{chunk-BGGKHHO4.ts.map → chunk-MCUZFUHY.ts.map} +0 -0
- /package/dist/chunks/{conflict-review-XBSME2ER.ts.map → conflict-review-YXROU42F.ts.map} +0 -0
- /package/dist/chunks/{file-selection-S6CNNNQI.ts.map → file-selection-DD6X4J2K.ts.map} +0 -0
- /package/dist/chunks/{manager-result-dispatcher-I2AMCCE7.ts.map → manager-result-dispatcher-4PEUHK7F.ts.map} +0 -0
- /package/dist/chunks/{remote-selection-ui-GZHPDQ4L.ts.map → remote-selection-ui-47H7V62F.ts.map} +0 -0
- /package/dist/chunks/{setup-switch-M3BAFGJM.ts.map → setup-switch-SPZE7HIQ.ts.map} +0 -0
- /package/dist/chunks/{setup-wizard-NFAWP4KF.ts.map → setup-wizard-5JYKAEIT.ts.map} +0 -0
- /package/dist/chunks/{state-directory-JZSZVVPX.ts.map → state-directory-XXHU73Z3.ts.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/backends/s3/s3-backend";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/backends/s3/s3-backend";
|
|
2
2
|
export {
|
|
3
3
|
encodeKey,
|
|
4
4
|
historyKey,
|
|
@@ -8,4 +8,4 @@ export {
|
|
|
8
8
|
s3BackendIdentity,
|
|
9
9
|
snapshotKey,
|
|
10
10
|
storageRoot,
|
|
11
|
-
} from "@narumitw/sync-daemon/engine/backends/s3/s3-backend";
|
|
11
|
+
} from "@narumitw/pi-sync-daemon/engine/backends/s3/s3-backend";
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/backends/s3/s3-client";
|
|
2
|
-
export {
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/backends/s3/s3-client";
|
|
2
|
+
export {
|
|
3
|
+
S3Client,
|
|
4
|
+
S3HttpError,
|
|
5
|
+
S3ObjectAlreadyExistsError,
|
|
6
|
+
} from "@narumitw/pi-sync-daemon/engine/backends/s3/s3-client";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/backends/s3/s3-conditions";
|
|
2
|
-
export { requireS3Etag, verifyS3Conditions } from "@narumitw/sync-daemon/engine/backends/s3/s3-conditions";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/backends/s3/s3-conditions";
|
|
2
|
+
export { requireS3Etag, verifyS3Conditions } from "@narumitw/pi-sync-daemon/engine/backends/s3/s3-conditions";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/backends/snapshot-pointer";
|
|
2
|
-
export { createLatestPointer, remoteHistoryEntry } from "@narumitw/sync-daemon/engine/backends/snapshot-pointer";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/backends/snapshot-pointer";
|
|
2
|
+
export { createLatestPointer, remoteHistoryEntry } from "@narumitw/pi-sync-daemon/engine/backends/snapshot-pointer";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/backends/sync-backend";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/backends/sync-backend";
|
|
2
2
|
export {
|
|
3
3
|
expectedRemoteHead,
|
|
4
4
|
SyncBackendConflictError,
|
|
5
5
|
SyncBackendPublicationOutcomeUnknownError,
|
|
6
|
-
} from "@narumitw/sync-daemon/engine/backends/sync-backend";
|
|
6
|
+
} from "@narumitw/pi-sync-daemon/engine/backends/sync-backend";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/backends/webdav/webdav-backend";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/backends/webdav/webdav-backend";
|
|
2
2
|
export {
|
|
3
3
|
historyPath,
|
|
4
4
|
latestPath,
|
|
@@ -7,4 +7,4 @@ export {
|
|
|
7
7
|
snapshotsPath,
|
|
8
8
|
WebDavSyncBackend,
|
|
9
9
|
webDavBackendIdentity,
|
|
10
|
-
} from "@narumitw/sync-daemon/engine/backends/webdav/webdav-backend";
|
|
10
|
+
} from "@narumitw/pi-sync-daemon/engine/backends/webdav/webdav-backend";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/backends/webdav/webdav-client";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/backends/webdav/webdav-client";
|
|
2
2
|
export {
|
|
3
3
|
WebDavClient,
|
|
4
4
|
WebDavHttpError,
|
|
5
5
|
WebDavPreconditionError,
|
|
6
|
-
} from "@narumitw/sync-daemon/engine/backends/webdav/webdav-client";
|
|
6
|
+
} from "@narumitw/pi-sync-daemon/engine/backends/webdav/webdav-client";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/backends/webdav/webdav-config";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/backends/webdav/webdav-config";
|
|
2
2
|
export {
|
|
3
3
|
normalizeWebDavIdentityUrl,
|
|
4
4
|
normalizeWebDavPath,
|
|
5
5
|
normalizeWebDavUrl,
|
|
6
6
|
validateWebDavCredentials,
|
|
7
7
|
validateWebDavNamespace,
|
|
8
|
-
} from "@narumitw/sync-daemon/engine/backends/webdav/webdav-config";
|
|
8
|
+
} from "@narumitw/pi-sync-daemon/engine/backends/webdav/webdav-config";
|
|
@@ -106,7 +106,7 @@ export async function executeCommand(
|
|
|
106
106
|
} else if (action === "status") {
|
|
107
107
|
const connection = await client.connect();
|
|
108
108
|
ctx.ui.notify(
|
|
109
|
-
`sync-daemon: connected\nPID: ${connection.identity.pid}\nInstance: ${connection.identity.instance}\nUse sync-daemon status/stop/restart --root <agent-directory> for explicit lifecycle control.`,
|
|
109
|
+
`pi-sync-daemon: connected\nPID: ${connection.identity.pid}\nInstance: ${connection.identity.instance}\nUse pi-sync-daemon status/stop/restart --root <agent-directory> for explicit lifecycle control.`,
|
|
110
110
|
"info",
|
|
111
111
|
);
|
|
112
112
|
} else throw new Error("Use /sync daemon status|handover|allow-after-exit|revoke-after-exit.");
|
package/src/commands/command.ts
CHANGED
|
@@ -258,7 +258,7 @@ export function usage() {
|
|
|
258
258
|
`Automatic sync: ${AUTOMATIC_SYNC_DESCRIPTION}`,
|
|
259
259
|
`Startup transfer: ${STARTUP_TRANSFER_DESCRIPTION}`,
|
|
260
260
|
"Automatic transfer at startup is a separate opt-in: one conflict-free established-baseline transfer at idle in TUI/RPC, with conditional/lease publication and no resource reload.",
|
|
261
|
-
"Continuous sync is a separate default-Off opt-in in Settings. It requires Autonomous sync and can incur recurring network/model costs.
|
|
261
|
+
"Continuous sync is a separate default-Off opt-in in Settings. It requires Autonomous sync and can incur recurring network/model costs. After the last Pi exits, the service closes after a 30-second grace period unless a valid /sync daemon allow-after-exit grant applies. Zero-client work still requires that separate review. Safety blocks and durable automatic request limits remain.",
|
|
262
262
|
"Settings: use /sync init or edit storage connections and sync setups in ~/.pi/agent/pi-sync.json (or the configured Pi agent directory). Version 1 and version 2 settings are unsupported and are never rewritten.",
|
|
263
263
|
].join("\n");
|
|
264
264
|
}
|
package/src/daemon/apply-gate.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { withFileMutationQueue } from "@earendil-works/pi-coding-agent";
|
|
4
|
-
import { withTargetQueues } from "@narumitw/sync-daemon/engine/snapshot/snapshot-mutation-queues";
|
|
4
|
+
import { withTargetQueues } from "@narumitw/pi-sync-daemon/engine/snapshot/snapshot-mutation-queues";
|
|
5
5
|
|
|
6
6
|
interface Gate {
|
|
7
7
|
token: string;
|
package/src/daemon/pi-client.ts
CHANGED
|
@@ -16,11 +16,15 @@ import {
|
|
|
16
16
|
findDaemon,
|
|
17
17
|
MAX_SETTINGS_BYTES,
|
|
18
18
|
modelSignature,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
import { type
|
|
22
|
-
import {
|
|
23
|
-
|
|
19
|
+
waitForDaemonExit,
|
|
20
|
+
} from "@narumitw/pi-sync-daemon";
|
|
21
|
+
import { type ConfigAuthority, configureEngineHost } from "@narumitw/pi-sync-daemon/engine/host";
|
|
22
|
+
import {
|
|
23
|
+
type LocalConfigDocument,
|
|
24
|
+
peekLocalConfigDocument,
|
|
25
|
+
} from "@narumitw/pi-sync-daemon/engine/settings/config-file";
|
|
26
|
+
import { validateSettingsDocument } from "@narumitw/pi-sync-daemon/engine/settings/settings-validation";
|
|
27
|
+
import { sessionDirFromContext } from "@narumitw/pi-sync-daemon/engine/snapshot/session-paths";
|
|
24
28
|
import type { CommandOptions } from "../commands/command-types.js";
|
|
25
29
|
import type { StartupTimingPublisher } from "../sync/startup-timings.js";
|
|
26
30
|
import { SyncDecisionRequiredError } from "../sync/sync-errors.js";
|
|
@@ -122,7 +126,7 @@ export function installPiDaemonHost() {
|
|
|
122
126
|
root: () => scope.getStore()?.root ?? path.resolve(getAgentDir()),
|
|
123
127
|
config: authority,
|
|
124
128
|
mutate: async () => {
|
|
125
|
-
throw new Error("File mutation belongs to sync-daemon; no in-process fallback is permitted.");
|
|
129
|
+
throw new Error("File mutation belongs to pi-sync-daemon; no in-process fallback is permitted.");
|
|
126
130
|
},
|
|
127
131
|
review: async () => {
|
|
128
132
|
throw new Error("Engine reviews must arrive through the daemon API.");
|
|
@@ -216,8 +220,13 @@ export class PiDaemonClient {
|
|
|
216
220
|
private readonly busy = new Set<string>();
|
|
217
221
|
private initialized = false;
|
|
218
222
|
private startupDebug = false;
|
|
219
|
-
|
|
220
|
-
|
|
223
|
+
private participantIdentity = { id: randomUUID(), generation: randomUUID() };
|
|
224
|
+
get id() {
|
|
225
|
+
return this.participantIdentity.id;
|
|
226
|
+
}
|
|
227
|
+
get generation() {
|
|
228
|
+
return this.participantIdentity.generation;
|
|
229
|
+
}
|
|
221
230
|
readonly root: string;
|
|
222
231
|
private readonly rawRoot: string;
|
|
223
232
|
private readonly gate: PiApplyGate;
|
|
@@ -302,7 +311,15 @@ export class PiDaemonClient {
|
|
|
302
311
|
this.validate();
|
|
303
312
|
const address = await findDaemon(this.root);
|
|
304
313
|
this.validate();
|
|
305
|
-
if (address)
|
|
314
|
+
if (address) {
|
|
315
|
+
try {
|
|
316
|
+
await this.connect(address);
|
|
317
|
+
} catch (error) {
|
|
318
|
+
this.validate();
|
|
319
|
+
if (error instanceof DaemonError && error.remote.name === "DaemonStoppingError") return false;
|
|
320
|
+
throw error;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
306
323
|
this.validate();
|
|
307
324
|
return Boolean(address);
|
|
308
325
|
}
|
|
@@ -311,58 +328,92 @@ export class PiDaemonClient {
|
|
|
311
328
|
if (this.connection) {
|
|
312
329
|
await recoverDetachedClients({ paths: this.connection.paths, identity: this.connection.identity });
|
|
313
330
|
this.validate();
|
|
314
|
-
await this.connection.attach();
|
|
331
|
+
await this.connection.attach(this.signal);
|
|
315
332
|
this.validate();
|
|
316
333
|
}
|
|
317
334
|
}
|
|
318
|
-
async connect(existing?: Awaited<ReturnType<typeof ensureDaemon
|
|
319
|
-
this.
|
|
335
|
+
async connect(existing?: Awaited<ReturnType<typeof ensureDaemon>>, requestSignal?: AbortSignal) {
|
|
336
|
+
const startupSignal = requestSignal ? AbortSignal.any([this.signal, requestSignal]) : this.signal;
|
|
337
|
+
const validateStartup = () => {
|
|
338
|
+
this.validate();
|
|
339
|
+
startupSignal.throwIfAborted();
|
|
340
|
+
};
|
|
341
|
+
validateStartup();
|
|
320
342
|
if (this.connection) return this.connection;
|
|
321
343
|
this.connecting ??= (async () => {
|
|
344
|
+
if (this.partialConnection) {
|
|
345
|
+
// A failed unpublished attempt may already be retired or own queue grants.
|
|
346
|
+
// Confirm drain before replacing its identity; failed cleanup must block retry.
|
|
347
|
+
await this.partialConnection.dispose();
|
|
348
|
+
// Finish acknowledged cleanup even if this new startup was cancelled meanwhile.
|
|
349
|
+
await this.gate.releaseAfterDrain();
|
|
350
|
+
validateStartup();
|
|
351
|
+
this.partialConnection = undefined;
|
|
352
|
+
this.participantIdentity = { id: randomUUID(), generation: randomUUID() };
|
|
353
|
+
}
|
|
322
354
|
// Only explicit setup/command paths or a configured interactive session call connect.
|
|
323
355
|
if (!existing) await fs.mkdir(this.root, { recursive: true, mode: 0o700 });
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
356
|
+
validateStartup();
|
|
357
|
+
let retried = false;
|
|
358
|
+
for (;;) {
|
|
359
|
+
validateStartup();
|
|
360
|
+
const daemon = existing ?? (await ensureDaemon(this.root, startupSignal));
|
|
361
|
+
validateStartup();
|
|
362
|
+
if (daemon.paths.root !== this.root) throw new Error("Daemon root changed before attach.");
|
|
363
|
+
const connection = new DaemonConnection(daemon.paths, daemon.identity, this.facts(), {
|
|
364
|
+
callback: (callback, signal) => this.callback(callback, signal),
|
|
365
|
+
event: (event) => {
|
|
366
|
+
if (event.kind === "commit") return;
|
|
367
|
+
if (this.signal.aborted || this.disposed || this.closing || clients.get(this.manager) !== this) return;
|
|
368
|
+
const payload = event.payload as {
|
|
369
|
+
message?: string;
|
|
370
|
+
level?: "info" | "warning" | "error";
|
|
371
|
+
value?: string;
|
|
372
|
+
presentation?: SyncStatusPresentation;
|
|
373
|
+
};
|
|
374
|
+
if (event.kind === "notify" && typeof payload?.message === "string")
|
|
375
|
+
this.uiContext.ui.notify(safeTerminalText(payload.message), payload.level ?? "info");
|
|
376
|
+
if (event.kind === "timings" && typeof (event.payload as { report?: unknown })?.report === "string") {
|
|
377
|
+
this.publish?.(this.ctx, safeTerminalText((event.payload as { report: string }).report));
|
|
378
|
+
}
|
|
379
|
+
if (event.kind === "status")
|
|
380
|
+
setSyncStatus(
|
|
381
|
+
this.uiContext,
|
|
382
|
+
typeof payload?.value === "string" ? safeTerminalText(payload.value) : undefined,
|
|
383
|
+
payload.presentation,
|
|
384
|
+
);
|
|
385
|
+
},
|
|
386
|
+
error: () => {
|
|
387
|
+
if (!this.signal.aborted && !this.disposed && !this.closing && clients.get(this.manager) === this)
|
|
388
|
+
setSyncStatus(this.ctx, "sync service unavailable", { activity: "blocked", reason: "repair" });
|
|
389
|
+
},
|
|
390
|
+
});
|
|
391
|
+
this.partialConnection = connection;
|
|
392
|
+
try {
|
|
393
|
+
await connection.attach(startupSignal);
|
|
394
|
+
} catch (error) {
|
|
395
|
+
if (!(error instanceof DaemonError) || error.remote.name !== "DaemonStoppingError") throw error;
|
|
396
|
+
// The final idle fence rejected publication, so this connection owns no queue grants.
|
|
397
|
+
await connection.dispose().catch(() => {});
|
|
398
|
+
this.partialConnection = undefined;
|
|
399
|
+
validateStartup();
|
|
400
|
+
if (existing || retried) throw error;
|
|
401
|
+
retried = true;
|
|
402
|
+
await waitForDaemonExit(daemon.identity, startupSignal);
|
|
403
|
+
validateStartup();
|
|
404
|
+
continue;
|
|
405
|
+
}
|
|
406
|
+
this.validate();
|
|
407
|
+
await recoverDetachedClients(daemon);
|
|
408
|
+
if (this.signal.aborted || this.disposed || this.closing) {
|
|
409
|
+
await connection.dispose();
|
|
410
|
+
this.validate();
|
|
411
|
+
}
|
|
362
412
|
this.validate();
|
|
413
|
+
this.connection = connection;
|
|
414
|
+
this.partialConnection = undefined;
|
|
415
|
+
return connection;
|
|
363
416
|
}
|
|
364
|
-
this.connection = connection;
|
|
365
|
-
return connection;
|
|
366
417
|
})().catch((error) => {
|
|
367
418
|
this.connecting = undefined;
|
|
368
419
|
throw error;
|
|
@@ -400,10 +451,10 @@ export class PiDaemonClient {
|
|
|
400
451
|
signal?.throwIfAborted();
|
|
401
452
|
if (this.paused && operation !== "shutdown")
|
|
402
453
|
throw new Error("Synchronization is paused for a session change; if it was cancelled, use /reload to reattach.");
|
|
403
|
-
const connection = await this.connect();
|
|
454
|
+
const connection = await this.connect(undefined, signal);
|
|
404
455
|
if (this.paused && operation === "shutdown") {
|
|
405
456
|
Object.assign(connection.facts, { ...this.facts(), idle: false, ready: false });
|
|
406
|
-
await connection.attach();
|
|
457
|
+
await connection.attach(signal ? AbortSignal.any([signal, this.signal]) : this.signal);
|
|
407
458
|
this.validate();
|
|
408
459
|
}
|
|
409
460
|
this.validate();
|
package/src/daemon/recovery.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ClientFacts, DaemonConnection, findDaemon, type Identity } from "@narumitw/sync-daemon";
|
|
1
|
+
import { type ClientFacts, DaemonConnection, findDaemon, type Identity } from "@narumitw/pi-sync-daemon";
|
|
2
2
|
import type { PiApplyGate } from "./apply-gate.js";
|
|
3
3
|
|
|
4
4
|
type Address = { paths: DaemonConnection["paths"]; identity: Identity };
|
package/src/paths.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/paths";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/paths";
|
|
2
2
|
export {
|
|
3
3
|
assertWithinRoot,
|
|
4
4
|
encodeKey,
|
|
@@ -9,4 +9,4 @@ export {
|
|
|
9
9
|
safeJoin,
|
|
10
10
|
safeName,
|
|
11
11
|
toPosix,
|
|
12
|
-
} from "@narumitw/sync-daemon/engine/paths";
|
|
12
|
+
} from "@narumitw/pi-sync-daemon/engine/paths";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/settings/config-errors";
|
|
2
|
-
export { isMissingConfigError } from "@narumitw/sync-daemon/engine/settings/config-errors";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/settings/config-errors";
|
|
2
|
+
export { isMissingConfigError } from "@narumitw/pi-sync-daemon/engine/settings/config-errors";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/settings/config-file";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/settings/config-file";
|
|
2
2
|
export {
|
|
3
3
|
activeLocalConfigPath,
|
|
4
4
|
consumeLocalConfigMigrationNotice,
|
|
@@ -16,4 +16,4 @@ export {
|
|
|
16
16
|
withConfigReplacementInstalledHookForTest,
|
|
17
17
|
withLocalConfigFileLock,
|
|
18
18
|
withMissingConfigReadProbeHookForTest,
|
|
19
|
-
} from "@narumitw/sync-daemon/engine/settings/config-file";
|
|
19
|
+
} from "@narumitw/pi-sync-daemon/engine/settings/config-file";
|
package/src/settings/config.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/settings/config";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/settings/config";
|
|
2
2
|
export {
|
|
3
3
|
configFromSettings,
|
|
4
4
|
isEnabled,
|
|
@@ -13,4 +13,4 @@ export {
|
|
|
13
13
|
syncSessionsWarnings,
|
|
14
14
|
syncSetupReviewIdentity,
|
|
15
15
|
syncSetupStorageReview,
|
|
16
|
-
} from "@narumitw/sync-daemon/engine/settings/config";
|
|
16
|
+
} from "@narumitw/pi-sync-daemon/engine/settings/config";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/settings/settings-management";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/settings/settings-management";
|
|
2
2
|
export {
|
|
3
3
|
addStorageConnection,
|
|
4
4
|
addSyncSetup,
|
|
@@ -8,4 +8,4 @@ export {
|
|
|
8
8
|
saveNewV3Settings,
|
|
9
9
|
updateStorageConnection,
|
|
10
10
|
updateSyncSetup,
|
|
11
|
-
} from "@narumitw/sync-daemon/engine/settings/settings-management";
|
|
11
|
+
} from "@narumitw/pi-sync-daemon/engine/settings/settings-management";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/settings/settings-store";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/settings/settings-store";
|
|
2
2
|
export {
|
|
3
3
|
configuredSyncSetupNames,
|
|
4
4
|
loadOnSwitch,
|
|
@@ -7,4 +7,4 @@ export {
|
|
|
7
7
|
readLocalConfigObject,
|
|
8
8
|
requireSettings,
|
|
9
9
|
updateLocalConfig,
|
|
10
|
-
} from "@narumitw/sync-daemon/engine/settings/settings-store";
|
|
10
|
+
} from "@narumitw/pi-sync-daemon/engine/settings/settings-store";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/settings/settings-types";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/settings/settings-types";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/settings/settings-validation";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/settings/settings-validation";
|
|
2
2
|
export {
|
|
3
3
|
DEFAULT_ON_SWITCH,
|
|
4
4
|
effectiveSyncSetupRemoteIdentity,
|
|
@@ -14,4 +14,4 @@ export {
|
|
|
14
14
|
validateConfigName,
|
|
15
15
|
validateSettingsDocument,
|
|
16
16
|
validateUniqueRemoteSyncSetups,
|
|
17
|
-
} from "@narumitw/sync-daemon/engine/settings/settings-validation";
|
|
17
|
+
} from "@narumitw/pi-sync-daemon/engine/settings/settings-validation";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/snapshot/session-paths";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/snapshot/session-paths";
|
|
2
2
|
export {
|
|
3
3
|
agentDir,
|
|
4
4
|
configuredSessionDir,
|
|
@@ -8,4 +8,4 @@ export {
|
|
|
8
8
|
sessionDirForApply,
|
|
9
9
|
sessionDirFromContext,
|
|
10
10
|
snapshotOptionsForContext,
|
|
11
|
-
} from "@narumitw/sync-daemon/engine/snapshot/session-paths";
|
|
11
|
+
} from "@narumitw/pi-sync-daemon/engine/snapshot/session-paths";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/snapshot/snapshot-apply";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/snapshot/snapshot-apply";
|
|
2
2
|
export {
|
|
3
3
|
addTopLevelCaseVariantDeletes,
|
|
4
4
|
appliedFileHashMap,
|
|
@@ -6,4 +6,4 @@ export {
|
|
|
6
6
|
preflightSnapshotApply,
|
|
7
7
|
preflightSnapshotMutations,
|
|
8
8
|
protectSnapshotApplyPlan,
|
|
9
|
-
} from "@narumitw/sync-daemon/engine/snapshot/snapshot-apply";
|
|
9
|
+
} from "@narumitw/pi-sync-daemon/engine/snapshot/snapshot-apply";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/snapshot/snapshot-case-replacement";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/snapshot/snapshot-case-replacement";
|
|
2
2
|
export {
|
|
3
3
|
caseReplacementSpelling,
|
|
4
4
|
coalesceCaseReplacements,
|
|
5
5
|
isCaseReplacement,
|
|
6
|
-
} from "@narumitw/sync-daemon/engine/snapshot/snapshot-case-replacement";
|
|
6
|
+
} from "@narumitw/pi-sync-daemon/engine/snapshot/snapshot-case-replacement";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/snapshot/snapshot-codec";
|
|
2
|
-
export { decodeSnapshot, encodeSnapshot } from "@narumitw/sync-daemon/engine/snapshot/snapshot-codec";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/snapshot/snapshot-codec";
|
|
2
|
+
export { decodeSnapshot, encodeSnapshot } from "@narumitw/pi-sync-daemon/engine/snapshot/snapshot-codec";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/snapshot/snapshot-exclude-safety";
|
|
2
|
-
export { assertUnexcludedTargets } from "@narumitw/sync-daemon/engine/snapshot/snapshot-exclude-safety";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/snapshot/snapshot-exclude-safety";
|
|
2
|
+
export { assertUnexcludedTargets } from "@narumitw/pi-sync-daemon/engine/snapshot/snapshot-exclude-safety";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/snapshot/snapshot-mutation-queues";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/snapshot/snapshot-mutation-queues";
|
|
2
2
|
export {
|
|
3
3
|
assertCanonicalMutationTargets,
|
|
4
4
|
withMissingTargetQueues,
|
|
5
5
|
withTargetQueues,
|
|
6
|
-
} from "@narumitw/sync-daemon/engine/snapshot/snapshot-mutation-queues";
|
|
6
|
+
} from "@narumitw/pi-sync-daemon/engine/snapshot/snapshot-mutation-queues";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/snapshot/snapshot-paths";
|
|
2
|
-
export { sessionStorageRoot } from "@narumitw/sync-daemon/engine/snapshot/snapshot-paths";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/snapshot/snapshot-paths";
|
|
2
|
+
export { sessionStorageRoot } from "@narumitw/pi-sync-daemon/engine/snapshot/snapshot-paths";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/snapshot/snapshot-root-transition";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/snapshot/snapshot-root-transition";
|
|
2
2
|
export {
|
|
3
3
|
prepareSessionRootTransition,
|
|
4
4
|
resolveTransitionSessionRoot,
|
|
5
5
|
validateSessionRootTransition,
|
|
6
|
-
} from "@narumitw/sync-daemon/engine/snapshot/snapshot-root-transition";
|
|
6
|
+
} from "@narumitw/pi-sync-daemon/engine/snapshot/snapshot-root-transition";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/snapshot/snapshot-transaction-directory";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/snapshot/snapshot-transaction-directory";
|
|
2
2
|
export {
|
|
3
3
|
pendingTransactionEntries,
|
|
4
4
|
transactionRoot,
|
|
5
|
-
} from "@narumitw/sync-daemon/engine/snapshot/snapshot-transaction-directory";
|
|
5
|
+
} from "@narumitw/pi-sync-daemon/engine/snapshot/snapshot-transaction-directory";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/snapshot/snapshot-transaction-plan";
|
|
2
|
-
export { fileImage, indexTransactionPlan } from "@narumitw/sync-daemon/engine/snapshot/snapshot-transaction-plan";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/snapshot/snapshot-transaction-plan";
|
|
2
|
+
export { fileImage, indexTransactionPlan } from "@narumitw/pi-sync-daemon/engine/snapshot/snapshot-transaction-plan";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/snapshot/snapshot-transaction";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/snapshot/snapshot-transaction";
|
|
2
2
|
export {
|
|
3
3
|
applySnapshotTransaction,
|
|
4
4
|
recoverPendingSnapshotTransactions,
|
|
5
5
|
recoverSnapshotTransactionsOnStartup,
|
|
6
|
-
} from "@narumitw/sync-daemon/engine/snapshot/snapshot-transaction";
|
|
6
|
+
} from "@narumitw/pi-sync-daemon/engine/snapshot/snapshot-transaction";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/snapshot/snapshot-types";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/snapshot/snapshot-types";
|
package/src/snapshot/snapshot.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/snapshot/snapshot";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/snapshot/snapshot";
|
|
2
2
|
export {
|
|
3
3
|
canonicalSnapshotPathForConfig,
|
|
4
4
|
collectFiles,
|
|
@@ -17,4 +17,4 @@ export {
|
|
|
17
17
|
snapshotIncludesSessions,
|
|
18
18
|
snapshotTarget,
|
|
19
19
|
snapshotWithoutSessions,
|
|
20
|
-
} from "@narumitw/sync-daemon/engine/snapshot/snapshot";
|
|
20
|
+
} from "@narumitw/pi-sync-daemon/engine/snapshot/snapshot";
|
package/src/state/json-file.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/state/json-file";
|
|
2
|
-
export { readJsonIfExists, syncDirectory, writeJson } from "@narumitw/sync-daemon/engine/state/json-file";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/state/json-file";
|
|
2
|
+
export { readJsonIfExists, syncDirectory, writeJson } from "@narumitw/pi-sync-daemon/engine/state/json-file";
|
package/src/state/lock-policy.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/state/lock-policy";
|
|
2
|
-
export { LOCK_GUARD_STALE_MS, LOCK_GUARD_UPDATE_MS } from "@narumitw/sync-daemon/engine/state/lock-policy";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/state/lock-policy";
|
|
2
|
+
export { LOCK_GUARD_STALE_MS, LOCK_GUARD_UPDATE_MS } from "@narumitw/pi-sync-daemon/engine/state/lock-policy";
|
package/src/state/lock.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/state/lock";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/state/lock";
|
|
2
2
|
export {
|
|
3
3
|
inspectLock,
|
|
4
4
|
isLockGuardHeld,
|
|
@@ -7,4 +7,4 @@ export {
|
|
|
7
7
|
readLock,
|
|
8
8
|
unlock,
|
|
9
9
|
withLock,
|
|
10
|
-
} from "@narumitw/sync-daemon/engine/state/lock";
|
|
10
|
+
} from "@narumitw/pi-sync-daemon/engine/state/lock";
|
package/src/state/lockfile-fs.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/state/lockfile-fs";
|
|
2
|
-
export { LOCKFILE_FS_ADAPTER } from "@narumitw/sync-daemon/engine/state/lockfile-fs";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/state/lockfile-fs";
|
|
2
|
+
export { LOCKFILE_FS_ADAPTER } from "@narumitw/pi-sync-daemon/engine/state/lockfile-fs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/state/merge-baseline-store";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/state/merge-baseline-store";
|
|
2
2
|
export {
|
|
3
3
|
hasCurrentMergeBaseline,
|
|
4
4
|
pruneMergeBaselines,
|
|
5
5
|
readMergeAncestor,
|
|
6
6
|
readMergeAncestors,
|
|
7
7
|
stageMergeBaseline,
|
|
8
|
-
} from "@narumitw/sync-daemon/engine/state/merge-baseline-store";
|
|
8
|
+
} from "@narumitw/pi-sync-daemon/engine/state/merge-baseline-store";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/state/mutation-directory-sync";
|
|
2
|
-
export { syncMutationParents } from "@narumitw/sync-daemon/engine/state/mutation-directory-sync";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/state/mutation-directory-sync";
|
|
2
|
+
export { syncMutationParents } from "@narumitw/pi-sync-daemon/engine/state/mutation-directory-sync";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/state/operation-availability";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/state/operation-availability";
|
|
2
2
|
export {
|
|
3
3
|
classifyOperationAvailability,
|
|
4
4
|
inspectOperationAvailability,
|
|
5
5
|
operationBlocksChanges,
|
|
6
6
|
operationCanRecover,
|
|
7
|
-
} from "@narumitw/sync-daemon/engine/state/operation-availability";
|
|
7
|
+
} from "@narumitw/pi-sync-daemon/engine/state/operation-availability";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/state/state-directory";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/state/state-directory";
|
|
2
2
|
export {
|
|
3
3
|
legacyStateDir,
|
|
4
4
|
migrateLegacyStateDirectory,
|
|
5
5
|
stateDir,
|
|
6
6
|
stateDirectoryMigrationNotice,
|
|
7
7
|
withStateDirectoryAccess,
|
|
8
|
-
} from "@narumitw/sync-daemon/engine/state/state-directory";
|
|
8
|
+
} from "@narumitw/pi-sync-daemon/engine/state/state-directory";
|
package/src/state/state-types.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type * from "@narumitw/sync-daemon/engine/state/state-types";
|
|
1
|
+
export type * from "@narumitw/pi-sync-daemon/engine/state/state-types";
|