@narumitw/pi-sync 0.71.0 → 0.71.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 +1 -1
- package/dist/chunks/{agent-plan-A6CS3XXA.ts → agent-plan-RZYCE5OS.ts} +15 -15
- package/dist/chunks/{chunk-RFJWUIV5.ts → chunk-36CY6QDF.ts} +30 -31
- package/dist/chunks/chunk-36CY6QDF.ts.map +7 -0
- package/dist/chunks/{chunk-IFJXUHHC.ts → chunk-3LB5YP2P.ts} +3 -3
- package/dist/chunks/{chunk-MS6HLJFR.ts → chunk-3LGVYJFC.ts} +7 -7
- package/dist/chunks/{chunk-T22OVZSI.ts → chunk-4FEFBPVA.ts} +4 -4
- package/dist/chunks/{chunk-TAOYC2YG.ts → chunk-5O6O74G5.ts} +2 -2
- package/dist/chunks/{chunk-W3YS4Y2Q.ts → chunk-5UURT4LR.ts} +15 -6
- package/dist/chunks/chunk-5UURT4LR.ts.map +7 -0
- package/dist/chunks/{chunk-JPLT2DG6.ts → chunk-72AVEVDF.ts} +6 -6
- package/dist/chunks/{chunk-RRFW2UAD.ts → chunk-7FMAJ56J.ts} +4 -4
- package/dist/chunks/{chunk-QJTU5SCJ.ts → chunk-ABU7CXAG.ts} +2 -2
- package/dist/chunks/{chunk-D34Y5JSL.ts → chunk-BC4P223U.ts} +4 -4
- package/dist/chunks/{chunk-WT2722L4.ts → chunk-CH4KLBTH.ts} +6 -6
- package/dist/chunks/{chunk-QRSESWT2.ts → chunk-CXNCR2AE.ts} +2 -2
- package/dist/chunks/{chunk-AA2G3HTW.ts → chunk-DA5AW5JQ.ts} +3 -3
- package/dist/chunks/{chunk-ES4FIIHZ.ts → chunk-DN5GOY65.ts} +1 -1
- package/dist/chunks/{chunk-ES4FIIHZ.ts.map → chunk-DN5GOY65.ts.map} +2 -2
- package/dist/chunks/{chunk-3M3KQFSQ.ts → chunk-EEPH2FPC.ts} +2 -2
- package/dist/chunks/{chunk-V66NV2HZ.ts → chunk-G4DPBJAU.ts} +7 -7
- package/dist/chunks/{chunk-KDTDGAOM.ts → chunk-GKIBDRT3.ts} +2 -2
- package/dist/chunks/{chunk-WETDHZAD.ts → chunk-HUUQUCSX.ts} +3 -3
- package/dist/chunks/{chunk-YLVRV6NM.ts → chunk-IJECQD65.ts} +2 -2
- package/dist/chunks/{chunk-MTUR4H7S.ts → chunk-K4LJOMYD.ts} +9 -9
- package/dist/chunks/{chunk-FT45DX6E.ts → chunk-KFUZZROG.ts} +14 -14
- package/dist/chunks/{chunk-AVLYLWA7.ts → chunk-KZKBQ474.ts} +5 -5
- package/dist/chunks/{chunk-YV776ZPN.ts → chunk-LZGSJKKQ.ts} +4 -4
- package/dist/chunks/{chunk-DLA5RPFP.ts → chunk-M6C5UVNO.ts} +2 -2
- package/dist/chunks/{chunk-FIEW5453.ts → chunk-M7ZDYH7G.ts} +5 -5
- package/dist/chunks/{chunk-NFZMKZ2D.ts → chunk-MEXYSX5Y.ts} +2 -2
- package/dist/chunks/{chunk-2G6GTIWW.ts → chunk-N6ZK34AM.ts} +7 -7
- package/dist/chunks/{chunk-MHERAG42.ts → chunk-NOAQCRP6.ts} +6 -6
- package/dist/chunks/{chunk-INUH2UXN.ts → chunk-NOPE2X6N.ts} +2 -2
- package/dist/chunks/{chunk-U6CORBHU.ts → chunk-NP6NTBI2.ts} +2 -2
- package/dist/chunks/{chunk-NFW5HLKA.ts → chunk-PFVGR5PB.ts} +5 -5
- package/dist/chunks/{chunk-2BMTS5OW.ts → chunk-RLP6VXRF.ts} +3 -3
- package/dist/chunks/{chunk-A7KJUFLX.ts → chunk-SJRCMS56.ts} +15 -8
- package/dist/chunks/chunk-SJRCMS56.ts.map +7 -0
- package/dist/chunks/{chunk-GDA35HWZ.ts → chunk-TDYYLKSB.ts} +6 -6
- package/dist/chunks/{chunk-YVHXQZIH.ts → chunk-TS2REUA6.ts} +4 -4
- package/dist/chunks/{chunk-DH52CVRD.ts → chunk-V6FUEJJA.ts} +22 -22
- package/dist/chunks/{chunk-DH52CVRD.ts.map → chunk-V6FUEJJA.ts.map} +2 -2
- package/dist/chunks/{chunk-6VGQ6THO.ts → chunk-YATSYNIM.ts} +3 -3
- package/dist/chunks/{chunk-C2YD64T6.ts → chunk-YHOVBAQI.ts} +3 -3
- package/dist/chunks/{chunk-GC5XDUVA.ts → chunk-YUKFRKAE.ts} +7 -7
- package/dist/chunks/{chunk-OTI4XVCS.ts → chunk-ZNAA4FNG.ts} +2 -2
- package/dist/chunks/{chunk-ZWOKNJDT.ts → chunk-ZSH6DHQI.ts} +4 -4
- package/dist/chunks/{command-handler-SMARANCT.ts → command-handler-XB2GQIQ4.ts} +21 -21
- package/dist/chunks/{config-PUZS2ZBP.ts → config-JPCGGETF.ts} +6 -6
- package/dist/chunks/{conflict-artifacts-77PI6IXK.ts → conflict-artifacts-UUWACJBW.ts} +12 -12
- package/dist/chunks/{conflict-review-OO57TGMR.ts → conflict-review-GKFIWYCK.ts} +15 -15
- package/dist/chunks/{conflict-review-HHGVL5TP.ts → conflict-review-SACA5537.ts} +26 -26
- package/dist/chunks/{continuous-record-QIIFQNKP.ts → continuous-record-AP6LVXUJ.ts} +9 -9
- package/dist/chunks/{debug-tool-execution-AIQAGPMJ.ts → debug-tool-execution-HQ4ITDWB.ts} +11 -11
- package/dist/chunks/{diff-review-QRHOHG5C.ts → diff-review-LVIYNDLG.ts} +5 -5
- package/dist/chunks/{file-selection-ZEBPDRHG.ts → file-selection-4UE2RUOC.ts} +14 -14
- package/dist/chunks/{git-backend-I2IJ5ULJ.ts → git-backend-XOAHKZMR.ts} +8 -8
- package/dist/chunks/{initialization-XGYWRNPQ.ts → initialization-OVZUKZ6H.ts} +10 -10
- package/dist/chunks/{local-diff-review-OGZM3TA7.ts → local-diff-review-CJWITN2A.ts} +29 -29
- package/dist/chunks/{local-fields-PIKOEXWR.ts → local-fields-Z4RMLREX.ts} +6 -6
- package/dist/chunks/{manager-result-dispatcher-72YGSLHL.ts → manager-result-dispatcher-N2INFZFN.ts} +18 -18
- package/dist/chunks/{manager-ui-5SXPS4SE.ts → manager-ui-ROKHMOQF.ts} +28 -28
- package/dist/chunks/{merge-baseline-store-MI7SHGDH.ts → merge-baseline-store-M3HLNMAE.ts} +7 -7
- package/dist/chunks/{merge-journal-46QC5N7D.ts → merge-journal-37ED5KZY.ts} +11 -11
- package/dist/chunks/{remote-selection-ui-4BXJAZUD.ts → remote-selection-ui-CJ5ICXMF.ts} +17 -17
- package/dist/chunks/{s3-backend-ZRMOWH5R.ts → s3-backend-CBUPAAS4.ts} +13 -13
- package/dist/chunks/{session-push-55IV4IW3.ts → session-push-TNYJYIKE.ts} +16 -16
- package/dist/chunks/{setup-switch-DXDUBDQI.ts → setup-switch-QBW7RNRW.ts} +12 -12
- package/dist/chunks/{setup-wizard-ICPQERAE.ts → setup-wizard-IX67AV3T.ts} +14 -14
- package/dist/chunks/{snapshot-HDARHOQZ.ts → snapshot-I7EZP5Q7.ts} +5 -5
- package/dist/chunks/{snapshot-LZ6XKFA4.ts → snapshot-T26QGKIX.ts} +5 -5
- package/dist/chunks/{snapshot-transaction-LYR5OFLR.ts → snapshot-transaction-C2SEYO5T.ts} +11 -11
- package/dist/chunks/{sync-inspection-PMEXXLDK.ts → sync-inspection-HIGQPANV.ts} +10 -10
- package/dist/chunks/sync-inspection-T7COH3PW.ts +29 -0
- package/dist/chunks/sync-operations-E7SAZJEF.ts +69 -0
- package/dist/chunks/{sync-operations-VSMA5GSA.ts → sync-operations-XI7RJZWI.ts} +14 -14
- package/dist/chunks/{sync-state-72ZDKUQW.ts → sync-state-7R5EOJIY.ts} +7 -7
- package/dist/chunks/{sync-state-store-YTMAZQ3Z.ts → sync-state-store-ELTCECE4.ts} +5 -5
- package/dist/chunks/{webdav-backend-3AZOECVQ.ts → webdav-backend-EK5UCAQE.ts} +10 -10
- package/dist/index.ts +19 -19
- package/docs/daemon-migration.md +1 -1
- package/docs/merge-implementation-audit.md +2 -2
- package/package.json +5 -5
- package/skills/configure-pi-sync/references/configuration.md +1 -0
- package/src/engine/host.ts +1 -0
- package/src/engine/snapshot/snapshot-apply.ts +1 -1
- package/src/engine/snapshot/snapshot-transaction-policy.ts +1 -0
- package/src/engine/snapshot/snapshot-transaction.ts +7 -0
- package/src/engine/sync/sync-mutations.ts +14 -12
- package/src/runtime/local-host.ts +1 -0
- package/src/runtime/session-presence.ts +13 -4
- package/dist/chunks/chunk-A7KJUFLX.ts.map +0 -7
- package/dist/chunks/chunk-RFJWUIV5.ts.map +0 -7
- package/dist/chunks/chunk-W3YS4Y2Q.ts.map +0 -7
- package/dist/chunks/sync-inspection-N6TELULU.ts +0 -29
- package/dist/chunks/sync-operations-KKSIS2CI.ts +0 -69
- /package/dist/chunks/{agent-plan-A6CS3XXA.ts.map → agent-plan-RZYCE5OS.ts.map} +0 -0
- /package/dist/chunks/{chunk-IFJXUHHC.ts.map → chunk-3LB5YP2P.ts.map} +0 -0
- /package/dist/chunks/{chunk-MS6HLJFR.ts.map → chunk-3LGVYJFC.ts.map} +0 -0
- /package/dist/chunks/{chunk-T22OVZSI.ts.map → chunk-4FEFBPVA.ts.map} +0 -0
- /package/dist/chunks/{chunk-TAOYC2YG.ts.map → chunk-5O6O74G5.ts.map} +0 -0
- /package/dist/chunks/{chunk-JPLT2DG6.ts.map → chunk-72AVEVDF.ts.map} +0 -0
- /package/dist/chunks/{chunk-RRFW2UAD.ts.map → chunk-7FMAJ56J.ts.map} +0 -0
- /package/dist/chunks/{chunk-QJTU5SCJ.ts.map → chunk-ABU7CXAG.ts.map} +0 -0
- /package/dist/chunks/{chunk-D34Y5JSL.ts.map → chunk-BC4P223U.ts.map} +0 -0
- /package/dist/chunks/{chunk-WT2722L4.ts.map → chunk-CH4KLBTH.ts.map} +0 -0
- /package/dist/chunks/{chunk-QRSESWT2.ts.map → chunk-CXNCR2AE.ts.map} +0 -0
- /package/dist/chunks/{chunk-AA2G3HTW.ts.map → chunk-DA5AW5JQ.ts.map} +0 -0
- /package/dist/chunks/{chunk-3M3KQFSQ.ts.map → chunk-EEPH2FPC.ts.map} +0 -0
- /package/dist/chunks/{chunk-V66NV2HZ.ts.map → chunk-G4DPBJAU.ts.map} +0 -0
- /package/dist/chunks/{chunk-KDTDGAOM.ts.map → chunk-GKIBDRT3.ts.map} +0 -0
- /package/dist/chunks/{chunk-WETDHZAD.ts.map → chunk-HUUQUCSX.ts.map} +0 -0
- /package/dist/chunks/{chunk-YLVRV6NM.ts.map → chunk-IJECQD65.ts.map} +0 -0
- /package/dist/chunks/{chunk-MTUR4H7S.ts.map → chunk-K4LJOMYD.ts.map} +0 -0
- /package/dist/chunks/{chunk-FT45DX6E.ts.map → chunk-KFUZZROG.ts.map} +0 -0
- /package/dist/chunks/{chunk-AVLYLWA7.ts.map → chunk-KZKBQ474.ts.map} +0 -0
- /package/dist/chunks/{chunk-YV776ZPN.ts.map → chunk-LZGSJKKQ.ts.map} +0 -0
- /package/dist/chunks/{chunk-DLA5RPFP.ts.map → chunk-M6C5UVNO.ts.map} +0 -0
- /package/dist/chunks/{chunk-FIEW5453.ts.map → chunk-M7ZDYH7G.ts.map} +0 -0
- /package/dist/chunks/{chunk-NFZMKZ2D.ts.map → chunk-MEXYSX5Y.ts.map} +0 -0
- /package/dist/chunks/{chunk-2G6GTIWW.ts.map → chunk-N6ZK34AM.ts.map} +0 -0
- /package/dist/chunks/{chunk-MHERAG42.ts.map → chunk-NOAQCRP6.ts.map} +0 -0
- /package/dist/chunks/{chunk-INUH2UXN.ts.map → chunk-NOPE2X6N.ts.map} +0 -0
- /package/dist/chunks/{chunk-U6CORBHU.ts.map → chunk-NP6NTBI2.ts.map} +0 -0
- /package/dist/chunks/{chunk-NFW5HLKA.ts.map → chunk-PFVGR5PB.ts.map} +0 -0
- /package/dist/chunks/{chunk-2BMTS5OW.ts.map → chunk-RLP6VXRF.ts.map} +0 -0
- /package/dist/chunks/{chunk-GDA35HWZ.ts.map → chunk-TDYYLKSB.ts.map} +0 -0
- /package/dist/chunks/{chunk-YVHXQZIH.ts.map → chunk-TS2REUA6.ts.map} +0 -0
- /package/dist/chunks/{chunk-6VGQ6THO.ts.map → chunk-YATSYNIM.ts.map} +0 -0
- /package/dist/chunks/{chunk-C2YD64T6.ts.map → chunk-YHOVBAQI.ts.map} +0 -0
- /package/dist/chunks/{chunk-GC5XDUVA.ts.map → chunk-YUKFRKAE.ts.map} +0 -0
- /package/dist/chunks/{chunk-OTI4XVCS.ts.map → chunk-ZNAA4FNG.ts.map} +0 -0
- /package/dist/chunks/{chunk-ZWOKNJDT.ts.map → chunk-ZSH6DHQI.ts.map} +0 -0
- /package/dist/chunks/{command-handler-SMARANCT.ts.map → command-handler-XB2GQIQ4.ts.map} +0 -0
- /package/dist/chunks/{config-PUZS2ZBP.ts.map → config-JPCGGETF.ts.map} +0 -0
- /package/dist/chunks/{conflict-artifacts-77PI6IXK.ts.map → conflict-artifacts-UUWACJBW.ts.map} +0 -0
- /package/dist/chunks/{conflict-review-OO57TGMR.ts.map → conflict-review-GKFIWYCK.ts.map} +0 -0
- /package/dist/chunks/{conflict-review-HHGVL5TP.ts.map → conflict-review-SACA5537.ts.map} +0 -0
- /package/dist/chunks/{continuous-record-QIIFQNKP.ts.map → continuous-record-AP6LVXUJ.ts.map} +0 -0
- /package/dist/chunks/{debug-tool-execution-AIQAGPMJ.ts.map → debug-tool-execution-HQ4ITDWB.ts.map} +0 -0
- /package/dist/chunks/{diff-review-QRHOHG5C.ts.map → diff-review-LVIYNDLG.ts.map} +0 -0
- /package/dist/chunks/{file-selection-ZEBPDRHG.ts.map → file-selection-4UE2RUOC.ts.map} +0 -0
- /package/dist/chunks/{git-backend-I2IJ5ULJ.ts.map → git-backend-XOAHKZMR.ts.map} +0 -0
- /package/dist/chunks/{initialization-XGYWRNPQ.ts.map → initialization-OVZUKZ6H.ts.map} +0 -0
- /package/dist/chunks/{local-diff-review-OGZM3TA7.ts.map → local-diff-review-CJWITN2A.ts.map} +0 -0
- /package/dist/chunks/{local-fields-PIKOEXWR.ts.map → local-fields-Z4RMLREX.ts.map} +0 -0
- /package/dist/chunks/{manager-result-dispatcher-72YGSLHL.ts.map → manager-result-dispatcher-N2INFZFN.ts.map} +0 -0
- /package/dist/chunks/{manager-ui-5SXPS4SE.ts.map → manager-ui-ROKHMOQF.ts.map} +0 -0
- /package/dist/chunks/{merge-baseline-store-MI7SHGDH.ts.map → merge-baseline-store-M3HLNMAE.ts.map} +0 -0
- /package/dist/chunks/{merge-journal-46QC5N7D.ts.map → merge-journal-37ED5KZY.ts.map} +0 -0
- /package/dist/chunks/{remote-selection-ui-4BXJAZUD.ts.map → remote-selection-ui-CJ5ICXMF.ts.map} +0 -0
- /package/dist/chunks/{s3-backend-ZRMOWH5R.ts.map → s3-backend-CBUPAAS4.ts.map} +0 -0
- /package/dist/chunks/{session-push-55IV4IW3.ts.map → session-push-TNYJYIKE.ts.map} +0 -0
- /package/dist/chunks/{setup-switch-DXDUBDQI.ts.map → setup-switch-QBW7RNRW.ts.map} +0 -0
- /package/dist/chunks/{setup-wizard-ICPQERAE.ts.map → setup-wizard-IX67AV3T.ts.map} +0 -0
- /package/dist/chunks/{snapshot-HDARHOQZ.ts.map → snapshot-I7EZP5Q7.ts.map} +0 -0
- /package/dist/chunks/{snapshot-LZ6XKFA4.ts.map → snapshot-T26QGKIX.ts.map} +0 -0
- /package/dist/chunks/{snapshot-transaction-LYR5OFLR.ts.map → snapshot-transaction-C2SEYO5T.ts.map} +0 -0
- /package/dist/chunks/{sync-inspection-N6TELULU.ts.map → sync-inspection-HIGQPANV.ts.map} +0 -0
- /package/dist/chunks/{sync-inspection-PMEXXLDK.ts.map → sync-inspection-T7COH3PW.ts.map} +0 -0
- /package/dist/chunks/{sync-operations-KKSIS2CI.ts.map → sync-operations-E7SAZJEF.ts.map} +0 -0
- /package/dist/chunks/{sync-operations-VSMA5GSA.ts.map → sync-operations-XI7RJZWI.ts.map} +0 -0
- /package/dist/chunks/{sync-state-72ZDKUQW.ts.map → sync-state-7R5EOJIY.ts.map} +0 -0
- /package/dist/chunks/{sync-state-store-YTMAZQ3Z.ts.map → sync-state-store-ELTCECE4.ts.map} +0 -0
- /package/dist/chunks/{webdav-backend-3AZOECVQ.ts.map → webdav-backend-EK5UCAQE.ts.map} +0 -0
package/dist/index.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
|
|
3
3
|
import {
|
|
4
4
|
createSyncAttentionController
|
|
5
|
-
} from "./chunks/chunk-
|
|
5
|
+
} from "./chunks/chunk-YATSYNIM.ts";
|
|
6
6
|
import "./chunks/chunk-UPP54ATP.ts";
|
|
7
7
|
import {
|
|
8
8
|
completeSyncArguments,
|
|
@@ -16,7 +16,7 @@ import "./chunks/chunk-A3NEEVNA.ts";
|
|
|
16
16
|
import {
|
|
17
17
|
LOCAL_RECOVERED_NOTICE,
|
|
18
18
|
recoverLocalTransactions
|
|
19
|
-
} from "./chunks/chunk-
|
|
19
|
+
} from "./chunks/chunk-3LGVYJFC.ts";
|
|
20
20
|
import "./chunks/chunk-AITZUACB.ts";
|
|
21
21
|
import {
|
|
22
22
|
SYNC_BINDING_UNAVAILABLE,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
engineContext,
|
|
26
26
|
installLocalHost,
|
|
27
27
|
withLocalOwner
|
|
28
|
-
} from "./chunks/chunk-
|
|
28
|
+
} from "./chunks/chunk-5UURT4LR.ts";
|
|
29
29
|
import {
|
|
30
30
|
configureSyncStatus,
|
|
31
31
|
createSyncStatusPublisher,
|
|
@@ -54,26 +54,26 @@ import {
|
|
|
54
54
|
loadConfigForCheck,
|
|
55
55
|
readLocalConfigObject,
|
|
56
56
|
syncCheckConfigFingerprint
|
|
57
|
-
} from "./chunks/chunk-
|
|
58
|
-
import "./chunks/chunk-
|
|
57
|
+
} from "./chunks/chunk-KZKBQ474.ts";
|
|
58
|
+
import "./chunks/chunk-CXNCR2AE.ts";
|
|
59
59
|
import {
|
|
60
60
|
combineSignals,
|
|
61
61
|
throwIfAborted
|
|
62
62
|
} from "./chunks/chunk-SPRHJBJC.ts";
|
|
63
|
-
import "./chunks/chunk-
|
|
63
|
+
import "./chunks/chunk-5O6O74G5.ts";
|
|
64
64
|
import {
|
|
65
65
|
stateDirectoryMigrationNotice,
|
|
66
66
|
withStateDirectoryAccess
|
|
67
|
-
} from "./chunks/chunk-
|
|
67
|
+
} from "./chunks/chunk-MEXYSX5Y.ts";
|
|
68
68
|
import "./chunks/chunk-QIL27OLJ.ts";
|
|
69
69
|
import {
|
|
70
70
|
snapshotOptionsForContext
|
|
71
|
-
} from "./chunks/chunk-
|
|
71
|
+
} from "./chunks/chunk-7FMAJ56J.ts";
|
|
72
72
|
import "./chunks/chunk-ULNEZ53E.ts";
|
|
73
73
|
import {
|
|
74
74
|
syncSessionsSelected
|
|
75
|
-
} from "./chunks/chunk-
|
|
76
|
-
import "./chunks/chunk-
|
|
75
|
+
} from "./chunks/chunk-ZNAA4FNG.ts";
|
|
76
|
+
import "./chunks/chunk-DN5GOY65.ts";
|
|
77
77
|
import "./chunks/chunk-C66HLRRZ.ts";
|
|
78
78
|
|
|
79
79
|
// src/sync-extension.ts
|
|
@@ -166,7 +166,7 @@ async function autoPushSessions(ctx, signal) {
|
|
|
166
166
|
});
|
|
167
167
|
signal.throwIfAborted();
|
|
168
168
|
if (!config?.automatic || !syncSessionsSelected(config)) return;
|
|
169
|
-
const { shutdownPush } = await import("./chunks/sync-operations-
|
|
169
|
+
const { shutdownPush } = await import("./chunks/sync-operations-XI7RJZWI.ts");
|
|
170
170
|
signal.throwIfAborted();
|
|
171
171
|
await shutdownPush(ctx, {
|
|
172
172
|
args: [],
|
|
@@ -203,7 +203,7 @@ function registerPiSyncDebug(pi, getOwner, run) {
|
|
|
203
203
|
if (getOwner(ctx) !== owner) throw new Error("Pi Sync session was replaced.");
|
|
204
204
|
};
|
|
205
205
|
validate();
|
|
206
|
-
const { executeDebugTool } = await import("./chunks/debug-tool-execution-
|
|
206
|
+
const { executeDebugTool } = await import("./chunks/debug-tool-execution-HQ4ITDWB.ts").catch(() => {
|
|
207
207
|
validate();
|
|
208
208
|
throw new Error("Pi Sync debug could not load.");
|
|
209
209
|
});
|
|
@@ -282,7 +282,7 @@ function createStartupCheck(loaders, attention, timeoutMs = 3e4, publish) {
|
|
|
282
282
|
() => inspectSync(captured, snapshotOptionsForContext(ctx, captured), signal, void 0, timings)
|
|
283
283
|
);
|
|
284
284
|
throwIfAborted(signal);
|
|
285
|
-
const { readStateForConfig, syncStateFingerprint } = await import("./chunks/sync-state-store-
|
|
285
|
+
const { readStateForConfig, syncStateFingerprint } = await import("./chunks/sync-state-store-ELTCECE4.ts");
|
|
286
286
|
throwIfAborted(signal);
|
|
287
287
|
if (!isCurrent()) return;
|
|
288
288
|
const latest = await loadConfigForCheck(void 0, signal);
|
|
@@ -395,12 +395,12 @@ function createStartupCheck(loaders, attention, timeoutMs = 3e4, publish) {
|
|
|
395
395
|
// src/sync/sync-loaders.ts
|
|
396
396
|
function createSyncLoaders(dependencies) {
|
|
397
397
|
const loaders = {
|
|
398
|
-
commands: cachedModuleLoader(dependencies.loadCommandHandler ?? (() => import("./chunks/command-handler-
|
|
399
|
-
inspection: cachedModuleLoader(dependencies.loadSyncInspection ?? (() => import("./chunks/sync-inspection-
|
|
400
|
-
setupSwitch: cachedModuleLoader(dependencies.loadSetupSwitch ?? (() => import("./chunks/setup-switch-
|
|
401
|
-
snapshot: cachedModuleLoader(dependencies.loadSnapshot ?? (() => import("./chunks/snapshot-
|
|
402
|
-
syncState: cachedModuleLoader(dependencies.loadSyncState ?? (() => import("./chunks/sync-state-
|
|
403
|
-
operations: cachedModuleLoader(dependencies.loadSyncOperations ?? (() => import("./chunks/sync-operations-
|
|
398
|
+
commands: cachedModuleLoader(dependencies.loadCommandHandler ?? (() => import("./chunks/command-handler-XB2GQIQ4.ts"))),
|
|
399
|
+
inspection: cachedModuleLoader(dependencies.loadSyncInspection ?? (() => import("./chunks/sync-inspection-HIGQPANV.ts"))),
|
|
400
|
+
setupSwitch: cachedModuleLoader(dependencies.loadSetupSwitch ?? (() => import("./chunks/setup-switch-QBW7RNRW.ts"))),
|
|
401
|
+
snapshot: cachedModuleLoader(dependencies.loadSnapshot ?? (() => import("./chunks/snapshot-I7EZP5Q7.ts"))),
|
|
402
|
+
syncState: cachedModuleLoader(dependencies.loadSyncState ?? (() => import("./chunks/sync-state-7R5EOJIY.ts"))),
|
|
403
|
+
operations: cachedModuleLoader(dependencies.loadSyncOperations ?? (() => import("./chunks/sync-operations-XI7RJZWI.ts")))
|
|
404
404
|
};
|
|
405
405
|
return loaders;
|
|
406
406
|
}
|
package/docs/daemon-migration.md
CHANGED
|
@@ -90,7 +90,7 @@ A new Pi Sync client records its open session in the private runtime directory b
|
|
|
90
90
|
|
|
91
91
|
Protection starts after Pi Sync finishes registering, not before Pi core opens the session on initial startup. Both the client and running daemon must include this change. Close or upgrade older Pi processes that share the agent directory. Pi sessions without this extension, clients that fail to register, external editors, and shell commands are not covered. A warning in TUI or RPC identifies a registration failure in that Pi. An absent record does not prove that no such writer exists.
|
|
92
92
|
|
|
93
|
-
The Pi host loads the debug writer after it validates the Debug mode setting and before writing the first eligible record. It loads the debug tool implementation on the first permitted call. A background startup check loads the sync state reader before comparing the inspected state with current local state. These imports do not defer settings validation, authenticated attach, or pending transaction recovery.
|
|
93
|
+
The Pi host loads the debug writer after it validates the Debug mode setting and before writing the first eligible record. It loads the debug tool implementation on the first permitted call. A background startup check loads the sync state reader before comparing the inspected state with current local state. These imports do not defer settings validation, authenticated attach, or pending transaction recovery.
|
|
94
94
|
|
|
95
95
|
Retired clients cannot authorize work or keep the daemon running by presence alone. Ambiguous disconnect and orderly exit retain protection while the PID lives; a confirmed replacement can hand over the registration. A contact timeout revokes work; it does not release an acquired mutation grant. A grant with uncertain release stays held until explicit release or confirmed daemon exit. Preimage checks, conditional publication, backups, and journal recovery still apply.
|
|
96
96
|
|
|
@@ -80,9 +80,9 @@ Disabling the opt-in cancels pending work but does not undo completed transfers
|
|
|
80
80
|
|
|
81
81
|
Before each recursive apply/recovery deletion, removal intent is published durably for the target and affected descendants; only absence gains recognition, never unknown content. Directory and symlink restoration are staged beside the target, checked against the backup, synced, revalidated, and renamed into place. Copy failure/cancellation leaves the live postimage unchanged; a rename interruption after deletion remains recoverable from the retained backup and intent.
|
|
82
82
|
|
|
83
|
-
A complete group is checked before recovery mutates any path. Each destructive boundary checks ownership and bytes again; backup hashing precedes the live-target observation, and both file and non-file restoration recheck immediately before removal.
|
|
83
|
+
A complete group is checked before recovery mutates any path. Each destructive boundary checks ownership and bytes again; backup hashing precedes the live-target observation, and both file and non-file restoration recheck immediately before removal.
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
For agent-root-only targets, recovery does not parse unrelated Pi settings. A valid but unused pinned session root cannot authorize those paths or block their recovery.
|
|
86
86
|
|
|
87
87
|
Legacy version-1 journals lack proven postimages and are retired only if every target still equals its backed-up preimage. Version-2 journals retain their original guarded image rules; known postimages can be restored through staging and upgraded removal evidence, but old missing intermediate states without durable intent still require manual review.
|
|
88
88
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@narumitw/pi-sync",
|
|
3
|
-
"version": "0.71.
|
|
3
|
+
"version": "0.71.2",
|
|
4
4
|
"description": "Pi extension that syncs Pi configuration through Git, WebDAV, Cloudflare R2, or S3-compatible storage.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@narumitw/pi-tui-kit": "^0.75.0",
|
|
50
50
|
"fast-xml-parser": "^5.12.1",
|
|
51
|
-
"minimatch": "^11.0.
|
|
51
|
+
"minimatch": "^11.0.10",
|
|
52
52
|
"proper-lockfile": "^4.1.2",
|
|
53
53
|
"semver": "^7.8.6"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@earendil-works/pi-ai": "1.
|
|
57
|
-
"@earendil-works/pi-coding-agent": "1.
|
|
58
|
-
"@earendil-works/pi-tui": "1.
|
|
56
|
+
"@earendil-works/pi-ai": "1.8.0",
|
|
57
|
+
"@earendil-works/pi-coding-agent": "1.8.0",
|
|
58
|
+
"@earendil-works/pi-tui": "1.8.0",
|
|
59
59
|
"@types/proper-lockfile": "^4.1.4",
|
|
60
60
|
"@types/semver": "^7.8.0",
|
|
61
61
|
"esbuild": "0.28.2",
|
|
@@ -305,6 +305,7 @@ Use the first concrete error, not a generic recovery hint appended to it. Start
|
|
|
305
305
|
| --- | --- |
|
|
306
306
|
| **Autonomous sync requires a separate policy review** | This message comes from an older build. Close old Pi processes and [verify the old daemon has exited](#daemon-lifetime-and-unattended-permission) before upgrading. Use reviewed **Sync now** or independently enable **Startup transfer**. |
|
|
307
307
|
| **Agent directory changed or has an unsafe filesystem layout** | The local scan could not establish a stable filesystem view. Use file metadata to check the agent root, Pi's `settings.json`, the effective session directory (including any `--session-dir` override), and in-scope paths. Symlinks in the session directory path and hard-linked candidate files can trigger this error; ordinary symlinks encountered in the directory scan are skipped. Check whether another Pi process or editor is changing files during the scan. Do not change synchronization settings unless the evidence identifies a relevant setting; this error alone does not identify a path or field. |
|
|
308
|
+
| **Another Pi process uses this agent directory** | Leave one Pi open for the transfer and close the other Pi processes that use the same agent directory. Review `/sync diff` before retrying. Pull checks for a peer before saving its backup and again at the write boundary. If Pi reports an unverified apply, preserve any journal and backups. To avoid unattended attempts in a multi-window workflow, turn **Startup transfer** off. |
|
|
308
309
|
| **Transfer blocked by size limits** | Check the reported paths and byte counts. Use `/sync diff`, then narrow the selection or review a different source. See [transfer size limits](#transfer-size-limits). |
|
|
309
310
|
| **Malformed or unsupported settings** | Check the canonical path and documented version and field constraints. Preserve the original private bytes and follow [settings recovery](#unsupported-old-settings-and-recovery); do not replace the document with defaults. |
|
|
310
311
|
| **Backend access or publication failure** | Use the reported error class to distinguish credentials, a missing location, transport, and publication safety. A 404 alone does not identify which remote resource is missing. If local checks are insufficient, explain the [read and recovery options](#diagnostics). Do not treat a successful read as proof of write access. |
|
package/src/engine/host.ts
CHANGED
|
@@ -64,6 +64,7 @@ export interface EngineHost {
|
|
|
64
64
|
config?: ConfigAuthority;
|
|
65
65
|
allowConfigMigration?(): boolean;
|
|
66
66
|
validateWrite?(): void;
|
|
67
|
+
requireExclusiveLocalWriter?(): Promise<void>;
|
|
67
68
|
mutate<T>(target: string, action: () => Promise<T>): Promise<T>;
|
|
68
69
|
reserveTargets?<T>(targets: readonly string[], action: () => Promise<T>): Promise<T>;
|
|
69
70
|
protectSessionWrite?<T>(targets: readonly string[], action: () => Promise<T>): Promise<T>;
|
|
@@ -58,7 +58,7 @@ export async function applySnapshot(
|
|
|
58
58
|
| "validateMutation"
|
|
59
59
|
| "validateApplyReview"
|
|
60
60
|
| "expectedFileHashes"
|
|
61
|
-
> & { reviewedLocal?: Pick<Snapshot, "files"
|
|
61
|
+
> & { reviewedLocal?: Pick<Snapshot, "files">; onApplyStart?: () => void } = {},
|
|
62
62
|
) {
|
|
63
63
|
requireLegacyTransferPolicy(snapshot);
|
|
64
64
|
assertSnapshotExcludesDebugLog(snapshot);
|
|
@@ -45,6 +45,7 @@ export interface TransactionJournalPolicy {
|
|
|
45
45
|
export type TransactionOptions = SyncSelectionConfig &
|
|
46
46
|
Pick<SnapshotOptions, "signal" | "validateMutation" | "validateApplyReview"> & {
|
|
47
47
|
sessionDir?: string;
|
|
48
|
+
onApplyStart?: () => void;
|
|
48
49
|
protectedTargets?: readonly string[];
|
|
49
50
|
expectedPreimages?: ReadonlyMap<string, string>;
|
|
50
51
|
resolveConfiguredSessionDir?: boolean;
|
|
@@ -210,6 +210,11 @@ export async function applySnapshotTransaction(
|
|
|
210
210
|
await withSessionWriteProtection(
|
|
211
211
|
writes.map(({ target }) => target),
|
|
212
212
|
async () => {
|
|
213
|
+
if (writes.length) {
|
|
214
|
+
options.validateMutation?.();
|
|
215
|
+
options.signal?.throwIfAborted();
|
|
216
|
+
options.onApplyStart?.();
|
|
217
|
+
}
|
|
213
218
|
await retireRemovalIntent(
|
|
214
219
|
transaction.directory,
|
|
215
220
|
transaction.journal,
|
|
@@ -878,10 +883,12 @@ async function removeOwnedTarget(
|
|
|
878
883
|
if (current.scoped) {
|
|
879
884
|
if (current.value !== verified.value) throw new Error("Transaction removal image changed.");
|
|
880
885
|
await assertUnexcludedTargets(journal.root, [entry.target], options);
|
|
886
|
+
if (apply) options.onApplyStart?.();
|
|
881
887
|
await removeScopedImage(entry.target, current.scoped, options);
|
|
882
888
|
} else {
|
|
883
889
|
options.validateMutation?.();
|
|
884
890
|
options.signal?.throwIfAborted();
|
|
891
|
+
if (apply) options.onApplyStart?.();
|
|
885
892
|
await fs.rm(entry.target, { recursive: true, force: true });
|
|
886
893
|
}
|
|
887
894
|
await syncDirectory(path.dirname(entry.target));
|
|
@@ -7,7 +7,11 @@ import {
|
|
|
7
7
|
SyncBackendConflictError,
|
|
8
8
|
} from "../backends/sync-backend.js";
|
|
9
9
|
import type { CommandOptions } from "../commands/command-types.js";
|
|
10
|
-
import
|
|
10
|
+
import {
|
|
11
|
+
type EngineContext as ExtensionCommandContext,
|
|
12
|
+
type EngineContext as ExtensionContext,
|
|
13
|
+
engineHost,
|
|
14
|
+
} from "../host.js";
|
|
11
15
|
import { loadConfig, loadConfigForCheck, syncCheckConfigFingerprint } from "../settings/config.js";
|
|
12
16
|
import type { AnySyncConfig } from "../settings/settings-types.js";
|
|
13
17
|
import {
|
|
@@ -650,6 +654,8 @@ export async function pull(
|
|
|
650
654
|
if (!sameRemoteHead(backend, head, await backend.readHead(options.signal)))
|
|
651
655
|
throw new Error("Remote changed during pull review.");
|
|
652
656
|
validateMutation();
|
|
657
|
+
await engineHost().requireExclusiveLocalWriter?.();
|
|
658
|
+
validateMutation();
|
|
653
659
|
const restorePoint = action ? await backupDirectionalSnapshot(local, options.signal) : undefined;
|
|
654
660
|
const backup =
|
|
655
661
|
restorePoint?.backupPath ?? (await backupLocal(config.snapshotIdentity, snapshotOptions, options.signal));
|
|
@@ -692,12 +698,7 @@ export async function pull(
|
|
|
692
698
|
head,
|
|
693
699
|
protectedPaths: reviewedProtectedPaths,
|
|
694
700
|
signal: options.signal,
|
|
695
|
-
onCommit:
|
|
696
|
-
? () => {
|
|
697
|
-
options.onCommit?.();
|
|
698
|
-
mayHaveApplied = true;
|
|
699
|
-
}
|
|
700
|
-
: options.onCommit,
|
|
701
|
+
onCommit: options.onCommit,
|
|
701
702
|
validateMutation,
|
|
702
703
|
validateSettings: action
|
|
703
704
|
? async () => {
|
|
@@ -709,14 +710,14 @@ export async function pull(
|
|
|
709
710
|
effectiveRoot: Boolean(action),
|
|
710
711
|
});
|
|
711
712
|
applyGuards.validateMutation();
|
|
712
|
-
if (!action)
|
|
713
|
-
options.onCommit?.();
|
|
714
|
-
mayHaveApplied = true;
|
|
715
|
-
}
|
|
713
|
+
if (!action) options.onCommit?.();
|
|
716
714
|
const lastFileHashes = await applySnapshot(physical, protectedPaths, {
|
|
717
715
|
...snapshotOptions,
|
|
718
716
|
sessionDir: applySessionDir,
|
|
719
717
|
...applyGuards,
|
|
718
|
+
onApplyStart: () => {
|
|
719
|
+
mayHaveApplied = true;
|
|
720
|
+
},
|
|
720
721
|
...(action || config.scope === "agent-directory" || sizeLimited ? { reviewedLocal: local } : {}),
|
|
721
722
|
expectedFileHashes: config.localFields?.length
|
|
722
723
|
? { "settings.json": fileHashMap(local)["settings.json"] ?? null }
|
|
@@ -746,7 +747,8 @@ export async function pull(
|
|
|
746
747
|
} catch (error) {
|
|
747
748
|
if (options.signal?.aborted && !mayHaveApplied) throw error;
|
|
748
749
|
const outcome = installed ? "applied" : mayHaveApplied ? "unknown" : "not-applied";
|
|
749
|
-
const restore =
|
|
750
|
+
const restore =
|
|
751
|
+
outcome === "not-applied" || error instanceof LocalBackupVerificationError ? "" : localRestoreGuidance(backup);
|
|
750
752
|
const failure = new PullOutcomeError(outcome, [restore, errorMessage(error)].filter(Boolean).join(" "), error);
|
|
751
753
|
if (error instanceof AggregateError) throw new AggregateError(error.errors, failure.message, { cause: failure });
|
|
752
754
|
throw failure;
|
|
@@ -43,6 +43,7 @@ export function installLocalHost() {
|
|
|
43
43
|
},
|
|
44
44
|
allowConfigMigration: () => inspectLegacyOwner(getEngineRoot()).allowed,
|
|
45
45
|
validateWrite: () => assertLegacyOwnerAllowsWrite(getEngineRoot()),
|
|
46
|
+
requireExclusiveLocalWriter: () => requireOwner().presence.requireExclusiveWriter(),
|
|
46
47
|
mutate: async (target, action) => {
|
|
47
48
|
const owner = requireOwner();
|
|
48
49
|
return withFileMutationQueue(target, async () => {
|
|
@@ -34,6 +34,11 @@ const invalid = () =>
|
|
|
34
34
|
new Error(
|
|
35
35
|
"Cannot verify Pi session presence; keep the private records and retry after closing or reloading the other Pi sessions.",
|
|
36
36
|
);
|
|
37
|
+
function assertNoPeer(otherProcess: boolean) {
|
|
38
|
+
if (otherProcess)
|
|
39
|
+
throw new Error("Another Pi process uses this agent directory. Close it before writing local sync files.");
|
|
40
|
+
}
|
|
41
|
+
|
|
37
42
|
const recordName = /^presence-[\da-f-]{36}\.json$/u;
|
|
38
43
|
const markerName = "session-write.json";
|
|
39
44
|
|
|
@@ -203,6 +208,13 @@ export function sessionPresenceReader(root: string) {
|
|
|
203
208
|
let location: ReturnType<typeof initialize> | undefined;
|
|
204
209
|
const locate = () => (location ??= initialize());
|
|
205
210
|
return {
|
|
211
|
+
async requireExclusiveWriter() {
|
|
212
|
+
const { paths, assertLocation } = await locate();
|
|
213
|
+
assertLocation();
|
|
214
|
+
const { otherProcess } = await readPresence(paths);
|
|
215
|
+
assertLocation();
|
|
216
|
+
assertNoPeer(otherProcess);
|
|
217
|
+
},
|
|
206
218
|
async files() {
|
|
207
219
|
const { paths, assertLocation } = await locate();
|
|
208
220
|
assertLocation();
|
|
@@ -225,10 +237,7 @@ export function sessionPresenceReader(root: string) {
|
|
|
225
237
|
async () => {
|
|
226
238
|
assertLocation();
|
|
227
239
|
const { files, pending, otherProcess } = await readPresence(paths);
|
|
228
|
-
|
|
229
|
-
throw new Error(
|
|
230
|
-
"Another Pi process uses this agent directory. Close it before writing local sync files.",
|
|
231
|
-
);
|
|
240
|
+
assertNoPeer(otherProcess);
|
|
232
241
|
if (
|
|
233
242
|
targets.some(
|
|
234
243
|
(target) =>
|