@kendoo.agentdesk/agentdesk 0.6.3 → 0.6.5
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 +22 -1
- package/package.json +1 -1
- package/prompts/team.md +7 -0
package/cli/team.mjs
CHANGED
|
@@ -122,6 +122,7 @@ export async function runTeam(taskId, opts = {}) {
|
|
|
122
122
|
createInstr += `Create a GitHub issue:\n- Run: gh issue create --title "..." --body "..."\n- After creation, use the returned issue number as the task ID for the rest of the session\n`;
|
|
123
123
|
}
|
|
124
124
|
createInstr += `\nTask description: ${description}\n`;
|
|
125
|
+
createInstr += `\nIMPORTANT: After creating the task, Jane MUST immediately announce the new task ID on its own line in this exact format:\nTASK_ID: <identifier>\nExample: TASK_ID: KEN-530\nThis is required so the session can be linked to the correct task.\n`;
|
|
125
126
|
prompt += createInstr;
|
|
126
127
|
}
|
|
127
128
|
|
|
@@ -157,9 +158,11 @@ export async function runTeam(taskId, opts = {}) {
|
|
|
157
158
|
const AGENTDESK_URL = process.env.AGENTDESK_URL || "wss://agentdesk.live/ws/agent";
|
|
158
159
|
const sessionId = `${taskId}-${randomUUID().slice(0, 8)}`;
|
|
159
160
|
const inboxUrl = `${agentdeskServer}/api/sessions/${sessionId}/inbox`;
|
|
161
|
+
const sessionUrl = `${agentdeskServer}/sessions/${sessionId}`;
|
|
160
162
|
|
|
161
|
-
// Inject
|
|
163
|
+
// Inject URLs into prompt
|
|
162
164
|
prompt = prompt.replace(/\{\{AGENTDESK_INBOX_URL\}\}/g, inboxUrl);
|
|
165
|
+
prompt = prompt.replace(/\{\{SESSION_URL\}\}/g, sessionUrl);
|
|
163
166
|
|
|
164
167
|
// Merge declared agents from config into project for context generation
|
|
165
168
|
if (config.projectAgents?.length) {
|
|
@@ -355,6 +358,24 @@ export async function runTeam(taskId, opts = {}) {
|
|
|
355
358
|
continue;
|
|
356
359
|
}
|
|
357
360
|
|
|
361
|
+
// Detect TASK_ID announcement from Jane
|
|
362
|
+
const taskIdMatch = text.match(/TASK_ID:\s*(\S+)/);
|
|
363
|
+
if (taskIdMatch && createTask) {
|
|
364
|
+
const newTaskId = taskIdMatch[1];
|
|
365
|
+
taskId = newTaskId;
|
|
366
|
+
// Build task link for the real task
|
|
367
|
+
if (tracker === "linear" && config.linear?.workspace) {
|
|
368
|
+
taskLink = `https://linear.app/${config.linear.workspace}/issue/${newTaskId}`;
|
|
369
|
+
} else if (tracker === "jira" && config.jira?.baseUrl) {
|
|
370
|
+
taskLink = `${config.jira.baseUrl}/browse/${newTaskId}`;
|
|
371
|
+
} else if (tracker === "github") {
|
|
372
|
+
const repo = config.github?.repo || "";
|
|
373
|
+
if (repo) taskLink = `https://github.com/${repo}/issues/${newTaskId}`;
|
|
374
|
+
}
|
|
375
|
+
console.log(`\n # Task: ${newTaskId}${taskLink ? ` (${taskLink})` : ""}\n`);
|
|
376
|
+
vizSend({ type: "session:update", taskId: newTaskId, taskLink, title: description || newTaskId });
|
|
377
|
+
}
|
|
378
|
+
|
|
358
379
|
const textLines = text.split("\n");
|
|
359
380
|
let i = 0;
|
|
360
381
|
while (i < textLines.length) {
|
package/package.json
CHANGED
package/prompts/team.md
CHANGED
|
@@ -274,8 +274,11 @@ Post updates as comments on the Linear task using this format:
|
|
|
274
274
|
■■ DENNIS ■■
|
|
275
275
|
Status : [status]
|
|
276
276
|
Task : [description]
|
|
277
|
+
Session : {{SESSION_URL}}
|
|
277
278
|
---
|
|
278
279
|
```
|
|
280
|
+
|
|
281
|
+
IMPORTANT: The first comment on any task MUST include the session link: {{SESSION_URL}}
|
|
279
282
|
{{/LINEAR}}
|
|
280
283
|
|
|
281
284
|
{{#JIRA}}
|
|
@@ -289,6 +292,8 @@ Fetch the task from Jira using curl:
|
|
|
289
292
|
Post updates as comments on the Jira task:
|
|
290
293
|
- Endpoint: {{JIRA_BASE_URL}}/rest/api/3/issue/{{TASK_ID}}/comment
|
|
291
294
|
- Body: { "body": { "type": "doc", "version": 1, "content": [{ "type": "paragraph", "content": [{ "type": "text", "text": "..." }] }] } }
|
|
295
|
+
|
|
296
|
+
IMPORTANT: The first comment on any task MUST include the session link: {{SESSION_URL}}
|
|
292
297
|
{{/JIRA}}
|
|
293
298
|
|
|
294
299
|
{{#GITHUB}}
|
|
@@ -299,6 +304,8 @@ Fetch the task from GitHub Issues:
|
|
|
299
304
|
|
|
300
305
|
Post updates as comments:
|
|
301
306
|
- Run: gh issue comment {{TASK_ID}} --body "..."
|
|
307
|
+
|
|
308
|
+
IMPORTANT: The first comment on any task MUST include the session link: {{SESSION_URL}}
|
|
302
309
|
{{/GITHUB}}
|
|
303
310
|
|
|
304
311
|
---
|