@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: configure-pi-sync
|
|
3
|
-
description: Explain Pi Sync settings and apply authorized
|
|
3
|
+
description: Explain Pi Sync settings, troubleshoot local sync errors (including retired .syncignore setups), and apply authorized routine edits to pi-sync.json. Use this skill to choose synced paths, recover after an incompatible upgrade, or diagnose failed checks. Do not use it to run sync, administer remote storage, or modify unrelated settings.
|
|
4
4
|
license: MIT
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -10,20 +10,26 @@ Make and verify a clear, authorized local edit when it does not require a separa
|
|
|
10
10
|
For an error report, start with read-only local checks and fix it only when the user requests a fix and the findings support it.
|
|
11
11
|
Invoking this skill or asking a question does not authorize a write.
|
|
12
12
|
Ask at most one focused question if the intended change or target remains unclear after safe checks.
|
|
13
|
-
Keep settings,
|
|
13
|
+
Keep settings, daemon payloads, and other private evidence in the local process; report only relevant non-secret facts.
|
|
14
14
|
|
|
15
15
|
## Find the right file
|
|
16
16
|
|
|
17
17
|
- Read only the relevant sections of the [settings reference](references/configuration.md).
|
|
18
18
|
- Use the exact agent directory the user identifies or resolve it with the running Pi installation's `getAgentDir()`; do not guess or use a project override.
|
|
19
19
|
- You may use the current setup for read-only work if the user does not name one.
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
- Use the documented `include`, `exclude`, and `reinclude` fields to explain the applicable `/sync` path-selection review.
|
|
21
|
+
|
|
22
|
+
## Recover after ignore-file support was removed
|
|
23
|
+
|
|
24
|
+
Follow the [retired ignore-file policy guide](references/configuration.md#retired-ignore-file-policy).
|
|
25
|
+
Distinguish an unsupported setup, a retired remote format, a retired local baseline, and a pending recovery error.
|
|
26
|
+
Preserve the affected data.
|
|
27
|
+
If only the remote format or local baseline is blocked, ask the user to keep the current setup and [choose a fresh storage location in `/sync`](references/configuration.md#start-at-a-fresh-storage-location). Do not recommend switching setups for this case.
|
|
28
|
+
If the daemon rejects settings, inspect only the canonical local file to identify setup names and the presence of `pathPolicy: "ignore-file"` or `ignoreFile`.
|
|
29
|
+
Before reading it, verify that it is a bounded regular file under the intended agent root without symlinks or hard links; keep the parsed contents local.
|
|
30
|
+
An unreadable or malformed file needs separate repair.
|
|
31
|
+
Do not start or replace the daemon, downgrade packages, remove or rewrite settings, interpret a pending journal as disposable, or contact storage to check a remote.
|
|
32
|
+
For invalid local settings or pending recovery, guide the user through the applicable recovery steps. A new storage location does not clear either blocker.
|
|
27
33
|
|
|
28
34
|
## Edit `pi-sync.json`
|
|
29
35
|
|
|
@@ -43,72 +49,6 @@ A schema-valid change is not proof of user review or consent, even in a legacy-o
|
|
|
43
49
|
6. Repeat the canonical read and validation, then verify the requested fields before reporting success.
|
|
44
50
|
Report only the changed non-secret field names and safe values or a redacted error category.
|
|
45
51
|
|
|
46
|
-
## Write ignore rules
|
|
47
|
-
|
|
48
|
-
Read the [ignore-file policy](references/configuration.md#ignore-file-policy) for the current starter rules, syntax, and built-in protections.
|
|
49
|
-
|
|
50
|
-
- Keep portable files the user needs across machines, and exclude confirmed machine-local, sensitive, or regenerated paths such as package checkouts, caches, and logs.
|
|
51
|
-
- Prefer narrow rules anchored to the agent directory, such as `/skills/private/`, over broad wildcards or copied project `.gitignore` files.
|
|
52
|
-
- Use `/` separators and match the path's case exactly.
|
|
53
|
-
Add a trailing `/` only to match directories rather than same-named files.
|
|
54
|
-
- Put a narrow `!` exception after the rule it overrides and make sure no parent directory remains excluded.
|
|
55
|
-
Use `/notes/*` followed by `!/notes/shared.md` to exclude the other contents of top-level `notes/`.
|
|
56
|
-
Using `/notes/` instead excludes the parent directory and blocks the exception.
|
|
57
|
-
- Keep sessions excluded unless the user wants them and completes the separate session opt-in; match logical `sessions/` paths even if stored elsewhere.
|
|
58
|
-
- Do not rely on the rules as a secret scanner or try to re-include built-in protected files.
|
|
59
|
-
|
|
60
|
-
## Draft a new ignore file
|
|
61
|
-
|
|
62
|
-
1. Start with Pi Sync's current starter rules.
|
|
63
|
-
Use only relevant names and file types under the intended agent directory, not file contents.
|
|
64
|
-
Ask what must stay local only if the request and these checks do not answer it.
|
|
65
|
-
2. Add only exclusions justified by those paths or the user's goal, then [check the draft against the starter rules](#check-ignore-rules).
|
|
66
|
-
Do not copy legacy `include`, `exclude`, or `reinclude` rules mechanically.
|
|
67
|
-
The user must review what enters or leaves scope when migrating.
|
|
68
|
-
3. Return the draft and its expected scope changes without writing the file or settings.
|
|
69
|
-
- For a missing default `.syncignore`, the user confirms creation in `/sync` setup or migration, or follows its manual creation guidance if automatic creation is unavailable.
|
|
70
|
-
- If Pi Sync creates the starter file, [apply only authorized changes](#add-revise-or-audit-existing-rules) and have the user review the new scope before transferring.
|
|
71
|
-
- To switch an existing ignore-file setup, the user creates a valid UTF-8 rule file directly under the agent directory without overwriting an existing file, then reviews the switch in **Settings → Ignore file**.
|
|
72
|
-
|
|
73
|
-
## Add, revise, or audit existing rules
|
|
74
|
-
|
|
75
|
-
1. [Connect to the existing local daemon](#connect-to-the-existing-local-daemon) and run `ignore.read` with `{ setup: setupName }` for the selected setup.
|
|
76
|
-
This resolves the configured path and sharing setups, validates the file, and checks for a live session at that path.
|
|
77
|
-
Require a verified path directly under the agent directory that matches the selected setup.
|
|
78
|
-
Require a result with `text`, `identity`, and `sourceDigest`; a location-only result means the file is missing.
|
|
79
|
-
Reject unsafe names, protected files, symlinks, hard links, and unfinished rule-file creation.
|
|
80
|
-
Do not create a missing rule file or change the selected filename.
|
|
81
|
-
If the daemon cannot verify the source, check only a user-provided draft rather than reading or editing an unverified active file.
|
|
82
|
-
2. Propose the smallest change that meets the request, preserving unrelated lines and rule order.
|
|
83
|
-
Look for broad patterns, redundant rules, and exceptions blocked by an excluded parent.
|
|
84
|
-
A rule can still matter if no local file matches it today.
|
|
85
|
-
Do not sort or reformat rules during cleanup: even a comment or whitespace change can change the policy fingerprint.
|
|
86
|
-
3. [Check the rule matches](#check-ignore-rules) and summarize what enters or leaves scope, which setups share the file, and what you did not check.
|
|
87
|
-
Before widening scope, warn that more existing and future files can be sent or overwritten.
|
|
88
|
-
Exclusions do not erase retained snapshots or backups.
|
|
89
|
-
Stop after the summary for a read-only audit or an unapproved scope change.
|
|
90
|
-
If the requested exclusion or exception already works, report it without rewriting the file.
|
|
91
|
-
4. Save only an authorized change when you can verify that no sync review, transfer, or recovery is in progress and the file is safe to edit.
|
|
92
|
-
A connected daemon or an absent lock does not prove that work is idle.
|
|
93
|
-
If local evidence is insufficient, ask the user to confirm that no review, transfer, recovery, or other edit is in progress and automatic work will not run during the edit.
|
|
94
|
-
Leave the file unchanged if you cannot establish these conditions.
|
|
95
|
-
Create a private temporary file exclusively in the same directory and stage the validated replacement there.
|
|
96
|
-
Immediately before atomic replacement, repeat `ignore.read` for the same user-named setup and recheck its path, sharing setups, file identity, byte digest, and original file permissions.
|
|
97
|
-
Preserve the original permissions on the replacement.
|
|
98
|
-
Stop and remove only the temporary file you own if anything changed or the recheck fails.
|
|
99
|
-
The recheck does not serialize other writers; do not use `ignore.save` or retry an uncertain replacement without re-reading.
|
|
100
|
-
5. Re-read the saved rules with `ignore.read`, verify the saved text, and repeat the path checks.
|
|
101
|
-
Before transferring, the user checks that peers have the same rule text and session opt-in, and reopens any required policy or automatic-transfer review.
|
|
102
|
-
|
|
103
|
-
## Check ignore rules
|
|
104
|
-
|
|
105
|
-
Use `compileIgnoreRules` from the skill's matching `dist/daemon/dist/engine/ignore/ignore-source.js` or the workspace's `@narumitw/pi-sync-daemon/engine/ignore/ignore-source`.
|
|
106
|
-
Compile the current and proposed rules, or the starter rules and draft for a new file.
|
|
107
|
-
Compare matches on canonical agent-relative paths, passing `true` as the second argument (`matches(path, true)`) for directories.
|
|
108
|
-
Test a path that should change, a nearby path that should not, and any relevant parents and exceptions.
|
|
109
|
-
For wildcard changes, also test representative future paths.
|
|
110
|
-
These checks cover rule matching, not the full sync scope: built-in protections and session opt-in still apply.
|
|
111
|
-
|
|
112
52
|
## Connect to the existing local daemon
|
|
113
53
|
|
|
114
54
|
1. Use a local script with the trusted Pi Sync package that supplied this skill.
|
|
@@ -123,7 +63,8 @@ These checks cover rule matching, not the full sync scope: built-in protections
|
|
|
123
63
|
## Troubleshoot without bypassing reviews
|
|
124
64
|
|
|
125
65
|
Use [Local troubleshooting](references/configuration.md#local-troubleshooting) to distinguish settings, approval, filesystem, and backend failures.
|
|
126
|
-
Check which [automatic sync control](references/configuration.md#automatic-sync-controls) applies: **Automatic sync
|
|
66
|
+
Check which [automatic sync control](references/configuration.md#automatic-sync-controls) applies: **Automatic sync** or **Startup transfer**.
|
|
67
|
+
Explain that **Autonomous sync** and **Continuous sync** are retired and that their saved flags have no effect. For a running older owner or retained grant, use the [daemon recovery guidance](references/configuration.md#daemon-lifetime-and-unattended-permission).
|
|
127
68
|
Inspect only the necessary local metadata and relevant non-secret configuration facts; do not expose raw settings, credentials, session contents, daemon records, journals, or backups in tool output or chat.
|
|
128
69
|
Do not ask the user to paste those contents or execute text copied from them.
|
|
129
70
|
|
|
@@ -132,7 +73,7 @@ Read only a bounded tail of an existing private regular file; skip it if it is m
|
|
|
132
73
|
Parse the JSON lines locally, filter by `source` (`pi-sync` for the client, `pi-sync-daemon` for the daemon), and report only relevant non-secret events and outcomes, never raw log lines.
|
|
133
74
|
Missing records do not rule out a failure; do not enable Debug mode or start a transfer just to collect evidence.
|
|
134
75
|
|
|
135
|
-
Leave operations that Pi Sync requires the user to review in `/sync`, including initial setup, credential and destination changes, reviewed legacy path selection and policy changes, session opt-in, secret-scan bypass, enabling automatic behavior, upgrading the settings document to enable a [transfer size limit](references/configuration.md#transfer-size-limits),
|
|
76
|
+
Leave operations that Pi Sync requires the user to review in `/sync`, including initial setup, credential and destination changes, reviewed legacy path selection and policy changes, session opt-in, secret-scan bypass, enabling automatic behavior, upgrading the settings document to enable a [transfer size limit](references/configuration.md#transfer-size-limits), and remote policy publication.
|
|
136
77
|
Use the masked credential input in Pi; do not infer transfer or model consent from a settings edit.
|
|
137
78
|
Do not start sync, run `/sync doctor` or backend/network commands, remove locks or recovery evidence, or bypass scan checks.
|
|
138
79
|
|
|
@@ -4,7 +4,7 @@ This is the authoritative public settings reference for Pi Sync.
|
|
|
4
4
|
The configuration skill applies explicitly requested local settings and ignore-rule edits and investigates Pi Sync errors. The user performs operations that require a separate review.
|
|
5
5
|
|
|
6
6
|
- **Configure a setup:** [Required fields](#settings-ownership-and-required-fields), [Manager](#editing-in-the-manager), [Version 3 example](#complete-version-3-example), [Backends](#required-backend-shapes)
|
|
7
|
-
- **Choose what syncs:** [
|
|
7
|
+
- **Choose what syncs:** [Agent-directory scope](#agent-directory-scope), [Included content](#included-content), [Excluded paths](#excluded-paths), [Transfer size limits](#transfer-size-limits), [Machine-local settings fields](#settings-field-merge-and-machine-local-fields)
|
|
8
8
|
- **Manage automatic work:** [Controls and approval](#automatic-sync-controls), [Startup transfer](#automatic-startup-transfer), [Autonomous sync](#autonomous-sync), [Daemon lifetime](#daemon-lifetime-and-unattended-permission), [Continuous sync](#continuous-sync)
|
|
9
9
|
- **Handle problems:** [Status](#status-display), [Debug mode](#debug-mode), [Secret scanning](#secret-scanning), [Diagnostics](#diagnostics), [Local troubleshooting](#local-troubleshooting), [Merge and partial progress](#content-merge-and-partial-progress), [Old settings and recovery](#unsupported-old-settings-and-recovery)
|
|
10
10
|
|
|
@@ -46,8 +46,7 @@ Global settings apply to all setups on this device; they are not remote policy.
|
|
|
46
46
|
| Current setup | `activeSyncSetup` | Required when setups exist; absent when the setup catalog is empty. |
|
|
47
47
|
| Global preferences | `skipSecretScan`, `showStatus`, `debug` | Optional booleans; defaults are false, true, and false. |
|
|
48
48
|
| Setup selection | `sync.scope`, `sync.include`, `sync.automatic` | Legacy directory scope requires version 7 or later and omits `include`; selected-path setups require `include`. Both require explicit `automatic`. |
|
|
49
|
-
|
|
|
50
|
-
| Setup behavior | `sync.automaticTransfer`, `sync.agentMode`, `sync.continuous`, `sync.mergeSettings`, `sync.mergeContent`, `sync.partialSync` | Optional booleans; all default to false. |
|
|
49
|
+
| Setup behavior | `sync.automaticTransfer`, `sync.mergeSettings`, `sync.mergeContent`, `sync.partialSync` | Optional booleans; all default to false. The retired keys `sync.agentMode` and `sync.continuous` are accepted as booleans but ignored. |
|
|
51
50
|
| Transfer size limits | `sync.maxFileSizeMiB`, `sync.maxDirectorySizeMiB` | Independent optional positive whole numbers; absence means Off. Either value requires version 9. |
|
|
52
51
|
| Portable policy | `sync.localFields` | Optional array; any explicit array, including `[]`, requires version 4 or later. |
|
|
53
52
|
| Content/partial policy | `sync.mergeContent`, `sync.partialSync` | Enabling either requires version 5 or later. |
|
|
@@ -58,21 +57,19 @@ Do not downgrade the settings version when an option is turned off.
|
|
|
58
57
|
|
|
59
58
|
### Automatic sync controls
|
|
60
59
|
|
|
61
|
-
|
|
60
|
+
Two independent controls remain available:
|
|
62
61
|
|
|
63
62
|
- **Automatic sync** (`sync.automatic`) enables startup observation and selected-content shutdown pushes when sessions are included.
|
|
64
63
|
- **Startup transfer** (`sync.automaticTransfer`) enables one eligible startup transfer.
|
|
65
|
-
- **Autonomous sync** (`sync.agentMode`, unchanged) allows eligible startup and **Sync now** transfers without another transfer confirmation, plus model assistance and disclosure for supported conflicts.
|
|
66
|
-
- **Continuous sync** (`sync.continuous`) adds recurring work only with Autonomous sync enabled.
|
|
67
64
|
|
|
68
|
-
|
|
65
|
+
**Autonomous sync** and **Continuous sync** are retired. Their legacy flags confer no transfer or model permission.
|
|
69
66
|
|
|
70
67
|
Invoking the configuration skill neither enables these controls nor grants transfer permission.
|
|
71
68
|
|
|
72
69
|
### Editing in the manager
|
|
73
70
|
|
|
74
71
|
Open `/sync` → **Settings** to go directly to **Pi Sync Settings**.
|
|
75
|
-
The screen uses a searchable flat list without category navigation. Compare content rules separately from file contents.
|
|
72
|
+
The screen uses a searchable flat list without category navigation. Compare content rules separately from file contents.
|
|
76
73
|
**Storage location** edits the current setup's coordinates, while **Manage sync setups** and **Manage storage connections** retain the catalog and affected-setup reviews.
|
|
77
74
|
Returning from catalog management refreshes the rows; switching or removing the owning setup closes its old Settings screen.
|
|
78
75
|
|
|
@@ -82,7 +79,7 @@ Escape closes the screen without undoing successful saves.
|
|
|
82
79
|
Complex values retain their input/review flows.
|
|
83
80
|
This navigation change does not alter schema, defaults, automatic-sync behavior, or explicit opt-ins.
|
|
84
81
|
|
|
85
|
-
The main menu shows cached status separately from transfer, inspection, and management actions. **Check remote status** and **View differences** run their checks only when selected.
|
|
82
|
+
The main menu shows cached status separately from transfer, inspection, and management actions. **Check remote status** and **View differences** run their checks only when selected. **Check remote status** (`/sync status`) shows local and remote changes first, or indicates that no previous sync was recorded. Storage, snapshot details, and sync scope follow.
|
|
86
83
|
**Last applied** shows a compact snapshot ID and marks application time as unavailable instead of substituting snapshot creation time. **History** shows the full IDs.
|
|
87
84
|
See the [TUI behavior contract](https://github.com/narumiruna/pi-extensions/blob/main/packages/pi-sync/docs/tui-contract.md) for scopes and transfer branches.
|
|
88
85
|
|
|
@@ -185,7 +182,7 @@ An occupied destination requires an explicit different path; Git requires a diff
|
|
|
185
182
|
This check does not contact the server or discover setups configured only on other machines.
|
|
186
183
|
|
|
187
184
|
Every setup requires explicit `sync.automatic`. Set `sync.scope` for directory scope, or set `sync.include` for selected paths.
|
|
188
|
-
|
|
185
|
+
Setup offers automatic sync with Off first. **Join an existing remote** saves with automatic sync and sessions off, then reviews the remote policy without transferring files. Existing values are not rewritten.
|
|
189
186
|
When enabled, the current setup receives one background startup check in TUI/RPC, including reload/new/resume/fork.
|
|
190
187
|
Automatic sync alone does not perform startup transfers or open dialogs; review changes through `/sync`.
|
|
191
188
|
Print/JSON skip startup checks.
|
|
@@ -196,10 +193,9 @@ Reload skips shutdown push.
|
|
|
196
193
|
Settings changes apply to subsequent operations; changing this setting does not schedule another startup check until the next session start.
|
|
197
194
|
Foreground `/sync` cancels a pending check before opening Settings.
|
|
198
195
|
The check deadline is 30 seconds plus bounded cleanup, with manual retry through `/sync status`; this one-shot policy has no polling.
|
|
199
|
-
Continuous sync is a separate opt-in.
|
|
200
196
|
See [Background startup checks](https://github.com/narumiruna/pi-extensions/blob/main/packages/pi-sync/README.md#background-startup-checks) for recovery and Git cache exceptions.
|
|
201
197
|
|
|
202
|
-
New TUI setups
|
|
198
|
+
New TUI setups recommend **Selected paths**: Recommended includes the nine non-session Pi roots below, and Minimal includes only `settings.json` and `AGENTS.md`. Agent-directory scope is an explicit alternative.
|
|
203
199
|
The setup review shows the scope and exact backend destination.
|
|
204
200
|
R2/S3 requires an explicitly entered existing bucket and never creates one.
|
|
205
201
|
Saving setup or connection settings does not transfer files.
|
|
@@ -248,17 +244,17 @@ Use the existing manager and **Check remote status** guidance to inspect recover
|
|
|
248
244
|
|
|
249
245
|
The top-level user setting `debug` is an optional boolean and defaults to `false` for every setup. Use **/sync → Settings → Debug mode** or edit `<getAgentDir()>/pi-sync.json` (normally `~/.pi/agent/pi-sync.json`). UI changes save immediately through the existing ordered, atomic settings writer. There is no project or environment override.
|
|
250
246
|
|
|
251
|
-
Pi uses the saved value from session start, including `/reload`, new, resume, and fork, for client logging and timing display. The daemon uses the agent directory's validated setting for file logging, not a connected client's value. It applies changes at the next applicable owner
|
|
247
|
+
Pi uses the saved value from session start, including `/reload`, new, resume, and fork, for client logging and timing display. The daemon uses the agent directory's validated setting for file logging, not a connected client's value. It applies changes at the next applicable owner or job boundary without a restart. A missing or false `debug` value does not enable logging; the daemon can skip records when it cannot validate settings. Turning on Debug mode does not start a new check or transfer, or grant permission for work after Pi exits.
|
|
252
248
|
|
|
253
249
|
#### Shared log
|
|
254
250
|
|
|
255
|
-
Pi Sync and the daemon append directly to one private file, `<getAgentDir()>/pi-sync.log` (normally `~/.pi/agent/pi-sync.log`). Each line is a JSON record. Filter the `source` field for `pi-sync` to see client initialization, connection and request outcomes, or `pi-sync-daemon` to see daemon owner, timing,
|
|
251
|
+
Pi Sync and the daemon append directly to one private file, `<getAgentDir()>/pi-sync.log` (normally `~/.pi/agent/pi-sync.log`). Each line is a JSON record. Filter the `source` field for `pi-sync` to see client initialization, connection and request outcomes, or `pi-sync-daemon` to see daemon owner, timing, and job outcomes. Print and JSON modes add no client log writes and do not launch a daemon to log.
|
|
256
252
|
|
|
257
253
|
Manager actions use `push.foreground` and `pull.foreground`, including a resumed ignore-rule Pull. Match the `operationId` across sources for each attempt. A retry uses a new ID. The daemon can record a completed transfer even if the client reports that queue recovery failed afterward. `started` alone does not show that a transfer ran; the action may still be waiting for review.
|
|
258
254
|
|
|
259
255
|
Records use fixed events and outcomes rather than error text. They can include timestamps, process IDs, durations, counts, and an opaque operation ID when available, but not credentials, local paths, remote addresses, synced content, subprocess output, or model data. Neither timestamps nor file order prove which action caused another. The file is private (`0600` on POSIX when created). Logging is best effort: an unsafe file or write failure can leave records missing without causing a sync failure. The daemon's bounded operational `lifecycle.log` is separate and not controlled by Debug mode. Neither file is a recovery journal.
|
|
260
256
|
|
|
261
|
-
`pi-sync.log` at the agent root stays local regardless of the selection policy. Include and re-include rules cannot override this protection
|
|
257
|
+
`pi-sync.log` at the agent root stays local regardless of the selection policy. Include and re-include rules cannot override this protection. If an older setup or remote snapshot included this name, preserve the local and remote data and review the reported settings or snapshot error. Do not force a pull or use the error as a reason to rewrite remote history. Protection does not erase previously retained snapshots.
|
|
262
258
|
|
|
263
259
|
Set `debug` to `false` or remove it to stop new logging at the boundaries above. Existing bytes remain; the log is not rotated or deleted automatically. Stop all Pi Sync clients and the daemon for that agent directory before archiving or removing the file. Store archives outside the agent directory, especially before downgrading to a version that may not protect this path. Review the file before sharing it.
|
|
264
260
|
|
|
@@ -268,7 +264,6 @@ With `debug: true` at Pi session start, reports show local initialization after
|
|
|
268
264
|
The report shows one line per stage, followed by a total.
|
|
269
265
|
TUI reports are stored as custom session entries, so they remain in the transcript after `/reload` and later notifications without entering model context.
|
|
270
266
|
RPC reports remain notifications.
|
|
271
|
-
When Continuous sync is enabled, the background report covers its first cycle rather than the separate one-shot startup check; later polls and same-session idle resumes do not publish more timing reports.
|
|
272
267
|
Stages include transaction recovery, settings reads, inspection import, backend initialization, local snapshot, sync state read, remote head, operations import, and automatic transfer when those stages run.
|
|
273
268
|
Automatic-transfer details separate authorization, journal recovery, state and local reads, remote-head reads, snapshot downloads, merge planning, backup, publication, local apply, baseline writes, and cleanup.
|
|
274
269
|
Repeated stages aggregate elapsed time and show a call count.
|
|
@@ -280,7 +275,6 @@ Recovery failures before valid settings can be read cannot enable a timing repor
|
|
|
280
275
|
|
|
281
276
|
Interrupted stages are marked `interrupted`; cancelled or failed background work is marked `stopped`.
|
|
282
277
|
Session replacement and shutdown suppress late reports from the old session.
|
|
283
|
-
Pausing Continuous sync cancels its active cycle and suppresses that cycle’s late report; it does not schedule another startup report on idle resume.
|
|
284
278
|
Labels and durations contain no credentials, paths, file contents, remote addresses, or error text.
|
|
285
279
|
TUI reports remain in session history even after debugging is disabled, without adding model messages. Print/JSON produce no timing reports. Manual and shutdown work do not produce these startup reports.
|
|
286
280
|
|
|
@@ -294,7 +288,7 @@ Enable it only after reviewing the destination and selected content because file
|
|
|
294
288
|
|
|
295
289
|
### Diagnostics
|
|
296
290
|
|
|
297
|
-
**/sync → Diagnostics** and `/sync doctor` use the same
|
|
291
|
+
**/sync → Diagnostics** and `/sync doctor` use the same route. The report puts findings that need attention first, followed by local checks, storage checks, and sync scope.
|
|
298
292
|
S3/R2 reads the selected setup's latest pointer with a ten-second deadline and bounded error details; it never writes, deletes, lists buckets, or changes settings.
|
|
299
293
|
HTTP success does not validate snapshot contents or write access.
|
|
300
294
|
`NoSuchKey` indicates no snapshot at the path; `NoSuchBucket` indicates a missing bucket; other 404 responses cannot distinguish the two.
|
|
@@ -308,7 +302,7 @@ Use the first concrete error, not a generic recovery hint appended to it. Start
|
|
|
308
302
|
|
|
309
303
|
| Error or symptom | Local check and next action |
|
|
310
304
|
| --- | --- |
|
|
311
|
-
| **Autonomous sync requires a separate policy review** |
|
|
305
|
+
| **Autonomous sync requires a separate policy review** | This message comes from an older build. Upgrade or close old Pi clients and [verify the old daemon has exited](#daemon-lifetime-and-unattended-permission). Use reviewed **Sync now** or independently enable **Startup transfer**. |
|
|
312
306
|
| **Agent directory changed or has an unsafe filesystem layout** | The local scan could not establish a stable filesystem view. Use file metadata to check the agent root, Pi's `settings.json`, the effective session directory (including any `--session-dir` override), and in-scope paths. Symlinks in the session directory path and hard-linked candidate files can trigger this error; ordinary symlinks encountered in the directory scan are skipped. Check whether another Pi process or editor is changing files during the scan. Do not change synchronization settings unless the evidence identifies a relevant setting; this error alone does not identify a path or field. |
|
|
313
307
|
| **Transfer blocked by size limits** | Check the reported paths and byte counts. Use `/sync diff`, then narrow the selection or review a different source. See [transfer size limits](#transfer-size-limits). |
|
|
314
308
|
| **Malformed or unsupported settings** | Check the canonical path and documented version and field constraints. Preserve the original private bytes and follow [settings recovery](#unsupported-old-settings-and-recovery); do not replace the document with defaults. |
|
|
@@ -316,60 +310,28 @@ Use the first concrete error, not a generic recovery hint appended to it. Start
|
|
|
316
310
|
|
|
317
311
|
A local check does not verify remote connectivity or permissions. Diagnostics can stop at the same local scan error before backend checks run.
|
|
318
312
|
|
|
319
|
-
###
|
|
313
|
+
### Retired ignore-file policy
|
|
320
314
|
|
|
321
|
-
|
|
322
|
-
To migrate a legacy setup, choose **Review migration now** when first offered in the TUI manager, or **Settings → Migrate to ignore file…** later. **Not now** defers the offer for that setup on this device; closing the prompt without a choice does not save a deferral. Review local and remote paths that enter or leave scope, including what the rules would do for future files. Legacy selected paths and `reinclude` rules do not always translate directly.
|
|
315
|
+
Pi Sync no longer supports `.syncignore` or custom ignore files. A settings document with any `sync.pathPolicy: "ignore-file"` or `sync.ignoreFile` entry is blocked, even if that setup is inactive. Remote snapshots in versions 6 and 7, pending ignore-file recovery, and accepted local state tied to the retired policy are also blocked. The settings version itself does not need to change. Do not use `--force`, strip the policy fields, or delete recovery files to make the operation proceed.
|
|
323
316
|
|
|
324
|
-
|
|
317
|
+
#### Start at a fresh storage location
|
|
325
318
|
|
|
326
|
-
|
|
327
|
-
{
|
|
328
|
-
"scope": "agent-directory",
|
|
329
|
-
"pathPolicy": "ignore-file",
|
|
330
|
-
"sessions": false,
|
|
331
|
-
"automatic": false
|
|
332
|
-
}
|
|
333
|
-
```
|
|
334
|
-
|
|
335
|
-
#### Create or switch rule files
|
|
336
|
-
|
|
337
|
-
After confirmation, the daemon can create a missing default file on Linux, macOS, and Windows. If your filesystem does not support automatic creation, create a regular UTF-8 file using the exact path and starter text Pi Sync shows. Do not overwrite an existing file. Reopen the setup or migration and confirm the review.
|
|
338
|
-
|
|
339
|
-
The starter rules exclude, among other paths, Pi's top-level `git/` package checkouts:
|
|
340
|
-
|
|
341
|
-
```gitignore
|
|
342
|
-
/auth.json
|
|
343
|
-
/git/
|
|
344
|
-
/npm/
|
|
345
|
-
/sessions/
|
|
346
|
-
/truth.json
|
|
347
|
-
```
|
|
348
|
-
|
|
349
|
-
Pi Sync reuses a valid existing file, even an empty one. If creation was interrupted, it uses the starter rules recorded before the interruption, even after an upgrade.
|
|
350
|
-
To switch files, choose an existing regular file by its safe filename directly in the agent directory, not a path, symlink, or linked alias. Missing or unsafe rules block transfers. An absent default can inform a preview, but cannot authorize a transfer.
|
|
351
|
-
|
|
352
|
-
**Settings → Ignore file** shows the active path and offers a reviewed switch. `/sync files` shows the path, not matched files. There is no in-app rule save. Edit the existing file only when no sync review, transfer, or recovery is running. Check the affected paths and reopen the transfer review. The edit affects every setup using that file.
|
|
353
|
-
|
|
354
|
-
#### Matching and local protections
|
|
319
|
+
If only the remote snapshot or last accepted sync is blocked, keep your current setup and give it a new, empty destination. This requires valid local settings and no pending recovery. If you need files that exist only at the old destination, recover them with the compatible release and the original setup and rules first.
|
|
355
320
|
|
|
356
|
-
|
|
321
|
+
1. Turn off the setup's [automatic sync controls](#automatic-sync-controls). Open **/sync → Settings → Storage location**.
|
|
322
|
+
2. For R2/S3 or WebDAV, enter an unused path, such as `pi-sync/selected-v2`, in **Storage path** or **WebDAV storage path**, respectively. For Git, use a new branch; changing only the path on the same branch is not enough. Review and save the destination. Saving does not transfer files, move history, or delete anything at the old location.
|
|
323
|
+
3. Confirm which local files should sync, then review the first **Push to remote** from the device with the files you want to keep. Point the other devices at the new destination before turning automation back on.
|
|
357
324
|
|
|
358
|
-
|
|
325
|
+
#### Recover local settings or pending operations
|
|
359
326
|
|
|
360
|
-
|
|
327
|
+
Changing the storage location cannot fix invalid local settings or clear a pending recovery. Use the steps below if local settings still use the retired policy or an ignore-file operation needs recovery. For other settings errors, see [settings recovery](#unsupported-old-settings-and-recovery).
|
|
361
328
|
|
|
362
|
-
|
|
329
|
+
1. Stop automatic work and close the other Pi clients on the same agent directory. Back up the settings, rule files, and pending journals privately. If needed, use the last compatible Pi Sync release (`@narumitw/pi-sync@0.67.3`, with its bundled daemon `0.13.3`). For a standalone daemon, use matching release `@narumitw/pi-sync-daemon@0.13.3`. [Drain and verify the current owner's exit](https://github.com/narumiruna/pi-extensions/blob/main/packages/pi-sync/docs/daemon-migration.md#ownership-and-upgrade) before changing builds. Do not overwrite a running installation or reuse an older settings backup over newer bytes.
|
|
330
|
+
2. In the compatible version, finish pending recovery using the original setup. If the remote has files you want that are not available locally, review a Pull before changing setups. A snapshot with only a policy fingerprint requires the matching local rules. Preserve the old remote and its history.
|
|
331
|
+
3. Switch to an existing compatible **Selected paths** setup or use **Sync setups… → Add sync setup → Recommended Pi settings** at a separate empty storage location. For Git, use a separate branch. Select **Switch only** and keep session and automatic transfers off while reviewing scope. The old include list may be gone; choose paths explicitly, and do not treat a retired rule file as sync content. Once no setup uses it, archive it outside the agent directory or exclude it before using directory scope.
|
|
332
|
+
4. After pending recovery is clear, use **Remove sync setup…** to remove the old local setup in the compatible version. This does not delete remote data. If the replacement setup's accepted state came from a settings file that still had retired setups, use a reviewed transfer with the compatible build after removing them, or give the replacement setup a [fresh storage location](#start-at-a-fresh-storage-location). Then upgrade and review the first transfer. Confirm all devices use the intended destination before turning automation back on.
|
|
363
333
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
When policies differ, a reviewed Push can replace the remote policy. Pull can preview and adopt verified remote rules without writing to the remote. Cancel to leave both sides unchanged. Neither `--force`, `--yes` nor background work approves a policy overwrite. If rule text is unavailable, match the publisher's rules manually. If Sessions opt-in differs, review that setting locally first. Select a dedicated rule file before adopting into a shared source. An omitted rule file is not a request to delete it. Rollback projects historical content through the current local rules; it does not adopt historical rules.
|
|
367
|
-
|
|
368
|
-
If adoption is interrupted, keep the local rules, backups and journals. Startup recovers an interrupted local file transaction before opening sync, without adopting rules or contacting the backend. If startup cannot verify the recovery evidence, do not edit the affected files; preserve the journals for review.
|
|
369
|
-
|
|
370
|
-
Run `/sync pull` on the originating setup to review resumption. It uses the recorded, retained snapshot even if another device has since published a newer one. If that snapshot is missing or the local evidence no longer matches, preserve the journals and backups; do not replace them with the newer snapshot. After recovery, run `/sync status` to check the newer remote state. The successful transfer reports the backup path for the previous rule text.
|
|
371
|
-
|
|
372
|
-
After a version 6 or 7 publication, downgrading the package alone is not rollback. Close incompatible clients, verify daemon exit, and review compatible local and remote restoration before resuming transfers. Keep retained history intact.
|
|
334
|
+
Use `/skill:configure-pi-sync` for help selecting the right branch of this workflow. The skill does not downgrade packages, edit retired settings, clear recovery evidence, or execute a transfer.
|
|
373
335
|
|
|
374
336
|
### Agent-directory scope
|
|
375
337
|
|
|
@@ -510,18 +472,18 @@ Both settings default to **Off** and can be set independently. Enter `Off` or a
|
|
|
510
472
|
|
|
511
473
|
Omit a key to turn that limit Off. There is no project or environment override. Older documents are not changed merely because both limits are Off. To enable a limit manually, set the document's top-level `version` to `9` in the same edit. In the TUI, review the compatibility warning before the first save that upgrades the file. **Close or upgrade older Pi Sync clients and daemon builds that share this agent directory before enabling a limit.** Older processes cannot use any setup in the version-9 document, even after both limits are cleared. Each device enforces its own limits, with no snapshot format change or remote settings migration. See [daemon ownership and upgrade](https://github.com/narumiruna/pi-extensions/blob/main/packages/pi-sync/docs/daemon-migration.md#ownership-and-upgrade) if the running owner does not support the limits.
|
|
512
474
|
|
|
513
|
-
A saved change applies to subsequent transfer attempts. It starts no transfer and grants no new automatic permission. If the change invalidates existing permission, review automatic transfers again through the existing controls. The daemon measures the actual uncompressed bytes after content selection, portable field projection, and any applicable merge or conflict resolution. It checks each side's proposed image separately, so the same path on both sides does not count twice. With partial sync or live-session protection, count only what belongs to that side's selected result. Ignored paths, preserved out-of-scope content, and old destination bytes outside that result do not count. Neither do transport encoding, backups, or History.
|
|
475
|
+
A saved change applies to subsequent transfer attempts. It starts no transfer and grants no new automatic permission. If the change invalidates existing permission, review automatic transfers again through the existing controls. The daemon measures the actual uncompressed bytes after content selection, portable field projection, and any applicable merge or conflict resolution. It checks each side's proposed image separately, so the same path on both sides does not count twice. With partial sync or live-session protection, count only what belongs to that side's selected result. Ignored paths, preserved out-of-scope content, and old destination bytes outside that result do not count. Neither do transport encoding, backups, or History.
|
|
514
476
|
|
|
515
|
-
A violation blocks new publication or local apply without skipping the offending files or advancing the accepted baseline. This applies to automatic work
|
|
477
|
+
A violation blocks new publication or local apply without skipping the offending files or advancing the accepted baseline. This applies to automatic work and reviewed rollback. Neither `--force` nor `--yes` bypasses it. The error lists a bounded set of relative paths, measured sizes, and limits, plus the omitted count if there are more findings. An unchanged automatic size violation is a safety block, not a transient retry. The existing scan, decode, merge, and backend bounds still apply and can stop work earlier.
|
|
516
478
|
|
|
517
|
-
Use `/sync diff` to inspect the difference or policy mismatch. For example, if `skills/local-cache/` makes `skills/` exceed an 8 MiB directory cap,
|
|
479
|
+
Use `/sync diff` to inspect the difference or policy mismatch. For example, if `skills/local-cache/` makes `skills/` exceed an 8 MiB directory cap, exclude `skills/local-cache` in Settings. Check the new selection, then use `/sync push` and confirm the reviewed direction if this device is authoritative. Review any policy replacement separately; a legacy policy mismatch can require a reviewed `/sync push --force` without `--yes`. If the remote is authoritative, use a reviewed `/sync pull` with an applicable selection. Previous remote versions remain in History; Pull keeps its local backup, so a compliant source can replace larger managed destination bytes without losing the restore point.
|
|
518
480
|
|
|
519
|
-
Read-only reviews remain available. A new limit does not prevent verified reconciliation of an already committed transfer. A pending local-only merge
|
|
481
|
+
Read-only reviews remain available. A new limit does not prevent verified reconciliation of an already committed transfer. A pending local-only merge can still be blocked: matching local files do not prove that the interrupted transfer wrote them. When a limit is on, local-only merge recovery also stops if it finds new or changed included files outside the journal's recorded images. Keep the settings, backups, and journals. Review the limits and verify the local and remote snapshots with a compatible daemon before retrying. Turning both limits Off restores the previous size policy for future transfers without changing version 9 or rewriting history.
|
|
520
482
|
|
|
521
483
|
### Automatic startup transfer
|
|
522
484
|
|
|
523
485
|
`sync.automaticTransfer` is optional and accepts only a boolean; absent means `false`.
|
|
524
|
-
Set it through **/sync → Settings → Startup transfer**.
|
|
486
|
+
Set it through **/sync → Settings → Startup transfer**.
|
|
525
487
|
It is separate from `sync.automatic`: the legacy setting retains observation and selected-content shutdown behavior.
|
|
526
488
|
|
|
527
489
|
When explicitly enabled, one startup transfer waits for an idle boundary in TUI/RPC.
|
|
@@ -553,9 +515,14 @@ Unknown fields remain preserved and malformed/invalid files block saves, just as
|
|
|
553
515
|
|
|
554
516
|
### Autonomous sync
|
|
555
517
|
|
|
518
|
+
**Retired:** `sync.agentMode` has no effect. Use reviewed **Sync now** or the independent **Startup transfer** setting. Existing conflict evidence and journals remain available for reviewed recovery. See [daemon lifetime and unattended permission](#daemon-lifetime-and-unattended-permission) for upgrade precautions.
|
|
519
|
+
|
|
520
|
+
<details>
|
|
521
|
+
<summary>Historical behavior in older versions</summary>
|
|
522
|
+
|
|
556
523
|
Autonomous sync uses the unchanged `sync.agentMode` key, an optional per-setup boolean that defaults to `false`.
|
|
557
524
|
Open **Settings → Autonomous sync** and review the setup, destination, content policy, transfer authorization, model disclosure, costs, and autonomous writes before enabling. For directory scope, the review shows session opt-in separately from path rules.
|
|
558
|
-
|
|
525
|
+
RPC users can authorize Autonomous sync by explicitly setting this field to `true`.
|
|
559
526
|
|
|
560
527
|
Autonomous sync authorizes one eligible merged sync at the next session startup and the same flow from **Sync now** or `/sync sync`, without another transfer confirmation.
|
|
561
528
|
It can publish, replace, or delete selected local and remote content.
|
|
@@ -657,29 +624,43 @@ If recovery is blocked, retain evidence and use the existing reviewed recovery r
|
|
|
657
624
|
Finish/reconcile pending merge journals before a downgrade.
|
|
658
625
|
No Pi core changes or other extension are required.
|
|
659
626
|
|
|
627
|
+
</details>
|
|
628
|
+
|
|
660
629
|
<a id="experimental-continuous-sync"></a>
|
|
661
630
|
|
|
662
631
|
### Daemon lifetime and unattended permission
|
|
663
632
|
|
|
664
633
|
For configured interactive work or an explicit setup or command, Pi starts the daemon bundled with the Pi Sync npm package or connects to an existing compatible owner. The daemon runs in a separate Node.js process, not as another Pi extension or an OS service. Unconfigured reads create no service or settings. The daemon owns the shared lifetime decision. For standalone and bundled CLI commands, see the [daemon CLI guide](https://github.com/narumiruna/pi-extensions/blob/main/packages/pi-sync/docs/daemon-migration.md#daemon-cli).
|
|
665
634
|
|
|
666
|
-
When no registered live client PID remains for that canonical agent directory
|
|
635
|
+
When no registered live client PID remains for that canonical agent directory, a fixed 30-second grace period starts. Explicit CLI start without clients follows the same rule. Live passive, disconnected, publishing, and orderly retired PIDs keep the service alive. Detach, heartbeat loss, and an empty active-participant list are not proof of exit. `/reload`, `/new`, fork, and resume preserve shared ownership while their Pi process remains alive. A client arriving before shutdown becomes final cancels automatic exit. There is no new setting, environment variable, or keep-alive flag.
|
|
667
636
|
|
|
668
637
|
After grace, the service stops new automatic work, cancels cancellable work, and drains committed writes, monitor work, queue-release acknowledgements, persistence, and owned callbacks before safe exit. Closing adds no final sync or model request and preserves journals, backups, request accounting, and existing transfer permissions. The next eligible interactive client or explicit command can restart through singleton startup only after the old owner's exit is proven. Print/JSON never launch a service; they can attach passively to an existing owner to protect their sessions and pause automatic work.
|
|
669
638
|
|
|
670
639
|
Before the first daemon-owned mutation, close or upgrade older Pi processes and review `/sync daemon handover`. An absent lock does not prove that an idle older process is absent. Settings and existing state/snapshot formats remain authoritative in the same locations; Pi proposes settings changes and the daemon serializes their publication.
|
|
671
640
|
|
|
641
|
+
The new daemon does not honor retained after-exit grants. Revoke legacy grants before replacing an older owner and follow the [upgrade guide](https://github.com/narumiruna/pi-extensions/blob/main/packages/pi-sync/docs/daemon-migration.md#ownership-and-upgrade) to verify that it exits. Older clients and daemons can still act on preserved settings.
|
|
642
|
+
|
|
643
|
+
<details>
|
|
644
|
+
<summary>Historical authorization in older versions</summary>
|
|
645
|
+
|
|
672
646
|
Existing Automatic, Autonomous, and Continuous consent does not authorize zero-client work. `/sync daemon allow-after-exit` requires Autonomous and Continuous to be enabled, then separately reviews the setup, selected private content, recurring costs, and independently available provider/model. `/sync daemon revoke-after-exit` stops new unattended work. Setup changes invalidate the saved digest. Changing an interactive client’s model, working directory, or session-directory binding revokes older unattended grants; reverting that binding does not restore them. Reopen the review to grant permission again. A valid grant for the active setup keeps service lifetime under the existing fingerprint and binding rules without granting new work permissions. A grant for another setup, a revoked grant, or a stale fingerprint does not. Temporary provider or backend unavailability does not itself revoke a valid grant. Lifetime checks do not call a model, contact a provider or storage, or execute credential commands.
|
|
673
647
|
|
|
674
648
|
The standalone model host uses the agent-root `auth.json`/`models.json` through public Pi SDK APIs and the environment captured at service launch. Credential commands run non-interactively from the canonical agent root. Parent-only providers/accounts and runtime keys are not copied; unavailable capabilities retain conflicts rather than selecting a fallback. Restart after changing the service environment. Neither the parent conversation nor its tools are sent to the resolver.
|
|
675
649
|
|
|
676
650
|
A failed consent write blocks automatic work in that service instance. Uncertain consent publication, failed revocation, or cleanup failure keeps the owner paused with evidence retained. Automatic exit or implicit restart must not clear that barrier and restore an older persisted grant. Repair persistence and use the existing repair/revocation path before an explicit restart; do not assume a failed write changed the retained consent file. Cleanup failure is not successful exit. `stop` and `restart` drain compatible work and never replace an uncertain or incompatible live owner silently. See [migration, diagnostics, and rollback](https://github.com/narumiruna/pi-extensions/blob/main/packages/pi-sync/docs/daemon-migration.md).
|
|
677
651
|
|
|
652
|
+
</details>
|
|
653
|
+
|
|
678
654
|
### Continuous sync
|
|
679
655
|
|
|
656
|
+
**Retired:** `sync.continuous` has no effect. Pi Sync no longer watches files or polls storage for recurring transfers. Preserved scheduler records do not authorize work. Use reviewed **Sync now** or the independent **Startup transfer** setting.
|
|
657
|
+
|
|
658
|
+
<details>
|
|
659
|
+
<summary>Historical behavior in older versions</summary>
|
|
660
|
+
|
|
680
661
|
`sync.continuous` is an optional per-setup boolean that defaults to `false`.
|
|
681
662
|
Open **Settings → Continuous sync** after enabling Autonomous sync. For directory scope, the review shows session opt-in separately from path rules.
|
|
682
|
-
|
|
663
|
+
RPC users can opt in by explicitly setting this field to `true`.
|
|
683
664
|
Existing Autonomous sync consent does not enable recurring requests.
|
|
684
665
|
|
|
685
666
|
The separate review names the setup, storage connection, destination, included paths, recurring costs and automatic writes.
|
|
@@ -692,7 +673,7 @@ Reopen Settings to read the saved value.
|
|
|
692
673
|
|
|
693
674
|
Monitoring starts at an eligible TUI/RPC session startup, after awaited local transaction recovery, or after a foreground `/sync` command or manager closes.
|
|
694
675
|
It replaces the duplicate one-shot startup transfer, not the legacy shutdown policy.
|
|
695
|
-
|
|
676
|
+
|
|
696
677
|
Turning Continuous sync off stops its work without disabling Autonomous sync.
|
|
697
678
|
Turning Autonomous sync off also stops monitoring; a saved Continuous sync On value remains ineffective until Autonomous sync is enabled again.
|
|
698
679
|
|
|
@@ -799,6 +780,8 @@ Private scheduler records are separate from baseline/journal formats and remain
|
|
|
799
780
|
|
|
800
781
|
For implementation evidence and test scope, see [Continuous sync verification](https://github.com/narumiruna/pi-extensions/blob/main/packages/pi-sync/docs/continuous-sync-verification.md).
|
|
801
782
|
|
|
783
|
+
</details>
|
|
784
|
+
|
|
802
785
|
### Settings field merge and machine-local fields
|
|
803
786
|
|
|
804
787
|
`sync.mergeSettings` is an explicit opt-in, defaults to `false`, and is available through **Settings → Merge settings fields** for the current setup.
|
|
@@ -814,7 +797,7 @@ Coupled fields must be excluded together.
|
|
|
814
797
|
Selected-path setups with nonempty rules must include `settings.json` in `sync.include`. Directory-scope setups must omit `sync.include` and can configure local fields without it. Path rules still govern whether `settings.json` syncs, and nonempty field rules require that exact file spelling if it is synced. Absent or explicitly empty rules remain valid for either scope.
|
|
815
798
|
Settings asks for confirmation before saving changes to these rules. An explicit array requires settings version 4 or later, and editing the rules does not downgrade an existing settings version.
|
|
816
799
|
Absent rules keep a setup nonportable, including unrelated setups in a version-4 document.
|
|
817
|
-
An explicit array opts that setup into at least snapshot version 2; exclusion-enabled selected-path setups retain version 4,
|
|
800
|
+
An explicit array opts that setup into at least snapshot version 2; exclusion-enabled selected-path setups retain version 4, and agent-directory scope retains version 5.
|
|
818
801
|
`[]` after rule removal retains this reviewed opt-in and differs from absence.
|
|
819
802
|
Older clients must refuse portable data rather than replace local-only values.
|
|
820
803
|
|
|
@@ -853,8 +836,8 @@ Never reinterpret portable snapshots with an old binary.
|
|
|
853
836
|
|
|
854
837
|
`sync.mergeContent` and `sync.partialSync` are independent opt-in booleans, both default `false`.
|
|
855
838
|
The owning **Settings → Content merge / partial progress** setting offers Off, Merge only, Merge + partial, and Partial only and confirms an explicit upgrade to at least settings version 5.
|
|
856
|
-
Use a supported settings version of at least 5 (at least 7 for
|
|
857
|
-
Partial publications retain snapshot version 4 for exclusion-enabled selected paths, version 5 for
|
|
839
|
+
Use a supported settings version of at least 5 (at least 7 for agent-directory scope).
|
|
840
|
+
Partial publications retain snapshot version 4 for exclusion-enabled selected paths, and version 5 for agent-directory scope.
|
|
858
841
|
Settings version 5 retains the portable-policy behavior of version 4; moving from a legacy setup can require the existing separately confirmed directional policy migration.
|
|
859
842
|
Disabling options retains the schema and recovery evidence.
|
|
860
843
|
|