@narumitw/pi-sync 0.58.1 → 0.59.0

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.
Files changed (182) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +9 -5
  3. package/dist/chunks/{agent-candidate-U2NU3GUX.ts → agent-candidate-ZHN7FTZT.ts} +9 -8
  4. package/dist/chunks/{agent-plan-3YXDIJXO.ts → agent-plan-ILFEUJ2E.ts} +12 -11
  5. package/dist/chunks/{agent-plan-3YXDIJXO.ts.map → agent-plan-ILFEUJ2E.ts.map} +1 -1
  6. package/dist/chunks/{agent-refusal-retry-476YGNU5.ts → agent-refusal-retry-HRMHCX2A.ts} +9 -8
  7. package/dist/chunks/{agent-refusal-retry-476YGNU5.ts.map → agent-refusal-retry-HRMHCX2A.ts.map} +1 -1
  8. package/dist/chunks/{agent-store-7GINKTS7.ts → agent-store-CCKN4DPR.ts} +3 -3
  9. package/dist/chunks/{agent-sync-2R4GG2MF.ts → agent-sync-EGA2I5W7.ts} +4 -4
  10. package/dist/chunks/{chunk-CQD2TJHE.ts → chunk-25QCU3LY.ts} +4 -4
  11. package/dist/chunks/{chunk-OJARL2TG.ts → chunk-2UKUKIBI.ts} +4 -4
  12. package/dist/chunks/{chunk-REMGB255.ts → chunk-2ZZJXITS.ts} +16 -5
  13. package/dist/chunks/chunk-2ZZJXITS.ts.map +7 -0
  14. package/dist/chunks/chunk-3JTZF7Z5.ts +77 -0
  15. package/dist/chunks/chunk-3JTZF7Z5.ts.map +7 -0
  16. package/dist/chunks/{chunk-DN4IA7MR.ts → chunk-4NVHHDN2.ts} +2 -2
  17. package/dist/chunks/{chunk-AKMV47YC.ts → chunk-6OFMB6KK.ts} +2 -2
  18. package/dist/chunks/{chunk-45COPAK7.ts → chunk-6XU5HZAN.ts} +6 -6
  19. package/dist/chunks/{chunk-45COPAK7.ts.map → chunk-6XU5HZAN.ts.map} +2 -2
  20. package/dist/chunks/{chunk-Y4UVXOLQ.ts → chunk-6YGRZSCN.ts} +15 -10
  21. package/dist/chunks/chunk-6YGRZSCN.ts.map +7 -0
  22. package/dist/chunks/{chunk-XEODG2PE.ts → chunk-76HID27T.ts} +2 -2
  23. package/dist/chunks/{chunk-7A35ZAVO.ts → chunk-7WYF2KUO.ts} +174 -122
  24. package/dist/chunks/chunk-7WYF2KUO.ts.map +7 -0
  25. package/dist/chunks/{chunk-MMQIEDZ6.ts → chunk-APDNHB2T.ts} +78 -35
  26. package/dist/chunks/chunk-APDNHB2T.ts.map +7 -0
  27. package/dist/chunks/{chunk-U6GXGY5G.ts → chunk-DTPELCPW.ts} +4 -4
  28. package/dist/chunks/{chunk-TZC7GDJE.ts → chunk-ILXMZ2HU.ts} +4 -4
  29. package/dist/chunks/{chunk-CBLTWXAU.ts → chunk-LA3HQMFG.ts} +2 -1
  30. package/dist/chunks/{chunk-CBLTWXAU.ts.map → chunk-LA3HQMFG.ts.map} +2 -2
  31. package/dist/chunks/{chunk-ESKOPQVB.ts → chunk-MKC3PXCN.ts} +53 -32
  32. package/dist/chunks/chunk-MKC3PXCN.ts.map +7 -0
  33. package/dist/chunks/{chunk-MG66XM5U.ts → chunk-NGW4JMBF.ts} +63 -19
  34. package/dist/chunks/chunk-NGW4JMBF.ts.map +7 -0
  35. package/dist/chunks/{chunk-TIMWN2RH.ts → chunk-OQBE2OMB.ts} +13 -14
  36. package/dist/chunks/chunk-OQBE2OMB.ts.map +7 -0
  37. package/dist/chunks/{chunk-MKSMJPVA.ts → chunk-P3YD4ONV.ts} +22 -6
  38. package/dist/chunks/chunk-P3YD4ONV.ts.map +7 -0
  39. package/dist/chunks/{chunk-JYILGR3K.ts → chunk-PQ75RPUP.ts} +3 -3
  40. package/dist/chunks/{chunk-FLHCOJCD.ts → chunk-QQVK2XFC.ts} +13 -6
  41. package/dist/chunks/chunk-QQVK2XFC.ts.map +7 -0
  42. package/dist/chunks/{chunk-WQMYV4DW.ts → chunk-RDOX3VH5.ts} +5 -5
  43. package/dist/chunks/{chunk-6O3EDBRL.ts → chunk-S7D6XWHI.ts} +2 -2
  44. package/dist/chunks/{chunk-7ZIYU5QS.ts → chunk-SHPNS7FM.ts} +7 -7
  45. package/dist/chunks/{chunk-7ZIYU5QS.ts.map → chunk-SHPNS7FM.ts.map} +2 -2
  46. package/dist/chunks/{chunk-GNYGNHFF.ts → chunk-T2TYBLXK.ts} +2 -2
  47. package/dist/chunks/{chunk-6LD5KX55.ts → chunk-UZSDS4HF.ts} +13 -6
  48. package/dist/chunks/chunk-UZSDS4HF.ts.map +7 -0
  49. package/dist/chunks/{chunk-5TSCBBPP.ts → chunk-VPODHKOX.ts} +3 -3
  50. package/dist/chunks/{chunk-BEST45H2.ts → chunk-WEKGW7HV.ts} +17 -8
  51. package/dist/chunks/chunk-WEKGW7HV.ts.map +7 -0
  52. package/dist/chunks/{chunk-KYTT7KV4.ts → chunk-WUHRVSWI.ts} +87 -37
  53. package/dist/chunks/chunk-WUHRVSWI.ts.map +7 -0
  54. package/dist/chunks/{chunk-OVBAW7KV.ts → chunk-XZ3ZTHKR.ts} +19 -9
  55. package/dist/chunks/chunk-XZ3ZTHKR.ts.map +7 -0
  56. package/dist/chunks/{chunk-S5OCYVPS.ts → chunk-YEULK7MK.ts} +3 -3
  57. package/dist/chunks/{command-handler-MRXE5AKK.ts → command-handler-SDGKIQH2.ts} +16 -14
  58. package/dist/chunks/command-handler-SDGKIQH2.ts.map +7 -0
  59. package/dist/chunks/{config-HYG7G5EM.ts → config-J5VZUY4J.ts} +4 -3
  60. package/dist/chunks/{conflict-artifacts-J6WSDCWP.ts → conflict-artifacts-MYSH3L2J.ts} +10 -9
  61. package/dist/chunks/{conflict-review-GXA6Y7KY.ts → conflict-review-J6ZSPNWL.ts} +21 -20
  62. package/dist/chunks/{conflict-review-GXA6Y7KY.ts.map → conflict-review-J6ZSPNWL.ts.map} +1 -1
  63. package/dist/chunks/{continuous-record-EPHGR2DU.ts → continuous-record-OM64J27R.ts} +4 -4
  64. package/dist/chunks/{continuous-sync-FAFNLEUW.ts → continuous-sync-BH5SWIRV.ts} +22 -17
  65. package/dist/chunks/continuous-sync-BH5SWIRV.ts.map +7 -0
  66. package/dist/chunks/{file-selection-IELTXSGZ.ts → file-selection-7HEVPO4T.ts} +11 -8
  67. package/dist/chunks/file-selection-7HEVPO4T.ts.map +7 -0
  68. package/dist/chunks/{git-backend-KHD36W27.ts → git-backend-6CKI6CUG.ts} +12 -15
  69. package/dist/chunks/{git-backend-KHD36W27.ts.map → git-backend-6CKI6CUG.ts.map} +2 -2
  70. package/dist/chunks/{local-fields-JEKAPZKD.ts → local-fields-SR7PH66U.ts} +6 -5
  71. package/dist/chunks/{manager-result-dispatcher-XCYPW7RC.ts → manager-result-dispatcher-CXUP5WDP.ts} +15 -14
  72. package/dist/chunks/{manager-ui-AY34N4UY.ts → manager-ui-65ZETN6F.ts} +168 -51
  73. package/dist/chunks/manager-ui-65ZETN6F.ts.map +7 -0
  74. package/dist/chunks/{merge-baseline-store-65GKUMXI.ts → merge-baseline-store-4Y2X7P2D.ts} +4 -3
  75. package/dist/chunks/{remote-selection-ui-MYM2YCPF.ts → remote-selection-ui-W55BQDJQ.ts} +14 -13
  76. package/dist/chunks/{s3-backend-L24UZ6IK.ts → s3-backend-FDK7JSDQ.ts} +8 -7
  77. package/dist/chunks/{s3-backend-L24UZ6IK.ts.map → s3-backend-FDK7JSDQ.ts.map} +1 -1
  78. package/dist/chunks/{setup-switch-KLGESLQX.ts → setup-switch-AB27ADDI.ts} +5 -4
  79. package/dist/chunks/{setup-wizard-ZQAK35BP.ts → setup-wizard-5FILKFLQ.ts} +6 -5
  80. package/dist/chunks/{setup-wizard-ZQAK35BP.ts.map → setup-wizard-5FILKFLQ.ts.map} +1 -1
  81. package/dist/chunks/{snapshot-RGNDYT6A.ts → snapshot-G3W2GOGB.ts} +5 -4
  82. package/dist/chunks/{snapshot-transaction-26BQO36S.ts → snapshot-transaction-SGRUWT73.ts} +6 -5
  83. package/dist/chunks/{sync-inspection-MOMLGUTD.ts → sync-inspection-MDYHZHT7.ts} +10 -9
  84. package/dist/chunks/{sync-operations-45APGOL3.ts → sync-operations-ZAUP65FH.ts} +40 -29
  85. package/dist/chunks/sync-operations-ZAUP65FH.ts.map +7 -0
  86. package/dist/chunks/{sync-state-7L4NT7W2.ts → sync-state-H4TFZZ7S.ts} +7 -6
  87. package/dist/chunks/{webdav-backend-3ZCACILP.ts → webdav-backend-UNMIAXM5.ts} +7 -6
  88. package/dist/chunks/{webdav-backend-3ZCACILP.ts.map → webdav-backend-UNMIAXM5.ts.map} +1 -1
  89. package/dist/index.ts +26 -19
  90. package/dist/index.ts.map +2 -2
  91. package/docs/exclude-policy-audit.md +54 -0
  92. package/docs/exclude-review-ledger.md +36 -0
  93. package/docs/tui-contract.md +1 -1
  94. package/package.json +2 -1
  95. package/skills/configure-pi-sync/SKILL.md +4 -3
  96. package/skills/configure-pi-sync/references/configuration.md +72 -13
  97. package/src/backends/git/git-storage.ts +12 -11
  98. package/src/commands/command-execution.ts +2 -2
  99. package/src/settings/config.ts +9 -3
  100. package/src/settings/settings-management.ts +4 -3
  101. package/src/settings/settings-types.ts +4 -1
  102. package/src/settings/settings-validation.ts +8 -4
  103. package/src/snapshot/session-paths.ts +1 -0
  104. package/src/snapshot/snapshot-apply.ts +23 -7
  105. package/src/snapshot/snapshot-codec.ts +12 -3
  106. package/src/snapshot/snapshot-exclude-safety.ts +44 -0
  107. package/src/snapshot/snapshot-transaction.ts +12 -0
  108. package/src/snapshot/snapshot-types.ts +4 -4
  109. package/src/snapshot/snapshot.ts +71 -30
  110. package/src/state/merge-baseline-store.ts +9 -1
  111. package/src/state/state-types.ts +1 -0
  112. package/src/sync/automatic-sync.ts +7 -2
  113. package/src/sync/continuous-watch.ts +4 -2
  114. package/src/sync/exclude-policy.ts +84 -0
  115. package/src/sync/local-fields.ts +15 -4
  116. package/src/sync/merge-apply.ts +6 -1
  117. package/src/sync/merge-journal.ts +12 -3
  118. package/src/sync/merged-sync.ts +17 -12
  119. package/src/sync/partial-progress.ts +1 -0
  120. package/src/sync/remote-snapshot.ts +7 -8
  121. package/src/sync/sync-decision.ts +11 -1
  122. package/src/sync/sync-inspection.ts +3 -1
  123. package/src/sync/sync-mutations.ts +11 -4
  124. package/src/sync/sync-policy.ts +101 -37
  125. package/src/sync/sync-queries.ts +13 -3
  126. package/src/sync/sync-state.ts +16 -10
  127. package/src/ui/excluded-paths-ui.ts +106 -0
  128. package/src/ui/file-selection.ts +6 -3
  129. package/src/ui/manager-state.ts +11 -5
  130. package/src/ui/remote-selection-ui.ts +73 -10
  131. package/src/ui/settings-ui.ts +20 -5
  132. package/src/ui/setup/setup-actions.ts +1 -1
  133. package/src/ui/setup/setup-switcher.ts +3 -2
  134. package/src/ui/storage-connections-ui.ts +2 -2
  135. package/src/ui/sync-attention.ts +17 -3
  136. package/src/ui/sync-format.ts +13 -1
  137. package/dist/chunks/chunk-6LD5KX55.ts.map +0 -7
  138. package/dist/chunks/chunk-7A35ZAVO.ts.map +0 -7
  139. package/dist/chunks/chunk-BEST45H2.ts.map +0 -7
  140. package/dist/chunks/chunk-ESKOPQVB.ts.map +0 -7
  141. package/dist/chunks/chunk-FLHCOJCD.ts.map +0 -7
  142. package/dist/chunks/chunk-KYTT7KV4.ts.map +0 -7
  143. package/dist/chunks/chunk-MG66XM5U.ts.map +0 -7
  144. package/dist/chunks/chunk-MKSMJPVA.ts.map +0 -7
  145. package/dist/chunks/chunk-MMQIEDZ6.ts.map +0 -7
  146. package/dist/chunks/chunk-OVBAW7KV.ts.map +0 -7
  147. package/dist/chunks/chunk-REMGB255.ts.map +0 -7
  148. package/dist/chunks/chunk-TIMWN2RH.ts.map +0 -7
  149. package/dist/chunks/chunk-Y4UVXOLQ.ts.map +0 -7
  150. package/dist/chunks/command-handler-MRXE5AKK.ts.map +0 -7
  151. package/dist/chunks/continuous-sync-FAFNLEUW.ts.map +0 -7
  152. package/dist/chunks/file-selection-IELTXSGZ.ts.map +0 -7
  153. package/dist/chunks/manager-ui-AY34N4UY.ts.map +0 -7
  154. package/dist/chunks/sync-operations-45APGOL3.ts.map +0 -7
  155. /package/dist/chunks/{agent-candidate-U2NU3GUX.ts.map → agent-candidate-ZHN7FTZT.ts.map} +0 -0
  156. /package/dist/chunks/{agent-store-7GINKTS7.ts.map → agent-store-CCKN4DPR.ts.map} +0 -0
  157. /package/dist/chunks/{agent-sync-2R4GG2MF.ts.map → agent-sync-EGA2I5W7.ts.map} +0 -0
  158. /package/dist/chunks/{chunk-CQD2TJHE.ts.map → chunk-25QCU3LY.ts.map} +0 -0
  159. /package/dist/chunks/{chunk-OJARL2TG.ts.map → chunk-2UKUKIBI.ts.map} +0 -0
  160. /package/dist/chunks/{chunk-DN4IA7MR.ts.map → chunk-4NVHHDN2.ts.map} +0 -0
  161. /package/dist/chunks/{chunk-AKMV47YC.ts.map → chunk-6OFMB6KK.ts.map} +0 -0
  162. /package/dist/chunks/{chunk-XEODG2PE.ts.map → chunk-76HID27T.ts.map} +0 -0
  163. /package/dist/chunks/{chunk-U6GXGY5G.ts.map → chunk-DTPELCPW.ts.map} +0 -0
  164. /package/dist/chunks/{chunk-TZC7GDJE.ts.map → chunk-ILXMZ2HU.ts.map} +0 -0
  165. /package/dist/chunks/{chunk-JYILGR3K.ts.map → chunk-PQ75RPUP.ts.map} +0 -0
  166. /package/dist/chunks/{chunk-WQMYV4DW.ts.map → chunk-RDOX3VH5.ts.map} +0 -0
  167. /package/dist/chunks/{chunk-6O3EDBRL.ts.map → chunk-S7D6XWHI.ts.map} +0 -0
  168. /package/dist/chunks/{chunk-GNYGNHFF.ts.map → chunk-T2TYBLXK.ts.map} +0 -0
  169. /package/dist/chunks/{chunk-5TSCBBPP.ts.map → chunk-VPODHKOX.ts.map} +0 -0
  170. /package/dist/chunks/{chunk-S5OCYVPS.ts.map → chunk-YEULK7MK.ts.map} +0 -0
  171. /package/dist/chunks/{config-HYG7G5EM.ts.map → config-J5VZUY4J.ts.map} +0 -0
  172. /package/dist/chunks/{conflict-artifacts-J6WSDCWP.ts.map → conflict-artifacts-MYSH3L2J.ts.map} +0 -0
  173. /package/dist/chunks/{continuous-record-EPHGR2DU.ts.map → continuous-record-OM64J27R.ts.map} +0 -0
  174. /package/dist/chunks/{local-fields-JEKAPZKD.ts.map → local-fields-SR7PH66U.ts.map} +0 -0
  175. /package/dist/chunks/{manager-result-dispatcher-XCYPW7RC.ts.map → manager-result-dispatcher-CXUP5WDP.ts.map} +0 -0
  176. /package/dist/chunks/{merge-baseline-store-65GKUMXI.ts.map → merge-baseline-store-4Y2X7P2D.ts.map} +0 -0
  177. /package/dist/chunks/{remote-selection-ui-MYM2YCPF.ts.map → remote-selection-ui-W55BQDJQ.ts.map} +0 -0
  178. /package/dist/chunks/{setup-switch-KLGESLQX.ts.map → setup-switch-AB27ADDI.ts.map} +0 -0
  179. /package/dist/chunks/{snapshot-RGNDYT6A.ts.map → snapshot-G3W2GOGB.ts.map} +0 -0
  180. /package/dist/chunks/{snapshot-transaction-26BQO36S.ts.map → snapshot-transaction-SGRUWT73.ts.map} +0 -0
  181. /package/dist/chunks/{sync-inspection-MOMLGUTD.ts.map → sync-inspection-MDYHZHT7.ts.map} +0 -0
  182. /package/dist/chunks/{sync-state-7L4NT7W2.ts.map → sync-state-H4TFZZ7S.ts.map} +0 -0
