@tmustier/pi-agent-teams 0.5.1 → 0.5.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.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.2
|
|
4
|
+
|
|
5
|
+
### Fixes
|
|
6
|
+
|
|
7
|
+
- **Pi 0.62 metadata compatibility** — updated tool metadata wiring for recent Pi releases so teams tools continue to render the right prompt snippets/guidelines and stay compatible with current core APIs.
|
|
8
|
+
- **Non-interactive exit hang** — leader polling timers now call `unref()` so print/json child sessions can exit cleanly instead of hanging after the agent finishes. This fixes subagent and other nested Pi flows that load the teams extension in the background.
|
|
9
|
+
|
|
3
10
|
## 0.5.1
|
|
4
11
|
|
|
5
12
|
### Features
|
|
@@ -191,6 +191,11 @@ export function registerTeamsTool(opts: {
|
|
|
191
191
|
"Optional overrides: model='<provider>/<modelId>' and thinking (off|minimal|low|medium|high|xhigh).",
|
|
192
192
|
"For governance, the user can run /team delegate on (leader restricted to coordination) or /team spawn <name> plan (worker needs plan approval).",
|
|
193
193
|
].join(" "),
|
|
194
|
+
promptSnippet: "Delegate work across teammates, inspect member status, message workers, and manage team lifecycle/tasks.",
|
|
195
|
+
promptGuidelines: [
|
|
196
|
+
"Use this tool when the user wants parallel agent work, worker coordination, or team lifecycle/task management.",
|
|
197
|
+
"Prefer member_status before interrupting or reassigning active teammates when the current state is unclear.",
|
|
198
|
+
],
|
|
194
199
|
parameters: TeamsToolParamsSchema,
|
|
195
200
|
|
|
196
201
|
async execute(_toolCallId, params: TeamsToolParamsType, signal, _onUpdate, ctx): Promise<AgentToolResult<unknown>> {
|
|
@@ -750,6 +750,8 @@ export function runLeader(pi: ExtensionAPI): void {
|
|
|
750
750
|
refreshInFlight = false;
|
|
751
751
|
}
|
|
752
752
|
}, 1000);
|
|
753
|
+
// Don't keep non-interactive/child pi processes alive just because leader polling exists.
|
|
754
|
+
refreshTimer.unref?.();
|
|
753
755
|
|
|
754
756
|
inboxTimer = setInterval(async () => {
|
|
755
757
|
if (isStopping) return;
|
|
@@ -761,6 +763,7 @@ export function runLeader(pi: ExtensionAPI): void {
|
|
|
761
763
|
inboxInFlight = false;
|
|
762
764
|
}
|
|
763
765
|
}, 700);
|
|
766
|
+
inboxTimer.unref?.();
|
|
764
767
|
});
|
|
765
768
|
|
|
766
769
|
pi.on("session_switch", async (_event, ctx) => {
|
|
@@ -820,6 +823,7 @@ export function runLeader(pi: ExtensionAPI): void {
|
|
|
820
823
|
refreshInFlight = false;
|
|
821
824
|
}
|
|
822
825
|
}, 1000);
|
|
826
|
+
refreshTimer.unref?.();
|
|
823
827
|
|
|
824
828
|
inboxTimer = setInterval(async () => {
|
|
825
829
|
if (isStopping) return;
|
|
@@ -831,6 +835,7 @@ export function runLeader(pi: ExtensionAPI): void {
|
|
|
831
835
|
inboxInFlight = false;
|
|
832
836
|
}
|
|
833
837
|
}, 700);
|
|
838
|
+
inboxTimer.unref?.();
|
|
834
839
|
});
|
|
835
840
|
|
|
836
841
|
pi.on("session_shutdown", async () => {
|
|
@@ -143,6 +143,11 @@ export function runWorker(pi: ExtensionAPI): void {
|
|
|
143
143
|
name: "team_message",
|
|
144
144
|
label: "Team Message",
|
|
145
145
|
description: "Send a message to a comrade. Use this to coordinate with peers on related tasks. Set urgent=true to interrupt their active turn (use sparingly — only for time-sensitive coordination).",
|
|
146
|
+
promptSnippet: "Send a coordination message to another teammate, optionally as an urgent interruption.",
|
|
147
|
+
promptGuidelines: [
|
|
148
|
+
"Use this tool for teammate-to-teammate coordination instead of overloading task status fields with freeform messages.",
|
|
149
|
+
"Set urgent=true only when the recipient must be interrupted before finishing their current turn.",
|
|
150
|
+
],
|
|
146
151
|
parameters: TeamMessageToolParamsSchema,
|
|
147
152
|
async execute(
|
|
148
153
|
_toolCallId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tmustier/pi-agent-teams",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "Claude Code agent teams style workflow for Pi.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Thomas Mustier",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@eslint/js": "^9.39.2",
|
|
42
|
-
"@mariozechner/pi-agent-core": "^0.
|
|
43
|
-
"@mariozechner/pi-ai": "^0.
|
|
44
|
-
"@mariozechner/pi-coding-agent": "^0.
|
|
45
|
-
"@mariozechner/pi-tui": "^0.
|
|
42
|
+
"@mariozechner/pi-agent-core": "^0.62.0",
|
|
43
|
+
"@mariozechner/pi-ai": "^0.62.0",
|
|
44
|
+
"@mariozechner/pi-coding-agent": "^0.62.0",
|
|
45
|
+
"@mariozechner/pi-tui": "^0.62.0",
|
|
46
46
|
"@sinclair/typebox": "^0.34.48",
|
|
47
47
|
"eslint": "^9.39.2",
|
|
48
48
|
"tsx": "^4.20.5",
|
package/scripts/smoke-test.mts
CHANGED
|
@@ -554,14 +554,18 @@ console.log("\n7. Pi extension loading");
|
|
|
554
554
|
return typeof c === "string" ? c : undefined;
|
|
555
555
|
})();
|
|
556
556
|
|
|
557
|
+
const versionOutput = `${res.stdout ?? ""}${res.stderr ?? ""}`.trim();
|
|
558
|
+
|
|
557
559
|
if (errCode === "ENOENT") {
|
|
558
560
|
console.log(" (skipped) pi CLI not found on PATH");
|
|
559
561
|
} else if (errCode === "ETIMEDOUT") {
|
|
560
562
|
console.log(" (skipped) pi --version timed out");
|
|
561
563
|
} else if (res.status !== 0) {
|
|
562
564
|
console.log(" (skipped) pi --version returned non-zero exit code");
|
|
565
|
+
} else if (versionOutput.length === 0) {
|
|
566
|
+
console.log(" (skipped) pi --version produced no output");
|
|
563
567
|
} else {
|
|
564
|
-
assert(
|
|
568
|
+
assert(versionOutput.length > 0, "pi --version works");
|
|
565
569
|
}
|
|
566
570
|
}
|
|
567
571
|
|