@narumitw/pi-sync 0.65.0 → 0.66.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 (70) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +4 -4
  3. package/dist/chunks/{chunk-OWEOZZZE.ts → chunk-5YOLQKNZ.ts} +38 -2
  4. package/dist/chunks/chunk-5YOLQKNZ.ts.map +7 -0
  5. package/dist/chunks/{chunk-OBVJTKVY.ts → chunk-ASU3GZPW.ts} +10 -92
  6. package/dist/chunks/chunk-ASU3GZPW.ts.map +7 -0
  7. package/dist/chunks/{chunk-IOM6E5FW.ts → chunk-BESRBKVO.ts} +2 -2
  8. package/dist/chunks/{chunk-TZMVSTAM.ts → chunk-BYVHABNR.ts} +4 -4
  9. package/dist/chunks/chunk-ECYCNZOE.ts +12 -0
  10. package/dist/chunks/chunk-ECYCNZOE.ts.map +7 -0
  11. package/dist/chunks/{chunk-MANNB4WZ.ts → chunk-KNEUL4XN.ts} +1 -7
  12. package/dist/chunks/chunk-KNEUL4XN.ts.map +7 -0
  13. package/dist/chunks/chunk-Z5JMOXJM.ts +106 -0
  14. package/dist/chunks/chunk-Z5JMOXJM.ts.map +7 -0
  15. package/dist/chunks/{command-handler-YZ4DXQ7N.ts → command-handler-44EFGPWH.ts} +9 -7
  16. package/dist/chunks/{command-handler-YZ4DXQ7N.ts.map → command-handler-44EFGPWH.ts.map} +1 -1
  17. package/dist/chunks/{file-selection-DDQN4LVD.ts → file-selection-XWACUTAH.ts} +8 -8
  18. package/dist/chunks/ignore-file-ui-OHFISFVC.ts +21 -0
  19. package/dist/chunks/{manager-result-dispatcher-XB75YLEG.ts → manager-result-dispatcher-WXE2BAQO.ts} +3 -3
  20. package/dist/chunks/{manager-ui-RGA26Z6G.ts → manager-ui-CVZLMXJ5.ts} +57 -45
  21. package/dist/chunks/manager-ui-CVZLMXJ5.ts.map +7 -0
  22. package/dist/chunks/{remote-selection-ui-WVMET5RI.ts → remote-selection-ui-E4XZCQ7A.ts} +2 -2
  23. package/dist/chunks/remote-selection-ui-E4XZCQ7A.ts.map +7 -0
  24. package/dist/chunks/{setup-wizard-YP2KF2WQ.ts → setup-wizard-IEW56AZE.ts} +7 -5
  25. package/dist/chunks/{setup-wizard-YP2KF2WQ.ts.map → setup-wizard-IEW56AZE.ts.map} +1 -1
  26. package/dist/daemon/dist/consent.js +14 -2
  27. package/dist/daemon/dist/engine/backends/git/git-backend.js +5 -3
  28. package/dist/daemon/dist/engine/backends/git/git-storage.js +15 -3
  29. package/dist/daemon/dist/engine/ignore/adoption-journal.js +143 -0
  30. package/dist/daemon/dist/engine/ignore/snapshot-ignore-rules.js +39 -0
  31. package/dist/daemon/dist/engine/snapshot/snapshot-apply.js +2 -2
  32. package/dist/daemon/dist/engine/snapshot/snapshot-codec.js +6 -6
  33. package/dist/daemon/dist/engine/snapshot/snapshot-types.js +5 -1
  34. package/dist/daemon/dist/engine/snapshot/snapshot.js +5 -2
  35. package/dist/daemon/dist/engine/sync/conflict-review.js +2 -0
  36. package/dist/daemon/dist/engine/sync/continuous-watch.js +3 -2
  37. package/dist/daemon/dist/engine/sync/directional-action.js +3 -8
  38. package/dist/daemon/dist/engine/sync/ignore-adoption-recovery.js +50 -0
  39. package/dist/daemon/dist/engine/sync/ignore-adoption.js +401 -0
  40. package/dist/daemon/dist/engine/sync/ignore-publication.js +23 -0
  41. package/dist/daemon/dist/engine/sync/initialization.js +12 -0
  42. package/dist/daemon/dist/engine/sync/local-fields.js +6 -3
  43. package/dist/daemon/dist/engine/sync/merge-journal.js +2 -2
  44. package/dist/daemon/dist/engine/sync/merged-sync.js +14 -3
  45. package/dist/daemon/dist/engine/sync/sync-local.js +2 -1
  46. package/dist/daemon/dist/engine/sync/sync-mutations.js +82 -19
  47. package/dist/daemon/dist/engine/sync/sync-policy.js +5 -5
  48. package/dist/daemon/dist/engine/sync/sync-queries.js +1 -1
  49. package/dist/daemon/dist/engine/sync/sync-rollback.js +9 -3
  50. package/dist/daemon/dist/engine/ui/ignore-rule-preview.js +18 -0
  51. package/dist/daemon/dist/engine-service.js +1 -1
  52. package/dist/daemon/package.json +1 -1
  53. package/dist/index.ts +1 -1
  54. package/docs/tui-contract.md +3 -3
  55. package/package.json +2 -2
  56. package/skills/configure-pi-sync/references/configuration.md +10 -8
  57. package/src/ui/ignore-file-ui.ts +13 -5
  58. package/src/ui/manager-state.ts +15 -8
  59. package/src/ui/manager-ui.ts +1 -1
  60. package/src/ui/remote-selection-ui.ts +43 -2
  61. package/src/ui/settings-ui.ts +30 -30
  62. package/dist/chunks/chunk-MANNB4WZ.ts.map +0 -7
  63. package/dist/chunks/chunk-OBVJTKVY.ts.map +0 -7
  64. package/dist/chunks/chunk-OWEOZZZE.ts.map +0 -7
  65. package/dist/chunks/manager-ui-RGA26Z6G.ts.map +0 -7
  66. /package/dist/chunks/{chunk-IOM6E5FW.ts.map → chunk-BESRBKVO.ts.map} +0 -0
  67. /package/dist/chunks/{chunk-TZMVSTAM.ts.map → chunk-BYVHABNR.ts.map} +0 -0
  68. /package/dist/chunks/{file-selection-DDQN4LVD.ts.map → file-selection-XWACUTAH.ts.map} +0 -0
  69. /package/dist/chunks/{manager-result-dispatcher-XB75YLEG.ts.map → ignore-file-ui-OHFISFVC.ts.map} +0 -0
  70. /package/dist/chunks/{remote-selection-ui-WVMET5RI.ts.map → manager-result-dispatcher-WXE2BAQO.ts.map} +0 -0
