@narumitw/pi-sync 0.50.2 → 0.51.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 (218) hide show
  1. package/README.md +4 -1
  2. package/dist/chunks/{chunk-6LP3MCR2.ts → chunk-2JZFHNLM.ts} +3 -5
  3. package/dist/chunks/chunk-2JZFHNLM.ts.map +7 -0
  4. package/dist/chunks/{chunk-LCRI3ABW.ts → chunk-2RZSQWBH.ts} +8 -19
  5. package/dist/chunks/chunk-2RZSQWBH.ts.map +7 -0
  6. package/dist/chunks/{chunk-IJ6FJFA5.ts → chunk-4AIHXRKE.ts} +11 -17
  7. package/dist/chunks/chunk-4AIHXRKE.ts.map +7 -0
  8. package/dist/chunks/{chunk-C7XY5NF5.ts → chunk-4MPIH46N.ts} +29 -51
  9. package/dist/chunks/chunk-4MPIH46N.ts.map +7 -0
  10. package/dist/chunks/{chunk-5B3FXBLE.ts → chunk-6546TS54.ts} +16 -20
  11. package/dist/chunks/chunk-6546TS54.ts.map +7 -0
  12. package/dist/chunks/{chunk-Q2TUM5X6.ts → chunk-6NT3YFGY.ts} +2 -2
  13. package/dist/chunks/chunk-6NT3YFGY.ts.map +7 -0
  14. package/dist/chunks/{chunk-2B2ELUF5.ts → chunk-7D5SF7P3.ts} +1 -1
  15. package/dist/chunks/chunk-7D5SF7P3.ts.map +7 -0
  16. package/dist/chunks/{chunk-4CHTZMEO.ts → chunk-7KHKWL3Q.ts} +37 -55
  17. package/dist/chunks/chunk-7KHKWL3Q.ts.map +7 -0
  18. package/dist/chunks/{chunk-ZI5MXMEX.ts → chunk-BVVP33U5.ts} +2 -4
  19. package/dist/chunks/chunk-BVVP33U5.ts.map +7 -0
  20. package/dist/chunks/{chunk-SZWBGPID.ts → chunk-DM4X4FIA.ts} +8 -13
  21. package/dist/chunks/chunk-DM4X4FIA.ts.map +7 -0
  22. package/dist/chunks/{chunk-SL64RLXR.ts → chunk-DZUSTGQV.ts} +8 -16
  23. package/dist/chunks/chunk-DZUSTGQV.ts.map +7 -0
  24. package/dist/chunks/{chunk-G4RNQQZS.ts → chunk-E42GXD6D.ts} +13 -19
  25. package/dist/chunks/chunk-E42GXD6D.ts.map +7 -0
  26. package/dist/chunks/{chunk-Z4DQF6L3.ts → chunk-ECYCNZOE.ts} +1 -1
  27. package/dist/chunks/chunk-ECYCNZOE.ts.map +7 -0
  28. package/dist/chunks/{chunk-OEX4ABY6.ts → chunk-EEJPYTWE.ts} +11 -21
  29. package/dist/chunks/chunk-EEJPYTWE.ts.map +7 -0
  30. package/dist/chunks/{chunk-CPEHGXJV.ts → chunk-G4RUXRWZ.ts} +3 -5
  31. package/dist/chunks/chunk-G4RUXRWZ.ts.map +7 -0
  32. package/dist/chunks/{chunk-T2B5IU74.ts → chunk-HGJH56KR.ts} +4 -4
  33. package/dist/chunks/chunk-HGJH56KR.ts.map +7 -0
  34. package/dist/chunks/{chunk-JAAKLL6M.ts → chunk-IVXEDPAD.ts} +10 -34
  35. package/dist/chunks/chunk-IVXEDPAD.ts.map +7 -0
  36. package/dist/chunks/chunk-K3RIEL6J.ts +20 -0
  37. package/dist/chunks/chunk-K3RIEL6J.ts.map +7 -0
  38. package/dist/chunks/{chunk-LTBWGSBV.ts → chunk-MSSW6F3R.ts} +1 -1
  39. package/dist/chunks/chunk-MSSW6F3R.ts.map +7 -0
  40. package/dist/chunks/{chunk-T3HH3UEJ.ts → chunk-OVDTF5CH.ts} +4 -10
  41. package/dist/chunks/chunk-OVDTF5CH.ts.map +7 -0
  42. package/dist/chunks/{chunk-NJFUIVYL.ts → chunk-PWMWOJP4.ts} +1 -1
  43. package/dist/chunks/chunk-PWMWOJP4.ts.map +7 -0
  44. package/dist/chunks/{chunk-HUDQATCL.ts → chunk-Q32CQWPM.ts} +6 -8
  45. package/dist/chunks/chunk-Q32CQWPM.ts.map +7 -0
  46. package/dist/chunks/{chunk-ETTRJDNP.ts → chunk-QLSN7AGX.ts} +6 -13
  47. package/dist/chunks/chunk-QLSN7AGX.ts.map +7 -0
  48. package/dist/chunks/{chunk-THMF4BVL.ts → chunk-SWUXA3MH.ts} +1 -1
  49. package/dist/chunks/chunk-SWUXA3MH.ts.map +7 -0
  50. package/dist/chunks/{chunk-TEN2ZBJV.ts → chunk-T2SJD3N7.ts} +2 -4
  51. package/dist/chunks/chunk-T2SJD3N7.ts.map +7 -0
  52. package/dist/chunks/{chunk-AUSDLD6F.ts → chunk-T56RNRZJ.ts} +10 -26
  53. package/dist/chunks/chunk-T56RNRZJ.ts.map +7 -0
  54. package/dist/chunks/{chunk-KW7YQEZN.ts → chunk-UA7RXOIT.ts} +48 -100
  55. package/dist/chunks/chunk-UA7RXOIT.ts.map +7 -0
  56. package/dist/chunks/{chunk-D5X27LCA.ts → chunk-UETBKTDI.ts} +1 -1
  57. package/dist/chunks/chunk-UETBKTDI.ts.map +7 -0
  58. package/dist/chunks/{chunk-CHH26D4F.ts → chunk-YFADF5ZQ.ts} +7 -6
  59. package/dist/chunks/chunk-YFADF5ZQ.ts.map +7 -0
  60. package/dist/chunks/{chunk-CCSN3F47.ts → chunk-YPXGU5OR.ts} +4 -4
  61. package/dist/chunks/chunk-YPXGU5OR.ts.map +7 -0
  62. package/dist/chunks/{file-selection-FTTKAOYX.ts → file-selection-RAVHRYFG.ts} +14 -26
  63. package/dist/chunks/file-selection-RAVHRYFG.ts.map +7 -0
  64. package/dist/chunks/{git-backend-GMVS4PD4.ts → git-backend-IAANDL3K.ts} +41 -104
  65. package/dist/chunks/git-backend-IAANDL3K.ts.map +7 -0
  66. package/dist/chunks/manager-result-dispatcher-OTUMQM26.ts +23 -0
  67. package/dist/chunks/{manager-ui-5KLKVMRC.ts → manager-ui-763NEKJY.ts} +124 -251
  68. package/dist/chunks/manager-ui-763NEKJY.ts.map +7 -0
  69. package/dist/chunks/remote-selection-ui-TZTJF32Y.ts +22 -0
  70. package/dist/chunks/{s3-backend-66O4FGBH.ts → s3-backend-XGXUOPUN.ts} +23 -54
  71. package/dist/chunks/s3-backend-XGXUOPUN.ts.map +7 -0
  72. package/dist/chunks/{setup-switch-IS2PEZ3J.ts → setup-switch-5G2VNJHL.ts} +9 -9
  73. package/dist/chunks/{setup-wizard-IUB6ESEU.ts → setup-wizard-YIEWGX32.ts} +12 -12
  74. package/dist/chunks/setup-wizard-YIEWGX32.ts.map +7 -0
  75. package/dist/chunks/{snapshot-HKEWCVK6.ts → snapshot-JL5DFSXI.ts} +5 -5
  76. package/dist/chunks/sync-inspection-P3ENJLNF.ts +20 -0
  77. package/dist/chunks/{sync-operations-LBX3GKCM.ts → sync-operations-AR76EB6C.ts} +85 -201
  78. package/dist/chunks/sync-operations-AR76EB6C.ts.map +7 -0
  79. package/dist/chunks/{sync-state-Q2FTXTW6.ts → sync-state-VHJUZ4YG.ts} +6 -6
  80. package/dist/chunks/{webdav-backend-ECIKD7SO.ts → webdav-backend-3EGUONAT.ts} +20 -51
  81. package/dist/chunks/webdav-backend-3EGUONAT.ts.map +7 -0
  82. package/dist/index.ts +49 -74
  83. package/dist/index.ts.map +3 -3
  84. package/docs/settings.md +9 -0
  85. package/package.json +61 -62
  86. package/src/backends/backend-factory.ts +15 -15
  87. package/src/backends/backend-identity.ts +31 -31
  88. package/src/backends/backend-types.ts +42 -42
  89. package/src/backends/git/git-backend.ts +714 -788
  90. package/src/backends/git/git-config.ts +104 -111
  91. package/src/backends/git/git-runner.ts +230 -247
  92. package/src/backends/git/git-storage.ts +228 -245
  93. package/src/backends/s3/s3-backend.ts +408 -441
  94. package/src/backends/s3/s3-client.ts +288 -333
  95. package/src/backends/sync-backend.ts +65 -65
  96. package/src/backends/webdav/webdav-backend.ts +542 -589
  97. package/src/backends/webdav/webdav-client.ts +292 -316
  98. package/src/backends/webdav/webdav-config.ts +57 -68
  99. package/src/commands/command-execution.ts +270 -289
  100. package/src/commands/command-handler.ts +160 -163
  101. package/src/commands/command-types.ts +13 -13
  102. package/src/commands/command.ts +190 -196
  103. package/src/commands/setup-completions.ts +1 -1
  104. package/src/paths.ts +47 -47
  105. package/src/settings/config-errors.ts +4 -5
  106. package/src/settings/config-file.ts +473 -506
  107. package/src/settings/config.ts +171 -174
  108. package/src/settings/settings-management.ts +191 -216
  109. package/src/settings/settings-store.ts +63 -77
  110. package/src/settings/settings-types.ts +78 -75
  111. package/src/settings/settings-validation.ts +328 -364
  112. package/src/snapshot/session-paths.ts +41 -55
  113. package/src/snapshot/snapshot-apply.ts +197 -229
  114. package/src/snapshot/snapshot-codec.ts +29 -31
  115. package/src/snapshot/snapshot-paths.ts +4 -6
  116. package/src/snapshot/snapshot-transaction.ts +161 -170
  117. package/src/snapshot/snapshot-types.ts +24 -24
  118. package/src/snapshot/snapshot.ts +310 -343
  119. package/src/state/json-file.ts +11 -11
  120. package/src/state/lock.ts +226 -242
  121. package/src/state/lockfile-fs.ts +20 -20
  122. package/src/state/operation-availability.ts +36 -41
  123. package/src/state/state-directory.ts +171 -173
  124. package/src/state/state-types.ts +15 -15
  125. package/src/state/sync-state-store.ts +23 -23
  126. package/src/sync/automatic-sync.ts +75 -80
  127. package/src/sync/remote-snapshot.ts +52 -60
  128. package/src/sync/setup-switch.ts +99 -114
  129. package/src/sync/signals.ts +3 -5
  130. package/src/sync/startup-check.ts +97 -111
  131. package/src/sync/sync-decision.ts +76 -80
  132. package/src/sync/sync-error-guidance.ts +41 -48
  133. package/src/sync/sync-errors.ts +10 -10
  134. package/src/sync/sync-inspection.ts +29 -33
  135. package/src/sync/sync-loaders.ts +28 -36
  136. package/src/sync/sync-mutations.ts +510 -622
  137. package/src/sync/sync-operations.ts +7 -7
  138. package/src/sync/sync-policy.ts +296 -326
  139. package/src/sync/sync-queries.ts +175 -194
  140. package/src/sync/sync-state.ts +74 -100
  141. package/src/sync-extension.ts +89 -101
  142. package/src/sync.ts +26 -26
  143. package/src/types.ts +37 -37
  144. package/src/ui/automatic-sync-summary.ts +1 -3
  145. package/src/ui/cancellable-operation.ts +92 -112
  146. package/src/ui/file-selection.ts +250 -274
  147. package/src/ui/manager-attention.ts +51 -63
  148. package/src/ui/manager-recovery.ts +48 -57
  149. package/src/ui/manager-result-dispatcher.ts +62 -76
  150. package/src/ui/manager-state.ts +200 -232
  151. package/src/ui/manager-ui.ts +264 -362
  152. package/src/ui/remote-selection-ui.ts +547 -588
  153. package/src/ui/secret-input.ts +198 -214
  154. package/src/ui/settings-ui.ts +175 -172
  155. package/src/ui/setup/git-ui.ts +232 -261
  156. package/src/ui/setup/s3-credentials-ui.ts +58 -65
  157. package/src/ui/setup/s3-ui.ts +171 -195
  158. package/src/ui/setup/setup-actions.ts +91 -101
  159. package/src/ui/setup/setup-location-ui.ts +121 -137
  160. package/src/ui/setup/setup-name-ui.ts +27 -27
  161. package/src/ui/setup/setup-prompts.ts +65 -65
  162. package/src/ui/setup/setup-review.ts +58 -59
  163. package/src/ui/setup/setup-switcher.ts +156 -160
  164. package/src/ui/setup/setup-wizard.ts +28 -28
  165. package/src/ui/setup/text-input.ts +54 -58
  166. package/src/ui/setup/webdav-ui.ts +246 -293
  167. package/src/ui/storage-connections-ui.ts +317 -369
  168. package/src/ui/sync-attention.ts +148 -164
  169. package/src/ui/sync-format.ts +110 -121
  170. package/src/ui/sync-resolution-ui.ts +147 -153
  171. package/src/ui/sync-setups-ui.ts +218 -238
  172. package/src/ui/sync-status.ts +17 -0
  173. package/src/ui/terminal-text.ts +2 -2
  174. package/dist/chunks/chunk-2B2ELUF5.ts.map +0 -7
  175. package/dist/chunks/chunk-4CHTZMEO.ts.map +0 -7
  176. package/dist/chunks/chunk-5B3FXBLE.ts.map +0 -7
  177. package/dist/chunks/chunk-6LP3MCR2.ts.map +0 -7
  178. package/dist/chunks/chunk-AUSDLD6F.ts.map +0 -7
  179. package/dist/chunks/chunk-C7XY5NF5.ts.map +0 -7
  180. package/dist/chunks/chunk-CCSN3F47.ts.map +0 -7
  181. package/dist/chunks/chunk-CHH26D4F.ts.map +0 -7
  182. package/dist/chunks/chunk-CPEHGXJV.ts.map +0 -7
  183. package/dist/chunks/chunk-D5X27LCA.ts.map +0 -7
  184. package/dist/chunks/chunk-ETTRJDNP.ts.map +0 -7
  185. package/dist/chunks/chunk-G4RNQQZS.ts.map +0 -7
  186. package/dist/chunks/chunk-HUDQATCL.ts.map +0 -7
  187. package/dist/chunks/chunk-IJ6FJFA5.ts.map +0 -7
  188. package/dist/chunks/chunk-JAAKLL6M.ts.map +0 -7
  189. package/dist/chunks/chunk-KW7YQEZN.ts.map +0 -7
  190. package/dist/chunks/chunk-LCRI3ABW.ts.map +0 -7
  191. package/dist/chunks/chunk-LTBWGSBV.ts.map +0 -7
  192. package/dist/chunks/chunk-NJFUIVYL.ts.map +0 -7
  193. package/dist/chunks/chunk-OEX4ABY6.ts.map +0 -7
  194. package/dist/chunks/chunk-Q2TUM5X6.ts.map +0 -7
  195. package/dist/chunks/chunk-SL64RLXR.ts.map +0 -7
  196. package/dist/chunks/chunk-SZWBGPID.ts.map +0 -7
  197. package/dist/chunks/chunk-T2B5IU74.ts.map +0 -7
  198. package/dist/chunks/chunk-T3HH3UEJ.ts.map +0 -7
  199. package/dist/chunks/chunk-TEN2ZBJV.ts.map +0 -7
  200. package/dist/chunks/chunk-THMF4BVL.ts.map +0 -7
  201. package/dist/chunks/chunk-Z4DQF6L3.ts.map +0 -7
  202. package/dist/chunks/chunk-ZI5MXMEX.ts.map +0 -7
  203. package/dist/chunks/file-selection-FTTKAOYX.ts.map +0 -7
  204. package/dist/chunks/git-backend-GMVS4PD4.ts.map +0 -7
  205. package/dist/chunks/manager-result-dispatcher-FKIBM3GO.ts +0 -22
  206. package/dist/chunks/manager-ui-5KLKVMRC.ts.map +0 -7
  207. package/dist/chunks/remote-selection-ui-D7RBRJNL.ts +0 -21
  208. package/dist/chunks/s3-backend-66O4FGBH.ts.map +0 -7
  209. package/dist/chunks/setup-wizard-IUB6ESEU.ts.map +0 -7
  210. package/dist/chunks/sync-inspection-CST2KL65.ts +0 -20
  211. package/dist/chunks/sync-operations-LBX3GKCM.ts.map +0 -7
  212. package/dist/chunks/webdav-backend-ECIKD7SO.ts.map +0 -7
  213. /package/dist/chunks/{manager-result-dispatcher-FKIBM3GO.ts.map → manager-result-dispatcher-OTUMQM26.ts.map} +0 -0
  214. /package/dist/chunks/{remote-selection-ui-D7RBRJNL.ts.map → remote-selection-ui-TZTJF32Y.ts.map} +0 -0
  215. /package/dist/chunks/{setup-switch-IS2PEZ3J.ts.map → setup-switch-5G2VNJHL.ts.map} +0 -0
  216. /package/dist/chunks/{snapshot-HKEWCVK6.ts.map → snapshot-JL5DFSXI.ts.map} +0 -0
  217. /package/dist/chunks/{sync-inspection-CST2KL65.ts.map → sync-inspection-P3ENJLNF.ts.map} +0 -0
  218. /package/dist/chunks/{sync-state-Q2FTXTW6.ts.map → sync-state-VHJUZ4YG.ts.map} +0 -0
