@codex-infinity/pi-infinity 0.61.1 → 0.61.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-custom-provider-gitlab-duo",
3
3
  "private": true,
4
- "version": "1.12.1",
4
+ "version": "1.12.2",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-custom-provider-qwen-cli",
3
3
  "private": true,
4
- "version": "1.11.1",
4
+ "version": "1.11.2",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -217,6 +217,21 @@ async function writePromptToTempFile(agentName: string, prompt: string): Promise
217
217
  return { dir: tmpDir, filePath };
218
218
  }
219
219
 
220
+ function getPiInvocation(args: string[]): { command: string; args: string[] } {
221
+ const currentScript = process.argv[1];
222
+ if (currentScript && fs.existsSync(currentScript)) {
223
+ return { command: process.execPath, args: [currentScript, ...args] };
224
+ }
225
+
226
+ const execName = path.basename(process.execPath).toLowerCase();
227
+ const isGenericRuntime = /^(node|bun)(\.exe)?$/.test(execName);
228
+ if (!isGenericRuntime) {
229
+ return { command: process.execPath, args };
230
+ }
231
+
232
+ return { command: "pi", args };
233
+ }
234
+
220
235
  type OnUpdateCallback = (partial: AgentToolResult<SubagentDetails>) => void;
221
236
 
222
237
  async function runSingleAgent(
@@ -286,7 +301,12 @@ async function runSingleAgent(
286
301
  let wasAborted = false;
287
302
 
288
303
  const exitCode = await new Promise<number>((resolve) => {
289
- const proc = spawn("pi", args, { cwd: cwd ?? defaultCwd, shell: false, stdio: ["ignore", "pipe", "pipe"] });
304
+ const invocation = getPiInvocation(args);
305
+ const proc = spawn(invocation.command, invocation.args, {
306
+ cwd: cwd ?? defaultCwd,
307
+ shell: false,
308
+ stdio: ["ignore", "pipe", "pipe"],
309
+ });
290
310
  let buffer = "";
291
311
 
292
312
  const processLine = (line: string) => {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-with-deps",
3
- "version": "1.25.1",
3
+ "version": "1.25.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-with-deps",
9
- "version": "1.25.1",
9
+ "version": "1.25.2",
10
10
  "dependencies": {
11
11
  "ms": "^2.1.3"
12
12
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-with-deps",
3
3
  "private": true,
4
- "version": "1.25.1",
4
+ "version": "1.25.2",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codex-infinity/pi-infinity",
3
- "version": "0.61.1",
3
+ "version": "0.61.2",
4
4
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "piConfig": {
@@ -40,9 +40,9 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@mariozechner/jiti": "^2.6.2",
43
- "@mariozechner/pi-agent-core": "^0.61.1",
44
- "@mariozechner/pi-ai": "^0.61.1",
45
- "@mariozechner/pi-tui": "^0.61.1",
43
+ "@mariozechner/pi-agent-core": "^0.61.2",
44
+ "@mariozechner/pi-ai": "^0.61.2",
45
+ "@mariozechner/pi-tui": "^0.61.2",
46
46
  "@silvia-odwyer/photon-node": "^0.3.4",
47
47
  "chalk": "^5.5.0",
48
48
  "cli-highlight": "^2.1.11",