kanban-lite 1.0.20 → 1.0.22

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.
Files changed (64) hide show
  1. package/README.md +114 -1
  2. package/dist/cli.js +255 -95
  3. package/dist/extension.js +228 -93
  4. package/dist/mcp-server.js +167 -88
  5. package/dist/sdk/index.cjs +125 -82
  6. package/dist/sdk/index.mjs +125 -82
  7. package/dist/sdk/sdk/KanbanSDK.d.ts +35 -5
  8. package/dist/sdk/sdk/types.d.ts +2 -0
  9. package/dist/sdk/shared/config.d.ts +2 -0
  10. package/dist/sdk/shared/types.d.ts +30 -0
  11. package/dist/standalone-webview/{icons-DI-35HYh.js → icons-Bv4jE7zW.js} +18 -18
  12. package/dist/standalone-webview/icons-Bv4jE7zW.js.map +1 -0
  13. package/dist/standalone-webview/index.js +43 -43
  14. package/dist/standalone-webview/index.js.map +1 -1
  15. package/dist/{webview/react-vendor-D9m2NnD0.js → standalone-webview/react-vendor-DTa8ZTpE.js} +2 -2
  16. package/dist/{webview/react-vendor-D9m2NnD0.js.map → standalone-webview/react-vendor-DTa8ZTpE.js.map} +1 -1
  17. package/dist/standalone-webview/style.css +1 -1
  18. package/dist/standalone.js +401 -215
  19. package/dist/webview/{icons-DI-35HYh.js → icons-Bv4jE7zW.js} +18 -18
  20. package/dist/webview/icons-Bv4jE7zW.js.map +1 -0
  21. package/dist/webview/index.js +42 -42
  22. package/dist/webview/index.js.map +1 -1
  23. package/dist/{standalone-webview/react-vendor-D9m2NnD0.js → webview/react-vendor-DTa8ZTpE.js} +2 -2
  24. package/dist/{standalone-webview/react-vendor-D9m2NnD0.js.map → webview/react-vendor-DTa8ZTpE.js.map} +1 -1
  25. package/dist/webview/style.css +1 -1
  26. package/docs/plans/2026-02-26-card-actions-design.md +147 -0
  27. package/docs/plans/2026-02-26-card-actions.md +1147 -0
  28. package/docs/plans/2026-02-26-card-format-version-design.md +68 -0
  29. package/docs/plans/2026-02-26-card-format-version.md +233 -0
  30. package/docs/plans/2026-02-26-comment-editor-design.md +90 -0
  31. package/docs/plans/2026-02-26-comment-editor.md +672 -0
  32. package/docs/plans/2026-02-26-settings-tabs-design.md +40 -0
  33. package/docs/plans/2026-02-26-settings-tabs.md +166 -0
  34. package/docs/sdk.md +234 -181
  35. package/package.json +1 -1
  36. package/src/cli/index.ts +54 -3
  37. package/src/extension/FeatureHeaderProvider.ts +2 -0
  38. package/src/extension/KanbanPanel.ts +20 -2
  39. package/src/mcp-server/index.ts +40 -4
  40. package/src/sdk/KanbanSDK.ts +75 -6
  41. package/src/sdk/__tests__/KanbanSDK.test.ts +163 -4
  42. package/src/sdk/__tests__/metadata.test.ts +4 -1
  43. package/src/sdk/__tests__/parser.test.ts +6 -0
  44. package/src/sdk/parser.ts +52 -76
  45. package/src/sdk/types.ts +2 -0
  46. package/src/shared/config.ts +2 -0
  47. package/src/shared/types.ts +25 -1
  48. package/src/standalone/__tests__/server.integration.test.ts +2 -2
  49. package/src/standalone/index.ts +7 -4
  50. package/src/standalone/server.ts +81 -8
  51. package/src/webview/App.tsx +21 -0
  52. package/src/webview/components/CommentEditor.tsx +215 -0
  53. package/src/webview/components/CommentsSection.tsx +18 -139
  54. package/src/webview/components/CreateFeatureDialog.tsx +62 -3
  55. package/src/webview/components/FeatureCard.tsx +3 -2
  56. package/src/webview/components/FeatureEditor.tsx +61 -1
  57. package/src/webview/components/KanbanBoard.tsx +11 -1
  58. package/src/webview/components/KanbanColumn.tsx +32 -5
  59. package/src/webview/components/MarkdownEditor.tsx +1 -127
  60. package/src/webview/components/SettingsPanel.tsx +112 -78
  61. package/src/webview/lib/markdownTools.tsx +149 -0
  62. package/src/webview/store/index.ts +25 -5
  63. package/dist/standalone-webview/icons-DI-35HYh.js.map +0 -1
  64. package/dist/webview/icons-DI-35HYh.js.map +0 -1