@@ -2,20 +2,20 @@
2
2
  // @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
3
3
  import {
4
4
  showDirectoryScope
5
- } from "./chunk-TZMVSTAM.ts";
5
+ } from "./chunk-BYVHABNR.ts";
6
+ import {
7
+ manualIgnoreFileGuidance
8
+ } from "./chunk-EJDDRS6O.ts";
6
9
  import "./chunk-JREGWM2B.ts";
10
+ import {
11
+ localConfigPath
12
+ } from "./chunk-IBXEM35O.ts";
7
13
  import {
8
14
  updateSyncSetup
9
15
  } from "./chunk-NXWHPVXR.ts";
10
16
  import {
11
17
  captureMutationOwner
12
18
  } from "./chunk-GELYN4UC.ts";
13
- import {
14
- manualIgnoreFileGuidance
15
- } from "./chunk-EJDDRS6O.ts";
16
- import {
17
- localConfigPath
18
- } from "./chunk-IBXEM35O.ts";
19
19
  import {
20
20
  agentDir
21
21
  } from "./chunk-P4GI7LTT.ts";
@@ -300,4 +300,4 @@ function safeTerminalText(value) {
300
300
  export {
301
301
  showFileSelection
302
302
  };
303
- //# sourceMappingURL=file-selection-DDQN4LVD.ts.map
303
+ //# sourceMappingURL=file-selection-XWACUTAH.ts.map
@@ -0,0 +1,21 @@
1
+ // @generated by scripts/build-runtime.mjs; do not edit.
2
+ // @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
3
+ import {
4
+ ignoreFileSettingsAvailable,
5
+ portableIgnoreRulesAvailable,
6
+ showIgnoreFileAction
7
+ } from "./chunk-Z5JMOXJM.ts";
8
+ import "./chunk-KNEUL4XN.ts";
9
+ import "./chunk-AYGMIMCV.ts";
10
+ import "./chunk-GELYN4UC.ts";
11
+ import "./chunk-JQ5BAWW2.ts";
12
+ import "./chunk-H7VOTY5N.ts";
13
+ import "./chunk-6YKOHBSC.ts";
14
+ import "./chunk-R3SAMXB6.ts";
15
+ import "./chunk-2JNFEZ3V.ts";
16
+ export {
17
+ ignoreFileSettingsAvailable,
18
+ portableIgnoreRulesAvailable,
19
+ showIgnoreFileAction
20
+ };
21
+ //# sourceMappingURL=ignore-file-ui-OHFISFVC.ts.map
@@ -2,8 +2,8 @@
2
2
  // @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
3
3
  import {
4
4
  dispatchManagerResult
5
- } from "./chunk-IOM6E5FW.ts";
6
- import "./chunk-OWEOZZZE.ts";
5
+ } from "./chunk-BESRBKVO.ts";
6
+ import "./chunk-5YOLQKNZ.ts";
7
7
  import "./chunk-UMPA5S7X.ts";
