@kendoo.agentdesk/agentdesk 0.11.3 → 0.11.4

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/agents.mjs CHANGED
@@ -5,7 +5,7 @@ export const BUILT_IN_AGENTS = {
5
5
  badge: "●● JANE ●●",
6
6
  role: "Product Analyst / Team Lead",
7
7
  description: "leads the session, clarifies requirements, coordinates the team, manages tracker status, decomposes large tasks into subtasks",
8
- groundRules: "Jane focuses on requirements, scope, and coordination — she does not read code. She creates tracker tasks when needed, manages status transitions, posts the session start/end comments, and decomposes large features into subtasks (basic vs deferred).",
8
+ groundRules: "Jane focuses on requirements, scope, and coordination — she does NOT read code, inspect functions, or reference technical implementation details (no file names, function names, variable names, or code snippets). She speaks from a product perspective: user impact, acceptance criteria, scope decisions. She creates tracker tasks when needed, manages status transitions, posts the session start/end comments, and decomposes large features into subtasks (basic vs deferred).",
9
9
  planning: "Requirements: what we're building, acceptance criteria, scope. Flags UI tasks for Luna.",
10
10
  execution: {
11
11
  step: "Jane wraps up",
package/cli/daemon.mjs CHANGED
@@ -381,15 +381,53 @@ export async function runDaemon() {
381
381
  cwd: project.path,
382
382
  apiKey,
383
383
  serverUrl: agentdeskServer,
384
- onEvent(event) {
385
- // Skip events after cancellation to prevent double session:end
386
- if (!activeSession || activeSession.sessionId !== sessionId) return;
387
- sendBuffered(sessionId, event);
388
- if (event.type === "tool:use" && event.description) {
389
- const pathMatch = event.description.match(/(?:Reading|Editing|Writing)\s+(.+)/);
390
- if (pathMatch) filePathsTouched.add(pathMatch[1]);
384
+ onEvent: (() => {
385
+ // Stagger agent messages for real-time feel, flush on non-message events
386
+ const MSG_STAGGER_MS = 400;
387
+ let msgQueue = [];
388
+ let staggerTimer = null;
389
+
390
+ function flushQueue() {
391
+ clearTimeout(staggerTimer);
392
+ staggerTimer = null;
393
+ for (const queued of msgQueue) sendBuffered(sessionId, queued);
394
+ msgQueue = [];
391
395
  }
392
- },
396
+
397
+ function drainNext() {
398
+ if (msgQueue.length === 0) { staggerTimer = null; return; }
399
+ sendBuffered(sessionId, msgQueue.shift());
400
+ if (msgQueue.length > 0) {
401
+ staggerTimer = setTimeout(drainNext, MSG_STAGGER_MS);
402
+ } else {
403
+ staggerTimer = null;
404
+ }
405
+ }
406
+
407
+ return (event) => {
408
+ if (!activeSession || activeSession.sessionId !== sessionId) return;
409
+
410
+ if (event.type === "agent:message") {
411
+ msgQueue.push(event);
412
+ // First message sends immediately, rest are staggered
413
+ if (!staggerTimer && msgQueue.length === 1) {
414
+ sendBuffered(sessionId, msgQueue.shift());
415
+ if (msgQueue.length > 0) {
416
+ staggerTimer = setTimeout(drainNext, MSG_STAGGER_MS);
417
+ }
418
+ }
419
+ } else {
420
+ // Non-message event: flush all queued messages first, then send this event
421
+ if (msgQueue.length > 0) flushQueue();
422
+ sendBuffered(sessionId, event);
423
+ }
424
+
425
+ if (event.type === "tool:use" && event.description) {
426
+ const pathMatch = event.description.match(/(?:Reading|Editing|Writing)\s+(.+)/);
427
+ if (pathMatch) filePathsTouched.add(pathMatch[1]);
428
+ }
429
+ };
430
+ })(),
393
431
  });
394
432
 
395
433
  console.log(` ${green}Session complete${reset} ${dim}${sessionId}${reset} (${result.duration}, ${result.steps} steps)`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kendoo.agentdesk/agentdesk",
3
- "version": "0.11.3",
3
+ "version": "0.11.4",
4
4
  "description": "AI team orchestrator for Claude Code — run collaborative agent sessions from your terminal",
5
5
  "type": "module",
6
6
  "bin": {