@narumitw/pi-sync 0.62.0 → 0.63.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 +26 -0
- package/README.md +40 -23
- 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-INECVQNR.ts → chunk-B5F3JLD3.ts} +6 -4
- package/dist/chunks/chunk-B5F3JLD3.ts.map +7 -0
- 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-ZB3GNX3P.ts → chunk-LBNC5AOM.ts} +140 -13
- package/dist/chunks/chunk-LBNC5AOM.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-GSQGBVKG.ts → chunk-POWOMJ7S.ts} +87 -50
- package/dist/chunks/chunk-POWOMJ7S.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-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-GMRRFWOL.ts} +19 -36
- package/dist/chunks/command-handler-GMRRFWOL.ts.map +7 -0
- package/dist/chunks/{conflict-review-MAOGTIAI.ts → conflict-review-JWEA7DPQ.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-T5J5WG7T.ts} +227 -343
- package/dist/chunks/manager-ui-T5J5WG7T.ts.map +7 -0
- package/dist/chunks/{merge-review-SGDLMVS4.ts → merge-review-OQDXNTJU.ts} +2 -2
- 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-LL6YMGUR.ts} +7 -3
- package/dist/chunks/{setup-wizard-5G426MOZ.ts.map → setup-wizard-LL6YMGUR.ts.map} +1 -1
- package/dist/chunks/{sync-inspection-ITZ6Z4DE.ts → sync-inspection-SRU6HGGK.ts} +3 -3
- package/dist/chunks/{sync-operations-NMVKF7SE.ts → sync-operations-UGSCONZ7.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 +142 -40
- package/dist/daemon/dist/engine/ignore/ignore-settings.js +94 -26
- package/dist/daemon/dist/engine/ignore/ignore-source.js +1 -1
- 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-error-guidance.js +16 -3
- package/dist/daemon/dist/engine/sync/sync-mutations.js +75 -54
- 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/ui/sync-format.js +23 -55
- package/dist/daemon/dist/engine/ui/transfer-review.js +3 -3
- 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/docs/tui-contract.md +1 -1
- package/package.json +3 -3
- package/skills/configure-pi-sync/SKILL.md +128 -74
- package/skills/configure-pi-sync/references/configuration.md +115 -45
- 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 +33 -18
- package/src/ui/manager-ui.ts +27 -18
- package/src/ui/merge-review.ts +28 -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/setup/webdav-ui.ts +1 -1
- package/src/ui/storage-connections-ui.ts +33 -11
- package/src/ui/sync-confirmation.ts +67 -48
- 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-GSQGBVKG.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-JWEA7DPQ.ts.map} +0 -0
- /package/dist/chunks/{manager-result-dispatcher-MC6EQOQY.ts.map → manager-result-dispatcher-GDB74IOP.ts.map} +0 -0
- /package/dist/chunks/{merge-review-SGDLMVS4.ts.map → merge-review-OQDXNTJU.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-SRU6HGGK.ts.map} +0 -0
- /package/dist/chunks/{sync-operations-NMVKF7SE.ts.map → sync-operations-UGSCONZ7.ts.map} +0 -0
|
@@ -1,82 +1,136 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: configure-pi-sync
|
|
3
|
-
description: Apply
|
|
3
|
+
description: Apply authorized local edits to pi-sync.json or the configured ignore file (usually .syncignore). Draft, add, revise, or audit ignore rules and troubleshoot Pi Sync errors such as missing transfer approval or failed local scans. Do not use to execute sync, administer remote storage, develop pi-sync source code, or change unrelated Pi settings.
|
|
4
4
|
license: MIT
|
|
5
5
|
disable-model-invocation: true
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Configure Pi Sync
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
For
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Use
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
If the
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
Use
|
|
65
|
-
Ask
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
Do not
|
|
82
|
-
If
|
|
10
|
+
Make and verify a clear, authorized local edit when it does not require a separate Pi Sync review.
|
|
11
|
+
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.
|
|
12
|
+
Invoking this skill or asking a question does not authorize a write.
|
|
13
|
+
Ask at most one focused question if the intended change or target remains unclear after safe checks.
|
|
14
|
+
Keep settings, rule-file contents, daemon payloads, and other private evidence in the local process; report only relevant non-secret facts.
|
|
15
|
+
|
|
16
|
+
## Find the right file
|
|
17
|
+
|
|
18
|
+
- Read only the relevant sections of the [settings reference](references/configuration.md).
|
|
19
|
+
- 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.
|
|
20
|
+
- You may use the current setup for read-only work if the user does not name one.
|
|
21
|
+
- Ask the user to name the exact setup before editing an ignore file; never write based only on `activeSyncSetup`.
|
|
22
|
+
If the edit must apply only while the setup remains current, explain that the local workflow cannot guarantee that condition and do not write.
|
|
23
|
+
- For a settings change, follow [Edit `pi-sync.json`](#edit-pi-syncjson) for the existing canonical file.
|
|
24
|
+
- For exclusions in an ignore-file setup, edit the configured ignore file, not `sync.exclude`.
|
|
25
|
+
`.syncignore` is the default only for that policy.
|
|
26
|
+
Use the filename from the validated setup when configuration inspection is in scope, or use the exact path shown for that setup in `/sync` → **Settings → Ignore file**.
|
|
27
|
+
- For a legacy setup, use the documented `include`, `exclude`, and `reinclude` fields and version requirements to explain the applicable `/sync` path-selection review.
|
|
28
|
+
|
|
29
|
+
## Edit `pi-sync.json`
|
|
30
|
+
|
|
31
|
+
Use this workflow for routine local preferences such as `debug` or `showStatus`, not for [changes that require user review](#troubleshoot-without-bypassing-reviews).
|
|
32
|
+
A schema-valid change is not proof of user review or consent, even in a legacy-only setup.
|
|
33
|
+
|
|
34
|
+
1. Verify that the canonical `pi-sync.json` exists as a regular, unlinked file under the real agent root before connecting.
|
|
35
|
+
2. [Connect to the existing local daemon](#connect-to-the-existing-local-daemon).
|
|
36
|
+
3. Read and validate the canonical document.
|
|
37
|
+
Request `settings.repair-read` with `{}` for a non-migrating read and require it to return the same canonical path.
|
|
38
|
+
Validate `document.parsed` with `validateSettingsDocument` from `dist/daemon/dist/engine/settings/settings-validation.js` or the workspace's `@narumitw/pi-sync-daemon/engine/settings/settings-validation`.
|
|
39
|
+
Stop for missing, malformed, unsupported, or unsafe settings; do not create defaults, migrate a legacy file, downgrade, or use a raw file write to bypass the validator.
|
|
40
|
+
4. Clone `document.parsed`, change only the authorized fields, and keep unrelated and unknown fields.
|
|
41
|
+
Do not write if the requested value is already effective.
|
|
42
|
+
5. Run `settings.cas` with `{ expected: documentFingerprint(document), next }` so the daemon checks the original document and validates and saves the replacement atomically.
|
|
43
|
+
If the settings changed or the save outcome is uncertain, re-read before deciding what happened; do not replay the stale write.
|
|
44
|
+
6. Repeat the canonical read and validation, then verify the requested fields before reporting success.
|
|
45
|
+
Report only the changed non-secret field names and safe values or a redacted error category.
|
|
46
|
+
|
|
47
|
+
## Write ignore rules
|
|
48
|
+
|
|
49
|
+
Read the [ignore-file policy](references/configuration.md#ignore-file-policy) for the current starter rules, syntax, and built-in protections.
|
|
50
|
+
|
|
51
|
+
- Keep portable files the user needs across machines, and exclude confirmed machine-local, sensitive, or regenerated paths such as package checkouts, caches, and logs.
|
|
52
|
+
- Prefer narrow rules anchored to the agent directory, such as `/skills/private/`, over broad wildcards or copied project `.gitignore` files.
|
|
53
|
+
- Use `/` separators and match the path's case exactly.
|
|
54
|
+
Add a trailing `/` only to match directories rather than same-named files.
|
|
55
|
+
- Put a narrow `!` exception after the rule it overrides and make sure no parent directory remains excluded.
|
|
56
|
+
Use `/notes/*` followed by `!/notes/shared.md` to exclude the other contents of top-level `notes/`.
|
|
57
|
+
Using `/notes/` instead excludes the parent directory and blocks the exception.
|
|
58
|
+
- Keep sessions excluded unless the user wants them and completes the separate session opt-in; match logical `sessions/` paths even if stored elsewhere.
|
|
59
|
+
- Do not rely on the rules as a secret scanner or try to re-include built-in protected files.
|
|
60
|
+
|
|
61
|
+
## Draft a new ignore file
|
|
62
|
+
|
|
63
|
+
1. Start with Pi Sync's current starter rules.
|
|
64
|
+
Use only relevant names and file types under the intended agent directory, not file contents.
|
|
65
|
+
Ask what must stay local only if the request and these checks do not answer it.
|
|
66
|
+
2. Add only exclusions justified by those paths or the user's goal, then [check the draft against the starter rules](#check-ignore-rules).
|
|
67
|
+
Do not copy legacy `include`, `exclude`, or `reinclude` rules mechanically.
|
|
68
|
+
The user must review what enters or leaves scope when migrating.
|
|
69
|
+
3. Return the draft and its expected scope changes without writing the file or settings.
|
|
70
|
+
- 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.
|
|
71
|
+
- 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.
|
|
72
|
+
- 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**.
|
|
73
|
+
|
|
74
|
+
## Add, revise, or audit existing rules
|
|
75
|
+
|
|
76
|
+
1. [Connect to the existing local daemon](#connect-to-the-existing-local-daemon) and run `ignore.read` with `{ setup: setupName }` for the selected setup.
|
|
77
|
+
This resolves the configured path and sharing setups, validates the file, and checks for a live session at that path.
|
|
78
|
+
Require a verified path directly under the agent directory that matches the selected setup.
|
|
79
|
+
Require a result with `text`, `identity`, and `sourceDigest`; a location-only result means the file is missing.
|
|
80
|
+
Reject unsafe names, protected files, symlinks, hard links, and unfinished rule-file creation.
|
|
81
|
+
Do not create a missing rule file or change the selected filename.
|
|
82
|
+
If the daemon cannot verify the source, check only a user-provided draft rather than reading or editing an unverified active file.
|
|
83
|
+
2. Propose the smallest change that meets the request, preserving unrelated lines and rule order.
|
|
84
|
+
Look for broad patterns, redundant rules, and exceptions blocked by an excluded parent.
|
|
85
|
+
A rule can still matter if no local file matches it today.
|
|
86
|
+
Do not sort or reformat rules during cleanup: even a comment or whitespace change can change the policy fingerprint.
|
|
87
|
+
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.
|
|
88
|
+
Before widening scope, warn that more existing and future files can be sent or overwritten.
|
|
89
|
+
Exclusions do not erase retained snapshots or backups.
|
|
90
|
+
Stop after the summary for a read-only audit or an unapproved scope change.
|
|
91
|
+
If the requested exclusion or exception already works, report it without rewriting the file.
|
|
92
|
+
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.
|
|
93
|
+
A connected daemon or an absent lock does not prove that work is idle.
|
|
94
|
+
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.
|
|
95
|
+
Leave the file unchanged if you cannot establish these conditions.
|
|
96
|
+
Create a private temporary file exclusively in the same directory and stage the validated replacement there.
|
|
97
|
+
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.
|
|
98
|
+
Preserve the original permissions on the replacement.
|
|
99
|
+
Stop and remove only the temporary file you own if anything changed or the recheck fails.
|
|
100
|
+
The recheck does not serialize other writers; do not use `ignore.save` or retry an uncertain replacement without re-reading.
|
|
101
|
+
5. Re-read the saved rules with `ignore.read`, verify the saved text, and repeat the path checks.
|
|
102
|
+
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.
|
|
103
|
+
|
|
104
|
+
## Check ignore rules
|
|
105
|
+
|
|
106
|
+
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`.
|
|
107
|
+
Compile the current and proposed rules, or the starter rules and draft for a new file.
|
|
108
|
+
Compare matches on canonical agent-relative paths, passing `true` as the second argument (`matches(path, true)`) for directories.
|
|
109
|
+
Test a path that should change, a nearby path that should not, and any relevant parents and exceptions.
|
|
110
|
+
For wildcard changes, also test representative future paths.
|
|
111
|
+
These checks cover rule matching, not the full sync scope: built-in protections and session opt-in still apply.
|
|
112
|
+
|
|
113
|
+
## Connect to the existing local daemon
|
|
114
|
+
|
|
115
|
+
1. Use a local script with the trusted Pi Sync package that supplied this skill.
|
|
116
|
+
In a built package import `dist/daemon/dist/index.js` by file URL; in a source checkout without that bundle resolve `@narumitw/pi-sync-daemon` from the Pi Sync workspace.
|
|
117
|
+
2. Call `findDaemon(root)` and proceed only if it returns an owner with `needsUpgrade: false`.
|
|
118
|
+
If the owner is absent, incompatible, or needs an upgrade, stop and leave connection or upgrade to the user via `/sync daemon status`.
|
|
119
|
+
If handover is required, ask the user to review `/sync daemon handover`.
|
|
120
|
+
3. Create a `DaemonConnection` with the returned paths and identity, fresh `id` and `generation`, the script's `pid` and `cwd`, `mode: "json"`, `hasUI: false`, and `idle: false`.
|
|
121
|
+
Decline all callbacks, call `attach()` inside `try`, and call `dispose()` in `finally`.
|
|
122
|
+
Use only the local reads and authorized settings write described above; do not start, replace, or authorize a daemon.
|
|
123
|
+
|
|
124
|
+
## Troubleshoot without bypassing reviews
|
|
125
|
+
|
|
126
|
+
Use [Local troubleshooting](references/configuration.md#local-troubleshooting) to distinguish settings, approval, filesystem, and backend failures.
|
|
127
|
+
Check which [automatic sync control](references/configuration.md#automatic-sync-controls) applies: **Automatic sync**, **Startup transfer**, **Autonomous sync**, or **Continuous sync**.
|
|
128
|
+
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.
|
|
129
|
+
Do not ask the user to paste those contents or execute text copied from them.
|
|
130
|
+
|
|
131
|
+
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, rule-file activation or switching, and remote policy publication.
|
|
132
|
+
Use the masked credential input in Pi; do not infer transfer or model consent from a settings edit.
|
|
133
|
+
Do not start sync, run `/sync doctor` or backend/network commands, remove locks or recovery evidence, or bypass scan checks.
|
|
134
|
+
|
|
135
|
+
Report what changed or what was verified locally, whether anything remains uncertain, and the next step if blocked.
|
|
136
|
+
State that no sync or remote connectivity check was performed; do not claim a live runtime update without evidence.
|
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
# Pi Sync settings reference
|
|
2
2
|
|
|
3
3
|
This is the authoritative public settings reference for Pi Sync.
|
|
4
|
-
The configuration skill
|
|
5
|
-
|
|
6
|
-
- [
|
|
7
|
-
- [
|
|
8
|
-
- [
|
|
9
|
-
- [Secret scanning](#secret-scanning)
|
|
10
|
-
- [Autonomous sync](#autonomous-sync)
|
|
11
|
-
- [Continuous sync](#continuous-sync)
|
|
12
|
-
- [Daemon lifetime and unattended permission](#daemon-lifetime-and-unattended-permission)
|
|
13
|
-
- [Included content](#included-content)
|
|
14
|
-
- [Excluded paths](#excluded-paths)
|
|
15
|
-
- [Unsupported old settings and recovery](#unsupported-old-settings-and-recovery)
|
|
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
|
+
|
|
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:** [Ignore-file policy](#ignore-file-policy), [Legacy directory scope](#agent-directory-scope), [Included content](#included-content), [Excluded paths](#excluded-paths), [Machine-local settings fields](#settings-field-merge-and-machine-local-fields)
|
|
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
|
+
- **Handle problems:** [Status](#status-display), [Startup timings](#debug-startup-timings), [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)
|
|
16
10
|
|
|
17
11
|
## ⚙️ Settings
|
|
18
12
|
|
|
@@ -25,12 +19,12 @@ The canonical private user file is:
|
|
|
25
19
|
Pi's configured agent directory replaces `~/.pi/agent` when applicable.
|
|
26
20
|
Missing settings load as unconfigured without creating an agent directory, file, temporary file, or lock.
|
|
27
21
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
Credentials stay in
|
|
22
|
+
Explicit setup creates the file atomically. On POSIX, Pi Sync creates and replaces it with mode `0600`.
|
|
23
|
+
Pi Sync processes coordinate settings access through `pi-sync.json.mutation-lock`. Editors that do not use the lock should not save during a Pi Sync settings operation. Within one process, reads wait for earlier writes, even those still waiting for the lock.
|
|
24
|
+
|
|
25
|
+
Under the lock, Pi Sync validates the existing and proposed documents before saving. Relabeling malformed, invalid, or unsupported settings as a supported version does not bypass validation. Pi Sync flushes a private temporary file and renames it over the canonical file without first moving the active file away.
|
|
26
|
+
|
|
27
|
+
Credentials stay in the private settings file and never appear in menus, reviews, status, notifications, errors, logs, or completion metadata.
|
|
34
28
|
|
|
35
29
|
A private `pi-sync.local.json` containing a valid supported document is copied byte-for-byte to `pi-sync.json`.
|
|
36
30
|
The old file remains as a recovery copy.
|
|
@@ -48,10 +42,11 @@ Global settings apply to all setups on this device; they are not remote policy.
|
|
|
48
42
|
|
|
49
43
|
| Scope | Fields | Required values and defaults |
|
|
50
44
|
| --- | --- | --- |
|
|
51
|
-
| Document | `version`, `onSwitch`, `storageConnections`, `syncSetups` | All are required in a manually written document; versions 3 through
|
|
45
|
+
| Document | `version`, `onSwitch`, `storageConnections`, `syncSetups` | All are required in a manually written document; versions 3 through 8 are supported. |
|
|
52
46
|
| Current setup | `activeSyncSetup` | Required when setups exist; absent when the setup catalog is empty. |
|
|
53
47
|
| Global preferences | `skipSecretScan`, `showStatus`, `debug` | Optional booleans; defaults are false, true, and false. |
|
|
54
|
-
| Setup selection | `sync.scope`, `sync.include`, `sync.automatic` |
|
|
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
|
+
| Ignore-file selection | `sync.scope`, `sync.pathPolicy`, `sync.ignoreFile`, `sync.sessions` | Version 8, `scope: "agent-directory"`, `pathPolicy: "ignore-file"`. `ignoreFile` defaults to `.syncignore`; sessions require `true` and the rules must allow them. Use reviewed setup or migration, not manual JSON edits. |
|
|
55
50
|
| Setup behavior | `sync.automaticTransfer`, `sync.agentMode`, `sync.continuous`, `sync.mergeSettings`, `sync.mergeContent`, `sync.partialSync` | Optional booleans; all default to false. |
|
|
56
51
|
| Portable policy | `sync.localFields` | Optional array; any explicit array, including `[]`, requires version 4 or later. |
|
|
57
52
|
| Content/partial policy | `sync.mergeContent`, `sync.partialSync` | Enabling either requires version 5 or later. |
|
|
@@ -59,19 +54,24 @@ Global settings apply to all setups on this device; they are not remote policy.
|
|
|
59
54
|
| Directory exceptions | `sync.reinclude`, `sync.sessions` | Optional with directory scope. `reinclude` wins over `exclude`; sessions require `true`. |
|
|
60
55
|
|
|
61
56
|
Do not downgrade the settings version when an option is turned off.
|
|
62
|
-
|
|
57
|
+
|
|
58
|
+
### Automatic sync controls
|
|
59
|
+
|
|
60
|
+
The four controls select separate behaviors:
|
|
63
61
|
|
|
64
62
|
- **Automatic sync** (`sync.automatic`) enables startup observation and selected-content shutdown pushes when sessions are included.
|
|
65
63
|
- **Startup transfer** (`sync.automaticTransfer`) enables one eligible startup transfer.
|
|
66
|
-
- **Autonomous sync** (`sync.agentMode`, unchanged)
|
|
64
|
+
- **Autonomous sync** (`sync.agentMode`, unchanged) allows eligible startup and **Sync now** transfers without another transfer confirmation, plus model assistance and disclosure for supported conflicts.
|
|
67
65
|
- **Continuous sync** (`sync.continuous`) adds recurring work only with Autonomous sync enabled.
|
|
68
66
|
|
|
69
|
-
|
|
67
|
+
If any setup uses an ignore file, turning on these controls does not authorize transfers, even when the current setup uses a legacy policy. Enable the controls you need for the current setup, then use **Settings → Review automatic transfers** in TUI. Repeat the review after changing settings or rules. Work after the last Pi exits requires [separate permission](#daemon-lifetime-and-unattended-permission).
|
|
68
|
+
|
|
69
|
+
Invoking the configuration skill neither enables these controls nor grants transfer permission.
|
|
70
70
|
|
|
71
71
|
### Editing in the manager
|
|
72
72
|
|
|
73
73
|
Open `/sync` → **Settings** to go directly to **Pi Sync Settings**.
|
|
74
|
-
The screen uses a searchable flat list without category navigation. Compare content rules separately from file contents
|
|
74
|
+
The screen uses a searchable flat list without category navigation. Compare content rules separately from file contents. Legacy setups retain their path controls. Ignore-file setups show the local path for manual editing and offer a reviewed switch to another existing file.
|
|
75
75
|
**Storage location** edits the current setup's coordinates, while **Manage sync setups** and **Manage storage connections** retain the catalog and affected-setup reviews.
|
|
76
76
|
Returning from catalog management refreshes the rows; switching or removing the owning setup closes its old Settings screen.
|
|
77
77
|
|
|
@@ -81,15 +81,13 @@ Escape closes the screen without undoing successful saves.
|
|
|
81
81
|
Complex values retain their input/review flows.
|
|
82
82
|
This navigation change does not alter schema, defaults, automatic-sync behavior, or explicit opt-ins.
|
|
83
83
|
|
|
84
|
-
The
|
|
85
|
-
**
|
|
86
|
-
Last applied shows a compact snapshot ID with application time explicitly unavailable; full IDs remain in History.
|
|
87
|
-
It never uses snapshot creation time as application time.
|
|
84
|
+
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.
|
|
85
|
+
**Last applied** shows a compact snapshot ID and marks application time as unavailable instead of substituting snapshot creation time. **History** shows the full IDs.
|
|
88
86
|
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.
|
|
89
87
|
|
|
90
88
|
RPC reports the manual settings path and offers the existing setup/connection catalog dialogs, not the TUI preference or masked-credential editors.
|
|
91
89
|
Print/JSON do not support `/sync`; use the private settings file directly.
|
|
92
|
-
|
|
90
|
+
Command hints list `/sync status`, `/sync diff`, and `/sync help`.
|
|
93
91
|
|
|
94
92
|
### Complete version 3 example
|
|
95
93
|
|
|
@@ -186,7 +184,7 @@ An occupied destination requires an explicit different path; Git requires a diff
|
|
|
186
184
|
This check does not contact the server or discover setups configured only on other machines.
|
|
187
185
|
|
|
188
186
|
Every setup requires explicit `sync.automatic`. Set `sync.scope` for directory scope, or set `sync.include` for selected paths.
|
|
189
|
-
|
|
187
|
+
Legacy setup offers automatic sync with Off first. New ignore-file setups save with automatic sync off; use Settings to review and enable automatic behavior separately. **Join an existing remote** instead saves with automatic sync and sessions off, then reviews the remote policy without transferring files. Existing values are not rewritten.
|
|
190
188
|
When enabled, the current setup receives one background startup check in TUI/RPC, including reload/new/resume/fork.
|
|
191
189
|
Automatic sync alone does not perform startup transfers or open dialogs; review changes through `/sync`.
|
|
192
190
|
Print/JSON skip startup checks.
|
|
@@ -200,10 +198,10 @@ The check deadline is 30 seconds plus bounded cleanup, with manual retry through
|
|
|
200
198
|
Continuous sync is a separate opt-in.
|
|
201
199
|
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.
|
|
202
200
|
|
|
203
|
-
New setups
|
|
204
|
-
The
|
|
201
|
+
New TUI setups use the [ignore-file policy](#ignore-file-policy) when the daemon supports it. The legacy wizard defaults to directory scope; its selected-path choices are Recommended (the nine non-session Pi roots listed below) and Minimal (`settings.json` and `AGENTS.md`).
|
|
202
|
+
The setup review shows the scope and exact backend destination.
|
|
205
203
|
R2/S3 requires an explicitly entered existing bucket and never creates one.
|
|
206
|
-
Saving setup or connection settings does not
|
|
204
|
+
Saving setup or connection settings does not transfer files.
|
|
207
205
|
|
|
208
206
|
Invalid fields retry without discarding earlier answers.
|
|
209
207
|
Retryable local I/O failures retain the exact draft for another Save.
|
|
@@ -291,9 +289,75 @@ Authentication and transport failures give credentials/permissions or address/ne
|
|
|
291
289
|
Git reads remote snapshots and checks its local cache; write access is not tested.
|
|
292
290
|
WebDAV retains its isolated conditional-write/cleanup probe and repair of a missing active-snapshot history entry.
|
|
293
291
|
|
|
292
|
+
### Local troubleshooting
|
|
293
|
+
|
|
294
|
+
Use the first concrete error, not a generic recovery hint appended to it. Start with checks that do not contact storage or start the daemon.
|
|
295
|
+
|
|
296
|
+
| Error or symptom | Local check and next action |
|
|
297
|
+
| --- | --- |
|
|
298
|
+
| **Autonomous sync requires a separate policy review** | The selected setup has Autonomous sync enabled, but its current policy has no matching automatic-transfer approval. This does not mean that `pi-sync.json` is malformed. Check which setup the operation used and whether settings or rules changed. The user can review **Settings → Review automatic transfers** for the current setup or choose a reviewed directional push or pull. |
|
|
299
|
+
| **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. |
|
|
300
|
+
| **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. |
|
|
301
|
+
| **Backend access or publication failure** | Use the reported error class to distinguish credentials, a missing location, transport, and publication safety. A 404 alone does not identify which remote resource is missing. If local checks are insufficient, explain the backend-specific effects of [Diagnostics](#diagnostics) and leave that action to the user. |
|
|
302
|
+
|
|
303
|
+
A local check does not verify remote connectivity or permissions. Diagnostics can stop at the same local scan error before backend checks run.
|
|
304
|
+
|
|
305
|
+
### Ignore-file policy
|
|
306
|
+
|
|
307
|
+
New TUI setups use `.syncignore` when the daemon advertises support. Existing setups keep their policy and can coexist with ignore-file setups in version 8.
|
|
308
|
+
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.
|
|
309
|
+
|
|
310
|
+
This version 8 `sync` fragment shows a setup using the default rule file. It is not a complete settings document or a substitute for review:
|
|
311
|
+
|
|
312
|
+
```json
|
|
313
|
+
{
|
|
314
|
+
"scope": "agent-directory",
|
|
315
|
+
"pathPolicy": "ignore-file",
|
|
316
|
+
"sessions": false,
|
|
317
|
+
"automatic": false
|
|
318
|
+
}
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
#### Create or switch rule files
|
|
322
|
+
|
|
323
|
+
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.
|
|
324
|
+
|
|
325
|
+
The starter rules exclude, among other paths, Pi's top-level `git/` package checkouts:
|
|
326
|
+
|
|
327
|
+
```gitignore
|
|
328
|
+
/auth.json
|
|
329
|
+
/git/
|
|
330
|
+
/npm/
|
|
331
|
+
/sessions/
|
|
332
|
+
/truth.json
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
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.
|
|
336
|
+
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.
|
|
337
|
+
|
|
338
|
+
**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.
|
|
339
|
+
|
|
340
|
+
#### Matching and local protections
|
|
341
|
+
|
|
342
|
+
Use `/` as the separator; escaped `/` is not supported. A leading `/` anchors a rule to the agent directory, and a trailing `/` matches a directory. Matching is case-sensitive on every device. Blank lines, comments, wildcards, and ordered `!` exceptions follow Git ignore patterns for a single root file. An exception cannot restore a child under an excluded parent. There are no nested or project rules.
|
|
343
|
+
|
|
344
|
+
Session sync requires both a separate opt-in and rules that allow sessions. The starter `/sessions/` still excludes them. Match sessions by their logical `sessions/` paths even if stored elsewhere. Loaded sessions stay protected during apply.
|
|
345
|
+
|
|
346
|
+
Pi credentials and trust (`auth.json` and `trust.json`), Pi Sync private settings and state, and `.syncignore` and configured alternatives stay local regardless of the rules. `truth.json` is a starter exclusion, not Pi's trust file. Transfers do not replace or remove ignored local files, and exclusions do not erase retained snapshots or backups.
|
|
347
|
+
|
|
348
|
+
#### Transfer review and recovery
|
|
349
|
+
|
|
350
|
+
Setup, migration, rule-file switching, and edits neither start nor authorize transfers. Upgrade all peers before publishing a version 6 snapshot. It stores a policy fingerprint, not the filename or rule text. Use the same rule text and session opt-in on peers: even comment or whitespace changes can change the fingerprint. Do not copy rules from the remote.
|
|
351
|
+
|
|
352
|
+
A legacy or mismatched head requires separately reviewed directional policy publication. Neither `--yes` nor automatic work can authorize it. Inspect scope with `/sync diff` and review the direction in `/sync`. A pull cannot apply a foreign policy, and rollback requires compatible history. If the rules, setup, or head change, reopen the review.
|
|
353
|
+
|
|
354
|
+
If creation or transfer is blocked or interrupted, stop new work. Preserve the rule file, creation marker, journals, backups, and consent records. Use a compatible daemon to review recovery with the originating setup and exact source. If source or remote evidence differs, preserve it instead of forcing replay or deleting a marker. The old policy remains authoritative until settings commit; a verified starter or settings backup can remain after a failed save.
|
|
355
|
+
|
|
356
|
+
After any version 6 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.
|
|
357
|
+
|
|
294
358
|
### Agent-directory scope
|
|
295
359
|
|
|
296
|
-
|
|
360
|
+
A legacy directory setup in a version 7 or later settings document can use:
|
|
297
361
|
|
|
298
362
|
```json
|
|
299
363
|
{
|
|
@@ -418,7 +482,7 @@ To return to an older client, stop automatic work, resolve pending recovery with
|
|
|
418
482
|
### Automatic startup transfer
|
|
419
483
|
|
|
420
484
|
`sync.automaticTransfer` is optional and accepts only a boolean; absent means `false`.
|
|
421
|
-
Set it through **/sync → Settings → Startup transfer**.
|
|
485
|
+
Set it through **/sync → Settings → Startup transfer**. If any setup uses an ignore file, follow the [separate approval step](#automatic-sync-controls) after enabling it.
|
|
422
486
|
It is separate from `sync.automatic`: the legacy setting retains observation and selected-content shutdown behavior.
|
|
423
487
|
|
|
424
488
|
When explicitly enabled, one startup transfer waits for an idle boundary in TUI/RPC.
|
|
@@ -450,10 +514,9 @@ Unknown fields remain preserved and malformed/invalid files block saves, just as
|
|
|
450
514
|
|
|
451
515
|
### Autonomous sync
|
|
452
516
|
|
|
453
|
-
Autonomous sync uses the unchanged `sync.agentMode` key, an optional per-setup boolean, default `false`, in settings versions 3 through
|
|
517
|
+
Autonomous sync uses the unchanged `sync.agentMode` key, an optional per-setup boolean, default `false`, in settings versions 3 through 8.
|
|
454
518
|
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.
|
|
455
|
-
RPC users can explicitly
|
|
456
|
-
Setting it to `true` is authorization, not just a display preference.
|
|
519
|
+
In a legacy-only settings file, RPC users can authorize Autonomous sync by explicitly setting this field to `true`. If any setup uses an ignore file, follow the [separate approval step](#automatic-sync-controls) after enabling it.
|
|
457
520
|
|
|
458
521
|
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.
|
|
459
522
|
It can publish, replace, or delete selected local and remote content.
|
|
@@ -484,8 +547,14 @@ Parent model prompts and tools are not changed.
|
|
|
484
547
|
This is configuration isolation, not an OS sandbox or proof of semantic correctness.
|
|
485
548
|
|
|
486
549
|
Eligible text is global `AGENTS.md` and `.md`/`.txt` files under `prompts/` or `skills/`.
|
|
487
|
-
Global `settings.json`
|
|
488
|
-
|
|
550
|
+
Global `settings.json` follows the existing strict JSON, numeric, coupled-field, unknown-field, and machine-local-field policies. With Autonomous sync enabled, Pi Sync treats `packages` differently from other arrays and nested objects, which remain atomic:
|
|
551
|
+
|
|
552
|
+
- Pi Sync matches packages by source identity. When an npm package is present on both sides with different explicit SemVer versions, the higher version wins, even if one side is unchanged from the verified ancestor. No registry lookup occurs. Equal SemVer precedence preserves a one-sided source edit but requires atomic selection for divergent edits.
|
|
553
|
+
- Per-package merging requires matching filters and unchanged non-npm entries across the local, remote, and ancestor versions. One side may change the ordered npm identity list, or both sides may make the same change. Conflicting order or membership changes require atomic selection to preserve insertion positions and resource precedence.
|
|
554
|
+
- Changed Git refs and local path aliases require atomic selection rather than merging them as separate sources. Delete/upgrade conflicts, duplicate identities, incompatible filters, version ranges, and tags also retain atomic selection when deterministic merging is not possible.
|
|
555
|
+
- An existing local or remote array keeps its JSON spelling if it matches the merged result. Accepted settings files keep their original bytes unless Pi Sync must replace `packages`; then only that value changes.
|
|
556
|
+
|
|
557
|
+
The model does not resolve code/scripts, keybindings, binaries, unknown formats, session histories, deletion/modification conflicts, path collisions, or session-root transitions.
|
|
489
558
|
Existing deterministic merges still follow their own explicit settings.
|
|
490
559
|
Unsupported or refused groups remain unresolved; only an explicitly enabled `partialSync` policy permits progress around them.
|
|
491
560
|
Preserving versions does not mean a conflict is resolved.
|
|
@@ -569,9 +638,9 @@ A failed consent write blocks automatic work in that service instance. Uncertain
|
|
|
569
638
|
|
|
570
639
|
### Continuous sync
|
|
571
640
|
|
|
572
|
-
`sync.continuous` is an optional per-setup boolean, default `false`, in settings versions 3 through
|
|
641
|
+
`sync.continuous` is an optional per-setup boolean, default `false`, in settings versions 3 through 8.
|
|
573
642
|
Open **Settings → Continuous sync** after enabling Autonomous sync. For directory scope, the review shows session opt-in separately from path rules.
|
|
574
|
-
RPC users can
|
|
643
|
+
In a legacy-only settings file, RPC users can opt in by explicitly setting this field to `true`. If any setup uses an ignore file, follow the [separate approval step](#automatic-sync-controls) after enabling it.
|
|
575
644
|
Existing Autonomous sync consent does not enable recurring requests.
|
|
576
645
|
|
|
577
646
|
The separate review names the setup, storage connection, destination, included paths, recurring costs and automatic writes.
|
|
@@ -584,6 +653,7 @@ Reopen Settings to read the saved value.
|
|
|
584
653
|
|
|
585
654
|
Monitoring starts at an eligible TUI/RPC session startup, after awaited local transaction recovery, or after a foreground `/sync` command or manager closes.
|
|
586
655
|
It replaces the duplicate one-shot startup transfer, not the legacy shutdown policy.
|
|
656
|
+
Removing the last ignore-file setup does not resume monitoring in the already attached sessions. To resume enabled Continuous sync, close `/sync` and run `/reload` in an attached TUI session, or close and reopen one Pi client. This does not grant after-exit permission.
|
|
587
657
|
Turning Continuous sync off stops its work without disabling Autonomous sync.
|
|
588
658
|
Turning Autonomous sync off also stops monitoring; a saved Continuous sync On value remains ineffective until Autonomous sync is enabled again.
|
|
589
659
|
|
|
@@ -705,7 +775,7 @@ Coupled fields must be excluded together.
|
|
|
705
775
|
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.
|
|
706
776
|
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.
|
|
707
777
|
Absent rules keep a setup nonportable, including unrelated setups in a version-4 document.
|
|
708
|
-
An explicit array opts that setup into at least snapshot version 2; exclusion-enabled selected-path setups retain version 4,
|
|
778
|
+
An explicit array opts that setup into at least snapshot version 2; exclusion-enabled selected-path setups retain version 4, legacy directory scope retains version 5, and ignore-file setups use version 6.
|
|
709
779
|
`[]` after rule removal retains this reviewed opt-in and differs from absence.
|
|
710
780
|
Older clients must refuse portable data rather than replace local-only values.
|
|
711
781
|
|
|
@@ -744,8 +814,8 @@ Never reinterpret portable snapshots with an old binary.
|
|
|
744
814
|
|
|
745
815
|
`sync.mergeContent` and `sync.partialSync` are independent opt-in booleans, both default `false`.
|
|
746
816
|
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.
|
|
747
|
-
|
|
748
|
-
Partial publications retain snapshot version 4 for exclusion-enabled selected paths
|
|
817
|
+
Use a supported settings version of at least 5 (at least 7 for legacy directory scope and 8 for ignore-file policy).
|
|
818
|
+
Partial publications retain snapshot version 4 for exclusion-enabled selected paths, version 5 for legacy directory scope, and version 6 for ignore-file policy.
|
|
749
819
|
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.
|
|
750
820
|
Disabling options retains the schema and recovery evidence.
|
|
751
821
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ExtensionCommandContext, ExtensionContext } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
import { piDaemonClient, remoteOperation } from "../daemon/pi-client.js";
|
|
3
|
-
import {
|
|
3
|
+
import { loadSettingsConfig, sessionTokenWarnings, syncSessionsWarnings } from "../settings/config.js";
|
|
4
4
|
import { activeLocalConfigPath, createLocalConfigDocument, localConfigPath } from "../settings/config-file.js";
|
|
5
5
|
import { localConfigTemplate, readLocalConfigObject } from "../settings/settings-store.js";
|
|
6
6
|
import type { AnySyncConfig } from "../settings/settings-types.js";
|
|
@@ -11,6 +11,7 @@ import type { SyncLoaders } from "../sync/sync-loaders.js";
|
|
|
11
11
|
import { RemoteSelectionMismatchError, syncSessionsSelected } from "../sync/sync-policy.js";
|
|
12
12
|
import { automaticSyncSummary } from "../ui/automatic-sync-summary.js";
|
|
13
13
|
import type { RunRouteResult } from "../ui/cancellable-operation.js";
|
|
14
|
+
import { manualIgnoreFileGuidance } from "../ui/ignore-file-guidance.js";
|
|
14
15
|
import { trackOperationDialogs } from "../ui/operation-dialogs.js";
|
|
15
16
|
import { startupTransferSummary } from "../ui/sync-behavior.js";
|
|
16
17
|
import { setSyncStatus } from "../ui/sync-status.js";
|
|
@@ -256,7 +257,8 @@ async function initConfig(ctx: ExtensionCommandContext, signal?: AbortSignal) {
|
|
|
256
257
|
}
|
|
257
258
|
|
|
258
259
|
async function showConfig(ctx: ExtensionCommandContext, options: CommandOptions) {
|
|
259
|
-
const config = await
|
|
260
|
+
const config = await loadSettingsConfig(options.setup);
|
|
261
|
+
throwIfAborted(options.signal);
|
|
260
262
|
const warnings = [
|
|
261
263
|
...(config.backend.type === "s3" ? sessionTokenWarnings(config.backend.profile) : []),
|
|
262
264
|
...syncSessionsWarnings(config),
|
|
@@ -276,12 +278,14 @@ async function showConfig(ctx: ExtensionCommandContext, options: CommandOptions)
|
|
|
276
278
|
`autonomous sync: ${config.agentMode ? "On" : "Off"}`,
|
|
277
279
|
`continuous sync: ${config.continuous ? (config.agentMode ? "On" : "paused; Autonomous sync is Off") : "Off"}`,
|
|
278
280
|
config.scope ? "sync scope: Pi agent directory" : `included content: ${config.include.join(", ") || "none"}`,
|
|
279
|
-
...(config.
|
|
280
|
-
? [
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
281
|
+
...(config.pathPolicy === "ignore-file"
|
|
282
|
+
? ["path policy: local ignore file", manualIgnoreFileGuidance(config.ignoreFile ?? ".syncignore")]
|
|
283
|
+
: config.scope
|
|
284
|
+
? [
|
|
285
|
+
`excluded paths: ${config.exclude?.map(safeTerminalText).join(", ") || "none"}`,
|
|
286
|
+
`re-included paths: ${config.reinclude?.map(safeTerminalText).join(", ") || "none"}`,
|
|
287
|
+
]
|
|
288
|
+
: []),
|
|
285
289
|
`sessions: ${syncSessionsSelected(config) ? "included" : "not included"}`,
|
|
286
290
|
`settings file: ${localConfigPath()}`,
|
|
287
291
|
...warnings,
|