@narumitw/pi-sync 0.60.1 → 0.60.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/README.md +9 -5
- package/dist/chunks/{chunk-7AC2RX4M.ts → chunk-277VHM2P.ts} +2 -2
- package/dist/chunks/chunk-277VHM2P.ts.map +7 -0
- package/dist/chunks/{chunk-UBE6XWOM.ts → chunk-6W2SNZ5P.ts} +2 -2
- package/dist/chunks/chunk-6W2SNZ5P.ts.map +7 -0
- package/dist/chunks/{chunk-JZKCOM62.ts → chunk-EMRFVLZM.ts} +2 -2
- package/dist/chunks/chunk-EMRFVLZM.ts.map +7 -0
- package/dist/chunks/{chunk-NPT2G4FU.ts → chunk-HEB6YT64.ts} +2 -2
- package/dist/chunks/chunk-HEB6YT64.ts.map +7 -0
- package/dist/chunks/{chunk-J5COV5TY.ts → chunk-HLCML3OW.ts} +2 -2
- package/dist/chunks/{chunk-J5COV5TY.ts.map → chunk-HLCML3OW.ts.map} +1 -1
- package/dist/chunks/{chunk-UZUUUY7C.ts → chunk-IGDI5CIH.ts} +4 -4
- package/dist/chunks/{chunk-ZMNVNECV.ts → chunk-KPWZNMKM.ts} +2 -2
- package/dist/chunks/chunk-KPWZNMKM.ts.map +7 -0
- package/dist/chunks/{chunk-YWEYRRQI.ts → chunk-LAXTCSX4.ts} +11 -11
- package/dist/chunks/chunk-LAXTCSX4.ts.map +7 -0
- package/dist/chunks/{chunk-BGGKHHO4.ts → chunk-MCUZFUHY.ts} +7 -7
- package/dist/chunks/{chunk-M7RHV3H6.ts → chunk-OA4NZLSL.ts} +2 -2
- package/dist/chunks/chunk-OA4NZLSL.ts.map +7 -0
- package/dist/chunks/{chunk-ENFHHB5O.ts → chunk-OVCP2SOB.ts} +42 -6
- package/dist/chunks/chunk-OVCP2SOB.ts.map +7 -0
- package/dist/chunks/{chunk-6LHIRS5R.ts → chunk-RJZIKZI3.ts} +6 -6
- package/dist/chunks/chunk-RJZIKZI3.ts.map +7 -0
- package/dist/chunks/{chunk-CEMFCWIU.ts → chunk-RNIEVDTR.ts} +2 -2
- package/dist/chunks/chunk-RNIEVDTR.ts.map +7 -0
- package/dist/chunks/{chunk-PDBTD2K6.ts → chunk-S3R3W3KF.ts} +2 -2
- package/dist/chunks/chunk-S3R3W3KF.ts.map +7 -0
- package/dist/chunks/{chunk-4RNCZZY7.ts → chunk-SE7HHBKH.ts} +15 -11
- package/dist/chunks/{chunk-4RNCZZY7.ts.map → chunk-SE7HHBKH.ts.map} +2 -2
- package/dist/chunks/{chunk-CZNBKIM5.ts → chunk-SMVKMYLK.ts} +2 -2
- package/dist/chunks/chunk-SMVKMYLK.ts.map +7 -0
- package/dist/chunks/{chunk-JKBUYCPC.ts → chunk-V4AMI3VL.ts} +2 -2
- package/dist/chunks/chunk-V4AMI3VL.ts.map +7 -0
- package/dist/chunks/{chunk-BWWTOQOW.ts → chunk-VQRDL3SY.ts} +310 -90
- package/dist/chunks/chunk-VQRDL3SY.ts.map +7 -0
- package/dist/chunks/{chunk-VZCWYXRS.ts → chunk-WP2M67XZ.ts} +2 -2
- package/dist/chunks/chunk-WP2M67XZ.ts.map +7 -0
- package/dist/chunks/{chunk-HNKLBM3U.ts → chunk-ZIL6PW5L.ts} +2 -2
- package/dist/chunks/chunk-ZIL6PW5L.ts.map +7 -0
- package/dist/chunks/{command-handler-FO4XBBHF.ts → command-handler-TMH4US44.ts} +23 -21
- package/dist/chunks/command-handler-TMH4US44.ts.map +7 -0
- package/dist/chunks/{conflict-review-XBSME2ER.ts → conflict-review-QGUCODDH.ts} +5 -5
- package/dist/chunks/{continuous-record-ZHUXVO4E.ts → continuous-record-3XDXDOMV.ts} +2 -2
- package/dist/chunks/continuous-record-3XDXDOMV.ts.map +7 -0
- package/dist/chunks/{continuous-storage-SQBAXACF.ts → continuous-storage-HLKCHF6Z.ts} +2 -2
- package/dist/chunks/continuous-storage-HLKCHF6Z.ts.map +7 -0
- package/dist/chunks/{file-selection-S6CNNNQI.ts → file-selection-DD6X4J2K.ts} +6 -6
- package/dist/chunks/manager-result-dispatcher-YVVD44QD.ts +18 -0
- package/dist/chunks/{manager-ui-AY5ZU6B4.ts → manager-ui-Q54OHOPR.ts} +26 -26
- package/dist/chunks/manager-ui-Q54OHOPR.ts.map +7 -0
- package/dist/chunks/remote-selection-ui-ODSUHX5N.ts +17 -0
- package/dist/chunks/{setup-switch-M3BAFGJM.ts → setup-switch-SPZE7HIQ.ts} +8 -8
- package/dist/chunks/{setup-wizard-NFAWP4KF.ts → setup-wizard-5JYKAEIT.ts} +11 -11
- package/dist/chunks/{snapshot-D4SFDP5J.ts → snapshot-5HY3M2NL.ts} +2 -2
- package/dist/chunks/snapshot-5HY3M2NL.ts.map +7 -0
- package/dist/chunks/{snapshot-transaction-directory-TNKBQ3UQ.ts → snapshot-transaction-directory-OU2D7R7A.ts} +2 -2
- package/dist/chunks/snapshot-transaction-directory-OU2D7R7A.ts.map +7 -0
- package/dist/chunks/{state-directory-JZSZVVPX.ts → state-directory-XXHU73Z3.ts} +2 -2
- package/dist/chunks/{sync-inspection-BJ4KPPNO.ts → sync-inspection-ECUTWISE.ts} +6 -6
- package/dist/chunks/sync-inspection-ECUTWISE.ts.map +7 -0
- package/dist/chunks/{sync-operations-TLWER2TT.ts → sync-operations-REXODWZB.ts} +6 -6
- package/dist/chunks/{sync-operations-TLWER2TT.ts.map → sync-operations-REXODWZB.ts.map} +2 -2
- package/dist/chunks/{sync-state-FVCJJ7MY.ts → sync-state-2LMIXJ2C.ts} +2 -2
- package/dist/chunks/sync-state-2LMIXJ2C.ts.map +7 -0
- package/dist/index.ts +74 -55
- package/dist/index.ts.map +3 -3
- package/docs/agent-mode-verification.md +1 -1
- package/docs/agent-quality-verification.md +1 -1
- package/docs/continuous-sync-verification.md +1 -1
- package/docs/daemon-migration.md +90 -10
- package/docs/tui-contract.md +7 -1
- package/package.json +3 -3
- package/skills/configure-pi-sync/references/configuration.md +9 -4
- package/src/backends/backend-factory.ts +2 -2
- package/src/backends/backend-identity.ts +2 -2
- package/src/backends/backend-types.ts +1 -1
- package/src/backends/git/git-backend.ts +2 -2
- package/src/backends/git/git-config.ts +2 -2
- package/src/backends/git/git-runner.ts +2 -2
- package/src/backends/git/git-storage.ts +2 -2
- package/src/backends/s3/s3-backend.ts +2 -2
- package/src/backends/s3/s3-client.ts +6 -2
- package/src/backends/s3/s3-conditions.ts +2 -2
- package/src/backends/snapshot-pointer.ts +2 -2
- package/src/backends/sync-backend.ts +2 -2
- package/src/backends/webdav/webdav-backend.ts +2 -2
- package/src/backends/webdav/webdav-client.ts +2 -2
- package/src/backends/webdav/webdav-config.ts +2 -2
- package/src/commands/command-execution.ts +2 -2
- package/src/commands/command-handler.ts +2 -0
- package/src/commands/command.ts +1 -1
- package/src/daemon/apply-gate.ts +1 -1
- package/src/daemon/pi-client.ts +335 -95
- package/src/daemon/recovery.ts +1 -1
- package/src/paths.ts +2 -2
- package/src/settings/config-errors.ts +2 -2
- package/src/settings/config-file.ts +2 -2
- package/src/settings/config.ts +2 -2
- package/src/settings/settings-management.ts +2 -2
- package/src/settings/settings-store.ts +2 -2
- package/src/settings/settings-types.ts +1 -1
- package/src/settings/settings-validation.ts +2 -2
- package/src/snapshot/session-paths.ts +2 -2
- package/src/snapshot/snapshot-apply.ts +2 -2
- package/src/snapshot/snapshot-case-replacement.ts +2 -2
- package/src/snapshot/snapshot-codec.ts +2 -2
- package/src/snapshot/snapshot-exclude-safety.ts +2 -2
- package/src/snapshot/snapshot-mutation-queues.ts +2 -2
- package/src/snapshot/snapshot-paths.ts +2 -2
- package/src/snapshot/snapshot-root-transition.ts +2 -2
- package/src/snapshot/snapshot-transaction-directory.ts +2 -2
- package/src/snapshot/snapshot-transaction-plan.ts +2 -2
- package/src/snapshot/snapshot-transaction.ts +2 -2
- package/src/snapshot/snapshot-types.ts +1 -1
- package/src/snapshot/snapshot.ts +2 -2
- package/src/state/json-file.ts +2 -2
- package/src/state/lock-policy.ts +2 -2
- package/src/state/lock.ts +2 -2
- package/src/state/lockfile-fs.ts +2 -2
- package/src/state/merge-baseline-store.ts +2 -2
- package/src/state/mutation-directory-sync.ts +2 -2
- package/src/state/operation-availability.ts +2 -2
- package/src/state/state-directory.ts +2 -2
- package/src/state/state-types.ts +1 -1
- package/src/state/sync-state-store.ts +2 -2
- package/src/sync/agent-candidate.ts +2 -2
- package/src/sync/agent-plan.ts +2 -2
- package/src/sync/agent-policy.ts +2 -2
- package/src/sync/agent-refusal-retry.ts +2 -2
- package/src/sync/agent-request.ts +2 -2
- package/src/sync/agent-runner.ts +2 -2
- package/src/sync/agent-store.ts +2 -2
- package/src/sync/agent-sync.ts +2 -2
- package/src/sync/apply-review.ts +2 -2
- package/src/sync/conflict-artifact-ownership.ts +2 -2
- package/src/sync/conflict-artifacts.ts +2 -2
- package/src/sync/conflict-groups.ts +2 -2
- package/src/sync/conflict-preview.ts +2 -2
- package/src/sync/conflict-resolution.ts +2 -2
- package/src/sync/conflict-retention.ts +2 -2
- package/src/sync/content-conflicts.ts +2 -2
- package/src/sync/continuous-errors.ts +2 -2
- package/src/sync/continuous-lease.ts +2 -2
- package/src/sync/continuous-record.ts +2 -2
- package/src/sync/continuous-storage.ts +2 -2
- package/src/sync/continuous-sync.ts +2 -2
- package/src/sync/continuous-watch.ts +2 -2
- package/src/sync/exclude-policy.ts +2 -2
- package/src/sync/field-migration.ts +2 -2
- package/src/sync/file-merge-planner.ts +6 -2
- package/src/sync/json-document.ts +2 -2
- package/src/sync/local-field-policy.ts +2 -2
- package/src/sync/local-fields.ts +2 -2
- package/src/sync/merge-apply.ts +2 -2
- package/src/sync/merge-journal.ts +2 -2
- package/src/sync/merge-transfer-error.ts +2 -2
- package/src/sync/merged-sync.ts +2 -2
- package/src/sync/mutation-owner.ts +2 -2
- package/src/sync/package-merge.ts +2 -2
- package/src/sync/partial-progress.ts +2 -2
- package/src/sync/remote-snapshot.ts +2 -2
- package/src/sync/session-merge.ts +2 -2
- package/src/sync/settings-conflicts.ts +2 -2
- package/src/sync/settings-merge.ts +2 -2
- package/src/sync/signals.ts +2 -2
- package/src/sync/startup-timings.ts +2 -2
- package/src/sync/sync-decision.ts +2 -2
- package/src/sync/sync-error-guidance.ts +2 -2
- package/src/sync/sync-errors.ts +2 -2
- package/src/sync/sync-inspection.ts +2 -2
- package/src/sync/sync-local.ts +6 -2
- package/src/sync/sync-mutations.ts +2 -2
- package/src/sync/sync-operations.ts +1 -1
- package/src/sync/sync-policy.ts +2 -2
- package/src/sync/sync-queries.ts +2 -2
- package/src/sync/sync-state.ts +2 -2
- package/src/sync/text-merge.ts +2 -2
- package/src/sync-extension.ts +62 -41
- package/src/ui/sync-status.ts +47 -4
- package/dist/chunks/chunk-6LHIRS5R.ts.map +0 -7
- package/dist/chunks/chunk-7AC2RX4M.ts.map +0 -7
- package/dist/chunks/chunk-BWWTOQOW.ts.map +0 -7
- package/dist/chunks/chunk-CEMFCWIU.ts.map +0 -7
- package/dist/chunks/chunk-CZNBKIM5.ts.map +0 -7
- package/dist/chunks/chunk-ENFHHB5O.ts.map +0 -7
- package/dist/chunks/chunk-HNKLBM3U.ts.map +0 -7
- package/dist/chunks/chunk-JKBUYCPC.ts.map +0 -7
- package/dist/chunks/chunk-JZKCOM62.ts.map +0 -7
- package/dist/chunks/chunk-M7RHV3H6.ts.map +0 -7
- package/dist/chunks/chunk-NPT2G4FU.ts.map +0 -7
- package/dist/chunks/chunk-PDBTD2K6.ts.map +0 -7
- package/dist/chunks/chunk-UBE6XWOM.ts.map +0 -7
- package/dist/chunks/chunk-VZCWYXRS.ts.map +0 -7
- package/dist/chunks/chunk-YWEYRRQI.ts.map +0 -7
- package/dist/chunks/chunk-ZMNVNECV.ts.map +0 -7
- package/dist/chunks/command-handler-FO4XBBHF.ts.map +0 -7
- package/dist/chunks/continuous-record-ZHUXVO4E.ts.map +0 -7
- package/dist/chunks/continuous-storage-SQBAXACF.ts.map +0 -7
- package/dist/chunks/manager-result-dispatcher-I2AMCCE7.ts +0 -18
- package/dist/chunks/manager-ui-AY5ZU6B4.ts.map +0 -7
- package/dist/chunks/remote-selection-ui-GZHPDQ4L.ts +0 -17
- package/dist/chunks/snapshot-D4SFDP5J.ts.map +0 -7
- package/dist/chunks/snapshot-transaction-directory-TNKBQ3UQ.ts.map +0 -7
- package/dist/chunks/sync-inspection-BJ4KPPNO.ts.map +0 -7
- package/dist/chunks/sync-state-FVCJJ7MY.ts.map +0 -7
- package/docs/settings.md +0 -90
- /package/dist/chunks/{chunk-UZUUUY7C.ts.map → chunk-IGDI5CIH.ts.map} +0 -0
- /package/dist/chunks/{chunk-BGGKHHO4.ts.map → chunk-MCUZFUHY.ts.map} +0 -0
- /package/dist/chunks/{conflict-review-XBSME2ER.ts.map → conflict-review-QGUCODDH.ts.map} +0 -0
- /package/dist/chunks/{file-selection-S6CNNNQI.ts.map → file-selection-DD6X4J2K.ts.map} +0 -0
- /package/dist/chunks/{manager-result-dispatcher-I2AMCCE7.ts.map → manager-result-dispatcher-YVVD44QD.ts.map} +0 -0
- /package/dist/chunks/{remote-selection-ui-GZHPDQ4L.ts.map → remote-selection-ui-ODSUHX5N.ts.map} +0 -0
- /package/dist/chunks/{setup-switch-M3BAFGJM.ts.map → setup-switch-SPZE7HIQ.ts.map} +0 -0
- /package/dist/chunks/{setup-wizard-NFAWP4KF.ts.map → setup-wizard-5JYKAEIT.ts.map} +0 -0
- /package/dist/chunks/{state-directory-JZSZVVPX.ts.map → state-directory-XXHU73Z3.ts.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# @narumitw/pi-sync
|
|
2
2
|
|
|
3
|
+
## 0.60.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1f44df7: On the first active connection after an update, Pi Sync can replace an older daemon only if compatible, authenticated IPC works and no retained unattended grant blocks the upgrade. The replacement waits for the old daemon to release its identity and exit. If any check fails, follow the [manual recovery guide](https://github.com/narumiruna/pi-extensions/blob/main/packages/pi-sync/docs/daemon-migration.md#ownership-and-upgrade). Passive and shutdown paths do not start a replacement. If an interactive session switch cannot upgrade the daemon, keep file protection when the old owner can still accept the session. Use `status` to find the pending or last recorded owner. When `repair-upgrade` successfully repairs a pending upgrade after verifying exit, it revokes all retained unattended grants and keeps the recovery records in one private archive across retries. It does not start a daemon.
|
|
8
|
+
- fdbd6d6: Restore one line per stage in daemon startup timing reports in the TUI and RPC notifications.
|
|
9
|
+
- Updated dependencies [1f44df7]
|
|
10
|
+
- Updated dependencies [df62c83]
|
|
11
|
+
- @narumitw/pi-sync-daemon@0.5.0
|
|
12
|
+
- @narumitw/pi-tui-kit@0.70.1
|
|
13
|
+
|
|
14
|
+
## 0.60.3
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- b7d9e1c: Fix a hang after accepting a resource reload following a pull or rollback. Finish the sync operation and close its dialogs before reloading Pi.
|
|
19
|
+
- b4d548c: Treat an empty session path as absent instead of invalid, so `pi --no-session` runs stop reporting `Pi session paths must be absolute` on startup while still syncing nothing for that ephemeral session.
|
|
20
|
+
- 223b0ba: Restore a live Pi session after its heartbeat expires without reloading Pi. The
|
|
21
|
+
daemon distinguishes heartbeat expiry from deliberate disconnection and keeps
|
|
22
|
+
file-queue and session protection in place. Pi Sync reconnects to the same owner
|
|
23
|
+
without resubmitting interrupted operations, and checks participation before
|
|
24
|
+
reporting that it is connected.
|
|
25
|
+
- Updated dependencies [223b0ba]
|
|
26
|
+
- @narumitw/pi-sync-daemon@0.4.0
|
|
27
|
+
|
|
28
|
+
## 0.60.2
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- ea5b9f1: Exit the daemon after a 30-second grace period when no registered client PID remains and no valid active-setup after-exit grant applies. Keep live, passive, disconnected, and retired clients protected; preserve paused authorization barriers and drain committed work before releasing ownership. No new setting or final synchronization is added.
|
|
33
|
+
|
|
34
|
+
Let Pi Sync retry an authenticated idle-closing owner after confirmed process exit, with bounded, cancellable startup and no replay of submitted operations. Add the lightweight `waitForDaemonExit()` client helper. Let a later Pi Sync command reconnect after a cancelled unpublished attach by draining the old connection and using a fresh client ID and generation; keep failed cleanup blocked and never replay the cancelled operation. Publish and verify the daemon dependency before releasing Pi Sync; publication and real-data cutover still require separate approval.
|
|
35
|
+
- 5e251a8: Rename the daemon package to `@narumitw/pi-sync-daemon` and its executable to `pi-sync-daemon`, and update Pi Sync to use the renamed dependency. The new package does not provide the old `sync-daemon` executable alias. Stop an existing daemon before replacing its package, then use the new executable after installation. Preserve IPC identity, settings, state, recovery evidence, and authorization digests. Publish and verify the renamed dependency before releasing Pi Sync; publication and real-data cutover still require separate approval.
|
|
36
|
+
- Updated dependencies [ea5b9f1]
|
|
37
|
+
- Updated dependencies [5e251a8]
|
|
38
|
+
- @narumitw/pi-sync-daemon@0.3.0
|
|
39
|
+
|
|
3
40
|
## 0.60.1
|
|
4
41
|
|
|
5
42
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/@narumitw/pi-sync) [](https://pi.dev) [](./LICENSE)
|
|
4
4
|
|
|
5
5
|
Pi Sync synchronizes selected Pi settings and content across machines through Git, WebDAV, Cloudflare R2, or another S3-compatible store.
|
|
6
|
-
Reusable storage connections hold credentials, while named sync setups define exactly what to sync, where to store it, and whether to sync automatically. Pi owns the interface; the separate [@narumitw/sync-daemon service](https://github.com/narumiruna/pi-extensions/tree/main/packages/sync-daemon) owns execution.
|
|
6
|
+
Reusable storage connections hold credentials, while named sync setups define exactly what to sync, where to store it, and whether to sync automatically. Pi owns the interface; the separate [@narumitw/pi-sync-daemon service](https://github.com/narumiruna/pi-extensions/tree/main/packages/pi-sync-daemon) owns execution.
|
|
7
7
|
|
|
8
8
|
> **Experimental daemon migration:** this checkout requires the new, independently published dependency. Close or upgrade older Pi processes and review ownership before real-data use. See [migration and release restrictions](./docs/daemon-migration.md).
|
|
9
9
|
|
|
@@ -36,7 +36,7 @@ Build the generated runtime and try a local checkout:
|
|
|
36
36
|
```bash
|
|
37
37
|
npm install
|
|
38
38
|
npm --workspace @narumitw/pi-tui-kit run build
|
|
39
|
-
npm --workspace @narumitw/sync-daemon run build
|
|
39
|
+
npm --workspace @narumitw/pi-sync-daemon run build
|
|
40
40
|
npm --workspace @narumitw/pi-sync run build
|
|
41
41
|
pi -e ./packages/pi-sync
|
|
42
42
|
```
|
|
@@ -45,6 +45,10 @@ The package declares `dist/index.ts`, so an unbuilt checkout must run the build
|
|
|
45
45
|
|
|
46
46
|
Extensions run with Pi's permissions, so install only packages from sources you trust.
|
|
47
47
|
|
|
48
|
+
Revoke retained unattended permission before updating. After updating, use `/reload` in open Pi
|
|
49
|
+
sessions. If the upgrade is blocked or the old owner's exit is uncertain, follow the
|
|
50
|
+
[daemon upgrade guide](./docs/daemon-migration.md#ownership-and-upgrade).
|
|
51
|
+
|
|
48
52
|
Use a Pi runtime that satisfies this package’s declared peer floor. Installing an extension dependency does not upgrade a separately installed Pi runtime. The declared Kit floor supplies exact scrolling/paginated review and configured-keybinding support.
|
|
49
53
|
|
|
50
54
|
## 🚀 Quick start
|
|
@@ -208,7 +212,7 @@ Ordinary **Sync now** reuses a cached refusal. Use **Retry refused model result
|
|
|
208
212
|
|
|
209
213
|
**Settings → Continuous sync** controls separate per-setup `sync.continuous`, default **Off**. Autonomous sync must also be enabled. A separate review authorizes recurring network access, model costs and automatic transfers while Pi is open. Upgrade all Pi processes sharing the agent directory before enabling it. Monitoring starts after the `/sync` command or manager closes, and replaces the duplicate one-shot startup transfer.
|
|
210
214
|
|
|
211
|
-
Selected-file hints are coalesced after one quiet second. A 60–66 second remote/local check covers missed events. Temporary failures and proven pre-publication edit races use bounded backoff. Removing flagged secret content or repairing unsupported conflicts permits a fresh inspection; unchanged blocks do not repeatedly call the model. One daemon owns monitoring for each shared canonical agent directory; each computer remains a separate replica. Busy sessions and foreground commands release ownership after draining work.
|
|
215
|
+
Selected-file hints are coalesced after one quiet second. A 60–66 second remote/local check covers missed events. Temporary failures and proven pre-publication edit races use bounded backoff. Removing flagged secret content or repairing unsupported conflicts permits a fresh inspection; unchanged blocks do not repeatedly call the model. One daemon owns monitoring for each shared canonical agent directory; each computer remains a separate replica. Busy sessions and foreground commands release ownership after draining work. After the last registered live client PID for the canonical agent directory exits, the service starts a fixed 30-second grace period unless a valid active-setup after-exit grant keeps it running, then drains work before safe exit. Live passive, disconnected, publishing, and orderly retired PIDs still count; `/reload`, `/new`, fork, and resume do not end shared ownership while their Pi process is alive. A client arriving before shutdown becomes final cancels automatic exit. A valid explicit after-exit grant for the active setup keeps the service running without expanding existing transfer or model permissions; see [Daemon lifetime and unattended permission](./skills/configure-pi-sync/references/configuration.md#daemon-lifetime-and-unattended-permission). Resources never reload automatically.
|
|
212
216
|
|
|
213
217
|
**Check remote status** shows rolling-window allowance, exhausted candidates, accounting capacity and safe recovery actions. These are read-only observations, not permission to dispatch. The observing session's model does not identify another scheduler owner's model. Retained private candidates and accounting are not automatically pruned.
|
|
214
218
|
|
|
@@ -313,7 +317,7 @@ Read the [settings reference](./skills/configure-pi-sync/references/configuratio
|
|
|
313
317
|
| `/sync migrate-state` | Migrate the legacy local state directory. |
|
|
314
318
|
| `/sync unlock --stale` | Recover an abandoned local lock after guarded ownership checks. |
|
|
315
319
|
|
|
316
|
-
Use the installed CLI, `sync-daemon stop --root <agent-directory>` or `sync-daemon restart --root <agent-directory>`, for explicit service lifecycle control; these are not `/sync daemon` actions. Stop drains the service; reload Pi to reattach its session afterward. See [lifetime and recovery](./docs/daemon-migration.md).
|
|
320
|
+
Use the installed CLI, `pi-sync-daemon stop --root <agent-directory>` or `pi-sync-daemon restart --root <agent-directory>`, for explicit service lifecycle control; these are not `/sync daemon` actions. Stop drains the service; reload Pi to reattach its session afterward. Explicit CLI start without clients also follows the 30-second grace policy. The next eligible interactive client or explicit command can restart only after the old owner's exit is proven; print/JSON never launch a service. Uncertain consent, failed revocation, or cleanup failure remains paused for the existing repair/revocation path, not silently cleared by automatic restart. No new setting, environment variable, or keep-alive flag is added. See [lifetime and recovery](./docs/daemon-migration.md).
|
|
317
321
|
|
|
318
322
|
All routes support TUI and RPC; RPC settings and included-content screens are read-only.
|
|
319
323
|
Print and JSON modes reject `/sync`.
|
|
@@ -410,7 +414,7 @@ The [exclude policy safety audit](./docs/exclude-policy-audit.md) maps implement
|
|
|
410
414
|
|
|
411
415
|
The generated runtime is built from `src/index.ts` and does not import back into `src`.
|
|
412
416
|
Internal modules use direct imports from their owners; `src/sync.ts` and `src/types.ts` retain compatibility exports.
|
|
413
|
-
Engine implementation lives in the non-extension `@narumitw/sync-daemon` dependency; Pi uses its documented exports, without an in-process transfer fallback. First-use UI and setup implementations remain lazy.
|
|
417
|
+
Engine implementation lives in the non-extension `@narumitw/pi-sync-daemon` dependency; Pi uses its documented exports, without an in-process transfer fallback. First-use UI and setup implementations remain lazy.
|
|
414
418
|
|
|
415
419
|
## 🔎 Keywords
|
|
416
420
|
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
syncSessionsWarnings,
|
|
17
17
|
syncSetupReviewIdentity,
|
|
18
18
|
syncSetupStorageReview
|
|
19
|
-
} from "@narumitw/sync-daemon/engine/settings/config";
|
|
19
|
+
} from "@narumitw/pi-sync-daemon/engine/settings/config";
|
|
20
20
|
|
|
21
21
|
export {
|
|
22
22
|
loadConfig,
|
|
@@ -29,4 +29,4 @@ export {
|
|
|
29
29
|
syncSessionsWarnings,
|
|
30
30
|
syncSetupReviewIdentity
|
|
31
31
|
};
|
|
32
|
-
//# sourceMappingURL=chunk-
|
|
32
|
+
//# sourceMappingURL=chunk-277VHM2P.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 isEnabled,\n isExplicitlyEnabled,\n loadConfig,\n loadConfigForCheck,\n loadPartialConfig,\n sessionTokenWarnings,\n syncCheckConfigFingerprint,\n syncConfigReviewFingerprint,\n syncConfigReviewIdentity,\n syncSessionsWarnings,\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,OACK;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -19,11 +19,11 @@ import {
|
|
|
19
19
|
withConfigReplacementInstalledHookForTest,
|
|
20
20
|
withLocalConfigFileLock,
|
|
21
21
|
withMissingConfigReadProbeHookForTest
|
|
22
|
-
} from "@narumitw/sync-daemon/engine/settings/config-file";
|
|
22
|
+
} from "@narumitw/pi-sync-daemon/engine/settings/config-file";
|
|
23
23
|
|
|
24
24
|
export {
|
|
25
25
|
activeLocalConfigPath,
|
|
26
26
|
createLocalConfigDocument,
|
|
27
27
|
localConfigPath
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=chunk-
|
|
29
|
+
//# sourceMappingURL=chunk-6W2SNZ5P.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/settings/config-file.ts"],
|
|
4
|
+
"sourcesContent": ["export type * from \"@narumitw/pi-sync-daemon/engine/settings/config-file\";\nexport {\n activeLocalConfigPath,\n consumeLocalConfigMigrationNotice,\n createLocalConfigDocument,\n legacyLocalConfigPath,\n localConfigPath,\n quarantineAndRemoveConfigIfMatches,\n readActiveLocalConfigDocumentForRepair,\n readMigratingLocalConfigDocument,\n replaceLocalConfigDocument,\n updateLocalConfigDocument,\n withConfigFilePublicationForTest,\n withConfigPublicationReadyHookForTest,\n withConfigQuarantinedHookForTest,\n withConfigReplacementInstalledHookForTest,\n withLocalConfigFileLock,\n withMissingConfigReadProbeHookForTest,\n} from \"@narumitw/pi-sync-daemon/engine/settings/config-file\";\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
|
+
}
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
saveNewV3Settings,
|
|
12
12
|
updateStorageConnection,
|
|
13
13
|
updateSyncSetup
|
|
14
|
-
} from "@narumitw/sync-daemon/engine/settings/settings-management";
|
|
14
|
+
} from "@narumitw/pi-sync-daemon/engine/settings/settings-management";
|
|
15
15
|
|
|
16
16
|
export {
|
|
17
17
|
addStorageConnection,
|
|
@@ -23,4 +23,4 @@ export {
|
|
|
23
23
|
updateStorageConnection,
|
|
24
24
|
updateSyncSetup
|
|
25
25
|
};
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
26
|
+
//# sourceMappingURL=chunk-EMRFVLZM.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/settings/settings-management.ts"],
|
|
4
|
+
"sourcesContent": ["export type * from \"@narumitw/pi-sync-daemon/engine/settings/settings-management\";\nexport {\n addStorageConnection,\n addSyncSetup,\n removeStorageConnection,\n removeSyncSetup,\n SyncSetupReviewChangedError,\n saveNewV3Settings,\n updateStorageConnection,\n updateSyncSetup,\n} from \"@narumitw/pi-sync-daemon/engine/settings/settings-management\";\n"],
|
|
5
|
+
"mappings": ";;;;AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
compileSyncExclude,
|
|
7
7
|
normalizeSyncExclude,
|
|
8
8
|
sameSyncExclude
|
|
9
|
-
} from "@narumitw/sync-daemon/engine/sync/exclude-policy";
|
|
9
|
+
} from "@narumitw/pi-sync-daemon/engine/sync/exclude-policy";
|
|
10
10
|
|
|
11
11
|
export {
|
|
12
12
|
normalizeSyncExclude,
|
|
13
13
|
sameSyncExclude
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=chunk-
|
|
15
|
+
//# sourceMappingURL=chunk-HEB6YT64.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/sync/exclude-policy.ts"],
|
|
4
|
+
"sourcesContent": ["export type * from \"@narumitw/pi-sync-daemon/engine/sync/exclude-policy\";\nexport {\n compileSyncExclude,\n normalizeSyncExclude,\n sameSyncExclude,\n} from \"@narumitw/pi-sync-daemon/engine/sync/exclude-policy\";\n"],
|
|
5
|
+
"mappings": ";;;;AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -239,7 +239,7 @@ function usage() {
|
|
|
239
239
|
`Automatic sync: ${AUTOMATIC_SYNC_DESCRIPTION}`,
|
|
240
240
|
`Startup transfer: ${STARTUP_TRANSFER_DESCRIPTION}`,
|
|
241
241
|
"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.",
|
|
242
|
-
"Continuous sync is a separate default-Off opt-in in Settings. It requires Autonomous sync and can incur recurring network/model costs.
|
|
242
|
+
"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.",
|
|
243
243
|
"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."
|
|
244
244
|
].join("\n");
|
|
245
245
|
}
|
|
@@ -256,4 +256,4 @@ export {
|
|
|
256
256
|
resolveSyncCommand,
|
|
257
257
|
usage
|
|
258
258
|
};
|
|
259
|
-
//# sourceMappingURL=chunk-
|
|
259
|
+
//# sourceMappingURL=chunk-HLCML3OW.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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|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\", \"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 `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. The service survives Pi exit, but zero-client work requires separately reviewed /sync daemon allow-after-exit permission. 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"],
|
|
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|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\", \"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 `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
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,qB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AG,MAAM,qBAAqB,aAAa,IAAI,KAAK;AAC9E,MAAI,CAAC,QAAQ;AACX,QAAI,GAAG,OAAO,uBAAuB,MAAM;AAC3C,WAAO;AAAA,EACT;AACA,SAAO,EAAE,YAAY,UAAU,MAAM,CAAC,MAAM,EAAE;AAChD;AAEO,SAAS,QAAQ;AACtB,QAAM,WAAW,cAAc;AAAA,IAC7B,CAAC,YAAY,GAAG,QAAQ,IAAI,GAAG,iBAAiB,UAAU,QAAQ,cAAc,EAAE;AAAA,EACpF,EAAE,KAAK,IAAI;AACX,SAAO;AAAA,IACL;AAAA,IACA,aAAa,QAAQ;AAAA,IACrB,mBAAmB,0BAA0B;AAAA,IAC7C,qBAAqB,4BAA4B;AAAA,IACjD;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,KAAK,IAAI;AACb;",
|
|
6
6
|
"names": ["matches", "current"]
|
|
7
7
|
}
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
import {
|
|
4
4
|
runCancellableOperation,
|
|
5
5
|
showRemoteSelectionReview
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SE7HHBKH.ts";
|
|
7
7
|
import {
|
|
8
8
|
loadConfig,
|
|
9
9
|
syncConfigReviewIdentity
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-277VHM2P.ts";
|
|
11
11
|
import {
|
|
12
12
|
errorMessage
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ZIL6PW5L.ts";
|
|
14
14
|
import {
|
|
15
15
|
safeTerminalText
|
|
16
16
|
} from "./chunk-2JNFEZ3V.ts";
|
|
@@ -206,4 +206,4 @@ async function dispatchManagerResult(ctx, initialResult, origin, runRoute, signa
|
|
|
206
206
|
export {
|
|
207
207
|
dispatchManagerResult
|
|
208
208
|
};
|
|
209
|
-
//# sourceMappingURL=chunk-
|
|
209
|
+
//# sourceMappingURL=chunk-IGDI5CIH.ts.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
|
|
3
3
|
|
|
4
4
|
// src/sync/sync-error-guidance.ts
|
|
5
|
-
import { syncErrorGuidance } from "@narumitw/sync-daemon/engine/sync/sync-error-guidance";
|
|
5
|
+
import { syncErrorGuidance } from "@narumitw/pi-sync-daemon/engine/sync/sync-error-guidance";
|
|
6
6
|
|
|
7
7
|
// src/ui/automatic-sync-summary.ts
|
|
8
8
|
function automaticSyncSummary(enabled) {
|
|
@@ -13,4 +13,4 @@ export {
|
|
|
13
13
|
syncErrorGuidance,
|
|
14
14
|
automaticSyncSummary
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
16
|
+
//# sourceMappingURL=chunk-KPWZNMKM.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/sync/sync-error-guidance.ts", "../../src/ui/automatic-sync-summary.ts"],
|
|
4
|
+
"sourcesContent": ["export type * from \"@narumitw/pi-sync-daemon/engine/sync/sync-error-guidance\";\nexport { syncErrorGuidance } from \"@narumitw/pi-sync-daemon/engine/sync/sync-error-guidance\";\n", "/** Keep the setting's automatic transfer scope visible in every setup summary. */\nexport function automaticSyncSummary(enabled: boolean) {\n return enabled ? \"On (startup check; shutdown pushes selected content if sessions included)\" : \"Off\";\n}\n"],
|
|
5
|
+
"mappings": ";;;;AACA,SAAS,yBAAyB;;;ACA3B,SAAS,qBAAqB,SAAkB;AACrD,SAAO,UAAU,8EAA8E;AACjG;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -8,38 +8,38 @@ import {
|
|
|
8
8
|
ownRecord,
|
|
9
9
|
requiredString,
|
|
10
10
|
validateConfigName
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OA4NZLSL.ts";
|
|
12
12
|
import {
|
|
13
13
|
automaticSyncSummary,
|
|
14
14
|
syncErrorGuidance
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-KPWZNMKM.ts";
|
|
16
16
|
import {
|
|
17
17
|
configuredSyncSetupNames,
|
|
18
18
|
readLocalConfigObject
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-WP2M67XZ.ts";
|
|
20
20
|
import {
|
|
21
21
|
AUTOMATIC_SYNC_DESCRIPTION,
|
|
22
22
|
setSyncSetupCompletions
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-HLCML3OW.ts";
|
|
24
24
|
import {
|
|
25
25
|
throwIfAborted
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-S3R3W3KF.ts";
|
|
27
27
|
import {
|
|
28
28
|
addStorageConnection,
|
|
29
29
|
addSyncSetup,
|
|
30
30
|
saveNewV3Settings,
|
|
31
31
|
updateStorageConnection,
|
|
32
32
|
updateSyncSetup
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-EMRFVLZM.ts";
|
|
34
34
|
import {
|
|
35
35
|
errorMessage
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-ZIL6PW5L.ts";
|
|
37
37
|
import {
|
|
38
38
|
safeTerminalText
|
|
39
39
|
} from "./chunk-2JNFEZ3V.ts";
|
|
40
40
|
import {
|
|
41
41
|
DEFAULT_SYNC_INCLUDE
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-V4AMI3VL.ts";
|
|
43
43
|
|
|
44
44
|
// src/commands/setup-completions.ts
|
|
45
45
|
async function refreshTargetCompletions() {
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
normalizeGitRemote,
|
|
54
54
|
normalizeGitRemoteIdentity,
|
|
55
55
|
validateGitNamespace
|
|
56
|
-
} from "@narumitw/sync-daemon/engine/backends/git/git-config";
|
|
56
|
+
} from "@narumitw/pi-sync-daemon/engine/backends/git/git-config";
|
|
57
57
|
|
|
58
58
|
// src/ui/setup/text-input.ts
|
|
59
59
|
async function requiredExistingBucket(ctx, example, signal) {
|
|
@@ -788,7 +788,7 @@ import {
|
|
|
788
788
|
normalizeWebDavUrl,
|
|
789
789
|
validateWebDavCredentials,
|
|
790
790
|
validateWebDavNamespace
|
|
791
|
-
} from "@narumitw/sync-daemon/engine/backends/webdav/webdav-config";
|
|
791
|
+
} from "@narumitw/pi-sync-daemon/engine/backends/webdav/webdav-config";
|
|
792
792
|
|
|
793
793
|
// src/ui/setup/webdav-ui.ts
|
|
794
794
|
async function showWebDavSetup(ctx, targetName, signal) {
|
|
@@ -1039,4 +1039,4 @@ export {
|
|
|
1039
1039
|
showAddWebDavStorageProfile,
|
|
1040
1040
|
showEditWebDavStorageProfile
|
|
1041
1041
|
};
|
|
1042
|
-
//# sourceMappingURL=chunk-
|
|
1042
|
+
//# sourceMappingURL=chunk-LAXTCSX4.ts.map
|