claude-code-kanban 4.27.0 → 4.28.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 +72 -44
- package/cli.js +235 -7
- package/lib/claude-dir.js +1 -1
- package/lib/dispatch-groups.js +93 -0
- package/lib/dispatch.js +171 -0
- package/lib/folder-dialog.js +91 -0
- package/lib/net-guard.js +20 -3
- package/lib/session-events.js +22 -2
- package/lib/terminal.js +555 -0
- package/package.json +14 -3
- package/plugin/plugins/claude-code-kanban/.claude-plugin/plugin.json +1 -1
- package/plugin/plugins/claude-code-kanban/monitors.json +6 -0
- package/plugin/plugins/claude-code-kanban/scripts/approval-gate.sh +34 -2
- package/plugin/plugins/claude-code-kanban/scripts/postman.js +7 -2
- package/plugin/plugins/claude-code-kanban/skills/kanban-dispatch/SKILL.md +23 -0
- package/public/app.js +1761 -138
- package/public/index.html +150 -14
- package/public/style.css +772 -53
- package/public/sw.js +2 -1
- package/public/themes.css +84 -80
- package/server.js +240 -18
- package/skill-guides/dispatch.md +72 -0
|
@@ -26,6 +26,10 @@ const SERVER_INFO = path.join(CLAUDE_DIR, '.cck', 'server.json');
|
|
|
26
26
|
// because an enqueue wakes the poll immediately.
|
|
27
27
|
const WAIT_SEC = 120;
|
|
28
28
|
const RETRY_MS = 15000;
|
|
29
|
+
// `--topic dispatch` is the kanban-dispatch inbox: reports from sessions this one started.
|
|
30
|
+
const TOPIC = process.argv.includes('--topic') ? process.argv[process.argv.indexOf('--topic') + 1] : null;
|
|
31
|
+
// A dispatch report is a result, not an instruction, so a late attach still wants it.
|
|
32
|
+
const KEEP_BACKLOG = process.argv.includes('--keep-backlog');
|
|
29
33
|
|
|
30
34
|
if (!SESSION_ID) process.exit(0);
|
|
31
35
|
|
|
@@ -43,11 +47,12 @@ function serverUrl() {
|
|
|
43
47
|
// Once per process, not once per poll: the grant means "follow the board from here on", so
|
|
44
48
|
// the first attach throws away whatever queued up before it. A later reconnect must not
|
|
45
49
|
// discard again -- by then the queue holds events the user is owed.
|
|
46
|
-
let firstAttach =
|
|
50
|
+
let firstAttach = !KEEP_BACKLOG;
|
|
47
51
|
|
|
48
52
|
async function poll(base) {
|
|
49
53
|
const first = firstAttach ? '&first=1' : '';
|
|
50
|
-
const
|
|
54
|
+
const topic = TOPIC ? `&topic=${encodeURIComponent(TOPIC)}` : '';
|
|
55
|
+
const url = `${base}/api/sessions/${encodeURIComponent(SESSION_ID)}/events?wait=${WAIT_SEC}${first}${topic}`;
|
|
51
56
|
const res = await fetch(url, { signal: AbortSignal.timeout((WAIT_SEC + 15) * 1000) });
|
|
52
57
|
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
53
58
|
firstAttach = false;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kanban-dispatch
|
|
3
|
+
description: Dispatch a task to another Claude Code session through the kanban board (cck), fire-and-forget or with a report back. Use when the user asks to dispatch, delegate, or start a session for a task, or to collect or check on a dispatched session's result.
|
|
4
|
+
argument-hint: '<task> [--report] [--group <name>] [--model haiku|sonnet|opus|fable] [--worktree [name]]'
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Kanban dispatch
|
|
8
|
+
|
|
9
|
+
This file only points at the guide. The guide ships with the `claude-code-kanban` binary, so it always matches the commands that binary accepts.
|
|
10
|
+
|
|
11
|
+
Invoking this skill also arms this session's dispatch inbox: when a session you dispatched with `--report` reports or exits, a line arrives here:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
cck:1 dispatch.<succeeded|failed|exited> <dispatch-id> session=<uuid> summary=<text>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Load the guide before running any dispatch command:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
claude-code-kanban skills get dispatch
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Fall back to `npx claude-code-kanban` when the bare binary is not on PATH. If `skills get` is unknown, the installed cck is too old: tell the user to update it, and do not guess commands.
|