@@ -6,7 +6,7 @@ import {
6
6
  setupSwitchActionFromLabel,
7
7
  setupSwitchActionLabel,
8
8
  useSyncSetup
9
- } from "./chunk-XEODG2PE.ts";
9
+ } from "./chunk-76HID27T.ts";
10
10
  import {
11
11
  applyS3CredentialUpdate,
12
12
  chooseS3CredentialUpdate,
@@ -26,41 +26,41 @@ import {
26
26
  showEditS3Target,
27
27
  showEditWebDavStorageProfile,
28
28
  showEditWebDavTarget
29
- } from "./chunk-U6GXGY5G.ts";
29
+ } from "./chunk-DTPELCPW.ts";
30
30
  import {
31
31
  automaticSyncSummary
32
32
  } from "./chunk-ECYCNZOE.ts";
33
33
  import {
34
34
  dispatchManagerResult
35
- } from "./chunk-JYILGR3K.ts";
35
+ } from "./chunk-PQ75RPUP.ts";
36
36
  import {
37
37
  runCancellableOperation
38
- } from "./chunk-MG66XM5U.ts";
39
- import "./chunk-TIMWN2RH.ts";
40
- import "./chunk-OJARL2TG.ts";
38
+ } from "./chunk-NGW4JMBF.ts";
39
+ import "./chunk-OQBE2OMB.ts";
40
+ import "./chunk-2UKUKIBI.ts";
41
41
  import {
42
42
  confirmMergeReview
43
43
  } from "./chunk-KHBPED6W.ts";
