pi-patch-keeper 1.3.0 → 1.3.2
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/README.md +19 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -63,14 +63,11 @@ pi install npm:pi-patch-keeper
|
|
|
63
63
|
|
|
64
64
|
```mermaid
|
|
65
65
|
flowchart TD
|
|
66
|
-
A[factory
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
C
|
|
71
|
-
F -->|是| G[备份 + 重排 packages]
|
|
72
|
-
C --> H[before_agent_start<br/>比对注入手册版本与磁盘]
|
|
73
|
-
H -->|不一致| I[通知 + nextTurn 尾部消息<br/>以磁盘为准]
|
|
66
|
+
A[factory:读 settings.json 建指纹] --> B[session_start]
|
|
67
|
+
A --> C[before_agent_start]
|
|
68
|
+
B -->|指纹变化| D[通知:手册 / 结论可能过期]
|
|
69
|
+
B -->|force 顺序错| E[备份 + 重排 packages]
|
|
70
|
+
C -->|注入版本 vs 磁盘不一致| F[通知 + nextTurn 尾部消息<br/>以磁盘为准]
|
|
74
71
|
```
|
|
75
72
|
|
|
76
73
|
## 原理(小白)
|
|
@@ -128,6 +125,15 @@ Config file `~/.pi/patch-keeper.json` (optional); no environment variables.
|
|
|
128
125
|
| `~/.pi/patch-keeper-manual.json` | Manual version + content signature |
|
|
129
126
|
| `~/.pi/agent/settings.json.bak-force-order-*` | Backup before a force-order repair |
|
|
130
127
|
|
|
128
|
+
Full config:
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"forceTail": ["npm:pi-rtk-optimizer", "npm:pi-cache-optimizer"]
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
|
|
131
137
|
## Commands
|
|
132
138
|
|
|
133
139
|
| Command | Purpose |
|
|
@@ -146,15 +152,11 @@ Config file `~/.pi/patch-keeper.json` (optional); no environment variables.
|
|
|
146
152
|
|
|
147
153
|
```mermaid
|
|
148
154
|
flowchart TD
|
|
149
|
-
A[factory
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
C
|
|
154
|
-
F -->|yes| G[backup + reorder packages]
|
|
155
|
-
C --> H[before_agent_start<br/>compare injected manual vs disk]
|
|
156
|
-
H -->|mismatch| I[notify + nextTurn message<br/>trust disk]
|
|
157
|
-
|
|
155
|
+
A[factory: build fingerprint from settings.json] --> B[session_start]
|
|
156
|
+
A --> C[before_agent_start]
|
|
157
|
+
B -->|fingerprint changed| D[notify: manuals may be stale]
|
|
158
|
+
B -->|force order wrong| E[backup + reorder packages]
|
|
159
|
+
C -->|injected vs disk mismatch| F[notify + nextTurn message<br/>trust disk]
|
|
158
160
|
```
|
|
159
161
|
|
|
160
162
|
## How it works (plain words)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-patch-keeper",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "pi config guards: codemode single-source check, force-order guard (auto-fix), settings fingerprint drift, injected-manual alignment. (PiDeck / third-party source patches are a local-only module, not bundled.)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|