@zhushanwen/pi-system-prompt 1.1.4 → 1.1.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/package.json +1 -1
- package/src/index.ts +12 -3
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -73,8 +73,17 @@ const GLOBAL_AGENTS_CANDIDATES = ['AGENTS.md', 'AGENTS.MD', 'CLAUDE.md', 'CLAUDE
|
|
|
73
73
|
*
|
|
74
74
|
* Priority:
|
|
75
75
|
* 1. `process.env.XYZ_AGENT_DATA_DIR` (explicit)
|
|
76
|
-
* 2. `path.resolve(process.env.PI_CODING_AGENT_DIR ?? '', '..'
|
|
77
|
-
* (PI_CODING_AGENT_DIR == <dataDir>/
|
|
76
|
+
* 2. `path.resolve(process.env.PI_CODING_AGENT_DIR ?? '', '..')`
|
|
77
|
+
* (PI_CODING_AGENT_DIR == <dataDir>/agent, one level up == dataDir)
|
|
78
|
+
*
|
|
79
|
+
* Layout trade-off (session-root-discovery plan B, 2026-09): only the NEW
|
|
80
|
+
* layout shape is handled — one level up. An OLD-layout value
|
|
81
|
+
* (`<dataDir>/pi/agent`, pre-migration) would resolve to `<dataDir>/pi`,
|
|
82
|
+
* accepted here on purpose: in every shipped scenario the runtime injects
|
|
83
|
+
* XYZ_AGENT_DATA_DIR (priority 1 covers it), so priority 2 only serves
|
|
84
|
+
* standalone hosts already on the new layout. session-reader's
|
|
85
|
+
* discovery/env.ts strips both shapes for its diagnostics; this resolver
|
|
86
|
+
* deliberately stays single-shape (registered divergence, not a bug).
|
|
78
87
|
*
|
|
79
88
|
* Re-read on every handler invocation so env changes between turns/sessions
|
|
80
89
|
* take effect without reloading the extension.
|
|
@@ -83,7 +92,7 @@ function resolveDataDir(): string {
|
|
|
83
92
|
if (process.env.XYZ_AGENT_DATA_DIR) {
|
|
84
93
|
return process.env.XYZ_AGENT_DATA_DIR
|
|
85
94
|
}
|
|
86
|
-
return path.resolve(process.env.PI_CODING_AGENT_DIR ?? '', '..'
|
|
95
|
+
return path.resolve(process.env.PI_CODING_AGENT_DIR ?? '', '..')
|
|
87
96
|
}
|
|
88
97
|
|
|
89
98
|
/**
|