kanbo-cli 0.4.0 → 0.6.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/cli-main.cjs +1322 -154
  3. package/dist/drizzle-postgres/0006_flow_rules_and_column_entries.sql +3 -0
  4. package/dist/drizzle-postgres/README.md +8 -0
  5. package/dist/drizzle-postgres/meta/0006_snapshot.json +1290 -0
  6. package/dist/drizzle-postgres/meta/_journal.json +7 -0
  7. package/dist/drizzle-sqlite/0005_flow_rules_and_column_entries.sql +3 -0
  8. package/dist/drizzle-sqlite/README.md +8 -0
  9. package/dist/drizzle-sqlite/meta/0005_snapshot.json +1097 -0
  10. package/dist/drizzle-sqlite/meta/_journal.json +7 -0
  11. package/dist/lib/{approval-BsBk2xVr.d.cts → approval-CnJJfwfi.d.mts} +30 -6
  12. package/dist/lib/{approval-LRZ6ontC.d.mts → approval-DNfUhYD5.d.cts} +30 -6
  13. package/dist/lib/{board-store-D_Mpfb84.d.mts → board-store-BjhiH9TZ.d.mts} +38 -2
  14. package/dist/lib/{board-store-Dx-mw2I6.d.cts → board-store-CsyBXBwH.d.cts} +38 -2
  15. package/dist/lib/index.cjs +9 -1
  16. package/dist/lib/index.d.cts +302 -6
  17. package/dist/lib/index.d.mts +302 -6
  18. package/dist/lib/index.mjs +2 -2
  19. package/dist/lib/{manifest-DcIMYvWk.cjs → manifest-BFI4HGPh.cjs} +1410 -225
  20. package/dist/lib/{manifest-Dmo6IlWk.mjs → manifest-DHI1fkoW.mjs} +1395 -258
  21. package/dist/lib/mcp/index.cjs +24 -4
  22. package/dist/lib/mcp/index.d.cts +19 -4
  23. package/dist/lib/mcp/index.d.mts +19 -4
  24. package/dist/lib/mcp/index.mjs +24 -4
  25. package/dist/lib/{migrate-Dca5WdYd.cjs → migrate-36aT0rV0.cjs} +17 -0
  26. package/dist/lib/{migrate-DtBeW3Fs.mjs → migrate-Bgj_aABY.mjs} +18 -1
  27. package/dist/lib/postgres/index.cjs +1 -1
  28. package/dist/lib/postgres/index.d.cts +69 -1
  29. package/dist/lib/postgres/index.d.mts +69 -1
  30. package/dist/lib/postgres/index.mjs +1 -1
  31. package/dist/lib/{roles.sql-BoOZSkBp.mjs → roles.sql-9OkYvsNM.mjs} +26 -2
  32. package/dist/lib/{roles.sql-E58x7mLS.cjs → roles.sql-BC7k_zPh.cjs} +25 -1
  33. package/dist/lib/{schema-D0MyXcej.d.cts → schema-Cwx3HosC.d.cts} +72 -0
  34. package/dist/lib/{schema-D0MyXcej.d.mts → schema-Cwx3HosC.d.mts} +72 -0
  35. package/dist/lib/sqlite/index.cjs +1 -1
  36. package/dist/lib/sqlite/index.d.cts +2 -2
  37. package/dist/lib/sqlite/index.d.mts +2 -2
  38. package/dist/lib/sqlite/index.mjs +1 -1
  39. package/dist/lib/sqlite/schema.cjs +13 -1
  40. package/dist/lib/sqlite/schema.d.cts +1 -1
  41. package/dist/lib/sqlite/schema.d.mts +1 -1
  42. package/dist/lib/sqlite/schema.mjs +13 -1
  43. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,34 @@ All notable changes to kanbo are documented here. The format follows [Keep a Cha
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.6.0] — 2026-11-06
8
+
9
+ kanbo 0.6 measures how work flows on a board. No board migration: 0.5.0's index is all the metrics need.
10
+
11
+ ### Added
12
+
13
+ - `kanbo stats`: how work flows on the board over a range — cycle and lead time as p50 and p85, cards finished per ISO week, work in progress against each column's limit, aging cards, time in column, returns (moves back into an earlier unstarted or started column, by anyone, split by people, agents and outside writers), first-pass approval, attempts, and one line per agent and per person; `--from`, `--to`, `--sprint <id>`, and `--json` with the cumulative flow by day. Canceled cards are counted apart.
14
+ - For applications that use kanbo as a library: `computeBoardMetrics(history, input, now)` and the `BoardMetrics` types, `createBoardOps(store).boardMetrics(input)` and `.readBoardMetricsHistory(workspaceIds)` (a host with workspaces on several boards puts their rows together and computes once), `boardMetricsRuns` (the counted runs, and the canceled cards' apart), `boardMetricsAgentKey`, `nearestRank`, `isoWeekOf`, `utcDayLabel`, `IsoWeek`. `BoardErrorCode` gains `board_metrics_range_invalid` (`400`).
15
+ - `BoardStore` gains `runs.listByWorkspaces(workspaceIds)` and `comments.listByWorkspaces(workspaceIds, authorKinds)`; an application that implements `BoardStore` itself must add both.
16
+
17
+ ## [0.5.0] — 2026-11-06
18
+
19
+ **Run `kanbo migrate` after upgrading** (on a board file `kanbo doctor --fix` does it too; on a shared Postgres board run `kanbo roles apply` after it, as after every migration). 0.5.0 adds two columns to `issue_statuses` and an index to `issue_field_changes`. Until the board is migrated, a read or a write is refused (exit 3, "Run kanbo migrate"). An app that keeps the board in its own database adds the same migration and pins this exact version.
20
+
21
+ ### Added
22
+
23
+ - Flow rules on a column: which columns a card may enter it from (`allowedFrom`) and the most cards it holds (`wipLimit`). They are checked at the same door as entry rules, for every writer: an agent moving, creating, bulk-moving or claiming a card against them is refused with `board_column_rules_unmet` and one line per rule (`- allowed_from: Done accepts cards from In Review only`, `- wip_limit: In Progress holds 3 of 3`); a person goes through and is warned. A bulk move is held to a WIP limit as a whole. `kanbo columns flow <column> --from <columns|any> --wip <count|none>` sets them (a person only, exit 4 in an agent's shell). `kanbo prime`, `kanbo_columns`, `kanbo columns list` and `GET /issues/statuses` show them. Deleting a column takes it out of every list; a list it empties accepts cards from no column, not from every one.
24
+ - New boards start with the standard flow: Done accepts cards only from In Review (from In Review and QA on a Review + QA board). Existing boards keep their columns as they are.
25
+ - `kanbo claim [card]`, the `kanbo_card_claim` tool and `POST /issues/claim`: take a card to work on in one step. The run starts and the card moves from To Do into the board's first work-in-progress column in one write, and two agents never get the same card — the one that loses is told `board_nothing_ready` or `board_card_not_ready` (`run_active`, `waiting_for_person`, `not_in_to_do`). `kanbo prime`, the MCP server's instructions and the orchestrator guide tell agents to claim instead of starting a run and moving the card. `kanbo_card_claim` is published to every MCP host, including one that passes `includeRunTools: false`.
26
+ - For applications that use kanbo as a library: `createBoardOps(store)` gains `setColumnFlowRules`, `applyStandardFlow`, `claimCard` and `listColumnEntries`. `listColumnEntries({ workspaceIds, since, limit })` lists every entry into a column since a moment, in `(at, changeId)` order, from the cards' own history — so it sees every writer — and never ends a page inside a second. The package root exports `readFlowRules`, `ColumnFlowRules`, `FLOW_RULES`, `ClaimCardInput`, `ClaimedCard`, `ColumnEntry`. `BoardStore` gains `issues.lockById` and `fieldChanges.listByFieldSince`; `KanboToolTransport` gains `cardClaim`. `BoardErrorCode` gains `board_card_run_active`, `board_nothing_ready`, `board_card_not_ready` (all `409`) and `board_flow_rule_invalid` (`400`).
27
+
28
+ ### Changed
29
+
30
+ - A card has one run going at a time: starting a second run on a card whose run is still going is refused with `board_card_run_active`, naming that run — through `kanbo run start`, `kanbo_run_start`, `POST /issues/:id/runs` and an app's own launch alike. Finish or stop the first run before starting another.
31
+ - A card created in a column records that column in its history as a change from no column, filed under whoever created it. The activity feed and the board page's History show it as the card's creation, as before; `kanbo card get --include history` and `GET /issues/:id/field-changes` list the row.
32
+ - The instruction block `kanbo init` and `kanbo connect` write says "Take work with `kanbo claim`" (block v3). `kanbo doctor` reports a v2 block as written by an older kanbo, and `kanbo connect` or `kanbo doctor --fix` brings it forward; a block you edited is kept. `kanbo instructions agent` says the same.
33
+ - A board file a migration behind refuses a read as it refuses a write — exit 3, with the sentence that names `kanbo migrate` — instead of failing on the missing column. A board whose only difference is its schema stamp stays readable. `kanbo mcp` on such a file stops at start with the same sentence, as on an outdated Postgres board.
34
+
7
35
  ## [0.4.0] — 2026-11-04
8
36
 
9
37
  ### Added
@@ -192,6 +220,8 @@ First public release.
192
220
  - `kanbo serve`: the `/issues` HTTP API and a board page, loopback by default, bearer token, CORS allow-list, 1 MB body limit.
193
221
  - Library entry points `kanbo`, `kanbo/sqlite`, `kanbo/sqlite/schema`, `kanbo/postgres` and `kanbo/mcp` (ESM and CJS with types).
194
222
 
223
+ [0.6.0]: https://github.com/Krowli/kanbo/releases/tag/v0.6.0
224
+ [0.5.0]: https://github.com/Krowli/kanbo/releases/tag/v0.5.0
195
225
  [0.4.0]: https://github.com/Krowli/kanbo/releases/tag/v0.4.0
196
226
  [0.3.0]: https://github.com/Krowli/kanbo/releases/tag/v0.3.0
197
227
  [0.2.1]: https://github.com/Krowli/kanbo/releases/tag/v0.2.1