@narumitw/pi-sync 0.57.10 → 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 +6 -0
- package/README.md +5 -1
- package/dist/chunks/{agent-candidate-EYB35AGL.ts → agent-candidate-OCDPRI5G.ts} +11 -11
- package/dist/chunks/{agent-plan-KO43GTOR.ts → agent-plan-P5B5RGZ7.ts} +14 -14
- package/dist/chunks/{agent-refusal-retry-C2HQROTP.ts → agent-refusal-retry-476YGNU5.ts} +10 -10
- package/dist/chunks/{agent-store-UT52DS7B.ts → agent-store-RJSMNOYP.ts} +7 -7
- package/dist/chunks/{agent-sync-VM3TXWA3.ts → agent-sync-EUK2CPSS.ts} +6 -6
- package/dist/chunks/{chunk-UCD7TQDT.ts → chunk-3IYAPMST.ts} +4 -4
- package/dist/chunks/{chunk-JXWTEJS5.ts → chunk-45COPAK7.ts} +10 -3
- package/dist/chunks/chunk-45COPAK7.ts.map +7 -0
- package/dist/chunks/{chunk-DOJRPBQU.ts → chunk-5TSCBBPP.ts} +4 -4
- package/dist/chunks/{chunk-IMMMZUFC.ts → chunk-67INJPKR.ts} +4 -4
- package/dist/chunks/{chunk-CDQGSZL3.ts → chunk-6LD5KX55.ts} +6 -6
- package/dist/chunks/{chunk-MDUORMCK.ts → chunk-6O3EDBRL.ts} +2 -2
- package/dist/chunks/{chunk-AAPAHANE.ts → chunk-7A35ZAVO.ts} +320 -219
- package/dist/chunks/chunk-7A35ZAVO.ts.map +7 -0
- package/dist/chunks/{chunk-2VSN3MFX.ts → chunk-7OLLPPLU.ts} +29 -23
- package/dist/chunks/chunk-7OLLPPLU.ts.map +7 -0
- package/dist/chunks/{chunk-STVQQ5KG.ts → chunk-7ZIYU5QS.ts} +6 -6
- package/dist/chunks/{chunk-AO6EDUA6.ts → chunk-AKMV47YC.ts} +3 -3
- package/dist/chunks/{chunk-66GAUVDL.ts → chunk-BEST45H2.ts} +6 -6
- package/dist/chunks/{chunk-DO55XUNU.ts → chunk-CBLTWXAU.ts} +15 -5
- package/dist/chunks/chunk-CBLTWXAU.ts.map +7 -0
- package/dist/chunks/{chunk-PWA3YN5Z.ts → chunk-CPT2BN6N.ts} +2 -2
- package/dist/chunks/{chunk-73MDIVYJ.ts → chunk-DN4IA7MR.ts} +6 -6
- package/dist/chunks/{chunk-4RLATUP4.ts → chunk-DRTC4PKM.ts} +6 -6
- package/dist/chunks/{chunk-PHANBTVM.ts → chunk-ESKOPQVB.ts} +4 -4
- package/dist/chunks/{chunk-ODF2M4RF.ts → chunk-F7E3VFXU.ts} +5 -5
- package/dist/chunks/{chunk-YZ5BQNRZ.ts → chunk-FHE2DCA2.ts} +2 -2
- package/dist/chunks/{chunk-YZ5BQNRZ.ts.map → chunk-FHE2DCA2.ts.map} +2 -2
- package/dist/chunks/{chunk-MRIPZGPR.ts → chunk-FLHCOJCD.ts} +3 -3
- package/dist/chunks/{chunk-5WJQ6XOW.ts → chunk-GNYGNHFF.ts} +2 -2
- package/dist/chunks/{chunk-DFJGTVPX.ts → chunk-KYTT7KV4.ts} +2 -2
- package/dist/chunks/{chunk-UGSSZWQ6.ts → chunk-MKSMJPVA.ts} +2 -2
- package/dist/chunks/{chunk-RAMHGOX2.ts → chunk-OJARL2TG.ts} +4 -4
- package/dist/chunks/{chunk-BJXSCGQK.ts → chunk-OKPPZA4D.ts} +148 -89
- package/dist/chunks/chunk-OKPPZA4D.ts.map +7 -0
- package/dist/chunks/{chunk-RX3WGWVL.ts → chunk-OVBAW7KV.ts} +177 -130
- package/dist/chunks/chunk-OVBAW7KV.ts.map +7 -0
- package/dist/chunks/{chunk-U77DWNRH.ts → chunk-Q23JJW7E.ts} +3 -3
- package/dist/chunks/{chunk-QWV3XKNJ.ts → chunk-TIMWN2RH.ts} +5 -5
- package/dist/chunks/{chunk-Z5O2TLNF.ts → chunk-TZC7GDJE.ts} +7 -7
- package/dist/chunks/{chunk-TO2GMX3K.ts → chunk-XJHQPB3E.ts} +2 -2
- package/dist/chunks/{chunk-JY2RVOUL.ts → chunk-Y4UVXOLQ.ts} +5 -5
- package/dist/chunks/{chunk-M5IV3KL2.ts → chunk-ZDDBZH72.ts} +3 -3
- package/dist/chunks/{command-handler-FO6F2APH.ts → command-handler-F2E7A5T5.ts} +22 -17
- package/dist/chunks/command-handler-F2E7A5T5.ts.map +7 -0
- package/dist/chunks/{config-B37W7FXW.ts → config-HYG7G5EM.ts} +6 -4
- package/dist/chunks/{conflict-artifacts-6XGSSU5S.ts → conflict-artifacts-J6WSDCWP.ts} +12 -12
- package/dist/chunks/{conflict-review-BQSHSJB3.ts → conflict-review-2QMO2K6Q.ts} +23 -23
- package/dist/chunks/{continuous-record-4DQ2EAZS.ts → continuous-record-AH7JGYKM.ts} +6 -6
- package/dist/chunks/{continuous-sync-ZT3UEQLK.ts → continuous-sync-VRMXCA5X.ts} +18 -18
- package/dist/chunks/{file-selection-FBLKM25V.ts → file-selection-IELTXSGZ.ts} +6 -7
- package/dist/chunks/{file-selection-FBLKM25V.ts.map → file-selection-IELTXSGZ.ts.map} +1 -1
- package/dist/chunks/{git-backend-7PCWECRN.ts → git-backend-KHD36W27.ts} +6 -7
- package/dist/chunks/{git-backend-7PCWECRN.ts.map → git-backend-KHD36W27.ts.map} +1 -1
- package/dist/chunks/{local-fields-B6JWLPAE.ts → local-fields-JEKAPZKD.ts} +6 -7
- package/dist/chunks/manager-result-dispatcher-6W52NM7F.ts +32 -0
- package/dist/chunks/{manager-ui-DGRTG76I.ts → manager-ui-LM7DSJ2Y.ts} +103 -52
- package/dist/chunks/manager-ui-LM7DSJ2Y.ts.map +7 -0
- package/dist/chunks/{merge-baseline-store-HL3VLMAM.ts → merge-baseline-store-65GKUMXI.ts} +6 -6
- package/dist/chunks/{remote-selection-ui-OHMIQ32X.ts → remote-selection-ui-TD4C4W3J.ts} +16 -12
- package/dist/chunks/{s3-backend-CJXBEWWU.ts → s3-backend-L24UZ6IK.ts} +12 -10
- package/dist/chunks/s3-backend-L24UZ6IK.ts.map +7 -0
- package/dist/chunks/{setup-switch-66GWMBNH.ts → setup-switch-PIPXYPCW.ts} +5 -5
- package/dist/chunks/{setup-wizard-OHZXJVQZ.ts → setup-wizard-RR5U3SUB.ts} +6 -6
- package/dist/chunks/{snapshot-VRHNAUUH.ts → snapshot-RGNDYT6A.ts} +5 -6
- package/dist/chunks/{snapshot-transaction-EUGA4VX6.ts → snapshot-transaction-26BQO36S.ts} +8 -8
- package/dist/chunks/{sync-inspection-4WFQEJOE.ts → sync-inspection-MOMLGUTD.ts} +11 -11
- package/dist/chunks/{sync-operations-X4AOXMBT.ts → sync-operations-CV3TULLD.ts} +25 -25
- package/dist/chunks/{sync-state-SWLSMK4G.ts → sync-state-7L4NT7W2.ts} +7 -8
- package/dist/chunks/{webdav-backend-2Q5ZEBST.ts → webdav-backend-3ZCACILP.ts} +7 -8
- package/dist/chunks/{webdav-backend-2Q5ZEBST.ts.map → webdav-backend-3ZCACILP.ts.map} +1 -1
- package/dist/index.ts +19 -19
- package/package.json +1 -1
- 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 +1 -1
- package/src/settings/settings-management.ts +15 -1
- package/src/settings/settings-store.ts +0 -14
- package/src/snapshot/session-paths.ts +15 -2
- package/src/snapshot/snapshot-mutation-queues.ts +142 -0
- package/src/snapshot/snapshot-transaction.ts +122 -125
- package/src/sync/merge-apply.ts +6 -0
- 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-2VSN3MFX.ts.map +0 -7
- package/dist/chunks/chunk-AAPAHANE.ts.map +0 -7
- package/dist/chunks/chunk-BJXSCGQK.ts.map +0 -7
- package/dist/chunks/chunk-DO55XUNU.ts.map +0 -7
- package/dist/chunks/chunk-JXWTEJS5.ts.map +0 -7
- package/dist/chunks/chunk-RX3WGWVL.ts.map +0 -7
- package/dist/chunks/command-handler-FO6F2APH.ts.map +0 -7
- package/dist/chunks/manager-result-dispatcher-NODX3KKH.ts +0 -28
- package/dist/chunks/manager-ui-DGRTG76I.ts.map +0 -7
- package/dist/chunks/s3-backend-CJXBEWWU.ts.map +0 -7
- /package/dist/chunks/{agent-candidate-EYB35AGL.ts.map → agent-candidate-OCDPRI5G.ts.map} +0 -0
- /package/dist/chunks/{agent-plan-KO43GTOR.ts.map → agent-plan-P5B5RGZ7.ts.map} +0 -0
- /package/dist/chunks/{agent-refusal-retry-C2HQROTP.ts.map → agent-refusal-retry-476YGNU5.ts.map} +0 -0
- /package/dist/chunks/{agent-store-UT52DS7B.ts.map → agent-store-RJSMNOYP.ts.map} +0 -0
- /package/dist/chunks/{agent-sync-VM3TXWA3.ts.map → agent-sync-EUK2CPSS.ts.map} +0 -0
- /package/dist/chunks/{chunk-UCD7TQDT.ts.map → chunk-3IYAPMST.ts.map} +0 -0
- /package/dist/chunks/{chunk-DOJRPBQU.ts.map → chunk-5TSCBBPP.ts.map} +0 -0
- /package/dist/chunks/{chunk-IMMMZUFC.ts.map → chunk-67INJPKR.ts.map} +0 -0
- /package/dist/chunks/{chunk-CDQGSZL3.ts.map → chunk-6LD5KX55.ts.map} +0 -0
- /package/dist/chunks/{chunk-MDUORMCK.ts.map → chunk-6O3EDBRL.ts.map} +0 -0
- /package/dist/chunks/{chunk-STVQQ5KG.ts.map → chunk-7ZIYU5QS.ts.map} +0 -0
- /package/dist/chunks/{chunk-AO6EDUA6.ts.map → chunk-AKMV47YC.ts.map} +0 -0
- /package/dist/chunks/{chunk-66GAUVDL.ts.map → chunk-BEST45H2.ts.map} +0 -0
- /package/dist/chunks/{chunk-PWA3YN5Z.ts.map → chunk-CPT2BN6N.ts.map} +0 -0
- /package/dist/chunks/{chunk-73MDIVYJ.ts.map → chunk-DN4IA7MR.ts.map} +0 -0
- /package/dist/chunks/{chunk-4RLATUP4.ts.map → chunk-DRTC4PKM.ts.map} +0 -0
- /package/dist/chunks/{chunk-PHANBTVM.ts.map → chunk-ESKOPQVB.ts.map} +0 -0
- /package/dist/chunks/{chunk-ODF2M4RF.ts.map → chunk-F7E3VFXU.ts.map} +0 -0
- /package/dist/chunks/{chunk-MRIPZGPR.ts.map → chunk-FLHCOJCD.ts.map} +0 -0
- /package/dist/chunks/{chunk-5WJQ6XOW.ts.map → chunk-GNYGNHFF.ts.map} +0 -0
- /package/dist/chunks/{chunk-DFJGTVPX.ts.map → chunk-KYTT7KV4.ts.map} +0 -0
- /package/dist/chunks/{chunk-UGSSZWQ6.ts.map → chunk-MKSMJPVA.ts.map} +0 -0
- /package/dist/chunks/{chunk-RAMHGOX2.ts.map → chunk-OJARL2TG.ts.map} +0 -0
- /package/dist/chunks/{chunk-U77DWNRH.ts.map → chunk-Q23JJW7E.ts.map} +0 -0
- /package/dist/chunks/{chunk-QWV3XKNJ.ts.map → chunk-TIMWN2RH.ts.map} +0 -0
- /package/dist/chunks/{chunk-Z5O2TLNF.ts.map → chunk-TZC7GDJE.ts.map} +0 -0
- /package/dist/chunks/{chunk-TO2GMX3K.ts.map → chunk-XJHQPB3E.ts.map} +0 -0
- /package/dist/chunks/{chunk-JY2RVOUL.ts.map → chunk-Y4UVXOLQ.ts.map} +0 -0
- /package/dist/chunks/{chunk-M5IV3KL2.ts.map → chunk-ZDDBZH72.ts.map} +0 -0
- /package/dist/chunks/{config-B37W7FXW.ts.map → config-HYG7G5EM.ts.map} +0 -0
- /package/dist/chunks/{conflict-artifacts-6XGSSU5S.ts.map → conflict-artifacts-J6WSDCWP.ts.map} +0 -0
- /package/dist/chunks/{conflict-review-BQSHSJB3.ts.map → conflict-review-2QMO2K6Q.ts.map} +0 -0
- /package/dist/chunks/{continuous-record-4DQ2EAZS.ts.map → continuous-record-AH7JGYKM.ts.map} +0 -0
- /package/dist/chunks/{continuous-sync-ZT3UEQLK.ts.map → continuous-sync-VRMXCA5X.ts.map} +0 -0
- /package/dist/chunks/{local-fields-B6JWLPAE.ts.map → local-fields-JEKAPZKD.ts.map} +0 -0
- /package/dist/chunks/{manager-result-dispatcher-NODX3KKH.ts.map → manager-result-dispatcher-6W52NM7F.ts.map} +0 -0
- /package/dist/chunks/{merge-baseline-store-HL3VLMAM.ts.map → merge-baseline-store-65GKUMXI.ts.map} +0 -0
- /package/dist/chunks/{remote-selection-ui-OHMIQ32X.ts.map → remote-selection-ui-TD4C4W3J.ts.map} +0 -0
- /package/dist/chunks/{setup-switch-66GWMBNH.ts.map → setup-switch-PIPXYPCW.ts.map} +0 -0
- /package/dist/chunks/{setup-wizard-OHZXJVQZ.ts.map → setup-wizard-RR5U3SUB.ts.map} +0 -0
- /package/dist/chunks/{snapshot-VRHNAUUH.ts.map → snapshot-RGNDYT6A.ts.map} +0 -0
- /package/dist/chunks/{snapshot-transaction-EUGA4VX6.ts.map → snapshot-transaction-26BQO36S.ts.map} +0 -0
- /package/dist/chunks/{sync-inspection-4WFQEJOE.ts.map → sync-inspection-MOMLGUTD.ts.map} +0 -0
- /package/dist/chunks/{sync-operations-X4AOXMBT.ts.map → sync-operations-CV3TULLD.ts.map} +0 -0
- /package/dist/chunks/{sync-state-SWLSMK4G.ts.map → sync-state-7L4NT7W2.ts.map} +0 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
setupSwitchActionFromLabel,
|
|
7
7
|
setupSwitchActionLabel,
|
|
8
8
|
useSyncSetup
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CPT2BN6N.ts";
|
|
10
10
|
import {
|
|
11
11
|
applyS3CredentialUpdate,
|
|
12
12
|
chooseS3CredentialUpdate,
|
|
@@ -26,41 +26,41 @@ import {
|
|
|
26
26
|
showEditS3Target,
|
|
27
27
|
showEditWebDavStorageProfile,
|
|
28
28
|
showEditWebDavTarget
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-3IYAPMST.ts";
|
|
30
30
|
import {
|
|
31
31
|
automaticSyncSummary
|
|
32
32
|
} from "./chunk-ECYCNZOE.ts";
|
|
33
33
|
import {
|
|
34
34
|
dispatchManagerResult
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-ZDDBZH72.ts";
|
|
36
36
|
import {
|
|
37
37
|
runCancellableOperation
|
|
38
|
-
} from "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
38
|
+
} from "./chunk-OKPPZA4D.ts";
|
|
39
|
+
import "./chunk-TIMWN2RH.ts";
|
|
40
|
+
import "./chunk-OJARL2TG.ts";
|
|
41
41
|
import {
|
|
42
42
|
confirmMergeReview
|
|
43
43
|
} from "./chunk-KHBPED6W.ts";
|
|
44
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-TZC7GDJE.ts";
|
|
45
45
|
import {
|
|
46
46
|
addStorageConnection,
|
|
47
47
|
removeStorageConnection,
|
|
48
48
|
removeSyncSetup,
|
|
49
49
|
updateStorageConnection,
|
|
50
50
|
updateSyncSetup
|
|
51
|
-
} from "./chunk-
|
|
52
|
-
import "./chunk-
|
|
51
|
+
} from "./chunk-45COPAK7.ts";
|
|
52
|
+
import "./chunk-FLHCOJCD.ts";
|
|
53
53
|
import {
|
|
54
54
|
syncErrorGuidance
|
|
55
55
|
} from "./chunk-G4RUXRWZ.ts";
|
|
56
56
|
import {
|
|
57
57
|
sameLocalFields
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-MKSMJPVA.ts";
|
|
59
59
|
import {
|
|
60
60
|
observationMatchesConfig,
|
|
61
61
|
observationSummary,
|
|
62
62
|
syncAttentionMatchesConfig
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-Q23JJW7E.ts";
|
|
64
64
|
import {
|
|
65
65
|
AUTOMATIC_SYNC_DESCRIPTION,
|
|
66
66
|
STARTUP_TRANSFER_DESCRIPTION,
|
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
} from "./chunk-NLWS55B6.ts";
|
|
69
69
|
import {
|
|
70
70
|
captureMutationOwner
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-GNYGNHFF.ts";
|
|
72
72
|
import {
|
|
73
73
|
safeTerminalText
|
|
74
74
|
} from "./chunk-AMJRUXFT.ts";
|
|
@@ -92,7 +92,7 @@ import {
|
|
|
92
92
|
syncCheckConfigFingerprint,
|
|
93
93
|
syncConfigReviewIdentity,
|
|
94
94
|
updateLocalConfig
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-OVBAW7KV.ts";
|
|
96
96
|
import {
|
|
97
97
|
normalizeLocalFields
|
|
98
98
|
} from "./chunk-X7R6DCVF.ts";
|
|
@@ -100,7 +100,7 @@ import {
|
|
|
100
100
|
inspectLock,
|
|
101
101
|
isLockGuardHeld,
|
|
102
102
|
isStaleLock
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-6O3EDBRL.ts";
|
|
104
104
|
import {
|
|
105
105
|
throwIfAborted
|
|
106
106
|
} from "./chunk-PWMWOJP4.ts";
|
|
@@ -108,18 +108,18 @@ import "./chunk-ZW5ZLGBI.ts";
|
|
|
108
108
|
import {
|
|
109
109
|
readStateForConfig,
|
|
110
110
|
syncStateFingerprint
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-DN4IA7MR.ts";
|
|
112
|
+
import "./chunk-AR2DGDUI.ts";
|
|
112
113
|
import "./chunk-SWRVXVFD.ts";
|
|
113
114
|
import "./chunk-2JZFHNLM.ts";
|
|
114
115
|
import "./chunk-T2SJD3N7.ts";
|
|
115
|
-
import "./chunk-
|
|
116
|
+
import "./chunk-ESKOPQVB.ts";
|
|
116
117
|
import {
|
|
117
118
|
compareSyncInclude,
|
|
118
119
|
syncIncludeSelection
|
|
119
|
-
} from "./chunk-
|
|
120
|
-
import "./chunk-
|
|
121
|
-
import "./chunk-
|
|
122
|
-
import "./chunk-YZ5BQNRZ.ts";
|
|
120
|
+
} from "./chunk-KYTT7KV4.ts";
|
|
121
|
+
import "./chunk-CBLTWXAU.ts";
|
|
122
|
+
import "./chunk-FHE2DCA2.ts";
|
|
123
123
|
|
|
124
124
|
// src/ui/manager-ui.ts
|
|
125
125
|
import { defineMenu as defineMenu5, runMenu as runMenu5 } from "@narumitw/pi-tui-kit";
|
|
@@ -190,7 +190,7 @@ function blockedSyncMenuItem(label, manager) {
|
|
|
190
190
|
};
|
|
191
191
|
}
|
|
192
192
|
async function showManagerAttention(ctx, attention, runRoute, signal, onSelectionResolved) {
|
|
193
|
-
const { showRemoteSelectionReview } = await import("./remote-selection-ui-
|
|
193
|
+
const { showRemoteSelectionReview } = await import("./remote-selection-ui-TD4C4W3J.ts");
|
|
194
194
|
if (signal?.aborted) return "close";
|
|
195
195
|
const review = await showRemoteSelectionReview(ctx, attention.decision.setupName, signal, void 0, {
|
|
196
196
|
decision: attention.decision,
|
|
@@ -560,7 +560,7 @@ async function describeManagerState(signal, attention, inspectOperation = inspec
|
|
|
560
560
|
`Automatic sync: ${automaticSyncSummary(config.automatic)}`,
|
|
561
561
|
`Startup transfer: ${startupTransferSummary(config)}`,
|
|
562
562
|
`Agent mode: ${config.agentMode ? "On (experimental; autonomous merged sync)" : "Off"}`,
|
|
563
|
-
...config.continuous ? await (await import("./continuous-record-
|
|
563
|
+
...config.continuous ? await (await import("./continuous-record-AH7JGYKM.ts")).continuousStatusLines(config) : [],
|
|
564
564
|
`Last applied: ${lastAppliedSnapshot}`,
|
|
565
565
|
...noSyncedContent ? ["", "No included content is selected. Choose included content in Settings before syncing."] : [],
|
|
566
566
|
"",
|
|
@@ -569,6 +569,7 @@ async function describeManagerState(signal, attention, inspectOperation = inspec
|
|
|
569
569
|
return {
|
|
570
570
|
title: (changesBlocked ? ["Manage sync", ...operationStatusLines(operation)] : ordinaryTitle).join("\n"),
|
|
571
571
|
actions: operationActions(operation, noSyncedContent, canSwitch, mainActions),
|
|
572
|
+
configReview: { setupName: config.setupName, fingerprint: syncCheckConfigFingerprint(config) },
|
|
572
573
|
operation,
|
|
573
574
|
...currentObservation ? { observation: currentObservation } : {},
|
|
574
575
|
...currentAttention ? {
|
|
@@ -1315,7 +1316,7 @@ async function showRemoveTarget(ctx, name, signal) {
|
|
|
1315
1316
|
}
|
|
1316
1317
|
|
|
1317
1318
|
// src/ui/settings-ui.ts
|
|
1318
|
-
async function showSyncSettings(ctx, runRoute, signal) {
|
|
1319
|
+
async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
|
|
1319
1320
|
let disposition = "back";
|
|
1320
1321
|
const exitSettings = () => {
|
|
1321
1322
|
disposition = "exit";
|
|
@@ -1352,7 +1353,7 @@ async function showSyncSettings(ctx, runRoute, signal) {
|
|
|
1352
1353
|
}
|
|
1353
1354
|
return disposition;
|
|
1354
1355
|
}
|
|
1355
|
-
const initial = await loadConfig();
|
|
1356
|
+
const initial = await loadConfig(reviewedSetup);
|
|
1356
1357
|
if (signal?.aborted) return "back";
|
|
1357
1358
|
const setupName = initial.setupName;
|
|
1358
1359
|
const groups = {
|
|
@@ -1803,7 +1804,7 @@ async function showSyncSettings(ctx, runRoute, signal) {
|
|
|
1803
1804
|
},
|
|
1804
1805
|
"remote-include": async ({ signal: actionSignal }) => {
|
|
1805
1806
|
const reviewSignal = signal ? AbortSignal.any([signal, actionSignal]) : actionSignal;
|
|
1806
|
-
const { showRemoteSelectionReview } = await import("./remote-selection-ui-
|
|
1807
|
+
const { showRemoteSelectionReview } = await import("./remote-selection-ui-TD4C4W3J.ts");
|
|
1807
1808
|
if (reviewSignal.aborted) return { kind: "rejected" };
|
|
1808
1809
|
const review = await showRemoteSelectionReview(ctx, setupName, reviewSignal, void 0, {
|
|
1809
1810
|
origin: "settings",
|
|
@@ -1870,6 +1871,15 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
|
|
|
1870
1871
|
await runRoute("help");
|
|
1871
1872
|
return;
|
|
1872
1873
|
}
|
|
1874
|
+
const validateOwner = captureMutationOwner(ctx, sessionSignal);
|
|
1875
|
+
const isCurrent = () => {
|
|
1876
|
+
try {
|
|
1877
|
+
validateOwner();
|
|
1878
|
+
return true;
|
|
1879
|
+
} catch {
|
|
1880
|
+
return false;
|
|
1881
|
+
}
|
|
1882
|
+
};
|
|
1873
1883
|
const menu = defineMenu5({
|
|
1874
1884
|
start: "main",
|
|
1875
1885
|
screens: {
|
|
@@ -1893,12 +1903,13 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
|
|
|
1893
1903
|
}
|
|
1894
1904
|
},
|
|
1895
1905
|
actions: {
|
|
1896
|
-
"review-attention": async () => {
|
|
1897
|
-
const attention =
|
|
1906
|
+
"review-attention": async ({ state }) => {
|
|
1907
|
+
const attention = state.manager.attention;
|
|
1908
|
+
if (attention && options.getAttention?.() !== attention) return { kind: "stay" };
|
|
1898
1909
|
if (!attention) {
|
|
1899
|
-
const observation =
|
|
1910
|
+
const observation = state.manager.observation;
|
|
1900
1911
|
if (!observation) return { kind: "stay" };
|
|
1901
|
-
const { showRemoteSelectionReview } = await import("./remote-selection-ui-
|
|
1912
|
+
const { showRemoteSelectionReview } = await import("./remote-selection-ui-TD4C4W3J.ts");
|
|
1902
1913
|
if (sessionSignal?.aborted) return { kind: "close" };
|
|
1903
1914
|
const config = await loadConfig();
|
|
1904
1915
|
if (sessionSignal?.aborted) return { kind: "close" };
|
|
@@ -1929,24 +1940,21 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
|
|
|
1929
1940
|
);
|
|
1930
1941
|
return { kind: disposition };
|
|
1931
1942
|
},
|
|
1932
|
-
sync: async () => {
|
|
1943
|
+
sync: async ({ state }) => {
|
|
1933
1944
|
const pendingAttention = options.getAttention?.();
|
|
1934
|
-
if (pendingAttention) {
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
if (pendingAttention.decision.setupName === activeConfig.setupName) {
|
|
1938
|
-
ctx.ui.notify("Review synced content before starting Sync now.", "warning");
|
|
1939
|
-
return { kind: "stay" };
|
|
1940
|
-
}
|
|
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" };
|
|
1941
1948
|
}
|
|
1942
1949
|
const result = await runCancellableOperation(ctx, "Checking current sync setup\u2026", "sync", runRoute, {
|
|
1943
1950
|
commitAware: true,
|
|
1944
|
-
signal: sessionSignal
|
|
1951
|
+
signal: sessionSignal,
|
|
1952
|
+
target: state.manager.configReview?.setupName
|
|
1945
1953
|
});
|
|
1946
1954
|
const disposition = await dispatchManagerResult(ctx, result, "sync", runRoute, sessionSignal);
|
|
1947
1955
|
return disposition.kind === "close" ? { kind: "close" } : { kind: "stay" };
|
|
1948
1956
|
},
|
|
1949
|
-
"retry-refusal": async ({ signal: actionSignal }) => {
|
|
1957
|
+
"retry-refusal": async ({ state, signal: actionSignal }) => {
|
|
1950
1958
|
const signal = sessionSignal ? AbortSignal.any([sessionSignal, actionSignal]) : actionSignal;
|
|
1951
1959
|
const validate = captureMutationOwner(ctx, signal);
|
|
1952
1960
|
validate();
|
|
@@ -1955,6 +1963,7 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
|
|
|
1955
1963
|
commitAware: true,
|
|
1956
1964
|
cancelAcrossDialogs: true,
|
|
1957
1965
|
signal,
|
|
1966
|
+
target: state.manager.configReview?.setupName,
|
|
1958
1967
|
cancelledMessage: "Model retry cancelled. Submitted requests and committed writes cannot be undone."
|
|
1959
1968
|
});
|
|
1960
1969
|
if (signal.aborted) return { kind: "close" };
|
|
@@ -1970,23 +1979,25 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
|
|
|
1970
1979
|
const result = await showSetupSwitcher(ctx, runRoute, void 0, sessionSignal);
|
|
1971
1980
|
return result === "pull-attempted" || result === "closed" ? { kind: "close" } : { kind: "stay" };
|
|
1972
1981
|
},
|
|
1973
|
-
settings: async () => {
|
|
1974
|
-
const result = await showSyncSettings(ctx, runRoute, sessionSignal);
|
|
1982
|
+
settings: async ({ state }) => {
|
|
1983
|
+
const result = await showSyncSettings(ctx, runRoute, sessionSignal, state.manager.configReview?.setupName);
|
|
1975
1984
|
return { kind: result === "exit" ? "close" : "stay" };
|
|
1976
1985
|
},
|
|
1977
|
-
pull: async () => {
|
|
1986
|
+
pull: async ({ state }) => {
|
|
1978
1987
|
const result = await runCancellableOperation(ctx, "Checking remote changes\u2026", "pull", runRoute, {
|
|
1979
1988
|
commitAware: true,
|
|
1980
1989
|
cancelledMessage: "Pull check cancelled; no local files were changed.",
|
|
1990
|
+
target: state.manager.configReview?.setupName,
|
|
1981
1991
|
signal: sessionSignal
|
|
1982
1992
|
});
|
|
1983
1993
|
const disposition = await dispatchManagerResult(ctx, result, "pull", runRoute, sessionSignal);
|
|
1984
1994
|
return disposition.kind === "close" ? { kind: "close" } : { kind: "stay" };
|
|
1985
1995
|
},
|
|
1986
|
-
push: async () => {
|
|
1996
|
+
push: async ({ state }) => {
|
|
1987
1997
|
const result = await runCancellableOperation(ctx, "Preparing push preview\u2026", "push", runRoute, {
|
|
1988
1998
|
commitAware: true,
|
|
1989
1999
|
cancelledMessage: "Push preparation cancelled; no remote files were changed.",
|
|
2000
|
+
target: state.manager.configReview?.setupName,
|
|
1990
2001
|
signal: sessionSignal
|
|
1991
2002
|
});
|
|
1992
2003
|
const disposition = await dispatchManagerResult(ctx, result, "push", runRoute, sessionSignal);
|
|
@@ -2000,31 +2011,34 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
|
|
|
2000
2011
|
await showStorageConnections(ctx, sessionSignal);
|
|
2001
2012
|
return { kind: "stay" };
|
|
2002
2013
|
},
|
|
2003
|
-
history: async () => {
|
|
2014
|
+
history: async ({ state }) => {
|
|
2004
2015
|
const result = await runCancellableOperation(ctx, "Loading sync history\u2026", "history", runRoute, {
|
|
2005
2016
|
signal: sessionSignal,
|
|
2006
2017
|
commitAware: true,
|
|
2007
2018
|
cancelAcrossDialogs: true,
|
|
2019
|
+
target: state.manager.configReview?.setupName,
|
|
2008
2020
|
cancelledMessage: "History review cancelled; no files were changed."
|
|
2009
2021
|
});
|
|
2010
2022
|
return { kind: result.kind === "closed" ? "close" : "stay" };
|
|
2011
2023
|
},
|
|
2012
|
-
diff: async () => {
|
|
2024
|
+
diff: async ({ state }) => {
|
|
2013
2025
|
const result = await runCancellableOperation(ctx, "Comparing local and remote\u2026", "diff", runRoute, {
|
|
2026
|
+
target: state.manager.configReview?.setupName,
|
|
2014
2027
|
signal: sessionSignal
|
|
2015
2028
|
});
|
|
2016
2029
|
return { kind: result.kind === "closed" ? "close" : "stay" };
|
|
2017
2030
|
},
|
|
2018
|
-
status: async () => {
|
|
2031
|
+
status: async ({ state }) => {
|
|
2019
2032
|
const result = await runCancellableOperation(ctx, "Checking remote status\u2026", "status", runRoute, {
|
|
2033
|
+
target: state.manager.configReview?.setupName,
|
|
2020
2034
|
signal: sessionSignal
|
|
2021
2035
|
});
|
|
2022
2036
|
return { kind: result.kind === "closed" ? "close" : "stay" };
|
|
2023
2037
|
},
|
|
2024
|
-
doctor: async ({ signal: actionSignal }) => {
|
|
2038
|
+
doctor: async ({ state, signal: actionSignal }) => {
|
|
2025
2039
|
const signal = sessionSignal ? AbortSignal.any([sessionSignal, actionSignal]) : actionSignal;
|
|
2026
2040
|
const validate = captureMutationOwner(ctx, signal);
|
|
2027
|
-
const config = await loadConfig();
|
|
2041
|
+
const config = await loadConfig(state.manager.configReview?.setupName);
|
|
2028
2042
|
validate();
|
|
2029
2043
|
const confirmed = await ctx.ui.confirm(
|
|
2030
2044
|
"Run diagnostics?",
|
|
@@ -2058,11 +2072,12 @@ S3/R2 reads the latest pointer without writing. Git reads remote snapshots and c
|
|
|
2058
2072
|
return { kind: "close" };
|
|
2059
2073
|
},
|
|
2060
2074
|
init: async () => {
|
|
2061
|
-
await runRoute("init");
|
|
2075
|
+
await runRoute("init", sessionSignal);
|
|
2062
2076
|
return { kind: "stay" };
|
|
2063
2077
|
},
|
|
2064
|
-
conflicts: async () => {
|
|
2078
|
+
conflicts: async ({ state }) => {
|
|
2065
2079
|
const result = await runCancellableOperation(ctx, "Reviewing private conflicts\u2026", "conflicts", runRoute, {
|
|
2080
|
+
target: state.manager.configReview?.setupName,
|
|
2066
2081
|
commitAware: true,
|
|
2067
2082
|
signal: sessionSignal
|
|
2068
2083
|
});
|
|
@@ -2071,6 +2086,42 @@ S3/R2 reads the latest pointer without writing. Git reads remote snapshots and c
|
|
|
2071
2086
|
}
|
|
2072
2087
|
}
|
|
2073
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
|
+
}
|
|
2074
2125
|
const menuContext = {
|
|
2075
2126
|
...ctx,
|
|
2076
2127
|
ui: {
|
|
@@ -2101,7 +2152,7 @@ S3/R2 reads the latest pointer without writing. Git reads remote snapshots and c
|
|
|
2101
2152
|
return { manager };
|
|
2102
2153
|
},
|
|
2103
2154
|
signal: sessionSignal,
|
|
2104
|
-
isCurrent
|
|
2155
|
+
isCurrent
|
|
2105
2156
|
});
|
|
2106
2157
|
}
|
|
2107
2158
|
function syncMainMenuItem(label) {
|
|
@@ -2137,4 +2188,4 @@ function syncMainMenuItem(label) {
|
|
|
2137
2188
|
export {
|
|
2138
2189
|
showSyncManager
|
|
2139
2190
|
};
|
|
2140
|
-
//# sourceMappingURL=manager-ui-
|
|
2191
|
+
//# sourceMappingURL=manager-ui-LM7DSJ2Y.ts.map
|