@kendoo.agentdesk/agentdesk 0.6.0 → 0.6.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.
- package/cli/team.mjs +11 -5
- package/package.json +1 -1
- package/prompts/team.md +1 -1
package/cli/team.mjs
CHANGED
|
@@ -273,15 +273,20 @@ export async function runTeam(taskId, opts = {}) {
|
|
|
273
273
|
process.on("SIGTERM", () => { try { child.kill(); } catch {} process.exit(1); });
|
|
274
274
|
|
|
275
275
|
// --- Stream parsing ---
|
|
276
|
-
const PHASE_NAMES = ["BRAINSTORM", "PLANNING", "EXECUTION", "REVIEW"];
|
|
276
|
+
const PHASE_NAMES = ["INTAKE", "BRAINSTORM", "PLANNING", "EXECUTION", "REVIEW"];
|
|
277
|
+
|
|
278
|
+
// Build agent name regex dynamically from resolved team
|
|
279
|
+
const agentNames = teamSections.names.join("|");
|
|
280
|
+
const agentRegex = new RegExp(`^(${agentNames})\\s*[●◆▲■◈☾✦*]*\\s*:?\\s*`, "i");
|
|
277
281
|
|
|
278
282
|
function detectAgent(text) {
|
|
279
283
|
// Strip all badge decoration characters from the start
|
|
280
|
-
const stripped = text.replace(/^[
|
|
281
|
-
const match = stripped.match(
|
|
284
|
+
const stripped = text.replace(/^[●◆▲■◈☾✦*\-─—\s]+/, '');
|
|
285
|
+
const match = stripped.match(agentRegex);
|
|
282
286
|
if (match) {
|
|
283
287
|
const raw = match[1];
|
|
284
|
-
|
|
288
|
+
// Preserve original casing from team config
|
|
289
|
+
const name = teamSections.names.find(n => n.toLowerCase() === raw.toLowerCase()) || raw;
|
|
285
290
|
return { name, rest: stripped.slice(match[0].length) };
|
|
286
291
|
}
|
|
287
292
|
return null;
|
|
@@ -315,7 +320,8 @@ export async function runTeam(taskId, opts = {}) {
|
|
|
315
320
|
.map(n => String(n).padStart(2, "0")).join(":");
|
|
316
321
|
}
|
|
317
322
|
|
|
318
|
-
console.log("\n━━━
|
|
323
|
+
console.log("\n━━━ INTAKE ━━━\n");
|
|
324
|
+
vizSend({ type: "phase:change", phase: "INTAKE" });
|
|
319
325
|
|
|
320
326
|
const rl = createInterface({ input: child.stdout });
|
|
321
327
|
|
package/package.json
CHANGED