@phi-code-admin/phi-code 0.60.9 → 0.61.1
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.
|
@@ -161,7 +161,8 @@ export default function orchestratorExtension(pi: ExtensionAPI) {
|
|
|
161
161
|
}
|
|
162
162
|
} catch { /* not in PATH */ }
|
|
163
163
|
|
|
164
|
-
|
|
164
|
+
// Last resort: assume phi is in PATH (works with shell:true on Windows)
|
|
165
|
+
return "phi";
|
|
165
166
|
}
|
|
166
167
|
|
|
167
168
|
// ─── Sub-Agent Execution ─────────────────────────────────────────
|
|
@@ -223,7 +224,6 @@ export default function orchestratorExtension(pi: ExtensionAPI) {
|
|
|
223
224
|
taskPrompt += `- Report exactly what you did, what worked, and what didn't.\n`;
|
|
224
225
|
|
|
225
226
|
const args: string[] = [];
|
|
226
|
-
if (phiBin === "npx") args.push("@phi-code-admin/phi-code");
|
|
227
227
|
|
|
228
228
|
args.push("--print");
|
|
229
229
|
if (model && model !== "default") args.push("--model", model);
|
|
@@ -231,14 +231,26 @@ export default function orchestratorExtension(pi: ExtensionAPI) {
|
|
|
231
231
|
args.push("--no-session");
|
|
232
232
|
args.push(taskPrompt);
|
|
233
233
|
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
// Determine command: use node + cli.js for JS paths, or phi directly on Windows
|
|
235
|
+
let cmd: string;
|
|
236
|
+
let cmdArgs: string[];
|
|
237
|
+
if (phiBin.endsWith(".js")) {
|
|
238
|
+
cmd = "node";
|
|
239
|
+
cmdArgs = [phiBin, ...args];
|
|
240
|
+
} else if (phiBin === "phi") {
|
|
241
|
+
cmd = "phi";
|
|
242
|
+
cmdArgs = args;
|
|
243
|
+
} else {
|
|
244
|
+
cmd = phiBin;
|
|
245
|
+
cmdArgs = args;
|
|
246
|
+
}
|
|
236
247
|
|
|
237
248
|
execFile(cmd, cmdArgs, {
|
|
238
249
|
cwd,
|
|
239
250
|
timeout: timeoutMs,
|
|
240
251
|
maxBuffer: 10 * 1024 * 1024,
|
|
241
252
|
env: { ...process.env },
|
|
253
|
+
shell: process.platform === "win32", // Windows needs shell for .cmd shims
|
|
242
254
|
}, (error, stdout, stderr) => {
|
|
243
255
|
const durationMs = Date.now() - startTime;
|
|
244
256
|
if (error) {
|
|
@@ -649,7 +661,11 @@ ${description}
|
|
|
649
661
|
- Typical flow: explore(wave 1) → plan(wave 2) → code(wave 3) → test(wave 4) → review(wave 5)
|
|
650
662
|
- But independent code tasks can run in parallel within the same wave
|
|
651
663
|
|
|
652
|
-
6. **Call the orchestrate tool** with
|
|
664
|
+
6. **Call the orchestrate tool** with ALL fields in a SINGLE call:
|
|
665
|
+
- title, description, goals, requirements, constraints (project metadata)
|
|
666
|
+
- tasks (array of ALL task objects with title, description, agent, dependencies)
|
|
667
|
+
|
|
668
|
+
⚠️ CRITICAL: Include the \`tasks\` array in the SAME tool call as the project metadata. Do NOT make separate calls. All data must be in ONE orchestrate() invocation.`
|
|
653
669
|
);
|
|
654
670
|
},
|
|
655
671
|
});
|