@phi-code-admin/phi-code 0.61.8 → 0.61.10

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.
@@ -353,9 +353,9 @@ export default function orchestratorExtension(pi: ExtensionAPI) {
353
353
  parameters: Type.Object({
354
354
  title: Type.String({ description: "Concise project title" }),
355
355
  description: Type.String({ description: "Full project description: what to build, why, and any relevant context" }),
356
- goals: Type.Array(Type.String(), { description: "Measurable project goals (what success looks like)" }),
357
- requirements: Type.Array(Type.String(), { description: "Technical and functional requirements" }),
358
- architecture: Type.Optional(Type.Array(Type.String(), { description: "Architecture decisions, tech stack choices, trade-offs" })),
356
+ goals: Type.Union([Type.Array(Type.String()), Type.String()], { description: "Measurable project goals (what success looks like)" }),
357
+ requirements: Type.Union([Type.Array(Type.String()), Type.String()], { description: "Technical and functional requirements" }),
358
+ architecture: Type.Optional(Type.Union([Type.Array(Type.String()), Type.String()], { description: "Architecture decisions, tech stack choices, trade-offs" })),
359
359
  tasks: Type.Array(
360
360
  Type.Object({
361
361
  title: Type.String({ description: "Clear, action-oriented task title" }),
@@ -367,14 +367,30 @@ export default function orchestratorExtension(pi: ExtensionAPI) {
367
367
  }),
368
368
  { description: "Ordered list of tasks. Independent tasks run in parallel. Dependent tasks wait for prerequisites." }
369
369
  ),
370
- constraints: Type.Optional(Type.Array(Type.String(), { description: "Hard constraints: frameworks, patterns, rules, things to avoid" })),
371
- successCriteria: Type.Optional(Type.Array(Type.String(), { description: "How to verify the project is complete and correct" })),
370
+ constraints: Type.Optional(Type.Union([Type.Array(Type.String()), Type.String()], { description: "Hard constraints: frameworks, patterns, rules, things to avoid" })),
371
+ successCriteria: Type.Optional(Type.Union([Type.Array(Type.String()), Type.String()], { description: "How to verify the project is complete and correct" })),
372
372
  }),
373
373
 
374
374
  async execute(_toolCallId, params, _signal, _onUpdate, ctx) {
375
- const p = params as {
376
- title: string; description: string; goals: string[]; requirements: string[];
377
- architecture?: string[]; tasks: TaskDef[]; constraints?: string[]; successCriteria?: string[];
375
+ const raw = params as any;
376
+
377
+ // Normalize string fields to arrays (some models send strings instead of arrays)
378
+ const toArray = (v: any): string[] => {
379
+ if (!v) return [];
380
+ if (Array.isArray(v)) return v;
381
+ if (typeof v === "string") return v.split("\n").map((s: string) => s.replace(/^[-•*]\s*/, "").trim()).filter(Boolean);
382
+ return [];
383
+ };
384
+
385
+ const p = {
386
+ title: raw.title as string,
387
+ description: raw.description as string,
388
+ goals: toArray(raw.goals),
389
+ requirements: toArray(raw.requirements),
390
+ architecture: raw.architecture ? toArray(raw.architecture) : undefined,
391
+ tasks: raw.tasks as TaskDef[],
392
+ constraints: raw.constraints ? toArray(raw.constraints) : undefined,
393
+ successCriteria: raw.successCriteria ? toArray(raw.successCriteria) : undefined,
378
394
  };
379
395
 
380
396
  try {
@@ -482,7 +498,7 @@ export default function orchestratorExtension(pi: ExtensionAPI) {
482
498
 
483
499
  ctx.ui.notify(`\n${phase.label} (agent: ${phase.agent})...`, "info");
484
500
 
485
- pi.sendUserMessage(phase.instruction + systemPromptNote);
501
+ pi.sendUserMessage(phase.instruction + systemPromptNote, { deliverAs: "followUp" });
486
502
  await ctx.waitForIdle();
487
503
  }
488
504
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phi-code-admin/phi-code",
3
- "version": "0.61.8",
3
+ "version": "0.61.10",
4
4
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "piConfig": {