kanban-lite 1.0.50 → 1.0.52
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/.vscodeignore +0 -1
- package/AGENTS.md +0 -88
- package/CHANGELOG.md +19 -0
- package/CONTRIBUTING.md +1 -1
- package/README.md +113 -3
- package/dist/cli.js +2097 -504
- package/dist/extension.js +1870 -326
- package/dist/mcp-server.js +1652 -120
- package/dist/sdk/index.cjs +1591 -77
- package/dist/sdk/index.mjs +1591 -77
- package/dist/sdk/sdk/KanbanSDK.d.ts +91 -13
- package/dist/sdk/sdk/metaUtils.d.ts +61 -1
- package/dist/sdk/sdk/modules/cards.d.ts +15 -2
- package/dist/sdk/sdk/modules/context.d.ts +4 -1
- package/dist/sdk/shared/config.d.ts +5 -1
- package/dist/sdk/shared/types.d.ts +19 -1
- package/dist/standalone-webview/{icons-BQC9f0h7.js → icons-CYCI7Dzg.js} +67 -52
- package/dist/standalone-webview/icons-CYCI7Dzg.js.map +1 -0
- package/dist/standalone-webview/index.js +74 -72
- package/dist/standalone-webview/index.js.map +1 -1
- package/dist/standalone-webview/{react-vendor-CXl8NHLV.js → react-vendor-CwCuqPri.js} +2 -2
- package/dist/standalone-webview/{react-vendor-CXl8NHLV.js.map → react-vendor-CwCuqPri.js.map} +1 -1
- package/dist/standalone-webview/style.css +1 -1
- package/docs/api.md +34 -7
- package/docs/plan/20260318-backend-reconnect/plan.yaml +293 -0
- package/docs/plan/20260318-backend-reconnect/research_findings_connectivity_reconnect.yaml +411 -0
- package/docs/plan/20260318-column-visibility-controls/plan.yaml +372 -0
- package/docs/plan/20260318-metadata-fuzzy-search/plan.yaml +642 -0
- package/docs/plan/20260318-metadata-fuzzy-search/research_findings_metadata_fuzzy_search.yaml +558 -0
- package/docs/plan/20260318-metadata-fuzzy-search/research_findings_metadata_fuzzy_search_v2.yaml +568 -0
- package/docs/plan/standalone-vs-webview/research_findings_standalone_vs_webview.yaml +482 -0
- package/docs/plan/standalone-vs-webview-cleanup/plan.yaml +383 -0
- package/docs/plan/standalone-vs-webview-cleanup/research_findings_T1.yaml +143 -0
- package/docs/sdk.md +422 -293
- package/package.json +3 -4
- package/scripts/generate-api-docs.ts +25 -8
- package/src/cli/index.test.ts +118 -0
- package/src/cli/index.ts +40 -8
- package/src/extension/KanbanPanel.ts +13 -0
- package/src/mcp-server/index.ts +28 -8
- package/src/sdk/KanbanSDK.ts +177 -14
- package/src/sdk/__tests__/KanbanSDK.test.ts +27 -0
- package/src/sdk/__tests__/metaUtils.test.ts +146 -1
- package/src/sdk/__tests__/metadata.test.ts +167 -0
- package/src/sdk/metaUtils.ts +173 -2
- package/src/sdk/modules/cards.ts +99 -6
- package/src/sdk/modules/context.ts +11 -1
- package/src/shared/config.ts +9 -1
- package/src/shared/types.ts +20 -0
- package/src/standalone/__tests__/server.integration.test.ts +279 -3
- package/src/standalone/server.ts +47 -27
- package/src/webview/App.test.tsx +417 -0
- package/src/webview/App.tsx +101 -12
- package/src/webview/components/CardEditor.tsx +70 -20
- package/src/webview/components/CardItem.tsx +17 -8
- package/src/webview/components/CreateCardDialog.tsx +4 -3
- package/src/webview/components/KanbanBoard.test.tsx +169 -0
- package/src/webview/components/KanbanBoard.tsx +45 -16
- package/src/webview/components/KanbanColumn.test.tsx +98 -0
- package/src/webview/components/KanbanColumn.tsx +109 -3
- package/src/webview/components/SettingsPanel.tsx +15 -3
- package/src/webview/components/Toolbar.test.tsx +131 -0
- package/src/webview/components/Toolbar.tsx +133 -17
- package/src/webview/components/UndoToast.test.tsx +38 -0
- package/src/webview/components/UndoToast.tsx +60 -27
- package/src/webview/connectionNotice.test.ts +57 -0
- package/src/webview/connectionNotice.ts +60 -0
- package/src/webview/connectionStatusNotice.ts +60 -0
- package/src/webview/router.tsx +11 -30
- package/src/webview/routerHistory.test.ts +14 -0
- package/src/webview/routerHistory.ts +8 -0
- package/src/webview/routerSearch.test.ts +26 -0
- package/src/webview/routerSearch.ts +43 -0
- package/src/webview/standalone-shim.test.ts +169 -0
- package/src/webview/standalone-shim.ts +171 -22
- package/src/webview/store/index.test.ts +325 -0
- package/src/webview/store/index.ts +229 -43
- package/dist/standalone-webview/icons-BQC9f0h7.js.map +0 -1
- package/src/webview/index.html +0 -12
- package/src/webview/main.tsx +0 -11
- package/vite.config.ts +0 -36
package/.vscodeignore
CHANGED
package/AGENTS.md
CHANGED
|
@@ -2,44 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
A VSCode extension + standalone server + CLI + MCP server for managing kanban boards stored as markdown files (default) or SQLite.
|
|
4
4
|
|
|
5
|
-
## Architecture
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
src/
|
|
9
|
-
sdk/ # Core SDK (no external dependencies) - KanbanSDK class
|
|
10
|
-
shared/ # Shared types (Card, KanbanColumn, CardDisplaySettings) and config module
|
|
11
|
-
cli/ # CLI tool (built on SDK)
|
|
12
|
-
mcp-server/ # MCP server (built on SDK + config + webhooks)
|
|
13
|
-
extension/ # VSCode extension
|
|
14
|
-
standalone/ # HTTP server with REST API + WebSocket + file watcher
|
|
15
|
-
webview/ # React frontend (shared by extension + standalone)
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Key Files
|
|
19
|
-
|
|
20
|
-
- `src/sdk/KanbanSDK.ts` - Core card/column CRUD operations
|
|
21
|
-
- `src/sdk/storage/types.ts` - StorageEngine interface and BootstrapConfig
|
|
22
|
-
- `src/sdk/storage/markdown.ts` - MarkdownStorageEngine (default)
|
|
23
|
-
- `src/sdk/storage/sqlite.ts` - SqliteStorageEngine (better-sqlite3)
|
|
24
|
-
- `src/sdk/storage/index.ts` - Storage engine factory + readBootstrapConfig
|
|
25
|
-
- `src/sdk/parser.ts` - Markdown frontmatter parsing and serialization
|
|
26
|
-
- `src/shared/types.ts` - All TypeScript types and enums
|
|
27
|
-
- `src/shared/config.ts` - `.kanban.json` config read/write, settings conversion
|
|
28
|
-
- `src/standalone/server.ts` - HTTP server with all REST API routes + WebSocket
|
|
29
|
-
- `src/standalone/webhooks.ts` - Webhook CRUD and delivery
|
|
30
|
-
- `src/cli/index.ts` - All CLI commands
|
|
31
|
-
- `src/mcp-server/index.ts` - All MCP tool definitions
|
|
32
|
-
|
|
33
|
-
## Build
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
npm run build # Build everything
|
|
37
|
-
npm run build:cli # CLI only
|
|
38
|
-
npm run build:mcp # MCP server only
|
|
39
|
-
npm run build:standalone-server # HTTP server only
|
|
40
|
-
npx tsc --noEmit # Type-check
|
|
41
|
-
npm test # Run tests (vitest)
|
|
42
|
-
```
|
|
43
5
|
|
|
44
6
|
## Feature Parity
|
|
45
7
|
|
|
@@ -56,47 +18,6 @@ Always follow this order when adding or modifying any feature:
|
|
|
56
18
|
|
|
57
19
|
Never implement a feature directly in an interface layer without the SDK method existing first. The SDK is the single source of truth for all business logic.
|
|
58
20
|
|
|
59
|
-
## Data Storage
|
|
60
|
-
|
|
61
|
-
- Cards (markdown engine): `.kanban/boards/<boardId>/<status>/card-name-YYYY-MM-DD.md`
|
|
62
|
-
- Cards (sqlite engine): `.kanban/kanban.db` (configurable via `sqlitePath` in `.kanban.json`)
|
|
63
|
-
- Config: `.kanban.json` (boards, columns, display settings, label definitions)
|
|
64
|
-
- Webhooks: `.kanban-webhooks.json`
|
|
65
|
-
- Logs: `.kanban/boards/<boardId>/<status>/attachments/<cardId>.log` (auto-attached text file)
|
|
66
|
-
|
|
67
|
-
## Storage Engines
|
|
68
|
-
|
|
69
|
-
The `StorageEngine` interface (`src/sdk/storage/types.ts`) abstracts all card I/O. Only card data (cards, comments) is engine-dependent — workspace config always lives in `.kanban.json`.
|
|
70
|
-
|
|
71
|
-
- **MarkdownStorageEngine** — default; full backward compatibility
|
|
72
|
-
- **SqliteStorageEngine** — single DB file; no chokidar watcher needed in server.ts
|
|
73
|
-
- Factory: `createStorageEngine(kanbanDir, options?)` in `src/sdk/storage/index.ts`
|
|
74
|
-
- Bootstrap: `readBootstrapConfig(workspaceRoot)` reads only `storageEngine`/`sqlitePath` before engine creation (chicken-and-egg resolution)
|
|
75
|
-
- SDK migration methods: `migrateToSqlite(dbPath?)` and `migrateToMarkdown()`
|
|
76
|
-
- `filePath` is set to `''` for SQLite cards; `sanitizeCard()` strips it from API responses
|
|
77
|
-
- **Caution**: JSDoc backticks inside `/** ... */` TypeScript interface comments may contain patterns like `**/` which prematurely close the comment block (e.g. glob patterns). Use prose descriptions instead.
|
|
78
|
-
|
|
79
|
-
## Card Metadata
|
|
80
|
-
|
|
81
|
-
Cards support an optional `metadata` field (`Record<string, any>`) for arbitrary user-defined key-value data. Metadata is stored as a native YAML block in the card's frontmatter:
|
|
82
|
-
|
|
83
|
-
```yaml
|
|
84
|
-
---
|
|
85
|
-
id: "42"
|
|
86
|
-
status: "in-progress"
|
|
87
|
-
metadata:
|
|
88
|
-
sprint: "2026-Q1"
|
|
89
|
-
links:
|
|
90
|
-
jira: "PROJ-123"
|
|
91
|
-
estimate: 5
|
|
92
|
-
---
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
- Parsed with `js-yaml` (only the metadata block; rest of frontmatter uses regex)
|
|
96
|
-
- Omitted from frontmatter when undefined or empty `{}`
|
|
97
|
-
- Supported across all interfaces: SDK (`createCard`/`updateCard`), CLI (`--metadata '<json>'`), API (JSON body), MCP (`metadata` param)
|
|
98
|
-
- UI: key-count chip `{N}` on card grid, collapsible tree view in card detail panel
|
|
99
|
-
|
|
100
21
|
## Documentation
|
|
101
22
|
|
|
102
23
|
- **JSDoc:** Always update JSDoc comments when changing any logic, parameters, return types, or behavior of functions, methods, interfaces, or types. JSDoc is the source of truth for `docs/sdk.md`.
|
|
@@ -104,15 +25,6 @@ metadata:
|
|
|
104
25
|
- **README.md:** Always update `README.md` when adding or modifying user-facing features. Update the relevant Features section, configuration examples, CLI usage examples, REST API tables, and MCP tool table as appropriate.
|
|
105
26
|
- **CHANGELOG.md:** Always add an entry to `CHANGELOG.md` for every new feature, behaviour change, or bug fix. Place it under an `## [Unreleased]` section at the top (or the current in-progress version block). Follow the existing format: `### Added`, `### Changed`, `### Fixed` subsections with concise bullet points.
|
|
106
27
|
|
|
107
|
-
## Conventions
|
|
108
|
-
|
|
109
|
-
- Card IDs are auto-generated from title + date
|
|
110
|
-
- Partial ID matching is supported across all interfaces
|
|
111
|
-
- Fractional indexing (base-62) for card ordering within columns
|
|
112
|
-
- `completedAt` is auto-managed when status changes to/from `done`
|
|
113
|
-
- `modified` timestamp is auto-updated on any change
|
|
114
|
-
- The standalone server uses synchronous `fs` operations; the SDK uses async `fs/promises`
|
|
115
|
-
|
|
116
28
|
## Agent execution rules (cost control):
|
|
117
29
|
|
|
118
30
|
1. Do NOT scan or summarize the entire repository.
|
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
### Added
|
|
11
|
+
- **Active card lookup**: Added `getActiveCard(boardId?)` to the SDK plus matching REST API, CLI, and MCP support for retrieving the currently active/open card tracked by the UI.
|
|
12
|
+
- **Configurable card panel layout**: Added the `panelMode` setting to switch card creation and detail flows between a right-side drawer and a centered popup.
|
|
13
|
+
- **Adjustable drawer width**: Added the `drawerWidth` setting (20–80%) so drawer mode can be tuned per workspace; board layout and card visibility calculations now respect the configured width.
|
|
14
|
+
- **Clickable label filters**: Clicking a label on a board card or in the card detail panel now applies that label as the active board filter.
|
|
15
|
+
- **Metadata-aware fuzzy search parity**: Added the web UI `Fuzzy` toggle, metadata filter buttons in rendered metadata fields, CLI `kl list --search ... --fuzzy`, REST `q` / `fuzzy` task-list parameters, and MCP `list_cards` `searchQuery` / `fuzzy` inputs with shared metadata-aware semantics.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- **Standalone URL sync**: Browser history and deep links now persist the fuzzy-search state alongside the existing board, card, tab, filter, and search query routing state.
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
- **Minimized column drops**: Card drags now reach minimized-column rails correctly instead of being swallowed by the rail's column-reorder wrapper.
|
|
22
|
+
- **Standalone reconnect recovery**: In standalone/browser mode, the app now automatically retries same-page backend reconnects when possible and shows an in-app connection-lost error with refresh/reopen guidance if recovery cannot be restored.
|
|
23
|
+
- **Toolbar search chips**: Mixed search queries in the web UI now render separate removable chips for plain-text terms and each `meta.*` token, so individual constraints can be cleared without wiping the entire query.
|
|
24
|
+
|
|
25
|
+
### Removed
|
|
26
|
+
- **Legacy webview build path**: Deleted `src/webview/main.tsx`, `src/webview/index.html`, and `vite.config.ts` — these produced `dist/webview/` which was unused since the dual-runtime `standalone-shim.ts` design was introduced. The active build path (`vite.standalone.config.ts` → `dist/standalone-webview/`) is unchanged.
|
|
27
|
+
- **npm scripts**: Removed `build:webview` and `watch:webview`; the `watch` aggregate script now uses `watch:standalone-webview`.
|
|
28
|
+
|
|
10
29
|
### Added
|
|
11
30
|
- **Board logs**: Each board now has its own log file at `.kanban/boards/<boardId>/board.log` for board-level audit trail entries. Board logs share the same `LogEntry` format as card logs (timestamp, source, text, optional JSON object) but are not tied to any card.
|
|
12
31
|
- **SDK**: `getBoardLogFilePath(boardId?)`, `listBoardLogs(boardId?)`, `addBoardLog(text, options?, boardId?)`, `clearBoardLogs(boardId?)` methods on `KanbanSDK`. Emits `board.log.added` and `board.log.cleared` events.
|
package/CONTRIBUTING.md
CHANGED
package/README.md
CHANGED
|
@@ -45,9 +45,13 @@ kl add --title "My first task" --priority high
|
|
|
45
45
|
- **Real-time updates**: WebSocket-powered live sync across clients
|
|
46
46
|
- **Light & dark mode** support
|
|
47
47
|
- **Tabbed settings panel**: Settings organized into **General**, **Defaults**, and **Labels** tabs
|
|
48
|
+
- **Flexible panel layouts**: Open card details and creation flows as a right-side drawer or a centered popup
|
|
49
|
+
- **Adjustable drawer width**: Tune drawer mode between 20–80% of the viewport from the Layout settings
|
|
48
50
|
- **Zoom controls**: Scale the board view and card detail panel independently between 75–150% via settings sliders or keyboard shortcuts
|
|
49
51
|
- **Column sorting**: Sort cards within a column by priority, due date, or creation date from the column menu
|
|
52
|
+
- **Column visibility controls**: Minimize a column into a narrow rail with its name and card count from the column menu, or hide/show columns from **Board options → Columns**
|
|
50
53
|
- **Smooth scroll to selection**: Board automatically scrolls to the selected card
|
|
54
|
+
- **URL-synced standalone navigation**: In standalone mode, the active board, card, tab, filters, search query, and fuzzy mode persist in browser history and deep links
|
|
51
55
|
- **Keyboard shortcuts**:
|
|
52
56
|
- `N` - Create new card
|
|
53
57
|
- `Esc` - Close dialogs
|
|
@@ -71,7 +75,11 @@ kl add --title "My first task" --priority high
|
|
|
71
75
|
- **Timestamps**: Created and modified dates tracked automatically
|
|
72
76
|
|
|
73
77
|
### Filtering & Search
|
|
74
|
-
- **
|
|
78
|
+
- **Toolbar search with optional fuzzy mode**: Exact search is the default; enable the `Fuzzy` toggle in the web UI to match near-misses across card text and metadata values
|
|
79
|
+
- **Metadata token search**: Use `meta.field: value` tokens for field-scoped searches that behave consistently across the web UI, CLI, REST API, and MCP
|
|
80
|
+
- **Removable search chips**: Mixed searches are split into separate toolbar chips for plain text and each `meta.*` token, so you can remove one constraint without clearing the whole query
|
|
81
|
+
- **Metadata filter buttons**: Click the filter icon next to rendered metadata values in the card detail panel to inject the correct `meta.field: value` token into the shared search box
|
|
82
|
+
- **Clickable label filters**: Click a label on a board card or in the card detail panel to immediately filter the board to that label
|
|
75
83
|
- **Priority filter**: Show only critical, high, medium, or low items
|
|
76
84
|
- **Assignee filter**: Filter by team member or show unassigned items
|
|
77
85
|
- **Label filter**: Filter by specific labels
|
|
@@ -99,6 +107,13 @@ kl list
|
|
|
99
107
|
# List with filters
|
|
100
108
|
kl list --status todo --priority high
|
|
101
109
|
|
|
110
|
+
# Exact and fuzzy search
|
|
111
|
+
kl list --search "release meta.team: backend"
|
|
112
|
+
kl list --search "meta.team: backnd api plumbng" --fuzzy
|
|
113
|
+
|
|
114
|
+
# Combine fuzzy search with structured metadata filters
|
|
115
|
+
kl list --search "release" --fuzzy --meta sprint=Q1 --meta links.jira=PROJ-123
|
|
116
|
+
|
|
102
117
|
# Create a card
|
|
103
118
|
kl add --title "Implement search" --priority high --label "frontend,search"
|
|
104
119
|
|
|
@@ -108,6 +123,9 @@ kl add --title "Deploy service" --actions "retry,rollback,notify"
|
|
|
108
123
|
# Show card details
|
|
109
124
|
kl show implement-search
|
|
110
125
|
|
|
126
|
+
# Show the currently active/open card
|
|
127
|
+
kl active
|
|
128
|
+
|
|
111
129
|
# Move to a different column
|
|
112
130
|
kl move implement-search in-progress
|
|
113
131
|
|
|
@@ -149,6 +167,12 @@ kl board-log add --text "Pipeline passed" \
|
|
|
149
167
|
--source ci --object '{"build":"42"}' # With source and data
|
|
150
168
|
kl board-log clear # Clear all board logs
|
|
151
169
|
|
|
170
|
+
# Board Actions
|
|
171
|
+
kl board-actions list --board default # List board-level actions
|
|
172
|
+
kl board-actions add --board default \
|
|
173
|
+
--key deploy --title "Deploy to Production" # Add/update a board action
|
|
174
|
+
kl board-actions fire --board default deploy # Trigger a board action
|
|
175
|
+
|
|
152
176
|
# Boards
|
|
153
177
|
kl boards # List boards
|
|
154
178
|
kl boards add --id bugs --name "Bug Tracker" # Create a board
|
|
@@ -228,6 +252,8 @@ The server provides:
|
|
|
228
252
|
- **REST API** at `http://localhost:3000/api` — full programmatic access
|
|
229
253
|
- **WebSocket** — real-time updates for connected clients
|
|
230
254
|
|
|
255
|
+
> In standalone/browser mode, the app automatically retries same-page backend reconnects when possible after the connection drops. If reconnect cannot be restored, the UI shows an in-app connection-lost error with guidance to refresh or reopen the standalone page.
|
|
256
|
+
|
|
231
257
|
### REST API
|
|
232
258
|
|
|
233
259
|
All responses follow the format `{ "ok": true, "data": ... }` or `{ "ok": false, "error": "message" }`. CORS is enabled for all origins.
|
|
@@ -244,11 +270,22 @@ All responses follow the format `{ "ok": true, "data": ... }` or `{ "ok": false,
|
|
|
244
270
|
| `PUT` | `/api/boards/:boardId` | Update board configuration |
|
|
245
271
|
| `DELETE` | `/api/boards/:boardId` | Delete an empty board |
|
|
246
272
|
|
|
273
|
+
#### Board Actions
|
|
274
|
+
|
|
275
|
+
| Method | Endpoint | Description |
|
|
276
|
+
|--------|----------|-------------|
|
|
277
|
+
| `GET` | `/api/boards/:boardId/actions` | List named board actions |
|
|
278
|
+
| `POST` | `/api/boards/:boardId/actions` | Replace the board action map |
|
|
279
|
+
| `PUT` | `/api/boards/:boardId/actions/:key` | Add or update a single board action title |
|
|
280
|
+
| `DELETE` | `/api/boards/:boardId/actions/:key` | Remove a named board action |
|
|
281
|
+
| `POST` | `/api/boards/:boardId/actions/:key/trigger` | Trigger a board action webhook event |
|
|
282
|
+
|
|
247
283
|
#### Tasks
|
|
248
284
|
|
|
249
285
|
| Method | Endpoint | Description |
|
|
250
286
|
|--------|----------|-------------|
|
|
251
|
-
| `GET` | `/api/tasks` | List all tasks (query: `?status=&priority=&assignee=&label=`) |
|
|
287
|
+
| `GET` | `/api/tasks` | List all tasks (query: `?q=&fuzzy=&meta.<field>=&status=&priority=&assignee=&label=`) |
|
|
288
|
+
| `GET` | `/api/tasks/active` | Get the currently active/open task |
|
|
252
289
|
| `GET` | `/api/tasks/:id` | Get a single task |
|
|
253
290
|
| `POST` | `/api/tasks` | Create a task |
|
|
254
291
|
| `PUT` | `/api/tasks/:id` | Update task properties |
|
|
@@ -257,6 +294,8 @@ All responses follow the format `{ "ok": true, "data": ... }` or `{ "ok": false,
|
|
|
257
294
|
|
|
258
295
|
Board-scoped equivalents are available at `/api/boards/:boardId/tasks/...`.
|
|
259
296
|
|
|
297
|
+
`q` is the free-text search input, `fuzzy=true` enables typo-tolerant matching, and `meta.<field>=value` keeps metadata filtering field-scoped. The same search semantics are shared with `kl list --search ... --fuzzy` and the MCP `list_cards` tool.
|
|
298
|
+
|
|
260
299
|
#### Transfer
|
|
261
300
|
|
|
262
301
|
| Method | Endpoint | Description |
|
|
@@ -338,6 +377,13 @@ curl -X POST http://localhost:3000/api/tasks \
|
|
|
338
377
|
-d '{"content": "# My Task\n\nDescription here", "status": "todo", "priority": "high"}'
|
|
339
378
|
```
|
|
340
379
|
|
|
380
|
+
### Example: Search tasks via API
|
|
381
|
+
|
|
382
|
+
```bash
|
|
383
|
+
curl "http://localhost:3000/api/tasks?q=release&fuzzy=true&meta.team=backend"
|
|
384
|
+
curl "http://localhost:3000/api/boards/bugs/tasks?q=meta.team%3A%20backnd&fuzzy=true&meta.region=us-east"
|
|
385
|
+
```
|
|
386
|
+
|
|
341
387
|
## Webhooks
|
|
342
388
|
|
|
343
389
|
Register webhooks to receive HTTP POST notifications when data changes. Webhooks fire from **all interfaces** — REST API, CLI, MCP server, and the web UI — ensuring consistent event delivery regardless of how a mutation is triggered.
|
|
@@ -364,6 +410,7 @@ Register webhooks to receive HTTP POST notifications when data changes. Webhooks
|
|
|
364
410
|
| `board.created` | A new board is created |
|
|
365
411
|
| `board.updated` | Board configuration is changed |
|
|
366
412
|
| `board.deleted` | A board is deleted |
|
|
413
|
+
| `board.action` | A board-level action is triggered from the toolbar, CLI, REST API, or MCP |
|
|
367
414
|
|
|
368
415
|
### Payload
|
|
369
416
|
|
|
@@ -487,6 +534,53 @@ curl -X POST http://localhost:3000/api/tasks \
|
|
|
487
534
|
- 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.
|
|
488
535
|
- Action strings have no special meaning to Kanban Lite; you define the vocabulary.
|
|
489
536
|
|
|
537
|
+
## Board Actions
|
|
538
|
+
|
|
539
|
+
Board actions are the board-level sibling to card actions. Define them once per board, and they appear in the toolbar **Actions** dropdown for that board.
|
|
540
|
+
|
|
541
|
+
### How it works
|
|
542
|
+
|
|
543
|
+
1. **Define actions on the board** in `.kanban.json`:
|
|
544
|
+
|
|
545
|
+
```json
|
|
546
|
+
{
|
|
547
|
+
"boards": {
|
|
548
|
+
"default": {
|
|
549
|
+
"name": "Default Board",
|
|
550
|
+
"actions": {
|
|
551
|
+
"deploy": "Deploy to Production",
|
|
552
|
+
"announce": "Post release update"
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
```
|
|
558
|
+
|
|
559
|
+
2. **Trigger them from any interface**:
|
|
560
|
+
|
|
561
|
+
- **UI**: Use the toolbar **Actions** dropdown on a board that defines actions.
|
|
562
|
+
- **CLI**: `kl board-actions fire --board <boardId> <key>`
|
|
563
|
+
- **REST API**: `POST /api/boards/:boardId/actions/:key/trigger`
|
|
564
|
+
- **MCP**: `trigger_board_action`
|
|
565
|
+
|
|
566
|
+
3. **Receive a webhook event**: triggering a board action emits a `board.action` event containing the board ID, action key, and display title.
|
|
567
|
+
|
|
568
|
+
### Managing board actions
|
|
569
|
+
|
|
570
|
+
```bash
|
|
571
|
+
# List existing actions
|
|
572
|
+
kl board-actions list --board default
|
|
573
|
+
|
|
574
|
+
# Add or update a named action
|
|
575
|
+
kl board-actions add --board default --key deploy --title "Deploy to Production"
|
|
576
|
+
|
|
577
|
+
# Remove an action
|
|
578
|
+
kl board-actions remove --board default deploy
|
|
579
|
+
|
|
580
|
+
# Trigger an action
|
|
581
|
+
kl board-actions fire --board default deploy
|
|
582
|
+
```
|
|
583
|
+
|
|
490
584
|
## MCP Server
|
|
491
585
|
|
|
492
586
|
Expose your kanban board to AI agents (Claude, Cursor, etc.) via the [Model Context Protocol](https://modelcontextprotocol.io/).
|
|
@@ -526,9 +620,14 @@ kanban-mcp --dir .kanban # Via dedicated binary
|
|
|
526
620
|
| `create_board` | Create a new board with optional custom columns |
|
|
527
621
|
| `get_board` | Get board configuration and details |
|
|
528
622
|
| `delete_board` | Delete an empty board |
|
|
623
|
+
| `list_board_actions` | List all named actions defined on a board |
|
|
624
|
+
| `add_board_action` | Add or update a named board action |
|
|
625
|
+
| `remove_board_action` | Remove a named board action |
|
|
626
|
+
| `trigger_board_action` | Trigger a board action webhook event |
|
|
529
627
|
| `transfer_card` | Move a card from one board to another |
|
|
530
|
-
| `list_cards` | List/filter cards by status, priority, assignee,
|
|
628
|
+
| `list_cards` | List/filter cards by status, priority, assignee, label, `searchQuery`, `fuzzy`, and `metaFilter` |
|
|
531
629
|
| `get_card` | Get full details of a card (supports partial ID matching) |
|
|
630
|
+
| `get_active_card` | Get the currently active/open card, or `null` if none is active |
|
|
532
631
|
| `create_card` | Create a new card with title, body, status, priority, etc. |
|
|
533
632
|
| `update_card` | Update fields of an existing card |
|
|
534
633
|
| `move_card` | Move a card to a different status column |
|
|
@@ -558,6 +657,8 @@ kanban-mcp --dir .kanban # Via dedicated binary
|
|
|
558
657
|
| `update_webhook` | Update a webhook (url, events, secret, active) |
|
|
559
658
|
| `remove_webhook` | Remove a webhook |
|
|
560
659
|
| `get_workspace_info` | Get workspace root path, storage engine, and features directory |
|
|
660
|
+
|
|
661
|
+
For agent-driven search, pass `searchQuery` for free text (including inline tokens like `meta.team: backend`), set `fuzzy: true` to widen matching across text and metadata values, or use `metaFilter` when you want structured dot-notation field filters.
|
|
561
662
|
| `get_storage_status` | Get current storage engine type and configuration |
|
|
562
663
|
| `migrate_to_sqlite` | Migrate all card data from markdown to SQLite |
|
|
563
664
|
| `migrate_to_markdown` | Migrate all card data from SQLite back to markdown files |
|
|
@@ -581,6 +682,7 @@ await sdk.deleteBoard('bugs')
|
|
|
581
682
|
|
|
582
683
|
// Cards (all accept optional boardId as last argument)
|
|
583
684
|
const cards = await sdk.listCards()
|
|
685
|
+
const activeCard = await sdk.getActiveCard()
|
|
584
686
|
const card = await sdk.createCard({ content: '# My Task', status: 'todo', priority: 'high' })
|
|
585
687
|
await sdk.moveCard(card.id, 'in-progress')
|
|
586
688
|
await sdk.updateCard(card.id, { assignee: 'alice' })
|
|
@@ -739,6 +841,10 @@ Board configuration is stored in `.kanban.json` at your project root. It support
|
|
|
739
841
|
{ "id": "review", "name": "Review", "color": "#8b5cf6" },
|
|
740
842
|
{ "id": "done", "name": "Done", "color": "#22c55e" }
|
|
741
843
|
],
|
|
844
|
+
"actions": {
|
|
845
|
+
"deploy": "Deploy to Production",
|
|
846
|
+
"announce": "Post release update"
|
|
847
|
+
},
|
|
742
848
|
"nextCardId": 1,
|
|
743
849
|
"defaultStatus": "backlog",
|
|
744
850
|
"defaultPriority": "medium"
|
|
@@ -751,6 +857,8 @@ Board configuration is stored in `.kanban.json` at your project root. It support
|
|
|
751
857
|
"compactMode": false,
|
|
752
858
|
"boardZoom": 100,
|
|
753
859
|
"cardZoom": 100,
|
|
860
|
+
"panelMode": "drawer",
|
|
861
|
+
"drawerWidth": 50,
|
|
754
862
|
"actionWebhookUrl": "https://example.com/kanban-actions"
|
|
755
863
|
}
|
|
756
864
|
```
|
|
@@ -759,6 +867,8 @@ Columns are fully customizable per board — add, remove, rename, or recolor the
|
|
|
759
867
|
|
|
760
868
|
`boardZoom` and `cardZoom` set the default zoom percentage (75–150) for the board view and card detail panel respectively. They can also be adjusted live in the Settings panel or with `Ctrl/Cmd + =` / `Ctrl/Cmd + -` keyboard shortcuts.
|
|
761
869
|
|
|
870
|
+
`panelMode` controls whether card flows open as a centered popup or a right-side drawer. When using drawer mode, `drawerWidth` sets the default width percentage (20–80) for card creation and detail panels.
|
|
871
|
+
|
|
762
872
|
## AI Agent Integration
|
|
763
873
|
- **Claude Code**: Default, Plan, Auto-edit, and Full Auto modes
|
|
764
874
|
- **Codex**: Suggest, Auto-edit, and Full Auto modes
|