@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.
- package/CHANGELOG.md +14 -0
- package/README.md +10 -0
- package/dist/core/package-manager.d.ts +2 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +42 -1
- package/dist/core/package-manager.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +12 -0
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/custom-provider-qwen-cli/package.json +1 -1
- package/examples/extensions/subagent/index.ts +21 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/package.json +4 -4
|
@@ -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
|
|
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.
|
|
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.
|
|
9
|
+
"version": "1.25.2",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"ms": "^2.1.3"
|
|
12
12
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codex-infinity/pi-infinity",
|
|
3
|
-
"version": "0.61.
|
|
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.
|
|
44
|
-
"@mariozechner/pi-ai": "^0.61.
|
|
45
|
-
"@mariozechner/pi-tui": "^0.61.
|
|
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",
|