@@ -2,33 +2,36 @@
2
2
  // @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
3
3
  import {
4
4
  dispatchManagerResult
5
- } from "./chunk-G4RNQQZS.ts";
5
+ } from "./chunk-E42GXD6D.ts";
6
6
  import {
7
7
  runCancellableOperation
8
- } from "./chunk-4CHTZMEO.ts";
8
+ } from "./chunk-7KHKWL3Q.ts";
9
9
  import {
10
10
  SETUP_SWITCH_ACTION_OPTIONS,
11
11
  saveOnSwitch,
12
12
  setupSwitchActionFromLabel,
13
13
  setupSwitchActionLabel,
14
14
  useSyncSetup
15
- } from "./chunk-SL64RLXR.ts";
16
- import "./chunk-HUDQATCL.ts";
17
- import "./chunk-T2B5IU74.ts";
15
+ } from "./chunk-DZUSTGQV.ts";
16
+ import "./chunk-Q32CQWPM.ts";
17
+ import "./chunk-HGJH56KR.ts";
18
18
  import {
19
19
  observationMatchesConfig,
20
20
  observationSummary,
21
21
  syncAttentionMatchesConfig
22
- } from "./chunk-5B3FXBLE.ts";
22
+ } from "./chunk-6546TS54.ts";
23
23
  import {
24
24
  inspectLock,
25
25
  isLockGuardHeld,
26
26
  isStaleLock
27
- } from "./chunk-ETTRJDNP.ts";
27
+ } from "./chunk-QLSN7AGX.ts";
28
+ import {
29
+ configureSyncStatus
30
+ } from "./chunk-K3RIEL6J.ts";
28
31
  import {
29
32
  readStateForConfig,
30
33
  syncStateFingerprint
31
- } from "./chunk-CCSN3F47.ts";
34
+ } from "./chunk-YPXGU5OR.ts";
32
35
  import {
33
36
  AUTOMATIC_SYNC_DESCRIPTION,
34
37
  applyS3CredentialUpdate,
@@ -49,21 +52,21 @@ import {
49
52
  showEditS3Target,
50
53
  showEditWebDavStorageProfile,
51
54
  showEditWebDavTarget
52
- } from "./chunk-KW7YQEZN.ts";
55
+ } from "./chunk-UA7RXOIT.ts";
53
56
  import {
54
57
  automaticSyncSummary
55
- } from "./chunk-Z4DQF6L3.ts";
56
- import "./chunk-CHH26D4F.ts";
58
+ } from "./chunk-ECYCNZOE.ts";
59
+ import "./chunk-YFADF5ZQ.ts";
57
60
  import {
58
61
  safeTerminalText
59
- } from "./chunk-LTBWGSBV.ts";
62
+ } from "./chunk-MSSW6F3R.ts";
60
63
  import {
61
64
  addStorageConnection,
62
65
  removeStorageConnection,
63
66
  removeSyncSetup,
64
67
  updateStorageConnection,
65
68
  updateSyncSetup
66
- } from "./chunk-LCRI3ABW.ts";
69
+ } from "./chunk-2RZSQWBH.ts";
67
70
  import {
68
71
  activeLocalConfigPath,
69
72
  isCloudflareR2Endpoint,
@@ -76,23 +79,23 @@ import {
76
79
  readLocalConfigObject,
77
80
  syncConfigReviewIdentity,
78
81
  updateLocalConfig
79
- } from "./chunk-C7XY5NF5.ts";
80
- import "./chunk-6LP3MCR2.ts";
81
- import "./chunk-ZI5MXMEX.ts";
82
- import "./chunk-TEN2ZBJV.ts";
82
+ } from "./chunk-4MPIH46N.ts";
83
+ import "./chunk-2JZFHNLM.ts";
84
+ import "./chunk-BVVP33U5.ts";
85
+ import "./chunk-T2SJD3N7.ts";
83
86
  import {
84
87
  syncErrorGuidance
85
- } from "./chunk-CPEHGXJV.ts";
88
+ } from "./chunk-G4RUXRWZ.ts";
86
89
  import {
87
90
  errorMessage
88
- } from "./chunk-2B2ELUF5.ts";
89
- import "./chunk-OEX4ABY6.ts";
90
- import "./chunk-THMF4BVL.ts";
91
- import "./chunk-T3HH3UEJ.ts";
91
+ } from "./chunk-7D5SF7P3.ts";
92
+ import "./chunk-EEJPYTWE.ts";
93
+ import "./chunk-SWUXA3MH.ts";
94
+ import "./chunk-OVDTF5CH.ts";
92
95
  import {
93
96
  compareSyncInclude,
94
97
  syncIncludeSelection
95
- } from "./chunk-JAAKLL6M.ts";
98
+ } from "./chunk-IVXEDPAD.ts";
96
99
 