package/README.md CHANGED
@@ -59,6 +59,7 @@ kl add --title "My first task" --priority high
59
59
  - **Labels**: Tag features with multiple labels
60
60
  - **Attachments**: Attach files to cards
61
61
  - **Comments**: Add discussion threads to cards (stored in the same markdown file)
62
+ - **Actions**: Attach named triggers to a card (e.g. `retry`, `deploy`, `notify`) and fire them from the UI, CLI, API, or MCP server — calls a configured webhook with the card's full context
62
63
  - **Auto-generated IDs**: Based on title and timestamp (e.g., `implement-dark-mode-2026-01-29`)
63
64
  - **Timestamps**: Created and modified dates tracked automatically
64
65
 
@@ -94,6 +95,9 @@ kl list --status todo --priority high
94
95
  # Create a card
95
96
  kl add --title "Implement search" --priority high --label "frontend,search"
96
97
 
98
+ # Create a card with actions
99
+ kl add --title "Deploy service" --actions "retry,rollback,notify"
100
+
97
101
  # Show card details
98
102
  kl show implement-search
99
103
 
@@ -103,6 +107,12 @@ kl move implement-search in-progress
103
107
  # Update fields
104
108
  kl edit implement-search --assignee alice --due 2026-03-01
105
109
 
110
+ # Add actions to an existing card
111
+ kl edit deploy-service --actions "retry,rollback,notify"
112
+
113
+ # Trigger an action
114
+ kl action trigger deploy-service retry
115
+
106
116
  # Delete a card
107
117
  kl delete implement-search
108
118
 
@@ -340,6 +350,92 @@ curl -X POST http://localhost:3000/api/webhooks \
340
350
 
341
351
  Webhook registrations are stored in `.kanban.json` at the workspace root and persist across server restarts.
342
352
 
353
+ ## Card Actions
354
+
355
+ Actions let you attach named triggers to a card — things like `retry`, `deploy`, `rollback`, or `notify`. When triggered, the system sends an HTTP POST to a single global **action webhook URL** configured in `.kanban.json`, with the action name and the full card context. Your webhook handles the actual work.
356
+
357
+ ### How it works
358
+
359
+ 1. **Configure the webhook URL** in `.kanban.json`:
360
+
361
+ ```json
362
+ {
363
+ "actionWebhookUrl": "https://example.com/kanban-actions"
364
+ }
365
+ ```
366
+
367
+ 2. **Add actions to a card** — as a list of simple strings stored in the card's frontmatter:
368
+
369
+ ```yaml
370
+ ---
371
+ id: "42-deploy-v2"
372
+ status: "in-progress"
373
+ actions: ["retry", "rollback", "notify-slack"]
374
+ ---
375
+ # Deploy v2.0
376
+ ```
377
+
378
+ 3. **Trigger an action** from any interface:
379
+
380
+ - **UI**: Open a card in the editor — a "Run Action" dropdown appears in the header when the card has actions. Click to select and fire.
381
+ - **CLI**: `kl action trigger <cardId> <action>`
382
+ - **REST API**: `POST /api/tasks/:id/actions/:action`
383
+ - **SDK**: `await sdk.triggerAction(cardId, action)`
384
+ - **MCP**: `trigger_action` tool
385
+
386
+ ### Webhook payload
387
+
388
+ ```json
389
+ {
390
+ "action": "notify-slack",
391
+ "board": "default",
392
+ "list": "in-progress",
393
+ "card": {
394
+ "id": "42-deploy-v2",
395
+ "status": "in-progress",
396
+ "priority": "high",
397
+ "assignee": "alice",
398
+ "labels": ["deploy"],
399
+ "content": "# Deploy v2.0\n...",
400
+ "actions": ["retry", "rollback", "notify-slack"]
401
+ }
402
+ }
403
+ ```
404
+
405
+ The webhook receives the full card object (same shape as the SDK `Feature` type, minus `filePath`). Your server responds with any 2xx status to acknowledge; non-2xx responses are treated as errors.
406
+
407
+ ### Managing actions
408
+
409
+ Actions are plain strings in the `actions` array of the card's YAML frontmatter. Edit them directly in the markdown file, or use any interface:
410
+
411
+ ```bash
412
+ # Add actions when creating a card
413
+ kl add --title "Deploy service" --priority high --actions "retry,rollback,notify-slack"
414
+
415
+ # Update actions on an existing card
416
+ kl edit 42 --actions "retry,rollback,notify-slack,promote"
417
+
418
+ # Trigger
419
+ kl action trigger 42 notify-slack
420
+ ```
421
+
422
+ ```bash
423
+ # Via REST API
424
+ curl -X POST http://localhost:3000/api/tasks/42/actions/notify-slack
425
+
426
+ # Create card with actions via API
427
+ curl -X POST http://localhost:3000/api/tasks \
428
+ -H "Content-Type: application/json" \
429
+ -d '{"content": "# Deploy v2.0", "status": "todo", "actions": ["retry", "rollback"]}'
430
+ ```
431
+
432
+ ### Notes
433
+
434
+ - There is **one global webhook URL** for all actions across all boards. The `action` field in the payload tells your server which action was triggered; the `board` and `list` fields provide context.
435
+ - If `actionWebhookUrl` is not set, triggering an action returns an error.
436
+ - Actions are **fire-and-forget** — no retry logic or delivery guarantees are built in. Implement idempotency and retries in your own webhook handler if needed.
437
+ - Action strings have no special meaning to Kanban Lite; you define the vocabulary.
438
+
343
439
  ## MCP Server
