@aethrekh/pi-cs 0.2.0-alpha.2 → 0.2.0-alpha.3
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/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [0.2.0-alpha.3](https://github.com/AshishBagdane/pi-cs/compare/v0.2.0-alpha.2...v0.2.0-alpha.3) (2026-06-05)
|
|
11
|
+
|
|
12
|
+
### ### Fixed
|
|
13
|
+
|
|
14
|
+
* remove pi.skills from package.json so Pi doesn't load skills globally ([ada95e5](https://github.com/AshishBagdane/pi-cs/commit/ada95e5a5088fe38ad439f408092663e4cdf8090))
|
|
15
|
+
* use ctx.cwd/event.cwd instead of process.cwd() in all extension handlers ([10f6d85](https://github.com/AshishBagdane/pi-cs/commit/10f6d853d58181a69efa5efc1d4b9de02b532c33))
|
|
16
|
+
|
|
10
17
|
## [0.2.0-alpha.2](https://github.com/AshishBagdane/pi-cs/compare/v0.2.0-alpha.1...v0.2.0-alpha.2) (2026-06-05)
|
|
11
18
|
|
|
12
19
|
### ### Fixed
|
|
@@ -189,9 +189,9 @@ function summarizeFolderContext(result) {
|
|
|
189
189
|
}
|
|
190
190
|
// ─── Pi Extension Factory ──────────────────────────────────────────────────
|
|
191
191
|
function default_1(pi) {
|
|
192
|
-
pi.on("before_agent_start", async (event) => {
|
|
192
|
+
pi.on("before_agent_start", async (event, ctx) => {
|
|
193
193
|
// Re-check workspace on every agent turn — no closure state needed.
|
|
194
|
-
if (!(0, workspace_1.findPiscesMarker)())
|
|
194
|
+
if (!(0, workspace_1.findPiscesMarker)(ctx.cwd))
|
|
195
195
|
return;
|
|
196
196
|
const summary = summarizeFolderContext(detectFolderContext());
|
|
197
197
|
if (!summary)
|
|
@@ -106,14 +106,14 @@ function default_1(pi) {
|
|
|
106
106
|
// Guard against sendUserMessage re-triggering this handler — warning text
|
|
107
107
|
// contains words like "graded" that would otherwise match medium-risk patterns.
|
|
108
108
|
let handlingWarning = false;
|
|
109
|
-
pi.on("session_start", async () => {
|
|
110
|
-
isActive = (0, workspace_1.findPiscesMarker)() !== null;
|
|
109
|
+
pi.on("session_start", async (_event, ctx) => {
|
|
110
|
+
isActive = (0, workspace_1.findPiscesMarker)(ctx.cwd) !== null;
|
|
111
111
|
});
|
|
112
112
|
// Refresh isActive before each agent turn so mid-session workspace changes
|
|
113
113
|
// are picked up. The input handler may still use a one-turn-stale value for
|
|
114
114
|
// messages that arrive before the first before_agent_start of a new turn.
|
|
115
|
-
pi.on("before_agent_start", async () => {
|
|
116
|
-
isActive = (0, workspace_1.findPiscesMarker)() !== null;
|
|
115
|
+
pi.on("before_agent_start", async (_event, ctx) => {
|
|
116
|
+
isActive = (0, workspace_1.findPiscesMarker)(ctx.cwd) !== null;
|
|
117
117
|
});
|
|
118
118
|
pi.on("input", async (event) => {
|
|
119
119
|
if (!isActive)
|
|
@@ -164,8 +164,8 @@ function default_1(pi) {
|
|
|
164
164
|
const skillsUsed = [];
|
|
165
165
|
let isActive = false;
|
|
166
166
|
let workspaceRoot = null;
|
|
167
|
-
pi.on("session_start", async () => {
|
|
168
|
-
workspaceRoot = (0, workspace_1.findPiscesMarker)();
|
|
167
|
+
pi.on("session_start", async (_event, ctx) => {
|
|
168
|
+
workspaceRoot = (0, workspace_1.findPiscesMarker)(ctx.cwd);
|
|
169
169
|
isActive = workspaceRoot !== null;
|
|
170
170
|
});
|
|
171
171
|
pi.on("input", async (event) => {
|
|
@@ -179,7 +179,7 @@ function default_1(pi) {
|
|
|
179
179
|
});
|
|
180
180
|
pi.on("before_agent_start", async (_event, ctx) => {
|
|
181
181
|
// Refresh workspace state on every agent turn so mid-session changes are reflected.
|
|
182
|
-
workspaceRoot = (0, workspace_1.findPiscesMarker)();
|
|
182
|
+
workspaceRoot = (0, workspace_1.findPiscesMarker)(ctx.cwd);
|
|
183
183
|
isActive = workspaceRoot !== null;
|
|
184
184
|
if (!isActive)
|
|
185
185
|
return;
|
|
@@ -226,15 +226,15 @@ function default_1(pi) {
|
|
|
226
226
|
let semesterCtx = null;
|
|
227
227
|
// Dynamically register skills only when a Pisces workspace is active.
|
|
228
228
|
// Skills are absent outside a workspace — they never appear in the global command list.
|
|
229
|
-
pi.on("resources_discover", async () => {
|
|
230
|
-
if (!(0, workspace_1.findPiscesMarker)())
|
|
229
|
+
pi.on("resources_discover", async (event) => {
|
|
230
|
+
if (!(0, workspace_1.findPiscesMarker)(event.cwd))
|
|
231
231
|
return;
|
|
232
232
|
// Relative path works for both pack (extensions/ → skills/) and dev (src/extensions/ → src/skills/) layouts
|
|
233
233
|
const skillsDir = path.resolve(__dirname, "../skills");
|
|
234
234
|
return fs.existsSync(skillsDir) ? { skillPaths: [skillsDir] } : undefined;
|
|
235
235
|
});
|
|
236
236
|
pi.on("session_start", async (_event, ctx) => {
|
|
237
|
-
if (!(0, workspace_1.findPiscesMarker)())
|
|
237
|
+
if (!(0, workspace_1.findPiscesMarker)(ctx.cwd))
|
|
238
238
|
return;
|
|
239
239
|
if (removeLegacyGlobalPersona(persona)) {
|
|
240
240
|
ctx.ui.notify("🐠 Pisces: cleaned up a stale ~/.pi/agent/APPEND_SYSTEM.md from an older install. Persona is now session-scoped.", "info");
|
|
@@ -249,10 +249,10 @@ function default_1(pi) {
|
|
|
249
249
|
ctx.ui.notify("🐠 Pisces loaded — no SEMESTER.md found. Create one to enable context awareness.", "info");
|
|
250
250
|
}
|
|
251
251
|
});
|
|
252
|
-
pi.on("before_agent_start", async (event) => {
|
|
252
|
+
pi.on("before_agent_start", async (event, ctx) => {
|
|
253
253
|
// Re-check workspace on every agent turn so mid-session activation/deactivation
|
|
254
254
|
// is reflected without needing a session restart.
|
|
255
|
-
if (!(0, workspace_1.findPiscesMarker)())
|
|
255
|
+
if (!(0, workspace_1.findPiscesMarker)(ctx.cwd))
|
|
256
256
|
return;
|
|
257
257
|
// Lazy-load semester context if it was not available at session_start
|
|
258
258
|
// (e.g. workspace was activated mid-session via /pisces --activate).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aethrekh/pi-cs",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.3",
|
|
4
4
|
"description": "Pisces — The CS Student Edition for Pi Coding Agent. Your personal AI teaching assistant from homework to thesis.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"academic",
|
|
@@ -37,9 +37,6 @@
|
|
|
37
37
|
"./extensions/folder-detector.js",
|
|
38
38
|
"./extensions/integrity-guard.js",
|
|
39
39
|
"./extensions/progress-tracker.js"
|
|
40
|
-
],
|
|
41
|
-
"skills": [
|
|
42
|
-
"./skills"
|
|
43
40
|
]
|
|
44
41
|
},
|
|
45
42
|
"scripts": {
|
package/pi-cs.meta.json
CHANGED
package/pi-package.yaml
CHANGED