44
- import "./chunk-TZC7GDJE.ts";
44
+ import "./chunk-ILXMZ2HU.ts";
45
45
  import {
46
46
  addStorageConnection,
47
47
  removeStorageConnection,
48
48
  removeSyncSetup,
49
49
  updateStorageConnection,
50
50
  updateSyncSetup
51
- } from "./chunk-45COPAK7.ts";
52
- import "./chunk-FLHCOJCD.ts";
51
+ } from "./chunk-6XU5HZAN.ts";
52
+ import "./chunk-QQVK2XFC.ts";
53
53
  import {
54
54
  syncErrorGuidance
55
55
  } from "./chunk-G4RUXRWZ.ts";
56
56
  import {
57
57
  sameLocalFields
58
- } from "./chunk-MKSMJPVA.ts";
58
+ } from "./chunk-P3YD4ONV.ts";
59
59
  import {
60
60
  observationMatchesConfig,
61
61
  observationSummary,
62
62
  syncAttentionMatchesConfig
63
- } from "./chunk-REMGB255.ts";
63
+ } from "./chunk-2ZZJXITS.ts";
64
64
  import {
65
65
  AUTOMATIC_SYNC_DESCRIPTION,
66
66
  STARTUP_TRANSFER_DESCRIPTION,
@@ -68,7 +68,7 @@ import {
68
68
  } from "./chunk-QPC5HT3A.ts";
69
69
  import {
70
70
  captureMutationOwner
71
- } from "./chunk-GNYGNHFF.ts";
71
+ } from "./chunk-T2TYBLXK.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-OVBAW7KV.ts";
95
+ } from "./chunk-XZ3ZTHKR.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-6O3EDBRL.ts";
103
+ } from "./chunk-S7D6XWHI.ts";
104
104
  import {
105
105
  throwIfAborted
106
106
  } from "./chunk-PWMWOJP4.ts";
