@slock-ai/daemon 0.10.0 → 0.12.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/dist/chat-bridge.js +9 -8
- package/dist/index.js +25 -9
- package/package.json +1 -1
package/dist/chat-bridge.js
CHANGED
|
@@ -250,7 +250,7 @@ server.tool(
|
|
|
250
250
|
"List tasks on a channel's task board. Returns tasks with their number (#t1, #t2...), title, status, and assignee.",
|
|
251
251
|
{
|
|
252
252
|
channel: z.string().describe("The channel whose task board to view \u2014 e.g. '#engineering', '#proj-slock'"),
|
|
253
|
-
status: z.enum(["all", "
|
|
253
|
+
status: z.enum(["all", "todo", "in_progress", "in_review", "done"]).default("all").describe("Filter by status (default: all)")
|
|
254
254
|
},
|
|
255
255
|
async ({ channel, status }) => {
|
|
256
256
|
try {
|
|
@@ -420,20 +420,21 @@ server.tool(
|
|
|
420
420
|
}
|
|
421
421
|
);
|
|
422
422
|
server.tool(
|
|
423
|
-
"
|
|
424
|
-
"
|
|
423
|
+
"update_task_status",
|
|
424
|
+
"Update a task's progress status. Valid transitions: todo\u2192in_progress, in_progress\u2192in_review, in_progress\u2192done, in_review\u2192done, in_review\u2192in_progress. You must be the assignee (except in_review\u2192done which anyone can do).",
|
|
425
425
|
{
|
|
426
426
|
channel: z.string().describe("The channel \u2014 e.g. '#engineering'"),
|
|
427
|
-
task_number: z.number().describe("The task number to
|
|
427
|
+
task_number: z.number().describe("The task number to update (e.g. 3)"),
|
|
428
|
+
status: z.enum(["todo", "in_progress", "in_review", "done"]).describe("The new status")
|
|
428
429
|
},
|
|
429
|
-
async ({ channel, task_number }) => {
|
|
430
|
+
async ({ channel, task_number, status }) => {
|
|
430
431
|
try {
|
|
431
432
|
const res = await fetch(
|
|
432
|
-
`${serverUrl}/internal/agent/${agentId}/tasks/
|
|
433
|
+
`${serverUrl}/internal/agent/${agentId}/tasks/update-status`,
|
|
433
434
|
{
|
|
434
435
|
method: "POST",
|
|
435
436
|
headers: commonHeaders,
|
|
436
|
-
body: JSON.stringify({ channel, task_number })
|
|
437
|
+
body: JSON.stringify({ channel, task_number, status })
|
|
437
438
|
}
|
|
438
439
|
);
|
|
439
440
|
const data = await res.json();
|
|
@@ -444,7 +445,7 @@ server.tool(
|
|
|
444
445
|
}
|
|
445
446
|
return {
|
|
446
447
|
content: [
|
|
447
|
-
{ type: "text", text: `#t${task_number}
|
|
448
|
+
{ type: "text", text: `#t${task_number} moved to ${status}.` }
|
|
448
449
|
]
|
|
449
450
|
};
|
|
450
451
|
} catch (err) {
|
package/dist/index.js
CHANGED
|
@@ -126,7 +126,7 @@ You have MCP tools from the "chat" server. Use ONLY these for communication:
|
|
|
126
126
|
6. **${t("create_tasks")}** \u2014 Create tasks on a channel's task board (supports batch).
|
|
127
127
|
7. **${t("claim_tasks")}** \u2014 Claim tasks by number (supports batch, handles conflicts).
|
|
128
128
|
8. **${t("unclaim_task")}** \u2014 Release your claim on a task.
|
|
129
|
-
9. **${t("
|
|
129
|
+
9. **${t("update_task_status")}** \u2014 Change a task's status (e.g. to in_review or done).
|
|
130
130
|
|
|
131
131
|
CRITICAL RULES:
|
|
132
132
|
${criticalRules.join("\n")}
|
|
@@ -175,16 +175,29 @@ Each channel has a **name** and optionally a **description** that define its pur
|
|
|
175
175
|
|
|
176
176
|
### Task boards
|
|
177
177
|
|
|
178
|
-
Each channel has a task board
|
|
178
|
+
Each channel has a task board with two independent dimensions: **status** (progress) and **assignee** (who's doing it).
|
|
179
179
|
|
|
180
|
+
**Status** (progress): \`todo\` \u2192 \`in_progress\` \u2192 \`in_review\` \u2192 \`done\`
|
|
181
|
+
- **todo**: Task exists, not started yet.
|
|
182
|
+
- **in_progress**: Actively being worked on.
|
|
183
|
+
- **in_review**: Work is done, awaiting human validation. Humans can see which tasks need their attention.
|
|
184
|
+
- **done**: Accepted and finished. These are collapsed in the UI.
|
|
185
|
+
|
|
186
|
+
**Assignee** is independent from status \u2014 you can claim/unclaim at any status (except done).
|
|
187
|
+
|
|
188
|
+
**Tools:**
|
|
180
189
|
- **View tasks**: \`list_tasks(channel="#channel-name")\` \u2014 see all tasks with status and assignee.
|
|
181
|
-
- **Create tasks**: \`create_tasks(channel="#channel-name", tasks=[{title: "..."}, ...])\` \u2014 create one or more tasks.
|
|
182
|
-
- **Claim tasks**: \`claim_tasks(channel="#channel-name", task_numbers=[1, 3])\` \u2014
|
|
183
|
-
- **Unclaim**: \`unclaim_task(channel="#channel-name", task_number=3)\` \u2014
|
|
184
|
-
- **
|
|
190
|
+
- **Create tasks**: \`create_tasks(channel="#channel-name", tasks=[{title: "..."}, ...])\` \u2014 create one or more tasks.
|
|
191
|
+
- **Claim tasks**: \`claim_tasks(channel="#channel-name", task_numbers=[1, 3])\` \u2014 assign yourself. If the task is \`todo\`, it auto-advances to \`in_progress\`. If another agent already claimed it, your claim fails.
|
|
192
|
+
- **Unclaim**: \`unclaim_task(channel="#channel-name", task_number=3)\` \u2014 remove your assignment. Does not change progress status.
|
|
193
|
+
- **Update status**: \`update_task_status(channel="#channel-name", task_number=3, status="in_review")\` \u2014 move a task to a new status. Valid transitions: todo\u2192in_progress, in_progress\u2192in_review, in_progress\u2192done, in_review\u2192done, in_review\u2192in_progress.
|
|
185
194
|
|
|
186
195
|
**CRITICAL: You MUST claim a task before starting work on it.** Never begin working on a task without claiming it first. The claim mechanism prevents multiple agents from doing the same work. If your claim fails (someone else claimed it), move on to another task.
|
|
187
196
|
|
|
197
|
+
**IMPORTANT: When you finish a task, use \`update_task_status(..., status="in_review")\`.** This gives humans a chance to validate your work before it's marked as done. Only set status to \`done\` directly for trivial tasks that don't need review.
|
|
198
|
+
|
|
199
|
+
**IMPORTANT: After someone approves your work** (e.g. says "merge it", "looks good", "approved", "review passed"), **you must set the task to \`done\` yourself** if the reviewer doesn't do it. Don't leave tasks in \`in_review\` after they've been approved.
|
|
200
|
+
|
|
188
201
|
### Splitting tasks for parallel execution
|
|
189
202
|
|
|
190
203
|
When you need to break down a large task into subtasks, structure them so agents can work **in parallel**:
|
|
@@ -356,7 +369,8 @@ var ClaudeDriver = class {
|
|
|
356
369
|
const proc = spawn("claude", args2, {
|
|
357
370
|
cwd: ctx.workingDirectory,
|
|
358
371
|
stdio: ["pipe", "pipe", "pipe"],
|
|
359
|
-
env: spawnEnv
|
|
372
|
+
env: spawnEnv,
|
|
373
|
+
shell: process.platform === "win32"
|
|
360
374
|
});
|
|
361
375
|
const stdinMsg = JSON.stringify({
|
|
362
376
|
type: "user",
|
|
@@ -531,7 +545,8 @@ var CodexDriver = class {
|
|
|
531
545
|
const proc = spawn2("codex", args2, {
|
|
532
546
|
cwd: ctx.workingDirectory,
|
|
533
547
|
stdio: ["pipe", "pipe", "pipe"],
|
|
534
|
-
env: spawnEnv
|
|
548
|
+
env: spawnEnv,
|
|
549
|
+
shell: process.platform === "win32"
|
|
535
550
|
});
|
|
536
551
|
return { process: proc };
|
|
537
552
|
}
|
|
@@ -1189,9 +1204,10 @@ var require2 = createRequire(import.meta.url);
|
|
|
1189
1204
|
var DAEMON_VERSION = require2("../package.json").version;
|
|
1190
1205
|
function detectRuntimes() {
|
|
1191
1206
|
const detected = [];
|
|
1207
|
+
const cmd = process.platform === "win32" ? "where" : "which";
|
|
1192
1208
|
for (const rt of RUNTIMES) {
|
|
1193
1209
|
try {
|
|
1194
|
-
execSync2(
|
|
1210
|
+
execSync2(`${cmd} ${rt.binary}`, { stdio: "pipe" });
|
|
1195
1211
|
detected.push(rt.id);
|
|
1196
1212
|
} catch {
|
|
1197
1213
|
}
|