@narumitw/pi-sync 0.57.10 → 0.57.12
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 +32 -22
- package/dist/chunks/{agent-candidate-EYB35AGL.ts → agent-candidate-U2NU3GUX.ts} +11 -11
- package/dist/chunks/{agent-plan-KO43GTOR.ts → agent-plan-3YXDIJXO.ts} +25 -22
- package/dist/chunks/agent-plan-3YXDIJXO.ts.map +7 -0
- package/dist/chunks/{agent-refusal-retry-C2HQROTP.ts → agent-refusal-retry-476YGNU5.ts} +10 -10
- package/dist/chunks/{agent-runner-WMSCKSCB.ts → agent-runner-FCRV2Z75.ts} +11 -10
- package/dist/chunks/agent-runner-FCRV2Z75.ts.map +7 -0
- package/dist/chunks/{agent-store-UT52DS7B.ts → agent-store-7GINKTS7.ts} +8 -8
- package/dist/chunks/{agent-store-UT52DS7B.ts.map → agent-store-7GINKTS7.ts.map} +2 -2
- package/dist/chunks/{agent-sync-VM3TXWA3.ts → agent-sync-P6AWQXGK.ts} +6 -6
- 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-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-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-IMMMZUFC.ts → chunk-CQD2TJHE.ts} +7 -7
- package/dist/chunks/{chunk-IMMMZUFC.ts.map → chunk-CQD2TJHE.ts.map} +2 -2
- package/dist/chunks/{chunk-73MDIVYJ.ts → chunk-DN4IA7MR.ts} +6 -6
- package/dist/chunks/{chunk-PHANBTVM.ts → chunk-ESKOPQVB.ts} +4 -4
- 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-2VSN3MFX.ts → chunk-MMQIEDZ6.ts} +33 -27
- package/dist/chunks/chunk-MMQIEDZ6.ts.map +7 -0
- 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-NLWS55B6.ts → chunk-QPC5HT3A.ts} +2 -2
- package/dist/chunks/{chunk-NLWS55B6.ts.map → chunk-QPC5HT3A.ts.map} +1 -1
- package/dist/chunks/{chunk-4RLATUP4.ts → chunk-S5OCYVPS.ts} +7 -7
- package/dist/chunks/{chunk-4RLATUP4.ts.map → chunk-S5OCYVPS.ts.map} +2 -2
- 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-UCD7TQDT.ts → chunk-U6GXGY5G.ts} +5 -5
- package/dist/chunks/{chunk-PWA3YN5Z.ts → chunk-XEODG2PE.ts} +3 -3
- 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-ODF2M4RF.ts → chunk-ZC3IHFNM.ts} +8 -8
- package/dist/chunks/{chunk-ODF2M4RF.ts.map → chunk-ZC3IHFNM.ts.map} +2 -2
- package/dist/chunks/{chunk-M5IV3KL2.ts → chunk-ZDDBZH72.ts} +3 -3
- package/dist/chunks/{command-handler-FO6F2APH.ts → command-handler-VKLZBRLO.ts} +26 -21
- package/dist/chunks/command-handler-VKLZBRLO.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-GXA6Y7KY.ts} +23 -23
- package/dist/chunks/{continuous-record-4DQ2EAZS.ts → continuous-record-EPHGR2DU.ts} +6 -6
- package/dist/chunks/{continuous-sync-ZT3UEQLK.ts → continuous-sync-TTOSJCQU.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-INVMAFEN.ts} +245 -224
- package/dist/chunks/manager-ui-INVMAFEN.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-KLGESLQX.ts} +6 -6
- package/dist/chunks/{setup-wizard-OHZXJVQZ.ts → setup-wizard-ZQAK35BP.ts} +7 -7
- 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-TMGQHBF5.ts} +26 -26
- package/dist/chunks/{sync-operations-X4AOXMBT.ts.map → sync-operations-TMGQHBF5.ts.map} +2 -2
- 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 +20 -20
- package/docs/agent-continuous-hardening.md +5 -5
- package/docs/agent-mode-verification.md +3 -3
- package/docs/agent-quality-verification.md +3 -3
- package/docs/continuous-sync-verification.md +2 -2
- package/docs/settings.md +9 -5
- package/docs/tui-contract.md +20 -3
- package/package.json +3 -3
- package/skills/configure-pi-sync/SKILL.md +3 -1
- package/skills/configure-pi-sync/references/configuration.md +56 -38
- package/src/backends/s3/s3-client.ts +8 -1
- package/src/commands/command-execution.ts +11 -6
- package/src/commands/command.ts +1 -1
- 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/settings/settings-types.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.ts +122 -125
- package/src/sync/agent-candidate.ts +3 -3
- package/src/sync/agent-plan.ts +11 -8
- package/src/sync/agent-runner.ts +10 -9
- package/src/sync/agent-store.ts +1 -1
- package/src/sync/agent-sync.ts +2 -2
- package/src/sync/continuous-record.ts +1 -1
- package/src/sync/merge-apply.ts +6 -0
- package/src/sync/merged-sync.ts +4 -4
- package/src/sync/sync-mutations.ts +1 -1
- package/src/ui/agent-mode-setting.ts +6 -6
- package/src/ui/cancellable-operation.ts +36 -13
- package/src/ui/manager-state.ts +4 -2
- package/src/ui/manager-ui.ts +76 -24
- package/src/ui/remote-selection-ui.ts +131 -82
- package/src/ui/settings-ui.ts +21 -56
- package/src/ui/setup/setup-switcher.ts +2 -2
- package/src/ui/sync-setups-ui.ts +2 -2
- package/dist/chunks/agent-plan-KO43GTOR.ts.map +0 -7
- package/dist/chunks/agent-runner-WMSCKSCB.ts.map +0 -7
- 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-U2NU3GUX.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-sync-VM3TXWA3.ts.map → agent-sync-P6AWQXGK.ts.map} +0 -0
- /package/dist/chunks/{chunk-DOJRPBQU.ts.map → chunk-5TSCBBPP.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-73MDIVYJ.ts.map → chunk-DN4IA7MR.ts.map} +0 -0
- /package/dist/chunks/{chunk-PHANBTVM.ts.map → chunk-ESKOPQVB.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-UCD7TQDT.ts.map → chunk-U6GXGY5G.ts.map} +0 -0
- /package/dist/chunks/{chunk-PWA3YN5Z.ts.map → chunk-XEODG2PE.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-GXA6Y7KY.ts.map} +0 -0
- /package/dist/chunks/{continuous-record-4DQ2EAZS.ts.map → continuous-record-EPHGR2DU.ts.map} +0 -0
- /package/dist/chunks/{continuous-sync-ZT3UEQLK.ts.map → continuous-sync-TTOSJCQU.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-KLGESLQX.ts.map} +0 -0
- /package/dist/chunks/{setup-wizard-OHZXJVQZ.ts.map → setup-wizard-ZQAK35BP.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-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-XEODG2PE.ts";
|
|
10
10
|
import {
|
|
11
11
|
applyS3CredentialUpdate,
|
|
12
12
|
chooseS3CredentialUpdate,
|
|
@@ -26,49 +26,49 @@ import {
|
|
|
26
26
|
showEditS3Target,
|
|
27
27
|
showEditWebDavStorageProfile,
|
|
28
28
|
showEditWebDavTarget
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-U6GXGY5G.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,
|
|
67
67
|
startupTransferSummary
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-QPC5HT3A.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,
|
|
@@ -409,8 +409,8 @@ async function loadSetupMenuState(selectedName, signal) {
|
|
|
409
409
|
`Sessions: ${selection.sessions ? "On \u2014 privacy-sensitive" : "Off"}`,
|
|
410
410
|
`Automatic sync: ${config.automatic ? "On" : "Off"}`,
|
|
411
411
|
`Automatic transfer at startup: ${config.automaticTransfer ? "On \u2014 may upload, replace, or delete selected files; no reload" : "Off"}`,
|
|
412
|
-
`
|
|
413
|
-
`Continuous sync: ${config.continuous ? config.agentMode ? "On (
|
|
412
|
+
`Autonomous sync: ${config.agentMode ? "On (autonomous merged sync)" : "Off"}`,
|
|
413
|
+
`Continuous sync: ${config.continuous ? config.agentMode ? "On (recurring requests and transfers)" : "Saved On; paused until Autonomous sync is enabled" : "Off"}`,
|
|
414
414
|
isCurrent ? "Edit included content and automatic sync in /sync \u2192 Settings." : "To edit included content or automatic sync, make this setup current, then open /sync \u2192 Settings."
|
|
415
415
|
];
|
|
416
416
|
} catch (error) {
|
|
@@ -559,8 +559,8 @@ async function describeManagerState(signal, attention, inspectOperation = inspec
|
|
|
559
559
|
`Included: ${selection.builtIns.length} built-in group${selection.builtIns.length === 1 ? "" : "s"} \xB7 ${selection.custom.length} extra path${selection.custom.length === 1 ? "" : "s"} \xB7 Sessions ${selection.sessions ? "on" : "off"}`,
|
|
560
560
|
`Automatic sync: ${automaticSyncSummary(config.automatic)}`,
|
|
561
561
|
`Startup transfer: ${startupTransferSummary(config)}`,
|
|
562
|
-
`
|
|
563
|
-
...config.continuous ? await (await import("./continuous-record-
|
|
562
|
+
`Autonomous sync: ${config.agentMode ? "On (autonomous merged sync)" : "Off"}`,
|
|
563
|
+
...config.continuous ? await (await import("./continuous-record-EPHGR2DU.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 ? {
|
|
@@ -654,8 +655,8 @@ import { defineMenu as defineMenu4, runMenu as runMenu4 } from "@narumitw/pi-tui
|
|
|
654
655
|
|
|
655
656
|
// src/ui/agent-mode-setting.ts
|
|
656
657
|
import { isDeepStrictEqual } from "node:util";
|
|
657
|
-
var AGENT_MODE_DESCRIPTION = "This setup
|
|
658
|
-
var CONTINUOUS_DESCRIPTION = "This setup
|
|
658
|
+
var AGENT_MODE_DESCRIPTION = "This setup: sync eligible changes at session startup and on Sync now without transfer confirmation. Use the selected Pi model to resolve supported text and settings conflicts. Eligible conflict content may be sent to its provider and incur costs. Selected local and remote content can be replaced or deleted. Unresolved conflicts pause unless partial sync permits independent progress. Continuous sync is a separate opt-in. No automatic reload.";
|
|
659
|
+
var CONTINUOUS_DESCRIPTION = "This setup: recurring sync while Pi is open. Requires Autonomous sync. Watches selected files, checks the remote every 60\u201366 seconds, and retries temporary failures. Local changes and retries can cause extra requests between polls. May disclose conflict text and incur model/storage costs. No automatic reload.";
|
|
659
660
|
function saveContinuousMode(ctx, setupName, enabled, signal) {
|
|
660
661
|
return saveAgentMode(ctx, setupName, enabled, signal, "continuous");
|
|
661
662
|
}
|
|
@@ -666,8 +667,8 @@ async function saveAgentMode(ctx, setupName, enabled, signal, preference = "agen
|
|
|
666
667
|
const setup = settings.syncSetups[setupName];
|
|
667
668
|
if (!setup || settings.activeSyncSetup !== setupName) throw new Error("Current sync setup changed; reopen Settings.");
|
|
668
669
|
const continuous = preference === "continuous";
|
|
669
|
-
const label = continuous ? "Continuous sync" : "
|
|
670
|
-
if (enabled && continuous && !setup.sync.agentMode) throw new Error("Enable
|
|
670
|
+
const label = continuous ? "Continuous sync" : "Autonomous sync";
|
|
671
|
+
if (enabled && continuous && !setup.sync.agentMode) throw new Error("Enable Autonomous sync before Continuous sync.");
|
|
671
672
|
if (Boolean(setup.sync[preference]) === enabled) return true;
|
|
672
673
|
if (enabled) {
|
|
673
674
|
const summary = [
|
|
@@ -687,7 +688,7 @@ async function saveAgentMode(ctx, setupName, enabled, signal, preference = "agen
|
|
|
687
688
|
].join("\n\n");
|
|
688
689
|
if (!await confirmMergeReview(
|
|
689
690
|
ctx,
|
|
690
|
-
`Enable
|
|
691
|
+
`Enable ${label}?`,
|
|
691
692
|
summary,
|
|
692
693
|
signal,
|
|
693
694
|
() => !signal?.aborted,
|
|
@@ -703,7 +704,7 @@ async function saveAgentMode(ctx, setupName, enabled, signal, preference = "agen
|
|
|
703
704
|
current.storageConnections[setup.storage.connection],
|
|
704
705
|
settings.storageConnections[setup.storage.connection]
|
|
705
706
|
))
|
|
706
|
-
throw new Error("Sync setup or connection changed during
|
|
707
|
+
throw new Error("Sync setup or connection changed during Autonomous sync review; reopen Settings.");
|
|
707
708
|
return {
|
|
708
709
|
...current,
|
|
709
710
|
syncSetups: { ...current.syncSetups, [setupName]: { ...setup, sync: { ...setup.sync, [preference]: enabled } } }
|
|
@@ -1164,8 +1165,8 @@ async function showSetupSwitcher(ctx, runRoute, selectedName, signal) {
|
|
|
1164
1165
|
`Included content: ${config.include.length} paths`,
|
|
1165
1166
|
`Automatic sync: ${automaticSyncSummary(config.automatic)} \xB7 Sessions: ${config.include.includes("sessions") ? "On" : "Off"}`,
|
|
1166
1167
|
`Automatic transfer at startup: ${config.automaticTransfer ? "On \u2014 may upload, replace, or delete selected files; no reload" : "Off"}`,
|
|
1167
|
-
`
|
|
1168
|
-
`Continuous sync: ${config.continuous ? config.agentMode ? "On (
|
|
1168
|
+
`Autonomous sync: ${config.agentMode ? "On (autonomous merged sync)" : "Off"}`,
|
|
1169
|
+
`Continuous sync: ${config.continuous ? config.agentMode ? "On (recurring requests and transfers)" : "Saved On; paused until Autonomous sync is enabled" : "Off"}`,
|
|
1169
1170
|
"",
|
|
1170
1171
|
switchEffect
|
|
1171
1172
|
].join("\n"),
|
|
@@ -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,175 +1353,145 @@ 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
|
-
const groups = {
|
|
1359
|
-
content: { label: "Sync content", ids: ["include", "remoteInclude", "localFields"] },
|
|
1360
|
-
behavior: {
|
|
1361
|
-
label: "Sync behavior",
|
|
1362
|
-
ids: ["automatic", "automaticTransfer", "agentMode", "continuous", "onSwitch"]
|
|
1363
|
-
},
|
|
1364
|
-
storage: { label: "Storage & setups", ids: ["storageLocation", "setups", "connections"] },
|
|
1365
|
-
advanced: { label: "Advanced", ids: ["mergeSettings", "contentPolicy", "skipSecretScan", "showStatus", "debug"] },
|
|
1366
|
-
all: { label: "All settings (search)", ids: [] }
|
|
1367
|
-
};
|
|
1368
1359
|
let saveStatus = "Simple choices save immediately. Back does not undo saved changes.";
|
|
1369
|
-
const settingsScreen = (state, group) => ({
|
|
1370
|
-
kind: "settings",
|
|
1371
|
-
title: `Pi Sync Settings \xB7 ${groups[group].label}`,
|
|
1372
|
-
lines: [
|
|
1373
|
-
`Setup: ${safeTerminalText(state.setupName)} \xB7 Connection: ${safeTerminalText(state.connectionName)}`,
|
|
1374
|
-
saveStatus
|
|
1375
|
-
],
|
|
1376
|
-
items: [
|
|
1377
|
-
{
|
|
1378
|
-
id: "include",
|
|
1379
|
-
label: "Included paths",
|
|
1380
|
-
description: "This setup: choose paths in a draft, then review and Save or Discard. No transfer is started.",
|
|
1381
|
-
currentValue: `${state.include.length} paths \xB7 Edit`,
|
|
1382
|
-
action: "include"
|
|
1383
|
-
},
|
|
1384
|
-
{
|
|
1385
|
-
id: "remoteInclude",
|
|
1386
|
-
label: "Compare included paths",
|
|
1387
|
-
description: "This setup: compare included-path policies, not file contents. Review before saving either list; no files transfer unless you explicitly Continue.",
|
|
1388
|
-
currentValue: "Review",
|
|
1389
|
-
action: "remote-include"
|
|
1390
|
-
},
|
|
1391
|
-
{
|
|
1392
|
-
id: "localFields",
|
|
1393
|
-
label: "Machine-local fields",
|
|
1394
|
-
description: "This setup: settings.json root fields excluded from future portable snapshots, not project overrides. Policy changes require reviewed directional migration; old history remains.",
|
|
1395
|
-
currentValue: `${state.localFields?.length ?? 0} fields \xB7 Edit`,
|
|
1396
|
-
action: "local-fields"
|
|
1397
|
-
},
|
|
1398
|
-
{
|
|
1399
|
-
id: "storageLocation",
|
|
1400
|
-
label: "Storage location",
|
|
1401
|
-
description: "This setup: review and save bucket, branch, or path changes. Remote history is not moved.",
|
|
1402
|
-
currentValue: state.backend.type === "s3" ? `${safeTerminalText(state.backend.destination.bucket)} \xB7 ${safeTerminalText(state.backend.destination.prefix)}` : state.backend.type === "git" ? `${safeTerminalText(state.backend.destination.branch)} \xB7 ${safeTerminalText(state.backend.destination.directory)}` : safeTerminalText(state.backend.destination.path),
|
|
1403
|
-
action: "storage-location"
|
|
1404
|
-
},
|
|
1405
|
-
{
|
|
1406
|
-
id: "setups",
|
|
1407
|
-
label: "Manage sync setups",
|
|
1408
|
-
description: "This device: add, switch, edit, or remove sync setups. Each edit identifies its owner before saving.",
|
|
1409
|
-
currentValue: "Open",
|
|
1410
|
-
action: "setups"
|
|
1411
|
-
},
|
|
1412
|
-
{
|
|
1413
|
-
id: "connections",
|
|
1414
|
-
label: "Manage storage connections",
|
|
1415
|
-
description: "Shared connections on this device: review affected setups before saving server or credential changes.",
|
|
1416
|
-
currentValue: "Open",
|
|
1417
|
-
action: "connections"
|
|
1418
|
-
},
|
|
1419
|
-
{
|
|
1420
|
-
id: "automatic",
|
|
1421
|
-
label: "Automatic sync",
|
|
1422
|
-
description: AUTOMATIC_SYNC_DESCRIPTION,
|
|
1423
|
-
currentValue: state.automatic ? "On" : "Off",
|
|
1424
|
-
values: ["On", "Off"],
|
|
1425
|
-
action: "automatic"
|
|
1426
|
-
},
|
|
1427
|
-
{
|
|
1428
|
-
id: "automaticTransfer",
|
|
1429
|
-
label: "Startup transfer",
|
|
1430
|
-
description: `${STARTUP_TRANSFER_DESCRIPTION} Saved preference and requirements: ${startupTransferSummary(state)}.`,
|
|
1431
|
-
currentValue: state.automaticTransfer ? "On" : "Off",
|
|
1432
|
-
values: ["On", "Off"],
|
|
1433
|
-
action: "automatic-transfer"
|
|
1434
|
-
},
|
|
1435
|
-
{
|
|
1436
|
-
id: "agentMode",
|
|
1437
|
-
label: "Agent mode (experimental)",
|
|
1438
|
-
description: AGENT_MODE_DESCRIPTION,
|
|
1439
|
-
currentValue: state.agentMode ? "On" : "Off",
|
|
1440
|
-
values: ["On", "Off"],
|
|
1441
|
-
action: "agent-mode"
|
|
1442
|
-
},
|
|
1443
|
-
{
|
|
1444
|
-
id: "continuous",
|
|
1445
|
-
label: "Continuous sync (experimental)",
|
|
1446
|
-
description: `${CONTINUOUS_DESCRIPTION}${state.continuous && !state.agentMode ? " Saved On, but paused until Agent mode is enabled." : ""}`,
|
|
1447
|
-
currentValue: state.continuous ? "On" : "Off",
|
|
1448
|
-
values: ["On", "Off"],
|
|
1449
|
-
action: "continuous"
|
|
1450
|
-
},
|
|
1451
|
-
{
|
|
1452
|
-
id: "onSwitch",
|
|
1453
|
-
label: "On setup switch",
|
|
1454
|
-
description: "All setups on this device: ask before a pull review, open it automatically, or switch without pulling. Applies to subsequent switches.",
|
|
1455
|
-
currentValue: setupSwitchActionLabel(state.onSwitch),
|
|
1456
|
-
values: SETUP_SWITCH_ACTION_OPTIONS.map(({ label }) => label),
|
|
1457
|
-
action: "on-switch"
|
|
1458
|
-
},
|
|
1459
|
-
{
|
|
1460
|
-
id: "mergeSettings",
|
|
1461
|
-
label: "Merge settings fields",
|
|
1462
|
-
description: "This setup, experimental opt-in: merge independent global settings.json root fields with a verified private ancestor. Arrays and nested objects remain atomic. Applies to subsequent sync; no reload.",
|
|
1463
|
-
currentValue: state.mergeSettings ? "On" : "Off",
|
|
1464
|
-
values: ["On", "Off"],
|
|
1465
|
-
action: "merge-settings"
|
|
1466
|
-
},
|
|
1467
|
-
{
|
|
1468
|
-
id: "contentPolicy",
|
|
1469
|
-
label: "Content merge / partial progress",
|
|
1470
|
-
description: "This setup, experimental opt-in: review the version-5 upgrade before saving. Merge bounded text and prefix-only sessions; partial progress keeps withheld versions and baselines. Applies to subsequent sync; disabling does not clear recovery evidence.",
|
|
1471
|
-
currentValue: state.mergeContent ? state.partialSync ? "Merge + partial" : "Merge only" : state.partialSync ? "Partial only" : "Off",
|
|
1472
|
-
values: ["Off", "Merge only", "Merge + partial", "Partial only"],
|
|
1473
|
-
action: "content-policy"
|
|
1474
|
-
},
|
|
1475
|
-
{
|
|
1476
|
-
id: "skipSecretScan",
|
|
1477
|
-
label: "Skip secret scan",
|
|
1478
|
-
description: "All setups on this device: skip possible-secret checks on subsequent pushes, including automatic pushes. Other safety checks remain. Diagnostics still scans.",
|
|
1479
|
-
currentValue: state.skipSecretScan ? "On" : "Off",
|
|
1480
|
-
values: ["On", "Off"],
|
|
1481
|
-
action: "skip-secret-scan"
|
|
1482
|
-
},
|
|
1483
|
-
{
|
|
1484
|
-
id: "showStatus",
|
|
1485
|
-
label: "Show sync status",
|
|
1486
|
-
description: "All setups on this device: saved and applied immediately to Pi status. Review widgets and notifications remain available.",
|
|
1487
|
-
currentValue: state.showStatus ? "On" : "Off",
|
|
1488
|
-
values: ["On", "Off"],
|
|
1489
|
-
action: "show-status"
|
|
1490
|
-
},
|
|
1491
|
-
{
|
|
1492
|
-
id: "debug",
|
|
1493
|
-
label: "Debug startup timings",
|
|
1494
|
-
description: "All setups on this device: show startup durations in the TUI transcript or RPC notifications, including initial Continuous sync. Applies next session start; no credentials or file contents.",
|
|
1495
|
-
currentValue: state.debug ? "On" : "Off",
|
|
1496
|
-
values: ["On", "Off"],
|
|
1497
|
-
action: "debug"
|
|
1498
|
-
}
|
|
1499
|
-
].filter((item) => group === "all" || groups[group].ids.includes(item.id))
|
|
1500
|
-
});
|
|
1501
1360
|
const menu = defineMenu4({
|
|
1502
|
-
start: "
|
|
1361
|
+
start: "settings",
|
|
1503
1362
|
screens: {
|
|
1504
|
-
|
|
1505
|
-
kind: "
|
|
1363
|
+
settings: ({ state }) => ({
|
|
1364
|
+
kind: "settings",
|
|
1506
1365
|
title: "Pi Sync Settings",
|
|
1507
1366
|
lines: [
|
|
1508
1367
|
`Setup: ${safeTerminalText(state.setupName)} \xB7 Connection: ${safeTerminalText(state.connectionName)}`,
|
|
1509
|
-
"Choose a task, or search all settings. Scope is shown in each setting's description.",
|
|
1510
1368
|
saveStatus
|
|
1511
1369
|
],
|
|
1512
|
-
items:
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1370
|
+
items: [
|
|
1371
|
+
{
|
|
1372
|
+
id: "include",
|
|
1373
|
+
label: "Included paths",
|
|
1374
|
+
description: "This setup: choose paths in a draft, then review and Save or Discard. No transfer is started.",
|
|
1375
|
+
currentValue: `${state.include.length} paths \xB7 Edit`,
|
|
1376
|
+
action: "include"
|
|
1377
|
+
},
|
|
1378
|
+
{
|
|
1379
|
+
id: "remoteInclude",
|
|
1380
|
+
label: "Compare included paths",
|
|
1381
|
+
description: "This setup: compare included-path policies, not file contents. Review before saving either list; no files transfer unless you explicitly Continue.",
|
|
1382
|
+
currentValue: "Review",
|
|
1383
|
+
action: "remote-include"
|
|
1384
|
+
},
|
|
1385
|
+
{
|
|
1386
|
+
id: "localFields",
|
|
1387
|
+
label: "Machine-local fields",
|
|
1388
|
+
description: "This setup: settings.json root fields excluded from future portable snapshots, not project overrides. Policy changes require reviewed directional migration; old history remains.",
|
|
1389
|
+
currentValue: `${state.localFields?.length ?? 0} fields \xB7 Edit`,
|
|
1390
|
+
action: "local-fields"
|
|
1391
|
+
},
|
|
1392
|
+
{
|
|
1393
|
+
id: "storageLocation",
|
|
1394
|
+
label: "Storage location",
|
|
1395
|
+
description: "This setup: review and save bucket, branch, or path changes. Remote history is not moved.",
|
|
1396
|
+
currentValue: state.backend.type === "s3" ? `${safeTerminalText(state.backend.destination.bucket)} \xB7 ${safeTerminalText(state.backend.destination.prefix)}` : state.backend.type === "git" ? `${safeTerminalText(state.backend.destination.branch)} \xB7 ${safeTerminalText(state.backend.destination.directory)}` : safeTerminalText(state.backend.destination.path),
|
|
1397
|
+
action: "storage-location"
|
|
1398
|
+
},
|
|
1399
|
+
{
|
|
1400
|
+
id: "setups",
|
|
1401
|
+
label: "Manage sync setups",
|
|
1402
|
+
description: "This device: add, switch, edit, or remove sync setups. Each edit identifies its owner before saving.",
|
|
1403
|
+
currentValue: "Open",
|
|
1404
|
+
action: "setups"
|
|
1405
|
+
},
|
|
1406
|
+
{
|
|
1407
|
+
id: "connections",
|
|
1408
|
+
label: "Manage storage connections",
|
|
1409
|
+
description: "Shared connections on this device: review affected setups before saving server or credential changes.",
|
|
1410
|
+
currentValue: "Open",
|
|
1411
|
+
action: "connections"
|
|
1412
|
+
},
|
|
1413
|
+
{
|
|
1414
|
+
id: "automatic",
|
|
1415
|
+
label: "Automatic sync",
|
|
1416
|
+
description: AUTOMATIC_SYNC_DESCRIPTION,
|
|
1417
|
+
currentValue: state.automatic ? "On" : "Off",
|
|
1418
|
+
values: ["On", "Off"],
|
|
1419
|
+
action: "automatic"
|
|
1420
|
+
},
|
|
1421
|
+
{
|
|
1422
|
+
id: "automaticTransfer",
|
|
1423
|
+
label: "Startup transfer",
|
|
1424
|
+
description: `${STARTUP_TRANSFER_DESCRIPTION} Saved preference and requirements: ${startupTransferSummary(state)}.`,
|
|
1425
|
+
currentValue: state.automaticTransfer ? "On" : "Off",
|
|
1426
|
+
values: ["On", "Off"],
|
|
1427
|
+
action: "automatic-transfer"
|
|
1428
|
+
},
|
|
1429
|
+
{
|
|
1430
|
+
id: "agentMode",
|
|
1431
|
+
label: "Autonomous sync",
|
|
1432
|
+
description: AGENT_MODE_DESCRIPTION,
|
|
1433
|
+
currentValue: state.agentMode ? "On" : "Off",
|
|
1434
|
+
values: ["On", "Off"],
|
|
1435
|
+
action: "agent-mode"
|
|
1436
|
+
},
|
|
1437
|
+
{
|
|
1438
|
+
id: "continuous",
|
|
1439
|
+
label: "Continuous sync",
|
|
1440
|
+
description: `${CONTINUOUS_DESCRIPTION}${state.continuous && !state.agentMode ? " Saved On, but paused until Autonomous sync is enabled." : ""}`,
|
|
1441
|
+
currentValue: state.continuous ? "On" : "Off",
|
|
1442
|
+
values: ["On", "Off"],
|
|
1443
|
+
action: "continuous"
|
|
1444
|
+
},
|
|
1445
|
+
{
|
|
1446
|
+
id: "onSwitch",
|
|
1447
|
+
label: "On setup switch",
|
|
1448
|
+
description: "All setups on this device: ask before a pull review, open it automatically, or switch without pulling. Applies to subsequent switches.",
|
|
1449
|
+
currentValue: setupSwitchActionLabel(state.onSwitch),
|
|
1450
|
+
values: SETUP_SWITCH_ACTION_OPTIONS.map(({ label }) => label),
|
|
1451
|
+
action: "on-switch"
|
|
1452
|
+
},
|
|
1453
|
+
{
|
|
1454
|
+
id: "mergeSettings",
|
|
1455
|
+
label: "Merge settings fields",
|
|
1456
|
+
description: "This setup, opt-in: merge independent global settings.json root fields with a verified private ancestor. Arrays and nested objects remain atomic. Applies to subsequent sync; no reload.",
|
|
1457
|
+
currentValue: state.mergeSettings ? "On" : "Off",
|
|
1458
|
+
values: ["On", "Off"],
|
|
1459
|
+
action: "merge-settings"
|
|
1460
|
+
},
|
|
1461
|
+
{
|
|
1462
|
+
id: "contentPolicy",
|
|
1463
|
+
label: "Content merge / partial progress",
|
|
1464
|
+
description: "This setup, opt-in: review the version-5 upgrade before saving. Merge bounded text and prefix-only sessions; partial progress keeps withheld versions and baselines. Applies to subsequent sync; disabling does not clear recovery evidence.",
|
|
1465
|
+
currentValue: state.mergeContent ? state.partialSync ? "Merge + partial" : "Merge only" : state.partialSync ? "Partial only" : "Off",
|
|
1466
|
+
values: ["Off", "Merge only", "Merge + partial", "Partial only"],
|
|
1467
|
+
action: "content-policy"
|
|
1468
|
+
},
|
|
1469
|
+
{
|
|
1470
|
+
id: "skipSecretScan",
|
|
1471
|
+
label: "Skip secret scan",
|
|
1472
|
+
description: "All setups on this device: skip possible-secret checks on subsequent pushes, including automatic pushes. Other safety checks remain. Diagnostics still scans.",
|
|
1473
|
+
currentValue: state.skipSecretScan ? "On" : "Off",
|
|
1474
|
+
values: ["On", "Off"],
|
|
1475
|
+
action: "skip-secret-scan"
|
|
1476
|
+
},
|
|
1477
|
+
{
|
|
1478
|
+
id: "showStatus",
|
|
1479
|
+
label: "Show sync status",
|
|
1480
|
+
description: "All setups on this device: saved and applied immediately to Pi status. Review widgets and notifications remain available.",
|
|
1481
|
+
currentValue: state.showStatus ? "On" : "Off",
|
|
1482
|
+
values: ["On", "Off"],
|
|
1483
|
+
action: "show-status"
|
|
1484
|
+
},
|
|
1485
|
+
{
|
|
1486
|
+
id: "debug",
|
|
1487
|
+
label: "Debug startup timings",
|
|
1488
|
+
description: "All setups on this device: show startup durations in the TUI transcript or RPC notifications, including initial Continuous sync. Applies next session start; no credentials or file contents.",
|
|
1489
|
+
currentValue: state.debug ? "On" : "Off",
|
|
1490
|
+
values: ["On", "Off"],
|
|
1491
|
+
action: "debug"
|
|
1492
|
+
}
|
|
1493
|
+
]
|
|
1494
|
+
})
|
|
1524
1495
|
},
|
|
1525
1496
|
actions: {
|
|
1526
1497
|
"storage-location": async ({ signal: actionSignal }) => {
|
|
@@ -1547,7 +1518,7 @@ async function showSyncSettings(ctx, runRoute, signal) {
|
|
|
1547
1518
|
const mergeContent = value === "Merge only" || value === "Merge + partial";
|
|
1548
1519
|
const partialSync = value === "Partial only" || value === "Merge + partial";
|
|
1549
1520
|
if (!await ctx.ui.confirm(
|
|
1550
|
-
"Save
|
|
1521
|
+
"Save content policy?",
|
|
1551
1522
|
"This explicitly upgrades settings to version 5; partial snapshots use version 3 and older clients must refuse them. Text/session merge is conservative. Partial sync preserves withheld versions and old baselines. Disabling does not clear unresolved groups or recovery evidence. Review a directional migration first if portable policy changes.",
|
|
1552
1523
|
{ signal: mutationSignal }
|
|
1553
1524
|
))
|
|
@@ -1675,7 +1646,7 @@ async function showSyncSettings(ctx, runRoute, signal) {
|
|
|
1675
1646
|
try {
|
|
1676
1647
|
validate();
|
|
1677
1648
|
ctx.ui.notify(
|
|
1678
|
-
"
|
|
1649
|
+
"Autonomous sync saved. Applies to subsequent sync and the next session start; no transfer started.",
|
|
1679
1650
|
"info"
|
|
1680
1651
|
);
|
|
1681
1652
|
} catch {
|
|
@@ -1803,7 +1774,7 @@ async function showSyncSettings(ctx, runRoute, signal) {
|
|
|
1803
1774
|
},
|
|
1804
1775
|
"remote-include": async ({ signal: actionSignal }) => {
|
|
1805
1776
|
const reviewSignal = signal ? AbortSignal.any([signal, actionSignal]) : actionSignal;
|
|
1806
|
-
const { showRemoteSelectionReview } = await import("./remote-selection-ui-
|
|
1777
|
+
const { showRemoteSelectionReview } = await import("./remote-selection-ui-TD4C4W3J.ts");
|
|
1807
1778
|
if (reviewSignal.aborted) return { kind: "rejected" };
|
|
1808
1779
|
const review = await showRemoteSelectionReview(ctx, setupName, reviewSignal, void 0, {
|
|
1809
1780
|
origin: "settings",
|
|
@@ -1870,6 +1841,15 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
|
|
|
1870
1841
|
await runRoute("help");
|
|
1871
1842
|
return;
|
|
1872
1843
|
}
|
|
1844
|
+
const validateOwner = captureMutationOwner(ctx, sessionSignal);
|
|
1845
|
+
const isCurrent = () => {
|
|
1846
|
+
try {
|
|
1847
|
+
validateOwner();
|
|
1848
|
+
return true;
|
|
1849
|
+
} catch {
|
|
1850
|
+
return false;
|
|
1851
|
+
}
|
|
1852
|
+
};
|
|
1873
1853
|
const menu = defineMenu5({
|
|
1874
1854
|
start: "main",
|
|
1875
1855
|
screens: {
|
|
@@ -1893,12 +1873,13 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
|
|
|
1893
1873
|
}
|
|
1894
1874
|
},
|
|
1895
1875
|
actions: {
|
|
1896
|
-
"review-attention": async () => {
|
|
1897
|
-
const attention =
|
|
1876
|
+
"review-attention": async ({ state }) => {
|
|
1877
|
+
const attention = state.manager.attention;
|
|
1878
|
+
if (attention && options.getAttention?.() !== attention) return { kind: "stay" };
|
|
1898
1879
|
if (!attention) {
|
|
1899
|
-
const observation =
|
|
1880
|
+
const observation = state.manager.observation;
|
|
1900
1881
|
if (!observation) return { kind: "stay" };
|
|
1901
|
-
const { showRemoteSelectionReview } = await import("./remote-selection-ui-
|
|
1882
|
+
const { showRemoteSelectionReview } = await import("./remote-selection-ui-TD4C4W3J.ts");
|
|
1902
1883
|
if (sessionSignal?.aborted) return { kind: "close" };
|
|
1903
1884
|
const config = await loadConfig();
|
|
1904
1885
|
if (sessionSignal?.aborted) return { kind: "close" };
|
|
@@ -1929,24 +1910,21 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
|
|
|
1929
1910
|
);
|
|
1930
1911
|
return { kind: disposition };
|
|
1931
1912
|
},
|
|
1932
|
-
sync: async () => {
|
|
1913
|
+
sync: async ({ state }) => {
|
|
1933
1914
|
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
|
-
}
|
|
1915
|
+
if (pendingAttention?.decision.setupName === state.manager.configReview?.setupName) {
|
|
1916
|
+
ctx.ui.notify("Review synced content before starting Sync now.", "warning");
|
|
1917
|
+
return { kind: "stay" };
|
|
1941
1918
|
}
|
|
1942
1919
|
const result = await runCancellableOperation(ctx, "Checking current sync setup\u2026", "sync", runRoute, {
|
|
1943
1920
|
commitAware: true,
|
|
1944
|
-
signal: sessionSignal
|
|
1921
|
+
signal: sessionSignal,
|
|
1922
|
+
target: state.manager.configReview?.setupName
|
|
1945
1923
|
});
|
|
1946
1924
|
const disposition = await dispatchManagerResult(ctx, result, "sync", runRoute, sessionSignal);
|
|
1947
1925
|
return disposition.kind === "close" ? { kind: "close" } : { kind: "stay" };
|
|
1948
1926
|
},
|
|
1949
|
-
"retry-refusal": async ({ signal: actionSignal }) => {
|
|
1927
|
+
"retry-refusal": async ({ state, signal: actionSignal }) => {
|
|
1950
1928
|
const signal = sessionSignal ? AbortSignal.any([sessionSignal, actionSignal]) : actionSignal;
|
|
1951
1929
|
const validate = captureMutationOwner(ctx, signal);
|
|
1952
1930
|
validate();
|
|
@@ -1955,6 +1933,7 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
|
|
|
1955
1933
|
commitAware: true,
|
|
1956
1934
|
cancelAcrossDialogs: true,
|
|
1957
1935
|
signal,
|
|
1936
|
+
target: state.manager.configReview?.setupName,
|
|
1958
1937
|
cancelledMessage: "Model retry cancelled. Submitted requests and committed writes cannot be undone."
|
|
1959
1938
|
});
|
|
1960
1939
|
if (signal.aborted) return { kind: "close" };
|
|
@@ -1970,23 +1949,25 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
|
|
|
1970
1949
|
const result = await showSetupSwitcher(ctx, runRoute, void 0, sessionSignal);
|
|
1971
1950
|
return result === "pull-attempted" || result === "closed" ? { kind: "close" } : { kind: "stay" };
|
|
1972
1951
|
},
|
|
1973
|
-
settings: async () => {
|
|
1974
|
-
const result = await showSyncSettings(ctx, runRoute, sessionSignal);
|
|
1952
|
+
settings: async ({ state }) => {
|
|
1953
|
+
const result = await showSyncSettings(ctx, runRoute, sessionSignal, state.manager.configReview?.setupName);
|
|
1975
1954
|
return { kind: result === "exit" ? "close" : "stay" };
|
|
1976
1955
|
},
|
|
1977
|
-
pull: async () => {
|
|
1956
|
+
pull: async ({ state }) => {
|
|
1978
1957
|
const result = await runCancellableOperation(ctx, "Checking remote changes\u2026", "pull", runRoute, {
|
|
1979
1958
|
commitAware: true,
|
|
1980
1959
|
cancelledMessage: "Pull check cancelled; no local files were changed.",
|
|
1960
|
+
target: state.manager.configReview?.setupName,
|
|
1981
1961
|
signal: sessionSignal
|
|
1982
1962
|
});
|
|
1983
1963
|
const disposition = await dispatchManagerResult(ctx, result, "pull", runRoute, sessionSignal);
|
|
1984
1964
|
return disposition.kind === "close" ? { kind: "close" } : { kind: "stay" };
|
|
1985
1965
|
},
|
|
1986
|
-
push: async () => {
|
|
1966
|
+
push: async ({ state }) => {
|
|
1987
1967
|
const result = await runCancellableOperation(ctx, "Preparing push preview\u2026", "push", runRoute, {
|
|
1988
1968
|
commitAware: true,
|
|
1989
1969
|
cancelledMessage: "Push preparation cancelled; no remote files were changed.",
|
|
1970
|
+
target: state.manager.configReview?.setupName,
|
|
1990
1971
|
signal: sessionSignal
|
|
1991
1972
|
});
|
|
1992
1973
|
const disposition = await dispatchManagerResult(ctx, result, "push", runRoute, sessionSignal);
|
|
@@ -2000,31 +1981,34 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
|
|
|
2000
1981
|
await showStorageConnections(ctx, sessionSignal);
|
|
2001
1982
|
return { kind: "stay" };
|
|
2002
1983
|
},
|
|
2003
|
-
history: async () => {
|
|
1984
|
+
history: async ({ state }) => {
|
|
2004
1985
|
const result = await runCancellableOperation(ctx, "Loading sync history\u2026", "history", runRoute, {
|
|
2005
1986
|
signal: sessionSignal,
|
|
2006
1987
|
commitAware: true,
|
|
2007
1988
|
cancelAcrossDialogs: true,
|
|
1989
|
+
target: state.manager.configReview?.setupName,
|
|
2008
1990
|
cancelledMessage: "History review cancelled; no files were changed."
|
|
2009
1991
|
});
|
|
2010
1992
|
return { kind: result.kind === "closed" ? "close" : "stay" };
|
|
2011
1993
|
},
|
|
2012
|
-
diff: async () => {
|
|
1994
|
+
diff: async ({ state }) => {
|
|
2013
1995
|
const result = await runCancellableOperation(ctx, "Comparing local and remote\u2026", "diff", runRoute, {
|
|
1996
|
+
target: state.manager.configReview?.setupName,
|
|
2014
1997
|
signal: sessionSignal
|
|
2015
1998
|
});
|
|
2016
1999
|
return { kind: result.kind === "closed" ? "close" : "stay" };
|
|
2017
2000
|
},
|
|
2018
|
-
status: async () => {
|
|
2001
|
+
status: async ({ state }) => {
|
|
2019
2002
|
const result = await runCancellableOperation(ctx, "Checking remote status\u2026", "status", runRoute, {
|
|
2003
|
+
target: state.manager.configReview?.setupName,
|
|
2020
2004
|
signal: sessionSignal
|
|
2021
2005
|
});
|
|
2022
2006
|
return { kind: result.kind === "closed" ? "close" : "stay" };
|
|
2023
2007
|
},
|
|
2024
|
-
doctor: async ({ signal: actionSignal }) => {
|
|
2008
|
+
doctor: async ({ state, signal: actionSignal }) => {
|
|
2025
2009
|
const signal = sessionSignal ? AbortSignal.any([sessionSignal, actionSignal]) : actionSignal;
|
|
2026
2010
|
const validate = captureMutationOwner(ctx, signal);
|
|
2027
|
-
const config = await loadConfig();
|
|
2011
|
+
const config = await loadConfig(state.manager.configReview?.setupName);
|
|
2028
2012
|
validate();
|
|
2029
2013
|
const confirmed = await ctx.ui.confirm(
|
|
2030
2014
|
"Run diagnostics?",
|
|
@@ -2058,11 +2042,12 @@ S3/R2 reads the latest pointer without writing. Git reads remote snapshots and c
|
|
|
2058
2042
|
return { kind: "close" };
|
|
2059
2043
|
},
|
|
2060
2044
|
init: async () => {
|
|
2061
|
-
await runRoute("init");
|
|
2045
|
+
await runRoute("init", sessionSignal);
|
|
2062
2046
|
return { kind: "stay" };
|
|
2063
2047
|
},
|
|
2064
|
-
conflicts: async () => {
|
|
2048
|
+
conflicts: async ({ state }) => {
|
|
2065
2049
|
const result = await runCancellableOperation(ctx, "Reviewing private conflicts\u2026", "conflicts", runRoute, {
|
|
2050
|
+
target: state.manager.configReview?.setupName,
|
|
2066
2051
|
commitAware: true,
|
|
2067
2052
|
signal: sessionSignal
|
|
2068
2053
|
});
|
|
@@ -2071,6 +2056,42 @@ S3/R2 reads the latest pointer without writing. Git reads remote snapshots and c
|
|
|
2071
2056
|
}
|
|
2072
2057
|
}
|
|
2073
2058
|
});
|
|
2059
|
+
for (const action of [
|
|
2060
|
+
"review-attention",
|
|
2061
|
+
"sync",
|
|
2062
|
+
"retry-refusal",
|
|
2063
|
+
"settings",
|
|
2064
|
+
"pull",
|
|
2065
|
+
"push",
|
|
2066
|
+
"history",
|
|
2067
|
+
"diff",
|
|
2068
|
+
"status",
|
|
2069
|
+
"doctor",
|
|
2070
|
+
"conflicts"
|
|
2071
|
+
]) {
|
|
2072
|
+
const activate = menu.actions[action];
|
|
2073
|
+
menu.actions[action] = async (invocation) => {
|
|
2074
|
+
validateOwner();
|
|
2075
|
+
const review = invocation.state.manager.configReview;
|
|
2076
|
+
let current = false;
|
|
2077
|
+
try {
|
|
2078
|
+
const config = await loadConfig();
|
|
2079
|
+
validateOwner();
|
|
2080
|
+
invocation.signal.throwIfAborted();
|
|
2081
|
+
current = review?.fingerprint === syncCheckConfigFingerprint(config);
|
|
2082
|
+
} catch {
|
|
2083
|
+
if (!isCurrent() || invocation.signal.aborted) return { kind: "close" };
|
|
2084
|
+
}
|
|
2085
|
+
if (!current) {
|
|
2086
|
+
ctx.ui.notify(
|
|
2087
|
+
"Sync setup changed while the manager was open. Review the refreshed setup before continuing.",
|
|
2088
|
+
"warning"
|
|
2089
|
+
);
|
|
2090
|
+
return { kind: "stay" };
|
|
2091
|
+
}
|
|
2092
|
+
return activate(invocation);
|
|
2093
|
+
};
|
|
2094
|
+
}
|
|
2074
2095
|
const menuContext = {
|
|
2075
2096
|
...ctx,
|
|
2076
2097
|
ui: {
|
|
@@ -2101,7 +2122,7 @@ S3/R2 reads the latest pointer without writing. Git reads remote snapshots and c
|
|
|
2101
2122
|
return { manager };
|
|
2102
2123
|
},
|
|
2103
2124
|
signal: sessionSignal,
|
|
2104
|
-
isCurrent
|
|
2125
|
+
isCurrent
|
|
2105
2126
|
});
|
|
2106
2127
|
}
|
|
2107
2128
|
function syncMainMenuItem(label) {
|
|
@@ -2137,4 +2158,4 @@ function syncMainMenuItem(label) {
|
|
|
2137
2158
|
export {
|
|
2138
2159
|
showSyncManager
|
|
2139
2160
|
};
|
|
2140
|
-
//# sourceMappingURL=manager-ui-
|
|
2161
|
+
//# sourceMappingURL=manager-ui-INVMAFEN.ts.map
|