@@ -108,21 +108,26 @@ import "./chunk-ZW5ZLGBI.ts";
108
108
  import {
109
109
  readStateForConfig,
110
110
  syncStateFingerprint
111
- } from "./chunk-DN4IA7MR.ts";
111
+ } from "./chunk-4NVHHDN2.ts";
112
112
  import "./chunk-AR2DGDUI.ts";
113
113
  import "./chunk-SWRVXVFD.ts";
114
114
  import "./chunk-2JZFHNLM.ts";
115
115
  import "./chunk-T2SJD3N7.ts";
116
- import "./chunk-ESKOPQVB.ts";
116
+ import "./chunk-MKC3PXCN.ts";
117
117
  import {
118
118
  compareSyncInclude,
119
- syncIncludeSelection
120
- } from "./chunk-KYTT7KV4.ts";
121
- import "./chunk-CBLTWXAU.ts";
119
+ syncIncludeSelection,
120
+ syncSessionsSelected
121
+ } from "./chunk-WUHRVSWI.ts";
122
+ import "./chunk-LA3HQMFG.ts";
123
+ import {
124
+ normalizeSyncExclude,
125
+ sameSyncExclude
126
+ } from "./chunk-3JTZF7Z5.ts";
122
127
  import "./chunk-FHE2DCA2.ts";
