@yandy0725/pi-subagents 0.3.0 → 0.4.0
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/index.ts +1 -0
- package/package.json +2 -2
- package/src/lifecycle/subagent-manager.ts +7 -2
package/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.4.0",
|
|
7
7
|
"description": "Focused, in-process sub-agent core for pi — autonomous agents plus a typed API and lifecycle events",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"repository": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@biomejs/biome": "^2.5.2",
|
|
42
42
|
"@types/node": "^22.0.0",
|
|
43
|
-
"typescript": "~
|
|
43
|
+
"typescript": "~7.0.2",
|
|
44
44
|
"vitest": "^3.0.0"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -258,10 +258,15 @@ export class SubagentManager {
|
|
|
258
258
|
const record = this.agents.get(id);
|
|
259
259
|
if (!record) return false;
|
|
260
260
|
|
|
261
|
-
// A queued agent has not started; mark it stopped
|
|
262
|
-
// becomes a no-op (status guard) when
|
|
261
|
+
// A queued agent has not started; mark it stopped and notify observers.
|
|
262
|
+
// Its scheduled thunk becomes a no-op (status guard) when the slot opens.
|
|
263
263
|
if (record.status === "queued") {
|
|
264
264
|
record.markStopped();
|
|
265
|
+
try {
|
|
266
|
+
this.observer?.onSubagentCompleted(record);
|
|
267
|
+
} catch (err) {
|
|
268
|
+
debugLog("onSubagentCompleted observer", err);
|
|
269
|
+
}
|
|
265
270
|
return true;
|
|
266
271
|
}
|
|
267
272
|
|