pi-patch-keeper 1.2.4 → 1.2.5
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 +51 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# pi-patch-keeper
|
|
2
2
|
|
|
3
|
+
> 中文 · [English](#english)(页面内折叠)
|
|
4
|
+
|
|
3
5
|
pi 配置守卫:codemode 一致性、force 顺序、环境指纹漂移、注入手册对齐。**不含 PiDeck 与第三方源码补丁。**
|
|
4
6
|
|
|
5
7
|
## 安装
|
|
@@ -39,3 +41,52 @@ PiDeck builtin 补丁恢复、asar 只读检测、pi-lens / pi-memory / pi-tacti
|
|
|
39
41
|
## License
|
|
40
42
|
|
|
41
43
|
MIT
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
<a id="english"></a>
|
|
48
|
+
|
|
49
|
+
<details>
|
|
50
|
+
<summary><b>English</b></summary>
|
|
51
|
+
|
|
52
|
+
pi configuration guards: codemode consistency, force order, settings fingerprint drift, injected-manual alignment. **No PiDeck or third-party source patching.**
|
|
53
|
+
|
|
54
|
+
## Install
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pi install npm:pi-patch-keeper
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Configuration
|
|
61
|
+
|
|
62
|
+
No config file (only reads `settings.json` and `APPEND_SYSTEM.md`); no environment variables.
|
|
63
|
+
|
|
64
|
+
| State file | Description |
|
|
65
|
+
| --- | --- |
|
|
66
|
+
| `~/.pi/patch-keeper.json` | Settings fingerprint from the previous start (drift compare) |
|
|
67
|
+
| `~/.pi/patch-keeper-manual.json` | Manual version + content signature |
|
|
68
|
+
| `~/.pi/agent/settings.json.bak-force-order-*` | Backup before a force-order repair |
|
|
69
|
+
|
|
70
|
+
## Commands
|
|
71
|
+
|
|
72
|
+
| Command | Purpose |
|
|
73
|
+
| --- | --- |
|
|
74
|
+
| `/patch-keeper` | codemode / force / fingerprint / injection-alignment status |
|
|
75
|
+
| `/patch-keeper fix` | Repair force order in `packages` (with backup) |
|
|
76
|
+
|
|
77
|
+
## What it does (source facts)
|
|
78
|
+
|
|
79
|
+
- factory: builds the fingerprint from `settings.json`.
|
|
80
|
+
- `session_start`: compares the fingerprint, repairs force order, reports drift and manual drift (notification only).
|
|
81
|
+
- `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`**.
|
|
82
|
+
- Writes are atomic (temp file + rename); a backup precedes any repair.
|
|
83
|
+
|
|
84
|
+
## Not in this package
|
|
85
|
+
|
|
86
|
+
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).
|
|
87
|
+
|
|
88
|
+
## License
|
|
89
|
+
|
|
90
|
+
MIT
|
|
91
|
+
|
|
92
|
+
</details>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-patch-keeper",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
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",
|