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