@narumitw/pi-sync 0.67.3 → 0.68.1
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 +13 -0
- package/README.md +26 -48
- package/dist/chunks/{chunk-XUZV4OGI.ts → chunk-335XTMMZ.ts} +3 -2
- package/dist/chunks/{chunk-XUZV4OGI.ts.map → chunk-335XTMMZ.ts.map} +2 -2
- package/dist/chunks/{chunk-PUSMSKIM.ts → chunk-AYGMIMCV.ts} +2 -11
- package/dist/chunks/chunk-AYGMIMCV.ts.map +7 -0
- package/dist/chunks/{chunk-HLJIRWFL.ts → chunk-BCDBT4X3.ts} +7 -7
- package/dist/chunks/{chunk-AVTW6WNP.ts → chunk-FQKWGVMA.ts} +20 -54
- package/dist/chunks/chunk-FQKWGVMA.ts.map +7 -0
- package/dist/chunks/{chunk-DGVZYS7T.ts → chunk-FR6A7ASZ.ts} +8 -11
- package/dist/chunks/chunk-FR6A7ASZ.ts.map +7 -0
- package/dist/chunks/{chunk-3NS4PMCI.ts → chunk-J52GYZO6.ts} +2 -8
- package/dist/chunks/{chunk-3NS4PMCI.ts.map → chunk-J52GYZO6.ts.map} +2 -2
- package/dist/chunks/{chunk-2MUAR5GH.ts → chunk-KAIVTJIQ.ts} +7 -10
- package/dist/chunks/chunk-KAIVTJIQ.ts.map +7 -0
- package/dist/chunks/{chunk-WBIOSK76.ts → chunk-R7PN3KIY.ts} +1 -2
- package/dist/chunks/{chunk-3Q3DMMID.ts → chunk-TLYT6HVI.ts} +8 -8
- package/dist/chunks/{chunk-X344HTVV.ts → chunk-WCGLU526.ts} +39 -118
- package/dist/chunks/chunk-WCGLU526.ts.map +7 -0
- package/dist/chunks/{chunk-CQ4DMLH3.ts → chunk-WQXUZSY5.ts} +25 -83
- package/dist/chunks/chunk-WQXUZSY5.ts.map +7 -0
- package/dist/chunks/{chunk-JREGWM2B.ts → chunk-XNUARYLR.ts} +1 -2
- package/dist/chunks/{command-handler-WF2TDDRZ.ts → command-handler-5LDTCUJE.ts} +64 -59
- package/dist/chunks/command-handler-5LDTCUJE.ts.map +7 -0
- package/dist/chunks/{conflict-review-GWEL4S6C.ts → conflict-review-SZ3AWTX6.ts} +2 -2
- package/dist/chunks/{file-selection-GASCVN45.ts → file-selection-4BOQBXS7.ts} +10 -17
- package/dist/chunks/file-selection-4BOQBXS7.ts.map +7 -0
- package/dist/chunks/{manager-result-dispatcher-BXN46NRC.ts → manager-result-dispatcher-A4IWLS4J.ts} +7 -7
- package/dist/chunks/{manager-ui-FS4QIKRA.ts → manager-ui-KHMCSLLV.ts} +114 -581
- package/dist/chunks/manager-ui-KHMCSLLV.ts.map +7 -0
- package/dist/chunks/{chunk-ECUCXF5Y.ts → merge-review-LWMUE5IW.ts} +2 -3
- package/dist/chunks/{remote-selection-ui-DOYKUMER.ts → remote-selection-ui-F6NJBQ3Y.ts} +6 -6
- package/dist/chunks/{setup-switch-JZDFQPVW.ts → setup-switch-7LMIRMZ7.ts} +6 -6
- package/dist/chunks/{setup-wizard-PI45SF2C.ts → setup-wizard-2NRPR433.ts} +11 -16
- package/dist/chunks/{setup-wizard-PI45SF2C.ts.map → setup-wizard-2NRPR433.ts.map} +1 -1
- package/dist/chunks/{sync-inspection-DI5J6EUH.ts → sync-inspection-OTI4JDQ2.ts} +5 -5
- package/dist/chunks/{sync-operations-AGNL7QXA.ts → sync-operations-ZUYJLWUN.ts} +2 -2
- package/dist/daemon/dist/build-id.json +1 -1
- package/dist/daemon/dist/cli.js +22 -3
- package/dist/daemon/dist/client-transport.js +2 -0
- package/dist/daemon/dist/client.js +2 -10
- package/dist/daemon/dist/consent.js +13 -135
- package/dist/daemon/dist/engine/backends/git/git-backend.js +4 -17
- package/dist/daemon/dist/engine/backends/git/git-storage.js +11 -44
- package/dist/daemon/dist/engine/backends/s3/s3-backend.js +6 -6
- package/dist/daemon/dist/engine/backends/webdav/webdav-backend.js +6 -6
- package/dist/daemon/dist/engine/settings/config.js +16 -149
- package/dist/daemon/dist/engine/settings/retired-ignore-policy.js +16 -0
- package/dist/daemon/dist/engine/settings/retired-ignore-recovery.js +14 -0
- package/dist/daemon/dist/engine/settings/settings-management.js +2 -10
- package/dist/daemon/dist/engine/settings/settings-validation.js +8 -21
- package/dist/daemon/dist/engine/snapshot/session-paths.js +13 -41
- package/dist/daemon/dist/engine/snapshot/snapshot-apply.js +8 -24
- package/dist/daemon/dist/engine/snapshot/snapshot-codec.js +7 -11
- package/dist/daemon/dist/engine/snapshot/snapshot-exclude-safety.js +19 -76
- package/dist/daemon/dist/engine/snapshot/snapshot-transaction-images.js +1 -7
- package/dist/daemon/dist/engine/snapshot/snapshot-transaction-policy.js +8 -102
- package/dist/daemon/dist/engine/snapshot/snapshot-transaction.js +20 -100
- package/dist/daemon/dist/engine/snapshot/snapshot-types.js +1 -11
- package/dist/daemon/dist/engine/snapshot/snapshot.js +26 -78
- package/dist/daemon/dist/engine/state/sync-state-store.js +5 -1
- package/dist/daemon/dist/engine/sync/agent-plan.js +0 -1
- package/dist/daemon/dist/engine/sync/agent-policy.js +1 -1
- package/dist/daemon/dist/engine/sync/conflict-review.js +0 -2
- package/dist/daemon/dist/engine/sync/continuous-sync.js +2 -17
- package/dist/daemon/dist/engine/sync/continuous-watch.js +3 -7
- package/dist/daemon/dist/engine/sync/directional-action.js +3 -21
- package/dist/daemon/dist/engine/sync/initialization.js +4 -15
- package/dist/daemon/dist/engine/sync/local-fields.js +4 -65
- package/dist/daemon/dist/engine/sync/merge-apply.js +8 -31
- package/dist/daemon/dist/engine/sync/merge-journal.js +8 -118
- package/dist/daemon/dist/engine/sync/merged-sync.js +12 -70
- package/dist/daemon/dist/engine/sync/push-review.js +1 -16
- package/dist/daemon/dist/engine/sync/remote-snapshot.js +48 -65
- package/dist/daemon/dist/engine/sync/startup-bootstrap.js +3 -3
- package/dist/daemon/dist/engine/sync/sync-error-guidance.js +1 -1
- package/dist/daemon/dist/engine/sync/sync-inspection.js +1 -2
- package/dist/daemon/dist/engine/sync/sync-mutations.js +25 -118
- package/dist/daemon/dist/engine/sync/sync-policy.js +26 -150
- package/dist/daemon/dist/engine/sync/sync-queries.js +81 -65
- package/dist/daemon/dist/engine/sync/sync-rollback.js +12 -50
- package/dist/daemon/dist/engine/sync/sync-state.js +2 -15
- package/dist/daemon/dist/engine/sync/transfer-freshness.js +7 -17
- package/dist/daemon/dist/engine/sync/transfer-size-limits.js +3 -7
- package/dist/daemon/dist/engine/ui/sync-format.js +1 -1
- package/dist/daemon/dist/engine-service.js +60 -219
- package/dist/daemon/dist/foreground-queue-outcome.js +0 -4
- package/dist/daemon/dist/legacy-consent-guard.js +34 -0
- package/dist/daemon/dist/server.js +4 -8
- package/dist/daemon/dist/service-host.js +4 -10
- package/dist/daemon/package.json +1 -1
- package/dist/index.ts +45 -46
- package/dist/index.ts.map +3 -3
- package/docs/continuous-sync-verification.md +1 -1
- package/docs/daemon-migration.md +7 -5
- package/docs/tui-contract.md +4 -6
- package/package.json +2 -3
- package/skills/configure-pi-sync/SKILL.md +18 -77
- package/skills/configure-pi-sync/references/configuration.md +60 -77
- package/src/commands/command-execution.ts +13 -29
- package/src/commands/command-handler.ts +0 -4
- package/src/commands/command.ts +2 -1
- package/src/daemon/directional-recovery.ts +4 -33
- package/src/daemon/pi-client.ts +28 -90
- package/src/settings/config.ts +0 -1
- package/src/sync/setup-switch.ts +1 -4
- package/src/sync-extension.ts +10 -24
- package/src/ui/cancellable-operation.ts +2 -13
- package/src/ui/excluded-paths-ui.ts +1 -4
- package/src/ui/file-selection.ts +0 -5
- package/src/ui/manager-state.ts +12 -75
- package/src/ui/manager-ui.ts +7 -96
- package/src/ui/remote-selection-ui.ts +29 -130
- package/src/ui/settings-ui.ts +169 -388
- package/src/ui/setup/setup-actions.ts +4 -16
- package/src/ui/setup/setup-prompts.ts +12 -49
- package/src/ui/setup/setup-switcher.ts +8 -14
- package/src/ui/storage-connections-ui.ts +21 -32
- package/src/ui/sync-setups-ui.ts +27 -53
- package/dist/chunks/chunk-2MUAR5GH.ts.map +0 -7
- package/dist/chunks/chunk-33EDXDLC.ts +0 -106
- package/dist/chunks/chunk-33EDXDLC.ts.map +0 -7
- package/dist/chunks/chunk-AVTW6WNP.ts.map +0 -7
- package/dist/chunks/chunk-CQ4DMLH3.ts.map +0 -7
- package/dist/chunks/chunk-DGVZYS7T.ts.map +0 -7
- package/dist/chunks/chunk-EJDDRS6O.ts +0 -17
- package/dist/chunks/chunk-EJDDRS6O.ts.map +0 -7
- package/dist/chunks/chunk-KNEUL4XN.ts +0 -30
- package/dist/chunks/chunk-KNEUL4XN.ts.map +0 -7
- package/dist/chunks/chunk-PUSMSKIM.ts.map +0 -7
- package/dist/chunks/chunk-WFBHWYI6.ts +0 -18
- package/dist/chunks/chunk-WFBHWYI6.ts.map +0 -7
- package/dist/chunks/chunk-X344HTVV.ts.map +0 -7
- package/dist/chunks/command-handler-WF2TDDRZ.ts.map +0 -7
- package/dist/chunks/config-P54GGMXY.ts +0 -39
- package/dist/chunks/continuous-record-3SKJ6I3V.ts +0 -23
- package/dist/chunks/continuous-record-3SKJ6I3V.ts.map +0 -7
- package/dist/chunks/continuous-storage-3EU6I7Z3.ts +0 -27
- package/dist/chunks/continuous-storage-3EU6I7Z3.ts.map +0 -7
- package/dist/chunks/file-selection-GASCVN45.ts.map +0 -7
- package/dist/chunks/ignore-file-ui-BEZZZIEE.ts +0 -21
- package/dist/chunks/manager-ui-FS4QIKRA.ts.map +0 -7
- package/dist/chunks/merge-review-C2KETZKY.ts +0 -11
- package/dist/chunks/merge-review-C2KETZKY.ts.map +0 -7
- package/dist/chunks/remote-selection-ui-DOYKUMER.ts.map +0 -7
- package/dist/chunks/setup-switch-JZDFQPVW.ts.map +0 -7
- package/dist/daemon/dist/engine/ignore/adoption-journal.js +0 -146
- package/dist/daemon/dist/engine/ignore/effective-ignore-policy.js +0 -33
- package/dist/daemon/dist/engine/ignore/ignore-edit.js +0 -102
- package/dist/daemon/dist/engine/ignore/ignore-initialization.js +0 -288
- package/dist/daemon/dist/engine/ignore/ignore-migration-prompt.js +0 -139
- package/dist/daemon/dist/engine/ignore/ignore-settings.js +0 -391
- package/dist/daemon/dist/engine/ignore/ignore-source.js +0 -250
- package/dist/daemon/dist/engine/ignore/snapshot-ignore-rules.js +0 -39
- package/dist/daemon/dist/engine/sync/ignore-adoption-recovery.js +0 -50
- package/dist/daemon/dist/engine/sync/ignore-adoption.js +0 -416
- package/dist/daemon/dist/engine/sync/ignore-publication.js +0 -23
- package/dist/daemon/dist/engine/ui/ignore-rule-preview.js +0 -18
- package/dist/daemon/dist/monitor.js +0 -344
- package/src/ui/agent-mode-setting.ts +0 -99
- package/src/ui/ignore-file-guidance.ts +0 -7
- package/src/ui/ignore-file-ui.ts +0 -105
- package/src/ui/ignore-migration-prompt.ts +0 -65
- package/src/ui/settings-review.ts +0 -26
- /package/dist/chunks/{chunk-HLJIRWFL.ts.map → chunk-BCDBT4X3.ts.map} +0 -0
- /package/dist/chunks/{chunk-WBIOSK76.ts.map → chunk-R7PN3KIY.ts.map} +0 -0
- /package/dist/chunks/{chunk-3Q3DMMID.ts.map → chunk-TLYT6HVI.ts.map} +0 -0
- /package/dist/chunks/{chunk-JREGWM2B.ts.map → chunk-XNUARYLR.ts.map} +0 -0
- /package/dist/chunks/{conflict-review-GWEL4S6C.ts.map → conflict-review-SZ3AWTX6.ts.map} +0 -0
- /package/dist/chunks/{config-P54GGMXY.ts.map → manager-result-dispatcher-A4IWLS4J.ts.map} +0 -0
- /package/dist/chunks/{chunk-ECUCXF5Y.ts.map → merge-review-LWMUE5IW.ts.map} +0 -0
- /package/dist/chunks/{ignore-file-ui-BEZZZIEE.ts.map → remote-selection-ui-F6NJBQ3Y.ts.map} +0 -0
- /package/dist/chunks/{manager-result-dispatcher-BXN46NRC.ts.map → setup-switch-7LMIRMZ7.ts.map} +0 -0
- /package/dist/chunks/{sync-inspection-DI5J6EUH.ts.map → sync-inspection-OTI4JDQ2.ts.map} +0 -0
- /package/dist/chunks/{sync-operations-AGNL7QXA.ts.map → sync-operations-ZUYJLWUN.ts.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @narumitw/pi-sync
|
|
2
2
|
|
|
3
|
+
## 0.68.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4148b42: Make Diagnostics and Check remote status easier to scan. Keep report line breaks in TUI and RPC, put comparison results and diagnostic warnings first, and group storage and content details separately.
|
|
8
|
+
|
|
9
|
+
## 0.68.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 6ca6931: Breaking: retire Autonomous sync, Continuous sync, model-assisted conflict resolution, and unattended sync. Existing `sync.agentMode` and `sync.continuous` settings remain readable but have no effect. Reviewed manual sync, Automatic sync, and Startup transfer retain their existing rules. Drain and replace older daemons safely; revoke retained after-exit grants if they block an upgrade.
|
|
14
|
+
- 6c092c4: Breaking: remove `.syncignore` and custom ignore-file policies. New setups recommend Selected paths; agent-directory scope with explicit exclusions remains available. Existing ignore-file settings, snapshot versions 6 and 7, and pending ignore-file recovery stop without converting or deleting data. Run `/skill:configure-pi-sync` for manual recovery guidance before resuming sync.
|
|
15
|
+
|
|
3
16
|
## 0.67.3
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -16,9 +16,9 @@ Reusable storage connections hold credentials, while named sync setups define ex
|
|
|
16
16
|
- Keeps snapshot selection portable and free of credentials.
|
|
17
17
|
- Offers opt-in file and directory size limits for new local applies and remote publications.
|
|
18
18
|
- Writes settings atomically, preserves unknown fields, rejects stale edits, and fails closed on unsafe configuration.
|
|
19
|
-
- Offers
|
|
19
|
+
- Offers an opt-in, one-shot startup transfer when the setup has an accepted baseline and no conflicts.
|
|
20
20
|
- Shares one detached synchronization service across Pi clients, with a generated split UI client runtime.
|
|
21
|
-
- Bundles an on-demand skill for configuration questions and
|
|
21
|
+
- Bundles an on-demand skill for configuration questions and authorized local settings edits.
|
|
22
22
|
|
|
23
23
|
## 📦 Install
|
|
24
24
|
|
|
@@ -62,7 +62,7 @@ All new setups default to storage path `./`: the Git repository root, the WebDAV
|
|
|
62
62
|
Git also suggests branch `main`.
|
|
63
63
|
Use different folders or prefixes for independent setups sharing a WebDAV collection or bucket; existing settings and paths are unchanged.
|
|
64
64
|
If another configured setup already uses the chosen location, setup asks for a different path before the content selection and review; Git requires a different branch, even when the directory differs.
|
|
65
|
-
|
|
65
|
+
New setups recommend **Selected paths**: choose the files and folders to sync. **Agent directory** can include eligible current and future files unless excluded. Sessions require a separate opt-in. Choose **Join an existing remote** to save with sessions and automatic sync off, then review its policy.
|
|
66
66
|
Before saving, review the exact destination, scope and rules, automatic-sync choice, and hidden-credential summary. R2/S3 always asks for an existing bucket; an example bucket name is not a default.
|
|
67
67
|
|
|
68
68
|
Invalid fields ask for a correction without restarting setup. A temporary local save failure keeps the review for another Save; changed settings require reopening and reviewing the current values. Saving writes local settings and may create a starter rule file. It does not start a transfer or grant permission for one. A connection saved through **Add a new storage connection…** remains saved if you later cancel the setup.
|
|
@@ -93,17 +93,17 @@ The summary distinguishes cached observations, recorded background state, and th
|
|
|
93
93
|
After Pi Sync detects an included-content mismatch, the manager shows **Sync status: Review needed** and puts **Review synced content (recommended)** first.
|
|
94
94
|
**Sync now** remains unavailable until you review the mismatch.
|
|
95
95
|
Opening the manager does not make another remote request.
|
|
96
|
-
**Settings** opens **Pi Sync Settings** directly as one searchable list. It shows the content-policy controls for the current setup.
|
|
96
|
+
**Settings** opens **Pi Sync Settings** directly as one searchable list. It shows the content-policy controls for the current setup. Compare the remote path policy separately from file contents. **Storage location** edits only the current setup's bucket, branch, or path; it does not change the connection or included content. **Manage sync setups** and **Manage storage connections** open the existing catalogs. Connections hold reusable server addresses and sign-in details, and edits show every affected setup. Make another setup current before changing its preferences. Each description identifies the setup, device-wide, or shared-connection scope. Simple preferences report saving and durable save results; Back does not undo saved changes. Complex editors and risky changes retain their reviews. RPC reports the manual settings path and preserves catalog management without opening the TUI preference editor.
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
**Diagnostics** asks for confirmation before checking configuration and storage. `/sync doctor` remains the direct route. S3/R2 performs a read-only request: success does not prove write access or snapshot validity, and an ambiguous 404 does not prove a bucket is missing. Check the indicated credentials, address, bucket, or path before retrying. Git checks remote reads and the local cache, not write access. WebDAV uses an isolated write/cleanup probe and repairs the active snapshot's history entry if missing. **History** opens the snapshot list directly for reviewed rollback. Recorded unresolved groups have a separate **Review unresolved conflicts** action.
|
|
99
99
|
|
|
100
100
|
On secondary menus, **Back** and Escape return to the previous screen. In setup inputs and save reviews, cancellation (including Ctrl+C) discards the current unsaved draft and returns to its owning menu. Session replacement or shutdown closes the owning flow.
|
|
101
101
|
Specialized operation and masked-credential prompts show the effective cancellation bindings and keep Ctrl+C as a hard-cancel input when Back is remapped.
|
|
102
|
-
Other destructive, credential-bearing, and externally visible actions show previews and confirmations where applicable.
|
|
102
|
+
Other destructive, credential-bearing, and externally visible actions show previews and confirmations where applicable. Automatic transfers require their own authorization.
|
|
103
103
|
|
|
104
104
|
### Review transfer changes
|
|
105
105
|
|
|
106
|
-
Unless
|
|
106
|
+
Unless another explicit transfer authorization applies, a merged **Sync now** transfer shows one confirmation with separate local and remote file changes, remote snapshot publication, session inclusion, and unresolved groups. **No, cancel** is initially selected in TUI mode. Up and Down select actions without scrolling the summary. If the summary does not fit, use Page Up and Page Down (or their configured selection-page bindings) to review it before confirming **Yes**. A terminal resize resets the review and selects **No**. Cancellation remains available throughout. This scrollable summary intentionally replaces Kit's clipped choice context, and the safe default differs from Pi's native Yes-first confirmation.
|
|
107
107
|
|
|
108
108
|
In TUI, select **Yes** from the first confirmation to proceed. **View details** is optional and shows the complete add/update/delete lists and unresolved paths. It cannot apply changes. Escape returns to confirmation with **No** selected; Ctrl+C cancels the whole TUI flow. RPC can show details in bounded pages and can require opening them first. RPC offers No first but the client controls visual selection, and protocol cancellation from details returns to confirmation. Session replacement or shutdown closes the flow; local files and remote state are rechecked before transfer.
|
|
109
109
|
|
|
@@ -175,7 +175,7 @@ Print and JSON modes do not support `/sync` because UI output is not observable
|
|
|
175
175
|
|
|
176
176
|
Run `/sync` → **Set up sync** to create the canonical private user file at `<getAgentDir()>/pi-sync.json` (normally `~/.pi/agent/pi-sync.json`).
|
|
177
177
|
Use **Settings** to manage an existing setup.
|
|
178
|
-
Missing settings stay unconfigured without creating files or locks.
|
|
178
|
+
Missing settings stay unconfigured without creating files or locks.
|
|
179
179
|
|
|
180
180
|
Legacy directory scope selects all eligible files, applies `exclude`, then restores matches from `reinclude`. Pi login credentials, project trust, and Pi Sync's own state stay local regardless of those rules. Folder-wide sync may include private files that the secret scan cannot identify. Review the content before transferring to a trusted destination. Existing setups keep their selected paths and are not migrated automatically. See [Agent-directory scope](./skills/configure-pi-sync/references/configuration.md#agent-directory-scope) for formats, precedence, and recovery.
|
|
181
181
|
|
|
@@ -183,7 +183,7 @@ Legacy directory scope selects all eligible files, applies `exclude`, then resto
|
|
|
183
183
|
|
|
184
184
|
### Debug mode
|
|
185
185
|
|
|
186
|
-
Turn on **/sync → Settings → Debug mode**, or set the top-level `"debug": true` in `pi-sync.json`. The default is **Off**. Use `/reload` or start a new Pi session for the client change. The daemon uses the agent directory's setting at its next owner
|
|
186
|
+
Turn on **/sync → Settings → Debug mode**, or set the top-level `"debug": true` in `pi-sync.json`. The default is **Off**. Use `/reload` or start a new Pi session for the client change. The daemon uses the agent directory's setting at its next owner or job boundary without a restart.
|
|
187
187
|
|
|
188
188
|
Both processes append startup timings and selected sync outcomes to the private, local-only `<getAgentDir()>/pi-sync.log` (normally `~/.pi/agent/pi-sync.log`). It uses one JSON record per line; filter by `source` (`pi-sync` or `pi-sync-daemon`). Records omit raw errors, credentials, file contents, and model data. Turning Debug mode Off does not remove the file, and nothing rotates it automatically.
|
|
189
189
|
|
|
@@ -195,41 +195,23 @@ Startup loads command and transfer implementations only when needed. When no tra
|
|
|
195
195
|
|
|
196
196
|
With **Automatic sync** enabled, session startup schedules a background check instead of waiting for a transfer. Pi remains usable while Git, WebDAV, R2, or S3 checks local hashes and remote metadata. Results follow the [status and review classifications](#resolve-conflicts-in-the-manager); check failures provide `/sync` guidance without opening a dialog. Use **Sync now** to start a reviewed transfer, or `/sync status` to retry a check. Foreground `/sync` cancels and drains the background check before starting.
|
|
197
197
|
|
|
198
|
-
Checks run once per session start, including `/reload`, new, resumed, and forked sessions, in TUI and RPC only. Print/JSON skip startup checks. This one-shot policy has no polling or automatic retry loop
|
|
198
|
+
Checks run once per session start, including `/reload`, new, resumed, and forked sessions, in TUI and RPC only. Print/JSON skip startup checks. This one-shot policy has no polling or automatic retry loop. The overall deadline is 30 seconds, followed by underlying cleanup where needed; Git process termination and temporary-ref cleanup can take additional time. Git checks can still fetch objects and update the extension's private bare cache, but never push, apply managed files, update the sync baseline, or reload Pi.
|
|
199
199
|
|
|
200
200
|
**Compatibility change:** the existing `sync.automatic` boolean and Off default are unchanged, but On no longer performs startup push/pull. Startup is not guaranteed to use the latest remote content. Local transaction recovery remains an awaited safety barrier and can restore interrupted file changes before use; existing legacy settings-file initialization is also retained.
|
|
201
201
|
|
|
202
|
-
Shutdown behavior is unchanged: when **Automatic sync** is On and sessions are included, pi-sync can automatically push the selected content, not only session files. This also applies to headless modes; shutdown never opens a dialog, and `/reload` skips this push. Turning the setting Off disables its startup checks and shutdown pushes; separate Startup transfer
|
|
202
|
+
Shutdown behavior is unchanged: when **Automatic sync** is On and sessions are included, pi-sync can automatically push the selected content, not only session files. This also applies to headless modes; shutdown never opens a dialog, and `/reload` skips this push. Turning the setting Off disables its startup checks and shutdown pushes; the separate Startup transfer preference retains its own authorization.
|
|
203
203
|
|
|
204
204
|
<a id="experimental-agent-mode"></a>
|
|
205
205
|
|
|
206
206
|
### Autonomous sync
|
|
207
207
|
|
|
208
|
-
**
|
|
209
|
-
|
|
210
|
-
**Warning:** selected local and remote content can be replaced or deleted without another transfer prompt. Eligible conflict text is sent to the selected Pi model's provider and can incur costs. The resolver has no tools or parent conversation, and validates candidate ownership and current versions before using the existing publication/backup/journal flow. Validation is not a guarantee of semantic correctness or lossless editing against other local processes.
|
|
211
|
-
|
|
212
|
-
The first implementation resolves bounded overlapping `AGENTS.md` and prompt/skill Markdown/plain-text edits, and selects complete atomic global settings units. For `settings.json` packages, it keeps the higher explicit npm SemVer version from local and remote without a registry lookup; incompatible filters and non-comparable sources retain existing conflict handling. Verified ancestors are required. Code, session histories, deletion conflicts and path collisions are not model-resolved; unsupported/refused work pauses, unless existing partial-sync policy permits independent progress. No resources reload automatically. Disabling stops subsequent authorization, not completed writes or provider charges. Read [Autonomous sync settings, limits, privacy and recovery](./skills/configure-pi-sync/references/configuration.md#autonomous-sync) before enabling.
|
|
213
|
-
|
|
214
|
-
See the [TUI behavior contract and wording verification](./docs/tui-contract.md) for settings and review behavior.
|
|
215
|
-
|
|
216
|
-
Ordinary **Sync now** reuses a cached refusal. Use **Retry refused model result…** in the manager to review and authorize one fresh request for the current refusal. If automatic-transfer approval is missing or stale, the retry opens that review first. Approving it saves permission for the enabled automatic modes, but sending conflict evidence again still needs separate confirmation. A retry can incur another charge and does not reset automatic request limits. Known unsupported conflicts stop before inference when partial sync is off. See [retry and cancellation boundaries](./docs/agent-continuous-hardening.md) and the [synthetic merge-quality corpus](./docs/agent-quality-verification.md).
|
|
208
|
+
**Retired:** Pi Sync no longer runs Autonomous sync or sends conflict content to a model. Existing `sync.agentMode` values are accepted but ignored, without rewriting settings. Review changes with **Sync now** or opt into one eligible [startup transfer](#opt-in-automatic-transfer). See the [upgrade and recovery guidance](./skills/configure-pi-sync/references/configuration.md#autonomous-sync) if an older daemon is still running.
|
|
217
209
|
|
|
218
210
|
<a id="experimental-continuous-sync"></a>
|
|
219
211
|
|
|
220
212
|
### Continuous sync
|
|
221
213
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
Removing the last ignore-file setup does not resume Continuous sync in the already attached sessions. To resume it if enabled, close `/sync` and run `/reload` in an attached TUI session, or close and reopen one Pi client.
|
|
225
|
-
|
|
226
|
-
**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.
|
|
227
|
-
|
|
228
|
-
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.
|
|
229
|
-
|
|
230
|
-
**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.
|
|
231
|
-
|
|
232
|
-
**Warning:** local changes and retries can cause extra network requests between polls. Automatic model requests are limited to two per candidate and two per replica binding in a rolling 15-minute window, across restarts. These are request limits, not a currency cap. Safety blocks still require changed evidence or repair; uncertain provider/Git errors are not guessed to be retryable. See [Continuous sync consent, budgets and recovery](./skills/configure-pi-sync/references/configuration.md#continuous-sync).
|
|
214
|
+
**Retired:** Pi Sync ignores existing `sync.continuous` values and no longer watches or polls for recurring transfers. It does not honor retained after-exit grants. Use the [daemon upgrade guide](./docs/daemon-migration.md#ownership-and-upgrade) to clear retained grants and replace older owners safely.
|
|
233
215
|
|
|
234
216
|
### Opt-in automatic transfer
|
|
235
217
|
|
|
@@ -243,9 +225,9 @@ Successful transfers show one summary. They do not reload resources, activate ex
|
|
|
243
225
|
|
|
244
226
|
**Settings → Merge settings fields** controls the per-setup `sync.mergeSettings` opt-in, default **Off**. It combines independent global `settings.json` fields, not arbitrary JSON or keybindings. Missing/corrupt ancestors, unsupported syntax, and incompatible fields retain whole-transfer review. Sensitive accepted content is cached privately under the denied state root; disabling does not delete evidence.
|
|
245
227
|
|
|
246
|
-
**Settings → Machine-local fields** edits explicit `sync.localFields` root field names for global `settings.json` (default none). Excluded values and absence stay local; future portable snapshots omit them. An explicit array requires at least settings version 4 and snapshot version 2;
|
|
228
|
+
**Settings → Machine-local fields** edits explicit `sync.localFields` root field names for global `settings.json` (default none). Excluded values and absence stay local; future portable snapshots omit them. An explicit array requires at least settings version 4 and snapshot version 2; agent-directory scope keeps settings version 7 or later and snapshot version 5. Nonempty rules require `settings.json` in `sync.include` only for selected-path setups. All receiving machines must configure compatible rules. Additions/removals require a separately confirmed force-direction migration, even with `--yes`; old remote history is **not erased**. See [settings merge and local fields](./skills/configure-pi-sync/references/configuration.md#settings-field-merge-and-machine-local-fields) for formats, compatibility and recovery.
|
|
247
229
|
|
|
248
|
-
**Settings → Content merge / partial progress** controls independent `sync.mergeContent` and `sync.partialSync` opt-ins, both default **Off**. Saving opts into at least settings version 5; partial publications use snapshot version 3 for selected paths, version 4 with selected-path exclusions, version 5 for
|
|
230
|
+
**Settings → Content merge / partial progress** controls independent `sync.mergeContent` and `sync.partialSync` opt-ins, both default **Off**. Saving opts into at least settings version 5; partial publications use snapshot version 3 for selected paths, version 4 with selected-path exclusions, or version 5 for agent-directory scope. Older readers must refuse unsupported formats. Supported Markdown/plain-text resources merge bounded independent line edits without Git or conflict markers. Diff grids and hunk comparisons share an eight-million-work-unit budget across the operation and its retries; exhausted paths remain conflicts for review. Same-session reconciliation only accepts validated complete byte-prefix extensions; divergent histories and the loaded session require review. A syntactically clean text merge is **not a semantic correctness guarantee**.
|
|
249
231
|
|
|
250
232
|
Partial sync keeps each side's unresolved versions, preserves their previous accepted hashes/ancestors, and advances only independent paths. Resource/collision dependency groups are withheld together, including local-only files, never represented as deletion. The conditional **Review unresolved conflicts** action, or `/sync conflicts`, opens exact private versions on request and resolves one freshly validated whole group. Automatic pushes, non-forced push/pull, and rollback refuse unresolved groups; use group review or an explicit manual push/pull force direction instead. Artifacts remain below the denied state root, with stable conflict identity and at most 32 proven-completed records retained; unresolved or unrecognized evidence is never automatically pruned. Failed attempts release only newly created artifacts whose inode/content ownership and lack of state/journal references are verified. See [content merge and partial recovery](./docs/content-merge-audit.md).
|
|
251
233
|
|
|
@@ -295,15 +277,11 @@ Version 1, version 2, and non-empty unversioned settings require manual recovery
|
|
|
295
277
|
Adding `sessions` can upload prompts, tool output, paths, images, and secrets; interactive flows require a privacy acknowledgement.
|
|
296
278
|
Startup checks report included-content differences without changing anything. Transfers retain their existing included-content policy checks instead of silently expanding local scope.
|
|
297
279
|
|
|
298
|
-
###
|
|
299
|
-
|
|
300
|
-
These routes require ignore-file support in the running daemon. In TUI, eligible legacy setups can review migration the first time you open `/sync`. **Not now** keeps your existing policy and defers the prompt for that setup. To review it later, use **Settings → Migrate to ignore file…**. Check which local and remote paths enter or leave scope. Directory-wide rules can also include files created later. Review the transfer itself before approving it. An ignore file is not a secret scanner.
|
|
301
|
-
|
|
302
|
-
An existing valid rule file is reused as-is. After confirmation, the daemon can create a missing default `.syncignore` on Linux, macOS, and Windows without overwriting an existing file. If automatic creation is unavailable on your filesystem, follow the displayed path and starter rules: create a regular UTF-8 file there without replacing an existing file, then reopen the setup or migration review. **Settings → Ignore file** shows the current path and lets you review a switch to another existing file. Edit the file manually; there is no in-app rule save. Edits affect every setup that uses that file. Setup, migration, switching the file, and editing rules do not authorize or trigger a transfer.
|
|
280
|
+
### Retired ignore-file policy
|
|
303
281
|
|
|
304
|
-
|
|
282
|
+
**Breaking change:** Pi Sync no longer uses `.syncignore` or a custom rule file. It blocks retired settings, snapshots, and recovery records instead of guessing what to sync. Upgrading does not delete or convert existing settings, rule files, or remote history.
|
|
305
283
|
|
|
306
|
-
|
|
284
|
+
If only the remote snapshot or last accepted sync is blocked, keep your setup and [choose a new, empty storage location](./skills/configure-pi-sync/references/configuration.md#start-at-a-fresh-storage-location). For local settings or pending recovery errors, run `/skill:configure-pi-sync` or follow the [manual recovery guide](./skills/configure-pi-sync/references/configuration.md#retired-ignore-file-policy).
|
|
307
285
|
|
|
308
286
|
### Legacy path rules
|
|
309
287
|
|
|
@@ -315,19 +293,19 @@ In **/sync → Settings**, use **Max file size** and **Max directory size** for
|
|
|
315
293
|
|
|
316
294
|
**Before enabling either limit, close or upgrade older Pi Sync clients and daemon processes that use this agent directory.** Enabling a limit upgrades an older local `pi-sync.json` to version 9. Older processes refuse the entire document, even for other setups. Turning both limits Off does not downgrade the file. Remote peers need no upgrade for this setting alone; it does not change snapshots.
|
|
317
295
|
|
|
318
|
-
A save applies to subsequent transfer attempts. It neither starts a transfer nor grants automatic permission. If blocked, inspect `/sync diff`, narrow the selection with [
|
|
296
|
+
A save applies to subsequent transfer attempts. It neither starts a transfer nor grants automatic permission. If blocked, inspect `/sync diff`, narrow the selection with [path exclusions](#legacy-path-rules), then review a Push or Pull from the side that has the version you want. See [Transfer size limits](./skills/configure-pi-sync/references/configuration.md#transfer-size-limits) for the manual settings fields, an example, and recovery guidance.
|
|
319
297
|
|
|
320
298
|
### Scan limits
|
|
321
299
|
|
|
322
|
-
If the agent-directory scan exceeds 64 MiB,
|
|
300
|
+
If the agent-directory scan exceeds 64 MiB, open **Settings → Agent directory scope** to exclude large files or folders you do not need to sync. Reopen the transfer review. Storage diagnostics do not change the local scan limit.
|
|
323
301
|
|
|
324
302
|
Read the [settings reference](./skills/configure-pi-sync/references/configuration.md) for complete S3/R2, Git, and WebDAV examples, backend fields, content policy, legacy paths, and recovery steps.
|
|
325
303
|
|
|
326
304
|
## 🧠 Skills
|
|
327
305
|
|
|
328
|
-
Pi can automatically load the [configuration skill](./skills/configure-pi-sync/SKILL.md) when you ask about Pi Sync settings,
|
|
306
|
+
Pi can automatically load the [configuration skill](./skills/configure-pi-sync/SKILL.md) when you ask about Pi Sync settings, path selection, or local errors. For example, ask “How do I keep my cache folder off other devices with Pi Sync?” Use `/skill:configure-pi-sync` to load the skill explicitly.
|
|
329
307
|
|
|
330
|
-
The skill applies authorized edits to `pi-sync.json` through the running local daemon for routine preferences
|
|
308
|
+
The skill applies authorized edits to `pi-sync.json` through the running local daemon for routine preferences. Loading the skill does not authorize edits.
|
|
331
309
|
|
|
332
310
|
Use `/sync` for initial setup, masked credential entry, and operations that require a separate review. The skill does not run backend diagnostics, check remote connectivity, or start transfers. See the [settings reference](./skills/configure-pi-sync/references/configuration.md) for manual configuration and troubleshooting.
|
|
333
311
|
|
|
@@ -337,19 +315,19 @@ Use `/sync` for initial setup, masked credential entry, and operations that requ
|
|
|
337
315
|
| --- | --- |
|
|
338
316
|
| `/sync` | Set up storage, manage synced content, and review sync operations or recovery. |
|
|
339
317
|
| `/sync help` | Show command usage. |
|
|
340
|
-
| `/sync daemon [status\|handover\|allow-after-exit\|revoke-after-exit]` |
|
|
318
|
+
| `/sync daemon [status\|handover\|allow-after-exit\|revoke-after-exit]` | Compare daemon builds, review ownership, or revoke a legacy grant. `allow-after-exit` reports that unattended sync was retired. No argument is the same as `status`. |
|
|
341
319
|
| `/sync daemon recover` | Diagnostic fallback: review and stop the current daemon in TUI or RPC without starting a replacement or retrying a transfer. |
|
|
342
320
|
| `/sync use <setup>` | Switch the active local sync setup, following its switch policy. |
|
|
343
321
|
| `/sync init` | Create a local configuration template. |
|
|
344
322
|
| `/sync config` | Show resolved configuration. |
|
|
345
|
-
| `/sync files` |
|
|
323
|
+
| `/sync files` | Open the current setup’s path selection or agent-directory rules in TUI. |
|
|
346
324
|
| `/sync status` | Compare local and remote snapshot state. |
|
|
347
325
|
| `/sync diff` | Show local and remote differences. |
|
|
348
326
|
| `/sync conflicts` | Review private unresolved dependency groups and choose local or remote group versions after fresh validation. |
|
|
349
327
|
| `/sync doctor` | Check configuration, connectivity, and backend safety. |
|
|
350
328
|
| `/sync push` | Publish local content to remote storage. |
|
|
351
329
|
| `/sync pull` | Back up local content, then apply the remote snapshot. |
|
|
352
|
-
| `/sync sync` |
|
|
330
|
+
| `/sync sync` | Review and merge changes without model assistance; initial source and policy changes retain separate reviews. |
|
|
353
331
|
| `/sync history` | Browse remote snapshots and review a rollback. |
|
|
354
332
|
| `/sync rollback <snapshot-id>` | Back up local content, apply a historical snapshot, and republish it remotely. |
|
|
355
333
|
| `/sync migrate-state` | Migrate the legacy local state directory. |
|
|
@@ -410,7 +388,7 @@ Before pull or rollback, Pi Sync writes a backup under `<agent-dir>/pi-sync/back
|
|
|
410
388
|
Snapshot apply and recovery require canonical agent and session paths. Preflight refuses parent aliases it detects because Pi's file queue uses different keys for existing and missing aliases. Node's path-based writes and deletes cannot prevent another process from replacing a parent directory after a check. Use directories you control, and pause tools that move or replace their directories during sync. Preserve any pending recovery evidence; an unresolved startup recovery barrier still blocks transfers. Old journals recorded under an alias require manual review because their exact root and target paths remain pinned. Changing the agent path alone does not authorize recovery or rewriting those journals.
|
|
411
389
|
Apply preflights paths and checksums, journals mutations, and restores prior state only when current bytes match verified preimages or planned postimages. Unknown intermediate directory states and newer edits require review rather than a blind rollback. An interruption after replacement is armed can require manual recovery even if installation never ran; a later deletion of installed content is not treated as an unfinished remove.
|
|
412
390
|
The file queue coordinates one Pi runtime, not separate processes or lock-unaware editors. Hash-based journals cannot distinguish a later write of identical recorded bytes; they do not provide a cross-process compare-and-swap.
|
|
413
|
-
Merged transfers instead retain a private publication/apply/baseline journal and roll forward only when the active remote candidate and every changed local preimage/postimage can be verified. A crash or uncertain publication is reconciled through `/sync sync` without blind republishing. If newer local or remote changes prevent reconciliation, preserve the evidence and review `/sync diff`.
|
|
391
|
+
Merged transfers instead retain a private publication/apply/baseline journal and roll forward only when the active remote candidate and every changed local preimage/postimage can be verified. A crash or uncertain publication is reconciled through `/sync sync` without blind republishing. If newer local or remote changes prevent reconciliation, preserve the evidence and review `/sync diff`. An explicitly reviewed `push --force` or `pull --force` can archive the old journal. Disabling automatic transfer does not undo completed transfers. Do not downgrade while a merge or snapshot recovery journal is pending.
|
|
414
392
|
|
|
415
393
|
Removing a local setup or connection never deletes remote data.
|
|
416
394
|
|
|
@@ -241,7 +241,8 @@ function usage() {
|
|
|
241
241
|
`Automatic sync: ${AUTOMATIC_SYNC_DESCRIPTION}`,
|
|
242
242
|
`Startup transfer: ${STARTUP_TRANSFER_DESCRIPTION}`,
|
|
243
243
|
"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.",
|
|
244
|
-
"
|
|
244
|
+
"Autonomous sync and Continuous sync are retired. Saved flags no longer transfer files or call a model. Use Sync now to review a transfer or enable Startup transfer for one eligible startup sync.",
|
|
245
|
+
"New after-exit grants are not supported. Use /sync daemon revoke-after-exit to clear a retained grant.",
|
|
245
246
|
"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."
|
|
246
247
|
].join("\n");
|
|
247
248
|
}
|
|
@@ -258,4 +259,4 @@ export {
|
|
|
258
259
|
resolveSyncCommand,
|
|
259
260
|
usage
|
|
260
261
|
};
|
|
261
|
-
//# sourceMappingURL=chunk-
|
|
262
|
+
//# sourceMappingURL=chunk-335XTMMZ.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|recover|handover|allow-after-exit|revoke-after-exit]\",\n },\n { name: \"push\", description: \"Upload local settings\" },\n { name: \"pull\", description: \"Apply remote settings\" },\n { name: \"sync\", description: \"Push or pull as needed\" },\n { name: \"history\", description: \"Show recent remote snapshots\" },\n { name: \"rollback\", description: \"Apply a previous snapshot\", usageSuffix: \" <snapshot>\" },\n { name: \"migrate-state\", description: \"Move legacy state into pi-sync/\" },\n { name: \"unlock\", description: \"Remove a stale local lock\", usageSuffix: \" --stale\" },\n] as const;\n\nexport type SyncCommandName = (typeof SYNC_COMMANDS)[number][\"name\"];\n\nconst SYNC_COMMAND_COMPLETIONS: readonly CommandArgumentCompletion[] = SYNC_COMMANDS.map(({ name, description }) => ({\n value: name,\n label: name,\n description,\n}));\nlet setupCompletionNames: string[] = [];\n\nexport function setSyncSetupCompletions(names: readonly string[]) {\n setupCompletionNames = [...new Set(names)].sort((left, right) => left.localeCompare(right));\n}\nconst SETUP_FLAG_COMPLETION = {\n value: \"--setup\",\n label: \"--setup\",\n description: \"Address a sync setup without switching\",\n} as const;\nconst SYNC_FLAG_COMPLETIONS: Record<string, readonly CommandArgumentCompletion[]> = {\n config: [SETUP_FLAG_COMPLETION],\n files: [SETUP_FLAG_COMPLETION],\n status: [SETUP_FLAG_COMPLETION],\n diff: [SETUP_FLAG_COMPLETION],\n conflicts: [SETUP_FLAG_COMPLETION],\n doctor: [SETUP_FLAG_COMPLETION],\n push: [\n ...YES_FLAG_COMPLETIONS,\n { value: \"--force\", label: \"--force\", description: \"Overwrite visible remote changes\" },\n SETUP_FLAG_COMPLETION,\n ],\n pull: [\n ...YES_FLAG_COMPLETIONS,\n { value: \"--force\", label: \"--force\", description: \"Overwrite local changes\" },\n SETUP_FLAG_COMPLETION,\n ],\n sync: [\n ...YES_FLAG_COMPLETIONS,\n { value: \"--force\", label: \"--force\", description: \"Resolve conflicts by forcing action\" },\n SETUP_FLAG_COMPLETION,\n ],\n history: [SETUP_FLAG_COMPLETION],\n rollback: [...YES_FLAG_COMPLETIONS, SETUP_FLAG_COMPLETION],\n \"migrate-state\": YES_FLAG_COMPLETIONS,\n unlock: [{ value: \"--stale\", label: \"--stale\", description: \"Remove only a stale lock\" }],\n};\n\nexport function splitArgs(input: string) {\n return input.match(/(?:[^\\s\"']+|\"[^\"]*\"|'[^']*')+/g)?.map((arg) => arg.replace(/^['\"]|['\"]$/g, \"\")) ?? [];\n}\n\nexport function parseOptions(args: string[]): CommandOptions {\n const values: string[] = [];\n let yes = false;\n let force = false;\n let stale = false;\n let setup: string | undefined;\n for (let index = 0; index < args.length; index += 1) {\n const arg = args[index];\n if (arg === \"--yes\" || arg === \"-y\") yes = true;\n else if (arg === \"--force\") force = true;\n else if (arg === \"--stale\") stale = true;\n else if (arg === \"--setup\") {\n const name = args[index + 1];\n if (!name || name.startsWith(\"-\")) throw new Error(\"--setup requires a sync setup name.\");\n if (setup !== undefined) throw new Error(\"--setup may be provided only once.\");\n setup = name;\n index += 1;\n } else if (arg.startsWith(\"-\")) {\n throw new Error(`Unknown sync option: ${arg}`);\n } else values.push(arg);\n }\n return {\n yes,\n force,\n stale,\n silent: false,\n reload: true,\n auto: false,\n ...(setup === undefined ? {} : { setup }),\n args: values,\n };\n}\n\nexport function validateCommandOptions(command: string, options: CommandOptions) {\n const setupAllowed = new Set([\n \"config\",\n \"files\",\n \"status\",\n \"diff\",\n \"conflicts\",\n \"doctor\",\n \"push\",\n \"pull\",\n \"sync\",\n \"history\",\n \"rollback\",\n ]);\n if (options.setup && !setupAllowed.has(command)) {\n throw new Error(`--setup is not supported by /sync ${command}.`);\n }\n if (options.yes && ![\"push\", \"pull\", \"sync\", \"rollback\", \"migrate-state\"].includes(command)) {\n throw new Error(`Confirmation/force options are not supported by /sync ${command}.`);\n }\n if (options.force && ![\"push\", \"pull\", \"sync\", \"rollback\"].includes(command)) {\n throw new Error(`Confirmation/force options are not supported by /sync ${command}.`);\n }\n if (options.stale && command !== \"unlock\") {\n throw new Error(`--stale is not supported by /sync ${command}.`);\n }\n if (command === \"daemon\" && options.args.length <= 1) {\n const action = options.args[0];\n if (action !== undefined && !DAEMON_ACTIONS.some((value) => value === action))\n throw new Error(`Unknown daemon action: ${action}`);\n return;\n }\n const expectedValues = command === \"rollback\" || command === \"use\" ? 1 : 0;\n if (options.args.length !== expectedValues) {\n if (command === \"rollback\") throw new Error(\"Usage: /sync rollback <snapshot-id> [--yes] [--setup <name>]\");\n if (command === \"use\") throw new Error(\"Usage: /sync use <setup>\");\n throw new Error(`Unexpected argument for /sync ${command}: ${options.args.join(\" \")}`);\n }\n}\n\nconst DAEMON_ACTIONS = [\"status\", \"recover\", \"handover\", \"allow-after-exit\", \"revoke-after-exit\"] as const;\n\nexport function completeSyncArguments(argumentPrefix: string): CommandArgumentCompletion[] | null {\n const prefix = argumentPrefix.trimStart();\n if (prefix === \"\") return [...SYNC_COMMAND_COMPLETIONS];\n\n const trailingSpace = /\\s$/.test(prefix);\n const tokens = splitArgs(prefix);\n if (tokens.length === 0) return [...SYNC_COMMAND_COMPLETIONS];\n\n const [command] = tokens;\n if (tokens.length === 1 && !trailingSpace) {\n const matches = SYNC_COMMAND_COMPLETIONS.filter((item) => item.value.startsWith(command));\n return matches.length > 0 ? [...matches] : null;\n }\n\n const args = tokens.slice(1);\n if (command === \"use\") {\n if (args.length > 1 || (trailingSpace && args.length > 0)) return null;\n return completeSetupValue(prefix, trailingSpace ? \"\" : (args[0] ?? \"\"));\n }\n if (command === \"daemon\") {\n if (args.length > 1 || (trailingSpace && args.length > 0)) return null;\n const current = trailingSpace ? \"\" : (args[0] ?? \"\");\n const base = trailingSpace ? prefix : prefix.slice(0, prefix.length - current.length);\n const matches = DAEMON_ACTIONS.filter((action) => action.startsWith(current));\n return matches.length\n ? matches.map((action) => ({ value: `${base}${action}`, label: action, description: \"Daemon control\" }))\n : null;\n }\n const setupFlagIndex = args.lastIndexOf(\"--setup\");\n if (setupFlagIndex >= 0 && setupFlagIndex === args.length - (trailingSpace ? 1 : 2)) {\n const currentSetup = trailingSpace ? \"\" : (args.at(-1) ?? \"\");\n if (!currentSetup.startsWith(\"-\")) return completeSetupValue(prefix, currentSetup);\n }\n\n const flagCompletions = SYNC_FLAG_COMPLETIONS[command];\n if (!flagCompletions) return null;\n\n const completedArgs = trailingSpace ? args : args.slice(0, -1);\n const completedValues = completedArgs.filter((arg) => !arg.startsWith(\"-\"));\n if (command === \"rollback\" ? completedValues.length > 1 : completedValues.length > 0) {\n return null;\n }\n\n const current = trailingSpace ? \"\" : (args.at(-1) ?? \"\");\n if (current && !current.startsWith(\"-\")) return null;\n\n const currentRaw = trailingSpace ? \"\" : (prefix.match(/\\S+$/)?.[0] ?? \"\");\n const completionPrefix = trailingSpace ? prefix : prefix.slice(0, prefix.length - currentRaw.length);\n const matches = flagCompletions.filter((item) => item.value.startsWith(current));\n return matches.length > 0 ? matches.map((item) => ({ ...item, value: `${completionPrefix}${item.value}` })) : null;\n}\n\nfunction completeSetupValue(prefix: string, current: string) {\n const currentRaw = current ? (prefix.match(/\\S+$/u)?.[0] ?? \"\") : \"\";\n const completionPrefix = currentRaw ? prefix.slice(0, prefix.length - currentRaw.length) : prefix;\n const matches = setupCompletionNames.filter((name) => name.startsWith(current));\n return matches.length > 0\n ? matches.map((name) => ({\n value: `${completionPrefix}${name}`,\n label: name,\n description: \"Sync setup\",\n }))\n : null;\n}\n\nexport function syncMenuOptions() {\n return SYNC_COMMANDS.map(({ name, description }) => `${name} \u2014 ${description}`);\n}\n\nexport function syncCommandFromMenuOption(option: string): SyncCommandName | undefined {\n return SYNC_COMMANDS.find(({ name, description }) => option === `${name} \u2014 ${description}`)?.name;\n}\n\nexport async function resolveSyncCommand(input: string, ctx: ExtensionCommandContext) {\n const [subcommand, ...rest] = splitArgs(input);\n if (subcommand) return { subcommand, rest };\n if (!ctx.hasUI) {\n ctx.ui.notify(usage(), \"info\");\n return undefined;\n }\n\n const selectedOption = await ctx.ui.select(\"pi-sync\", syncMenuOptions());\n const selected = selectedOption ? syncCommandFromMenuOption(selectedOption) : undefined;\n if (!selected) return undefined;\n if (selected !== \"rollback\") return { subcommand: selected, rest: [] };\n\n const target = (await ctx.ui.input(\"Rollback snapshot\", \"snapshot id\"))?.trim();\n if (!target) {\n ctx.ui.notify(\"Rollback cancelled.\", \"info\");\n return undefined;\n }\n return { subcommand: selected, rest: [target] };\n}\n\nexport function usage() {\n const commands = SYNC_COMMANDS.map(\n (command) => `${command.name}${\"usageSuffix\" in command ? command.usageSuffix : \"\"}`,\n ).join(\", \");\n return [\n \"Usage: /sync <command>\",\n `Commands: ${commands}`,\n \"In the /sync manager, Push to remote and Pull from remote use the chosen source and preserve a restore point without a second confirmation. Direct commands retain their existing review and flags.\",\n \"Daemon diagnostics: /sync daemon recover reviews and stops the existing daemon. It does not start a replacement or retry a transfer.\",\n `Automatic sync: ${AUTOMATIC_SYNC_DESCRIPTION}`,\n `Startup transfer: ${STARTUP_TRANSFER_DESCRIPTION}`,\n \"Automatic transfer at startup is a separate opt-in: one conflict-free established-baseline transfer at idle in TUI/RPC, with conditional/lease publication and no resource reload.\",\n \"Continuous sync is a separate default-Off opt-in in Settings. It requires Autonomous sync and can incur recurring network/model costs. After the last Pi exits, the service closes after a 30-second grace period unless a valid /sync daemon allow-after-exit grant applies. Zero-client work still requires that separate review. Safety blocks and durable automatic request limits remain.\",\n \"Settings: use /sync init or edit storage connections and sync setups in ~/.pi/agent/pi-sync.json (or the configured Pi agent directory). Version 1 and version 2 settings are unsupported and are never rewritten.\",\n ].join(\"\\n\");\n}\n"],
|
|
5
|
-
"mappings": ";;;;AAAO,IAAM,6BACX;AAEK,IAAM,+BACX;AAEK,SAAS,uBAAuB,QAGpC;AACD,MAAI,CAAC,OAAO,kBAAmB,QAAO;AACtC,SAAO,OAAO,QAAQ,SAAS,OAC3B,0EACA;AACN;;;ACVA,IAAM,uBAA6D;AAAA,EACjE,EAAE,OAAO,SAAS,OAAO,SAAS,aAAa,4BAA4B;AAAA,EAC3E,EAAE,OAAO,MAAM,OAAO,MAAM,aAAa,4BAA4B;AACvE;AACO,IAAM,gBAAgB;AAAA,EAC3B,EAAE,MAAM,QAAQ,aAAa,qBAAqB;AAAA,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AM,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;AAAA,IACA;AAAA,IACA,mBAAmB,0BAA0B;AAAA,IAC7C,qBAAqB,4BAA4B;AAAA,IACjD;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,KAAK,IAAI;AACb;",
|
|
4
|
+
"sourcesContent": ["export const AUTOMATIC_SYNC_DESCRIPTION =\n \"This setup: check remote state once at startup in TUI/RPC. At shutdown, push all selected content only when sessions are included; reload skips that push. Saves apply to subsequent operations; a new check waits for the next session start. This does not enable startup transfer.\";\n\nexport const STARTUP_TRANSFER_DESCRIPTION =\n \"This setup: separate opt-in for one idle startup transfer in TUI/RPC. Requires an accepted baseline, matching remote included paths, and conditional or lease-protected publication (Git, verified WebDAV, or R2/S3 with verified conditional writes). May upload, replace, or remove selected files. Never reloads resources. Enabling applies next session start; opening Settings cancels pending work. Completed transfers are not undone.\";\n\nexport function startupTransferSummary(config: {\n automaticTransfer?: boolean;\n backend: { type: \"s3\" | \"git\" | \"webdav\" };\n}) {\n if (!config.automaticTransfer) return \"Off\";\n return config.backend.type === \"s3\"\n ? \"On (next idle startup; R2/S3 conditional-write verification required)\"\n : \"On (next idle startup; baseline and remote policy checks required)\";\n}\n", "import type { ExtensionCommandContext } from \"@earendil-works/pi-coding-agent\";\nimport { AUTOMATIC_SYNC_DESCRIPTION, STARTUP_TRANSFER_DESCRIPTION } from \"../ui/sync-behavior.js\";\nimport type { CommandArgumentCompletion, CommandOptions } from \"./command-types.js\";\n\nconst YES_FLAG_COMPLETIONS: readonly CommandArgumentCompletion[] = [\n { value: \"--yes\", label: \"--yes\", description: \"Skip confirmation prompts\" },\n { value: \"-y\", label: \"-y\", description: \"Skip confirmation prompts\" },\n];\nexport const SYNC_COMMANDS = [\n { name: \"help\", description: \"Show command usage\" },\n { name: \"use\", description: \"Switch the current sync setup\", usageSuffix: \" <setup>\" },\n { name: \"init\", description: \"Create local config template\" },\n { name: \"config\", description: \"Show resolved configuration\" },\n { name: \"files\", description: \"Choose included content\" },\n { name: \"status\", description: \"Show sync status\" },\n { name: \"diff\", description: \"Show local/remote diff\" },\n { name: \"conflicts\", description: \"Review private unresolved conflict groups\" },\n { name: \"doctor\", description: \"Check config, secrets, and lock state\" },\n {\n name: \"daemon\",\n description: \"Review service handover and unattended permission\",\n usageSuffix: \" [status|recover|handover|allow-after-exit|revoke-after-exit]\",\n },\n { name: \"push\", description: \"Upload local settings\" },\n { name: \"pull\", description: \"Apply remote settings\" },\n { name: \"sync\", description: \"Push or pull as needed\" },\n { name: \"history\", description: \"Show recent remote snapshots\" },\n { name: \"rollback\", description: \"Apply a previous snapshot\", usageSuffix: \" <snapshot>\" },\n { name: \"migrate-state\", description: \"Move legacy state into pi-sync/\" },\n { name: \"unlock\", description: \"Remove a stale local lock\", usageSuffix: \" --stale\" },\n] as const;\n\nexport type SyncCommandName = (typeof SYNC_COMMANDS)[number][\"name\"];\n\nconst SYNC_COMMAND_COMPLETIONS: readonly CommandArgumentCompletion[] = SYNC_COMMANDS.map(({ name, description }) => ({\n value: name,\n label: name,\n description,\n}));\nlet setupCompletionNames: string[] = [];\n\nexport function setSyncSetupCompletions(names: readonly string[]) {\n setupCompletionNames = [...new Set(names)].sort((left, right) => left.localeCompare(right));\n}\nconst SETUP_FLAG_COMPLETION = {\n value: \"--setup\",\n label: \"--setup\",\n description: \"Address a sync setup without switching\",\n} as const;\nconst SYNC_FLAG_COMPLETIONS: Record<string, readonly CommandArgumentCompletion[]> = {\n config: [SETUP_FLAG_COMPLETION],\n files: [SETUP_FLAG_COMPLETION],\n status: [SETUP_FLAG_COMPLETION],\n diff: [SETUP_FLAG_COMPLETION],\n conflicts: [SETUP_FLAG_COMPLETION],\n doctor: [SETUP_FLAG_COMPLETION],\n push: [\n ...YES_FLAG_COMPLETIONS,\n { value: \"--force\", label: \"--force\", description: \"Overwrite visible remote changes\" },\n SETUP_FLAG_COMPLETION,\n ],\n pull: [\n ...YES_FLAG_COMPLETIONS,\n { value: \"--force\", label: \"--force\", description: \"Overwrite local changes\" },\n SETUP_FLAG_COMPLETION,\n ],\n sync: [\n ...YES_FLAG_COMPLETIONS,\n { value: \"--force\", label: \"--force\", description: \"Resolve conflicts by forcing action\" },\n SETUP_FLAG_COMPLETION,\n ],\n history: [SETUP_FLAG_COMPLETION],\n rollback: [...YES_FLAG_COMPLETIONS, SETUP_FLAG_COMPLETION],\n \"migrate-state\": YES_FLAG_COMPLETIONS,\n unlock: [{ value: \"--stale\", label: \"--stale\", description: \"Remove only a stale lock\" }],\n};\n\nexport function splitArgs(input: string) {\n return input.match(/(?:[^\\s\"']+|\"[^\"]*\"|'[^']*')+/g)?.map((arg) => arg.replace(/^['\"]|['\"]$/g, \"\")) ?? [];\n}\n\nexport function parseOptions(args: string[]): CommandOptions {\n const values: string[] = [];\n let yes = false;\n let force = false;\n let stale = false;\n let setup: string | undefined;\n for (let index = 0; index < args.length; index += 1) {\n const arg = args[index];\n if (arg === \"--yes\" || arg === \"-y\") yes = true;\n else if (arg === \"--force\") force = true;\n else if (arg === \"--stale\") stale = true;\n else if (arg === \"--setup\") {\n const name = args[index + 1];\n if (!name || name.startsWith(\"-\")) throw new Error(\"--setup requires a sync setup name.\");\n if (setup !== undefined) throw new Error(\"--setup may be provided only once.\");\n setup = name;\n index += 1;\n } else if (arg.startsWith(\"-\")) {\n throw new Error(`Unknown sync option: ${arg}`);\n } else values.push(arg);\n }\n return {\n yes,\n force,\n stale,\n silent: false,\n reload: true,\n auto: false,\n ...(setup === undefined ? {} : { setup }),\n args: values,\n };\n}\n\nexport function validateCommandOptions(command: string, options: CommandOptions) {\n const setupAllowed = new Set([\n \"config\",\n \"files\",\n \"status\",\n \"diff\",\n \"conflicts\",\n \"doctor\",\n \"push\",\n \"pull\",\n \"sync\",\n \"history\",\n \"rollback\",\n ]);\n if (options.setup && !setupAllowed.has(command)) {\n throw new Error(`--setup is not supported by /sync ${command}.`);\n }\n if (options.yes && ![\"push\", \"pull\", \"sync\", \"rollback\", \"migrate-state\"].includes(command)) {\n throw new Error(`Confirmation/force options are not supported by /sync ${command}.`);\n }\n if (options.force && ![\"push\", \"pull\", \"sync\", \"rollback\"].includes(command)) {\n throw new Error(`Confirmation/force options are not supported by /sync ${command}.`);\n }\n if (options.stale && command !== \"unlock\") {\n throw new Error(`--stale is not supported by /sync ${command}.`);\n }\n if (command === \"daemon\" && options.args.length <= 1) {\n const action = options.args[0];\n if (action !== undefined && !DAEMON_ACTIONS.some((value) => value === action))\n throw new Error(`Unknown daemon action: ${action}`);\n return;\n }\n const expectedValues = command === \"rollback\" || command === \"use\" ? 1 : 0;\n if (options.args.length !== expectedValues) {\n if (command === \"rollback\") throw new Error(\"Usage: /sync rollback <snapshot-id> [--yes] [--setup <name>]\");\n if (command === \"use\") throw new Error(\"Usage: /sync use <setup>\");\n throw new Error(`Unexpected argument for /sync ${command}: ${options.args.join(\" \")}`);\n }\n}\n\nconst DAEMON_ACTIONS = [\"status\", \"recover\", \"handover\", \"allow-after-exit\", \"revoke-after-exit\"] as const;\n\nexport function completeSyncArguments(argumentPrefix: string): CommandArgumentCompletion[] | null {\n const prefix = argumentPrefix.trimStart();\n if (prefix === \"\") return [...SYNC_COMMAND_COMPLETIONS];\n\n const trailingSpace = /\\s$/.test(prefix);\n const tokens = splitArgs(prefix);\n if (tokens.length === 0) return [...SYNC_COMMAND_COMPLETIONS];\n\n const [command] = tokens;\n if (tokens.length === 1 && !trailingSpace) {\n const matches = SYNC_COMMAND_COMPLETIONS.filter((item) => item.value.startsWith(command));\n return matches.length > 0 ? [...matches] : null;\n }\n\n const args = tokens.slice(1);\n if (command === \"use\") {\n if (args.length > 1 || (trailingSpace && args.length > 0)) return null;\n return completeSetupValue(prefix, trailingSpace ? \"\" : (args[0] ?? \"\"));\n }\n if (command === \"daemon\") {\n if (args.length > 1 || (trailingSpace && args.length > 0)) return null;\n const current = trailingSpace ? \"\" : (args[0] ?? \"\");\n const base = trailingSpace ? prefix : prefix.slice(0, prefix.length - current.length);\n const matches = DAEMON_ACTIONS.filter((action) => action.startsWith(current));\n return matches.length\n ? matches.map((action) => ({ value: `${base}${action}`, label: action, description: \"Daemon control\" }))\n : null;\n }\n const setupFlagIndex = args.lastIndexOf(\"--setup\");\n if (setupFlagIndex >= 0 && setupFlagIndex === args.length - (trailingSpace ? 1 : 2)) {\n const currentSetup = trailingSpace ? \"\" : (args.at(-1) ?? \"\");\n if (!currentSetup.startsWith(\"-\")) return completeSetupValue(prefix, currentSetup);\n }\n\n const flagCompletions = SYNC_FLAG_COMPLETIONS[command];\n if (!flagCompletions) return null;\n\n const completedArgs = trailingSpace ? args : args.slice(0, -1);\n const completedValues = completedArgs.filter((arg) => !arg.startsWith(\"-\"));\n if (command === \"rollback\" ? completedValues.length > 1 : completedValues.length > 0) {\n return null;\n }\n\n const current = trailingSpace ? \"\" : (args.at(-1) ?? \"\");\n if (current && !current.startsWith(\"-\")) return null;\n\n const currentRaw = trailingSpace ? \"\" : (prefix.match(/\\S+$/)?.[0] ?? \"\");\n const completionPrefix = trailingSpace ? prefix : prefix.slice(0, prefix.length - currentRaw.length);\n const matches = flagCompletions.filter((item) => item.value.startsWith(current));\n return matches.length > 0 ? matches.map((item) => ({ ...item, value: `${completionPrefix}${item.value}` })) : null;\n}\n\nfunction completeSetupValue(prefix: string, current: string) {\n const currentRaw = current ? (prefix.match(/\\S+$/u)?.[0] ?? \"\") : \"\";\n const completionPrefix = currentRaw ? prefix.slice(0, prefix.length - currentRaw.length) : prefix;\n const matches = setupCompletionNames.filter((name) => name.startsWith(current));\n return matches.length > 0\n ? matches.map((name) => ({\n value: `${completionPrefix}${name}`,\n label: name,\n description: \"Sync setup\",\n }))\n : null;\n}\n\nexport function syncMenuOptions() {\n return SYNC_COMMANDS.map(({ name, description }) => `${name} \u2014 ${description}`);\n}\n\nexport function syncCommandFromMenuOption(option: string): SyncCommandName | undefined {\n return SYNC_COMMANDS.find(({ name, description }) => option === `${name} \u2014 ${description}`)?.name;\n}\n\nexport async function resolveSyncCommand(input: string, ctx: ExtensionCommandContext) {\n const [subcommand, ...rest] = splitArgs(input);\n if (subcommand) return { subcommand, rest };\n if (!ctx.hasUI) {\n ctx.ui.notify(usage(), \"info\");\n return undefined;\n }\n\n const selectedOption = await ctx.ui.select(\"pi-sync\", syncMenuOptions());\n const selected = selectedOption ? syncCommandFromMenuOption(selectedOption) : undefined;\n if (!selected) return undefined;\n if (selected !== \"rollback\") return { subcommand: selected, rest: [] };\n\n const target = (await ctx.ui.input(\"Rollback snapshot\", \"snapshot id\"))?.trim();\n if (!target) {\n ctx.ui.notify(\"Rollback cancelled.\", \"info\");\n return undefined;\n }\n return { subcommand: selected, rest: [target] };\n}\n\nexport function usage() {\n const commands = SYNC_COMMANDS.map(\n (command) => `${command.name}${\"usageSuffix\" in command ? command.usageSuffix : \"\"}`,\n ).join(\", \");\n return [\n \"Usage: /sync <command>\",\n `Commands: ${commands}`,\n \"In the /sync manager, Push to remote and Pull from remote use the chosen source and preserve a restore point without a second confirmation. Direct commands retain their existing review and flags.\",\n \"Daemon diagnostics: /sync daemon recover reviews and stops the existing daemon. It does not start a replacement or retry a transfer.\",\n `Automatic sync: ${AUTOMATIC_SYNC_DESCRIPTION}`,\n `Startup transfer: ${STARTUP_TRANSFER_DESCRIPTION}`,\n \"Automatic transfer at startup is a separate opt-in: one conflict-free established-baseline transfer at idle in TUI/RPC, with conditional/lease publication and no resource reload.\",\n \"Autonomous sync and Continuous sync are retired. Saved flags no longer transfer files or call a model. Use Sync now to review a transfer or enable Startup transfer for one eligible startup sync.\",\n \"New after-exit grants are not supported. Use /sync daemon revoke-after-exit to clear a retained grant.\",\n \"Settings: use /sync init or edit storage connections and sync setups in ~/.pi/agent/pi-sync.json (or the configured Pi agent directory). Version 1 and version 2 settings are unsupported and are never rewritten.\",\n ].join(\"\\n\");\n}\n"],
|
|
5
|
+
"mappings": ";;;;AAAO,IAAM,6BACX;AAEK,IAAM,+BACX;AAEK,SAAS,uBAAuB,QAGpC;AACD,MAAI,CAAC,OAAO,kBAAmB,QAAO;AACtC,SAAO,OAAO,QAAQ,SAAS,OAC3B,0EACA;AACN;;;ACVA,IAAM,uBAA6D;AAAA,EACjE,EAAE,OAAO,SAAS,OAAO,SAAS,aAAa,4BAA4B;AAAA,EAC3E,EAAE,OAAO,MAAM,OAAO,MAAM,aAAa,4BAA4B;AACvE;AACO,IAAM,gBAAgB;AAAA,EAC3B,EAAE,MAAM,QAAQ,aAAa,qBAAqB;AAAA,EAClD,EAAE,MAAM,OAAO,aAAa,iCAAiC,aAAa,WAAW;AAAA,EACrF,EAAE,MAAM,QAAQ,aAAa,+BAA+B;AAAA,EAC5D,EAAE,MAAM,UAAU,aAAa,8BAA8B;AAAA,EAC7D,EAAE,MAAM,SAAS,aAAa,0BAA0B;AAAA,EACxD,EAAE,MAAM,UAAU,aAAa,mBAAmB;AAAA,EAClD,EAAE,MAAM,QAAQ,aAAa,yBAAyB;AAAA,EACtD,EAAE,MAAM,aAAa,aAAa,4CAA4C;AAAA,EAC9E,EAAE,MAAM,UAAU,aAAa,wCAAwC;AAAA,EACvE;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,EACf;AAAA,EACA,EAAE,MAAM,QAAQ,aAAa,wBAAwB;AAAA,EACrD,EAAE,MAAM,QAAQ,aAAa,wBAAwB;AAAA,EACrD,EAAE,MAAM,QAAQ,aAAa,yBAAyB;AAAA,EACtD,EAAE,MAAM,WAA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@ async function runCancellableOperation(ctx, message, route, runRoute, options =
|
|
|
9
9
|
const result = await runCancellableTask(
|
|
10
10
|
ctx,
|
|
11
11
|
message,
|
|
12
|
-
(signal, onCommit, onDialog) => runRoute(
|
|
13
|
-
route,
|
|
14
|
-
signal,
|
|
15
|
-
onCommit,
|
|
16
|
-
options.target,
|
|
17
|
-
onDialog,
|
|
18
|
-
void 0,
|
|
19
|
-
options.directionalFingerprint,
|
|
20
|
-
options.requirePendingAdoption
|
|
21
|
-
),
|
|
12
|
+
(signal, onCommit, onDialog) => runRoute(route, signal, onCommit, options.target, onDialog, void 0, options.directionalFingerprint),
|
|
22
13
|
options
|
|
23
14
|
);
|
|
24
15
|
return result.kind === "completed" ? result.value ?? { kind: "failed" } : result;
|
|
@@ -120,4 +111,4 @@ export {
|
|
|
120
111
|
runCancellableOperation,
|
|
121
112
|
runCancellableTask
|
|
122
113
|
};
|
|
123
|
-
//# sourceMappingURL=chunk-
|
|
114
|
+
//# sourceMappingURL=chunk-AYGMIMCV.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/ui/cancellable-operation.ts"],
|
|
4
|
+
"sourcesContent": ["import { BorderedLoader, type ExtensionContext } from \"@earendil-works/pi-coding-agent\";\nimport { isKeyRelease, Key, matchesKey, truncateToWidth } from \"@earendil-works/pi-tui\";\nimport { formatInteractionHints, runCustomInteraction } from \"@narumitw/pi-tui-kit\";\nimport type { SetupPullOutcome } from \"../sync/setup-switch.js\";\nimport type { SyncDecision } from \"../sync/sync-decision.js\";\nimport type { RemoteSelectionDecision } from \"../sync/sync-policy.js\";\n\nexport type RunRouteResult =\n | { kind: \"completed\"; outcome?: SetupPullOutcome }\n | { kind: \"decision-required\"; decision: SyncDecision }\n | { kind: \"remote-selection-required\"; decision: RemoteSelectionDecision }\n | { kind: \"failed\" };\n\nexport type RunRoute = (\n route: string,\n signal?: AbortSignal,\n onCommit?: () => void,\n target?: string,\n onDialog?: (active: boolean) => void,\n retryRefusal?: boolean,\n directionalFingerprint?: string,\n) => Promise<RunRouteResult | undefined>;\n\nexport type CancellableOperationResult = RunRouteResult | { kind: \"closed\" } | { kind: \"cancelled\" };\n\ninterface CancellableOperationOptions {\n commitAware?: boolean;\n cancelAcrossDialogs?: boolean;\n cancelledMessage?: string | null;\n target?: string;\n directionalFingerprint?: string;\n signal?: AbortSignal;\n isCurrent?: () => boolean;\n}\n\nexport async function runCancellableOperation(\n ctx: ExtensionContext,\n message: string,\n route: string,\n runRoute: RunRoute,\n options: CancellableOperationOptions = {},\n): Promise<CancellableOperationResult> {\n const result = await runCancellableTask(\n ctx,\n message,\n (signal, onCommit, onDialog) =>\n runRoute(route, signal, onCommit, options.target, onDialog, undefined, options.directionalFingerprint),\n options,\n );\n return result.kind === \"completed\" ? (result.value ?? { kind: \"failed\" }) : result;\n}\n\nexport type CancellableTaskResult<Value> =\n | { kind: \"completed\"; value: Value }\n | { kind: \"closed\" }\n | { kind: \"cancelled\" };\n\n/** Keep non-route work under the same cancellation and drain owner as transfers. */\nexport async function runCancellableTask<Value>(\n ctx: ExtensionContext,\n message: string,\n task: (\n signal: AbortSignal | undefined,\n onCommit?: () => void,\n onDialog?: (active: boolean) => void,\n ) => Promise<Value>,\n options: Omit<CancellableOperationOptions, \"target\" | \"directionalFingerprint\"> = {},\n): Promise<CancellableTaskResult<Value>> {\n const {\n commitAware = false,\n cancelAcrossDialogs = false,\n cancelledMessage = \"Check cancelled; no settings or files were changed.\",\n signal,\n isCurrent = () => true,\n } = options;\n if (signal?.aborted || !isCurrent()) return { kind: \"closed\" };\n if (ctx.mode !== \"tui\") return { kind: \"completed\", value: await task(signal) };\n let commitStarted = false;\n let taskResult!: Value;\n const interaction = await runCustomInteraction<{ cancelled?: boolean; error?: unknown }, ExtensionContext>(ctx, {\n signal,\n isCurrent: () => !signal?.aborted && isCurrent(),\n create: ({ tui, theme, keybindings, signal: interactionSignal, complete }) => {\n const loader = new BorderedLoader(tui, theme, message, { cancellable: false });\n const cancelHint = formatInteractionHints(keybindings, [\n {\n keys: [...keybindings.getKeys(\"tui.select.cancel\").filter((key) => !hasControlCharacter(key)), \"ctrl+c\"],\n label: \"cancel\",\n },\n ]);\n const cancel = (data: string) => {\n // Raw terminal listeners run before Pi filters Kitty key releases.\n if (isKeyRelease(data)) return false;\n if (!matchesKey(data, Key.ctrl(\"c\")) && !keybindings.matches(data, \"tui.select.cancel\")) return false;\n if (commitStarted) {\n ctx.ui.notify(\"Applying or publishing has started and cannot be cancelled safely.\", \"warning\");\n } else complete({ cancelled: true });\n return true;\n };\n // Pi dialogs replace this loader and restore the normal editor. Defer\n // ordinary keys while they are open; retain raw cancellation afterward.\n // Ctrl+C remains the root flow's hard-cancel path regardless of focus.\n let activeDialogs = 0;\n const unsubscribe = cancelAcrossDialogs\n ? ctx.ui.onTerminalInput((data) => {\n if (isKeyRelease(data)) return;\n if (activeDialogs > 0 && !matchesKey(data, Key.ctrl(\"c\"))) return;\n return cancel(data) ? { consume: true } : undefined;\n })\n : undefined;\n let pendingTask: Promise<Value>;\n try {\n pendingTask = task(\n interactionSignal,\n commitAware ? () => (commitStarted = true) : undefined,\n cancelAcrossDialogs\n ? (active) => {\n activeDialogs += active ? 1 : -1;\n }\n : undefined,\n );\n } catch (error) {\n unsubscribe?.();\n loader.dispose();\n throw error;\n }\n const operation = pendingTask.then(\n (result) => {\n taskResult = result;\n complete({});\n },\n (error: unknown) => complete({ error }),\n );\n return {\n render(width: number) {\n if (width <= 0) return [];\n const safeWidth = Math.max(1, width);\n const lines = loader.render(safeWidth);\n const bottomBorder = lines.at(-1);\n return [\n ...lines.slice(0, -1),\n truncateToWidth(theme.fg(\"dim\", cancelHint), safeWidth, \"\"),\n ...(bottomBorder === undefined ? [] : [bottomBorder]),\n ];\n },\n invalidate: () => loader.invalidate(),\n handleInput: cancel,\n dispose() {\n unsubscribe?.();\n loader.dispose();\n },\n waitForPending: () => operation,\n };\n },\n });\n if (interaction.kind === \"error\") throw interaction.error;\n if (interaction.kind !== \"completed\") return { kind: \"closed\" };\n if (interaction.value.cancelled) {\n if (cancelledMessage) ctx.ui.notify(cancelledMessage, \"info\");\n return { kind: \"cancelled\" };\n }\n if (interaction.value.error) throw interaction.value.error;\n return { kind: \"completed\", value: taskResult };\n}\n\nfunction hasControlCharacter(value: string) {\n // biome-ignore lint/suspicious/noControlCharactersInRegex: Unsafe key labels must be omitted.\n return /[\\u0000-\\u001f\\u007f-\\u009f]/u.test(value);\n}\n"],
|
|
5
|
+
"mappings": ";;;;AAAA,SAAS,sBAA6C;AACtD,SAAS,cAAc,KAAK,YAAY,uBAAuB;AAC/D,SAAS,wBAAwB,4BAA4B;AAiC7D,eAAsB,wBACpB,KACA,SACA,OACA,UACA,UAAuC,CAAC,GACH;AACrC,QAAM,SAAS,MAAM;AAAA,IACnB;AAAA,IACA;AAAA,IACA,CAAC,QAAQ,UAAU,aACjB,SAAS,OAAO,QAAQ,UAAU,QAAQ,QAAQ,UAAU,QAAW,QAAQ,sBAAsB;AAAA,IACvG;AAAA,EACF;AACA,SAAO,OAAO,SAAS,cAAe,OAAO,SAAS,EAAE,MAAM,SAAS,IAAK;AAC9E;AAQA,eAAsB,mBACpB,KACA,SACA,MAKA,UAAkF,CAAC,GAC5C;AACvC,QAAM;AAAA,IACJ,cAAc;AAAA,IACd,sBAAsB;AAAA,IACtB,mBAAmB;AAAA,IACnB;AAAA,IACA,YAAY,MAAM;AAAA,EACpB,IAAI;AACJ,MAAI,QAAQ,WAAW,CAAC,UAAU,EAAG,QAAO,EAAE,MAAM,SAAS;AAC7D,MAAI,IAAI,SAAS,MAAO,QAAO,EAAE,MAAM,aAAa,OAAO,MAAM,KAAK,MAAM,EAAE;AAC9E,MAAI,gBAAgB;AACpB,MAAI;AACJ,QAAM,cAAc,MAAM,qBAAiF,KAAK;AAAA,IAC9G;AAAA,IACA,WAAW,MAAM,CAAC,QAAQ,WAAW,UAAU;AAAA,IAC/C,QAAQ,C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;AAAA,QACb;AAAA,QACA,CAAC,UAAmB,SAAS,EAAE,MAAM,CAAC;AAAA,MACxC;AACA,aAAO;AAAA,QACL,OAAO,OAAe;AACpB,cAAI,SAAS,EAAG,QAAO,CAAC;AACxB,gBAAM,YAAY,KAAK,IAAI,GAAG,KAAK;AACnC,gBAAM,QAAQ,OAAO,OAAO,SAAS;AACrC,gBAAM,eAAe,MAAM,GAAG,EAAE;AAChC,iBAAO;AAAA,YACL,GAAG,MAAM,MAAM,GAAG,EAAE;AAAA,YACpB,gBAAgB,MAAM,GAAG,OAAO,UAAU,GAAG,WAAW,EAAE;AAAA,YAC1D,GAAI,iBAAiB,SAAY,CAAC,IAAI,CAAC,YAAY;AAAA,UACrD;AAAA,QACF;AAAA,QACA,YAAY,MAAM,OAAO,WAAW;AAAA,QACpC,aAAa;AAAA,QACb,UAAU;AACR,wBAAc;AACd,iBAAO,QAAQ;AAAA,QACjB;AAAA,QACA,gBAAgB,MAAM;AAAA,MACxB;AAAA,IACF;AAAA,EACF,CAAC;AACD,MAAI,YAAY,SAAS,QAAS,OAAM,YAAY;AACpD,MAAI,YAAY,SAAS,YAAa,QAAO,EAAE,MAAM,SAAS;AAC9D,MAAI,YAAY,MAAM,WAAW;AAC/B,QAAI,iBAAkB,KAAI,GAAG,OAAO,kBAAkB,MAAM;AAC5D,WAAO,EAAE,MAAM,YAAY;AAAA,EAC7B;AACA,MAAI,YAAY,MAAM,MAAO,OAAM,YAAY,MAAM;AACrD,SAAO,EAAE,MAAM,aAAa,OAAO,WAAW;AAChD;AAEA,SAAS,oBAAoB,OAAe;AAE1C,SAAO,gCAAgC,KAAK,KAAK;AACnD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
// @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
|
|
3
3
|
import {
|
|
4
4
|
showRemoteSelectionReview
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-WCGLU526.ts";
|
|
6
6
|
import {
|
|
7
7
|
runCancellableOperation
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import {
|
|
10
|
-
errorMessage
|
|
11
|
-
} from "./chunk-6YKOHBSC.ts";
|
|
8
|
+
} from "./chunk-AYGMIMCV.ts";
|
|
12
9
|
import {
|
|
13
10
|
loadConfig,
|
|
14
11
|
syncConfigReviewIdentity
|
|
15
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-J52GYZO6.ts";
|
|
13
|
+
import {
|
|
14
|
+
errorMessage
|
|
15
|
+
} from "./chunk-6YKOHBSC.ts";
|
|
16
16
|
import {
|
|
17
17
|
safeTerminalText
|
|
18
18
|
} from "./chunk-2JNFEZ3V.ts";
|
|
@@ -208,4 +208,4 @@ async function dispatchManagerResult(ctx, initialResult, origin, runRoute, signa
|
|
|
208
208
|
export {
|
|
209
209
|
dispatchManagerResult
|
|
210
210
|
};
|
|
211
|
-
//# sourceMappingURL=chunk-
|
|
211
|
+
//# sourceMappingURL=chunk-BCDBT4X3.ts.map
|