344
440
 
345
441
  Expose your kanban board to AI agents (Claude, Cursor, etc.) via the [Model Context Protocol](https://modelcontextprotocol.io/).
@@ -383,6 +479,7 @@ kanban-mcp --dir .kanban
383
479
  | `update_card` | Update fields of an existing card |
384
480
  | `move_card` | Move a card to a different status column |
385
481
  | `delete_card` | Permanently delete a card |
482
+ | `trigger_action` | Trigger a named action on a card, calling the configured action webhook |
386
483
  | `list_attachments` | List attachments on a card |
387
484
  | `add_attachment` | Attach a file to a card (copies to card directory) |
388
485
  | `remove_attachment` | Remove an attachment reference from a card |
@@ -426,6 +523,20 @@ await sdk.moveCard(card.id, 'in-progress')
426
523
  await sdk.updateCard(card.id, { assignee: 'alice' })
427
524
  await sdk.deleteCard(card.id)
428
525
 
526
+ // Cards with actions
527
+ const deployCard = await sdk.createCard({
528
+ content: '# Deploy v2.0',
529
+ status: 'todo',
530
+ priority: 'high',
531
+ actions: ['retry', 'rollback', 'notify-slack']
532
+ })
533
+
534
+ // Trigger an action (POSTs to the actionWebhookUrl in .kanban.json)
535
+ await sdk.triggerAction(deployCard.id, 'notify-slack')
536
+
537
+ // Add/replace actions on an existing card
538
+ await sdk.updateCard(deployCard.id, { actions: ['retry', 'rollback', 'notify-slack', 'promote'] })
539
+
429
540
  // Comments
430
541
  await sdk.addComment('card-id', 'alice', 'Looks good!')
431
542
  await sdk.updateComment('card-id', 'c1', 'Updated')
@@ -462,6 +573,7 @@ dueDate: "2026-01-25"
462
573
  created: "2026-01-25T10:30:00.000Z"
463
574
  modified: "2026-01-25T14:20:00.000Z"
464
575
  labels: ["feature", "ui"]
576
+ actions: ["retry", "notify-slack"]
465
577
  order: 0
466
578
  ---
467
579
 
@@ -515,7 +627,8 @@ Board configuration is stored in `.kanban.json` at your project root. It support
515
627
  "showAssignee": true,
516
628
  "showDueDate": true,
517
629
  "showLabels": true,
518
- "compactMode": false
630
+ "compactMode": false,
631
+ "actionWebhookUrl": "https://example.com/kanban-actions"
519
632
  }
520
633
  ```
521
634