8
8
  import "./chunk-AYGMIMCV.ts";
9
9
  import "./chunk-NXWHPVXR.ts";
@@ -17,4 +17,4 @@ import "./chunk-2JNFEZ3V.ts";
17
17
  export {
18
18
  dispatchManagerResult
19
19
  };
20
- //# sourceMappingURL=manager-result-dispatcher-XB75YLEG.ts.map
20
+ //# sourceMappingURL=manager-result-dispatcher-WXE2BAQO.ts.map
@@ -4,7 +4,6 @@ import {
4
4
  applyS3CredentialUpdate,
5
5
  chooseS3CredentialUpdate,
6
6
  chooseS3Credentials,
7
- ignoreFileSettingsAvailable,
8
7
  promptResourceName,
9
8
  refreshTargetCompletions,
10
9
  requiredInput,
@@ -18,13 +17,20 @@ import {
18
17
  showEditGitTarget,
19
18
  showEditS3Target,
20
19
  showEditWebDavStorageProfile,
21
- showEditWebDavTarget,
20
+ showEditWebDavTarget
21
+ } from "./chunk-ASU3GZPW.ts";
22
+ import {
23
+ automaticSyncSummary
24
+ } from "./chunk-ECYCNZOE.ts";
25
+ import {
26
+ ignoreFileSettingsAvailable,
22
27
  showIgnoreFileAction
23
- } from "./chunk-OBVJTKVY.ts";
28
+ } from "./chunk-Z5JMOXJM.ts";
29
+ import "./chunk-KNEUL4XN.ts";
24
30
  import {
25
31
  dispatchManagerResult
26
- } from "./chunk-IOM6E5FW.ts";
27
- import "./chunk-OWEOZZZE.ts";
32
+ } from "./chunk-BESRBKVO.ts";
33
+ import "./chunk-5YOLQKNZ.ts";
28
34
  import {
29
35
  SETUP_SWITCH_ACTION_OPTIONS,
30
36
  saveOnSwitch,
@@ -38,9 +44,6 @@ import {
38
44
  ownRecord,
39
45
  validateSettingsDocument
40
46
  } from "./chunk-APZVJAEW.ts";
41
- import {
42
- automaticSyncSummary
43
- } from "./chunk-MANNB4WZ.ts";
44
47
  import {
45
48
  loadOnSwitch,
46
49
  readLocalConfigObject,
@@ -74,11 +77,19 @@ import {
74
77
  import {
75
78
  directoryScopeSummary,
76
79
  showExcludedPaths
77
- } from "./chunk-TZMVSTAM.ts";
80
+ } from "./chunk-BYVHABNR.ts";
81
+ import {
82
+ manualIgnoreFileGuidance
83
+ } from "./chunk-EJDDRS6O.ts";
78
84
  import {
79
85
  directorySessionOptInLine,
80
86
  saveReviewedDraft
81
87
  } from "./chunk-JREGWM2B.ts";
88
+ import {
89
+ localConfigPath,
90
+ readActiveLocalConfigDocumentForRepair,
91
+ syncErrorGuidance
92
+ } from "./chunk-IBXEM35O.ts";
82
93
  import {
83
94
  addStorageConnection,
84
95
  removeStorageConnection,
@@ -89,14 +100,6 @@ import {
89
100
  import {
90
101
  captureMutationOwner
91
102
  } from "./chunk-GELYN4UC.ts";
92
- import {
93
- manualIgnoreFileGuidance
94
- } from "./chunk-EJDDRS6O.ts";
95
- import {
96
- localConfigPath,
97
- readActiveLocalConfigDocumentForRepair,
98
- syncErrorGuidance
99
- } from "./chunk-IBXEM35O.ts";
100
103
  import {
101
104
  sameSyncExclude
102
105
  } from "./chunk-ZO52JM4H.ts";
@@ -221,7 +224,7 @@ function blockedSyncMenuItem(label, manager) {
221
224
  };
222
225
  }
223
226
  async function showManagerAttention(ctx, attention, runRoute, signal, onSelectionResolved) {
224
- const { showRemoteSelectionReview } = await import("./remote-selection-ui-WVMET5RI.ts");
227
+ const { showRemoteSelectionReview } = await import("./remote-selection-ui-E4XZCQ7A.ts");
225
228
  if (signal?.aborted) return "close";
226
229
  const review = await showRemoteSelectionReview(ctx, attention.decision.setupName, signal, void 0, {
227
230
  decision: attention.decision,
@@ -634,11 +637,14 @@ async function describeManagerState(signal, attention, inspectOperation = inspec
634
637
  "Manage sync",
635
638
  `Current sync setup: ${safeTerminalText(config.setupName)}`,
636
639
  `Storage: ${backendStorageDescription(config)}`,
637
- ...config.pathPolicy === "ignore-file" ? [`Sync scope: Pi agent directory \xB7 ignore file: ${safeTerminalText(config.ignoreFile ?? ".syncignore")}`] : config.scope ? ["Sync scope: Pi agent directory, with exclusions"] : [],
640
+ ...config.pathPolicy === "ignore-file" ? [
641
+ `Sync scope: Pi agent directory \xB7 ignore file: ${safeTerminalText(config.ignoreFile ?? ".syncignore")}`,
642
+ ...config.ignorePolicy?.matches(config.ignorePolicy.filename) === false ? ["New snapshots include this rule file and its comments in remote history."] : []
643
+ ] : config.scope ? ["Sync scope: Pi agent directory, with exclusions"] : [],
638
644
  ...syncState?.unresolved?.length ? [`Unresolved: ${syncState.unresolved.length} dependency groups \xB7 review needed`] : [],
639
645
  ...currentAttention ? [
640
646
  currentAttention.decision.setupName === config.setupName ? "Sync status: Review needed" : `Sync status: Review needed for setup ${safeTerminalText(currentAttention.decision.setupName)}`,
641
- attentionDirectoryPolicy ? "Sync scopes or directory rules differ." : 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." : ""}`
647
+ currentAttention.decision.ignorePolicyComparison ? "Ignore-file policies differ." : attentionDirectoryPolicy ? "Sync scopes or directory rules differ." : 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." : ""}`
642
648
  ] : currentObservation ? [`Observed ${safeTerminalText(currentObservation.checkedAt)}: ${observationSummary(currentObservation)}`] : ["Remote status: Not checked"],
643
649
  `Last applied: ${lastAppliedSnapshot}`,
644
650
  ...config.agentMode ? ["Auto-apply: On \xB7 AI requests may incur costs"] : config.automaticTransfer || config.automatic && syncSessionsSelected(config) ? ["Automatic transfer permission: On \xB7 see Settings"] : [],
@@ -1547,7 +1553,6 @@ async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
1547
1553
  const ignoreAvailable = await ignoreFileSettingsAvailable(ctx, signal);
1548
1554
  if (!isCurrent()) return disposition;
1549
1555
  const setupName = initial.setupName;
1550
- let saveStatus = "Simple choices save immediately. Back does not undo saved changes.";
1551
1556
  const menu = defineMenu4({
1552
1557
  start: "settings",
1553
1558
  screens: {
@@ -1556,7 +1561,7 @@ async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
1556
1561
  title: "Pi Sync Settings",
1557
1562
  lines: [
1558
1563
  `Setup: ${safeTerminalText(state.setupName)} \xB7 Connection: ${safeTerminalText(state.connectionName)}`,
1559
- ...state.reservedIgnoreNames !== void 0 && !ignoreAvailable ? ["Setup preferences are read-only; adding, editing, and switching setups are unavailable."] : [saveStatus],
1564
+ ...state.reservedIgnoreNames !== void 0 && !ignoreAvailable ? ["Setup preferences are read-only; adding, editing, and switching setups are unavailable."] : ["Back does not undo saved changes."],
1560
1565
  ...state.pathPolicy === "ignore-file" ? [manualIgnoreFileGuidance(state.ignoreFile ?? ".syncignore")] : []
1561
1566
  ],
1562
1567
  items: [
@@ -1758,7 +1763,7 @@ async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
1758
1763
  const partialSync = value === "Partial only" || value === "Merge + partial";
1759
1764
  if (!await ctx.ui.confirm(
1760
1765
  "Save content policy?",
1761
- `${previous.pathPolicy === "ignore-file" ? "Ignore-file policy keeps settings version 8 and snapshot version 6; older clients must refuse them." : previous.scope === "agent-directory" ? "Agent directory scope uses snapshot version 5; older clients must refuse it." : "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.`,
1766
+ `${previous.pathPolicy === "ignore-file" ? "Ignore-file policy keeps settings version 8 and publishes snapshot version 7; upgrade older clients first." : previous.scope === "agent-directory" ? "Agent directory scope uses snapshot version 5; older clients must refuse it." : "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.`,
1762
1767
  { signal: mutationSignal }
1763
1768
  ))
1764
1769
  return { kind: "rejected" };
@@ -1779,8 +1784,10 @@ async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
1779
1784
  };
1780
1785
  }, mutationSignal);
1781
1786
  validate();
1782
- saveStatus = "Saved reviewed policy for this setup. Applies to subsequent sync operations; recovery evidence is retained.";
1783
- ctx.ui.notify(saveStatus, "info");
1787
+ ctx.ui.notify(
1788
+ "Saved reviewed policy for this setup. Applies to subsequent sync operations; recovery evidence is retained.",
1789
+ "info"
1790
+ );
1784
1791
  return { kind: "stay" };
1785
1792
  } catch (error) {
1786
1793
  if (!mutationSignal.aborted) notifySaveFailure(ctx, error);
@@ -1826,7 +1833,7 @@ async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
1826
1833
  if (sameLocalFields(previous.localFields, fields)) return { kind: "stay" };
1827
1834
  const confirmed = await ctx.ui.confirm(
1828
1835
  "Save portable field policy?",
1829
- `${previous.pathPolicy === "ignore-file" ? "Ignore-file policy keeps settings version 8 and snapshot version 6." : previous.scope === "agent-directory" ? "Agent directory scope uses snapshot version 5." : "This opts into at least settings/snapshot version 4/2; exclude-enabled setups retain snapshot version 4."} Older clients must refuse unsupported formats. 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.`,
1836
+ `${previous.pathPolicy === "ignore-file" ? "Ignore-file policy keeps settings version 8 and publishes snapshot version 7." : previous.scope === "agent-directory" ? "Agent directory scope uses snapshot version 5." : "This opts into at least settings/snapshot version 4/2; exclude-enabled setups retain snapshot version 4."} Older clients must refuse unsupported formats. 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.`,
1830
1837
  { signal: mutationSignal }
1831
1838
  );
1832
1839
  validate();
@@ -1847,8 +1854,10 @@ async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
1847
1854
  };
1848
1855
  }, mutationSignal);
1849
1856
  validate();
1850
- saveStatus = "Saved reviewed policy for this setup. Applies to subsequent sync operations; recovery evidence is retained.";
1851
- ctx.ui.notify(saveStatus, "info");
1857
+ ctx.ui.notify(
1858
+ "Saved reviewed policy for this setup. Applies to subsequent sync operations; recovery evidence is retained.",
1859
+ "info"
1860
+ );
1852
1861
  return { kind: "stay" };
1853
1862
  } catch (error) {
1854
1863
  if (!mutationSignal.aborted) notifySaveFailure(ctx, error);
@@ -1866,10 +1875,6 @@ async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
1866
1875
  signal: mutationSignal
1867
1876
  });
1868
1877
  if (mutationSignal.aborted) return { kind: "rejected" };
1869
- ctx.ui.notify(
1870
- `Automatic sync ${automatic ? "enabled" : "disabled"} for \u201C${safeTerminalText(setupName)}\u201D.`,
1871
- "info"
1872
- );
1873
1878
  return { kind: "stay" };
1874
1879
  } catch (error) {
1875
1880
  if (!mutationSignal.aborted) notifySaveFailure(ctx, error);
@@ -1934,10 +1939,6 @@ async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
1934
1939
  signal: mutationSignal
1935
1940
  });
1936
1941
  if (mutationSignal.aborted) return { kind: "rejected" };
1937
- ctx.ui.notify(
1938
- `Automatic startup transfer ${automaticTransfer ? "enabled for the next session start" : "disabled"}. Completed transfers are not undone.`,
1939
- "info"
1940
- );
1941
1942
  return { kind: "stay" };
1942
1943
  } catch (error) {
1943
1944
  if (!mutationSignal.aborted) notifySaveFailure(ctx, error);
@@ -1953,7 +1954,6 @@ async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
1953
1954
  if (latest.skipSecretScan === skipSecretScan) return { kind: "stay" };
1954
1955
  await updateLocalConfig((settings) => ({ ...settings, skipSecretScan }), mutationSignal);
1955
1956
  if (mutationSignal.aborted) return { kind: "rejected" };
1956
- ctx.ui.notify(`Secret scan ${skipSecretScan ? "disabled" : "enabled"} for pushes in all setups.`, "info");
1957
1957
  return { kind: "stay" };
1958
1958
  } catch (error) {
1959
1959
  if (!mutationSignal.aborted) notifySaveFailure(ctx, error);
@@ -1970,7 +1970,6 @@ async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
1970
1970
  await updateLocalConfig((settings) => ({ ...settings, showStatus }), mutationSignal);
1971
1971
  if (mutationSignal.aborted) return { kind: "rejected" };
1972
1972
  configureSyncStatus(ctx, showStatus);
1973
- ctx.ui.notify(`Pi Sync status ${showStatus ? "enabled" : "disabled"} for all setups.`, "info");
1974
1973
  return { kind: "stay" };
1975
1974
  } catch (error) {
1976
1975
  if (!mutationSignal.aborted) notifySaveFailure(ctx, error);
@@ -1999,7 +1998,6 @@ async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
1999
1998
  if (latest.onSwitch === action) return { kind: "stay" };
2000
1999
  await saveOnSwitch(action, mutationSignal);
2001
2000
  if (mutationSignal.aborted) return { kind: "rejected" };
2002
- ctx.ui.notify(`After switching setup: ${value}.`, "info");
2003
2001
  return { kind: "stay" };
2004
2002
  } catch (error) {
2005
2003
  if (!mutationSignal.aborted) notifySaveFailure(ctx, error);
@@ -2048,7 +2046,7 @@ async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
2048
2046
  "remote-include": async ({ state, signal: actionSignal }) => {
2049
2047
  if (state.reservedIgnoreNames !== void 0 && !ignoreAvailable) return { kind: "rejected" };
2050
2048
  const reviewSignal = signal ? AbortSignal.any([signal, actionSignal]) : actionSignal;
2051
- const { showRemoteSelectionReview } = await import("./remote-selection-ui-WVMET5RI.ts");
2049
+ const { showRemoteSelectionReview } = await import("./remote-selection-ui-E4XZCQ7A.ts");
2052
2050
  if (reviewSignal.aborted) return { kind: "rejected" };
2053
2051
  const review = await showRemoteSelectionReview(ctx, setupName, reviewSignal, void 0, {
2054
2052
  origin: "settings",
@@ -2080,8 +2078,22 @@ async function showSyncSettings(ctx, runRoute, signal, reviewedSetup) {
2080
2078
  const result = await save(action);
2081
2079
  if (action.signal.aborted || signal?.aborted) return { kind: "rejected" };
2082
2080
  validate();
2083
- saveStatus = result?.kind === "rejected" ? "Save failed or rejected. Previous value retained; retry is available." : id === "automatic-transfer" || id === "automatic" || id === "debug" ? action.state.reservedIgnoreNames !== void 0 ? "Saved. Review automatic transfers separately before enabling automatic work for this policy." : "Saved. Enabling startup work applies next session start; completed transfers are not undone." : "Saved. Applies to subsequent operations; status visibility applies immediately.";
2084
- ctx.ui.notify(saveStatus, result?.kind === "rejected" ? "warning" : "info");
2081
+ if (result?.kind === "stay") {
2082
+ const { value, state } = action;
2083
+ const enabled = value === "On";
2084
+ const setup = safeTerminalText(setupName);
2085
+ const approval = enabled && state.reservedIgnoreNames !== void 0 ? " Use Review automatic transfers to approve this policy separately." : "";
2086
+ const message = {
2087
+ automatic: `Automatic sync for \u201C${setup}\u201D: ${value}.${enabled ? " New startup checks begin next session." : ""}${approval}`,
2088
+ "automatic-transfer": `Startup transfer for \u201C${setup}\u201D: ${value}.${enabled ? " Applies at the next session start." : ""}${approval}`,
2089
+ "merge-settings": `Merge settings fields for \u201C${setup}\u201D: ${value}. Applies to subsequent sync operations.`,
2090
+ "skip-secret-scan": `Secret scan ${enabled ? "disabled" : "enabled"} for subsequent pushes in all setups.`,
2091
+ "show-status": `Show sync status: ${value}. Applies immediately to all setups.`,
2092
+ debug: `Debug mode: ${value}. Pi applies it at the next session start.`,
2093
+ "on-switch": `On setup switch: ${value}.${state.reservedIgnoreNames !== void 0 ? " Switching still won't pull while any setup uses an ignore file." : ""}`
2094
+ }[id];
2095
+ ctx.ui.notify(`Saved. ${message}`, "info");
2096
+ }
2085
2097
  return result;
2086
2098
  };
2087
2099
  }
@@ -2204,7 +2216,7 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
2204
2216
  if (!attention) {
2205
2217
  const observation = state.manager.observation;
2206
2218
  if (!observation) return { kind: "stay" };
2207
- const { showRemoteSelectionReview } = await import("./remote-selection-ui-WVMET5RI.ts");
2219
+ const { showRemoteSelectionReview } = await import("./remote-selection-ui-E4XZCQ7A.ts");
2208
2220
  if (sessionSignal?.aborted) return { kind: "close" };
2209
2221
  const config = await loadConfig();
2210
2222
  if (sessionSignal?.aborted) return { kind: "close" };
@@ -2520,7 +2532,7 @@ function syncMainMenuItem(label) {
2520
2532
  push: "This device \u2192 remote; replaces conflicting remote files.",
2521
2533
  diff: "Inspect changes; no transfer.",
2522
2534
  status: "Check remote; no transfer.",
2523
- settings: "Change sync settings.",
2535
+ settings: "Edit settings, setups, and storage connections.",
2524
2536
  history: "Review snapshots and rollback.",
2525
2537
  doctor: "Review backend diagnostics.",
2526
2538
  switch: "Choose another sync setup.",
@@ -2538,4 +2550,4 @@ function syncMainMenuItem(label) {
2538
2550
  export {
2539
2551
  showSyncManager
2540
2552
  };
2541
- //# sourceMappingURL=manager-ui-RGA26Z6G.ts.map
2553
+ //# sourceMappingURL=manager-ui-CVZLMXJ5.ts.map