@alpacachen/dsh-kanban 1.1.0 → 1.2.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 CHANGED
@@ -18,7 +18,7 @@ Turn a conversation into an actionable plan without copying tasks between your A
18
18
 
19
19
  ## Why dsh-kanban?
20
20
 
21
- - **Plan in conversation** — 13 `kanban_*` tools let the agent create and manage cards, lists, and labels.
21
+ - **Plan in conversation** — 14 `kanban_*` tools let the agent create and manage cards, lists, and labels.
22
22
  - **Stay in control** — edit cards, drag work between lists, reorder your workflow, and filter by priority from the UI.
23
23
  - **Keep projects separate** — every DSH workspace gets its own board and persisted data.
24
24
  - **Feel at home in DSH** — the board follows the active language and theme, including dark mode.
@@ -73,7 +73,7 @@ The plugin makes these tools available automatically in every workspace conversa
73
73
  | Area | Tools |
74
74
  | --- | --- |
75
75
  | Board | `kanban_get` |
76
- | Cards | `kanban_add_card`, `kanban_update_card`, `kanban_delete_card`, `kanban_move_card` |
76
+ | Cards | `kanban_get_card`, `kanban_add_card`, `kanban_update_card`, `kanban_delete_card`, `kanban_move_card` |
77
77
  | Lists | `kanban_add_column`, `kanban_rename_column`, `kanban_delete_column`, `kanban_move_column` |
78
78
  | Labels | `kanban_get_label`, `kanban_add_label`, `kanban_update_label`, `kanban_delete_label` |
79
79
 
package/README.zh.md CHANGED
@@ -18,7 +18,7 @@
18
18
 
19
19
  ## 为什么是 dsh-kanban?
20
20
 
21
- - **在对话里完成规划**:13 个 `kanban_*` 工具让 Agent 能直接管理卡片、列表和标签。
21
+ - **在对话里完成规划**:14 个 `kanban_*` 工具让 Agent 能直接管理卡片、列表和标签。
22
22
  - **一切仍由你掌控**:编辑卡片、跨列拖拽、调整工作流,或按优先级筛选任务。
23
23
  - **项目之间互不干扰**:每个 DSH 工作区都有独立看板,并自动持久化数据。
24
24
  - **自然融入 DSH**:界面跟随当前语言和主题,也支持暗色模式。
@@ -73,7 +73,7 @@ Agent 会直接更新当前看板。之后你可以在界面中继续调整,
73
73
  | 范围 | 工具 |
74
74
  | --- | --- |
75
75
  | 看板 | `kanban_get` |
76
- | 卡片 | `kanban_add_card`、`kanban_update_card`、`kanban_delete_card`、`kanban_move_card` |
76
+ | 卡片 | `kanban_get_card`、`kanban_add_card`、`kanban_update_card`、`kanban_delete_card`、`kanban_move_card` |
77
77
  | 列表 | `kanban_add_column`、`kanban_rename_column`、`kanban_delete_column`、`kanban_move_column` |
78
78
  | 标签 | `kanban_get_label`、`kanban_add_label`、`kanban_update_label`、`kanban_delete_label` |
79
79
 
package/index.js CHANGED
@@ -7,7 +7,7 @@
7
7
  * 职责:
8
8
  * - 按工作区(项目)隔离:boards 以 workspaceId 为键,每个工作区一块独立看板
9
9
  * - 磁盘持久化:经 ctx.fs 写入 <workspaceRoot>/kanban-board-<workspaceId>.json
10
- * - 模型工具:经 ctx.tools.register 注册 8 个 kanban_* 工具
10
+ * - 模型工具:经 ctx.tools.register 注册 14 个 kanban_* 工具
11
11
  * - 浏览器数据层:经 ctx.get('webServer') 注册 /api/kanban 前缀路由
12
12
  *
13
13
  * 数据模型(每工作区):
@@ -156,6 +156,12 @@ export function apply(ctx) {
156
156
  case 'get':
157
157
  return { board: cloneBoard(board), persisted: persisted(), message: 'Board loaded' }
158
158
 
159
+ case 'getCard': {
160
+ const card = cloneBoard(board).cards.find((c) => c.id === str(a.id, ''))
161
+ if (!card) return { error: 'Card not found: ' + str(a.id, '') }
162
+ return { card }
163
+ }
164
+
159
165
  case 'addCard': {
160
166
  const col = findColumn(board, str(a.columnId, '')) || board.columns[0]
161
167
  if (!col) return result({ error: 'No list available' })
@@ -412,6 +418,46 @@ export function apply(ctx) {
412
418
  return runTool('get', args, exec)
413
419
  },
414
420
  },
421
+ {
422
+ name: 'kanban_get_card',
423
+ description: "Read one card's full details (title, note, label, priority) by id from the current project (workspace) board. Use kanban_get first to discover card ids, then this tool to read a card's complete note and fields.",
424
+ parameters: {
425
+ type: 'object',
426
+ properties: {
427
+ id: { type: 'string', description: 'Card id (see kanban_get output)' },
428
+ },
429
+ required: ['id'],
430
+ },
431
+ output: {
432
+ schema: {
433
+ type: 'object',
434
+ properties: {
435
+ ok: { type: 'boolean' },
436
+ message: { type: 'string' },
437
+ card: { type: 'object' },
438
+ },
439
+ required: ['ok', 'message'],
440
+ additionalProperties: false,
441
+ },
442
+ render: (args, value) => {
443
+ const c = value && value.card
444
+ const lines = [String((value && value.message) || '')]
445
+ if (c) {
446
+ lines.push('[' + c.id + '] ' + c.title)
447
+ if (c.priority) lines.push('Priority: ' + c.priority)
448
+ if (c.label) lines.push('Label: ' + c.label)
449
+ if (c.note) lines.push('Note: ' + c.note)
450
+ }
451
+ return [{ type: 'text', text: lines.join('\n') }]
452
+ },
453
+ },
454
+ async execute(args, exec) {
455
+ const wsid = await wsidOfExec(exec)
456
+ const r = await dispatch(wsid, 'getCard', args)
457
+ if (r.error) return { ok: false, message: r.error }
458
+ return { ok: true, message: 'Card ' + String(args.id || '') + ' details', card: r.card }
459
+ },
460
+ },
415
461
  {
416
462
  name: 'kanban_add_card',
417
463
  description: 'Add a card to the current project (workspace) kanban board. Write feature breakdowns and plans to the board: one card per task step.',