97
100
  // src/ui/manager-ui.ts
98
101
  import { defineMenu as defineMenu5, runMenu as runMenu5 } from "@narumitw/pi-tui-kit";
@@ -137,8 +140,7 @@ function operationCanRecover(availability) {
137
140
 
138
141
  // src/ui/manager-attention.ts
139
142
  function attentionMainMenuItems(manager) {
140
- if (!manager.attention && manager.observation?.inspection.selectionState?.kind !== "different")
141
- return [];
143
+ if (!manager.attention && manager.observation?.inspection.selectionState?.kind !== "different") return [];
142
144
  const disabled = manager.attentionReviewDisabled === true;
143
145
  return [
144
146
  {
@@ -164,29 +166,18 @@ function blockedSyncMenuItem(label, manager) {
164
166
  };
165
167
  }
166
168
  async function showManagerAttention(ctx, attention, runRoute, signal, onSelectionResolved) {
167
- const { showRemoteSelectionReview } = await import("./remote-selection-ui-D7RBRJNL.ts");
169
+ const { showRemoteSelectionReview } = await import("./remote-selection-ui-TZTJF32Y.ts");
168
170
  if (signal?.aborted) return "close";
169
- const review = await showRemoteSelectionReview(
170
- ctx,
171
- attention.decision.setupName,
172
- signal,
173
- void 0,
174
- {
175
- decision: attention.decision,
176
- origin: attention.origin,
177
- runRoute,
178
- onSelectionResolved
179
- }
180
- );
171
+ const review = await showRemoteSelectionReview(ctx, attention.decision.setupName, signal, void 0, {
172
+ decision: attention.decision,
173
+ origin: attention.origin,
174
+ runRoute,
175
+ onSelectionResolved
176
+ });
181
177
  if (review.kind === "route-result") {
182
- const disposition = await dispatchManagerResult(
183
- ctx,
184
- review.result,
185
- review.route,
186
- runRoute,
187
- signal,
188
- { onSelectionResolved }
189
- );
178
+ const disposition = await dispatchManagerResult(ctx, review.result, review.route, runRoute, signal, {
179
+ onSelectionResolved
180
+ });
190
181
  return disposition.kind;
191
182
  }
192
183
  return review.kind === "closed" || review.kind === "stale" ? "close" : "stay";
@@ -197,10 +188,7 @@ import { runConfirmation } from "@narumitw/pi-tui-kit";
197
188
  async function recoverSyncAccess(ctx, manager, runRoute, sessionSignal, actionSignal) {
198
189
  const operation = manager.operation;
199
190
  if (!operation || !operationCanRecover(operation)) {
200
- ctx.ui.notify(
201
- "Operation status changed. Refresh the manager before retrying recovery.",
202
- "warning"
203
- );
191
+ ctx.ui.notify("Operation status changed. Refresh the manager before retrying recovery.", "warning");
204
192
  return "stay";
205
193
  }
206
194
  const signal = sessionSignal ? AbortSignal.any([sessionSignal, actionSignal]) : actionSignal;
@@ -220,10 +208,7 @@ async function recoverSyncAccess(ctx, manager, runRoute, sessionSignal, actionSi
220
208
  signal,
221
209
  isCurrent: () => !signal.aborted,
222
210
  onError: (_currentCtx, error) => {
223
- ctx.ui.notify(
224
- `Recovery confirmation failed: ${safeTerminalText(errorMessage(error))}`,
225
- "error"
226
- );
211
+ ctx.ui.notify(`Recovery confirmation failed: ${safeTerminalText(errorMessage(error))}`, "error");
227
212
  }
228
213
  });
229
214
  if (confirmation.kind === "stale") return "close";
@@ -423,10 +408,7 @@ async function loadSetupMenuState(selectedName, signal) {
423
408
  }
424
409
  function notifySetupChangeError(ctx, name, error, signal) {
425
410
  if (signal?.aborted) return;
426
- ctx.ui.notify(
427
- `Sync setup \u201C${safeTerminalText(name)}\u201D was not changed: ${menuErrorMessage(error)}`,
428
- "error"
429
- );
411
+ ctx.ui.notify(`Sync setup \u201C${safeTerminalText(name)}\u201D was not changed: ${menuErrorMessage(error)}`, "error");
430
412
  }
431
413
  function menuErrorMessage(error) {
432
414
  return syncErrorGuidance(error);
@@ -520,18 +502,13 @@ async function describeManagerState(signal, attention, inspectOperation = inspec
520
502
  }
521
503
  if (signal?.aborted) throw signal.reason;
522
504
  }
523
- const attentionComparison = currentAttention ? compareSyncInclude(
524
- currentAttention.decision.localInclude,
525
- currentAttention.decision.remoteInclude
526
- ) : void 0;
505
+ const attentionComparison = currentAttention ? compareSyncInclude(currentAttention.decision.localInclude, currentAttention.decision.remoteInclude) : void 0;
527
506
  const noSyncedContent = config.include.length === 0;
528
507
  const syncState = changesBlocked ? void 0 : await readStateForConfig(config).catch(() => void 0);
529
508
  const currentObservation = observation && observationMatchesConfig(observation, config) && syncState && syncStateFingerprint(syncState) === observation.inspection.stateIdentity ? observation : void 0;
530
509
  const lastAppliedSnapshot = changesBlocked ? "Unavailable while operations are locked" : syncState?.lastAppliedSnapshot ? safeTerminalText(syncState.lastAppliedSnapshot) : syncState ? "Never synced" : "Unavailable";
531
510
  const canSwitch = await countValidSyncSetups(configuredTargets, signal) > 1;
532
- const mainActions = MAIN_MENU_ACTIONS.filter(
533
- (action) => action !== "Switch sync setup" || canSwitch
534
- );
511
+ const mainActions = MAIN_MENU_ACTIONS.filter((action) => action !== "Switch sync setup" || canSwitch);
535
512
  const ordinaryTitle = [
536
513
  "Manage sync",
537
514
  "",
@@ -548,10 +525,7 @@ async function describeManagerState(signal, attention, inspectOperation = inspec
548
525
  `Startup check (${safeTerminalText(currentObservation.checkedAt)}): ${observationSummary(currentObservation)}`,
549
526
  "Check-time observation only; synchronization rechecks current content."
550
527
  ] : ["Remote status: Not checked"],
551
- ...noSyncedContent ? [
552
- "",
553
- "No included content is selected. Choose included content in Settings before syncing."
554
- ] : [],
528
+ ...noSyncedContent ? ["", "No included content is selected. Choose included content in Settings before syncing."] : [],
555
529
  "",
556
530
  "What do you want to do?"
557
531
  ];
@@ -585,12 +559,7 @@ async function describeManagerState(signal, attention, inspectOperation = inspec
585
559
  }
586
560
  function operationActions(operation, noSyncedContent, canSwitch, mainActions) {
587
561
  if (operationCanRecover(operation)) {
588
- return [
589
- "Restore sync access\u2026 (recommended)",
590
- "Status & changes",
591
- "History & recovery\u2026",
592
- "Help"
593
- ];
562
+ return ["Restore sync access\u2026 (recommended)", "Status & changes", "History & recovery\u2026", "Help"];
594
563
  }
595
564
  if (operation.kind !== "free") {
596
565
  return ["Refresh operation status", "Status & changes", "History & recovery\u2026", "Help"];
@@ -603,26 +572,16 @@ function operationStatusLines(operation) {
603
572
  return [];
604
573
  case "live": {
605
574
  const command = truncateToWidth(safeTerminalText(operation.lock.command), 16, "\u2026");
606
- return [
607
- `Running: ${command} (pid ${operation.lock.pid}). Wait, then refresh; Settings and More return.`
608
- ];
575
+ return [`Running: ${command} (pid ${operation.lock.pid}). Wait, then refresh; Settings and More return.`];
609
576
  }
610
577
  case "busy":
611
- return [
612
- "Pi-sync may be starting or finishing. Wait, then refresh; Settings and More remain unavailable."
613
- ];
578
+ return ["Pi-sync may be starting or finishing. Wait, then refresh; Settings and More remain unavailable."];
614
579
  case "recoverable-stale":
615
- return [
616
- "Sync paused: old lock remains. Close other Pi sessions then restore; Settings and More return."
617
- ];
580
+ return ["Sync paused: old lock remains. Close other Pi sessions then restore; Settings and More return."];
618
581
  case "recoverable-unreadable":
619
- return [
620
- "Sync paused: owner unknown. Close other Pi sessions then restore; Settings and More return."
621
- ];
582
+ return ["Sync paused: owner unknown. Close other Pi sessions then restore; Settings and More return."];
622
583
  case "inspection-error":
623
- return [
624
- "Lock check failed. Fix path access, then refresh; Settings and More remain unavailable."
625
- ];
584
+ return ["Lock check failed. Fix path access, then refresh; Settings and More remain unavailable."];
626
585
  }
627
586
  }
628
587
  function backendStorageDescription(config) {
@@ -675,6 +634,14 @@ async function showSyncSettings(ctx, runRoute, signal) {
675
634
  values: ["On", "Off"],
676
635
  action: "skip-secret-scan"
677
636
  },
637
+ {
638
+ id: "showStatus",
639
+ label: "Show status (all setups)",
640
+ description: "All setups: show sync progress and attention in Pi status.",
641
+ currentValue: state.showStatus ? "On" : "Off",
642
+ values: ["On", "Off"],
643
+ action: "show-status"
644
+ },
678
645
  {
679
646
  id: "onSwitch",
680
647
  label: "After switching setup (all setups)",
@@ -708,11 +675,9 @@ async function showSyncSettings(ctx, runRoute, signal) {
708
675
  const latest = await loadConfig(setupName);
709
676
  if (mutationSignal.aborted) return { kind: "rejected" };
710
677
  if (latest.automatic === automatic) return { kind: "stay" };
711
- await updateSyncSetup(
712
- setupName,
713
- (setup) => ({ ...setup, sync: { ...setup.sync, automatic } }),
714
- { signal: mutationSignal }
715
- );
678
+ await updateSyncSetup(setupName, (setup) => ({ ...setup, sync: { ...setup.sync, automatic } }), {
679
+ signal: mutationSignal
680
+ });
716
681
  if (mutationSignal.aborted) return { kind: "rejected" };
717
682
  ctx.ui.notify(
718
683
  `Automatic sync ${automatic ? "enabled" : "disabled"} for \u201C${safeTerminalText(setupName)}\u201D.`,
@@ -733,10 +698,24 @@ async function showSyncSettings(ctx, runRoute, signal) {
733
698
  if (latest.skipSecretScan === skipSecretScan) return { kind: "stay" };
734
699
  await updateLocalConfig((settings) => ({ ...settings, skipSecretScan }), mutationSignal);
735
700
  if (mutationSignal.aborted) return { kind: "rejected" };
736
- ctx.ui.notify(
737
- `Secret scan ${skipSecretScan ? "disabled" : "enabled"} for pushes in all setups.`,
738
- "info"
739
- );
701
+ ctx.ui.notify(`Secret scan ${skipSecretScan ? "disabled" : "enabled"} for pushes in all setups.`, "info");
702
+ return { kind: "stay" };
703
+ } catch (error) {
704
+ if (!mutationSignal.aborted) notifySaveFailure(ctx, error);
705
+ return { kind: "rejected" };
706
+ }
707
+ },
708
+ "show-status": async ({ value, signal: actionSignal }) => {
709
+ const showStatus = value === "On";
710
+ const mutationSignal = signal ? AbortSignal.any([signal, actionSignal]) : actionSignal;
711
+ try {
712
+ const latest = await loadConfig(setupName);
713
+ if (mutationSignal.aborted) return { kind: "rejected" };
714
+ if (latest.showStatus === showStatus) return { kind: "stay" };
715
+ await updateLocalConfig((settings) => ({ ...settings, showStatus }), mutationSignal);
716
+ if (mutationSignal.aborted) return { kind: "rejected" };
717
+ configureSyncStatus(ctx, showStatus);
718
+ ctx.ui.notify(`Pi Sync status ${showStatus ? "enabled" : "disabled"} for all setups.`, "info");
740
719
  return { kind: "stay" };
741
720
  } catch (error) {
742
721
  if (!mutationSignal.aborted) notifySaveFailure(ctx, error);
@@ -767,7 +746,7 @@ async function showSyncSettings(ctx, runRoute, signal) {
767
746
  },
768
747
  "remote-include": async ({ signal: actionSignal }) => {
769
748
  const reviewSignal = signal ? AbortSignal.any([signal, actionSignal]) : actionSignal;
770
- const { showRemoteSelectionReview } = await import("./remote-selection-ui-D7RBRJNL.ts");
749
+ const { showRemoteSelectionReview } = await import("./remote-selection-ui-TZTJF32Y.ts");
771
750
  if (reviewSignal.aborted) return { kind: "rejected" };
772
751
  const review = await showRemoteSelectionReview(ctx, setupName, reviewSignal, void 0, {
773
752
  origin: "settings",
@@ -775,13 +754,7 @@ async function showSyncSettings(ctx, runRoute, signal) {
775
754
  });
776
755
  if (reviewSignal.aborted) return { kind: "rejected" };
777
756
  if (review.kind === "route-result") {
778
- const disposition = await dispatchManagerResult(
779
- ctx,
780
- review.result,
781
- review.route,
782
- runRoute,
783
- reviewSignal
784
- );
757
+ const disposition = await dispatchManagerResult(ctx, review.result, review.route, runRoute, reviewSignal);
785
758
  return disposition.kind === "close" ? { kind: "close" } : { kind: "stay" };
786
759
  }
787
760
  return review.kind === "closed" || review.kind === "stale" ? { kind: "close" } : { kind: "stay" };
@@ -795,10 +768,7 @@ async function showSyncSettings(ctx, runRoute, signal) {
795
768
  });
796
769
  }
797
770
  function notifySaveFailure(ctx, error) {
798
- ctx.ui.notify(
799
- `Pi Sync settings save failed: ${error instanceof Error ? error.message : String(error)}`,
800
- "error"
801
- );
771
+ ctx.ui.notify(`Pi Sync settings save failed: ${error instanceof Error ? error.message : String(error)}`, "error");
802
772
  }
803
773
 
804
774
  // src/ui/storage-connections-ui.ts
@@ -869,13 +839,7 @@ async function showStorageConnections(ctx, signal) {
869
839
  edit: async ({ state }) => {
870
840
  if (!state.selected || state.selected.name !== selectedName) return { kind: "rejected" };
871
841
  try {
872
- await editStorageConnection(
873
- ctx,
874
- state.selected.name,
875
- state.selected.profile,
876
- state.selected.usedBy,
877
- signal
878
- );
842
+ await editStorageConnection(ctx, state.selected.name, state.selected.profile, state.selected.usedBy, signal);
879
843
  } catch (error) {
880
844
  notifyConnectionError(ctx, state.selected.name, error, signal);
881
845
  }
@@ -942,10 +906,7 @@ async function loadStorageMenuState(selectedName, signal) {
942
906
  }
943
907
  function notifyConnectionError(ctx, name, error, signal) {
944
908
  if (signal?.aborted) return;
945
- ctx.ui.notify(
946
- `Storage connection \u201C${safeTerminalText(name)}\u201D was not changed: ${syncErrorGuidance(error)}`,
947
- "error"
948
- );
909
+ ctx.ui.notify(`Storage connection \u201C${safeTerminalText(name)}\u201D was not changed: ${syncErrorGuidance(error)}`, "error");
949
910
  }
950
911
  async function editStorageConnection(ctx, name, profile, usedBy, signal) {
951
912
  if (ctx.mode !== "tui") {
@@ -985,11 +946,7 @@ async function editStorageConnection(ctx, name, profile, usedBy, signal) {
985
946
  );
986
947
  if (!region || signal?.aborted) return;
987
948
  const storedCredentials = ownRecord(profile.credentials) ?? {};
988
- const credentials = await chooseS3CredentialUpdate(
989
- ctx,
990
- { ...profile, ...storedCredentials },
991
- signal
992
- );
949
+ const credentials = await chooseS3CredentialUpdate(ctx, { ...profile, ...storedCredentials }, signal);
993
950
  if (!credentials || signal?.aborted) return;
994
951
  const saved = await saveReviewedDraft(
995
952
  ctx,
@@ -1013,10 +970,7 @@ async function editStorageConnection(ctx, name, profile, usedBy, signal) {
1013
970
  ...current,
1014
971
  endpoint,
1015
972
  region,
1016
- credentials: applyS3CredentialUpdate(
1017
- current.credentials,
1018
- credentials
1019
- )
973
+ credentials: applyS3CredentialUpdate(current.credentials, credentials)
1020
974
  };
1021
975
  },
1022
976
  usedBy,
@@ -1043,12 +997,7 @@ async function showAddStorageConnection(ctx, signal) {
1043
997
  if (signal?.aborted || !preset || preset === "Cancel") return false;
1044
998
  if (preset === "WebDAV") return showAddWebDavStorageProfile(ctx, signal);
1045
999
  if (preset === "Git") return showAddGitStorageProfile(ctx, signal);
1046
- const name = await promptResourceName(
1047
- ctx,
1048
- "storage connection",
1049
- preset === "Cloudflare R2" ? "r2" : "s3",
1050
- signal
1051
- );
1000
+ const name = await promptResourceName(ctx, "storage connection", preset === "Cloudflare R2" ? "r2" : "s3", signal);
1052
1001
  if (!name || signal?.aborted) return false;
1053
1002
  const endpoint = await requiredValueInput(
1054
1003
  ctx,
@@ -1196,10 +1145,7 @@ async function showSetupSwitcher(ctx, runRoute, selectedName, signal) {
1196
1145
  if (!name) return false;
1197
1146
  }
1198
1147
  if (!name || !Object.hasOwn(targets, name)) {
1199
- ctx.ui.notify(
1200
- `Sync setup \u201C${safeTerminalText(name ?? "unknown")}\u201D no longer exists.`,
1201
- "warning"
1202
- );
1148
+ ctx.ui.notify(`Sync setup \u201C${safeTerminalText(name ?? "unknown")}\u201D no longer exists.`, "warning");
1203
1149
  return false;
1204
1150
  }
1205
1151
  if (name === active) {
@@ -1303,10 +1249,7 @@ async function showAddTarget(ctx, signal) {
1303
1249
  if (signal?.aborted) return;
1304
1250
  if (!raw) return void ctx.ui.notify("Set up the first sync setup before adding another.", "info");
1305
1251
  if (raw.version !== 3) {
1306
- ctx.ui.notify(
1307
- "Version 1 and version 2 settings are unsupported and are never migrated.",
1308
- "error"
1309
- );
1252
+ ctx.ui.notify("Version 1 and version 2 settings are unsupported and are never migrated.", "error");
1310
1253
  return;
1311
1254
  }
1312
1255
  let profiles = ownRecord(raw.storageConnections) ?? {};
@@ -1376,10 +1319,7 @@ async function showRemoveTarget(ctx, name, signal) {
1376
1319
  if (signal?.aborted) return;
1377
1320
  await refreshTargetCompletions();
1378
1321
  if (signal?.aborted) return;
1379
- ctx.ui.notify(
1380
- `Removed sync setup \u201C${safeTerminalText(name)}\u201D; remote data was not deleted.`,
1381
- "info"
1382
- );
1322
+ ctx.ui.notify(`Removed sync setup \u201C${safeTerminalText(name)}\u201D; remote data was not deleted.`, "info");
1383
1323
  }
1384
1324
 
1385
1325
  // src/ui/manager-ui.ts
@@ -1452,7 +1392,7 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
1452
1392
  if (!attention) {
1453
1393
  const observation = options.getObservation?.();
1454
1394
  if (!observation) return { kind: "stay" };
1455
- const { showRemoteSelectionReview } = await import("./remote-selection-ui-D7RBRJNL.ts");
1395
+ const { showRemoteSelectionReview } = await import("./remote-selection-ui-TZTJF32Y.ts");
1456
1396
  if (sessionSignal?.aborted) return { kind: "close" };
1457
1397
  const config = await loadConfig();
1458
1398
  if (sessionSignal?.aborted) return { kind: "close" };
@@ -1460,20 +1400,14 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
1460
1400
  options.onObservationInvalidated?.();
1461
1401
  return { kind: "stay" };
1462
1402
  }
1463
- const result = await showRemoteSelectionReview(
1464
- ctx,
1465
- observation.setupName,
1466
- sessionSignal,
1467
- void 0,
1468
- {
1469
- origin: "sync",
1470
- runRoute,
1471
- onSelectionResolved: () => {
1472
- if (!sessionSignal?.aborted && options.getObservation?.() === observation)
1473
- options.onObservationInvalidated?.();
1474
- }
1403
+ const result = await showRemoteSelectionReview(ctx, observation.setupName, sessionSignal, void 0, {
1404
+ origin: "sync",
1405
+ runRoute,
1406
+ onSelectionResolved: () => {
1407
+ if (!sessionSignal?.aborted && options.getObservation?.() === observation)
1408
+ options.onObservationInvalidated?.();
1475
1409
  }
1476
- );
1410
+ });
1477
1411
  if (sessionSignal?.aborted) return { kind: "close" };
1478
1412
  if (result.kind === "route-result") {
1479
1413
  return dispatchManagerResult(ctx, result.result, result.route, runRoute, sessionSignal);
@@ -1499,23 +1433,11 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
1499
1433
  return { kind: "stay" };
1500
1434
  }
1501
1435
  }
1502
- const result = await runCancellableOperation(
1503
- ctx,
1504
- "Checking current sync setup\u2026",
1505
- "sync",
1506
- runRoute,
1507
- {
1508
- commitAware: true,
1509
- signal: sessionSignal
1510
- }
1511
- );
1512
- const disposition = await dispatchManagerResult(
1513
- ctx,
1514
- result,
1515
- "sync",
1516
- runRoute,
1517
- sessionSignal
1518
- );
1436
+ const result = await runCancellableOperation(ctx, "Checking current sync setup\u2026", "sync", runRoute, {
1437
+ commitAware: true,
1438
+ signal: sessionSignal
1439
+ });
1440
+ const disposition = await dispatchManagerResult(ctx, result, "sync", runRoute, sessionSignal);
1519
1441
  return disposition.kind === "close" ? { kind: "close" } : { kind: "stay" };
1520
1442
  },
1521
1443
  switch: async () => {
@@ -1523,13 +1445,9 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
1523
1445
  return result === "pull-attempted" || result === "closed" ? { kind: "close" } : { kind: "stay" };
1524
1446
  },
1525
1447
  diff: async () => {
1526
- const result = await runCancellableOperation(
1527
- ctx,
1528
- "Checking current sync setup\u2026",
1529
- "diff",
1530
- runRoute,
1531
- { signal: sessionSignal }
1532
- );
1448
+ const result = await runCancellableOperation(ctx, "Checking current sync setup\u2026", "diff", runRoute, {
1449
+ signal: sessionSignal
1450
+ });
1533
1451
  return result.kind === "closed" ? { kind: "close" } : { kind: "stay" };
1534
1452
  },
1535
1453
  settings: async () => {
@@ -1537,45 +1455,21 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
1537
1455
  return { kind: "stay" };
1538
1456
  },
1539
1457
  pull: async () => {
1540
- const result = await runCancellableOperation(
1541
- ctx,
1542
- "Checking remote changes\u2026",
1543
- "pull",
1544
- runRoute,
1545
- {
1546
- commitAware: true,
1547
- cancelledMessage: "Pull check cancelled; no local files were changed.",
1548
- signal: sessionSignal
1549
- }
1550
- );
1551
- const disposition = await dispatchManagerResult(
1552
- ctx,
1553
- result,
1554
- "pull",
1555
- runRoute,
1556
- sessionSignal
1557
- );
1458
+ const result = await runCancellableOperation(ctx, "Checking remote changes\u2026", "pull", runRoute, {
1459
+ commitAware: true,
1460
+ cancelledMessage: "Pull check cancelled; no local files were changed.",
1461
+ signal: sessionSignal
1462
+ });
1463
+ const disposition = await dispatchManagerResult(ctx, result, "pull", runRoute, sessionSignal);
1558
1464
  return disposition.kind === "close" ? { kind: "close" } : { kind: "stay" };
1559
1465
  },
1560
1466
  push: async () => {
1561
- const result = await runCancellableOperation(
1562
- ctx,
1563
- "Preparing push preview\u2026",
1564
- "push",
1565
- runRoute,
1566
- {
1567
- commitAware: true,
1568
- cancelledMessage: "Push preparation cancelled; no remote files were changed.",
1569
- signal: sessionSignal
1570
- }
1571
- );
1572
- const disposition = await dispatchManagerResult(
1573
- ctx,
1574
- result,
1575
- "push",
1576
- runRoute,
1577
- sessionSignal
1578
- );
1467
+ const result = await runCancellableOperation(ctx, "Preparing push preview\u2026", "push", runRoute, {
1468
+ commitAware: true,
1469
+ cancelledMessage: "Push preparation cancelled; no remote files were changed.",
1470
+ signal: sessionSignal
1471
+ });
1472
+ const disposition = await dispatchManagerResult(ctx, result, "push", runRoute, sessionSignal);
1579
1473
  return disposition.kind === "close" ? { kind: "close" } : { kind: "stay" };
1580
1474
  },
1581
1475
  setups: async () => {
@@ -1591,34 +1485,18 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
1591
1485
  return { kind: "stay" };
1592
1486
  },
1593
1487
  doctor: async () => {
1594
- const result = await runCancellableOperation(
1595
- ctx,
1596
- "Checking setup access\u2026",
1597
- "doctor",
1598
- runRoute,
1599
- { signal: sessionSignal }
1600
- );
1488
+ const result = await runCancellableOperation(ctx, "Checking setup access\u2026", "doctor", runRoute, {
1489
+ signal: sessionSignal
1490
+ });
1601
1491
  return { kind: result.kind === "closed" ? "close" : "stay" };
1602
1492
  },
1603
1493
  unlock: async ({ state, signal: actionSignal }) => {
1604
- const result = await recoverSyncAccess(
1605
- ctx,
1606
- state.manager,
1607
- runRoute,
1608
- sessionSignal,
1609
- actionSignal
1610
- );
1494
+ const result = await recoverSyncAccess(ctx, state.manager, runRoute, sessionSignal, actionSignal);
1611
1495
  if (result === "close") return { kind: "close" };
1612
1496
  return result === "restored" ? { kind: "to", screen: "main" } : { kind: "stay" };
1613
1497
  },
1614
1498
  recover: async ({ state, signal: actionSignal }) => {
1615
- const result = await recoverSyncAccess(
1616
- ctx,
1617
- state.manager,
1618
- runRoute,
1619
- sessionSignal,
1620
- actionSignal
1621
- );
1499
+ const result = await recoverSyncAccess(ctx, state.manager, runRoute, sessionSignal, actionSignal);
1622
1500
  return { kind: result === "close" ? "close" : "stay" };
1623
1501
  },
1624
1502
  refresh: async () => ({ kind: "stay" }),
@@ -1637,12 +1515,7 @@ async function showSyncManager(ctx, runRoute, sessionSignal, options = {}) {
1637
1515
  getState: async () => {
1638
1516
  const pendingAttention = options.getAttention?.();
1639
1517
  const observation = options.getObservation?.();
1640
- const manager = await describeManagerState(
1641
- sessionSignal,
1642
- pendingAttention,
1643
- void 0,
1644
- observation
1645
- );
1518
+ const manager = await describeManagerState(sessionSignal, pendingAttention, void 0, observation);
1646
1519
  if (sessionSignal?.aborted) return { manager };
1647
1520
  if (observation && options.getObservation?.() === observation && !manager.observation && !(manager.operation && operationBlocksChanges(manager.operation))) {
1648
1521
  options.onObservationInvalidated?.();
@@ -1677,4 +1550,4 @@ function syncMainMenuItem(label) {
1677
1550
  export {
1678
1551
  showSyncManager
1679
1552
  };
1680
- //# sourceMappingURL=manager-ui-5KLKVMRC.ts.map
1553
+ //# sourceMappingURL=manager-ui-763NEKJY.ts.map