@kendoo.agentdesk/agentdesk 0.8.1 → 0.8.3

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.
@@ -10,7 +10,12 @@ const PHASE_INSTRUCTIONS = {
10
10
  3. Check for existing PRs: \`gh pr list --search <task-id> --json number,title,state\`
11
11
  4. Explore the codebase briefly to understand what we're working with.
12
12
  5. Summarize: what needs to be done, what already exists, and what the starting point is.
13
- 6. Recommend which phase to start from (BRAINSTORM for new work, EXECUTION if branch exists).`,
13
+ 6. Recommend which phase to start from (BRAINSTORM for new work, EXECUTION if branch exists).
14
+
15
+ IMPORTANT: At the end of your intake summary, you MUST provide a short title for this session on its own line in this exact format:
16
+ SESSION_TITLE: <4-8 word title>
17
+ Example: SESSION_TITLE: Fix checkout total calculation
18
+ This title will be displayed in the dashboard navbar, so keep it short and descriptive.`,
14
19
  },
15
20
 
16
21
  brainstorm: {
@@ -1,8 +1,12 @@
1
1
  // Orchestrator — manages agent sub-sessions across phases
2
2
 
3
3
  import { existsSync, readFileSync } from "fs";
4
- import { join } from "path";
4
+ import { join, dirname } from "path";
5
+ import { fileURLToPath } from "url";
5
6
  import { runAgent } from "./agent-runner.mjs";
7
+
8
+ const __dirname = dirname(fileURLToPath(import.meta.url));
9
+ const CLI_VERSION = JSON.parse(readFileSync(join(__dirname, "../package.json"), "utf-8")).version;
6
10
  import { buildAgentPrompt, getAgentTools } from "./agent-prompts.mjs";
7
11
  import { detectProject, generateContext } from "./detect.mjs";
8
12
 
@@ -125,6 +129,7 @@ export async function runOrchestrator({
125
129
  project: project?.name || null,
126
130
  sessionNumber: 1,
127
131
  agents: teamSections.names,
132
+ cliVersion: CLI_VERSION,
128
133
  });
129
134
 
130
135
  // Build agent lookup
@@ -146,6 +151,13 @@ export async function runOrchestrator({
146
151
  const intakeResult = await spawnAgent("Jane", jane, "intake");
147
152
  state.phaseSummaries.intake = summarizeResults([intakeResult]);
148
153
 
154
+ // Extract short title from Jane's intake (SESSION_TITLE: ...)
155
+ const titleMatch = intakeResult.rawOutput.match(/SESSION_TITLE:\s*(.+)/);
156
+ if (titleMatch) {
157
+ const shortTitle = titleMatch[1].trim().slice(0, 60);
158
+ emit({ type: "session:update", title: shortTitle });
159
+ }
160
+
149
161
  // ===========================
150
162
  // PHASE 2: BRAINSTORM (parallel, 3-5 rounds)
151
163
  // ===========================
@@ -84,6 +84,12 @@ export function createStreamParser({ teamNames, callbacks }) {
84
84
  callbacks.onSessionUpdate?.({ taskId: taskIdMatch[1] });
85
85
  }
86
86
 
87
+ // Detect short title from Jane
88
+ const titleMatch = text.match(/SESSION_TITLE:\s*(.+)/);
89
+ if (titleMatch) {
90
+ callbacks.onSessionUpdate?.({ title: titleMatch[1].trim().slice(0, 60) });
91
+ }
92
+
87
93
  const textLines = text.split("\n");
88
94
  let i = 0;
89
95
  while (i < textLines.length) {
package/cli/team.mjs CHANGED
@@ -3,8 +3,12 @@
3
3
  import { spawn } from "child_process";
4
4
  import { existsSync, readFileSync } from "fs";
5
5
  import { createInterface } from "readline";
6
- import { join } from "path";
6
+ import { join, dirname } from "path";
7
7
  import { randomUUID } from "crypto";
8
+ import { fileURLToPath } from "url";
9
+
10
+ const __dirname = dirname(fileURLToPath(import.meta.url));
11
+ const CLI_VERSION = JSON.parse(readFileSync(join(__dirname, "../package.json"), "utf-8")).version;
8
12
  import WebSocket from "ws";
9
13
  import { detectProject } from "./detect.mjs";
10
14
  import { loadConfig } from "./config.mjs";
@@ -139,6 +143,7 @@ export async function runTeam(taskId, opts = {}) {
139
143
  project: project.name || null,
140
144
  sessionNumber: 1,
141
145
  agents: teamSections.names,
146
+ cliVersion: CLI_VERSION,
142
147
  });
143
148
  sessionStartSent = true;
144
149
  while (vizQueue.length > 0 && vizWs.readyState === WebSocket.OPEN) {
@@ -239,8 +244,11 @@ export async function runTeam(taskId, opts = {}) {
239
244
  console.log(` ${success ? "✓" : "✗"} ${summary}`);
240
245
  vizSend({ type: "tool:result", success, summary });
241
246
  },
242
- onSessionUpdate({ taskId: newTaskId }) {
243
- if (createTask) {
247
+ onSessionUpdate({ taskId: newTaskId, title: newTitle }) {
248
+ if (newTitle) {
249
+ vizSend({ type: "session:update", title: newTitle });
250
+ }
251
+ if (newTaskId && createTask) {
244
252
  taskId = newTaskId;
245
253
  if (tracker === "linear" && config.linear?.workspace) {
246
254
  taskLink = `https://linear.app/${config.linear.workspace}/issue/${newTaskId}`;
@@ -251,7 +259,7 @@ export async function runTeam(taskId, opts = {}) {
251
259
  if (repo) taskLink = `https://github.com/${repo}/issues/${newTaskId}`;
252
260
  }
253
261
  console.log(`\n # Task: ${newTaskId}${taskLink ? ` (${taskLink})` : ""}\n`);
254
- vizSend({ type: "session:update", taskId: newTaskId, taskLink, title: description || newTaskId });
262
+ vizSend({ type: "session:update", taskId: newTaskId, taskLink, title: newTitle || description || newTaskId });
255
263
  }
256
264
  },
257
265
  onSessionEnd({ duration, steps, inputTokens, outputTokens }) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kendoo.agentdesk/agentdesk",
3
- "version": "0.8.1",
3
+ "version": "0.8.3",
4
4
  "description": "AI team orchestrator for Claude Code — run collaborative agent sessions from your terminal",
5
5
  "type": "module",
6
6
  "bin": {
package/prompts/team.md CHANGED
@@ -359,6 +359,11 @@ Based on what you find, Jane determines the starting point:
359
359
  - Branch exists but no PR: Review what's implemented, continue from EXECUTION.
360
360
  - PR exists: Review the PR status, continue accordingly.
361
361
 
362
+ IMPORTANT: At the end of the intake, Jane MUST provide a short title for this session on its own line in this exact format:
363
+ SESSION_TITLE: <4-8 word title>
364
+ Example: SESSION_TITLE: Fix checkout total calculation
365
+ This title is displayed in the dashboard navbar, so keep it short and descriptive.
366
+
362
367
  ---
363
368
 
364
369
  ## BRAINSTORM (3-5 rounds)