pi-patch-keeper 1.2.6 → 1.2.8

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 +38 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -9,6 +9,14 @@
9
9
 
10
10
  pi 配置守卫:codemode 一致性、force 顺序、环境指纹漂移、注入手册对齐。**不含 PiDeck 与第三方源码补丁。**
11
11
 
12
+ ## 快速事实
13
+
14
+ | 项 | 说明 |
15
+ | --- | --- |
16
+ | 配置文件 | **无**(只读 settings.json / APPEND_SYSTEM.md) |
17
+ | 命令行 | /patch-keeper [fix] |
18
+ | 调用方式 | **全自动**:启动自检并自动修复 force 顺序;fix 手动重跑 |
19
+
12
20
  ## 安装
13
21
 
14
22
  ```bash
@@ -39,9 +47,18 @@ pi install npm:pi-patch-keeper
39
47
  - `before_agent_start`:比对注入手册版本与磁盘版本;不一致时通知并以 `nextTurn` 尾部消息提示模型以磁盘为准;**不返回 `systemPrompt`**。
40
48
  - 写盘用临时文件 + rename;修复前备份。
41
49
 
42
- ## 不在本包内
43
50
 
44
- PiDeck builtin 补丁恢复、asar 只读检测、pi-lens / pi-memory / pi-tactician 源码补丁、本机快照恢复 —— 依赖 PiDeck 安装目录与第三方包内部实现,只在本机模块 `patch-keeper-local` 中,不发布。
51
+ ```mermaid
52
+ flowchart TD
53
+ A[factory] --> B[读 settings.json 建指纹]
54
+ B --> C[session_start]
55
+ C --> D{指纹变化?}
56
+ D -->|是| E[通知:手册/结论可能过期]
57
+ C --> F{force 顺序错?}
58
+ F -->|是| G[备份 + 重排 packages]
59
+ C --> H[before_agent_start<br/>比对注入手册版本与磁盘]
60
+ H -->|不一致| I[通知 + nextTurn 尾部消息<br/>以磁盘为准]
61
+ ```
45
62
 
46
63
  ## License
47
64
 
@@ -55,6 +72,14 @@ MIT
55
72
 
56
73
  pi configuration guards: codemode consistency, force order, settings fingerprint drift, injected-manual alignment. **No PiDeck or third-party source patching.**
57
74
 
75
+ ## At a glance
76
+
77
+ | Item | Description |
78
+ | --- | --- |
79
+ | Config file | **None** (reads settings.json / APPEND_SYSTEM.md only) |
80
+ | Commands | /patch-keeper [fix] |
81
+ | Automation | **Fully automatic**: self-checks at startup and repairs force order; fix re-runs it |
82
+
58
83
  ## Install
59
84
 
60
85
  ```bash
@@ -85,9 +110,18 @@ No config file (only reads `settings.json` and `APPEND_SYSTEM.md`); no environme
85
110
  - `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
111
  - Writes are atomic (temp file + rename); a backup precedes any repair.
87
112
 
88
- ## Not in this package
89
113
 
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).
114
+ ```mermaid
115
+ flowchart TD
116
+ A[factory] --> B[read settings.json, build fingerprint]
117
+ B --> C[session_start]
118
+ C --> D{fingerprint changed?}
119
+ D -->|yes| E[notify: manuals may be stale]
120
+ C --> F{force order wrong?}
121
+ F -->|yes| G[backup + reorder packages]
122
+ C --> H[before_agent_start<br/>compare injected manual vs disk]
123
+ H -->|mismatch| I[notify + nextTurn message<br/>trust disk]
124
+ ```
91
125
 
92
126
  ## License
93
127
 
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.8",
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",