@kendoo.agentdesk/agentdesk 0.3.1 → 0.4.0
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/README.md +6 -6
- package/bin/agentdesk.mjs +28 -20
- package/cli/team.mjs +50 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,17 +42,17 @@ This detects your project, asks which task tracker you use (Linear, Jira, GitHub
|
|
|
42
42
|
|
|
43
43
|
### 4. Run a team session
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
Work on an existing task:
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
48
|
agentdesk team KEN-517
|
|
49
|
-
agentdesk team BUG-42 -d "Fix the checkout total calculation"
|
|
50
49
|
```
|
|
51
50
|
|
|
52
|
-
|
|
51
|
+
Or just describe what you want — a task is created automatically:
|
|
53
52
|
|
|
54
53
|
```bash
|
|
55
|
-
agentdesk team
|
|
54
|
+
agentdesk team -d "Fix the checkout total calculation"
|
|
55
|
+
agentdesk team -d "Add Google OAuth to the login page"
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
Open [agentdesk.live](https://agentdesk.live) to watch the session live.
|
|
@@ -102,8 +102,8 @@ AgentDesk also auto-discovers agents from `.claude/agents/`, `.claude/commands/`
|
|
|
102
102
|
agentdesk login Sign in to AgentDesk
|
|
103
103
|
agentdesk logout Sign out and remove credentials
|
|
104
104
|
agentdesk init Set up project and configure tracker
|
|
105
|
-
agentdesk team <TASK-ID> Run a team session on
|
|
106
|
-
agentdesk team
|
|
105
|
+
agentdesk team <TASK-ID> Run a team session on an existing task
|
|
106
|
+
agentdesk team -d "..." Describe what you want — task created automatically
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
### Options
|
package/bin/agentdesk.mjs
CHANGED
|
@@ -18,22 +18,25 @@ if (!command || command === "help" || command === "--help") {
|
|
|
18
18
|
agentdesk login Sign in to AgentDesk
|
|
19
19
|
agentdesk logout Sign out and remove credentials
|
|
20
20
|
agentdesk init Set up project and configure tracker
|
|
21
|
-
agentdesk team <TASK-ID> Run a team session on
|
|
22
|
-
agentdesk team
|
|
21
|
+
agentdesk team <TASK-ID> Run a team session on an existing task
|
|
22
|
+
agentdesk team -d "..." Create a task and run a session
|
|
23
23
|
|
|
24
24
|
Options:
|
|
25
25
|
--description, -d Task description or requirements
|
|
26
26
|
--cwd Working directory (defaults to current)
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
agentdesk team
|
|
28
|
+
How it works:
|
|
29
|
+
With a tracker (Linear, Jira, GitHub Issues):
|
|
30
|
+
agentdesk team KEN-517 Work on an existing task
|
|
31
|
+
agentdesk team -d "Fix login bug" Create a new task, then work on it
|
|
32
|
+
|
|
33
|
+
Without a tracker:
|
|
34
|
+
agentdesk team -d "Add dark mode" Describe what you want
|
|
32
35
|
|
|
33
36
|
Examples:
|
|
34
37
|
agentdesk team KEN-517
|
|
35
|
-
agentdesk team
|
|
36
|
-
agentdesk team
|
|
38
|
+
agentdesk team -d "Fix the checkout total calculation"
|
|
39
|
+
agentdesk team -d "Add Google OAuth to the login page"
|
|
37
40
|
|
|
38
41
|
Dashboard: https://agentdesk.live
|
|
39
42
|
`);
|
|
@@ -56,23 +59,28 @@ else if (command === "init") {
|
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
else if (command === "team") {
|
|
59
|
-
|
|
60
|
-
if (!taskId) {
|
|
61
|
-
console.error("Usage: agentdesk team <TASK-ID>");
|
|
62
|
-
process.exit(1);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// Parse options
|
|
62
|
+
// Parse options first to find -d and --cwd
|
|
66
63
|
let description = "";
|
|
67
64
|
let cwd = process.cwd();
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
65
|
+
let taskId = null;
|
|
66
|
+
const remaining = args.slice(1);
|
|
67
|
+
|
|
68
|
+
for (let i = 0; i < remaining.length; i++) {
|
|
69
|
+
if ((remaining[i] === "--description" || remaining[i] === "-d") && remaining[i + 1]) {
|
|
70
|
+
description = remaining[++i];
|
|
71
|
+
} else if (remaining[i] === "--cwd" && remaining[i + 1]) {
|
|
72
|
+
cwd = remaining[++i];
|
|
73
|
+
} else if (!taskId && !remaining[i].startsWith("-")) {
|
|
74
|
+
taskId = remaining[i];
|
|
73
75
|
}
|
|
74
76
|
}
|
|
75
77
|
|
|
78
|
+
if (!taskId && !description) {
|
|
79
|
+
console.error("Usage: agentdesk team <TASK-ID>");
|
|
80
|
+
console.error(" or: agentdesk team -d \"description\"");
|
|
81
|
+
process.exit(1);
|
|
82
|
+
}
|
|
83
|
+
|
|
76
84
|
const { runTeam } = await import("../cli/team.mjs");
|
|
77
85
|
const code = await runTeam(taskId, { description, cwd });
|
|
78
86
|
process.exit(code);
|
package/cli/team.mjs
CHANGED
|
@@ -36,19 +36,44 @@ export async function runTeam(taskId, opts = {}) {
|
|
|
36
36
|
// Detect project and load config
|
|
37
37
|
const project = detectProject(cwd);
|
|
38
38
|
const config = loadConfig(cwd);
|
|
39
|
-
console.log(`Project: ${project.name || "unknown"} (${project.label})`);
|
|
40
|
-
console.log(`Task: ${taskId}`);
|
|
41
|
-
|
|
42
|
-
// Determine tracker and build task link
|
|
43
39
|
const tracker = config.tracker || (project.hasLinear ? "linear" : null);
|
|
40
|
+
|
|
41
|
+
// If no task ID, handle based on tracker
|
|
42
|
+
let createTask = false;
|
|
43
|
+
if (!taskId) {
|
|
44
|
+
if (tracker) {
|
|
45
|
+
// Tracker configured but no task ID — agents will create a task
|
|
46
|
+
createTask = true;
|
|
47
|
+
taskId = `new-${Date.now().toString(36)}`;
|
|
48
|
+
console.log(`Project: ${project.name || "unknown"} (${project.label})`);
|
|
49
|
+
console.log(`Mode: Create new ${tracker} task from description`);
|
|
50
|
+
} else {
|
|
51
|
+
// No tracker — generate a label from description
|
|
52
|
+
taskId = description
|
|
53
|
+
.toLowerCase()
|
|
54
|
+
.replace(/[^a-z0-9\s-]/g, "")
|
|
55
|
+
.trim()
|
|
56
|
+
.replace(/\s+/g, "-")
|
|
57
|
+
.slice(0, 40) || `task-${Date.now().toString(36)}`;
|
|
58
|
+
console.log(`Project: ${project.name || "unknown"} (${project.label})`);
|
|
59
|
+
console.log(`Task: ${taskId}`);
|
|
60
|
+
}
|
|
61
|
+
} else {
|
|
62
|
+
console.log(`Project: ${project.name || "unknown"} (${project.label})`);
|
|
63
|
+
console.log(`Task: ${taskId}`);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Build task link (only for existing tasks with a tracker)
|
|
44
67
|
let taskLink = null;
|
|
45
|
-
if (
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
68
|
+
if (!createTask) {
|
|
69
|
+
if (tracker === "linear" && config.linear?.workspace) {
|
|
70
|
+
taskLink = `https://linear.app/${config.linear.workspace}/issue/${taskId}`;
|
|
71
|
+
} else if (tracker === "jira" && config.jira?.baseUrl) {
|
|
72
|
+
taskLink = `${config.jira.baseUrl}/browse/${taskId}`;
|
|
73
|
+
} else if (tracker === "github") {
|
|
74
|
+
const repo = config.github?.repo || "";
|
|
75
|
+
if (repo) taskLink = `https://github.com/${repo}/issues/${taskId}`;
|
|
76
|
+
}
|
|
52
77
|
}
|
|
53
78
|
if (tracker) console.log(`Tracker: ${tracker}`);
|
|
54
79
|
if (taskLink) console.log(`Task: ${taskLink}`);
|
|
@@ -68,6 +93,20 @@ export async function runTeam(taskId, opts = {}) {
|
|
|
68
93
|
prompt = prompt.replace(/\{\{#TASK_DESCRIPTION\}\}[\s\S]*?\{\{\/TASK_DESCRIPTION\}\}/g, "");
|
|
69
94
|
}
|
|
70
95
|
|
|
96
|
+
// Create task instruction — when -d is used without a task ID and a tracker is configured
|
|
97
|
+
if (createTask && description) {
|
|
98
|
+
let createInstr = "\n\n## CREATE TASK\n\nNo task ID was provided. Before starting work, Jane MUST create a new task in the tracker:\n\n";
|
|
99
|
+
if (tracker === "linear") {
|
|
100
|
+
createInstr += `Create a Linear issue using the GraphQL API:\n- Endpoint: https://api.linear.app/graphql\n- Auth: Authorization: $LINEAR_API_KEY\n- Set the title based on the description below\n- After creation, use the returned identifier (e.g., KEN-530) as the task ID for the rest of the session\n`;
|
|
101
|
+
} else if (tracker === "jira") {
|
|
102
|
+
createInstr += `Create a Jira issue:\n- Endpoint: ${config.jira?.baseUrl || ""}/rest/api/3/issue\n- Auth: Basic auth with $JIRA_EMAIL and $JIRA_API_TOKEN\n- Set the summary based on the description below\n- After creation, use the returned key (e.g., PROJ-42) as the task ID for the rest of the session\n`;
|
|
103
|
+
} else if (tracker === "github") {
|
|
104
|
+
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`;
|
|
105
|
+
}
|
|
106
|
+
createInstr += `\nTask description: ${description}\n`;
|
|
107
|
+
prompt += createInstr;
|
|
108
|
+
}
|
|
109
|
+
|
|
71
110
|
// Tracker integration — enable the matching section, strip the rest
|
|
72
111
|
const trackers = ["LINEAR", "JIRA", "GITHUB"];
|
|
73
112
|
for (const t of trackers) {
|