pi-patch-keeper 1.2.6 → 1.2.7

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.
Files changed (2) hide show
  1. package/README.md +22 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -39,9 +39,18 @@ pi install npm:pi-patch-keeper
39
39
  - `before_agent_start`:比对注入手册版本与磁盘版本;不一致时通知并以 `nextTurn` 尾部消息提示模型以磁盘为准;**不返回 `systemPrompt`**。
40
40
  - 写盘用临时文件 + rename;修复前备份。
41
41
 
42
- ## 不在本包内
43
42
 
44
- PiDeck builtin 补丁恢复、asar 只读检测、pi-lens / pi-memory / pi-tactician 源码补丁、本机快照恢复 —— 依赖 PiDeck 安装目录与第三方包内部实现,只在本机模块 `patch-keeper-local` 中,不发布。
43
+ ```mermaid
44
+ flowchart TD
45
+ A[factory] --> B[读 settings.json 建指纹]
46
+ B --> C[session_start]
47
+ C --> D{指纹变化?}
48
+ D -->|是| E[通知:手册/结论可能过期]
49
+ C --> F{force 顺序错?}
50
+ F -->|是| G[备份 + 重排 packages]
51
+ C --> H[before_agent_start<br/>比对注入手册版本与磁盘]
52
+ H -->|不一致| I[通知 + nextTurn 尾部消息<br/>以磁盘为准]
53
+ ```
45
54
 
46
55
  ## License
47
56
 
@@ -85,9 +94,18 @@ No config file (only reads `settings.json` and `APPEND_SYSTEM.md`); no environme
85
94
  - `before_agent_start`: compares the injected manual version with disk; on mismatch it notifies and sends a `nextTurn` message telling the model to trust disk; **never returns `systemPrompt`**.
86
95
  - Writes are atomic (temp file + rename); a backup precedes any repair.
87
96
 
88
- ## Not in this package
89
97
 
90
- PiDeck builtin patch restore, read-only asar checks, pi-lens / pi-memory / pi-tactician source patches, local snapshot restore — they depend on the PiDeck install dir and third-party internals, and live only in the local module `patch-keeper-local` (not published).
98
+ ```mermaid
99
+ flowchart TD
100
+ A[factory] --> B[read settings.json, build fingerprint]
101
+ B --> C[session_start]
102
+ C --> D{fingerprint changed?}
103
+ D -->|yes| E[notify: manuals may be stale]
104
+ C --> F{force order wrong?}
105
+ F -->|yes| G[backup + reorder packages]
106
+ C --> H[before_agent_start<br/>compare injected manual vs disk]
107
+ H -->|mismatch| I[notify + nextTurn message<br/>trust disk]
108
+ ```
91
109
 
92
110
  ## License
93
111
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-patch-keeper",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
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",