@kendoo.agentdesk/agentdesk 0.10.2 → 0.10.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.
@@ -87,7 +87,7 @@ export async function runOrchestrator({
87
87
  child.stdin.end();
88
88
 
89
89
  const { parseLine } = createStreamParser({
90
- teamNames: teamSections.names,
90
+ teamNames: soloAgent ? [soloAgent] : teamSections.names,
91
91
  callbacks: {
92
92
  onPhaseChange({ phase }) { emit({ type: "phase:change", phase }); },
93
93
  onAgentMessage({ agent, tag, message }) { emit({ type: "agent:message", agent, tag, message }); },
package/cli/prompt.mjs CHANGED
@@ -137,7 +137,7 @@ export function buildSoloPrompt({ agentName, taskId, description, tracker, confi
137
137
  }
138
138
 
139
139
  // Extract and include tracker integration from team prompt
140
- if (tracker && taskId) {
140
+ if (tracker) {
141
141
  let teamPrompt = readFileSync(PROMPT_PATH, "utf-8");
142
142
 
143
143
  // Extract the matching tracker block
@@ -150,24 +150,98 @@ export function buildSoloPrompt({ agentName, taskId, description, tracker, confi
150
150
  }
151
151
 
152
152
  if (trackerSection) {
153
- // Substitute variables
154
- trackerSection = trackerSection.replace(/\{\{TASK_ID\}\}/g, taskId);
153
+ // Substitute variables — use task ID if we have a real one
154
+ const hasRealTaskId = taskId && !taskId.startsWith("new-");
155
+ trackerSection = trackerSection.replace(/\{\{TASK_ID\}\}/g, hasRealTaskId ? taskId : "TBD");
155
156
  trackerSection = trackerSection.replace(/\{\{SESSION_URL\}\}/g, sessionUrl || "");
156
157
  if (config.jira?.baseUrl) {
157
158
  trackerSection = trackerSection.replace(/\{\{JIRA_BASE_URL\}\}/g, config.jira.baseUrl.replace(/\/+$/, ""));
158
159
  }
160
+ // Replace hardcoded "Jane" references from team prompt with the solo agent name
161
+ trackerSection = trackerSection.replace(/\bJane\b/g, agentName);
159
162
  lines.push(trackerSection);
160
163
  }
161
164
 
162
- lines.push(
163
- `## Required tracker actions`,
164
- ``,
165
- `1. Fetch the task — read summary, description, status, comments, attachments.`,
166
- `2. Post a comment: "${agentName} working on this task (solo mode). Session: ${sessionUrl || ""}"`,
167
- `3. Do your work.`,
168
- `4. Post a final comment summarizing what was done, what was omitted, and any manual steps required.`,
169
- ``,
170
- );
165
+ const hasRealTaskId = taskId && !taskId.startsWith("new-");
166
+
167
+ if (hasRealTaskId) {
168
+ lines.push(
169
+ `## Required tracker actions`,
170
+ ``,
171
+ `1. Fetch the task read summary, description, status, comments, attachments.`,
172
+ `2. Post a comment: "${agentName} working on this task (solo mode). Session: ${sessionUrl || ""}"`,
173
+ `3. Do your work.`,
174
+ `4. Post a final comment summarizing what was done, what was omitted, and any manual steps required.`,
175
+ ``,
176
+ );
177
+ } else {
178
+ // No task ID provided — search tracker for a related task or create one
179
+ let searchInstr = "";
180
+ if (tracker === "linear") {
181
+ searchInstr = `Search Linear for an existing issue related to the task description using the GraphQL API:
182
+ - Endpoint: https://api.linear.app/graphql
183
+ - Auth: Authorization: $LINEAR_API_KEY
184
+ - Search by keywords from the description. Look for open/in-progress issues that match.`;
185
+ } else if (tracker === "jira") {
186
+ const baseUrl = (config.jira?.baseUrl || "").replace(/\/+$/, "");
187
+ searchInstr = `Search Jira for an existing issue related to the task description:
188
+ - Endpoint: ${baseUrl}/rest/api/3/search
189
+ - Auth: Basic auth with $JIRA_EMAIL and $JIRA_API_TOKEN
190
+ - Use JQL to search by text/summary matching keywords from the description. Look for open/in-progress issues.`;
191
+ } else if (tracker === "github") {
192
+ searchInstr = `Search GitHub for an existing issue related to the task description:
193
+ - Run: gh issue list --search "<keywords from description>" --state open
194
+ - Look for issues that match the task description.`;
195
+ }
196
+
197
+ let createInstr = "";
198
+ if (tracker === "linear") {
199
+ createInstr = `Create a Linear issue using the GraphQL API:
200
+ - Endpoint: https://api.linear.app/graphql
201
+ - Auth: Authorization: $LINEAR_API_KEY
202
+ - Set the title based on the description.`;
203
+ } else if (tracker === "jira") {
204
+ const baseUrl = (config.jira?.baseUrl || "").replace(/\/+$/, "");
205
+ createInstr = `Create a Jira issue:
206
+ - Endpoint: ${baseUrl}/rest/api/3/issue
207
+ - Auth: Basic auth with $JIRA_EMAIL and $JIRA_API_TOKEN
208
+ - Set the summary based on the description.`;
209
+ } else if (tracker === "github") {
210
+ createInstr = `Create a GitHub issue:
211
+ - Run: gh issue create --title "..." --body "..."`;
212
+ }
213
+
214
+ lines.push(
215
+ `## Required tracker actions (MANDATORY — FIRST ACTIONS)`,
216
+ ``,
217
+ `### Step 1: Find or create a task`,
218
+ ``,
219
+ searchInstr,
220
+ ``,
221
+ `If you find a matching task:`,
222
+ `- Use that task ID for the rest of the session.`,
223
+ `- Read its full description, comments, and attachments for context.`,
224
+ ``,
225
+ `If no matching task is found, create one:`,
226
+ ``,
227
+ createInstr,
228
+ ``,
229
+ `After finding or creating the task, output the ID on its own line:`,
230
+ `TASK_ID: <identifier>`,
231
+ ``,
232
+ `### Step 2: Post session start`,
233
+ ``,
234
+ `Post a comment on the task: "${agentName} working on this (solo mode). Session: ${sessionUrl || ""}"`,
235
+ `Set the task status to "In Progress".`,
236
+ ``,
237
+ `### Step 3: Do your work`,
238
+ ``,
239
+ `### Step 4: Post summary`,
240
+ ``,
241
+ `Post a final comment on the task summarizing what was done, what was omitted, and any manual steps required.`,
242
+ ``,
243
+ );
244
+ }
171
245
  }
172
246
 
173
247
  // Add custom instructions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kendoo.agentdesk/agentdesk",
3
- "version": "0.10.2",
3
+ "version": "0.10.4",
4
4
  "description": "AI team orchestrator for Claude Code — run collaborative agent sessions from your terminal",
5
5
  "type": "module",
6
6
  "bin": {