@narumitw/pi-sync 0.59.0 → 0.60.1
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 +21 -0
- package/README.md +25 -17
- package/dist/chunks/{chunk-AMJRUXFT.ts → chunk-2JNFEZ3V.ts} +2 -6
- package/dist/chunks/{chunk-AMJRUXFT.ts.map → chunk-2JNFEZ3V.ts.map} +1 -1
- package/dist/chunks/{chunk-NGW4JMBF.ts → chunk-4RNCZZY7.ts} +33 -27
- package/dist/chunks/{chunk-NGW4JMBF.ts.map → chunk-4RNCZZY7.ts.map} +3 -3
- package/dist/chunks/{chunk-2ZZJXITS.ts → chunk-6LHIRS5R.ts} +30 -47
- package/dist/chunks/chunk-6LHIRS5R.ts.map +7 -0
- package/dist/chunks/{config-J5VZUY4J.ts → chunk-7AC2RX4M.ts} +6 -13
- package/dist/chunks/chunk-7AC2RX4M.ts.map +7 -0
- package/dist/chunks/{chunk-76HID27T.ts → chunk-BGGKHHO4.ts} +18 -14
- package/dist/chunks/{chunk-76HID27T.ts.map → chunk-BGGKHHO4.ts.map} +1 -1
- package/dist/chunks/chunk-BWWTOQOW.ts +737 -0
- package/dist/chunks/chunk-BWWTOQOW.ts.map +7 -0
- package/dist/chunks/chunk-CEMFCWIU.ts +20 -0
- package/dist/chunks/chunk-CEMFCWIU.ts.map +7 -0
- package/dist/chunks/chunk-CZNBKIM5.ts +20 -0
- package/dist/chunks/chunk-CZNBKIM5.ts.map +7 -0
- package/dist/chunks/{chunk-YIPK23JW.ts → chunk-ENFHHB5O.ts} +1 -16
- package/dist/chunks/{chunk-YIPK23JW.ts.map → chunk-ENFHHB5O.ts.map} +1 -1
- package/dist/chunks/{chunk-KHBPED6W.ts → chunk-GSQGBVKG.ts} +2 -2
- package/dist/chunks/chunk-HNKLBM3U.ts +18 -0
- package/dist/chunks/chunk-HNKLBM3U.ts.map +7 -0
- package/dist/chunks/{chunk-QPC5HT3A.ts → chunk-J5COV5TY.ts} +21 -2
- package/dist/chunks/chunk-J5COV5TY.ts.map +7 -0
- package/dist/chunks/chunk-JKBUYCPC.ts +52 -0
- package/dist/chunks/chunk-JKBUYCPC.ts.map +7 -0
- package/dist/chunks/chunk-JZKCOM62.ts +26 -0
- package/dist/chunks/chunk-JZKCOM62.ts.map +7 -0
- package/dist/chunks/chunk-M7RHV3H6.ts +33 -0
- package/dist/chunks/chunk-M7RHV3H6.ts.map +7 -0
- package/dist/chunks/chunk-NPT2G4FU.ts +15 -0
- package/dist/chunks/chunk-NPT2G4FU.ts.map +7 -0
- package/dist/chunks/chunk-PDBTD2K6.ts +11 -0
- package/dist/chunks/chunk-PDBTD2K6.ts.map +7 -0
- package/dist/chunks/chunk-UBE6XWOM.ts +29 -0
- package/dist/chunks/chunk-UBE6XWOM.ts.map +7 -0
- package/dist/chunks/{chunk-PQ75RPUP.ts → chunk-UZUUUY7C.ts} +8 -8
- package/dist/chunks/chunk-VZCWYXRS.ts +23 -0
- package/dist/chunks/chunk-VZCWYXRS.ts.map +7 -0
- package/dist/chunks/{chunk-DTPELCPW.ts → chunk-YWEYRRQI.ts} +45 -37
- package/dist/chunks/chunk-YWEYRRQI.ts.map +7 -0
- package/dist/chunks/{chunk-ECYCNZOE.ts → chunk-ZMNVNECV.ts} +5 -1
- package/dist/chunks/chunk-ZMNVNECV.ts.map +7 -0
- package/dist/chunks/{command-handler-SDGKIQH2.ts → command-handler-FO4XBBHF.ts} +80 -86
- package/dist/chunks/command-handler-FO4XBBHF.ts.map +7 -0
- package/dist/chunks/conflict-review-XBSME2ER.ts +18 -0
- package/dist/chunks/conflict-review-XBSME2ER.ts.map +7 -0
- package/dist/chunks/{continuous-record-OM64J27R.ts → continuous-record-ZHUXVO4E.ts} +5 -13
- package/dist/chunks/continuous-record-ZHUXVO4E.ts.map +7 -0
- package/dist/chunks/continuous-storage-SQBAXACF.ts +27 -0
- package/dist/chunks/continuous-storage-SQBAXACF.ts.map +7 -0
- package/dist/chunks/{file-selection-7HEVPO4T.ts → file-selection-S6CNNNQI.ts} +11 -14
- package/dist/chunks/{file-selection-7HEVPO4T.ts.map → file-selection-S6CNNNQI.ts.map} +1 -1
- package/dist/chunks/manager-result-dispatcher-I2AMCCE7.ts +18 -0
- package/dist/chunks/{manager-ui-65ZETN6F.ts → manager-ui-AY5ZU6B4.ts} +180 -164
- package/dist/chunks/manager-ui-AY5ZU6B4.ts.map +7 -0
- package/dist/chunks/merge-review-SGDLMVS4.ts +10 -0
- package/dist/chunks/remote-selection-ui-GZHPDQ4L.ts +17 -0
- package/dist/chunks/{setup-switch-AB27ADDI.ts → setup-switch-M3BAFGJM.ts} +9 -13
- package/dist/chunks/{setup-wizard-5FILKFLQ.ts → setup-wizard-NFAWP4KF.ts} +18 -21
- package/dist/chunks/{setup-wizard-5FILKFLQ.ts.map → setup-wizard-NFAWP4KF.ts.map} +1 -1
- package/dist/chunks/{snapshot-G3W2GOGB.ts → snapshot-D4SFDP5J.ts} +8 -13
- package/dist/chunks/snapshot-D4SFDP5J.ts.map +7 -0
- package/dist/chunks/snapshot-transaction-directory-TNKBQ3UQ.ts +13 -0
- package/dist/chunks/snapshot-transaction-directory-TNKBQ3UQ.ts.map +7 -0
- package/dist/chunks/state-directory-JZSZVVPX.ts +17 -0
- package/dist/chunks/sync-inspection-BJ4KPPNO.ts +23 -0
- package/dist/chunks/sync-inspection-BJ4KPPNO.ts.map +7 -0
- package/dist/chunks/sync-operations-TLWER2TT.ts +45 -0
- package/dist/chunks/sync-operations-TLWER2TT.ts.map +7 -0
- package/dist/chunks/{sync-state-H4TFZZ7S.ts → sync-state-FVCJJ7MY.ts} +5 -11
- package/dist/chunks/sync-state-FVCJJ7MY.ts.map +7 -0
- package/dist/index.ts +269 -313
- package/dist/index.ts.map +4 -4
- package/docs/daemon-migration.md +93 -0
- package/docs/tui-contract.md +12 -0
- package/package.json +3 -6
- package/skills/configure-pi-sync/SKILL.md +1 -1
- package/skills/configure-pi-sync/references/configuration.md +19 -6
- package/src/backends/backend-factory.ts +2 -23
- package/src/backends/backend-identity.ts +5 -40
- package/src/backends/backend-types.ts +1 -81
- package/src/backends/git/git-backend.ts +6 -784
- package/src/backends/git/git-config.ts +8 -130
- package/src/backends/git/git-runner.ts +7 -255
- package/src/backends/git/git-storage.ts +14 -293
- package/src/backends/s3/s3-backend.ts +11 -523
- package/src/backends/s3/s3-client.ts +2 -399
- package/src/backends/s3/s3-conditions.ts +2 -67
- package/src/backends/snapshot-pointer.ts +2 -27
- package/src/backends/sync-backend.ts +6 -101
- package/src/backends/webdav/webdav-backend.ts +10 -622
- package/src/backends/webdav/webdav-client.ts +6 -370
- package/src/backends/webdav/webdav-config.ts +8 -82
- package/src/commands/command-execution.ts +40 -36
- package/src/commands/command.ts +23 -1
- package/src/daemon/apply-gate.ts +146 -0
- package/src/daemon/pi-client.ts +591 -0
- package/src/daemon/recovery.ts +103 -0
- package/src/paths.ts +12 -83
- package/src/settings/config-errors.ts +2 -6
- package/src/settings/config-file.ts +19 -693
- package/src/settings/config.ts +16 -263
- package/src/settings/settings-management.ts +11 -254
- package/src/settings/settings-store.ts +10 -48
- package/src/settings/settings-types.ts +1 -157
- package/src/settings/settings-validation.ts +17 -435
- package/src/snapshot/session-paths.ts +11 -111
- package/src/snapshot/snapshot-apply.ts +9 -322
- package/src/snapshot/snapshot-case-replacement.ts +6 -80
- package/src/snapshot/snapshot-codec.ts +2 -59
- package/src/snapshot/snapshot-exclude-safety.ts +2 -44
- package/src/snapshot/snapshot-mutation-queues.ts +6 -142
- package/src/snapshot/snapshot-paths.ts +2 -11
- package/src/snapshot/snapshot-root-transition.ts +6 -154
- package/src/snapshot/snapshot-transaction-directory.ts +5 -16
- package/src/snapshot/snapshot-transaction-plan.ts +2 -72
- package/src/snapshot/snapshot-transaction.ts +6 -946
- package/src/snapshot/snapshot-types.ts +1 -43
- package/src/snapshot/snapshot.ts +19 -447
- package/src/state/json-file.ts +2 -47
- package/src/state/lock-policy.ts +2 -2
- package/src/state/lock.ts +10 -292
- package/src/state/lockfile-fs.ts +2 -25
- package/src/state/merge-baseline-store.ts +8 -208
- package/src/state/mutation-directory-sync.ts +2 -34
- package/src/state/operation-availability.ts +7 -59
- package/src/state/state-directory.ts +8 -243
- package/src/state/state-types.ts +1 -25
- package/src/state/sync-state-store.ts +11 -75
- package/src/sync/agent-candidate.ts +7 -256
- package/src/sync/agent-plan.ts +2 -107
- package/src/sync/agent-policy.ts +10 -13
- package/src/sync/agent-refusal-retry.ts +2 -54
- package/src/sync/agent-request.ts +2 -19
- package/src/sync/agent-runner.ts +2 -191
- package/src/sync/agent-store.ts +7 -182
- package/src/sync/agent-sync.ts +2 -141
- package/src/sync/apply-review.ts +2 -63
- package/src/sync/automatic-sync.ts +55 -111
- package/src/sync/conflict-artifact-ownership.ts +2 -63
- package/src/sync/conflict-artifacts.ts +8 -195
- package/src/sync/conflict-groups.ts +2 -68
- package/src/sync/conflict-preview.ts +2 -56
- package/src/sync/conflict-resolution.ts +2 -93
- package/src/sync/conflict-retention.ts +2 -72
- package/src/sync/conflict-review.ts +3 -92
- package/src/sync/content-conflicts.ts +2 -73
- package/src/sync/continuous-errors.ts +7 -85
- package/src/sync/continuous-lease.ts +2 -216
- package/src/sync/continuous-record.ts +10 -261
- package/src/sync/continuous-storage.ts +12 -64
- package/src/sync/continuous-sync.ts +2 -563
- package/src/sync/continuous-watch.ts +2 -61
- package/src/sync/exclude-policy.ts +6 -84
- package/src/sync/field-migration.ts +2 -39
- package/src/sync/file-merge-planner.ts +2 -143
- package/src/sync/json-document.ts +7 -184
- package/src/sync/local-field-policy.ts +2 -29
- package/src/sync/local-fields.ts +9 -119
- package/src/sync/merge-apply.ts +2 -439
- package/src/sync/merge-journal.ts +10 -228
- package/src/sync/merge-transfer-error.ts +2 -72
- package/src/sync/merged-sync.ts +2 -919
- package/src/sync/mutation-owner.ts +2 -22
- package/src/sync/package-merge.ts +2 -87
- package/src/sync/partial-progress.ts +2 -55
- package/src/sync/remote-snapshot.ts +7 -79
- package/src/sync/session-merge.ts +2 -194
- package/src/sync/settings-conflicts.ts +2 -64
- package/src/sync/settings-merge.ts +6 -121
- package/src/sync/signals.ts +2 -8
- package/src/sync/startup-check.ts +15 -31
- package/src/sync/startup-timings.ts +2 -94
- package/src/sync/sync-decision.ts +3 -111
- package/src/sync/sync-error-guidance.ts +2 -46
- package/src/sync/sync-errors.ts +7 -23
- package/src/sync/sync-inspection.ts +10 -59
- package/src/sync/sync-local.ts +2 -44
- package/src/sync/sync-mutations.ts +10 -788
- package/src/sync/sync-operations.ts +32 -11
- package/src/sync/sync-policy.ts +34 -474
- package/src/sync/sync-queries.ts +2 -247
- package/src/sync/sync-state.ts +18 -157
- package/src/sync/text-merge.ts +10 -133
- package/src/sync-extension.ts +192 -142
- package/src/ui/manager-state.ts +35 -23
- package/src/ui/manager-ui.ts +80 -36
- package/src/ui/sync-attention.ts +7 -49
- package/dist/chunks/agent-candidate-ZHN7FTZT.ts +0 -30
- package/dist/chunks/agent-plan-ILFEUJ2E.ts +0 -124
- package/dist/chunks/agent-plan-ILFEUJ2E.ts.map +0 -7
- package/dist/chunks/agent-refusal-retry-HRMHCX2A.ts +0 -73
- package/dist/chunks/agent-refusal-retry-HRMHCX2A.ts.map +0 -7
- package/dist/chunks/agent-runner-FCRV2Z75.ts +0 -185
- package/dist/chunks/agent-runner-FCRV2Z75.ts.map +0 -7
- package/dist/chunks/agent-store-CCKN4DPR.ts +0 -175
- package/dist/chunks/agent-store-CCKN4DPR.ts.map +0 -7
- package/dist/chunks/agent-sync-EGA2I5W7.ts +0 -22
- package/dist/chunks/chunk-25QCU3LY.ts +0 -220
- package/dist/chunks/chunk-25QCU3LY.ts.map +0 -7
- package/dist/chunks/chunk-2JZFHNLM.ts +0 -113
- package/dist/chunks/chunk-2JZFHNLM.ts.map +0 -7
- package/dist/chunks/chunk-2UKUKIBI.ts +0 -25
- package/dist/chunks/chunk-2UKUKIBI.ts.map +0 -7
- package/dist/chunks/chunk-2ZZJXITS.ts.map +0 -7
- package/dist/chunks/chunk-3JTZF7Z5.ts +0 -77
- package/dist/chunks/chunk-3JTZF7Z5.ts.map +0 -7
- package/dist/chunks/chunk-3ST7RSYN.ts +0 -21
- package/dist/chunks/chunk-3ST7RSYN.ts.map +0 -7
- package/dist/chunks/chunk-4NVHHDN2.ts +0 -61
- package/dist/chunks/chunk-4NVHHDN2.ts.map +0 -7
- package/dist/chunks/chunk-5SFMBY5P.ts +0 -26
- package/dist/chunks/chunk-5SFMBY5P.ts.map +0 -7
- package/dist/chunks/chunk-6OFMB6KK.ts +0 -215
- package/dist/chunks/chunk-6OFMB6KK.ts.map +0 -7
- package/dist/chunks/chunk-6XU5HZAN.ts +0 -205
- package/dist/chunks/chunk-6XU5HZAN.ts.map +0 -7
- package/dist/chunks/chunk-6YGRZSCN.ts +0 -128
- package/dist/chunks/chunk-6YGRZSCN.ts.map +0 -7
- package/dist/chunks/chunk-7D5SF7P3.ts +0 -29
- package/dist/chunks/chunk-7D5SF7P3.ts.map +0 -7
- package/dist/chunks/chunk-7WYF2KUO.ts +0 -1161
- package/dist/chunks/chunk-7WYF2KUO.ts.map +0 -7
- package/dist/chunks/chunk-APDNHB2T.ts +0 -2037
- package/dist/chunks/chunk-APDNHB2T.ts.map +0 -7
- package/dist/chunks/chunk-AR2DGDUI.ts +0 -55
- package/dist/chunks/chunk-AR2DGDUI.ts.map +0 -7
- package/dist/chunks/chunk-DT7M4VQS.ts +0 -69
- package/dist/chunks/chunk-DT7M4VQS.ts.map +0 -7
- package/dist/chunks/chunk-DTPELCPW.ts.map +0 -7
- package/dist/chunks/chunk-ECYCNZOE.ts.map +0 -7
- package/dist/chunks/chunk-FHE2DCA2.ts +0 -61
- package/dist/chunks/chunk-FHE2DCA2.ts.map +0 -7
- package/dist/chunks/chunk-G4RUXRWZ.ts +0 -48
- package/dist/chunks/chunk-G4RUXRWZ.ts.map +0 -7
- package/dist/chunks/chunk-ILXMZ2HU.ts +0 -58
- package/dist/chunks/chunk-ILXMZ2HU.ts.map +0 -7
- package/dist/chunks/chunk-LA3HQMFG.ts +0 -115
- package/dist/chunks/chunk-LA3HQMFG.ts.map +0 -7
- package/dist/chunks/chunk-M6VQJIOU.ts +0 -54
- package/dist/chunks/chunk-M6VQJIOU.ts.map +0 -7
- package/dist/chunks/chunk-MKC3PXCN.ts +0 -369
- package/dist/chunks/chunk-MKC3PXCN.ts.map +0 -7
- package/dist/chunks/chunk-OQBE2OMB.ts +0 -88
- package/dist/chunks/chunk-OQBE2OMB.ts.map +0 -7
- package/dist/chunks/chunk-P3YD4ONV.ts +0 -123
- package/dist/chunks/chunk-P3YD4ONV.ts.map +0 -7
- package/dist/chunks/chunk-PRUEIIK7.ts +0 -24
- package/dist/chunks/chunk-PRUEIIK7.ts.map +0 -7
- package/dist/chunks/chunk-PWMWOJP4.ts +0 -17
- package/dist/chunks/chunk-PWMWOJP4.ts.map +0 -7
- package/dist/chunks/chunk-QPC5HT3A.ts.map +0 -7
- package/dist/chunks/chunk-QQVK2XFC.ts +0 -64
- package/dist/chunks/chunk-QQVK2XFC.ts.map +0 -7
- package/dist/chunks/chunk-RDOX3VH5.ts +0 -140
- package/dist/chunks/chunk-RDOX3VH5.ts.map +0 -7
- package/dist/chunks/chunk-S7D6XWHI.ts +0 -258
- package/dist/chunks/chunk-S7D6XWHI.ts.map +0 -7
- package/dist/chunks/chunk-SHPNS7FM.ts +0 -64
- package/dist/chunks/chunk-SHPNS7FM.ts.map +0 -7
- package/dist/chunks/chunk-SWRVXVFD.ts +0 -248
- package/dist/chunks/chunk-SWRVXVFD.ts.map +0 -7
- package/dist/chunks/chunk-T2SJD3N7.ts +0 -99
- package/dist/chunks/chunk-T2SJD3N7.ts.map +0 -7
- package/dist/chunks/chunk-T2TYBLXK.ts +0 -27
- package/dist/chunks/chunk-T2TYBLXK.ts.map +0 -7
- package/dist/chunks/chunk-UZSDS4HF.ts +0 -403
- package/dist/chunks/chunk-UZSDS4HF.ts.map +0 -7
- package/dist/chunks/chunk-VPODHKOX.ts +0 -229
- package/dist/chunks/chunk-VPODHKOX.ts.map +0 -7
- package/dist/chunks/chunk-WEKGW7HV.ts +0 -162
- package/dist/chunks/chunk-WEKGW7HV.ts.map +0 -7
- package/dist/chunks/chunk-WUHRVSWI.ts +0 -369
- package/dist/chunks/chunk-WUHRVSWI.ts.map +0 -7
- package/dist/chunks/chunk-X7R6DCVF.ts +0 -28
- package/dist/chunks/chunk-X7R6DCVF.ts.map +0 -7
- package/dist/chunks/chunk-XJHQPB3E.ts +0 -107
- package/dist/chunks/chunk-XJHQPB3E.ts.map +0 -7
- package/dist/chunks/chunk-XZ3ZTHKR.ts +0 -1184
- package/dist/chunks/chunk-XZ3ZTHKR.ts.map +0 -7
- package/dist/chunks/chunk-YDVQYUHE.ts +0 -34
- package/dist/chunks/chunk-YDVQYUHE.ts.map +0 -7
- package/dist/chunks/chunk-YEULK7MK.ts +0 -415
- package/dist/chunks/chunk-YEULK7MK.ts.map +0 -7
- package/dist/chunks/chunk-YHT4YTYG.ts +0 -31
- package/dist/chunks/chunk-YHT4YTYG.ts.map +0 -7
- package/dist/chunks/chunk-ZW5ZLGBI.ts +0 -154
- package/dist/chunks/chunk-ZW5ZLGBI.ts.map +0 -7
- package/dist/chunks/command-handler-SDGKIQH2.ts.map +0 -7
- package/dist/chunks/conflict-artifacts-MYSH3L2J.ts +0 -33
- package/dist/chunks/conflict-review-J6ZSPNWL.ts +0 -190
- package/dist/chunks/conflict-review-J6ZSPNWL.ts.map +0 -7
- package/dist/chunks/continuous-sync-BH5SWIRV.ts +0 -590
- package/dist/chunks/continuous-sync-BH5SWIRV.ts.map +0 -7
- package/dist/chunks/git-backend-6CKI6CUG.ts +0 -1074
- package/dist/chunks/git-backend-6CKI6CUG.ts.map +0 -7
- package/dist/chunks/local-fields-SR7PH66U.ts +0 -27
- package/dist/chunks/local-fields-SR7PH66U.ts.map +0 -7
- package/dist/chunks/manager-result-dispatcher-CXUP5WDP.ts +0 -33
- package/dist/chunks/manager-result-dispatcher-CXUP5WDP.ts.map +0 -7
- package/dist/chunks/manager-ui-65ZETN6F.ts.map +0 -7
- package/dist/chunks/merge-baseline-store-4Y2X7P2D.ts +0 -26
- package/dist/chunks/merge-baseline-store-4Y2X7P2D.ts.map +0 -7
- package/dist/chunks/remote-selection-ui-W55BQDJQ.ts +0 -32
- package/dist/chunks/remote-selection-ui-W55BQDJQ.ts.map +0 -7
- package/dist/chunks/s3-backend-FDK7JSDQ.ts +0 -845
- package/dist/chunks/s3-backend-FDK7JSDQ.ts.map +0 -7
- package/dist/chunks/setup-switch-AB27ADDI.ts.map +0 -7
- package/dist/chunks/snapshot-G3W2GOGB.ts.map +0 -7
- package/dist/chunks/snapshot-transaction-SGRUWT73.ts +0 -25
- package/dist/chunks/snapshot-transaction-SGRUWT73.ts.map +0 -7
- package/dist/chunks/sync-inspection-MDYHZHT7.ts +0 -26
- package/dist/chunks/sync-inspection-MDYHZHT7.ts.map +0 -7
- package/dist/chunks/sync-operations-ZAUP65FH.ts +0 -1032
- package/dist/chunks/sync-operations-ZAUP65FH.ts.map +0 -7
- package/dist/chunks/sync-state-H4TFZZ7S.ts.map +0 -7
- package/dist/chunks/webdav-backend-UNMIAXM5.ts +0 -852
- package/dist/chunks/webdav-backend-UNMIAXM5.ts.map +0 -7
- /package/dist/chunks/{chunk-KHBPED6W.ts.map → chunk-GSQGBVKG.ts.map} +0 -0
- /package/dist/chunks/{chunk-PQ75RPUP.ts.map → chunk-UZUUUY7C.ts.map} +0 -0
- /package/dist/chunks/{agent-candidate-ZHN7FTZT.ts.map → manager-result-dispatcher-I2AMCCE7.ts.map} +0 -0
- /package/dist/chunks/{agent-sync-EGA2I5W7.ts.map → merge-review-SGDLMVS4.ts.map} +0 -0
- /package/dist/chunks/{config-J5VZUY4J.ts.map → remote-selection-ui-GZHPDQ4L.ts.map} +0 -0
- /package/dist/chunks/{conflict-artifacts-MYSH3L2J.ts.map → setup-switch-M3BAFGJM.ts.map} +0 -0
- /package/dist/chunks/{continuous-record-OM64J27R.ts.map → state-directory-JZSZVVPX.ts.map} +0 -0
|
@@ -1,12 +1,42 @@
|
|
|
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
|
+
dispatchManagerResult
|
|
5
|
+
} from "./chunk-UZUUUY7C.ts";
|
|
6
|
+
import {
|
|
7
|
+
captureMutationOwner,
|
|
8
|
+
runCancellableOperation
|
|
9
|
+
} from "./chunk-4RNCZZY7.ts";
|
|
3
10
|
import {
|
|
4
11
|
SETUP_SWITCH_ACTION_OPTIONS,
|
|
5
12
|
saveOnSwitch,
|
|
6
13
|
setupSwitchActionFromLabel,
|
|
7
14
|
setupSwitchActionLabel,
|
|
8
15
|
useSyncSetup
|
|
9
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-BGGKHHO4.ts";
|
|
17
|
+
import {
|
|
18
|
+
observationMatchesConfig,
|
|
19
|
+
observationSummary,
|
|
20
|
+
readStateForConfig,
|
|
21
|
+
syncAttentionMatchesConfig,
|
|
22
|
+
syncStateFingerprint
|
|
23
|
+
} from "./chunk-6LHIRS5R.ts";
|
|
24
|
+
import {
|
|
25
|
+
normalizeSyncExclude,
|
|
26
|
+
sameSyncExclude
|
|
27
|
+
} from "./chunk-NPT2G4FU.ts";
|
|
28
|
+
import {
|
|
29
|
+
confirmMergeReview
|
|
30
|
+
} from "./chunk-GSQGBVKG.ts";
|
|
31
|
+
import {
|
|
32
|
+
loadConfig,
|
|
33
|
+
loadPartialConfig,
|
|
34
|
+
syncCheckConfigFingerprint,
|
|
35
|
+
syncConfigReviewIdentity
|
|
36
|
+
} from "./chunk-7AC2RX4M.ts";
|
|
37
|
+
import {
|
|
38
|
+
configureSyncStatus
|
|
39
|
+
} from "./chunk-ENFHHB5O.ts";
|
|
10
40
|
import {
|
|
11
41
|
applyS3CredentialUpdate,
|
|
12
42
|
chooseS3CredentialUpdate,
|
|
@@ -26,146 +56,63 @@ import {
|
|
|
26
56
|
showEditS3Target,
|
|
27
57
|
showEditWebDavStorageProfile,
|
|
28
58
|
showEditWebDavTarget
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import {
|
|
31
|
-
automaticSyncSummary
|
|
32
|
-
} from "./chunk-ECYCNZOE.ts";
|
|
33
|
-
import {
|
|
34
|
-
dispatchManagerResult
|
|
35
|
-
} from "./chunk-PQ75RPUP.ts";
|
|
36
|
-
import {
|
|
37
|
-
runCancellableOperation
|
|
38
|
-
} from "./chunk-NGW4JMBF.ts";
|
|
39
|
-
import "./chunk-OQBE2OMB.ts";
|
|
40
|
-
import "./chunk-2UKUKIBI.ts";
|
|
59
|
+
} from "./chunk-YWEYRRQI.ts";
|
|
41
60
|
import {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
addStorageConnection,
|
|
47
|
-
removeStorageConnection,
|
|
48
|
-
removeSyncSetup,
|
|
49
|
-
updateStorageConnection,
|
|
50
|
-
updateSyncSetup
|
|
51
|
-
} from "./chunk-6XU5HZAN.ts";
|
|
52
|
-
import "./chunk-QQVK2XFC.ts";
|
|
61
|
+
isCloudflareR2Endpoint,
|
|
62
|
+
normalizeS3Endpoint,
|
|
63
|
+
ownRecord
|
|
64
|
+
} from "./chunk-M7RHV3H6.ts";
|
|
53
65
|
import {
|
|
66
|
+
automaticSyncSummary,
|
|
54
67
|
syncErrorGuidance
|
|
55
|
-
} from "./chunk-
|
|
56
|
-
import {
|
|
57
|
-
sameLocalFields
|
|
58
|
-
} from "./chunk-P3YD4ONV.ts";
|
|
68
|
+
} from "./chunk-ZMNVNECV.ts";
|
|
59
69
|
import {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
70
|
+
loadOnSwitch,
|
|
71
|
+
readLocalConfigObject,
|
|
72
|
+
requireSettings,
|
|
73
|
+
updateLocalConfig
|
|
74
|
+
} from "./chunk-VZCWYXRS.ts";
|
|
64
75
|
import {
|
|
65
76
|
AUTOMATIC_SYNC_DESCRIPTION,
|
|
66
77
|
STARTUP_TRANSFER_DESCRIPTION,
|
|
67
78
|
startupTransferSummary
|
|
68
|
-
} from "./chunk-
|
|
69
|
-
import {
|
|
70
|
-
captureMutationOwner
|
|
71
|
-
} from "./chunk-T2TYBLXK.ts";
|
|
72
|
-
import {
|
|
73
|
-
safeTerminalText
|
|
74
|
-
} from "./chunk-AMJRUXFT.ts";
|
|
79
|
+
} from "./chunk-J5COV5TY.ts";
|
|
75
80
|
import {
|
|
76
|
-
|
|
77
|
-
} from "./chunk-
|
|
81
|
+
throwIfAborted
|
|
82
|
+
} from "./chunk-PDBTD2K6.ts";
|
|
78
83
|
import {
|
|
79
|
-
|
|
80
|
-
|
|
84
|
+
addStorageConnection,
|
|
85
|
+
removeStorageConnection,
|
|
86
|
+
removeSyncSetup,
|
|
87
|
+
updateStorageConnection,
|
|
88
|
+
updateSyncSetup
|
|
89
|
+
} from "./chunk-JZKCOM62.ts";
|
|
81
90
|
import {
|
|
82
91
|
activeLocalConfigPath,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
loadOnSwitch,
|
|
86
|
-
loadPartialConfig,
|
|
87
|
-
localConfigPath,
|
|
88
|
-
normalizeS3Endpoint,
|
|
89
|
-
ownRecord,
|
|
90
|
-
readLocalConfigObject,
|
|
91
|
-
requireSettings,
|
|
92
|
-
syncCheckConfigFingerprint,
|
|
93
|
-
syncConfigReviewIdentity,
|
|
94
|
-
updateLocalConfig
|
|
95
|
-
} from "./chunk-XZ3ZTHKR.ts";
|
|
96
|
-
import {
|
|
97
|
-
normalizeLocalFields
|
|
98
|
-
} from "./chunk-X7R6DCVF.ts";
|
|
92
|
+
localConfigPath
|
|
93
|
+
} from "./chunk-UBE6XWOM.ts";
|
|
99
94
|
import {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
isStaleLock
|
|
103
|
-
} from "./chunk-S7D6XWHI.ts";
|
|
104
|
-
import {
|
|
105
|
-
throwIfAborted
|
|
106
|
-
} from "./chunk-PWMWOJP4.ts";
|
|
107
|
-
import "./chunk-ZW5ZLGBI.ts";
|
|
95
|
+
errorMessage
|
|
96
|
+
} from "./chunk-HNKLBM3U.ts";
|
|
108
97
|
import {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
} from "./chunk-4NVHHDN2.ts";
|
|
112
|
-
import "./chunk-AR2DGDUI.ts";
|
|
113
|
-
import "./chunk-SWRVXVFD.ts";
|
|
114
|
-
import "./chunk-2JZFHNLM.ts";
|
|
115
|
-
import "./chunk-T2SJD3N7.ts";
|
|
116
|
-
import "./chunk-MKC3PXCN.ts";
|
|
98
|
+
safeTerminalText
|
|
99
|
+
} from "./chunk-2JNFEZ3V.ts";
|
|
117
100
|
import {
|
|
118
101
|
compareSyncInclude,
|
|
119
102
|
syncIncludeSelection,
|
|
120
103
|
syncSessionsSelected
|
|
121
|
-
} from "./chunk-
|
|
122
|
-
import "./chunk-LA3HQMFG.ts";
|
|
123
|
-
import {
|
|
124
|
-
normalizeSyncExclude,
|
|
125
|
-
sameSyncExclude
|
|
126
|
-
} from "./chunk-3JTZF7Z5.ts";
|
|
127
|
-
import "./chunk-FHE2DCA2.ts";
|
|
104
|
+
} from "./chunk-JKBUYCPC.ts";
|
|
128
105
|
|
|
129
106
|
// src/ui/manager-ui.ts
|
|
130
|
-
import { defineMenu as defineMenu6, runMenu as runMenu6 } from "@narumitw/pi-tui-kit";
|
|
107
|
+
import { defineMenu as defineMenu6, runDocumentReview, runMenu as runMenu6 } from "@narumitw/pi-tui-kit";
|
|
131
108
|
|
|
132
109
|
// src/state/operation-availability.ts
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
const metadata = await dependencies.inspectMetadata();
|
|
140
|
-
const guardHeld = await dependencies.inspectGuard();
|
|
141
|
-
return classifyOperationAvailability(metadata, guardHeld);
|
|
142
|
-
} catch (error) {
|
|
143
|
-
return { kind: "inspection-error", message: errorMessage(error) };
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
function classifyOperationAvailability(metadata, guardHeld) {
|
|
147
|
-
if (metadata.status === "valid" && !isStaleLock(metadata.lock)) {
|
|
148
|
-
return { kind: "live", lock: metadata.lock };
|
|
149
|
-
}
|
|
150
|
-
if (guardHeld) {
|
|
151
|
-
return {
|
|
152
|
-
kind: "busy",
|
|
153
|
-
metadata: metadata.status,
|
|
154
|
-
...metadata.status === "valid" ? { lock: metadata.lock } : {}
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
if (metadata.status === "valid") {
|
|
158
|
-
return { kind: "recoverable-stale", lock: metadata.lock };
|
|
159
|
-
}
|
|
160
|
-
if (metadata.status === "unreadable") return { kind: "recoverable-unreadable" };
|
|
161
|
-
return { kind: "free" };
|
|
162
|
-
}
|
|
163
|
-
function operationBlocksChanges(availability) {
|
|
164
|
-
return availability.kind !== "free";
|
|
165
|
-
}
|
|
166
|
-
function operationCanRecover(availability) {
|
|
167
|
-
return availability.kind === "recoverable-stale" || availability.kind === "recoverable-unreadable";
|
|
168
|
-
}
|
|
110
|
+
import {
|
|
111
|
+
classifyOperationAvailability,
|
|
112
|
+
inspectOperationAvailability,
|
|
113
|
+
operationBlocksChanges,
|
|
114
|
+
operationCanRecover
|
|
115
|
+
} from "@narumitw/sync-daemon/engine/state/operation-availability";
|
|
169
116
|
|
|
170
117
|
// src/ui/manager-attention.ts
|
|
171
118
|
function attentionMainMenuItems(manager) {
|
|
@@ -195,7 +142,7 @@ function blockedSyncMenuItem(label, manager) {
|
|
|
195
142
|
};
|
|
196
143
|
}
|
|
197
144
|
async function showManagerAttention(ctx, attention, runRoute, signal, onSelectionResolved) {
|
|
198
|
-
const { showRemoteSelectionReview } = await import("./remote-selection-ui-
|
|
145
|
+
const { showRemoteSelectionReview } = await import("./remote-selection-ui-GZHPDQ4L.ts");
|
|
199
146
|
if (signal?.aborted) return "close";
|
|
200
147
|
const review = await showRemoteSelectionReview(ctx, attention.decision.setupName, signal, void 0, {
|
|
201
148
|
decision: attention.decision,
|
|
@@ -522,7 +469,6 @@ async function describeManagerState(signal, attention, inspectOperation = inspec
|
|
|
522
469
|
const config = await loadConfig();
|
|
523
470
|
const operation = await inspectOperation();
|
|
524
471
|
const changesBlocked = operationBlocksChanges(operation);
|
|
525
|
-
const selection = syncIncludeSelection(config.include);
|
|
526
472
|
let currentAttention;
|
|
527
473
|
if (attention) {
|
|
528
474
|
try {
|
|
@@ -538,39 +484,27 @@ async function describeManagerState(signal, attention, inspectOperation = inspec
|
|
|
538
484
|
const noSyncedContent = config.include.length === 0;
|
|
539
485
|
const syncState = changesBlocked ? void 0 : await readStateForConfig(config).catch(() => void 0);
|
|
540
486
|
const currentObservation = observation && observationMatchesConfig(observation, config) && syncState && syncStateFingerprint(syncState) === observation.inspection.stateIdentity ? observation : void 0;
|
|
541
|
-
const lastAppliedSnapshot = changesBlocked ? "Unavailable while operations are locked" : syncState?.lastAppliedSnapshot ? `${truncateToWidth(safeTerminalText(syncState.lastAppliedSnapshot),
|
|
487
|
+
const lastAppliedSnapshot = changesBlocked ? "Unavailable while operations are locked" : syncState?.lastAppliedSnapshot ? `${truncateToWidth(safeTerminalText(syncState.lastAppliedSnapshot), 12, "\u2026")} \xB7 application time unavailable` : syncState ? "Never synced" : "Unavailable";
|
|
542
488
|
const canSwitch = await countValidSyncSetups(configuredTargets, signal) > 1;
|
|
543
489
|
const mainActions = [...MAIN_MENU_ACTIONS];
|
|
544
490
|
if (config.agentMode && !noSyncedContent) mainActions.splice(1, 0, "Retry refused model result\u2026");
|
|
545
491
|
if (canSwitch) mainActions.push("Switch sync setup");
|
|
546
492
|
if (syncState?.unresolved?.length) mainActions.unshift("Review unresolved conflicts");
|
|
493
|
+
const background = changesBlocked ? [] : await backgroundSummary(config);
|
|
494
|
+
signal?.throwIfAborted();
|
|
547
495
|
const ordinaryTitle = [
|
|
548
496
|
"Manage sync",
|
|
549
|
-
"",
|
|
550
497
|
`Current sync setup: ${safeTerminalText(config.setupName)}`,
|
|
551
498
|
`Storage: ${backendStorageDescription(config)}`,
|
|
552
|
-
|
|
553
|
-
...syncState?.unresolved?.length ? [
|
|
554
|
-
`Unresolved: ${syncState.unresolved.length} dependency groups \xB7 choose Review unresolved conflicts`,
|
|
555
|
-
`Last observed: ${safeTerminalText(syncState.lastObservedSnapshot ?? "unknown")}`
|
|
556
|
-
] : [],
|
|
499
|
+
...syncState?.unresolved?.length ? [`Unresolved: ${syncState.unresolved.length} dependency groups \xB7 review needed`] : [],
|
|
557
500
|
...currentAttention ? [
|
|
558
501
|
currentAttention.decision.setupName === config.setupName ? "Sync status: Review needed" : `Sync status: Review needed for setup ${safeTerminalText(currentAttention.decision.setupName)}`,
|
|
559
|
-
attentionComparison?.remoteOnly.length === 0 && attentionComparison.localOnly.length === 0 ? attentionExclusionsDiffer ? "Synced-content exclusion rules differ." : "Only the synced-content order differs." : `Remote-only paths: ${attentionComparison?.remoteOnly.length ?? 0} \xB7 Device-only paths: ${attentionComparison?.localOnly.length ?? 0}${attentionExclusionsDiffer ? " \xB7 Exclusion rules differ." : ""}
|
|
560
|
-
|
|
561
|
-
] : currentObservation ? [
|
|
562
|
-
`Startup check (${safeTerminalText(currentObservation.checkedAt)}): ${observationSummary(currentObservation)}`,
|
|
563
|
-
"Check-time observation only; synchronization rechecks current content."
|
|
564
|
-
] : ["Remote status: Not checked"],
|
|
565
|
-
`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 ${syncSessionsSelected(config) ? "on" : "off"}`,
|
|
566
|
-
`Automatic sync: ${automaticSyncSummary(config.automatic)}`,
|
|
567
|
-
`Startup transfer: ${startupTransferSummary(config)}`,
|
|
568
|
-
`Autonomous sync: ${config.agentMode ? "On (autonomous merged sync)" : "Off"}`,
|
|
569
|
-
...config.continuous ? await (await import("./continuous-record-OM64J27R.ts")).continuousStatusLines(config) : [],
|
|
502
|
+
attentionComparison?.remoteOnly.length === 0 && attentionComparison.localOnly.length === 0 ? attentionExclusionsDiffer ? "Synced-content exclusion rules differ." : "Only the synced-content order differs." : `Remote-only paths: ${attentionComparison?.remoteOnly.length ?? 0} \xB7 Device-only paths: ${attentionComparison?.localOnly.length ?? 0}${attentionExclusionsDiffer ? " \xB7 Exclusion rules differ." : ""}`
|
|
503
|
+
] : currentObservation ? [`Observed ${safeTerminalText(currentObservation.checkedAt)}: ${observationSummary(currentObservation)}`] : ["Remote status: Not checked"],
|
|
570
504
|
`Last applied: ${lastAppliedSnapshot}`,
|
|
571
|
-
...
|
|
572
|
-
|
|
573
|
-
|
|
505
|
+
...config.agentMode ? ["Auto-apply: On \xB7 AI requests may incur costs"] : config.automaticTransfer || config.automatic && syncSessionsSelected(config) ? ["Automatic transfer permission: On \xB7 see Settings"] : [],
|
|
506
|
+
...background,
|
|
507
|
+
...noSyncedContent ? ["", "No included content is selected. Choose included content in Settings before syncing."] : []
|
|
574
508
|
];
|
|
575
509
|
return {
|
|
576
510
|
title: (changesBlocked ? ["Manage sync", ...operationStatusLines(operation)] : ordinaryTitle).join("\n"),
|
|
@@ -601,6 +535,26 @@ async function describeManagerState(signal, attention, inspectOperation = inspec
|
|
|
601
535
|
};
|
|
602
536
|
}
|
|
603
537
|
}
|
|
538
|
+
async function backgroundSummary(config) {
|
|
539
|
+
if (!config.continuous) return [];
|
|
540
|
+
if (!config.agentMode) return ["Background sync: Paused \xB7 enable Autonomous sync"];
|
|
541
|
+
try {
|
|
542
|
+
const { continuousBinding, readContinuousPrivateDocument } = await import("./continuous-storage-SQBAXACF.ts");
|
|
543
|
+
const recordApi = await import("./continuous-record-ZHUXVO4E.ts");
|
|
544
|
+
const binding = await continuousBinding(config);
|
|
545
|
+
const document = await readContinuousPrivateDocument(`${binding}.json`);
|
|
546
|
+
if (!document) return ["Background sync: Enabled \xB7 not yet observed"];
|
|
547
|
+
recordApi.validateContinuousRecord(document.value, binding);
|
|
548
|
+
const record = document.value;
|
|
549
|
+
const phases = { waiting: "Waiting", syncing: "Syncing", retry: "Retry", blocked: "Blocked" };
|
|
550
|
+
return [
|
|
551
|
+
`Background sync (recorded): ${phases[record.phase]}${record.error ? ` \xB7 ${record.error}` : ""}`,
|
|
552
|
+
...record.transferred === void 0 ? [] : [`Last background transfer: Success \xB7 ${new Date(record.transferred).toISOString()}`]
|
|
553
|
+
];
|
|
554
|
+
} catch {
|
|
555
|
+
return ["Background sync: Unknown \xB7 open Diagnostics"];
|
|
556
|
+
}
|
|
557
|
+
}
|
|
604
558
|
function operationActions(operation, noSyncedContent, canSwitch, mainActions) {
|
|
605
559
|
if (operationCanRecover(operation)) {
|
|
606
560
|
return ["Restore sync access\u2026 (recommended)", "History", "Help"];
|
|
@@ -659,6 +613,16 @@ function backendStorageDescription(config) {
|
|
|
659
613
|
// src/ui/settings-ui.ts
|
|
660
614
|
import { defineMenu as defineMenu5, runMenu as runMenu5 } from "@narumitw/pi-tui-kit";
|
|
661
615
|
|
|
616
|
+
// src/sync/local-fields.ts
|
|
617
|
+
import {
|
|
618
|
+
normalizeLocalFields,
|
|
619
|
+
overlayLocalFields,
|
|
620
|
+
portableSnapshot,
|
|
621
|
+
sameLocalFields,
|
|
622
|
+
validatePortableSnapshot,
|
|
623
|
+
validateSnapshotFieldPolicy
|
|
624
|
+
} from "@narumitw/sync-daemon/engine/sync/local-fields";
|
|
625
|
+
|
|
662
626
|
// src/ui/agent-mode-setting.ts
|
|
663
627
|
import { isDeepStrictEqual } from "node:util";
|
|
664
628
|
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.";
|
|
@@ -1891,7 +1855,7 @@ async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
|
|
|
1891
1855
|
},
|
|
1892
1856
|
"remote-include": async ({ signal: actionSignal }) => {
|
|
1893
1857
|
const reviewSignal = signal ? AbortSignal.any([signal, actionSignal]) : actionSignal;
|
|
1894
|
-
const { showRemoteSelectionReview } = await import("./remote-selection-ui-
|
|
1858
|
+
const { showRemoteSelectionReview } = await import("./remote-selection-ui-GZHPDQ4L.ts");
|
|
1895
1859
|
if (reviewSignal.aborted) return { kind: "rejected" };
|
|
1896
1860
|
const review = await showRemoteSelectionReview(ctx, setupName, reviewSignal, void 0, {
|
|
1897
1861
|
origin: "settings",
|
|
@@ -1967,36 +1931,46 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
|
|
|
1967
1931
|
return false;
|
|
1968
1932
|
}
|
|
1969
1933
|
};
|
|
1934
|
+
const menuItems = (manager) => {
|
|
1935
|
+
const attentionItems = attentionMainMenuItems(manager);
|
|
1936
|
+
const managerItems = manager.actions.map((label) => blockedSyncMenuItem(label, manager) ?? syncMainMenuItem(label));
|
|
1937
|
+
const operationFirst = manager.operation !== void 0 && manager.operation.kind !== "free";
|
|
1938
|
+
return operationFirst ? [...managerItems, ...attentionItems] : [...attentionItems, ...managerItems];
|
|
1939
|
+
};
|
|
1970
1940
|
const menu = defineMenu6({
|
|
1971
1941
|
start: "main",
|
|
1972
1942
|
screens: {
|
|
1973
|
-
main: ({ state }) => {
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
)
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
}
|
|
1943
|
+
main: ({ state }) => ({
|
|
1944
|
+
kind: "choice",
|
|
1945
|
+
title: "Manage sync",
|
|
1946
|
+
lines: state.manager.title.split("\n").slice(1),
|
|
1947
|
+
items: menuItems(state.manager).map((item) => ({
|
|
1948
|
+
id: item.id,
|
|
1949
|
+
label: ctx.mode === "tui" && item.id === "sync" ? "Sync\u2026" : item.label,
|
|
1950
|
+
details: [item.description ?? "Review synced content."],
|
|
1951
|
+
searchText: `${item.label} ${item.description ?? ""}`,
|
|
1952
|
+
disabled: item.disabled,
|
|
1953
|
+
disabledReason: item.disabledReason
|
|
1954
|
+
})),
|
|
1955
|
+
action: "activate",
|
|
1956
|
+
enableSearch: true,
|
|
1957
|
+
viewportSize: 5,
|
|
1958
|
+
hint: "close"
|
|
1959
|
+
})
|
|
1991
1960
|
},
|
|
1992
1961
|
actions: {
|
|
1962
|
+
activate: async (invocation) => {
|
|
1963
|
+
const item = menuItems(invocation.state.manager).find((candidate) => candidate.id === invocation.itemId);
|
|
1964
|
+
if (!item || item.disabled || !("action" in item) || !item.action) return { kind: "stay" };
|
|
1965
|
+
return menu.actions[item.action](invocation);
|
|
1966
|
+
},
|
|
1993
1967
|
"review-attention": async ({ state }) => {
|
|
1994
1968
|
const attention = state.manager.attention;
|
|
1995
1969
|
if (attention && options.getAttention?.() !== attention) return { kind: "stay" };
|
|
1996
1970
|
if (!attention) {
|
|
1997
1971
|
const observation = state.manager.observation;
|
|
1998
1972
|
if (!observation) return { kind: "stay" };
|
|
1999
|
-
const { showRemoteSelectionReview } = await import("./remote-selection-ui-
|
|
1973
|
+
const { showRemoteSelectionReview } = await import("./remote-selection-ui-GZHPDQ4L.ts");
|
|
2000
1974
|
if (sessionSignal?.aborted) return { kind: "close" };
|
|
2001
1975
|
const config = await loadConfig();
|
|
2002
1976
|
if (sessionSignal?.aborted) return { kind: "close" };
|
|
@@ -2127,6 +2101,30 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
|
|
|
2127
2101
|
const validate = captureMutationOwner(ctx, signal);
|
|
2128
2102
|
const config = await loadConfig(state.manager.configReview?.setupName);
|
|
2129
2103
|
validate();
|
|
2104
|
+
if (config.continuous) {
|
|
2105
|
+
const { continuousStatusLines } = await import("./continuous-record-ZHUXVO4E.ts");
|
|
2106
|
+
validate();
|
|
2107
|
+
const lines = await continuousStatusLines(config);
|
|
2108
|
+
validate();
|
|
2109
|
+
const review = await runDocumentReview(ctx, {
|
|
2110
|
+
title: "Sync diagnostics",
|
|
2111
|
+
lines: [`Setup: ${safeTerminalText(config.setupName)} \xB7 local observations only`],
|
|
2112
|
+
content: lines.join("\n"),
|
|
2113
|
+
confirmation: { label: "Continue to backend checks\u2026" },
|
|
2114
|
+
hint: "back",
|
|
2115
|
+
signal,
|
|
2116
|
+
isCurrent
|
|
2117
|
+
});
|
|
2118
|
+
validate();
|
|
2119
|
+
if (review.kind === "cancelled") return { kind: review.reason === "close" ? "close" : "stay" };
|
|
2120
|
+
if (review.kind !== "confirmed") return { kind: "stay" };
|
|
2121
|
+
const current = await loadConfig();
|
|
2122
|
+
validate();
|
|
2123
|
+
if (syncCheckConfigFingerprint(config) !== syncCheckConfigFingerprint(current)) {
|
|
2124
|
+
ctx.ui.notify("Setup changed during diagnostics review; reopen Diagnostics.", "warning");
|
|
2125
|
+
return { kind: "stay" };
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2130
2128
|
const confirmed = await ctx.ui.confirm(
|
|
2131
2129
|
"Run diagnostics?",
|
|
2132
2130
|
`Setup: ${safeTerminalText(config.setupName)}
|
|
@@ -2269,10 +2267,28 @@ function syncMainMenuItem(label) {
|
|
|
2269
2267
|
id: action,
|
|
2270
2268
|
label,
|
|
2271
2269
|
action,
|
|
2272
|
-
description:
|
|
2270
|
+
description: {
|
|
2271
|
+
sync: "Merge changes on both sides.",
|
|
2272
|
+
"retry-refusal": "Retry model; may incur costs.",
|
|
2273
|
+
pull: "Remote \u2192 this device.",
|
|
2274
|
+
push: "This device \u2192 remote snapshot.",
|
|
2275
|
+
diff: "Inspect changes; no transfer.",
|
|
2276
|
+
status: "Check remote; no transfer.",
|
|
2277
|
+
settings: "Change sync settings.",
|
|
2278
|
+
history: "Review snapshots and rollback.",
|
|
2279
|
+
doctor: "Review backend diagnostics.",
|
|
2280
|
+
switch: "Choose another sync setup.",
|
|
2281
|
+
conflicts: "Review unresolved file groups.",
|
|
2282
|
+
recover: "Review local lock recovery.",
|
|
2283
|
+
refresh: "Recheck the operation lock.",
|
|
2284
|
+
setups: "Manage sync setups.",
|
|
2285
|
+
connections: "Manage storage connections.",
|
|
2286
|
+
help: "Read sync commands and safety.",
|
|
2287
|
+
init: "Configure a sync setup."
|
|
2288
|
+
}[action]
|
|
2273
2289
|
};
|
|
2274
2290
|
}
|
|
2275
2291
|
export {
|
|
2276
2292
|
showSyncManager
|
|
2277
2293
|
};
|
|
2278
|
-
//# sourceMappingURL=manager-ui-
|
|
2294
|
+
//# sourceMappingURL=manager-ui-AY5ZU6B4.ts.map
|