123
128
 
124
129
  // src/ui/manager-ui.ts
125
- import { defineMenu as defineMenu5, runMenu as runMenu5 } from "@narumitw/pi-tui-kit";
130
+ import { defineMenu as defineMenu6, runMenu as runMenu6 } from "@narumitw/pi-tui-kit";
126
131
 
127
132
  // src/state/operation-availability.ts
128
133
  var DEFAULT_INSPECTION_DEPENDENCIES = {
@@ -190,7 +195,7 @@ function blockedSyncMenuItem(label, manager) {
190
195
  };
191
196
  }
192
197
  async function showManagerAttention(ctx, attention, runRoute, signal, onSelectionResolved) {
193
- const { showRemoteSelectionReview } = await import("./remote-selection-ui-MYM2YCPF.ts");
198
+ const { showRemoteSelectionReview } = await import("./remote-selection-ui-W55BQDJQ.ts");
194
199
  if (signal?.aborted) return "close";
195
200
  const review = await showRemoteSelectionReview(ctx, attention.decision.setupName, signal, void 0, {
196
201
  decision: attention.decision,
@@ -500,7 +505,7 @@ async function describeManagerState(signal, attention, inspectOperation = inspec
500
505
  };
501
506
  }
502
507
  const configuredTargets = ownRecord(raw.syncSetups);
503
- if ((raw.version === 3 || raw.version === 4 || raw.version === 5) && configuredTargets && Object.keys(configuredTargets).length === 0) {
508
+ if ((raw.version === 3 || raw.version === 4 || raw.version === 5 || raw.version === 6) && configuredTargets && Object.keys(configuredTargets).length === 0) {
504
509
  return {
505
510
  title: [
506
511
  "Manage sync",
@@ -529,6 +534,7 @@ async function describeManagerState(signal, attention, inspectOperation = inspec
529
534
  if (signal?.aborted) throw signal.reason;
530
535
  }
531
536
  const attentionComparison = currentAttention ? compareSyncInclude(currentAttention.decision.localInclude, currentAttention.decision.remoteInclude) : void 0;
537
+ const attentionExclusionsDiffer = currentAttention ? !sameSyncExclude(currentAttention.decision.localExclude, currentAttention.decision.remoteExclude) : false;
532
538
  const noSyncedContent = config.include.length === 0;
533
539
  const syncState = changesBlocked ? void 0 : await readStateForConfig(config).catch(() => void 0);
534
540
  const currentObservation = observation && observationMatchesConfig(observation, config) && syncState && syncStateFingerprint(syncState) === observation.inspection.stateIdentity ? observation : void 0;
@@ -550,17 +556,17 @@ async function describeManagerState(signal, attention, inspectOperation = inspec
550
556
  ] : [],
551
557
  ...currentAttention ? [
552
558
  currentAttention.decision.setupName === config.setupName ? "Sync status: Review needed" : `Sync status: Review needed for setup ${safeTerminalText(currentAttention.decision.setupName)}`,
553
- attentionComparison?.remoteOnly.length === 0 && attentionComparison.localOnly.length === 0 ? "Only the synced-content order differs." : `Remote-only paths: ${attentionComparison?.remoteOnly.length ?? 0} \xB7 Device-only paths: ${attentionComparison?.localOnly.length ?? 0}`,
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." : ""}`,
554
560
  "Nothing has been changed."
555
561
  ] : currentObservation ? [
556
562
  `Startup check (${safeTerminalText(currentObservation.checkedAt)}): ${observationSummary(currentObservation)}`,
557
563
  "Check-time observation only; synchronization rechecks current content."
558
564
  ] : ["Remote status: Not checked"],
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"}`,
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"}`,
560
566
  `Automatic sync: ${automaticSyncSummary(config.automatic)}`,
561
567
  `Startup transfer: ${startupTransferSummary(config)}`,
562
568
  `Autonomous sync: ${config.agentMode ? "On (autonomous merged sync)" : "Off"}`,
563
- ...config.continuous ? await (await import("./continuous-record-EPHGR2DU.ts")).continuousStatusLines(config) : [],
569
+ ...config.continuous ? await (await import("./continuous-record-OM64J27R.ts")).continuousStatusLines(config) : [],
564
570
  `Last applied: ${lastAppliedSnapshot}`,
565
571
  ...noSyncedContent ? ["", "No included content is selected. Choose included content in Settings before syncing."] : [],
566
572
  "",
@@ -651,7 +657,7 @@ function backendStorageDescription(config) {
651
657
  }
652
658
 
653
659
  // src/ui/settings-ui.ts
654
- import { defineMenu as defineMenu4, runMenu as runMenu4 } from "@narumitw/pi-tui-kit";
660
+ import { defineMenu as defineMenu5, runMenu as runMenu5 } from "@narumitw/pi-tui-kit";
655
661
 
656
662
  // src/ui/agent-mode-setting.ts
657
663
  import { isDeepStrictEqual } from "node:util";
@@ -713,6 +719,105 @@ async function saveAgentMode(ctx, setupName, enabled, signal, preference = "agen
713
719
  return true;
714
720
  }
715
721
 
722
+ // src/ui/excluded-paths-ui.ts
723
+ import { defineMenu as defineMenu2, runMenu as runMenu2 } from "@narumitw/pi-tui-kit";
724
+ async function showExcludedPaths(ctx, setupName, signal) {
725
+ const validate = captureMutationOwner(ctx, signal);
726
+ const isCurrent = () => {
727
+ try {
728
+ validate();
729
+ return true;
730
+ } catch {
731
+ return false;
732
+ }
733
+ };
734
+ validate();
735
+ const config = await loadConfig(setupName);
736
+ validate();
737
+ if (ctx.mode !== "tui") {
738
+ if (ctx.hasUI)
739
+ ctx.ui.notify(
740
+ [
741
+ `Excluded paths: ${(config.exclude ?? []).map(safeTerminalText).join(", ") || "none"}`,
742
+ `Edit sync.exclude in ${safeTerminalText(localConfigPath())}; an explicit array requires settings version 6.`
743
+ ].join("\n"),
744
+ "info"
745
+ );
746
+ return;
747
+ }
748
+ let draft = JSON.stringify(config.exclude ?? []);
749
+ while (isCurrent()) {
750
+ const entered = await ctx.ui.input("Excluded paths \xB7 JSON array \xB7 empty input keeps draft", draft, { signal });
751
+ if (!isCurrent() || entered === void 0) return;
752
+ const input = entered || draft;
753
+ draft = input;
754
+ let exclude;
755
+ try {
756
+ const parsed = JSON.parse(input);
757
+ if (!Array.isArray(parsed)) throw new Error("Enter a JSON string array.");
758
+ exclude = normalizeSyncExclude(parsed);
759
+ } catch {
760
+ ctx.ui.notify("Invalid exclude array or unsupported pattern. No settings changed.", "error");
761
+ continue;
762
+ }
763
+ if (sameSyncExclude(exclude, config.exclude)) return;
764
+ let choice;
765
+ const menu = defineMenu2({
766
+ start: "review",
767
+ screens: {
768
+ review: () => ({
769
+ kind: "actions",
770
+ title: "Review excluded paths",
771
+ lines: [
772
+ `Setup: ${safeTerminalText(config.setupName)}`,
773
+ "Draft only. Save opts into settings version 6 / snapshot version 4; older clients must refuse them.",
774
+ "Excluded local files stay untouched. New snapshots omit matching remote files; old history is NOT erased.",
775
+ "Removing rules can expose local content or allow pull to replace it. Review a force push to publish policy changes.",
776
+ "Previously excluded:",
777
+ ...config.exclude?.length ? config.exclude.map((rule) => `- ${safeTerminalText(rule)}`) : ["(none)"],
778
+ "Proposed excluded paths:",
779
+ ...exclude.length ? exclude.map((rule) => `+ ${safeTerminalText(rule)}`) : ["(none)"]
780
+ ],
781
+ items: [
782
+ { id: "save", label: "Save changes", action: "choose" },
783
+ { id: "discard", label: "Discard changes", action: "choose" },
784
+ { id: "edit", label: "Continue editing", action: "choose" }
785
+ ],
786
+ hint: "close"
787
+ })
788
+ },
789
+ actions: {
790
+ choose: async ({ itemId }) => {
791
+ choice = itemId === "save" ? "save" : itemId === "edit" ? "edit" : "discard";
792
+ return { kind: "close" };
793
+ }
794
+ }
795
+ });
796
+ await runMenu2(ctx, menu, { getState: () => void 0, signal, isCurrent });
797
+ if (!isCurrent()) return;
798
+ if (choice === "edit") continue;
799
+ if (choice !== "save") return;
800
+ try {
801
+ await updateSyncSetup(
802
+ setupName,
803
+ (setup) => {
804
+ validate();
805
+ return { ...setup, sync: { ...setup.sync, exclude } };
806
+ },
807
+ { expectedConfigFingerprint: syncCheckConfigFingerprint(config), upgradeExclude: true, signal }
808
+ );
809
+ if (isCurrent()) ctx.ui.notify("Excluded paths saved. Applies to subsequent sync; no transfer started.", "info");
810
+ } catch (error) {
811
+ if (isCurrent())
812
+ ctx.ui.notify(
813
+ `Excluded paths not saved: ${safeTerminalText(error instanceof Error ? error.message : String(error))}`,
814
+ "error"
815
+ );
816
+ }
817
+ return;
818
+ }
819
+ }
820
+
716
821
  // src/ui/settings-frame.ts
717
822
  import { stripVTControlCharacters } from "node:util";
718
823
  function boundedSettingsUI(ctx) {
@@ -759,11 +864,11 @@ function boundedSettingsUI(ctx) {
759
864
 
760
865
  // src/ui/storage-connections-ui.ts
761
866
  import { isDeepStrictEqual as isDeepStrictEqual2 } from "node:util";
762
- import { defineMenu as defineMenu2, runMenu as runMenu2 } from "@narumitw/pi-tui-kit";
867
+ import { defineMenu as defineMenu3, runMenu as runMenu3 } from "@narumitw/pi-tui-kit";
763
868
  async function showStorageConnections(ctx, signal) {
764
869
  let selectedName;
765
870
  const nameById = /* @__PURE__ */ new Map();
766
- const menu = defineMenu2({
871
+ const menu = defineMenu3({
767
872
  start: "list",
768
873
  screens: {
769
874
  list: ({ state }) => {
@@ -856,7 +961,7 @@ async function showStorageConnections(ctx, signal) {
856
961
  }
857
962
  }
858
963
  });
859
- await runMenu2(ctx, menu, {
964
+ await runMenu3(ctx, menu, {
860
965
  getState: () => loadStorageMenuState(selectedName, signal),
861
966
  signal,
862
967
  isCurrent: () => !signal?.aborted
@@ -869,14 +974,14 @@ async function loadStorageMenuState(selectedName, signal) {
869
974
  const profile = selectedName ? ownRecord(profiles[selectedName]) : void 0;
870
975
  if (!selectedName || !profile) {
871
976
  return {
872
- supportedVersion: raw?.version === 3 || raw?.version === 4 || raw?.version === 5,
977
+ supportedVersion: raw?.version === 3 || raw?.version === 4 || raw?.version === 5 || raw?.version === 6,
873
978
  profiles,
874
979
  selected: void 0
875
980
  };
876
981
  }
877
982
  const usedBy = referencingSetups(raw, selectedName);
878
983
  return {
879
- supportedVersion: raw?.version === 3 || raw?.version === 4 || raw?.version === 5,
984
+ supportedVersion: raw?.version === 3 || raw?.version === 4 || raw?.version === 5 || raw?.version === 6,
880
985
  profiles,
881
986
  selected: {
882
987
  name: selectedName,
@@ -1072,12 +1177,12 @@ function credentialSource(profile) {
1072
1177
  }
1073
1178
 
1074
1179
  // src/ui/setup/setup-switcher.ts
1075
- import { defineMenu as defineMenu3, runMenu as runMenu3 } from "@narumitw/pi-tui-kit";
1180
+ import { defineMenu as defineMenu4, runMenu as runMenu4 } from "@narumitw/pi-tui-kit";
1076
1181
  async function selectSetupForSwitch(ctx, raw, targets, active, signal) {
1077
1182
  let selectedName;
1078
1183
  const nameById = /* @__PURE__ */ new Map();
1079
1184
  const profiles = ownRecord(raw.storageConnections);
1080
- const menu = defineMenu3({
1185
+ const menu = defineMenu4({
1081
1186
  start: "setups",
1082
1187
  screens: {
1083
1188
  setups: () => ({
@@ -1109,7 +1214,7 @@ async function selectSetupForSwitch(ctx, raw, targets, active, signal) {
1109
1214
  }
1110
1215
  }
1111
1216
  });
1112
- await runMenu3(ctx, menu, {
1217
+ await runMenu4(ctx, menu, {
1113
1218
  getState: () => void 0,
1114
1219
  signal,
1115
1220
  isCurrent: () => !signal?.aborted
@@ -1119,7 +1224,7 @@ async function selectSetupForSwitch(ctx, raw, targets, active, signal) {
1119
1224
  async function showSetupSwitcher(ctx, runRoute, selectedName, signal) {
1120
1225
  const raw = await readLocalConfigObject();
1121
1226
  if (signal?.aborted) return false;
1122
- if (raw?.version !== 3 && raw?.version !== 4 && raw?.version !== 5) {
1227
+ if (raw?.version !== 3 && raw?.version !== 4 && raw?.version !== 5 && raw?.version !== 6) {
1123
1228
  ctx.ui.notify("Add a second sync setup before switching setups.", "info");
1124
1229
  return false;
1125
1230
  }
@@ -1163,7 +1268,7 @@ async function showSetupSwitcher(ctx, runRoute, selectedName, signal) {
1163
1268
  `To: ${safeTerminalText(name)}`,
1164
1269
  `Storage: ${backendStorageDescription(config)}`,
1165
1270
  `Included content: ${config.include.length} paths`,
1166
- `Automatic sync: ${automaticSyncSummary(config.automatic)} \xB7 Sessions: ${config.include.includes("sessions") ? "On" : "Off"}`,
1271
+ `Automatic sync: ${automaticSyncSummary(config.automatic)} \xB7 Sessions: ${syncSessionsSelected(config) ? "On" : "Off"}`,
1167
1272
  `Automatic transfer at startup: ${config.automaticTransfer ? "On \u2014 may upload, replace, or delete selected files; no reload" : "Off"}`,
1168
1273
  `Autonomous sync: ${config.agentMode ? "On (autonomous merged sync)" : "Off"}`,
1169
1274
  `Continuous sync: ${config.continuous ? config.agentMode ? "On (recurring requests and transfers)" : "Saved On; paused until Autonomous sync is enabled" : "Off"}`,
@@ -1241,7 +1346,7 @@ async function showAddTarget(ctx, signal) {
1241
1346
  let raw = await readLocalConfigObject();
1242
1347
  if (signal?.aborted) return;
1243
1348
  if (!raw) return void ctx.ui.notify("Set up the first sync setup before adding another.", "info");
1244
- if (raw.version !== 3 && raw.version !== 4 && raw.version !== 5) {
1349
+ if (raw.version !== 3 && raw.version !== 4 && raw.version !== 5 && raw.version !== 6) {
1245
1350
  ctx.ui.notify("Version 1 and version 2 settings are unsupported and are never migrated.", "error");
1246
1351
  return;
1247
1352
  }
@@ -1325,7 +1430,7 @@ async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
1325
1430
  if (ctx.mode !== "tui") {
1326
1431
  ctx.ui.notify(`Edit pi-sync settings manually: ${safeTerminalText(localConfigPath())}`, "info");
1327
1432
  if (ctx.mode === "rpc" && ctx.hasUI) {
1328
- const management = defineMenu4({
1433
+ const management = defineMenu5({
1329
1434
  start: "management",
1330
1435
  screens: {
1331
1436
  management: () => ({
@@ -1349,7 +1454,7 @@ async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
1349
1454
  }
1350
1455
  }
1351
1456
  });
1352
- await runMenu4(ctx, management, { getState: () => void 0, signal, isCurrent: () => !signal?.aborted });
1457
+ await runMenu5(ctx, management, { getState: () => void 0, signal, isCurrent: () => !signal?.aborted });
1353
1458
  }
1354
1459
  return disposition;
1355
1460
  }
@@ -1357,7 +1462,7 @@ async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
1357
1462
  if (signal?.aborted) return "back";
1358
1463
  const setupName = initial.setupName;
1359
1464
  let saveStatus = "Simple choices save immediately. Back does not undo saved changes.";
1360
- const menu = defineMenu4({
1465
+ const menu = defineMenu5({
1361
1466
  start: "settings",
1362
1467
  screens: {
1363
1468
  settings: ({ state }) => ({
@@ -1375,10 +1480,17 @@ async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
1375
1480
  currentValue: `${state.include.length} paths \xB7 Edit`,
1376
1481
  action: "include"
1377
1482
  },
1483
+ {
1484
+ id: "exclude",
1485
+ label: "Excluded paths",
1486
+ description: "This setup: draft relative paths or *, ?, ** patterns, then review Save/Discard. No transfer starts; old history is retained.",
1487
+ currentValue: `${state.exclude?.length ?? 0} rules \xB7 Edit`,
1488
+ action: "exclude"
1489
+ },
1378
1490
  {
1379
1491
  id: "remoteInclude",
1380
1492
  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.",
1493
+ description: "This setup: compare include and exclude policies, not file contents. Review before saving both lists; no files transfer unless you explicitly Continue.",
1382
1494
  currentValue: "Review",
1383
1495
  action: "remote-include"
1384
1496
  },
@@ -1519,7 +1631,7 @@ async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
1519
1631
  const partialSync = value === "Partial only" || value === "Merge + partial";
1520
1632
  if (!await ctx.ui.confirm(
1521
1633
  "Save content policy?",
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.",
1634
+ "This explicitly upgrades settings to at least version 5; partial snapshots use version 3, or version 4 with exclusions, 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.",
1523
1635
  { signal: mutationSignal }
1524
1636
  ))
1525
1637
  return { kind: "rejected" };
@@ -1532,7 +1644,7 @@ async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
1532
1644
  throw new Error("Content policy changed during review.");
1533
1645
  return {
1534
1646
  ...current,
1535
- version: 5,
1647
+ version: current.version === 6 ? 6 : 5,
1536
1648
  syncSetups: {
1537
1649
  ...current.syncSetups,
1538
1650
  [setupName]: { ...setup, sync: { ...setup.sync, mergeContent, partialSync } }
@@ -1587,7 +1699,7 @@ async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
1587
1699
  if (sameLocalFields(previous.localFields, fields)) return { kind: "stay" };
1588
1700
  const confirmed = await ctx.ui.confirm(
1589
1701
  "Save portable field policy?",
1590
- "This opts into settings/snapshot version 4/2; older clients must refuse them. Future snapshots omit these fields, but old remote history is NOT erased. Review an explicit force push/pull migration before further sync. Removed rules can expose or replace local-only values.",
1702
+ "This opts into at least settings/snapshot version 4/2; exclude-enabled setups retain 6/4. Older clients must refuse them. Future snapshots omit these fields, but old remote history is NOT erased. Review an explicit force push/pull migration before further sync. Removed rules can expose or replace local-only values.",
1591
1703
  { signal: mutationSignal }
1592
1704
  );
1593
1705
  validate();
@@ -1600,7 +1712,7 @@ async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
1600
1712
  throw new Error("Field policy changed while under review; reopen settings.");
1601
1713
  return {
1602
1714
  ...current,
1603
- version: current.version === 5 ? 5 : 4,
1715
+ version: current.version >= 5 ? current.version : 4,
1604
1716
  syncSetups: {
1605
1717
  ...current.syncSetups,
1606
1718
  [setupName]: { ...setup, sync: { ...setup.sync, localFields: fields } }
@@ -1772,9 +1884,14 @@ async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
1772
1884
  await runRoute("files", editorSignal, void 0, setupName);
1773
1885
  return editorSignal.aborted ? { kind: "rejected" } : { kind: "stay" };
1774
1886
  },
1887
+ exclude: async ({ signal: actionSignal }) => {
1888
+ const editorSignal = signal ? AbortSignal.any([signal, actionSignal]) : actionSignal;
1889
+ await showExcludedPaths(ctx, setupName, editorSignal);
1890
+ return resumeSettings(editorSignal);
1891
+ },
1775
1892
  "remote-include": async ({ signal: actionSignal }) => {
1776
1893
  const reviewSignal = signal ? AbortSignal.any([signal, actionSignal]) : actionSignal;
1777
- const { showRemoteSelectionReview } = await import("./remote-selection-ui-MYM2YCPF.ts");
1894
+ const { showRemoteSelectionReview } = await import("./remote-selection-ui-W55BQDJQ.ts");
1778
1895
  if (reviewSignal.aborted) return { kind: "rejected" };
1779
1896
  const review = await showRemoteSelectionReview(ctx, setupName, reviewSignal, void 0, {
1780
1897
  origin: "settings",
@@ -1821,7 +1938,7 @@ async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
1821
1938
  return { kind: "close" };
1822
1939
  }
1823
1940
  }
1824
- await runMenu4({ ...ctx, ui: boundedSettingsUI(ctx) }, menu, {
1941
+ await runMenu5({ ...ctx, ui: boundedSettingsUI(ctx) }, menu, {
1825
1942
  getState: () => loadConfig(setupName),
1826
1943
  signal,
1827
1944
  isCurrent: () => !signal?.aborted
@@ -1850,7 +1967,7 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
1850
1967
  return false;
1851
1968
  }
1852
1969
  };
1853
- const menu = defineMenu5({
1970
+ const menu = defineMenu6({
1854
1971
  start: "main",
1855
1972
  screens: {
1856
1973
  main: ({ state }) => {
@@ -1879,7 +1996,7 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
1879
1996
  if (!attention) {
1880
1997
  const observation = state.manager.observation;
1881
1998
  if (!observation) return { kind: "stay" };
1882
- const { showRemoteSelectionReview } = await import("./remote-selection-ui-MYM2YCPF.ts");
1999
+ const { showRemoteSelectionReview } = await import("./remote-selection-ui-W55BQDJQ.ts");
1883
2000
  if (sessionSignal?.aborted) return { kind: "close" };
1884
2001
  const config = await loadConfig();
1885
2002
  if (sessionSignal?.aborted) return { kind: "close" };
@@ -2107,7 +2224,7 @@ S3/R2 reads the latest pointer without writing. Git reads remote snapshots and c
2107
2224
  }, customOptions)
2108
2225
  }
2109
2226
  };
2110
- await runMenu5(menuContext, menu, {
2227
+ await runMenu6(menuContext, menu, {
2111
2228
  getState: async () => {
2112
2229
  const pendingAttention = options.getAttention?.();
2113
2230
  const observation = options.getObservation?.();
@@ -2158,4 +2275,4 @@ function syncMainMenuItem(label) {
2158
2275
  export {
2159
2276
  showSyncManager
2160
2277
  };
2161
- //# sourceMappingURL=manager-ui-AY34N4UY.ts.map
2278
+ //# sourceMappingURL=manager-ui-65ZETN6F.ts.map