@narumitw/pi-sync 0.62.0 → 0.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +29 -15
- package/dist/chunks/{chunk-MNYRU5U5.ts → chunk-27F5W7DX.ts} +3 -2
- package/dist/chunks/{chunk-MNYRU5U5.ts.map → chunk-27F5W7DX.ts.map} +2 -2
- package/dist/chunks/chunk-CKUGCBHP.ts +114 -0
- package/dist/chunks/chunk-CKUGCBHP.ts.map +7 -0
- package/dist/chunks/chunk-EJDDRS6O.ts +17 -0
- package/dist/chunks/chunk-EJDDRS6O.ts.map +7 -0
- package/dist/chunks/{chunk-6PFZUEUG.ts → chunk-EXDWEFIJ.ts} +52 -135
- package/dist/chunks/chunk-EXDWEFIJ.ts.map +7 -0
- package/dist/chunks/{chunk-NHFGAZEC.ts → chunk-HSCAFOT5.ts} +7 -7
- package/dist/chunks/chunk-HSCAFOT5.ts.map +7 -0
- package/dist/chunks/chunk-MANNB4WZ.ts +36 -0
- package/dist/chunks/chunk-MANNB4WZ.ts.map +7 -0
- package/dist/chunks/{chunk-ZB3GNX3P.ts → chunk-S6FUUWV5.ts} +139 -12
- package/dist/chunks/chunk-S6FUUWV5.ts.map +7 -0
- package/dist/chunks/{chunk-PWESMTH6.ts → chunk-SXCH4Q5O.ts} +38 -20
- package/dist/chunks/chunk-SXCH4Q5O.ts.map +7 -0
- package/dist/chunks/{chunk-INECVQNR.ts → chunk-UGS6RYDZ.ts} +5 -3
- package/dist/chunks/chunk-UGS6RYDZ.ts.map +7 -0
- package/dist/chunks/{chunk-3E3TR3JE.ts → chunk-V76KCWHO.ts} +6 -4
- package/dist/chunks/{chunk-3E3TR3JE.ts.map → chunk-V76KCWHO.ts.map} +1 -1
- package/dist/chunks/{chunk-GSCZ4VXV.ts → chunk-VQ47JBLF.ts} +2 -2
- package/dist/chunks/chunk-WFBHWYI6.ts +18 -0
- package/dist/chunks/chunk-WFBHWYI6.ts.map +7 -0
- package/dist/chunks/{command-handler-6ATREPG7.ts → command-handler-VINMQ7ZM.ts} +19 -36
- package/dist/chunks/command-handler-VINMQ7ZM.ts.map +7 -0
- package/dist/chunks/{conflict-review-MAOGTIAI.ts → conflict-review-PCDFRIVB.ts} +2 -2
- package/dist/chunks/{file-selection-QR2KZVGD.ts → file-selection-KID23GAD.ts} +15 -8
- package/dist/chunks/file-selection-KID23GAD.ts.map +7 -0
- package/dist/chunks/{manager-result-dispatcher-MC6EQOQY.ts → manager-result-dispatcher-GDB74IOP.ts} +6 -5
- package/dist/chunks/{manager-ui-AOFUNXAJ.ts → manager-ui-YHDECYKI.ts} +197 -322
- package/dist/chunks/manager-ui-YHDECYKI.ts.map +7 -0
- package/dist/chunks/{remote-selection-ui-4BTP2OJR.ts → remote-selection-ui-GPITNEBF.ts} +5 -4
- package/dist/chunks/{setup-switch-Y6AMFFNK.ts → setup-switch-L54X5U5I.ts} +4 -4
- package/dist/chunks/{setup-wizard-5G426MOZ.ts → setup-wizard-YO4MCPUF.ts} +7 -3
- package/dist/chunks/{setup-wizard-5G426MOZ.ts.map → setup-wizard-YO4MCPUF.ts.map} +1 -1
- package/dist/chunks/{sync-inspection-ITZ6Z4DE.ts → sync-inspection-H2WX5SUT.ts} +3 -3
- package/dist/chunks/{sync-operations-NMVKF7SE.ts → sync-operations-2MZAYHL2.ts} +2 -2
- package/dist/daemon/dist/cli.js +1 -1
- package/dist/daemon/dist/consent.js +134 -16
- package/dist/daemon/dist/engine/backends/git/git-backend.js +61 -30
- package/dist/daemon/dist/engine/ignore/ignore-initialization.js +93 -27
- package/dist/daemon/dist/engine/ignore/ignore-settings.js +85 -14
- package/dist/daemon/dist/engine/settings/config-file.js +1 -1
- package/dist/daemon/dist/engine/settings/config.js +71 -28
- package/dist/daemon/dist/engine/settings/settings-management.js +8 -2
- package/dist/daemon/dist/engine/snapshot/session-paths.js +7 -2
- package/dist/daemon/dist/engine/snapshot/snapshot-transaction-policy.js +37 -17
- package/dist/daemon/dist/engine/snapshot/snapshot-transaction.js +55 -13
- package/dist/daemon/dist/engine/sync/agent-plan.js +1 -0
- package/dist/daemon/dist/engine/sync/agent-sync.js +8 -1
- package/dist/daemon/dist/engine/sync/continuous-sync.js +32 -15
- package/dist/daemon/dist/engine/sync/merge-acceptance.js +29 -0
- package/dist/daemon/dist/engine/sync/merge-apply.js +7 -4
- package/dist/daemon/dist/engine/sync/merge-journal.js +33 -14
- package/dist/daemon/dist/engine/sync/merged-sync.js +31 -39
- package/dist/daemon/dist/engine/sync/remote-snapshot.js +17 -2
- package/dist/daemon/dist/engine/sync/session-push.js +20 -6
- package/dist/daemon/dist/engine/sync/sync-mutations.js +71 -50
- package/dist/daemon/dist/engine/sync/sync-policy.js +28 -3
- package/dist/daemon/dist/engine/sync/sync-state.js +3 -8
- package/dist/daemon/dist/engine/sync/transfer-freshness.js +82 -0
- package/dist/daemon/dist/engine-service.js +124 -27
- package/dist/daemon/dist/monitor.js +84 -32
- package/dist/daemon/dist/server.js +46 -5
- package/dist/daemon/dist/service-host.js +2 -1
- package/dist/daemon/package.json +1 -1
- package/dist/index.ts +28 -25
- package/dist/index.ts.map +4 -4
- package/package.json +3 -3
- package/skills/configure-pi-sync/SKILL.md +17 -64
- package/skills/configure-pi-sync/references/configuration.md +60 -20
- package/src/commands/command-execution.ts +12 -8
- package/src/commands/command-types.ts +1 -0
- package/src/daemon/pi-client.ts +4 -2
- package/src/settings/config.ts +1 -0
- package/src/sync/automatic-sync.ts +9 -2
- package/src/sync/setup-switch.ts +38 -15
- package/src/sync/startup-check.ts +7 -4
- package/src/ui/excluded-paths-ui.ts +2 -2
- package/src/ui/file-selection.ts +7 -2
- package/src/ui/ignore-file-guidance.ts +7 -0
- package/src/ui/ignore-file-ui.ts +28 -202
- package/src/ui/manager-state.ts +27 -15
- package/src/ui/manager-ui.ts +4 -1
- package/src/ui/remote-selection-ui.ts +51 -24
- package/src/ui/settings-ui.ts +132 -81
- package/src/ui/setup/setup-actions.ts +16 -4
- package/src/ui/setup/setup-prompts.ts +55 -9
- package/src/ui/setup/setup-switcher.ts +24 -11
- package/src/ui/storage-connections-ui.ts +33 -11
- package/src/ui/sync-setups-ui.ts +24 -7
- package/dist/chunks/chunk-6PFZUEUG.ts.map +0 -7
- package/dist/chunks/chunk-ECYCNZOE.ts +0 -12
- package/dist/chunks/chunk-ECYCNZOE.ts.map +0 -7
- package/dist/chunks/chunk-INECVQNR.ts.map +0 -7
- package/dist/chunks/chunk-NHFGAZEC.ts.map +0 -7
- package/dist/chunks/chunk-PWESMTH6.ts.map +0 -7
- package/dist/chunks/chunk-ZB3GNX3P.ts.map +0 -7
- package/dist/chunks/command-handler-6ATREPG7.ts.map +0 -7
- package/dist/chunks/file-selection-QR2KZVGD.ts.map +0 -7
- package/dist/chunks/manager-ui-AOFUNXAJ.ts.map +0 -7
- /package/dist/chunks/{chunk-GSCZ4VXV.ts.map → chunk-VQ47JBLF.ts.map} +0 -0
- /package/dist/chunks/{conflict-review-MAOGTIAI.ts.map → conflict-review-PCDFRIVB.ts.map} +0 -0
- /package/dist/chunks/{manager-result-dispatcher-MC6EQOQY.ts.map → manager-result-dispatcher-GDB74IOP.ts.map} +0 -0
- /package/dist/chunks/{remote-selection-ui-4BTP2OJR.ts.map → remote-selection-ui-GPITNEBF.ts.map} +0 -0
- /package/dist/chunks/{setup-switch-Y6AMFFNK.ts.map → setup-switch-L54X5U5I.ts.map} +0 -0
- /package/dist/chunks/{sync-inspection-ITZ6Z4DE.ts.map → sync-inspection-H2WX5SUT.ts.map} +0 -0
- /package/dist/chunks/{sync-operations-NMVKF7SE.ts.map → sync-operations-2MZAYHL2.ts.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @narumitw/pi-sync
|
|
2
2
|
|
|
3
|
+
## 0.63.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 5dfa289: Use local `.syncignore` rules for new TUI setups. Keep existing setup policies until the user reviews and confirms migration. Review the scope before transferring, upgrade peers before publishing version 6 snapshots, and edit existing rule files locally. Setup, migration, and rule-file switching do not start or authorize a transfer, and exclusions do not erase retained history. The bundled configuration skill can edit an explicitly identified local rule file on request; it no longer edits private JSON settings.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 25777f7: Read Git history manifests in bounded batches to reduce subprocess launches. Keep the same history preview and validate all retained publications in the original order.
|
|
12
|
+
- e3f2537: Keep the `/sync help` route from loading the interactive ignore-file editor or a second Pi TUI runtime from the extension install.
|
|
13
|
+
- Updated dependencies [1cbb470]
|
|
14
|
+
- @narumitw/pi-tui-kit@0.71.0
|
|
15
|
+
|
|
3
16
|
## 0.62.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ Reusable storage connections hold credentials, while named sync setups define ex
|
|
|
17
17
|
- Writes settings atomically, preserves unknown fields, rejects stale edits, and fails closed on unsafe configuration.
|
|
18
18
|
- Offers default-off Autonomous sync for eligible startup and Sync now transfers without another transfer confirmation, with model-assisted conflict resolution and a separate Continuous sync opt-in.
|
|
19
19
|
- Shares one detached synchronization service across Pi clients, with a generated split UI client runtime.
|
|
20
|
-
- Bundles an on-demand skill for
|
|
20
|
+
- Bundles an on-demand skill for configuration questions and scoped edits to a known local ignore file.
|
|
21
21
|
|
|
22
22
|
## 📦 Install
|
|
23
23
|
|
|
@@ -61,10 +61,10 @@ All new setups default to storage path `./`: the Git repository root, the WebDAV
|
|
|
61
61
|
Git also suggests branch `main`.
|
|
62
62
|
Use different folders or prefixes for independent setups sharing a WebDAV collection or bucket; existing settings and paths are unchanged.
|
|
63
63
|
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.
|
|
64
|
-
|
|
64
|
+
With ignore-file support available, new TUI setups start with eligible files in the Pi agent directory and use `.syncignore` to exclude paths. Sessions require separate opt-in and must also be allowed by the rules. Automatic sync starts off. Choose **Join an existing remote** to save with sessions and automatic sync off, then review the remote policy. Existing setups keep their policy unless you migrate them.
|
|
65
65
|
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.
|
|
66
66
|
|
|
67
|
-
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
|
|
67
|
+
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.
|
|
68
68
|
|
|
69
69
|
Buckets and remote repositories must already exist.
|
|
70
70
|
Git uses existing non-interactive SSH or credential-helper configuration and never stores Git credentials.
|
|
@@ -90,7 +90,7 @@ The summary distinguishes cached observations, recorded background state, and th
|
|
|
90
90
|
After Pi Sync detects an included-content mismatch, the manager shows **Sync status: Review needed** and puts **Review synced content (recommended)** first.
|
|
91
91
|
**Sync now** remains unavailable until you review the mismatch.
|
|
92
92
|
Opening the manager does not make another remote request.
|
|
93
|
-
**Settings** opens **Pi Sync Settings** directly
|
|
93
|
+
**Settings** opens **Pi Sync Settings** directly as one searchable list. It shows the content-policy controls for the current setup. For an ignore-file setup, **Compare sync policies** compares policy, not file contents, and cannot apply a remote policy. Legacy setups retain their existing content-list review. **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.
|
|
94
94
|
|
|
95
95
|
With Continuous sync configured, **Diagnostics** first opens a scrollable local report containing scheduler ownership, request limits, accounting, and recovery guidance. Back returns without running backend checks; continuing retains a separate backend-check confirmation. RPC presents bounded report pages. `/sync doctor` remains the direct configuration and backend-check 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.
|
|
96
96
|
|
|
@@ -104,7 +104,7 @@ Unless Autonomous sync or another explicit transfer authorization applies, a mer
|
|
|
104
104
|
|
|
105
105
|
**View details** is optional. It shows the complete add/update/delete lists and unresolved paths in an exact scrolling review, or bounded pages in RPC. The review cannot apply changes. Back or Escape returns to confirmation with **No** selected; Ctrl+C cancels the whole TUI flow. RPC offers No first but the client controls visual selection, and protocol cancellation from details returns to confirmation. Session replacement or shutdown closes the flow; local files and remote state are rechecked before transfer.
|
|
106
106
|
|
|
107
|
-
Unresolved paths stay unchanged on each side. A backup and recovery journal protect the transfer; resources do not reload automatically. Remote snapshot publication is shown separately because it can occur without file-content changes. File lists on the main screen are shortened when needed; details retain every path. `--yes`
|
|
107
|
+
Unresolved paths stay unchanged on each side. A backup and recovery journal protect the transfer; resources do not reload automatically. Remote snapshot publication is shown separately because it can occur without file-content changes. File lists on the main screen are shortened when needed; details retain every path. `--yes` does not bypass a required policy-transition review. Automatic transfers require their own authorization and a compatible policy. Interactive TUI Push and Pull use the same safe-default scrollable confirmation with exact directional add/update/remove counts and paths. Loaded sessions are excluded from local change counts. Pull and rollback also list case-variant path cleanup; changed aliases invalidate approval. Push describes changes to the active immutable snapshot, not physical deletion of retained history. RPC and History rollback keep their existing confirmation protocols, with the complete directional summary. Local bytes, settings, baseline, and remote head are rechecked before applying a reviewed transfer.
|
|
108
108
|
|
|
109
109
|
### Restore sync access
|
|
110
110
|
|
|
@@ -172,11 +172,9 @@ Print and JSON modes do not support `/sync` because UI output is not observable
|
|
|
172
172
|
|
|
173
173
|
Run `/sync` → **Set up sync** to create the canonical private user file at `<getAgentDir()>/pi-sync.json` (normally `~/.pi/agent/pi-sync.json`).
|
|
174
174
|
Use **Settings** to manage an existing setup.
|
|
175
|
-
Missing settings stay unconfigured without creating files or locks.
|
|
175
|
+
Missing settings stay unconfigured without creating files or locks. Legacy and ignore-file setups can share a settings document. Reviewed migration and rule-file switching require the canonical `pi-sync.json`; they do not promote `pi-sync.local.json` themselves.
|
|
176
176
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
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.
|
|
177
|
+
Legacy directory scope selects all eligible files, applies `exclude`, then restores matches from `reinclude`. Pi login credentials, project trust, and Pi Sync's own state stay local regardless of those rules. Folder-wide sync may include private files that the secret scan cannot identify. Review the content before transferring to a trusted destination. Existing setups keep their selected paths and are not migrated automatically. See [Agent-directory scope](./skills/configure-pi-sync/references/configuration.md#agent-directory-scope) for formats, precedence, and recovery.
|
|
180
178
|
|
|
181
179
|
### Debug startup timings
|
|
182
180
|
|
|
@@ -214,6 +212,10 @@ Ordinary **Sync now** reuses a cached refusal. Use **Retry refused model result
|
|
|
214
212
|
|
|
215
213
|
### Continuous sync
|
|
216
214
|
|
|
215
|
+
When any setup in the document uses an ignore file, first enable the automatic modes you want, then use **Settings → Review automatic transfers** to authorize those modes for the current policy. Saving or switching a setup does not grant permission or start a transfer. Settings and rule-file changes require a new review; work after the last Pi exits still requires its own authorization.
|
|
216
|
+
|
|
217
|
+
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.
|
|
218
|
+
|
|
217
219
|
**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.
|
|
218
220
|
|
|
219
221
|
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.
|
|
@@ -234,9 +236,9 @@ Successful transfers show one summary. They do not reload resources, activate ex
|
|
|
234
236
|
|
|
235
237
|
**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.
|
|
236
238
|
|
|
237
|
-
**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; directory scope keeps settings version 7 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.
|
|
239
|
+
**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; legacy directory scope keeps settings version 7 or later and snapshot version 5; ignore-file setups use settings version 8 and snapshot version 6. 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.
|
|
238
240
|
|
|
239
|
-
**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,
|
|
241
|
+
**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 legacy directory scope, or version 6 for ignore-file policy. 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**.
|
|
240
242
|
|
|
241
243
|
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).
|
|
242
244
|
|
|
@@ -278,7 +280,7 @@ A minimal Git setup uses an existing private remote and keeps automatic sync off
|
|
|
278
280
|
}
|
|
279
281
|
```
|
|
280
282
|
|
|
281
|
-
|
|
283
|
+
The existing daemon settings writer uses a private same-directory temporary file and rename (`0600` on POSIX), preserves unknown fields, and coordinates cooperating Pi Sync processes. The lock does not cover external editors.
|
|
282
284
|
Do not save from a lock-unaware editor during a pi-sync settings operation.
|
|
283
285
|
Malformed, invalid, unsupported, symlinked, or concurrently changed documents remain untouched.
|
|
284
286
|
Version 1, version 2, and non-empty unversioned settings require manual recovery rather than automatic migration.
|
|
@@ -286,13 +288,25 @@ Version 1, version 2, and non-empty unversioned settings require manual recovery
|
|
|
286
288
|
Adding `sessions` can upload prompts, tool output, paths, images, and secrets; interactive flows require a privacy acknowledgement.
|
|
287
289
|
Startup checks report included-content differences without changing anything. Transfers retain their existing included-content policy checks instead of silently expanding local scope.
|
|
288
290
|
|
|
291
|
+
### Ignore-file policy
|
|
292
|
+
|
|
293
|
+
These routes require ignore-file support in the running daemon. In TUI, eligible legacy setups can review migration the first time you open `/sync`. **Not now** keeps your existing policy and defers the prompt for that setup. To review it later, use **Settings → Migrate to ignore file…**. Check which local and remote paths enter or leave scope. Directory-wide rules can also include files created later. Use `/sync files` to check current local scope and review the transfer itself before approving it. An ignore file is not a secret scanner.
|
|
294
|
+
|
|
295
|
+
An existing valid rule file is reused as-is. After confirmation, the daemon can create a missing default `.syncignore` on Linux, macOS, and Windows without overwriting an existing file. If automatic creation is unavailable on your filesystem, follow the displayed path and starter rules: create a regular UTF-8 file there without replacing an existing file, then reopen the setup or migration review. **Settings → Ignore file** shows the current path and lets you review a switch to another existing file. Edit the file manually; there is no in-app rule save. Edits affect every setup that uses that file. Setup, migration, switching the file, and editing rules do not authorize or trigger a transfer.
|
|
296
|
+
|
|
297
|
+
The starter excludes `/sessions/` even if you opt into session sync. To sync sessions, both opt in and adjust the rule. Pi credentials, trust, Pi Sync settings and state, and rule files stay local regardless of the rules. Excluded files stay untouched locally, including on rollback. New publications omit excluded paths; retained snapshots and backups are **not erased**.
|
|
298
|
+
|
|
299
|
+
Upgrade all peers to compatible Pi Sync clients and daemons before the first version 6 snapshot publication. The remote stores a policy fingerprint, not the filename or rules. Configure matching rules and session opt-in on each device before pulling. For an existing remote with a different policy, review an explicit direction; background sync cannot make that transition. See [Ignore-file policy and recovery](./skills/configure-pi-sync/references/configuration.md#ignore-file-policy) for starter rules, matching, and safe recovery.
|
|
300
|
+
|
|
301
|
+
### Legacy path rules
|
|
302
|
+
|
|
289
303
|
For selected-path setups, **Settings → Excluded paths** edits `sync.exclude` rules that win over `include`; saving opts into at least settings version 6 and snapshot version 4. For directory scope, **Settings → Agent directory scope** also edits `reinclude` and session opt-in. Excluded local files remain untouched, including on rollback. New publications omit matching remote paths, but old history is **not erased**. Removing rules can expose or replace content. See [Excluded paths](./skills/configure-pi-sync/references/configuration.md#excluded-paths) for syntax, review, and recovery.
|
|
290
304
|
|
|
291
305
|
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.
|
|
292
306
|
|
|
293
307
|
## 🧠 Skills
|
|
294
308
|
|
|
295
|
-
Run `/skill:configure-pi-sync
|
|
309
|
+
Run `/skill:configure-pi-sync` for configuration guidance. To request a rule edit, name the existing local file shown in **Settings → Ignore file** and the exact change. The [configuration skill](./skills/configure-pi-sync/SKILL.md) loads only on request and does not read or write private Pi Sync settings.
|
|
296
310
|
Use `/sync` for initial setup, masked credential entry, and changes or transfers that require a separate review. The skill does not run diagnostics, check remote connectivity, or start a transfer.
|
|
297
311
|
The skill's instructions are not a permission sandbox for the agent's other tools.
|
|
298
312
|
Read the [settings reference](./skills/configure-pi-sync/references/configuration.md) directly when no agent assistance is needed.
|
|
@@ -373,7 +387,7 @@ Before pull or rollback, pi-sync writes a backup under `<agent-dir>/pi-sync/back
|
|
|
373
387
|
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.
|
|
374
388
|
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.
|
|
375
389
|
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.
|
|
376
|
-
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
|
|
390
|
+
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`. With a legacy policy, an explicitly reviewed `push --force` or `pull --force` can archive the old journal. With an ignore-file policy, keep the originating setup and exact rule source; a mismatch blocks replay and force direction does not bypass pending recovery. Follow the [ignore-file recovery guidance](./skills/configure-pi-sync/references/configuration.md#ignore-file-policy). Disabling automatic transfer does not undo completed transfers. Do not downgrade while a merge or snapshot recovery journal is pending.
|
|
377
391
|
|
|
378
392
|
Removing a local setup or connection never deletes remote data.
|
|
379
393
|
|
|
@@ -421,7 +435,7 @@ packages/pi-sync/
|
|
|
421
435
|
├── dist/ # Published Jiti runtime and separate daemon files
|
|
422
436
|
├── scripts/build-runtime.mjs # Runtime builder
|
|
423
437
|
├── docs/ # Operational audits and settings link compatibility
|
|
424
|
-
├── skills/configure-pi-sync/ #
|
|
438
|
+
├── skills/configure-pi-sync/ # Local rule edits and authoritative settings reference
|
|
425
439
|
└── test/ # Behavior and lifecycle coverage
|
|
426
440
|
```
|
|
427
441
|
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
syncConfigReviewFingerprint,
|
|
16
16
|
syncConfigReviewIdentity,
|
|
17
17
|
syncSessionsWarnings,
|
|
18
|
+
syncSettingsConfigFingerprint,
|
|
18
19
|
syncSetupReviewIdentity,
|
|
19
20
|
syncSetupStorageReview
|
|
20
21
|
} from "#pi-sync-daemon/engine/settings/config";
|
|
@@ -30,6 +31,6 @@ export {
|
|
|
30
31
|
syncConfigReviewFingerprint,
|
|
31
32
|
syncConfigReviewIdentity,
|
|
32
33
|
syncSessionsWarnings,
|
|
33
|
-
|
|
34
|
+
syncSettingsConfigFingerprint
|
|
34
35
|
};
|
|
35
|
-
//# sourceMappingURL=chunk-
|
|
36
|
+
//# sourceMappingURL=chunk-27F5W7DX.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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 loadSettingsConfig,\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,EACA;AAAA,OACK;",
|
|
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 loadSettingsConfig,\n sessionTokenWarnings,\n syncCheckConfigFingerprint,\n syncConfigReviewFingerprint,\n syncConfigReviewIdentity,\n syncSessionsWarnings,\n syncSettingsConfigFingerprint,\n syncSetupReviewIdentity,\n syncSetupStorageReview,\n} from \"@narumitw/pi-sync-daemon/engine/settings/config\";\n"],
|
|
5
|
+
"mappings": ";;;;AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
// @generated by scripts/build-runtime.mjs; do not edit.
|
|
2
|
+
// @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
|
|
3
|
+
|
|
4
|
+
// src/ui/cancellable-operation.ts
|
|
5
|
+
import { BorderedLoader } from "@earendil-works/pi-coding-agent";
|
|
6
|
+
import { isKeyRelease, Key, matchesKey, truncateToWidth } from "@earendil-works/pi-tui";
|
|
7
|
+
import { formatInteractionHints, runCustomInteraction } from "@narumitw/pi-tui-kit";
|
|
8
|
+
async function runCancellableOperation(ctx, message, route, runRoute, options = {}) {
|
|
9
|
+
const result = await runCancellableTask(
|
|
10
|
+
ctx,
|
|
11
|
+
message,
|
|
12
|
+
(signal, onCommit, onDialog) => runRoute(route, signal, onCommit, options.target, onDialog),
|
|
13
|
+
options
|
|
14
|
+
);
|
|
15
|
+
return result.kind === "completed" ? result.value ?? { kind: "failed" } : result;
|
|
16
|
+
}
|
|
17
|
+
async function runCancellableTask(ctx, message, task, options = {}) {
|
|
18
|
+
const {
|
|
19
|
+
commitAware = false,
|
|
20
|
+
cancelAcrossDialogs = false,
|
|
21
|
+
cancelledMessage = "Check cancelled; no settings or files were changed.",
|
|
22
|
+
signal,
|
|
23
|
+
isCurrent = () => true
|
|
24
|
+
} = options;
|
|
25
|
+
if (signal?.aborted || !isCurrent()) return { kind: "closed" };
|
|
26
|
+
if (ctx.mode !== "tui") return { kind: "completed", value: await task(signal) };
|
|
27
|
+
let commitStarted = false;
|
|
28
|
+
let taskResult;
|
|
29
|
+
const interaction = await runCustomInteraction(ctx, {
|
|
30
|
+
signal,
|
|
31
|
+
isCurrent: () => !signal?.aborted && isCurrent(),
|
|
32
|
+
create: ({ tui, theme, keybindings, signal: interactionSignal, complete }) => {
|
|
33
|
+
const loader = new BorderedLoader(tui, theme, message, { cancellable: false });
|
|
34
|
+
const cancelHint = formatInteractionHints(keybindings, [
|
|
35
|
+
{
|
|
36
|
+
keys: [...keybindings.getKeys("tui.select.cancel").filter((key) => !hasControlCharacter(key)), "ctrl+c"],
|
|
37
|
+
label: "cancel"
|
|
38
|
+
}
|
|
39
|
+
]);
|
|
40
|
+
const cancel = (data) => {
|
|
41
|
+
if (isKeyRelease(data)) return false;
|
|
42
|
+
if (!matchesKey(data, Key.ctrl("c")) && !keybindings.matches(data, "tui.select.cancel")) return false;
|
|
43
|
+
if (commitStarted) {
|
|
44
|
+
ctx.ui.notify("Applying or publishing has started and cannot be cancelled safely.", "warning");
|
|
45
|
+
} else complete({ cancelled: true });
|
|
46
|
+
return true;
|
|
47
|
+
};
|
|
48
|
+
let activeDialogs = 0;
|
|
49
|
+
const unsubscribe = cancelAcrossDialogs ? ctx.ui.onTerminalInput((data) => {
|
|
50
|
+
if (isKeyRelease(data)) return;
|
|
51
|
+
if (activeDialogs > 0 && !matchesKey(data, Key.ctrl("c"))) return;
|
|
52
|
+
return cancel(data) ? { consume: true } : void 0;
|
|
53
|
+
}) : void 0;
|
|
54
|
+
let pendingTask;
|
|
55
|
+
try {
|
|
56
|
+
pendingTask = task(
|
|
57
|
+
interactionSignal,
|
|
58
|
+
commitAware ? () => commitStarted = true : void 0,
|
|
59
|
+
cancelAcrossDialogs ? (active) => {
|
|
60
|
+
activeDialogs += active ? 1 : -1;
|
|
61
|
+
} : void 0
|
|
62
|
+
);
|
|
63
|
+
} catch (error) {
|
|
64
|
+
unsubscribe?.();
|
|
65
|
+
loader.dispose();
|
|
66
|
+
throw error;
|
|
67
|
+
}
|
|
68
|
+
const operation = pendingTask.then(
|
|
69
|
+
(result) => {
|
|
70
|
+
taskResult = result;
|
|
71
|
+
complete({});
|
|
72
|
+
},
|
|
73
|
+
(error) => complete({ error })
|
|
74
|
+
);
|
|
75
|
+
return {
|
|
76
|
+
render(width) {
|
|
77
|
+
if (width <= 0) return [];
|
|
78
|
+
const safeWidth = Math.max(1, width);
|
|
79
|
+
const lines = loader.render(safeWidth);
|
|
80
|
+
const bottomBorder = lines.at(-1);
|
|
81
|
+
return [
|
|
82
|
+
...lines.slice(0, -1),
|
|
83
|
+
truncateToWidth(theme.fg("dim", cancelHint), safeWidth, ""),
|
|
84
|
+
...bottomBorder === void 0 ? [] : [bottomBorder]
|
|
85
|
+
];
|
|
86
|
+
},
|
|
87
|
+
invalidate: () => loader.invalidate(),
|
|
88
|
+
handleInput: cancel,
|
|
89
|
+
dispose() {
|
|
90
|
+
unsubscribe?.();
|
|
91
|
+
loader.dispose();
|
|
92
|
+
},
|
|
93
|
+
waitForPending: () => operation
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
if (interaction.kind === "error") throw interaction.error;
|
|
98
|
+
if (interaction.kind !== "completed") return { kind: "closed" };
|
|
99
|
+
if (interaction.value.cancelled) {
|
|
100
|
+
if (cancelledMessage) ctx.ui.notify(cancelledMessage, "info");
|
|
101
|
+
return { kind: "cancelled" };
|
|
102
|
+
}
|
|
103
|
+
if (interaction.value.error) throw interaction.value.error;
|
|
104
|
+
return { kind: "completed", value: taskResult };
|
|
105
|
+
}
|
|
106
|
+
function hasControlCharacter(value) {
|
|
107
|
+
return /[\u0000-\u001f\u007f-\u009f]/u.test(value);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export {
|
|
111
|
+
runCancellableOperation,
|
|
112
|
+
runCancellableTask
|
|
113
|
+
};
|
|
114
|
+
//# sourceMappingURL=chunk-CKUGCBHP.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) => 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 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) => runRoute(route, signal, onCommit, options.target, onDialog),\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\"> = {},\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": "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",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// @generated by scripts/build-runtime.mjs; do not edit.
|
|
2
|
+
// @ts-nocheck -- generated JavaScript uses a .ts extension for Pi's Jiti loader.
|
|
3
|
+
import {
|
|
4
|
+
safeTerminalText
|
|
5
|
+
} from "./chunk-2JNFEZ3V.ts";
|
|
6
|
+
|
|
7
|
+
// src/ui/ignore-file-guidance.ts
|
|
8
|
+
import { resolve } from "node:path";
|
|
9
|
+
import { getAgentDir } from "@earendil-works/pi-coding-agent";
|
|
10
|
+
function manualIgnoreFileGuidance(filename) {
|
|
11
|
+
return `Edit existing ignore rules manually: ${safeTerminalText(resolve(getAgentDir(), filename))}. Edits apply to every setup using this local file on its next sync; they do not rewrite remote history.`;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
manualIgnoreFileGuidance
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=chunk-EJDDRS6O.ts.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/ui/ignore-file-guidance.ts"],
|
|
4
|
+
"sourcesContent": ["import { resolve } from \"node:path\";\nimport { getAgentDir } from \"@earendil-works/pi-coding-agent\";\nimport { safeTerminalText } from \"./terminal-text.js\";\n\nexport function manualIgnoreFileGuidance(filename: string) {\n return `Edit existing ignore rules manually: ${safeTerminalText(resolve(getAgentDir(), filename))}. Edits apply to every setup using this local file on its next sync; they do not rewrite remote history.`;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;AAAA,SAAS,eAAe;AACxB,SAAS,mBAAmB;AAGrB,SAAS,yBAAyB,UAAkB;AACzD,SAAO,wCAAwC,iBAAiB,QAAQ,YAAY,GAAG,QAAQ,CAAC,CAAC;AACnG;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|