@zhushanwen/pi-system-prompt 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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/index.ts +8 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhushanwen/pi-system-prompt",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "System prompt injection extension for Pi — reads config and appends to system prompt",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -24,7 +24,7 @@
24
24
  "index.ts"
25
25
  ],
26
26
  "peerDependencies": {
27
- "@earendil-works/pi-coding-agent": "^0.84.4"
27
+ "@earendil-works/pi-coding-agent": "^1.0.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/node": "^24.0.0",
@@ -32,7 +32,7 @@
32
32
  "vitest": "^4.1.8"
33
33
  },
34
34
  "dependencies": {
35
- "@zhushanwen/pi-extension-logger": "0.6.1"
35
+ "@zhushanwen/pi-extension-logger": "0.6.2"
36
36
  },
37
37
  "scripts": {
38
38
  "typecheck": "npx tsc --noEmit",
package/src/index.ts CHANGED
@@ -13,9 +13,11 @@
13
13
  * 4. Reads the global instructions file `~/.agents/AGENTS.md` (candidates
14
14
  * AGENTS.md / AGENTS.MD, exact case match) every turn and appends it
15
15
  * under a labeled header. Modeled on pi's native `loadContextFileFromDir`
16
- * but deliberately narrower: pi 0.84.4 also probes `AGENTS.override.md`
17
- * and applies its candidate list to project dirs, whereas this list only
18
- * targets the global agents directory and never picks up override files.
16
+ * (pi 1.0.0 dist/core/resource-loader.js:115) but deliberately narrower:
17
+ * pi 1.0.0 also probes `AGENTS.override.md` (candidate list at
18
+ * resource-loader.js:116) and applies its candidate list to project dirs,
19
+ * whereas this list only targets the global agents directory and never
20
+ * picks up override files.
19
21
  * Opt-in by file existence: no file → no injection. Skipped when
20
22
  * pi was spawned with `--no-context-files` (consistent with pi's native
21
23
  * context-file opt-out). `TAIJI_GLOBAL_AGENTS_DIR` overrides the global
@@ -66,7 +68,8 @@ function cachedReadFileSync(filePath: string): string | null {
66
68
 
67
69
  /**
68
70
  * Global instruction candidates. Modeled on pi's native loadContextFileFromDir
69
- * but deliberately not a strict mirror: pi 0.84.4 probes its own candidate
71
+ * (pi 1.0.0 dist/core/resource-loader.js:115, candidate list at :116)
72
+ * but deliberately not a strict mirror: pi 1.0.0 probes its own candidate
70
73
  * list (including AGENTS.override.md) against project dirs, while these
71
74
  * candidates apply only to the global agents directory, intentionally exclude
72
75
  * AGENTS.override.md, and recognize only AGENTS.md case variants.
@@ -78,7 +81,7 @@ const GLOBAL_AGENTS_CANDIDATES = ['AGENTS.md', 'AGENTS.MD']
78
81
  * 常量,能力段文案由这些常量渲染——禁止把清单写成散文旁路(成员集合可被
79
82
  * `scripts/check-capability-allowlist-sync.mjs` 与渲染管线白名单对拍,零散文解析)。
80
83
  *
81
- * 成员来源 = `packages/renderer/src/composables/logic/markdown-sanitize.ts` 的
84
+ * 成员来源 = `packages/ui/src/features/chat/markdown-sanitize.ts` 的
82
85
  * `ALLOWED_TAGS` 实际字面量(52 项,GitHub 风格白名单翻译,按族归类,每项恰一次)。
83
86
  * 与渲染白名单的任一方向漂移(清单多出未放行成员 / 白名单新增未入清单)由对拍机检
84
87
  * 红灯拦住,pre-commit 按路径触发。