@giladbarnea/pi-simple-team 1.0.28 → 1.0.30

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/README.md CHANGED
@@ -55,13 +55,7 @@ You:
55
55
  Main agent:
56
56
  > Pair created. They'll loop through it together. They'll let me know when they're done.
57
57
 
58
- <p align="center">
59
- <img
60
- src="screenshots/abstract-tool-output-preview.png"
61
- width="640"
62
- alt="A team appears, receives direction, and starts working"
63
- >
64
- </p>
58
+ [![A team appears, receives direction, and starts working](screenshots/abstract-tool-output-preview-640.png)](screenshots/abstract-tool-output-preview.png)
65
59
 
66
60
  <div align="center"><em>Spawn, direct, and follow a team from the normal Pi conversation.</em></div>
67
61
 
package/index.ts CHANGED
@@ -75,6 +75,7 @@ interface TeammateState {
75
75
  interface TeamState {
76
76
  owner: symbol;
77
77
  ownerPi: ExtensionAPI;
78
+ parentPiExecutable: string;
78
79
  id?: string;
79
80
  name: string;
80
81
  projectDirectory?: string;
@@ -396,7 +397,7 @@ function attachRpcTeammate(team: TeamState, teammate: TeammateState, participant
396
397
  "--system-prompt",
397
398
  composeSystemPrompt(team.name, team.teamPrompt, teammate.name, teammate.prompt, participants, teammate.canOverseeOwnTeams),
398
399
  ];
399
- const proc = childProcess.spawn("pi", args, {
400
+ const proc = childProcess.spawn(team.parentPiExecutable, args, {
400
401
  cwd: team.projectDirectory ?? process.cwd(),
401
402
  stdio: ["pipe", "ignore", "pipe"],
402
403
  env: { ...process.env, ...childEnvironmentOverrides(team, teammate, participants) },
@@ -446,7 +447,7 @@ async function attachHerdrTeammate(
446
447
  }
447
448
  args.push(
448
449
  "--",
449
- "pi",
450
+ team.parentPiExecutable,
450
451
  ...sessionArgs,
451
452
  "--no-extensions",
452
453
  "-e",
@@ -777,10 +778,11 @@ function teammateSchema(modelGuidance: string) {
777
778
  });
778
779
  }
779
780
 
780
- function restoreTeamState(owner: symbol, ownerPi: ExtensionAPI, manifest: TeamManifest, lease: TeamLease): TeamState {
781
+ function restoreTeamState(owner: symbol, ownerPi: ExtensionAPI, parentPiExecutable: string, manifest: TeamManifest, lease: TeamLease): TeamState {
781
782
  const team: TeamState = {
782
783
  owner,
783
784
  ownerPi,
785
+ parentPiExecutable,
784
786
  id: manifest.id,
785
787
  name: manifest.name,
786
788
  projectDirectory: manifest.projectDirectory,
@@ -839,6 +841,8 @@ export default function (pi: ExtensionAPI) {
839
841
  if (!childRuntimeConfig.canOverseeOwnTeams) return;
840
842
  }
841
843
 
844
+ const parentPiExecutable = process.argv[1];
845
+ if (!parentPiExecutable) throw new Error("pi-simple-team could not locate the parent Pi executable");
842
846
  const owner = Symbol("pi-simple-team-owner");
843
847
  const sessionTeammateRoster = childRuntimeConfig?.participants ?? [];
844
848
  pi.registerMessageRenderer(teamMessageType, (message, _options, theme) => renderTeamMessage(message, theme, getMarkdownTheme(), sessionTeammateRoster));
@@ -912,6 +916,7 @@ export default function (pi: ExtensionAPI) {
912
916
  const team: TeamState = {
913
917
  owner,
914
918
  ownerPi: pi,
919
+ parentPiExecutable,
915
920
  id: teamId,
916
921
  name: teamName,
917
922
  projectDirectory,
@@ -1063,7 +1068,7 @@ export default function (pi: ExtensionAPI) {
1063
1068
  const lease = claimTeamLease(manifest.id, mainSessionId);
1064
1069
  try {
1065
1070
  await ensureCallbackServer();
1066
- team = restoreTeamState(owner, pi, manifest, lease);
1071
+ team = restoreTeamState(owner, pi, parentPiExecutable, manifest, lease);
1067
1072
  teams.set(team.id!, team);
1068
1073
  } catch (error) {
1069
1074
  releaseTeamLease(lease);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@giladbarnea/pi-simple-team",
3
- "version": "1.0.28",
3
+ "version": "1.0.30",
4
4
  "description": "A flat, live team of Pi agents.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -27,6 +27,7 @@
27
27
  "screenshots/1.png",
28
28
  "screenshots/2.png",
29
29
  "screenshots/abstract-tool-output-preview.png",
30
+ "screenshots/abstract-tool-output-preview-640.png",
30
31
  "screenshots/pi-simple-team-banner.png",
31
32
  "screenshots/team-graph.png",
32
33
  "screenshots/team-log-multiple.png",