@narumitw/pi-sync 0.57.9 → 0.57.11
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 +14 -0
- package/README.md +7 -1
- package/dist/chunks/{agent-candidate-GNEYR225.ts → agent-candidate-OCDPRI5G.ts} +12 -9
- package/dist/chunks/{agent-plan-3L7CRFDM.ts → agent-plan-P5B5RGZ7.ts} +22 -18
- package/dist/chunks/{agent-plan-3L7CRFDM.ts.map → agent-plan-P5B5RGZ7.ts.map} +1 -1
- package/dist/chunks/{agent-refusal-retry-RPTMUQXK.ts → agent-refusal-retry-476YGNU5.ts} +11 -8
- package/dist/chunks/{agent-refusal-retry-RPTMUQXK.ts.map → agent-refusal-retry-476YGNU5.ts.map} +1 -1
- package/dist/chunks/{agent-store-55CZOCPX.ts → agent-store-RJSMNOYP.ts} +12 -11
- package/dist/chunks/{agent-store-55CZOCPX.ts.map → agent-store-RJSMNOYP.ts.map} +1 -1
- package/dist/chunks/agent-sync-EUK2CPSS.ts +22 -0
- package/dist/chunks/{chunk-U3XRI2HF.ts → chunk-3IYAPMST.ts} +11 -11
- package/dist/chunks/{chunk-B4QZBDBT.ts → chunk-45COPAK7.ts} +10 -3
- package/dist/chunks/chunk-45COPAK7.ts.map +7 -0
- package/dist/chunks/chunk-5SFMBY5P.ts +26 -0
- package/dist/chunks/chunk-5SFMBY5P.ts.map +7 -0
- package/dist/chunks/{chunk-ED3TYIVW.ts → chunk-5TSCBBPP.ts} +5 -5
- package/dist/chunks/{chunk-5QAE3G3K.ts → chunk-67INJPKR.ts} +6 -6
- package/dist/chunks/{chunk-IWZH5KYS.ts → chunk-6LD5KX55.ts} +10 -10
- package/dist/chunks/{chunk-AAEEHR7H.ts → chunk-6O3EDBRL.ts} +2 -2
- package/dist/chunks/{chunk-CRKTAPSL.ts → chunk-7A35ZAVO.ts} +333 -237
- package/dist/chunks/chunk-7A35ZAVO.ts.map +7 -0
- package/dist/chunks/{chunk-6FVVRTL5.ts → chunk-7OLLPPLU.ts} +77 -63
- package/dist/chunks/chunk-7OLLPPLU.ts.map +7 -0
- package/dist/chunks/{chunk-PQW6GS4J.ts → chunk-7ZIYU5QS.ts} +12 -10
- package/dist/chunks/{chunk-PQW6GS4J.ts.map → chunk-7ZIYU5QS.ts.map} +1 -1
- package/dist/chunks/{chunk-S7QS4AWK.ts → chunk-AKMV47YC.ts} +5 -5
- package/dist/chunks/chunk-AR2DGDUI.ts +55 -0
- package/dist/chunks/chunk-AR2DGDUI.ts.map +7 -0
- package/dist/chunks/{chunk-GNH73BJ5.ts → chunk-BEST45H2.ts} +7 -7
- package/dist/chunks/chunk-CBLTWXAU.ts +114 -0
- package/dist/chunks/chunk-CBLTWXAU.ts.map +7 -0
- package/dist/chunks/{chunk-GP5DU62N.ts → chunk-CPT2BN6N.ts} +2 -2
- package/dist/chunks/{chunk-UPNVIUBN.ts → chunk-DN4IA7MR.ts} +6 -6
- package/dist/chunks/{chunk-PG7NMFP2.ts → chunk-DRTC4PKM.ts} +8 -8
- package/dist/chunks/chunk-ESKOPQVB.ts +348 -0
- package/dist/chunks/chunk-ESKOPQVB.ts.map +7 -0
- package/dist/chunks/{chunk-MKKF4IMY.ts → chunk-F7E3VFXU.ts} +5 -5
- package/dist/chunks/{chunk-HUZ5CR4W.ts → chunk-FHE2DCA2.ts} +3 -52
- package/dist/chunks/chunk-FHE2DCA2.ts.map +7 -0
- package/dist/chunks/{chunk-UBV24CG4.ts → chunk-FLHCOJCD.ts} +3 -3
- package/dist/chunks/chunk-GNYGNHFF.ts +27 -0
- package/dist/chunks/chunk-GNYGNHFF.ts.map +7 -0
- package/dist/chunks/chunk-KYTT7KV4.ts +319 -0
- package/dist/chunks/chunk-KYTT7KV4.ts.map +7 -0
- package/dist/chunks/{chunk-A6HU4ERM.ts → chunk-MKSMJPVA.ts} +6 -23
- package/dist/chunks/chunk-MKSMJPVA.ts.map +7 -0
- package/dist/chunks/{chunk-ORGBI36T.ts → chunk-OJARL2TG.ts} +4 -4
- package/dist/chunks/{chunk-JCH3VXIO.ts → chunk-OKPPZA4D.ts} +150 -91
- package/dist/chunks/chunk-OKPPZA4D.ts.map +7 -0
- package/dist/chunks/{chunk-QO333NM4.ts → chunk-OVBAW7KV.ts} +180 -133
- package/dist/chunks/chunk-OVBAW7KV.ts.map +7 -0
- package/dist/chunks/{chunk-GSNPASKB.ts → chunk-Q23JJW7E.ts} +6 -6
- package/dist/chunks/{chunk-YK52VDXG.ts → chunk-TIMWN2RH.ts} +10 -8
- package/dist/chunks/{chunk-YK52VDXG.ts.map → chunk-TIMWN2RH.ts.map} +1 -1
- package/dist/chunks/{chunk-UOHR7LRO.ts → chunk-TZC7GDJE.ts} +10 -22
- package/dist/chunks/chunk-TZC7GDJE.ts.map +7 -0
- package/dist/chunks/chunk-X7R6DCVF.ts +28 -0
- package/dist/chunks/chunk-X7R6DCVF.ts.map +7 -0
- package/dist/chunks/{chunk-76NB4R7U.ts → chunk-XJHQPB3E.ts} +2 -2
- package/dist/chunks/{chunk-BDB4IDM3.ts → chunk-Y4UVXOLQ.ts} +8 -6
- package/dist/chunks/{chunk-BDB4IDM3.ts.map → chunk-Y4UVXOLQ.ts.map} +1 -1
- package/dist/chunks/{chunk-P7DD5PWZ.ts → chunk-ZDDBZH72.ts} +3 -3
- package/dist/chunks/command-handler-F2E7A5T5.ts +548 -0
- package/dist/chunks/command-handler-F2E7A5T5.ts.map +7 -0
- package/dist/chunks/{config-KGIYTTXQ.ts → config-HYG7G5EM.ts} +7 -6
- package/dist/chunks/{conflict-artifacts-FXFIIBCB.ts → conflict-artifacts-J6WSDCWP.ts} +13 -9
- package/dist/chunks/{conflict-review-3X37QEIT.ts → conflict-review-2QMO2K6Q.ts} +31 -25
- package/dist/chunks/{conflict-review-3X37QEIT.ts.map → conflict-review-2QMO2K6Q.ts.map} +1 -1
- package/dist/chunks/{continuous-record-SQJ47CXN.ts → continuous-record-AH7JGYKM.ts} +8 -7
- package/dist/chunks/{continuous-sync-Q6QUD6TY.ts → continuous-sync-VRMXCA5X.ts} +33 -28
- package/dist/chunks/{continuous-sync-Q6QUD6TY.ts.map → continuous-sync-VRMXCA5X.ts.map} +1 -1
- package/dist/chunks/{file-selection-3JJYOVNR.ts → file-selection-IELTXSGZ.ts} +11 -10
- package/dist/chunks/{file-selection-3JJYOVNR.ts.map → file-selection-IELTXSGZ.ts.map} +1 -1
- package/dist/chunks/{git-backend-NYKSG5X6.ts → git-backend-KHD36W27.ts} +15 -12
- package/dist/chunks/{git-backend-NYKSG5X6.ts.map → git-backend-KHD36W27.ts.map} +1 -1
- package/dist/chunks/{local-fields-6DGYOOIK.ts → local-fields-JEKAPZKD.ts} +9 -5
- package/dist/chunks/manager-result-dispatcher-6W52NM7F.ts +32 -0
- package/dist/chunks/{manager-ui-ZH6DEC2G.ts → manager-ui-LM7DSJ2Y.ts} +124 -67
- package/dist/chunks/manager-ui-LM7DSJ2Y.ts.map +7 -0
- package/dist/chunks/{merge-baseline-store-RFCAH7KL.ts → merge-baseline-store-65GKUMXI.ts} +6 -5
- package/dist/chunks/remote-selection-ui-TD4C4W3J.ts +31 -0
- package/dist/chunks/{s3-backend-F7PR5FB3.ts → s3-backend-L24UZ6IK.ts} +24 -18
- package/dist/chunks/s3-backend-L24UZ6IK.ts.map +7 -0
- package/dist/chunks/{setup-switch-E7PHKI6J.ts → setup-switch-PIPXYPCW.ts} +6 -7
- package/dist/chunks/{setup-wizard-OVHZYXNW.ts → setup-wizard-RR5U3SUB.ts} +8 -9
- package/dist/chunks/{setup-wizard-OVHZYXNW.ts.map → setup-wizard-RR5U3SUB.ts.map} +1 -1
- package/dist/chunks/{snapshot-THS5EY2L.ts → snapshot-RGNDYT6A.ts} +10 -6
- package/dist/chunks/snapshot-transaction-26BQO36S.ts +24 -0
- package/dist/chunks/sync-inspection-MOMLGUTD.ts +25 -0
- package/dist/chunks/sync-inspection-MOMLGUTD.ts.map +7 -0
- package/dist/chunks/{sync-operations-Y72GNIQ2.ts → sync-operations-CV3TULLD.ts} +66 -57
- package/dist/chunks/{sync-operations-Y72GNIQ2.ts.map → sync-operations-CV3TULLD.ts.map} +1 -1
- package/dist/chunks/{sync-state-CFL4RRRB.ts → sync-state-7L4NT7W2.ts} +8 -5
- package/dist/chunks/sync-state-7L4NT7W2.ts.map +7 -0
- package/dist/chunks/{webdav-backend-TGFUH3SF.ts → webdav-backend-3ZCACILP.ts} +15 -12
- package/dist/chunks/{webdav-backend-TGFUH3SF.ts.map → webdav-backend-3ZCACILP.ts.map} +1 -1
- package/dist/index.ts +54 -537
- package/dist/index.ts.map +3 -3
- package/package.json +2 -2
- package/skills/configure-pi-sync/references/configuration.md +8 -1
- package/src/backends/s3/s3-client.ts +8 -1
- package/src/commands/command-execution.ts +8 -3
- package/src/paths.ts +6 -1
- package/src/settings/config-file.ts +205 -118
- package/src/settings/config.ts +2 -2
- package/src/settings/settings-management.ts +15 -1
- package/src/settings/settings-store.ts +0 -14
- package/src/settings/settings-validation.ts +1 -1
- package/src/snapshot/session-paths.ts +15 -2
- package/src/snapshot/snapshot-mutation-queues.ts +142 -0
- package/src/snapshot/snapshot-transaction-directory.ts +16 -0
- package/src/snapshot/snapshot-transaction.ts +123 -137
- package/src/sync/automatic-sync.ts +12 -6
- package/src/sync/local-field-policy.ts +29 -0
- package/src/sync/local-fields.ts +3 -29
- package/src/sync/merge-apply.ts +6 -0
- package/src/sync/mutation-owner.ts +22 -0
- package/src/sync/startup-check.ts +3 -2
- package/src/sync/sync-loaders.ts +4 -0
- package/src/sync/sync-local.ts +2 -19
- package/src/sync-extension.ts +7 -2
- package/src/ui/cancellable-operation.ts +36 -13
- package/src/ui/manager-state.ts +3 -1
- package/src/ui/manager-ui.ts +76 -24
- package/src/ui/remote-selection-ui.ts +131 -82
- package/src/ui/settings-ui.ts +2 -1
- package/dist/chunks/chunk-6FVVRTL5.ts.map +0 -7
- package/dist/chunks/chunk-A6HU4ERM.ts.map +0 -7
- package/dist/chunks/chunk-B4QZBDBT.ts.map +0 -7
- package/dist/chunks/chunk-CRKTAPSL.ts.map +0 -7
- package/dist/chunks/chunk-HUZ5CR4W.ts.map +0 -7
- package/dist/chunks/chunk-JCH3VXIO.ts.map +0 -7
- package/dist/chunks/chunk-QO333NM4.ts.map +0 -7
- package/dist/chunks/chunk-QOFMXPM5.ts +0 -735
- package/dist/chunks/chunk-QOFMXPM5.ts.map +0 -7
- package/dist/chunks/chunk-UOHR7LRO.ts.map +0 -7
- package/dist/chunks/manager-result-dispatcher-HOCM2GDA.ts +0 -24
- package/dist/chunks/manager-ui-ZH6DEC2G.ts.map +0 -7
- package/dist/chunks/remote-selection-ui-YFPGYGNE.ts +0 -23
- package/dist/chunks/s3-backend-F7PR5FB3.ts.map +0 -7
- package/dist/chunks/sync-inspection-J25EEKZK.ts +0 -21
- /package/dist/chunks/{agent-candidate-GNEYR225.ts.map → agent-candidate-OCDPRI5G.ts.map} +0 -0
- /package/dist/chunks/{config-KGIYTTXQ.ts.map → agent-sync-EUK2CPSS.ts.map} +0 -0
- /package/dist/chunks/{chunk-U3XRI2HF.ts.map → chunk-3IYAPMST.ts.map} +0 -0
- /package/dist/chunks/{chunk-ED3TYIVW.ts.map → chunk-5TSCBBPP.ts.map} +0 -0
- /package/dist/chunks/{chunk-5QAE3G3K.ts.map → chunk-67INJPKR.ts.map} +0 -0
- /package/dist/chunks/{chunk-IWZH5KYS.ts.map → chunk-6LD5KX55.ts.map} +0 -0
- /package/dist/chunks/{chunk-AAEEHR7H.ts.map → chunk-6O3EDBRL.ts.map} +0 -0
- /package/dist/chunks/{chunk-S7QS4AWK.ts.map → chunk-AKMV47YC.ts.map} +0 -0
- /package/dist/chunks/{chunk-GNH73BJ5.ts.map → chunk-BEST45H2.ts.map} +0 -0
- /package/dist/chunks/{chunk-GP5DU62N.ts.map → chunk-CPT2BN6N.ts.map} +0 -0
- /package/dist/chunks/{chunk-UPNVIUBN.ts.map → chunk-DN4IA7MR.ts.map} +0 -0
- /package/dist/chunks/{chunk-PG7NMFP2.ts.map → chunk-DRTC4PKM.ts.map} +0 -0
- /package/dist/chunks/{chunk-MKKF4IMY.ts.map → chunk-F7E3VFXU.ts.map} +0 -0
- /package/dist/chunks/{chunk-UBV24CG4.ts.map → chunk-FLHCOJCD.ts.map} +0 -0
- /package/dist/chunks/{chunk-ORGBI36T.ts.map → chunk-OJARL2TG.ts.map} +0 -0
- /package/dist/chunks/{chunk-GSNPASKB.ts.map → chunk-Q23JJW7E.ts.map} +0 -0
- /package/dist/chunks/{chunk-76NB4R7U.ts.map → chunk-XJHQPB3E.ts.map} +0 -0
- /package/dist/chunks/{chunk-P7DD5PWZ.ts.map → chunk-ZDDBZH72.ts.map} +0 -0
- /package/dist/chunks/{conflict-artifacts-FXFIIBCB.ts.map → config-HYG7G5EM.ts.map} +0 -0
- /package/dist/chunks/{continuous-record-SQJ47CXN.ts.map → conflict-artifacts-J6WSDCWP.ts.map} +0 -0
- /package/dist/chunks/{local-fields-6DGYOOIK.ts.map → continuous-record-AH7JGYKM.ts.map} +0 -0
- /package/dist/chunks/{manager-result-dispatcher-HOCM2GDA.ts.map → local-fields-JEKAPZKD.ts.map} +0 -0
- /package/dist/chunks/{merge-baseline-store-RFCAH7KL.ts.map → manager-result-dispatcher-6W52NM7F.ts.map} +0 -0
- /package/dist/chunks/{remote-selection-ui-YFPGYGNE.ts.map → merge-baseline-store-65GKUMXI.ts.map} +0 -0
- /package/dist/chunks/{setup-switch-E7PHKI6J.ts.map → remote-selection-ui-TD4C4W3J.ts.map} +0 -0
- /package/dist/chunks/{snapshot-THS5EY2L.ts.map → setup-switch-PIPXYPCW.ts.map} +0 -0
- /package/dist/chunks/{sync-inspection-J25EEKZK.ts.map → snapshot-RGNDYT6A.ts.map} +0 -0
- /package/dist/chunks/{sync-state-CFL4RRRB.ts.map → snapshot-transaction-26BQO36S.ts.map} +0 -0
|
@@ -1,5 +1,12 @@
|
|
|
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
|
+
SETUP_SWITCH_ACTION_OPTIONS,
|
|
5
|
+
saveOnSwitch,
|
|
6
|
+
setupSwitchActionFromLabel,
|
|
7
|
+
setupSwitchActionLabel,
|
|
8
|
+
useSyncSetup
|
|
9
|
+
} from "./chunk-CPT2BN6N.ts";
|
|
3
10
|
import {
|
|
4
11
|
applyS3CredentialUpdate,
|
|
5
12
|
chooseS3CredentialUpdate,
|
|
@@ -19,43 +26,41 @@ import {
|
|
|
19
26
|
showEditS3Target,
|
|
20
27
|
showEditWebDavStorageProfile,
|
|
21
28
|
showEditWebDavTarget
|
|
22
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-3IYAPMST.ts";
|
|
30
|
+
import {
|
|
31
|
+
automaticSyncSummary
|
|
32
|
+
} from "./chunk-ECYCNZOE.ts";
|
|
23
33
|
import {
|
|
24
34
|
dispatchManagerResult
|
|
25
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-ZDDBZH72.ts";
|
|
26
36
|
import {
|
|
27
37
|
runCancellableOperation
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import {
|
|
32
|
-
SETUP_SWITCH_ACTION_OPTIONS,
|
|
33
|
-
saveOnSwitch,
|
|
34
|
-
setupSwitchActionFromLabel,
|
|
35
|
-
setupSwitchActionLabel,
|
|
36
|
-
useSyncSetup
|
|
37
|
-
} from "./chunk-GP5DU62N.ts";
|
|
38
|
+
} from "./chunk-OKPPZA4D.ts";
|
|
39
|
+
import "./chunk-TIMWN2RH.ts";
|
|
40
|
+
import "./chunk-OJARL2TG.ts";
|
|
38
41
|
import {
|
|
39
42
|
confirmMergeReview
|
|
40
43
|
} from "./chunk-KHBPED6W.ts";
|
|
44
|
+
import "./chunk-TZC7GDJE.ts";
|
|
41
45
|
import {
|
|
42
46
|
addStorageConnection,
|
|
43
47
|
removeStorageConnection,
|
|
44
48
|
removeSyncSetup,
|
|
45
49
|
updateStorageConnection,
|
|
46
50
|
updateSyncSetup
|
|
47
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-45COPAK7.ts";
|
|
52
|
+
import "./chunk-FLHCOJCD.ts";
|
|
53
|
+
import {
|
|
54
|
+
syncErrorGuidance
|
|
55
|
+
} from "./chunk-G4RUXRWZ.ts";
|
|
56
|
+
import {
|
|
57
|
+
sameLocalFields
|
|
58
|
+
} from "./chunk-MKSMJPVA.ts";
|
|
48
59
|
import {
|
|
49
60
|
observationMatchesConfig,
|
|
50
61
|
observationSummary,
|
|
51
62
|
syncAttentionMatchesConfig
|
|
52
|
-
} from "./chunk-
|
|
53
|
-
import {
|
|
54
|
-
automaticSyncSummary
|
|
55
|
-
} from "./chunk-ECYCNZOE.ts";
|
|
56
|
-
import {
|
|
57
|
-
configureSyncStatus
|
|
58
|
-
} from "./chunk-K3RIEL6J.ts";
|
|
63
|
+
} from "./chunk-Q23JJW7E.ts";
|
|
59
64
|
import {
|
|
60
65
|
AUTOMATIC_SYNC_DESCRIPTION,
|
|
61
66
|
STARTUP_TRANSFER_DESCRIPTION,
|
|
@@ -63,14 +68,13 @@ import {
|
|
|
63
68
|
} from "./chunk-NLWS55B6.ts";
|
|
64
69
|
import {
|
|
65
70
|
captureMutationOwner
|
|
66
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-GNYGNHFF.ts";
|
|
67
72
|
import {
|
|
68
73
|
safeTerminalText
|
|
69
74
|
} from "./chunk-AMJRUXFT.ts";
|
|
70
|
-
import "./chunk-UBV24CG4.ts";
|
|
71
75
|
import {
|
|
72
|
-
|
|
73
|
-
} from "./chunk-
|
|
76
|
+
configureSyncStatus
|
|
77
|
+
} from "./chunk-K3RIEL6J.ts";
|
|
74
78
|
import {
|
|
75
79
|
errorMessage
|
|
76
80
|
} from "./chunk-7D5SF7P3.ts";
|
|
@@ -88,32 +92,34 @@ import {
|
|
|
88
92
|
syncCheckConfigFingerprint,
|
|
89
93
|
syncConfigReviewIdentity,
|
|
90
94
|
updateLocalConfig
|
|
91
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-OVBAW7KV.ts";
|
|
92
96
|
import {
|
|
93
|
-
normalizeLocalFields
|
|
94
|
-
|
|
95
|
-
} from "./chunk-A6HU4ERM.ts";
|
|
97
|
+
normalizeLocalFields
|
|
98
|
+
} from "./chunk-X7R6DCVF.ts";
|
|
96
99
|
import {
|
|
97
100
|
inspectLock,
|
|
98
101
|
isLockGuardHeld,
|
|
99
102
|
isStaleLock
|
|
100
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-6O3EDBRL.ts";
|
|
101
104
|
import {
|
|
102
105
|
throwIfAborted
|
|
103
106
|
} from "./chunk-PWMWOJP4.ts";
|
|
104
|
-
import {
|
|
105
|
-
compareSyncInclude,
|
|
106
|
-
syncIncludeSelection
|
|
107
|
-
} from "./chunk-QOFMXPM5.ts";
|
|
108
107
|
import "./chunk-ZW5ZLGBI.ts";
|
|
109
108
|
import {
|
|
110
109
|
readStateForConfig,
|
|
111
110
|
syncStateFingerprint
|
|
112
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-DN4IA7MR.ts";
|
|
112
|
+
import "./chunk-AR2DGDUI.ts";
|
|
113
113
|
import "./chunk-SWRVXVFD.ts";
|
|
114
114
|
import "./chunk-2JZFHNLM.ts";
|
|
115
115
|
import "./chunk-T2SJD3N7.ts";
|
|
116
|
-
import "./chunk-
|
|
116
|
+
import "./chunk-ESKOPQVB.ts";
|
|
117
|
+
import {
|
|
118
|
+
compareSyncInclude,
|
|
119
|
+
syncIncludeSelection
|
|
120
|
+
} from "./chunk-KYTT7KV4.ts";
|
|
121
|
+
import "./chunk-CBLTWXAU.ts";
|
|
122
|
+
import "./chunk-FHE2DCA2.ts";
|
|
117
123
|
|
|
118
124
|
// src/ui/manager-ui.ts
|
|
119
125
|
import { defineMenu as defineMenu5, runMenu as runMenu5 } from "@narumitw/pi-tui-kit";
|
|
@@ -184,7 +190,7 @@ function blockedSyncMenuItem(label, manager) {
|
|
|
184
190
|
};
|
|
185
191
|
}
|
|
186
192
|
async function showManagerAttention(ctx, attention, runRoute, signal, onSelectionResolved) {
|
|
187
|
-
const { showRemoteSelectionReview } = await import("./remote-selection-ui-
|
|
193
|
+
const { showRemoteSelectionReview } = await import("./remote-selection-ui-TD4C4W3J.ts");
|
|
188
194
|
if (signal?.aborted) return "close";
|
|
189
195
|
const review = await showRemoteSelectionReview(ctx, attention.decision.setupName, signal, void 0, {
|
|
190
196
|
decision: attention.decision,
|
|
@@ -554,7 +560,7 @@ async function describeManagerState(signal, attention, inspectOperation = inspec
|
|
|
554
560
|
`Automatic sync: ${automaticSyncSummary(config.automatic)}`,
|
|
555
561
|
`Startup transfer: ${startupTransferSummary(config)}`,
|
|
556
562
|
`Agent mode: ${config.agentMode ? "On (experimental; autonomous merged sync)" : "Off"}`,
|
|
557
|
-
...config.continuous ? await (await import("./continuous-record-
|
|
563
|
+
...config.continuous ? await (await import("./continuous-record-AH7JGYKM.ts")).continuousStatusLines(config) : [],
|
|
558
564
|
`Last applied: ${lastAppliedSnapshot}`,
|
|
559
565
|
...noSyncedContent ? ["", "No included content is selected. Choose included content in Settings before syncing."] : [],
|
|
560
566
|
"",
|
|
@@ -563,6 +569,7 @@ async function describeManagerState(signal, attention, inspectOperation = inspec
|
|
|
563
569
|
return {
|
|
564
570
|
title: (changesBlocked ? ["Manage sync", ...operationStatusLines(operation)] : ordinaryTitle).join("\n"),
|
|
565
571
|
actions: operationActions(operation, noSyncedContent, canSwitch, mainActions),
|
|
572
|
+
configReview: { setupName: config.setupName, fingerprint: syncCheckConfigFingerprint(config) },
|
|
566
573
|
operation,
|
|
567
574
|
...currentObservation ? { observation: currentObservation } : {},
|
|
568
575
|
...currentAttention ? {
|
|
@@ -1309,7 +1316,7 @@ async function showRemoveTarget(ctx, name, signal) {
|
|
|
1309
1316
|
}
|
|
1310
1317
|
|
|
1311
1318
|
// src/ui/settings-ui.ts
|
|
1312
|
-
async function showSyncSettings(ctx, runRoute, signal) {
|
|
1319
|
+
async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
|
|
1313
1320
|
let disposition = "back";
|
|
1314
1321
|
const exitSettings = () => {
|
|
1315
1322
|
disposition = "exit";
|
|
@@ -1346,7 +1353,7 @@ async function showSyncSettings(ctx, runRoute, signal) {
|
|
|
1346
1353
|
}
|
|
1347
1354
|
return disposition;
|
|
1348
1355
|
}
|
|
1349
|
-
const initial = await loadConfig();
|
|
1356
|
+
const initial = await loadConfig(reviewedSetup);
|
|
1350
1357
|
if (signal?.aborted) return "back";
|
|
1351
1358
|
const setupName = initial.setupName;
|
|
1352
1359
|
const groups = {
|
|
@@ -1797,7 +1804,7 @@ async function showSyncSettings(ctx, runRoute, signal) {
|
|
|
1797
1804
|
},
|
|
1798
1805
|
"remote-include": async ({ signal: actionSignal }) => {
|
|
1799
1806
|
const reviewSignal = signal ? AbortSignal.any([signal, actionSignal]) : actionSignal;
|
|
1800
|
-
const { showRemoteSelectionReview } = await import("./remote-selection-ui-
|
|
1807
|
+
const { showRemoteSelectionReview } = await import("./remote-selection-ui-TD4C4W3J.ts");
|
|
1801
1808
|
if (reviewSignal.aborted) return { kind: "rejected" };
|
|
1802
1809
|
const review = await showRemoteSelectionReview(ctx, setupName, reviewSignal, void 0, {
|
|
1803
1810
|
origin: "settings",
|
|
@@ -1864,6 +1871,15 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
|
|
|
1864
1871
|
await runRoute("help");
|
|
1865
1872
|
return;
|
|
1866
1873
|
}
|
|
1874
|
+
const validateOwner = captureMutationOwner(ctx, sessionSignal);
|
|
1875
|
+
const isCurrent = () => {
|
|
1876
|
+
try {
|
|
1877
|
+
validateOwner();
|
|
1878
|
+
return true;
|
|
1879
|
+
} catch {
|
|
1880
|
+
return false;
|
|
1881
|
+
}
|
|
1882
|
+
};
|
|
1867
1883
|
const menu = defineMenu5({
|
|
1868
1884
|
start: "main",
|
|
1869
1885
|
screens: {
|
|
@@ -1887,12 +1903,13 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
|
|
|
1887
1903
|
}
|
|
1888
1904
|
},
|
|
1889
1905
|
actions: {
|
|
1890
|
-
"review-attention": async () => {
|
|
1891
|
-
const attention =
|
|
1906
|
+
"review-attention": async ({ state }) => {
|
|
1907
|
+
const attention = state.manager.attention;
|
|
1908
|
+
if (attention && options.getAttention?.() !== attention) return { kind: "stay" };
|
|
1892
1909
|
if (!attention) {
|
|
1893
|
-
const observation =
|
|
1910
|
+
const observation = state.manager.observation;
|
|
1894
1911
|
if (!observation) return { kind: "stay" };
|
|
1895
|
-
const { showRemoteSelectionReview } = await import("./remote-selection-ui-
|
|
1912
|
+
const { showRemoteSelectionReview } = await import("./remote-selection-ui-TD4C4W3J.ts");
|
|
1896
1913
|
if (sessionSignal?.aborted) return { kind: "close" };
|
|
1897
1914
|
const config = await loadConfig();
|
|
1898
1915
|
if (sessionSignal?.aborted) return { kind: "close" };
|
|
@@ -1923,24 +1940,21 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
|
|
|
1923
1940
|
);
|
|
1924
1941
|
return { kind: disposition };
|
|
1925
1942
|
},
|
|
1926
|
-
sync: async () => {
|
|
1943
|
+
sync: async ({ state }) => {
|
|
1927
1944
|
const pendingAttention = options.getAttention?.();
|
|
1928
|
-
if (pendingAttention) {
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
if (pendingAttention.decision.setupName === activeConfig.setupName) {
|
|
1932
|
-
ctx.ui.notify("Review synced content before starting Sync now.", "warning");
|
|
1933
|
-
return { kind: "stay" };
|
|
1934
|
-
}
|
|
1945
|
+
if (pendingAttention?.decision.setupName === state.manager.configReview?.setupName) {
|
|
1946
|
+
ctx.ui.notify("Review synced content before starting Sync now.", "warning");
|
|
1947
|
+
return { kind: "stay" };
|
|
1935
1948
|
}
|
|
1936
1949
|
const result = await runCancellableOperation(ctx, "Checking current sync setup\u2026", "sync", runRoute, {
|
|
1937
1950
|
commitAware: true,
|
|
1938
|
-
signal: sessionSignal
|
|
1951
|
+
signal: sessionSignal,
|
|
1952
|
+
target: state.manager.configReview?.setupName
|
|
1939
1953
|
});
|
|
1940
1954
|
const disposition = await dispatchManagerResult(ctx, result, "sync", runRoute, sessionSignal);
|
|
1941
1955
|
return disposition.kind === "close" ? { kind: "close" } : { kind: "stay" };
|
|
1942
1956
|
},
|
|
1943
|
-
"retry-refusal": async ({ signal: actionSignal }) => {
|
|
1957
|
+
"retry-refusal": async ({ state, signal: actionSignal }) => {
|
|
1944
1958
|
const signal = sessionSignal ? AbortSignal.any([sessionSignal, actionSignal]) : actionSignal;
|
|
1945
1959
|
const validate = captureMutationOwner(ctx, signal);
|
|
1946
1960
|
validate();
|
|
@@ -1949,6 +1963,7 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
|
|
|
1949
1963
|
commitAware: true,
|
|
1950
1964
|
cancelAcrossDialogs: true,
|
|
1951
1965
|
signal,
|
|
1966
|
+
target: state.manager.configReview?.setupName,
|
|
1952
1967
|
cancelledMessage: "Model retry cancelled. Submitted requests and committed writes cannot be undone."
|
|
1953
1968
|
});
|
|
1954
1969
|
if (signal.aborted) return { kind: "close" };
|
|
@@ -1964,23 +1979,25 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
|
|
|
1964
1979
|
const result = await showSetupSwitcher(ctx, runRoute, void 0, sessionSignal);
|
|
1965
1980
|
return result === "pull-attempted" || result === "closed" ? { kind: "close" } : { kind: "stay" };
|
|
1966
1981
|
},
|
|
1967
|
-
settings: async () => {
|
|
1968
|
-
const result = await showSyncSettings(ctx, runRoute, sessionSignal);
|
|
1982
|
+
settings: async ({ state }) => {
|
|
1983
|
+
const result = await showSyncSettings(ctx, runRoute, sessionSignal, state.manager.configReview?.setupName);
|
|
1969
1984
|
return { kind: result === "exit" ? "close" : "stay" };
|
|
1970
1985
|
},
|
|
1971
|
-
pull: async () => {
|
|
1986
|
+
pull: async ({ state }) => {
|
|
1972
1987
|
const result = await runCancellableOperation(ctx, "Checking remote changes\u2026", "pull", runRoute, {
|
|
1973
1988
|
commitAware: true,
|
|
1974
1989
|
cancelledMessage: "Pull check cancelled; no local files were changed.",
|
|
1990
|
+
target: state.manager.configReview?.setupName,
|
|
1975
1991
|
signal: sessionSignal
|
|
1976
1992
|
});
|
|
1977
1993
|
const disposition = await dispatchManagerResult(ctx, result, "pull", runRoute, sessionSignal);
|
|
1978
1994
|
return disposition.kind === "close" ? { kind: "close" } : { kind: "stay" };
|
|
1979
1995
|
},
|
|
1980
|
-
push: async () => {
|
|
1996
|
+
push: async ({ state }) => {
|
|
1981
1997
|
const result = await runCancellableOperation(ctx, "Preparing push preview\u2026", "push", runRoute, {
|
|
1982
1998
|
commitAware: true,
|
|
1983
1999
|
cancelledMessage: "Push preparation cancelled; no remote files were changed.",
|
|
2000
|
+
target: state.manager.configReview?.setupName,
|
|
1984
2001
|
signal: sessionSignal
|
|
1985
2002
|
});
|
|
1986
2003
|
const disposition = await dispatchManagerResult(ctx, result, "push", runRoute, sessionSignal);
|
|
@@ -1994,31 +2011,34 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
|
|
|
1994
2011
|
await showStorageConnections(ctx, sessionSignal);
|
|
1995
2012
|
return { kind: "stay" };
|
|
1996
2013
|
},
|
|
1997
|
-
history: async () => {
|
|
2014
|
+
history: async ({ state }) => {
|
|
1998
2015
|
const result = await runCancellableOperation(ctx, "Loading sync history\u2026", "history", runRoute, {
|
|
1999
2016
|
signal: sessionSignal,
|
|
2000
2017
|
commitAware: true,
|
|
2001
2018
|
cancelAcrossDialogs: true,
|
|
2019
|
+
target: state.manager.configReview?.setupName,
|
|
2002
2020
|
cancelledMessage: "History review cancelled; no files were changed."
|
|
2003
2021
|
});
|
|
2004
2022
|
return { kind: result.kind === "closed" ? "close" : "stay" };
|
|
2005
2023
|
},
|
|
2006
|
-
diff: async () => {
|
|
2024
|
+
diff: async ({ state }) => {
|
|
2007
2025
|
const result = await runCancellableOperation(ctx, "Comparing local and remote\u2026", "diff", runRoute, {
|
|
2026
|
+
target: state.manager.configReview?.setupName,
|
|
2008
2027
|
signal: sessionSignal
|
|
2009
2028
|
});
|
|
2010
2029
|
return { kind: result.kind === "closed" ? "close" : "stay" };
|
|
2011
2030
|
},
|
|
2012
|
-
status: async () => {
|
|
2031
|
+
status: async ({ state }) => {
|
|
2013
2032
|
const result = await runCancellableOperation(ctx, "Checking remote status\u2026", "status", runRoute, {
|
|
2033
|
+
target: state.manager.configReview?.setupName,
|
|
2014
2034
|
signal: sessionSignal
|
|
2015
2035
|
});
|
|
2016
2036
|
return { kind: result.kind === "closed" ? "close" : "stay" };
|
|
2017
2037
|
},
|
|
2018
|
-
doctor: async ({ signal: actionSignal }) => {
|
|
2038
|
+
doctor: async ({ state, signal: actionSignal }) => {
|
|
2019
2039
|
const signal = sessionSignal ? AbortSignal.any([sessionSignal, actionSignal]) : actionSignal;
|
|
2020
2040
|
const validate = captureMutationOwner(ctx, signal);
|
|
2021
|
-
const config = await loadConfig();
|
|
2041
|
+
const config = await loadConfig(state.manager.configReview?.setupName);
|
|
2022
2042
|
validate();
|
|
2023
2043
|
const confirmed = await ctx.ui.confirm(
|
|
2024
2044
|
"Run diagnostics?",
|
|
@@ -2052,11 +2072,12 @@ S3/R2 reads the latest pointer without writing. Git reads remote snapshots and c
|
|
|
2052
2072
|
return { kind: "close" };
|
|
2053
2073
|
},
|
|
2054
2074
|
init: async () => {
|
|
2055
|
-
await runRoute("init");
|
|
2075
|
+
await runRoute("init", sessionSignal);
|
|
2056
2076
|
return { kind: "stay" };
|
|
2057
2077
|
},
|
|
2058
|
-
conflicts: async () => {
|
|
2078
|
+
conflicts: async ({ state }) => {
|
|
2059
2079
|
const result = await runCancellableOperation(ctx, "Reviewing private conflicts\u2026", "conflicts", runRoute, {
|
|
2080
|
+
target: state.manager.configReview?.setupName,
|
|
2060
2081
|
commitAware: true,
|
|
2061
2082
|
signal: sessionSignal
|
|
2062
2083
|
});
|
|
@@ -2065,6 +2086,42 @@ S3/R2 reads the latest pointer without writing. Git reads remote snapshots and c
|
|
|
2065
2086
|
}
|
|
2066
2087
|
}
|
|
2067
2088
|
});
|
|
2089
|
+
for (const action of [
|
|
2090
|
+
"review-attention",
|
|
2091
|
+
"sync",
|
|
2092
|
+
"retry-refusal",
|
|
2093
|
+
"settings",
|
|
2094
|
+
"pull",
|
|
2095
|
+
"push",
|
|
2096
|
+
"history",
|
|
2097
|
+
"diff",
|
|
2098
|
+
"status",
|
|
2099
|
+
"doctor",
|
|
2100
|
+
"conflicts"
|
|
2101
|
+
]) {
|
|
2102
|
+
const activate = menu.actions[action];
|
|
2103
|
+
menu.actions[action] = async (invocation) => {
|
|
2104
|
+
validateOwner();
|
|
2105
|
+
const review = invocation.state.manager.configReview;
|
|
2106
|
+
let current = false;
|
|
2107
|
+
try {
|
|
2108
|
+
const config = await loadConfig();
|
|
2109
|
+
validateOwner();
|
|
2110
|
+
invocation.signal.throwIfAborted();
|
|
2111
|
+
current = review?.fingerprint === syncCheckConfigFingerprint(config);
|
|
2112
|
+
} catch {
|
|
2113
|
+
if (!isCurrent() || invocation.signal.aborted) return { kind: "close" };
|
|
2114
|
+
}
|
|
2115
|
+
if (!current) {
|
|
2116
|
+
ctx.ui.notify(
|
|
2117
|
+
"Sync setup changed while the manager was open. Review the refreshed setup before continuing.",
|
|
2118
|
+
"warning"
|
|
2119
|
+
);
|
|
2120
|
+
return { kind: "stay" };
|
|
2121
|
+
}
|
|
2122
|
+
return activate(invocation);
|
|
2123
|
+
};
|
|
2124
|
+
}
|
|
2068
2125
|
const menuContext = {
|
|
2069
2126
|
...ctx,
|
|
2070
2127
|
ui: {
|
|
@@ -2095,7 +2152,7 @@ S3/R2 reads the latest pointer without writing. Git reads remote snapshots and c
|
|
|
2095
2152
|
return { manager };
|
|
2096
2153
|
},
|
|
2097
2154
|
signal: sessionSignal,
|
|
2098
|
-
isCurrent
|
|
2155
|
+
isCurrent
|
|
2099
2156
|
});
|
|
2100
2157
|
}
|
|
2101
2158
|
function syncMainMenuItem(label) {
|
|
@@ -2131,4 +2188,4 @@ function syncMainMenuItem(label) {
|
|
|
2131
2188
|
export {
|
|
2132
2189
|
showSyncManager
|
|
2133
2190
|
};
|
|
2134
|
-
//# sourceMappingURL=manager-ui-
|
|
2191
|
+
//# sourceMappingURL=manager-ui-LM7DSJ2Y.ts.map
|