@narumitw/pi-sync 0.63.0 → 0.64.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 (135) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +28 -18
  3. package/dist/chunks/{chunk-HLCML3OW.ts → chunk-4VKWHVUO.ts} +4 -3
  4. package/dist/chunks/chunk-4VKWHVUO.ts.map +7 -0
  5. package/dist/chunks/{chunk-27F5W7DX.ts → chunk-DAZZ5BEJ.ts} +3 -1
  6. package/dist/chunks/chunk-DAZZ5BEJ.ts.map +7 -0
  7. package/dist/chunks/{chunk-V76KCWHO.ts → chunk-F3VODLVQ.ts} +3 -3
  8. package/dist/chunks/{chunk-VQ47JBLF.ts → chunk-FI2F5JBS.ts} +2 -2
  9. package/dist/chunks/{chunk-S6FUUWV5.ts → chunk-NDEZ52SS.ts} +13 -13
  10. package/dist/chunks/{chunk-S6FUUWV5.ts.map → chunk-NDEZ52SS.ts.map} +1 -1
  11. package/dist/chunks/{chunk-UGS6RYDZ.ts → chunk-RW44KNFD.ts} +304 -70
  12. package/dist/chunks/chunk-RW44KNFD.ts.map +7 -0
  13. package/dist/chunks/{chunk-EXDWEFIJ.ts → chunk-TJ7YNITN.ts} +5 -5
  14. package/dist/chunks/{chunk-HSCAFOT5.ts → chunk-TZMVSTAM.ts} +5 -5
  15. package/dist/chunks/{chunk-SXCH4Q5O.ts → chunk-VPSC7BXM.ts} +3 -3
  16. package/dist/chunks/chunk-YT6PDRMM.ts +282 -0
  17. package/dist/chunks/chunk-YT6PDRMM.ts.map +7 -0
  18. package/dist/chunks/{command-handler-VINMQ7ZM.ts → command-handler-N45GY7AV.ts} +39 -27
  19. package/dist/chunks/command-handler-N45GY7AV.ts.map +7 -0
  20. package/dist/chunks/{conflict-review-PCDFRIVB.ts → conflict-review-5E4M44BA.ts} +2 -2
  21. package/dist/chunks/{file-selection-KID23GAD.ts → file-selection-DDQN4LVD.ts} +9 -9
  22. package/dist/chunks/{manager-result-dispatcher-GDB74IOP.ts → manager-result-dispatcher-FKW55L7I.ts} +5 -5
  23. package/dist/chunks/{manager-ui-YHDECYKI.ts → manager-ui-EV23DPZQ.ts} +104 -77
  24. package/dist/chunks/manager-ui-EV23DPZQ.ts.map +7 -0
  25. package/dist/chunks/{merge-review-SGDLMVS4.ts → merge-review-6YSLSMGS.ts} +3 -2
  26. package/dist/chunks/ownership-recovery-UDDHSDSZ.ts +59 -0
  27. package/dist/chunks/ownership-recovery-UDDHSDSZ.ts.map +7 -0
  28. package/dist/chunks/{remote-selection-ui-GPITNEBF.ts → remote-selection-ui-N4NMWFT2.ts} +4 -4
  29. package/dist/chunks/{setup-switch-L54X5U5I.ts → setup-switch-HY7K3442.ts} +4 -4
  30. package/dist/chunks/{setup-wizard-YO4MCPUF.ts → setup-wizard-LEKDQ3HK.ts} +9 -9
  31. package/dist/chunks/{sync-inspection-H2WX5SUT.ts → sync-inspection-OS2LVOLV.ts} +5 -5
  32. package/dist/chunks/{sync-operations-2MZAYHL2.ts → sync-operations-D3MDJUQQ.ts} +2 -2
  33. package/dist/daemon/dist/cli.js +2 -0
  34. package/dist/daemon/dist/client-transport.js +66 -0
  35. package/dist/daemon/dist/client.js +116 -86
  36. package/dist/daemon/dist/consent.js +33 -11
  37. package/dist/daemon/dist/daemon-debug.js +33 -0
  38. package/dist/daemon/dist/daemon-recovery.js +75 -0
  39. package/dist/daemon/dist/engine/backends/git/git-backend.js +39 -12
  40. package/dist/daemon/dist/engine/backends/git/git-runner.js +6 -1
  41. package/dist/daemon/dist/engine/backends/git/git-storage.js +5 -9
  42. package/dist/daemon/dist/engine/backends/publication-encoding.js +19 -0
  43. package/dist/daemon/dist/engine/backends/s3/s3-backend.js +10 -12
  44. package/dist/daemon/dist/engine/backends/webdav/webdav-backend.js +15 -26
  45. package/dist/daemon/dist/engine/backends/webdav/webdav-client.js +10 -0
  46. package/dist/daemon/dist/engine/debug-log.js +134 -0
  47. package/dist/daemon/dist/engine/ignore/ignore-initialization.js +50 -14
  48. package/dist/daemon/dist/engine/ignore/ignore-settings.js +11 -14
  49. package/dist/daemon/dist/engine/ignore/ignore-source.js +1 -1
  50. package/dist/daemon/dist/engine/paths.js +7 -1
  51. package/dist/daemon/dist/engine/settings/config-file.js +62 -17
  52. package/dist/daemon/dist/engine/settings/config.js +49 -14
  53. package/dist/daemon/dist/engine/snapshot/snapshot-apply.js +30 -8
  54. package/dist/daemon/dist/engine/snapshot/snapshot-codec.js +3 -1
  55. package/dist/daemon/dist/engine/snapshot/snapshot-payload.js +32 -0
  56. package/dist/daemon/dist/engine/snapshot/snapshot-transaction-images.js +34 -0
  57. package/dist/daemon/dist/engine/snapshot/snapshot-transaction.js +50 -7
  58. package/dist/daemon/dist/engine/snapshot/snapshot.js +64 -25
  59. package/dist/daemon/dist/engine/state/lock.js +157 -17
  60. package/dist/daemon/dist/engine/sync/continuous-sync.js +35 -11
  61. package/dist/daemon/dist/engine/sync/initialization.js +2 -2
  62. package/dist/daemon/dist/engine/sync/local-fields.js +42 -19
  63. package/dist/daemon/dist/engine/sync/merged-sync.js +13 -10
  64. package/dist/daemon/dist/engine/sync/remote-snapshot.js +18 -3
  65. package/dist/daemon/dist/engine/sync/session-push.js +13 -4
  66. package/dist/daemon/dist/engine/sync/startup-bootstrap.js +105 -0
  67. package/dist/daemon/dist/engine/sync/startup-recovery-evidence.js +37 -0
  68. package/dist/daemon/dist/engine/sync/startup-timings.js +80 -8
  69. package/dist/daemon/dist/engine/sync/sync-error-guidance.js +22 -4
  70. package/dist/daemon/dist/engine/sync/sync-inspection.js +4 -7
  71. package/dist/daemon/dist/engine/sync/sync-local.js +3 -1
  72. package/dist/daemon/dist/engine/sync/sync-mutations.js +13 -7
  73. package/dist/daemon/dist/engine/sync/sync-policy.js +9 -1
  74. package/dist/daemon/dist/engine/sync/sync-state.js +12 -4
  75. package/dist/daemon/dist/engine/ui/sync-format.js +23 -55
  76. package/dist/daemon/dist/engine/ui/transfer-review.js +3 -3
  77. package/dist/daemon/dist/engine-service.js +54 -10
  78. package/dist/daemon/dist/identity.js +36 -6
  79. package/dist/daemon/dist/index.js +2 -1
  80. package/dist/daemon/dist/monitor.js +20 -1
  81. package/dist/daemon/dist/paged-review.js +177 -0
  82. package/dist/daemon/dist/participant-ledger.js +149 -0
  83. package/dist/daemon/dist/protocol.js +4 -0
  84. package/dist/daemon/dist/server.js +268 -120
  85. package/dist/daemon/dist/service-host.js +29 -9
  86. package/dist/daemon/dist/state-wait-jobs.js +23 -0
  87. package/dist/daemon/dist/state-wait.js +34 -0
  88. package/dist/daemon/package.json +1 -1
  89. package/dist/index.ts +128 -48
  90. package/dist/index.ts.map +2 -2
  91. package/docs/continuous-sync-verification.md +2 -0
  92. package/docs/daemon-migration.md +30 -2
  93. package/docs/tui-contract.md +8 -2
  94. package/package.json +2 -2
  95. package/skills/configure-pi-sync/SKILL.md +119 -18
  96. package/skills/configure-pi-sync/references/configuration.md +88 -48
  97. package/src/commands/command-execution.ts +11 -3
  98. package/src/commands/command-handler.ts +10 -3
  99. package/src/commands/command.ts +3 -2
  100. package/src/daemon/client-debug.ts +45 -0
  101. package/src/daemon/ownership-recovery.ts +50 -0
  102. package/src/daemon/pi-client.ts +288 -63
  103. package/src/daemon/startup-bootstrap-client.ts +26 -0
  104. package/src/settings/config.ts +1 -0
  105. package/src/sync/automatic-sync.ts +61 -18
  106. package/src/sync/startup-check.ts +13 -5
  107. package/src/sync-extension.ts +46 -8
  108. package/src/ui/manager-state.ts +35 -24
  109. package/src/ui/manager-ui.ts +39 -18
  110. package/src/ui/merge-review.ts +75 -12
  111. package/src/ui/settings-ui.ts +2 -2
  112. package/src/ui/setup/webdav-ui.ts +1 -1
  113. package/src/ui/sync-confirmation.ts +81 -65
  114. package/src/ui/sync-setups-ui.ts +15 -12
  115. package/dist/chunks/chunk-27F5W7DX.ts.map +0 -7
  116. package/dist/chunks/chunk-GSQGBVKG.ts +0 -218
  117. package/dist/chunks/chunk-GSQGBVKG.ts.map +0 -7
  118. package/dist/chunks/chunk-HLCML3OW.ts.map +0 -7
  119. package/dist/chunks/chunk-UGS6RYDZ.ts.map +0 -7
  120. package/dist/chunks/command-handler-VINMQ7ZM.ts.map +0 -7
  121. package/dist/chunks/manager-ui-YHDECYKI.ts.map +0 -7
  122. /package/dist/chunks/{chunk-V76KCWHO.ts.map → chunk-F3VODLVQ.ts.map} +0 -0
  123. /package/dist/chunks/{chunk-VQ47JBLF.ts.map → chunk-FI2F5JBS.ts.map} +0 -0
  124. /package/dist/chunks/{chunk-EXDWEFIJ.ts.map → chunk-TJ7YNITN.ts.map} +0 -0
  125. /package/dist/chunks/{chunk-HSCAFOT5.ts.map → chunk-TZMVSTAM.ts.map} +0 -0
  126. /package/dist/chunks/{chunk-SXCH4Q5O.ts.map → chunk-VPSC7BXM.ts.map} +0 -0
  127. /package/dist/chunks/{conflict-review-PCDFRIVB.ts.map → conflict-review-5E4M44BA.ts.map} +0 -0
  128. /package/dist/chunks/{file-selection-KID23GAD.ts.map → file-selection-DDQN4LVD.ts.map} +0 -0
  129. /package/dist/chunks/{manager-result-dispatcher-GDB74IOP.ts.map → manager-result-dispatcher-FKW55L7I.ts.map} +0 -0
  130. /package/dist/chunks/{merge-review-SGDLMVS4.ts.map → merge-review-6YSLSMGS.ts.map} +0 -0
  131. /package/dist/chunks/{remote-selection-ui-GPITNEBF.ts.map → remote-selection-ui-N4NMWFT2.ts.map} +0 -0
  132. /package/dist/chunks/{setup-switch-L54X5U5I.ts.map → setup-switch-HY7K3442.ts.map} +0 -0
  133. /package/dist/chunks/{setup-wizard-YO4MCPUF.ts.map → setup-wizard-LEKDQ3HK.ts.map} +0 -0
  134. /package/dist/chunks/{sync-inspection-H2WX5SUT.ts.map → sync-inspection-OS2LVOLV.ts.map} +0 -0
  135. /package/dist/chunks/{sync-operations-2MZAYHL2.ts.map → sync-operations-D3MDJUQQ.ts.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @narumitw/pi-sync
2
2
 
3
+ ## 0.64.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 316dde1: Rename **Debug startup timings** to **Debug mode** and keep the same default-off setting. Append safe startup, connection, and request diagnostics to the private, local-only `pi-sync.log` shared with the daemon. Client changes take effect at the next session start; existing TUI timing entries and RPC notifications stay unchanged.
8
+
9
+ ### Patch Changes
10
+
11
+ - 6224417: Recover a blocked daemon from the Pi Sync menu or `/sync daemon recover`. Stop the reviewed owner without restarting it or replaying a transfer, and clean up the owned operation lock when a release failure blocks further writes.
12
+ - bbcc9e9: Reduce sync work without changing transfer approvals or recovery formats. Pull and rollback avoid reinstalling identical files, inspection avoids building unused payloads, and local requests wait for state changes instead of repeatedly polling jobs. Reduce repeated setup reads, review downloads, and backend work while preserving fresh checks and existing peer compatibility.
13
+
14
+ ## 0.63.1
15
+
16
+ ### Patch Changes
17
+
18
+ - fc5228d: Make the configuration skill verify the active ignore file with the existing local daemon before editing it. Stop on older daemon builds, and leave settings changes that require consent or policy review in `/sync`.
19
+ - 9d382d1: Show the active setup in the sync menu heading and include the configured path in R2/S3 and Git storage summaries.
20
+ - fc80c0c: Keep directional confirmation summaries short when a running older daemon still sends the full file list as the summary. Exact paths remain available in View details.
21
+ - f1dc5d2: Add guidelines and local verification workflows to `/skill:configure-pi-sync` for drafting, editing, and auditing `.syncignore` rules. Keep file creation, activation, and transfer approval in the user-reviewed Pi Sync flows.
22
+ - eb17fcc: Explain how to reduce sync scope when the agent-directory scan exceeds its limit. Replace outdated Check setup directions with current Diagnostics and storage settings paths.
23
+ - 26f8c59: Let `/skill:configure-pi-sync` apply requested local edits to `pi-sync.json` and the active ignore file, and investigate sync errors before suggesting changes. Keep transfers and other reviewed operations in `/sync`.
24
+ - aa99878: Let Up and Down select sync confirmation actions immediately. Show directional counts and safety notes in the summary, with exact file paths available in View details instead of requiring a scroll through the entire file list.
25
+ - 8e32b4b: Exclude top-level `git/` package checkouts in new `.syncignore` starter files and list the starter rules in alphabetical order. Preserve existing rule files and recover interrupted creation with its original rules.
26
+
3
27
  ## 0.63.0
4
28
 
5
29
  ### Minor Changes
package/README.md CHANGED
@@ -74,11 +74,11 @@ WebDAV and R2/S3 store `latest.json`, `history.json`, and `snapshots/` directly
74
74
 
75
75
  ## 🧭 Manager, conflicts, and recovery
76
76
 
77
- The `/sync` manager opens a searchable action palette in TUI mode, with up to five visible choices and help for only the selected action. Its compact summary uses local state without contacting remote storage:
77
+ The `/sync` manager opens a searchable action palette in TUI mode, with up to five visible choices and help for only the selected action. The heading identifies the active setup without relying on the summary, which can be hidden in a short terminal. The summary uses local state without contacting remote storage and shows the configured storage path:
78
78
 
79
79
  ```text
80
- Current sync setup: home
81
- Storage: Cloudflare R2 · r2 · personal-pi
80
+ Manage sync · home
81
+ Storage: Cloudflare R2 · r2 · personal-pi · pi-sync/home
82
82
  Remote status: Not checked
83
83
  Last applied: Never synced
84
84
  ```
@@ -100,11 +100,11 @@ Destructive, credential-bearing, and externally visible operations show exact pr
100
100
 
101
101
  ### Review transfer changes
102
102
 
103
- Unless Autonomous sync or another explicit transfer authorization applies, a merged **Sync now** transfer shows one confirmation with separate local and remote file changes, remote snapshot publication, session inclusion, and unresolved groups. **No, cancel** is initially selected in TUI mode. On short or narrow terminals, the configured navigation keys first scroll the summary. **Yes** can apply changes only after every summary row has been displayed. A terminal resize resets the review and selects **No**. Cancellation remains available throughout. This scrollable summary intentionally replaces Kit's clipped choice context, and the safe default differs from Pi's native Yes-first confirmation.
103
+ Unless Autonomous sync or another explicit transfer authorization applies, a merged **Sync now** transfer shows one confirmation with separate local and remote file changes, remote snapshot publication, session inclusion, and unresolved groups. **No, cancel** is initially selected in TUI mode. Up and Down select actions without scrolling the summary. If the summary does not fit, use Page Up and Page Down (or their configured selection-page bindings) to review it before confirming **Yes**. A terminal resize resets the review and selects **No**. Cancellation remains available throughout. This scrollable summary intentionally replaces Kit's clipped choice context, and the safe default differs from Pi's native Yes-first confirmation.
104
104
 
105
105
  **View details** is optional. It shows the complete add/update/delete lists and unresolved paths in an exact scrolling review, or bounded pages in RPC. The review cannot apply changes. Back or Escape returns to confirmation with **No** selected; Ctrl+C cancels the whole TUI flow. RPC offers No first but the client controls visual selection, and protocol cancellation from details returns to confirmation. Session replacement or shutdown closes the flow; local files and remote state are rechecked before transfer.
106
106
 
107
- Unresolved paths stay unchanged on each side. A backup and recovery journal protect the transfer; resources do not reload automatically. Remote snapshot publication is shown separately because it can occur without file-content changes. File lists on the main screen are shortened when needed; details retain every path. `--yes` does not bypass a required policy-transition review. Automatic transfers require their own authorization and a compatible policy. Interactive TUI Push and Pull use the same safe-default scrollable confirmation with exact directional add/update/remove counts and paths. Loaded sessions are excluded from local change counts. Pull and rollback also list case-variant path cleanup; changed aliases invalidate approval. Push describes changes to the active immutable snapshot, not physical deletion of retained history. RPC and History rollback keep their existing confirmation protocols, with the complete directional summary. Local bytes, settings, baseline, and remote head are rechecked before applying a reviewed transfer.
107
+ Unresolved paths stay unchanged on each side. A backup and recovery journal protect the transfer; resources do not reload automatically. Remote snapshot publication is shown separately because it can occur without file-content changes. File lists on the main screen are shortened when needed; details retain every path. `--yes` does not bypass a required policy-transition review. Automatic transfers require their own authorization and a compatible policy. Interactive TUI Push and Pull show directional add/update/remove counts and safety notes in the summary. Individual file paths are in **View details**, so a large file list does not delay confirmation. Loaded sessions are excluded from local change counts. Pull and rollback also list case-variant path cleanup; changed aliases invalidate approval. Push describes changes to the active immutable snapshot, not physical deletion of retained history. RPC and History rollback keep their existing confirmation protocols, with the complete directional summary. Local bytes, settings, baseline, and remote head are rechecked before applying a reviewed transfer.
108
108
 
109
109
  ### Restore sync access
110
110
 
@@ -176,11 +176,15 @@ Missing settings stay unconfigured without creating files or locks. Legacy and i
176
176
 
177
177
  Legacy directory scope selects all eligible files, applies `exclude`, then restores matches from `reinclude`. Pi login credentials, project trust, and Pi Sync's own state stay local regardless of those rules. Folder-wide sync may include private files that the secret scan cannot identify. Review the content before transferring to a trusted destination. Existing setups keep their selected paths and are not migrated automatically. See [Agent-directory scope](./skills/configure-pi-sync/references/configuration.md#agent-directory-scope) for formats, precedence, and recovery.
178
178
 
179
- ### Debug startup timings
179
+ <a id="debug-startup-timings"></a>
180
180
 
181
- Set the top-level `"debug": true` in `pi-sync.json`, or enable **Settings → Debug startup timings**, then restart Pi or use `/reload`.
182
- The default is `false`. Timing reports remain in the TUI session transcript or arrive as RPC notifications, including the initial Continuous sync check. They do not enter model context or create a separate log file.
183
- See [Debug startup timings](./skills/configure-pi-sync/references/configuration.md#debug-startup-timings) for measured stages and limits.
181
+ ### Debug mode
182
+
183
+ Turn on **/sync → Settings → Debug mode**, or set the top-level `"debug": true` in `pi-sync.json`. The default is **Off**. Use `/reload` or start a new Pi session for the client change. The daemon uses the agent directory's setting at its next owner, job, or Continuous sync cycle boundary without a restart.
184
+
185
+ Both processes append startup timings and selected sync outcomes to the private, local-only `<getAgentDir()>/pi-sync.log` (normally `~/.pi/agent/pi-sync.log`). It uses one JSON record per line; filter by `source` (`pi-sync` or `pi-sync-daemon`). Records omit raw errors, credentials, file contents, and model data. Turning Debug mode Off does not remove the file, and nothing rotates it automatically.
186
+
187
+ Timing reports still appear in the TUI transcript or as RPC notifications without entering model context. The Pi client does not write debug records in print or JSON mode. The daemon's separate operational `lifecycle.log` is unchanged. See the [Debug mode reference](./skills/configure-pi-sync/references/configuration.md#debug-mode) for safe cleanup, older snapshots, and timing details.
184
188
 
185
189
  ### Background startup checks
186
190
 
@@ -290,11 +294,11 @@ Startup checks report included-content differences without changing anything. Tr
290
294
 
291
295
  ### Ignore-file policy
292
296
 
293
- These routes require ignore-file support in the running daemon. In TUI, eligible legacy setups can review migration the first time you open `/sync`. **Not now** keeps your existing policy and defers the prompt for that setup. To review it later, use **Settings → Migrate to ignore file…**. Check which local and remote paths enter or leave scope. Directory-wide rules can also include files created later. Use `/sync files` to check current local scope and review the transfer itself before approving it. An ignore file is not a secret scanner.
297
+ These routes require ignore-file support in the running daemon. In TUI, eligible legacy setups can review migration the first time you open `/sync`. **Not now** keeps your existing policy and defers the prompt for that setup. To review it later, use **Settings → Migrate to ignore file…**. Check which local and remote paths enter or leave scope. Directory-wide rules can also include files created later. Review the transfer itself before approving it. An ignore file is not a secret scanner.
294
298
 
295
299
  An existing valid rule file is reused as-is. After confirmation, the daemon can create a missing default `.syncignore` on Linux, macOS, and Windows without overwriting an existing file. If automatic creation is unavailable on your filesystem, follow the displayed path and starter rules: create a regular UTF-8 file there without replacing an existing file, then reopen the setup or migration review. **Settings → Ignore file** shows the current path and lets you review a switch to another existing file. Edit the file manually; there is no in-app rule save. Edits affect every setup that uses that file. Setup, migration, switching the file, and editing rules do not authorize or trigger a transfer.
296
300
 
297
- The starter excludes `/sessions/` even if you opt into session sync. To sync sessions, both opt in and adjust the rule. Pi credentials, trust, Pi Sync settings and state, and rule files stay local regardless of the rules. Excluded files stay untouched locally, including on rollback. New publications omit excluded paths; retained snapshots and backups are **not erased**.
301
+ The [starter rules](./skills/configure-pi-sync/references/configuration.md#ignore-file-policy) exclude top-level `git/` package checkouts and `/sessions/`, even if you opt into session sync. To sync sessions, both opt in and adjust the rule. Pi credentials, trust, Pi Sync settings and state, and rule files stay local regardless of the rules. Excluded files stay untouched locally, including on rollback. New publications omit excluded paths; retained snapshots and backups are **not erased**.
298
302
 
299
303
  Upgrade all peers to compatible Pi Sync clients and daemons before the first version 6 snapshot publication. The remote stores a policy fingerprint, not the filename or rules. Configure matching rules and session opt-in on each device before pulling. For an existing remote with a different policy, review an explicit direction; background sync cannot make that transition. See [Ignore-file policy and recovery](./skills/configure-pi-sync/references/configuration.md#ignore-file-policy) for starter rules, matching, and safe recovery.
300
304
 
@@ -302,14 +306,17 @@ Upgrade all peers to compatible Pi Sync clients and daemons before the first ver
302
306
 
303
307
  For selected-path setups, **Settings → Excluded paths** edits `sync.exclude` rules that win over `include`; saving opts into at least settings version 6 and snapshot version 4. For directory scope, **Settings → Agent directory scope** also edits `reinclude` and session opt-in. Excluded local files remain untouched, including on rollback. New publications omit matching remote paths, but old history is **not erased**. Removing rules can expose or replace content. See [Excluded paths](./skills/configure-pi-sync/references/configuration.md#excluded-paths) for syntax, review, and recovery.
304
308
 
309
+ ### Scan limits
310
+
311
+ If the agent-directory scan exceeds 64 MiB, use `/sync config` to find the active ignore file. Exclude large files or folders you do not need to sync, verify the rules, and reopen the transfer review. For a legacy agent-directory setup, use **Settings → Agent directory scope** to edit exclusions instead. Storage diagnostics do not change the local scan limit.
312
+
305
313
  Read the [settings reference](./skills/configure-pi-sync/references/configuration.md) for complete S3/R2, Git, and WebDAV examples, backend fields, content policy, legacy paths, and recovery steps.
306
314
 
307
315
  ## 🧠 Skills
308
316
 
309
- Run `/skill:configure-pi-sync` for configuration guidance. To request a rule edit, name the existing local file shown in **Settings → Ignore file** and the exact change. The [configuration skill](./skills/configure-pi-sync/SKILL.md) loads only on request and does not read or write private Pi Sync settings.
310
- Use `/sync` for initial setup, masked credential entry, and changes or transfers that require a separate review. The skill does not run diagnostics, check remote connectivity, or start a transfer.
311
- The skill's instructions are not a permission sandbox for the agent's other tools.
312
- Read the [settings reference](./skills/configure-pi-sync/references/configuration.md) directly when no agent assistance is needed.
317
+ Run `/skill:configure-pi-sync` with the edit you want, the rule draft or audit you need, or the error you saw. For example, use `/skill:configure-pi-sync exclude npm/ from the ignore file for my home setup` or `/skill:configure-pi-sync draft a .syncignore without writing it`. The [configuration skill](./skills/configure-pi-sync/SKILL.md) loads only on request. It applies authorized edits to `pi-sync.json` through the running local daemon for routine preferences, or verifies the ignore file for a setup you name through the daemon before editing it. For an error, it checks the local cause before proposing a change.
318
+
319
+ Use `/sync` for initial setup, masked credential entry, and operations that require a separate review. The skill does not run backend diagnostics, check remote connectivity, or start transfers. See the [settings reference](./skills/configure-pi-sync/references/configuration.md) for manual configuration and troubleshooting.
313
320
 
314
321
  ## 💬 Commands
315
322
 
@@ -318,10 +325,11 @@ Read the [settings reference](./skills/configure-pi-sync/references/configuratio
318
325
  | `/sync` | Set up storage, manage synced content, and review sync operations or recovery. |
319
326
  | `/sync help` | Show command usage. |
320
327
  | `/sync daemon [status\|handover\|allow-after-exit\|revoke-after-exit]` | Connect to the service or review ownership and unattended permission; no argument connects and shows status. |
328
+ | `/sync daemon recover` | Review and stop the current daemon in TUI or RPC without starting a replacement or retrying a transfer. |
321
329
  | `/sync use <setup>` | Switch the active local sync setup, following its switch policy. |
322
330
  | `/sync init` | Create a local configuration template. |
323
331
  | `/sync config` | Show resolved configuration. |
324
- | `/sync files` | List included local files. |
332
+ | `/sync files` | Show the active rule-file path for ignore-file setups or open content selection for legacy setups in TUI. |
325
333
  | `/sync status` | Compare local and remote snapshot state. |
326
334
  | `/sync diff` | Show local and remote differences. |
327
335
  | `/sync conflicts` | Review private unresolved dependency groups and choose local or remote group versions after fresh validation. |
@@ -346,6 +354,8 @@ Use the [daemon CLI](./docs/daemon-migration.md#daemon-cli) for explicit `stop`
346
354
  node "/path/to/installed/pi-sync/dist/daemon/dist/cli.js" status --root "/path/to/agent-directory"
347
355
  ```
348
356
 
357
+ If Pi Sync reports uncertain daemon cleanup, open `/sync` and choose **Stop daemon for recovery…**. After the confirmed stop, use `/reload` and follow the [cleanup recovery steps](./docs/daemon-migration.md#recover-from-uncertain-daemon-cleanup).
358
+
349
359
  Use the directory containing the installed Pi Sync `package.json` and the agent directory of the owner you want to inspect. `status` does not start a service. `stop` drains the service; reload Pi to reattach afterward. CLI `start` without clients follows the same 30-second grace policy. If ownership, consent, or cleanup is uncertain, follow the [recovery guide](./docs/daemon-migration.md#diagnostics-and-rollback) instead of forcing a restart. Print/JSON never launch a service.
350
360
 
351
361
  All routes support TUI and RPC; RPC settings and included-content screens are read-only.
@@ -383,7 +393,7 @@ S3/R2 publishes `latest.json` and history using ETag `If-Match`, or `If-None-Mat
383
393
 
384
394
  Snapshot recovery is guarded: new journals record before/after images, older journals are retired only when their unchanged preimages are provable, and unrecognized bytes remain untouched for manual review. Current-session targets are never restored during startup. Preserve a blocked transaction and its backup, close Pi, and review the private evidence before restoring selected paths; malformed/unsupported journals are not disposable. Pi may have loaded resources before lifecycle recovery, so reload or restart explicitly after recovery if loaded resources need to match the restored files.
385
395
 
386
- Before pull or rollback, pi-sync writes a backup under `<agent-dir>/pi-sync/backups/`.
396
+ Before pull or rollback, Pi Sync writes a backup under `<agent-dir>/pi-sync/backups/`. It leaves byte-identical regular files in place when their exact paths already match and no structural change is needed. It checks those files again before accepting the transfer.
387
397
  Snapshot apply and recovery require canonical agent and session paths. Preflight refuses parent aliases it detects because Pi's file queue uses different keys for existing and missing aliases. Node's path-based writes and deletes cannot prevent another process from replacing a parent directory after a check. Use directories you control, and pause tools that move or replace their directories during sync. Preserve any pending recovery evidence; an unresolved startup recovery barrier still blocks transfers. Old journals recorded under an alias require manual review because their exact root and target paths remain pinned. Changing the agent path alone does not authorize recovery or rewriting those journals.
388
398
  Apply preflights paths and checksums, journals mutations, and restores prior state only when current bytes match verified preimages or planned postimages. Unknown intermediate directory states and newer edits require review rather than a blind rollback. An interruption after replacement is armed can require manual recovery even if installation never ran; a later deletion of installed content is not treated as an unfinished remove.
389
399
  The file queue coordinates one Pi runtime, not separate processes or lock-unaware editors. Hash-based journals cannot distinguish a later write of identical recorded bytes; they do not provide a cross-process compare-and-swap.
@@ -435,7 +445,7 @@ packages/pi-sync/
435
445
  ├── dist/ # Published Jiti runtime and separate daemon files
436
446
  ├── scripts/build-runtime.mjs # Runtime builder
437
447
  ├── docs/ # Operational audits and settings link compatibility
438
- ├── skills/configure-pi-sync/ # Local rule edits and authoritative settings reference
448
+ ├── skills/configure-pi-sync/ # Local configuration edits and troubleshooting
439
449
  └── test/ # Behavior and lifecycle coverage
440
450
  ```
441
451
 
@@ -27,7 +27,7 @@ var SYNC_COMMANDS = [
27
27
  {
28
28
  name: "daemon",
29
29
  description: "Review service handover and unattended permission",
30
- usageSuffix: " [status|handover|allow-after-exit|revoke-after-exit]"
30
+ usageSuffix: " [status|recover|handover|allow-after-exit|revoke-after-exit]"
31
31
  },
32
32
  { name: "push", description: "Upload local settings" },
33
33
  { name: "pull", description: "Apply remote settings" },
@@ -152,7 +152,7 @@ function validateCommandOptions(command, options) {
152
152
  throw new Error(`Unexpected argument for /sync ${command}: ${options.args.join(" ")}`);
153
153
  }
154
154
  }
155
- var DAEMON_ACTIONS = ["status", "handover", "allow-after-exit", "revoke-after-exit"];
155
+ var DAEMON_ACTIONS = ["status", "recover", "handover", "allow-after-exit", "revoke-after-exit"];
156
156
  function completeSyncArguments(argumentPrefix) {
157
157
  const prefix = argumentPrefix.trimStart();
158
158
  if (prefix === "") return [...SYNC_COMMAND_COMPLETIONS];
@@ -236,6 +236,7 @@ function usage() {
236
236
  return [
237
237
  "Usage: /sync <command>",
238
238
  `Commands: ${commands}`,
239
+ "Daemon cleanup: /sync daemon recover reviews and stops the existing daemon. It does not start a replacement or retry a transfer.",
239
240
  `Automatic sync: ${AUTOMATIC_SYNC_DESCRIPTION}`,
240
241
  `Startup transfer: ${STARTUP_TRANSFER_DESCRIPTION}`,
241
242
  "Automatic transfer at startup is a separate opt-in: one conflict-free established-baseline transfer at idle in TUI/RPC, with conditional/lease publication and no resource reload.",
@@ -256,4 +257,4 @@ export {
256
257
  resolveSyncCommand,
257
258
  usage
258
259
  };
259
- //# sourceMappingURL=chunk-HLCML3OW.ts.map
260
+ //# sourceMappingURL=chunk-4VKWHVUO.ts.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/ui/sync-behavior.ts", "../../src/commands/command.ts"],
4
+ "sourcesContent": ["export const AUTOMATIC_SYNC_DESCRIPTION =\n \"This setup: check remote state once at startup in TUI/RPC. At shutdown, push all selected content only when sessions are included; reload skips that push. Saves apply to subsequent operations; a new check waits for the next session start. This does not enable startup transfer.\";\n\nexport const STARTUP_TRANSFER_DESCRIPTION =\n \"This setup: separate opt-in for one idle startup transfer in TUI/RPC. Requires an accepted baseline, matching remote included paths, and conditional or lease-protected publication (Git, verified WebDAV, or R2/S3 with verified conditional writes). May upload, replace, or remove selected files. Never reloads resources. Enabling applies next session start; opening Settings cancels pending work. Completed transfers are not undone.\";\n\nexport function startupTransferSummary(config: {\n automaticTransfer?: boolean;\n backend: { type: \"s3\" | \"git\" | \"webdav\" };\n}) {\n if (!config.automaticTransfer) return \"Off\";\n return config.backend.type === \"s3\"\n ? \"On (next idle startup; R2/S3 conditional-write verification required)\"\n : \"On (next idle startup; baseline and remote policy checks required)\";\n}\n", "import type { ExtensionCommandContext } from \"@earendil-works/pi-coding-agent\";\nimport { AUTOMATIC_SYNC_DESCRIPTION, STARTUP_TRANSFER_DESCRIPTION } from \"../ui/sync-behavior.js\";\nimport type { CommandArgumentCompletion, CommandOptions } from \"./command-types.js\";\n\nconst YES_FLAG_COMPLETIONS: readonly CommandArgumentCompletion[] = [\n { value: \"--yes\", label: \"--yes\", description: \"Skip confirmation prompts\" },\n { value: \"-y\", label: \"-y\", description: \"Skip confirmation prompts\" },\n];\nexport const SYNC_COMMANDS = [\n { name: \"help\", description: \"Show command usage\" },\n { name: \"use\", description: \"Switch the current sync setup\", usageSuffix: \" <setup>\" },\n { name: \"init\", description: \"Create local config template\" },\n { name: \"config\", description: \"Show resolved configuration\" },\n { name: \"files\", description: \"Choose included content\" },\n { name: \"status\", description: \"Show sync status\" },\n { name: \"diff\", description: \"Show local/remote diff\" },\n { name: \"conflicts\", description: \"Review private unresolved conflict groups\" },\n { name: \"doctor\", description: \"Check config, secrets, and lock state\" },\n {\n name: \"daemon\",\n description: \"Review service handover and unattended permission\",\n usageSuffix: \" [status|recover|handover|allow-after-exit|revoke-after-exit]\",\n },\n { name: \"push\", description: \"Upload local settings\" },\n { name: \"pull\", description: \"Apply remote settings\" },\n { name: \"sync\", description: \"Push or pull as needed\" },\n { name: \"history\", description: \"Show recent remote snapshots\" },\n { name: \"rollback\", description: \"Apply a previous snapshot\", usageSuffix: \" <snapshot>\" },\n { name: \"migrate-state\", description: \"Move legacy state into pi-sync/\" },\n { name: \"unlock\", description: \"Remove a stale local lock\", usageSuffix: \" --stale\" },\n] as const;\n\nexport type SyncCommandName = (typeof SYNC_COMMANDS)[number][\"name\"];\n\nconst SYNC_COMMAND_COMPLETIONS: readonly CommandArgumentCompletion[] = SYNC_COMMANDS.map(({ name, description }) => ({\n value: name,\n label: name,\n description,\n}));\nlet setupCompletionNames: string[] = [];\n\nexport function setSyncSetupCompletions(names: readonly string[]) {\n setupCompletionNames = [...new Set(names)].sort((left, right) => left.localeCompare(right));\n}\nconst SETUP_FLAG_COMPLETION = {\n value: \"--setup\",\n label: \"--setup\",\n description: \"Address a sync setup without switching\",\n} as const;\nconst SYNC_FLAG_COMPLETIONS: Record<string, readonly CommandArgumentCompletion[]> = {\n config: [SETUP_FLAG_COMPLETION],\n files: [SETUP_FLAG_COMPLETION],\n status: [SETUP_FLAG_COMPLETION],\n diff: [SETUP_FLAG_COMPLETION],\n conflicts: [SETUP_FLAG_COMPLETION],\n doctor: [SETUP_FLAG_COMPLETION],\n push: [\n ...YES_FLAG_COMPLETIONS,\n { value: \"--force\", label: \"--force\", description: \"Overwrite visible remote changes\" },\n SETUP_FLAG_COMPLETION,\n ],\n pull: [\n ...YES_FLAG_COMPLETIONS,\n { value: \"--force\", label: \"--force\", description: \"Overwrite local changes\" },\n SETUP_FLAG_COMPLETION,\n ],\n sync: [\n ...YES_FLAG_COMPLETIONS,\n { value: \"--force\", label: \"--force\", description: \"Resolve conflicts by forcing action\" },\n SETUP_FLAG_COMPLETION,\n ],\n history: [SETUP_FLAG_COMPLETION],\n rollback: [...YES_FLAG_COMPLETIONS, SETUP_FLAG_COMPLETION],\n \"migrate-state\": YES_FLAG_COMPLETIONS,\n unlock: [{ value: \"--stale\", label: \"--stale\", description: \"Remove only a stale lock\" }],\n};\n\nexport function splitArgs(input: string) {\n return input.match(/(?:[^\\s\"']+|\"[^\"]*\"|'[^']*')+/g)?.map((arg) => arg.replace(/^['\"]|['\"]$/g, \"\")) ?? [];\n}\n\nexport function parseOptions(args: string[]): CommandOptions {\n const values: string[] = [];\n let yes = false;\n let force = false;\n let stale = false;\n let setup: string | undefined;\n for (let index = 0; index < args.length; index += 1) {\n const arg = args[index];\n if (arg === \"--yes\" || arg === \"-y\") yes = true;\n else if (arg === \"--force\") force = true;\n else if (arg === \"--stale\") stale = true;\n else if (arg === \"--setup\") {\n const name = args[index + 1];\n if (!name || name.startsWith(\"-\")) throw new Error(\"--setup requires a sync setup name.\");\n if (setup !== undefined) throw new Error(\"--setup may be provided only once.\");\n setup = name;\n index += 1;\n } else if (arg.startsWith(\"-\")) {\n throw new Error(`Unknown sync option: ${arg}`);\n } else values.push(arg);\n }\n return {\n yes,\n force,\n stale,\n silent: false,\n reload: true,\n auto: false,\n ...(setup === undefined ? {} : { setup }),\n args: values,\n };\n}\n\nexport function validateCommandOptions(command: string, options: CommandOptions) {\n const setupAllowed = new Set([\n \"config\",\n \"files\",\n \"status\",\n \"diff\",\n \"conflicts\",\n \"doctor\",\n \"push\",\n \"pull\",\n \"sync\",\n \"history\",\n \"rollback\",\n ]);\n if (options.setup && !setupAllowed.has(command)) {\n throw new Error(`--setup is not supported by /sync ${command}.`);\n }\n if (options.yes && ![\"push\", \"pull\", \"sync\", \"rollback\", \"migrate-state\"].includes(command)) {\n throw new Error(`Confirmation/force options are not supported by /sync ${command}.`);\n }\n if (options.force && ![\"push\", \"pull\", \"sync\", \"rollback\"].includes(command)) {\n throw new Error(`Confirmation/force options are not supported by /sync ${command}.`);\n }\n if (options.stale && command !== \"unlock\") {\n throw new Error(`--stale is not supported by /sync ${command}.`);\n }\n if (command === \"daemon\" && options.args.length <= 1) {\n const action = options.args[0];\n if (action !== undefined && !DAEMON_ACTIONS.some((value) => value === action))\n throw new Error(`Unknown daemon action: ${action}`);\n return;\n }\n const expectedValues = command === \"rollback\" || command === \"use\" ? 1 : 0;\n if (options.args.length !== expectedValues) {\n if (command === \"rollback\") throw new Error(\"Usage: /sync rollback <snapshot-id> [--yes] [--setup <name>]\");\n if (command === \"use\") throw new Error(\"Usage: /sync use <setup>\");\n throw new Error(`Unexpected argument for /sync ${command}: ${options.args.join(\" \")}`);\n }\n}\n\nconst DAEMON_ACTIONS = [\"status\", \"recover\", \"handover\", \"allow-after-exit\", \"revoke-after-exit\"] as const;\n\nexport function completeSyncArguments(argumentPrefix: string): CommandArgumentCompletion[] | null {\n const prefix = argumentPrefix.trimStart();\n if (prefix === \"\") return [...SYNC_COMMAND_COMPLETIONS];\n\n const trailingSpace = /\\s$/.test(prefix);\n const tokens = splitArgs(prefix);\n if (tokens.length === 0) return [...SYNC_COMMAND_COMPLETIONS];\n\n const [command] = tokens;\n if (tokens.length === 1 && !trailingSpace) {\n const matches = SYNC_COMMAND_COMPLETIONS.filter((item) => item.value.startsWith(command));\n return matches.length > 0 ? [...matches] : null;\n }\n\n const args = tokens.slice(1);\n if (command === \"use\") {\n if (args.length > 1 || (trailingSpace && args.length > 0)) return null;\n return completeSetupValue(prefix, trailingSpace ? \"\" : (args[0] ?? \"\"));\n }\n if (command === \"daemon\") {\n if (args.length > 1 || (trailingSpace && args.length > 0)) return null;\n const current = trailingSpace ? \"\" : (args[0] ?? \"\");\n const base = trailingSpace ? prefix : prefix.slice(0, prefix.length - current.length);\n const matches = DAEMON_ACTIONS.filter((action) => action.startsWith(current));\n return matches.length\n ? matches.map((action) => ({ value: `${base}${action}`, label: action, description: \"Daemon control\" }))\n : null;\n }\n const setupFlagIndex = args.lastIndexOf(\"--setup\");\n if (setupFlagIndex >= 0 && setupFlagIndex === args.length - (trailingSpace ? 1 : 2)) {\n const currentSetup = trailingSpace ? \"\" : (args.at(-1) ?? \"\");\n if (!currentSetup.startsWith(\"-\")) return completeSetupValue(prefix, currentSetup);\n }\n\n const flagCompletions = SYNC_FLAG_COMPLETIONS[command];\n if (!flagCompletions) return null;\n\n const completedArgs = trailingSpace ? args : args.slice(0, -1);\n const completedValues = completedArgs.filter((arg) => !arg.startsWith(\"-\"));\n if (command === \"rollback\" ? completedValues.length > 1 : completedValues.length > 0) {\n return null;\n }\n\n const current = trailingSpace ? \"\" : (args.at(-1) ?? \"\");\n if (current && !current.startsWith(\"-\")) return null;\n\n const currentRaw = trailingSpace ? \"\" : (prefix.match(/\\S+$/)?.[0] ?? \"\");\n const completionPrefix = trailingSpace ? prefix : prefix.slice(0, prefix.length - currentRaw.length);\n const matches = flagCompletions.filter((item) => item.value.startsWith(current));\n return matches.length > 0 ? matches.map((item) => ({ ...item, value: `${completionPrefix}${item.value}` })) : null;\n}\n\nfunction completeSetupValue(prefix: string, current: string) {\n const currentRaw = current ? (prefix.match(/\\S+$/u)?.[0] ?? \"\") : \"\";\n const completionPrefix = currentRaw ? prefix.slice(0, prefix.length - currentRaw.length) : prefix;\n const matches = setupCompletionNames.filter((name) => name.startsWith(current));\n return matches.length > 0\n ? matches.map((name) => ({\n value: `${completionPrefix}${name}`,\n label: name,\n description: \"Sync setup\",\n }))\n : null;\n}\n\nexport function syncMenuOptions() {\n return SYNC_COMMANDS.map(({ name, description }) => `${name} \u2014 ${description}`);\n}\n\nexport function syncCommandFromMenuOption(option: string): SyncCommandName | undefined {\n return SYNC_COMMANDS.find(({ name, description }) => option === `${name} \u2014 ${description}`)?.name;\n}\n\nexport async function resolveSyncCommand(input: string, ctx: ExtensionCommandContext) {\n const [subcommand, ...rest] = splitArgs(input);\n if (subcommand) return { subcommand, rest };\n if (!ctx.hasUI) {\n ctx.ui.notify(usage(), \"info\");\n return undefined;\n }\n\n const selectedOption = await ctx.ui.select(\"pi-sync\", syncMenuOptions());\n const selected = selectedOption ? syncCommandFromMenuOption(selectedOption) : undefined;\n if (!selected) return undefined;\n if (selected !== \"rollback\") return { subcommand: selected, rest: [] };\n\n const target = (await ctx.ui.input(\"Rollback snapshot\", \"snapshot id\"))?.trim();\n if (!target) {\n ctx.ui.notify(\"Rollback cancelled.\", \"info\");\n return undefined;\n }\n return { subcommand: selected, rest: [target] };\n}\n\nexport function usage() {\n const commands = SYNC_COMMANDS.map(\n (command) => `${command.name}${\"usageSuffix\" in command ? command.usageSuffix : \"\"}`,\n ).join(\", \");\n return [\n \"Usage: /sync <command>\",\n `Commands: ${commands}`,\n \"Daemon cleanup: /sync daemon recover reviews and stops the existing daemon. It does not start a replacement or retry a transfer.\",\n `Automatic sync: ${AUTOMATIC_SYNC_DESCRIPTION}`,\n `Startup transfer: ${STARTUP_TRANSFER_DESCRIPTION}`,\n \"Automatic transfer at startup is a separate opt-in: one conflict-free established-baseline transfer at idle in TUI/RPC, with conditional/lease publication and no resource reload.\",\n \"Continuous sync is a separate default-Off opt-in in Settings. It requires Autonomous sync and can incur recurring network/model costs. After the last Pi exits, the service closes after a 30-second grace period unless a valid /sync daemon allow-after-exit grant applies. Zero-client work still requires that separate review. Safety blocks and durable automatic request limits remain.\",\n \"Settings: use /sync init or edit storage connections and sync setups in ~/.pi/agent/pi-sync.json (or the configured Pi agent directory). Version 1 and version 2 settings are unsupported and are never rewritten.\",\n ].join(\"\\n\");\n}\n"],
5
+ "mappings": ";;;;AAAO,IAAM,6BACX;AAEK,IAAM,+BACX;AAEK,SAAS,uBAAuB,QAGpC;AACD,MAAI,CAAC,OAAO,kBAAmB,QAAO;AACtC,SAAO,OAAO,QAAQ,SAAS,OAC3B,0EACA;AACN;;;ACVA,IAAM,uBAA6D;AAAA,EACjE,EAAE,OAAO,SAAS,OAAO,SAAS,aAAa,4BAA4B;AAAA,EAC3E,EAAE,OAAO,MAAM,OAAO,MAAM,aAAa,4BAA4B;AACvE;AACO,IAAM,gBAAgB;AAAA,EAC3B,EAAE,MAAM,QAAQ,aAAa,qBAAqB;AAAA,EAClD,EAAE,MAAM,OAAO,aAAa,iCAAiC,aAAa,WAAW;AAAA,EACrF,EAAE,MAAM,QAAQ,aAAa,+BAA+B;AAAA,EAC5D,EAAE,MAAM,UAAU,aAAa,8BAA8B;AAAA,EAC7D,EAAE,MAAM,SAAS,aAAa,0BAA0B;AAAA,EACxD,EAAE,MAAM,UAAU,aAAa,mBAAmB;AAAA,EAClD,EAAE,MAAM,QAAQ,aAAa,yBAAyB;AAAA,EACtD,E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,cAAc,EAAE;AAAA,EACpF,EAAE,KAAK,IAAI;AACX,SAAO;AAAA,IACL;AAAA,IACA,aAAa,QAAQ;AAAA,IACrB;AAAA,IACA,mBAAmB,0BAA0B;AAAA,IAC7C,qBAAqB,4BAA4B;AAAA,IACjD;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,KAAK,IAAI;AACb;",
6
+ "names": ["matches", "current"]
7
+ }
@@ -4,6 +4,7 @@
4
4
  // src/settings/config.ts
5
5
  import {
6
6
  configFromSettings,
7
+ createSettingsConfigView,
7
8
  isEnabled,
8
9
  isExplicitlyEnabled,
9
10
  loadConfig,
@@ -22,6 +23,7 @@ import {
22
23
 
23
24
  export {
24
25
  configFromSettings,
26
+ createSettingsConfigView,
25
27
  loadConfig,
26
28
  loadConfigForCheck,
27
29
  loadPartialConfig,
@@ -33,4 +35,4 @@ export {
33
35
  syncSessionsWarnings,
34
36
  syncSettingsConfigFingerprint
35
37
  };
36
- //# sourceMappingURL=chunk-27F5W7DX.ts.map
38
+ //# sourceMappingURL=chunk-DAZZ5BEJ.ts.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/settings/config.ts"],
4
+ "sourcesContent": ["export type * from \"@narumitw/pi-sync-daemon/engine/settings/config\";\nexport {\n configFromSettings,\n createSettingsConfigView,\n isEnabled,\n isExplicitlyEnabled,\n loadConfig,\n loadConfigForCheck,\n loadPartialConfig,\n loadSettingsConfig,\n sessionTokenWarnings,\n syncCheckConfigFingerprint,\n syncConfigReviewFingerprint,\n syncConfigReviewIdentity,\n syncSessionsWarnings,\n syncSettingsConfigFingerprint,\n syncSetupReviewIdentity,\n syncSetupStorageReview,\n} from \"@narumitw/pi-sync-daemon/engine/settings/config\";\n"],
5
+ "mappings": ";;;;AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;",
6
+ "names": []
7
+ }
@@ -2,14 +2,14 @@
2
2
  // @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
3
3
  import {
4
4
  showRemoteSelectionReview
5
- } from "./chunk-EXDWEFIJ.ts";
5
+ } from "./chunk-TJ7YNITN.ts";
6
6
  import {
7
7
  runCancellableOperation
8
8
  } from "./chunk-CKUGCBHP.ts";
9
9
  import {
10
10
  loadConfig,
11
11
  syncConfigReviewIdentity
12
- } from "./chunk-27F5W7DX.ts";
12
+ } from "./chunk-DAZZ5BEJ.ts";
13
13
  import {
14
14
  errorMessage
15
15
  } from "./chunk-6YKOHBSC.ts";
@@ -208,4 +208,4 @@ async function dispatchManagerResult(ctx, initialResult, origin, runRoute, signa
208
208
  export {
209
209
  dispatchManagerResult
210
210
  };
211
- //# sourceMappingURL=chunk-V76KCWHO.ts.map
211
+ //# sourceMappingURL=chunk-F3VODLVQ.ts.map
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  syncCheckConfigFingerprint,
8
8
  syncConfigReviewFingerprint
9
- } from "./chunk-27F5W7DX.ts";
9
+ } from "./chunk-DAZZ5BEJ.ts";
10
10
  import {
11
11
  setSyncStatus
12
12
  } from "./chunk-H7VOTY5N.ts";
@@ -184,4 +184,4 @@ export {
184
184
  observationMatchesConfig,
185
185
  observationSummary
186
186
  };
187
- //# sourceMappingURL=chunk-VQ47JBLF.ts.map
187
+ //# sourceMappingURL=chunk-FI2F5JBS.ts.map
@@ -17,10 +17,16 @@ import {
17
17
  configuredSyncSetupNames,
18
18
  readLocalConfigObject
19
19
  } from "./chunk-WBIOSK76.ts";
20
+ import {
21
+ throwIfAborted
22
+ } from "./chunk-UMPA5S7X.ts";
20
23
  import {
21
24
  AUTOMATIC_SYNC_DESCRIPTION,
22
25
  setSyncSetupCompletions
23
- } from "./chunk-HLCML3OW.ts";
26
+ } from "./chunk-4VKWHVUO.ts";
27
+ import {
28
+ runCancellableTask
29
+ } from "./chunk-CKUGCBHP.ts";
24
30
  import {
25
31
  acknowledgeSessions,
26
32
  directoryScopeLines,
@@ -28,15 +34,6 @@ import {
28
34
  saveReviewedDraft,
29
35
  starterDirectoryRules
30
36
  } from "./chunk-JREGWM2B.ts";
31
- import {
32
- piDaemonClient
33
- } from "./chunk-UGS6RYDZ.ts";
34
- import {
35
- runCancellableTask
36
- } from "./chunk-CKUGCBHP.ts";
37
- import {
38
- throwIfAborted
39
- } from "./chunk-UMPA5S7X.ts";
40
37
  import {
41
38
  addStorageConnection,
42
39
  addSyncSetup,
@@ -47,6 +44,9 @@ import {
47
44
  import {
48
45
  captureMutationOwner
49
46
  } from "./chunk-GELYN4UC.ts";
47
+ import {
48
+ piDaemonClient
49
+ } from "./chunk-RW44KNFD.ts";
50
50
  import {
51
51
  errorMessage
52
52
  } from "./chunk-6YKOHBSC.ts";
@@ -398,7 +398,7 @@ async function finishSetup(ctx, name, message, join, signal) {
398
398
  if (signal?.aborted) return;
399
399
  ctx.ui.notify(message, "info");
400
400
  if (!join) return;
401
- const { showRemoteSelectionReview } = await import("./remote-selection-ui-GPITNEBF.ts");
401
+ const { showRemoteSelectionReview } = await import("./remote-selection-ui-N4NMWFT2.ts");
402
402
  if (signal?.aborted) return;
403
403
  await showRemoteSelectionReview(ctx, name, signal, void 0, {
404
404
  origin: "settings",
@@ -932,7 +932,7 @@ async function showWebDavSetup(ctx, targetName, signal) {
932
932
  "Username and password: stored privately (values hidden)",
933
933
  ...policy.lines,
934
934
  `Automatic sync: ${automaticSyncSummary(policy.sync.automatic)}`,
935
- "Check setup tests whether this server can safely save sync updates using a temporary probe.",
935
+ "After saving, Diagnostics in /sync checks WebDAV write support with a temporary probe.",
936
936
  "Saving does not contact remote storage or start syncing."
937
937
  ],
938
938
  "Save setup",
@@ -1151,4 +1151,4 @@ export {
1151
1151
  showAddWebDavStorageProfile,
1152
1152
  showEditWebDavStorageProfile
1153
1153
  };
1154
- //# sourceMappingURL=chunk-S6FUUWV5.ts.map
1154
+ //# sourceMappingURL=chunk-NDEZ52SS.ts.map