@melihmucuk/pi-crew 1.0.6 → 1.0.7
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/dist/index.js
CHANGED
|
@@ -28,8 +28,6 @@ export default function (pi) {
|
|
|
28
28
|
rebuildPromptCache(ctx.cwd);
|
|
29
29
|
activateSession(ctx);
|
|
30
30
|
});
|
|
31
|
-
pi.on("session_switch", (_event, ctx) => activateSession(ctx));
|
|
32
|
-
pi.on("session_fork", (_event, ctx) => activateSession(ctx));
|
|
33
31
|
pi.on("session_shutdown", (_event, ctx) => {
|
|
34
32
|
crewManager.abortForOwner(ctx.sessionManager.getSessionId(), pi);
|
|
35
33
|
});
|
|
@@ -6,7 +6,7 @@ export class DeliveryCoordinator {
|
|
|
6
6
|
activateSession(sessionId, isIdle, pi, countRunningForOwner) {
|
|
7
7
|
this.currentSessionId = sessionId;
|
|
8
8
|
this.currentIsIdle = isIdle;
|
|
9
|
-
// Delay flush to next macrotask.
|
|
9
|
+
// Delay flush to next macrotask. session_start fires before pi-core
|
|
10
10
|
// calls _reconnectToAgent(), so synchronous delivery would emit agent
|
|
11
11
|
// events while the session listener is disconnected, losing JSONL persistence.
|
|
12
12
|
if (this.pendingMessages.some((entry) => entry.ownerSessionId === sessionId)) {
|
package/docs/architecture.md
CHANGED
|
@@ -94,9 +94,7 @@ Responsibilities:
|
|
|
94
94
|
|
|
95
95
|
Session lifecycle events used by the extension:
|
|
96
96
|
|
|
97
|
-
- `session_start`
|
|
98
|
-
- `session_switch`
|
|
99
|
-
- `session_fork`
|
|
97
|
+
- `session_start` (with `reason: "startup" | "reload" | "new" | "resume" | "fork"`)
|
|
100
98
|
- `session_shutdown`
|
|
101
99
|
|
|
102
100
|
This is the bridge between pi core events and `pi-crew` runtime behavior.
|
|
@@ -499,9 +497,7 @@ Delivery branches:
|
|
|
499
497
|
|
|
500
498
|
Queued results are flushed when the extension sees that owner session through:
|
|
501
499
|
|
|
502
|
-
- `session_start`
|
|
503
|
-
- `session_switch`
|
|
504
|
-
- `session_fork`
|
|
500
|
+
- `session_start` (with `reason: "resume"` or `reason: "fork"` for session switches)
|
|
505
501
|
|
|
506
502
|
### 9.3 Idle vs streaming session behavior
|
|
507
503
|
|
|
@@ -527,7 +523,7 @@ Pending message flush after session activation is intentionally deferred to the
|
|
|
527
523
|
|
|
528
524
|
Reason:
|
|
529
525
|
|
|
530
|
-
- pi-core can emit `
|
|
526
|
+
- pi-core can emit `session_start` with `reason: "resume"` before reconnecting the agent listener during resume flows
|
|
531
527
|
- synchronous message delivery at that moment can lose custom message persistence
|
|
532
528
|
|
|
533
529
|
This is why queued results are flushed asynchronously instead of synchronously during session activation.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@melihmucuk/pi-crew",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Non-blocking subagent orchestration for pi coding agent",
|
|
6
6
|
"files": [
|
|
@@ -35,19 +35,19 @@
|
|
|
35
35
|
"prepare": "npm run build"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@mariozechner/pi-ai": "*",
|
|
39
38
|
"@mariozechner/pi-agent-core": "*",
|
|
39
|
+
"@mariozechner/pi-ai": "*",
|
|
40
40
|
"@mariozechner/pi-coding-agent": "*",
|
|
41
41
|
"@mariozechner/pi-tui": "*",
|
|
42
42
|
"@sinclair/typebox": "*"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@mariozechner/pi-
|
|
46
|
-
"@mariozechner/pi-
|
|
47
|
-
"@mariozechner/pi-coding-agent": "^0.
|
|
48
|
-
"@mariozechner/pi-tui": "^0.
|
|
45
|
+
"@mariozechner/pi-agent-core": "^0.65.0",
|
|
46
|
+
"@mariozechner/pi-ai": "^0.65.0",
|
|
47
|
+
"@mariozechner/pi-coding-agent": "^0.65.0",
|
|
48
|
+
"@mariozechner/pi-tui": "^0.65.0",
|
|
49
49
|
"@sinclair/typebox": "^0.34.49",
|
|
50
|
-
"@types/node": "^22.19.
|
|
50
|
+
"@types/node": "^22.19.17",
|
|
51
51
|
"typescript": "^5.9.3"
|
|
52
52
|
}
|
|
53
53
|
}
|