kanbo-cli 0.3.0 → 0.5.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/CHANGELOG.md +48 -0
- package/README.md +2 -0
- package/dist/cli-main.cjs +1347 -254
- package/dist/drizzle-postgres/0006_flow_rules_and_column_entries.sql +3 -0
- package/dist/drizzle-postgres/README.md +8 -0
- package/dist/drizzle-postgres/meta/0006_snapshot.json +1290 -0
- package/dist/drizzle-postgres/meta/_journal.json +7 -0
- package/dist/drizzle-sqlite/0005_flow_rules_and_column_entries.sql +3 -0
- package/dist/drizzle-sqlite/README.md +8 -0
- package/dist/drizzle-sqlite/meta/0005_snapshot.json +1097 -0
- package/dist/drizzle-sqlite/meta/_journal.json +7 -0
- package/dist/lib/{approval-BsBk2xVr.d.cts → approval-CnJJfwfi.d.mts} +30 -6
- package/dist/lib/{approval-LRZ6ontC.d.mts → approval-DNfUhYD5.d.cts} +30 -6
- package/dist/lib/{board-store-D_Mpfb84.d.mts → board-store-D2x2w1wG.d.cts} +26 -2
- package/dist/lib/{board-store-Dx-mw2I6.d.cts → board-store-DN5Y2U2y.d.mts} +26 -2
- package/dist/lib/index.cjs +3 -1
- package/dist/lib/index.d.cts +96 -6
- package/dist/lib/index.d.mts +96 -6
- package/dist/lib/index.mjs +2 -2
- package/dist/lib/{manifest-QPoQl8tn.cjs → manifest-DUGRyC7A.cjs} +1378 -300
- package/dist/lib/{manifest-v2e9x_C8.mjs → manifest-t4LvFgzH.mjs} +1369 -303
- package/dist/lib/mcp/index.cjs +35 -6
- package/dist/lib/mcp/index.d.cts +23 -4
- package/dist/lib/mcp/index.d.mts +23 -4
- package/dist/lib/mcp/index.mjs +35 -6
- package/dist/lib/{migrate-DtBeW3Fs.mjs → migrate-BUsaTJlj.mjs} +8 -1
- package/dist/lib/{migrate-Dca5WdYd.cjs → migrate-BoGrqK9m.cjs} +7 -0
- package/dist/lib/postgres/index.cjs +1 -1
- package/dist/lib/postgres/index.d.cts +69 -1
- package/dist/lib/postgres/index.d.mts +69 -1
- package/dist/lib/postgres/index.mjs +1 -1
- package/dist/lib/{roles.sql-BoOZSkBp.mjs → roles.sql-BDmmNUdx.mjs} +18 -2
- package/dist/lib/{roles.sql-E58x7mLS.cjs → roles.sql-CBFxSHy7.cjs} +17 -1
- package/dist/lib/{schema-D0MyXcej.d.cts → schema-Cwx3HosC.d.cts} +72 -0
- package/dist/lib/{schema-D0MyXcej.d.mts → schema-Cwx3HosC.d.mts} +72 -0
- package/dist/lib/sqlite/index.cjs +1 -1
- package/dist/lib/sqlite/index.d.cts +2 -2
- package/dist/lib/sqlite/index.d.mts +2 -2
- package/dist/lib/sqlite/index.mjs +1 -1
- package/dist/lib/sqlite/schema.cjs +13 -1
- package/dist/lib/sqlite/schema.d.cts +1 -1
- package/dist/lib/sqlite/schema.d.mts +1 -1
- package/dist/lib/sqlite/schema.mjs +13 -1
- package/dist/page/board.css +1622 -327
- package/dist/page/board.js +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,27 @@
|
|
|
1
|
-
import { c as IssueStatus, n as IssueComment, r as IssueFieldChange, t as Issue } from "./schema-
|
|
1
|
+
import { c as IssueStatus, n as IssueComment, r as IssueFieldChange, t as Issue } from "./schema-Cwx3HosC.mjs";
|
|
2
|
+
//#region src/domain/flow-rules.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Where a card may come from before it enters a column, and how many cards the
|
|
5
|
+
* column holds (board-workflow spec, Part 2). Checked at the same door as the
|
|
6
|
+
* entry rules, `enforceColumnEntry`, for every writer.
|
|
7
|
+
*
|
|
8
|
+
* - `allowedFrom` — the ids of the columns a card may enter this one from;
|
|
9
|
+
* `null` for any column. `[]` lets no card in from another column, so only a
|
|
10
|
+
* person puts one there — it is also what a list becomes when its last column
|
|
11
|
+
* is deleted, so a guarded column never opens by accident.
|
|
12
|
+
* - `wipLimit` — the most cards the column holds, 1 or more; `null` for no
|
|
13
|
+
* limit. The card entering is not counted.
|
|
14
|
+
*/
|
|
15
|
+
interface ColumnFlowRules {
|
|
16
|
+
allowedFrom: string[] | null;
|
|
17
|
+
wipLimit: number | null;
|
|
18
|
+
}
|
|
19
|
+
/** The two flow rules, as an unmet entry names them. */
|
|
20
|
+
declare const FLOW_RULES: readonly ['allowed_from', 'wip_limit'];
|
|
21
|
+
type FlowRule = typeof FLOW_RULES[number];
|
|
22
|
+
/** A column's flow rules, out of what the row stores. */
|
|
23
|
+
declare function readFlowRules(column: Pick<IssueStatus, 'allowedFrom' | 'wipLimit'>): ColumnFlowRules;
|
|
24
|
+
//#endregion
|
|
2
25
|
//#region src/domain/entry-rules.d.ts
|
|
3
26
|
/**
|
|
4
27
|
* What a column may ask of a card before an agent puts the card in it (ruling
|
|
@@ -14,15 +37,16 @@ import { c as IssueStatus, n as IssueComment, r as IssueFieldChange, t as Issue
|
|
|
14
37
|
declare const ENTRY_RULES: readonly ['checklist_complete', 'pull_request_linked', 'ci_green', 'approved'];
|
|
15
38
|
type EntryRule = typeof ENTRY_RULES[number];
|
|
16
39
|
/** Why a rule is unmet, as a key a translated surface can name in its own words. */
|
|
17
|
-
declare const UNMET_ENTRY_RULE_REASONS: readonly ['no_checklist', 'unchecked', 'no_pull_request', 'no_ci', 'ci_red', 'approval_pending', 'returned', 'not_approved'];
|
|
40
|
+
declare const UNMET_ENTRY_RULE_REASONS: readonly ['no_checklist', 'unchecked', 'no_pull_request', 'no_ci', 'ci_red', 'approval_pending', 'returned', 'not_approved', 'not_allowed_from', 'column_full'];
|
|
18
41
|
type UnmetEntryRuleReason = typeof UNMET_ENTRY_RULE_REASONS[number];
|
|
19
42
|
/**
|
|
20
43
|
* One rule a card does not meet yet: `detail` says what is missing in English
|
|
21
44
|
* words the command line and MCP print; `reason` (with `checked` and `total`
|
|
22
|
-
* for `unchecked`) says the same for a surface that translates it.
|
|
45
|
+
* for `unchecked`) says the same for a surface that translates it. `rule` is an
|
|
46
|
+
* entry rule, or a flow rule (`allowed_from`, `wip_limit`) the same door checks.
|
|
23
47
|
*/
|
|
24
48
|
interface UnmetEntryRule {
|
|
25
|
-
rule: EntryRule;
|
|
49
|
+
rule: EntryRule | FlowRule;
|
|
26
50
|
reason: UnmetEntryRuleReason;
|
|
27
51
|
detail: string;
|
|
28
52
|
checked?: number;
|
|
@@ -91,7 +115,7 @@ declare const ENTRY_RULE_DESCRIPTIONS: Record<EntryRule, string>;
|
|
|
91
115
|
* Nothing here executes anything. These are names and the commands that mean
|
|
92
116
|
* the same thing, for a prompt and for documentation.
|
|
93
117
|
*/
|
|
94
|
-
declare const KANBO_TOOL_NAMES: readonly ['kanbo_prime', 'kanbo_ready', 'kanbo_columns', 'kanbo_sprints', 'kanbo_card_get', 'kanbo_card_list', 'kanbo_card_create', 'kanbo_card_update', 'kanbo_card_move', 'kanbo_card_comment', 'kanbo_card_link_pr', 'kanbo_card_pull_requests', 'kanbo_status_line', 'kanbo_wait_approval', 'kanbo_run_start', 'kanbo_run_finish'];
|
|
118
|
+
declare const KANBO_TOOL_NAMES: readonly ['kanbo_prime', 'kanbo_ready', 'kanbo_card_claim', 'kanbo_columns', 'kanbo_sprints', 'kanbo_card_get', 'kanbo_card_list', 'kanbo_card_create', 'kanbo_card_update', 'kanbo_card_move', 'kanbo_card_comment', 'kanbo_card_link_pr', 'kanbo_card_pull_requests', 'kanbo_status_line', 'kanbo_wait_approval', 'kanbo_run_start', 'kanbo_run_finish'];
|
|
95
119
|
/** One of the board's tools. */
|
|
96
120
|
type KanboToolName = typeof KANBO_TOOL_NAMES[number];
|
|
97
121
|
/** The command line that does what a tool does. */
|
|
@@ -178,4 +202,4 @@ interface CardAttention {
|
|
|
178
202
|
lastComment: CardLastComment | null;
|
|
179
203
|
}
|
|
180
204
|
//#endregion
|
|
181
|
-
export { readEntryRules as C, readChecklist as S, EntryRule as _, IssueActorReference as a, UnmetEntryRule as b, isOutsideWriter as c, KANBO_TOOL_CLI_EQUIVALENTS as d, KANBO_TOOL_NAMES as f, ENTRY_RULE_DESCRIPTIONS as g, ENTRY_RULES as h, IssueActorKind as i, normalizeCommentAuthorKind as l, KanboToolName as m, CardAttention as n, IssueView as o, KanboToolCliEquivalent as p, CardLastComment as r, IssueWriterProvenance as s, BoardApproval as t, toIssueView as u, EntryRuleFacts as v, serializeEntryRules as w, evaluateEntryRules as x, UNMET_ENTRY_RULE_REASONS as y };
|
|
205
|
+
export { readEntryRules as C, FlowRule as D, FLOW_RULES as E, readFlowRules as O, readChecklist as S, ColumnFlowRules as T, EntryRule as _, IssueActorReference as a, UnmetEntryRule as b, isOutsideWriter as c, KANBO_TOOL_CLI_EQUIVALENTS as d, KANBO_TOOL_NAMES as f, ENTRY_RULE_DESCRIPTIONS as g, ENTRY_RULES as h, IssueActorKind as i, normalizeCommentAuthorKind as l, KanboToolName as m, CardAttention as n, IssueView as o, KanboToolCliEquivalent as p, CardLastComment as r, IssueWriterProvenance as s, BoardApproval as t, toIssueView as u, EntryRuleFacts as v, serializeEntryRules as w, evaluateEntryRules as x, UNMET_ENTRY_RULE_REASONS as y };
|
|
@@ -1,4 +1,27 @@
|
|
|
1
|
-
import { c as IssueStatus, n as IssueComment, r as IssueFieldChange, t as Issue } from "./schema-
|
|
1
|
+
import { c as IssueStatus, n as IssueComment, r as IssueFieldChange, t as Issue } from "./schema-Cwx3HosC.cjs";
|
|
2
|
+
//#region src/domain/flow-rules.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Where a card may come from before it enters a column, and how many cards the
|
|
5
|
+
* column holds (board-workflow spec, Part 2). Checked at the same door as the
|
|
6
|
+
* entry rules, `enforceColumnEntry`, for every writer.
|
|
7
|
+
*
|
|
8
|
+
* - `allowedFrom` — the ids of the columns a card may enter this one from;
|
|
9
|
+
* `null` for any column. `[]` lets no card in from another column, so only a
|
|
10
|
+
* person puts one there — it is also what a list becomes when its last column
|
|
11
|
+
* is deleted, so a guarded column never opens by accident.
|
|
12
|
+
* - `wipLimit` — the most cards the column holds, 1 or more; `null` for no
|
|
13
|
+
* limit. The card entering is not counted.
|
|
14
|
+
*/
|
|
15
|
+
interface ColumnFlowRules {
|
|
16
|
+
allowedFrom: string[] | null;
|
|
17
|
+
wipLimit: number | null;
|
|
18
|
+
}
|
|
19
|
+
/** The two flow rules, as an unmet entry names them. */
|
|
20
|
+
declare const FLOW_RULES: readonly ['allowed_from', 'wip_limit'];
|
|
21
|
+
type FlowRule = typeof FLOW_RULES[number];
|
|
22
|
+
/** A column's flow rules, out of what the row stores. */
|
|
23
|
+
declare function readFlowRules(column: Pick<IssueStatus, 'allowedFrom' | 'wipLimit'>): ColumnFlowRules;
|
|
24
|
+
//#endregion
|
|
2
25
|
//#region src/domain/entry-rules.d.ts
|
|
3
26
|
/**
|
|
4
27
|
* What a column may ask of a card before an agent puts the card in it (ruling
|
|
@@ -14,15 +37,16 @@ import { c as IssueStatus, n as IssueComment, r as IssueFieldChange, t as Issue
|
|
|
14
37
|
declare const ENTRY_RULES: readonly ['checklist_complete', 'pull_request_linked', 'ci_green', 'approved'];
|
|
15
38
|
type EntryRule = typeof ENTRY_RULES[number];
|
|
16
39
|
/** Why a rule is unmet, as a key a translated surface can name in its own words. */
|
|
17
|
-
declare const UNMET_ENTRY_RULE_REASONS: readonly ['no_checklist', 'unchecked', 'no_pull_request', 'no_ci', 'ci_red', 'approval_pending', 'returned', 'not_approved'];
|
|
40
|
+
declare const UNMET_ENTRY_RULE_REASONS: readonly ['no_checklist', 'unchecked', 'no_pull_request', 'no_ci', 'ci_red', 'approval_pending', 'returned', 'not_approved', 'not_allowed_from', 'column_full'];
|
|
18
41
|
type UnmetEntryRuleReason = typeof UNMET_ENTRY_RULE_REASONS[number];
|
|
19
42
|
/**
|
|
20
43
|
* One rule a card does not meet yet: `detail` says what is missing in English
|
|
21
44
|
* words the command line and MCP print; `reason` (with `checked` and `total`
|
|
22
|
-
* for `unchecked`) says the same for a surface that translates it.
|
|
45
|
+
* for `unchecked`) says the same for a surface that translates it. `rule` is an
|
|
46
|
+
* entry rule, or a flow rule (`allowed_from`, `wip_limit`) the same door checks.
|
|
23
47
|
*/
|
|
24
48
|
interface UnmetEntryRule {
|
|
25
|
-
rule: EntryRule;
|
|
49
|
+
rule: EntryRule | FlowRule;
|
|
26
50
|
reason: UnmetEntryRuleReason;
|
|
27
51
|
detail: string;
|
|
28
52
|
checked?: number;
|
|
@@ -91,7 +115,7 @@ declare const ENTRY_RULE_DESCRIPTIONS: Record<EntryRule, string>;
|
|
|
91
115
|
* Nothing here executes anything. These are names and the commands that mean
|
|
92
116
|
* the same thing, for a prompt and for documentation.
|
|
93
117
|
*/
|
|
94
|
-
declare const KANBO_TOOL_NAMES: readonly ['kanbo_prime', 'kanbo_ready', 'kanbo_columns', 'kanbo_sprints', 'kanbo_card_get', 'kanbo_card_list', 'kanbo_card_create', 'kanbo_card_update', 'kanbo_card_move', 'kanbo_card_comment', 'kanbo_card_link_pr', 'kanbo_card_pull_requests', 'kanbo_status_line', 'kanbo_wait_approval', 'kanbo_run_start', 'kanbo_run_finish'];
|
|
118
|
+
declare const KANBO_TOOL_NAMES: readonly ['kanbo_prime', 'kanbo_ready', 'kanbo_card_claim', 'kanbo_columns', 'kanbo_sprints', 'kanbo_card_get', 'kanbo_card_list', 'kanbo_card_create', 'kanbo_card_update', 'kanbo_card_move', 'kanbo_card_comment', 'kanbo_card_link_pr', 'kanbo_card_pull_requests', 'kanbo_status_line', 'kanbo_wait_approval', 'kanbo_run_start', 'kanbo_run_finish'];
|
|
95
119
|
/** One of the board's tools. */
|
|
96
120
|
type KanboToolName = typeof KANBO_TOOL_NAMES[number];
|
|
97
121
|
/** The command line that does what a tool does. */
|
|
@@ -178,4 +202,4 @@ interface CardAttention {
|
|
|
178
202
|
lastComment: CardLastComment | null;
|
|
179
203
|
}
|
|
180
204
|
//#endregion
|
|
181
|
-
export { readEntryRules as C, readChecklist as S, EntryRule as _, IssueActorReference as a, UnmetEntryRule as b, isOutsideWriter as c, KANBO_TOOL_CLI_EQUIVALENTS as d, KANBO_TOOL_NAMES as f, ENTRY_RULE_DESCRIPTIONS as g, ENTRY_RULES as h, IssueActorKind as i, normalizeCommentAuthorKind as l, KanboToolName as m, CardAttention as n, IssueView as o, KanboToolCliEquivalent as p, CardLastComment as r, IssueWriterProvenance as s, BoardApproval as t, toIssueView as u, EntryRuleFacts as v, serializeEntryRules as w, evaluateEntryRules as x, UNMET_ENTRY_RULE_REASONS as y };
|
|
205
|
+
export { readEntryRules as C, FlowRule as D, FLOW_RULES as E, readFlowRules as O, readChecklist as S, ColumnFlowRules as T, EntryRule as _, IssueActorReference as a, UnmetEntryRule as b, isOutsideWriter as c, KANBO_TOOL_CLI_EQUIVALENTS as d, KANBO_TOOL_NAMES as f, ENTRY_RULE_DESCRIPTIONS as g, ENTRY_RULES as h, IssueActorKind as i, normalizeCommentAuthorKind as l, KanboToolName as m, CardAttention as n, IssueView as o, KanboToolCliEquivalent as p, CardLastComment as r, IssueWriterProvenance as s, BoardApproval as t, toIssueView as u, EntryRuleFacts as v, serializeEntryRules as w, evaluateEntryRules as x, UNMET_ENTRY_RULE_REASONS as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as issueStatuses, a as IssuePullRequest, c as IssueStatus, d as issueComments, f as issueFieldChanges, g as issueRuns, h as issueRelations, i as IssueMilestone, l as KanbanMeta, m as issuePullRequests, n as IssueComment, o as IssueRelation, p as issueMilestones, r as IssueFieldChange, s as IssueRun, t as Issue, v as issues } from "./schema-
|
|
1
|
+
import { _ as issueStatuses, a as IssuePullRequest, c as IssueStatus, d as issueComments, f as issueFieldChanges, g as issueRuns, h as issueRelations, i as IssueMilestone, l as KanbanMeta, m as issuePullRequests, n as IssueComment, o as IssueRelation, p as issueMilestones, r as IssueFieldChange, s as IssueRun, t as Issue, v as issues } from "./schema-Cwx3HosC.cjs";
|
|
2
2
|
//#region src/board-store.d.ts
|
|
3
3
|
/** Workflow statuses of a workspace. */
|
|
4
4
|
interface IssueStatusStore {
|
|
@@ -62,6 +62,12 @@ interface IssueRowStore {
|
|
|
62
62
|
/** Issues with the given ids, in no particular order. Missing ids are simply absent. */
|
|
63
63
|
listByIds: (issueIds: string[]) => Promise<Issue[]>;
|
|
64
64
|
findById: (issueId: string) => Promise<Issue | null>;
|
|
65
|
+
/**
|
|
66
|
+
* The issue, read inside a write so no other writer can change it until this
|
|
67
|
+
* transaction ends: `select … for update` on Postgres. A SQLite write already
|
|
68
|
+
* holds the whole file (`begin immediate`), so there it is `findById`.
|
|
69
|
+
*/
|
|
70
|
+
lockById: (issueId: string) => Promise<Issue | null>;
|
|
65
71
|
/** The issue, only when it belongs to the given workspace. */
|
|
66
72
|
findInWorkspace: (workspaceId: string, issueId: string) => Promise<Issue | null>;
|
|
67
73
|
/** The issue carrying that number inside the workspace — the uniqueness constraint behind key generation. */
|
|
@@ -272,12 +278,30 @@ interface IssueContextRefStore {
|
|
|
272
278
|
/** Replace the whole ref list of one issue with the serialized value the caller built. */
|
|
273
279
|
replace: (issueId: string, contextRefs: Issue['contextRefs'], updatedAt: number) => Promise<void>;
|
|
274
280
|
}
|
|
281
|
+
/** Which field changes `listByFieldSince` reads: the cards of these workspaces, from `since` and up to `until` (unix seconds, both inclusive), `limit` at most. */
|
|
282
|
+
interface BoardFieldChangeQuery {
|
|
283
|
+
workspaceIds: readonly string[];
|
|
284
|
+
since: number;
|
|
285
|
+
until?: number;
|
|
286
|
+
limit?: number;
|
|
287
|
+
}
|
|
288
|
+
/** A field change with the workspace its card is on — one row of `listByFieldSince`. */
|
|
289
|
+
type BoardWorkspaceFieldChange = IssueFieldChange & {
|
|
290
|
+
workspaceId: string;
|
|
291
|
+
};
|
|
275
292
|
/** Append-only audit of issue field edits. */
|
|
276
293
|
interface IssueFieldChangeStore {
|
|
277
294
|
/** Field changes of one issue, oldest first. */
|
|
278
295
|
listByIssue: (issueId: string) => Promise<IssueFieldChange[]>;
|
|
279
296
|
/** Field changes of one issue touching one field, oldest first. */
|
|
280
297
|
listByIssueField: (issueId: string, field: string) => Promise<IssueFieldChange[]>;
|
|
298
|
+
/**
|
|
299
|
+
* The changes of one field on the cards of the named workspaces, ordered by
|
|
300
|
+
* `(created_at, id)` — the `(field, created_at)` index answers it. An empty
|
|
301
|
+
* `workspaceIds` lists nothing. Changes whose new value is null are left out.
|
|
302
|
+
* What the column-entry feed reads.
|
|
303
|
+
*/
|
|
304
|
+
listByFieldSince: (field: string, query: BoardFieldChangeQuery) => Promise<BoardWorkspaceFieldChange[]>;
|
|
281
305
|
create: (values: typeof issueFieldChanges.$inferInsert) => Promise<void>;
|
|
282
306
|
}
|
|
283
307
|
/** A pull request a card names, with the workspace of that card — one row of `listLinked`. */
|
|
@@ -351,4 +375,4 @@ interface BoardStore {
|
|
|
351
375
|
}) => Promise<T>;
|
|
352
376
|
}
|
|
353
377
|
//#endregion
|
|
354
|
-
export {
|
|
378
|
+
export { IssueRelationStore as _, BoardLinkedPullRequest as a, IssueStatusStore as b, BoardRunProjectionScope as c, BoardWorkspaceFieldChange as d, IssueCommentStore as f, IssuePullRequestStore as g, IssueMilestoneStore as h, BoardFieldChangeQuery as i, BoardStore as l, IssueFieldChangeStore as m, BoardCardPage as n, BoardMilestoneCardCount as o, IssueContextRefStore as p, BoardCardQuery as r, BoardRunProjection as s, BoardActiveRun as t, BoardTransactionMode as u, IssueRowStore as v, KanbanMetaStore as x, IssueRunStore as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as issueStatuses, a as IssuePullRequest, c as IssueStatus, d as issueComments, f as issueFieldChanges, g as issueRuns, h as issueRelations, i as IssueMilestone, l as KanbanMeta, m as issuePullRequests, n as IssueComment, o as IssueRelation, p as issueMilestones, r as IssueFieldChange, s as IssueRun, t as Issue, v as issues } from "./schema-
|
|
1
|
+
import { _ as issueStatuses, a as IssuePullRequest, c as IssueStatus, d as issueComments, f as issueFieldChanges, g as issueRuns, h as issueRelations, i as IssueMilestone, l as KanbanMeta, m as issuePullRequests, n as IssueComment, o as IssueRelation, p as issueMilestones, r as IssueFieldChange, s as IssueRun, t as Issue, v as issues } from "./schema-Cwx3HosC.mjs";
|
|
2
2
|
//#region src/board-store.d.ts
|
|
3
3
|
/** Workflow statuses of a workspace. */
|
|
4
4
|
interface IssueStatusStore {
|
|
@@ -62,6 +62,12 @@ interface IssueRowStore {
|
|
|
62
62
|
/** Issues with the given ids, in no particular order. Missing ids are simply absent. */
|
|
63
63
|
listByIds: (issueIds: string[]) => Promise<Issue[]>;
|
|
64
64
|
findById: (issueId: string) => Promise<Issue | null>;
|
|
65
|
+
/**
|
|
66
|
+
* The issue, read inside a write so no other writer can change it until this
|
|
67
|
+
* transaction ends: `select … for update` on Postgres. A SQLite write already
|
|
68
|
+
* holds the whole file (`begin immediate`), so there it is `findById`.
|
|
69
|
+
*/
|
|
70
|
+
lockById: (issueId: string) => Promise<Issue | null>;
|
|
65
71
|
/** The issue, only when it belongs to the given workspace. */
|
|
66
72
|
findInWorkspace: (workspaceId: string, issueId: string) => Promise<Issue | null>;
|
|
67
73
|
/** The issue carrying that number inside the workspace — the uniqueness constraint behind key generation. */
|
|
@@ -272,12 +278,30 @@ interface IssueContextRefStore {
|
|
|
272
278
|
/** Replace the whole ref list of one issue with the serialized value the caller built. */
|
|
273
279
|
replace: (issueId: string, contextRefs: Issue['contextRefs'], updatedAt: number) => Promise<void>;
|
|
274
280
|
}
|
|
281
|
+
/** Which field changes `listByFieldSince` reads: the cards of these workspaces, from `since` and up to `until` (unix seconds, both inclusive), `limit` at most. */
|
|
282
|
+
interface BoardFieldChangeQuery {
|
|
283
|
+
workspaceIds: readonly string[];
|
|
284
|
+
since: number;
|
|
285
|
+
until?: number;
|
|
286
|
+
limit?: number;
|
|
287
|
+
}
|
|
288
|
+
/** A field change with the workspace its card is on — one row of `listByFieldSince`. */
|
|
289
|
+
type BoardWorkspaceFieldChange = IssueFieldChange & {
|
|
290
|
+
workspaceId: string;
|
|
291
|
+
};
|
|
275
292
|
/** Append-only audit of issue field edits. */
|
|
276
293
|
interface IssueFieldChangeStore {
|
|
277
294
|
/** Field changes of one issue, oldest first. */
|
|
278
295
|
listByIssue: (issueId: string) => Promise<IssueFieldChange[]>;
|
|
279
296
|
/** Field changes of one issue touching one field, oldest first. */
|
|
280
297
|
listByIssueField: (issueId: string, field: string) => Promise<IssueFieldChange[]>;
|
|
298
|
+
/**
|
|
299
|
+
* The changes of one field on the cards of the named workspaces, ordered by
|
|
300
|
+
* `(created_at, id)` — the `(field, created_at)` index answers it. An empty
|
|
301
|
+
* `workspaceIds` lists nothing. Changes whose new value is null are left out.
|
|
302
|
+
* What the column-entry feed reads.
|
|
303
|
+
*/
|
|
304
|
+
listByFieldSince: (field: string, query: BoardFieldChangeQuery) => Promise<BoardWorkspaceFieldChange[]>;
|
|
281
305
|
create: (values: typeof issueFieldChanges.$inferInsert) => Promise<void>;
|
|
282
306
|
}
|
|
283
307
|
/** A pull request a card names, with the workspace of that card — one row of `listLinked`. */
|
|
@@ -351,4 +375,4 @@ interface BoardStore {
|
|
|
351
375
|
}) => Promise<T>;
|
|
352
376
|
}
|
|
353
377
|
//#endregion
|
|
354
|
-
export {
|
|
378
|
+
export { IssueRelationStore as _, BoardLinkedPullRequest as a, IssueStatusStore as b, BoardRunProjectionScope as c, BoardWorkspaceFieldChange as d, IssueCommentStore as f, IssuePullRequestStore as g, IssueMilestoneStore as h, BoardFieldChangeQuery as i, BoardStore as l, IssueFieldChangeStore as m, BoardCardPage as n, BoardMilestoneCardCount as o, IssueContextRefStore as p, BoardCardQuery as r, BoardRunProjection as s, BoardActiveRun as t, BoardTransactionMode as u, IssueRowStore as v, KanbanMetaStore as x, IssueRunStore as y };
|
package/dist/lib/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_manifest = require("./manifest-
|
|
2
|
+
const require_manifest = require("./manifest-DUGRyC7A.cjs");
|
|
3
3
|
const require_migrations_path = require("./migrations-path-DBCE17dT.cjs");
|
|
4
4
|
exports.BINDING_FILE_PATH = require_manifest.BINDING_FILE_PATH;
|
|
5
5
|
exports.BOARD_ACTOR = require_manifest.BOARD_ACTOR;
|
|
@@ -14,6 +14,7 @@ exports.DEFAULT_BOARD_FILE_PATH = require_manifest.DEFAULT_BOARD_FILE_PATH;
|
|
|
14
14
|
exports.DEFAULT_STATUSES = require_manifest.DEFAULT_STATUSES;
|
|
15
15
|
exports.ENTRY_RULES = require_manifest.ENTRY_RULES;
|
|
16
16
|
exports.ENTRY_RULE_DESCRIPTIONS = require_manifest.ENTRY_RULE_DESCRIPTIONS;
|
|
17
|
+
exports.FLOW_RULES = require_manifest.FLOW_RULES;
|
|
17
18
|
exports.KANBO_TOOL_CLI_EQUIVALENTS = require_manifest.KANBO_TOOL_CLI_EQUIVALENTS;
|
|
18
19
|
exports.KANBO_TOOL_NAMES = require_manifest.KANBO_TOOL_NAMES;
|
|
19
20
|
exports.TRACKED_FIELDS = require_manifest.TRACKED_FIELDS;
|
|
@@ -50,6 +51,7 @@ exports.readBinding = require_manifest.readBinding;
|
|
|
50
51
|
exports.readChangeSeq = require_manifest.readChangeSeq;
|
|
51
52
|
exports.readChecklist = require_manifest.readChecklist;
|
|
52
53
|
exports.readEntryRules = require_manifest.readEntryRules;
|
|
54
|
+
exports.readFlowRules = require_manifest.readFlowRules;
|
|
53
55
|
exports.readIssuePrefix = require_manifest.readIssuePrefix;
|
|
54
56
|
exports.readProjectBinding = require_manifest.readProjectBinding;
|
|
55
57
|
exports.readSystemCommentKind = require_manifest.readSystemCommentKind;
|
package/dist/lib/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as IssuePullRequest, c as IssueStatus, f as issueFieldChanges, i as IssueMilestone, l as KanbanMeta, n as IssueComment, o as IssueRelation, r as IssueFieldChange, s as IssueRun, t as Issue, v as issues } from "./schema-
|
|
2
|
-
import { _ as
|
|
3
|
-
import { C as readEntryRules, S as readChecklist, _ as EntryRule, a as IssueActorReference, b as UnmetEntryRule, c as isOutsideWriter, d as KANBO_TOOL_CLI_EQUIVALENTS, f as KANBO_TOOL_NAMES, g as ENTRY_RULE_DESCRIPTIONS, h as ENTRY_RULES, i as IssueActorKind, l as normalizeCommentAuthorKind, m as KanboToolName, n as CardAttention, o as IssueView, p as KanboToolCliEquivalent, r as CardLastComment, s as IssueWriterProvenance, t as BoardApproval, u as toIssueView, v as EntryRuleFacts, w as serializeEntryRules, x as evaluateEntryRules, y as UNMET_ENTRY_RULE_REASONS } from "./approval-
|
|
1
|
+
import { a as IssuePullRequest, c as IssueStatus, f as issueFieldChanges, i as IssueMilestone, l as KanbanMeta, n as IssueComment, o as IssueRelation, r as IssueFieldChange, s as IssueRun, t as Issue, v as issues } from "./schema-Cwx3HosC.cjs";
|
|
2
|
+
import { _ as IssueRelationStore, a as BoardLinkedPullRequest, b as IssueStatusStore, c as BoardRunProjectionScope, d as BoardWorkspaceFieldChange, f as IssueCommentStore, g as IssuePullRequestStore, h as IssueMilestoneStore, i as BoardFieldChangeQuery, l as BoardStore, m as IssueFieldChangeStore, n as BoardCardPage, o as BoardMilestoneCardCount, p as IssueContextRefStore, r as BoardCardQuery, s as BoardRunProjection, t as BoardActiveRun, u as BoardTransactionMode, v as IssueRowStore, x as KanbanMetaStore, y as IssueRunStore } from "./board-store-D2x2w1wG.cjs";
|
|
3
|
+
import { C as readEntryRules, D as FlowRule, E as FLOW_RULES, O as readFlowRules, S as readChecklist, T as ColumnFlowRules, _ as EntryRule, a as IssueActorReference, b as UnmetEntryRule, c as isOutsideWriter, d as KANBO_TOOL_CLI_EQUIVALENTS, f as KANBO_TOOL_NAMES, g as ENTRY_RULE_DESCRIPTIONS, h as ENTRY_RULES, i as IssueActorKind, l as normalizeCommentAuthorKind, m as KanboToolName, n as CardAttention, o as IssueView, p as KanboToolCliEquivalent, r as CardLastComment, s as IssueWriterProvenance, t as BoardApproval, u as toIssueView, v as EntryRuleFacts, w as serializeEntryRules, x as evaluateEntryRules, y as UNMET_ENTRY_RULE_REASONS } from "./approval-DNfUhYD5.cjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/cli/output.d.ts
|
|
6
6
|
/**
|
|
@@ -366,7 +366,7 @@ export declare function maskDatabaseUrls(text: string): string;
|
|
|
366
366
|
* (`../serve/board-error-responses.ts`), the one table `kanbo serve` and any app
|
|
367
367
|
* serving the board over HTTP answer with.
|
|
368
368
|
*/
|
|
369
|
-
type BoardErrorCode = 'board_approval_requires_user' | 'board_column_name_taken' | 'board_column_not_empty' | 'board_column_ready_protected' | 'board_column_remove_target_invalid' | 'board_column_rules_requires_user' | 'board_column_structure_requires_user' | 'board_column_rules_unmet' | 'board_entry_rule_invalid' | 'board_execution_mode_locked' | 'board_pull_request_invalid' | 'board_pull_request_not_found' | 'board_pull_request_not_yours' | 'board_return_no_previous_column' | 'board_return_requires_user' | 'board_run_already_finished' | 'board_run_not_found' | 'board_run_session_ref_conflict' | 'board_run_session_ref_invalid' | 'board_run_session_ref_requires_user' | 'board_schema_outdated' | 'board_sprint_carry_invalid' | 'board_sprint_close_requires_user' | 'board_sprint_dates_invalid' | 'issue_comment_delete_requires_user' | 'issue_comment_not_found' | 'issue_context_ref_invalid_index' | 'issue_milestone_not_found' | 'issue_not_found' | 'issue_parent_not_found' | 'issue_parent_self_reference' | 'issue_relation_not_found' | 'issue_relation_self_reference' | 'issue_status_name_empty' | 'issue_status_not_found' | 'issue_status_reference_conflict' | 'issue_workspace_not_found';
|
|
369
|
+
type BoardErrorCode = 'board_approval_requires_user' | 'board_card_not_ready' | 'board_card_run_active' | 'board_column_name_taken' | 'board_column_not_empty' | 'board_column_ready_protected' | 'board_column_remove_target_invalid' | 'board_column_rules_requires_user' | 'board_column_structure_requires_user' | 'board_column_rules_unmet' | 'board_entry_rule_invalid' | 'board_execution_mode_locked' | 'board_flow_rule_invalid' | 'board_nothing_ready' | 'board_pull_request_invalid' | 'board_pull_request_not_found' | 'board_pull_request_not_yours' | 'board_return_no_previous_column' | 'board_return_requires_user' | 'board_run_already_finished' | 'board_run_not_found' | 'board_run_session_ref_conflict' | 'board_run_session_ref_invalid' | 'board_run_session_ref_requires_user' | 'board_schema_outdated' | 'board_sprint_carry_invalid' | 'board_sprint_close_requires_user' | 'board_sprint_dates_invalid' | 'issue_comment_delete_requires_user' | 'issue_comment_not_found' | 'issue_context_ref_invalid_index' | 'issue_milestone_not_found' | 'issue_not_found' | 'issue_parent_cycle' | 'issue_parent_not_found' | 'issue_parent_self_reference' | 'issue_relation_not_found' | 'issue_relation_self_reference' | 'issue_status_name_empty' | 'issue_status_not_found' | 'issue_status_reference_conflict' | 'issue_workspace_not_found';
|
|
370
370
|
/** A board rule the caller broke, carrying the offending values in `details`. */
|
|
371
371
|
export declare class BoardError extends Error {
|
|
372
372
|
readonly code: BoardErrorCode;
|
|
@@ -960,6 +960,44 @@ type BoardRunView = IssueRun & {
|
|
|
960
960
|
attempt: number;
|
|
961
961
|
};
|
|
962
962
|
//#endregion
|
|
963
|
+
//#region src/ops/claim.d.ts
|
|
964
|
+
/** What a claim takes: the board, the card when the claimer names one, and the run it starts. */
|
|
965
|
+
interface ClaimCardInput {
|
|
966
|
+
workspaceId: string;
|
|
967
|
+
/** The card to take; the first ready card in To Do, in board order, when absent. */
|
|
968
|
+
issueId?: string;
|
|
969
|
+
run: StartRunInput;
|
|
970
|
+
}
|
|
971
|
+
/** What a claim did: the card where it now is, the run it started, and the column it moved to. */
|
|
972
|
+
interface ClaimedCard {
|
|
973
|
+
/** Carries `unmetRules` when a person's claim put it in a column whose rules it does not meet. */
|
|
974
|
+
card: BoardCardWrite;
|
|
975
|
+
run: IssueRun;
|
|
976
|
+
column: IssueStatus;
|
|
977
|
+
}
|
|
978
|
+
/** Why a named card is not there to take, most telling first. */
|
|
979
|
+
type CardNotReadyReason = 'run_active' | 'waiting_for_person' | 'not_in_to_do';
|
|
980
|
+
//#endregion
|
|
981
|
+
//#region src/ops/column-entries.d.ts
|
|
982
|
+
/** One card entering one column: a move, or a card created in it (`fromStatusId: null`). */
|
|
983
|
+
interface ColumnEntry {
|
|
984
|
+
changeId: string;
|
|
985
|
+
issueId: string;
|
|
986
|
+
workspaceId: string;
|
|
987
|
+
fromStatusId: string | null;
|
|
988
|
+
toStatusId: string;
|
|
989
|
+
actorKind: IssueFieldChange['actorKind'];
|
|
990
|
+
actorId: string | null;
|
|
991
|
+
/** Unix seconds. */
|
|
992
|
+
at: number;
|
|
993
|
+
}
|
|
994
|
+
/** Which boards to read, from when (unix seconds, inclusive), and where a page may end. */
|
|
995
|
+
interface ListColumnEntriesInput {
|
|
996
|
+
workspaceIds: string[];
|
|
997
|
+
since: number;
|
|
998
|
+
limit?: number;
|
|
999
|
+
}
|
|
1000
|
+
//#endregion
|
|
963
1001
|
//#region src/ops/activity.d.ts
|
|
964
1002
|
/**
|
|
965
1003
|
* What the host knows and the board does not: the names of its workspaces, who
|
|
@@ -1231,6 +1269,7 @@ export declare function createBoardOps<TStore extends BoardStore>(store: TStore)
|
|
|
1231
1269
|
assertReturnable: (issueId: string, input: {
|
|
1232
1270
|
toStatusName?: string | null;
|
|
1233
1271
|
}, actor: BoardActor) => Promise<{
|
|
1272
|
+
allowedFrom: string | null;
|
|
1234
1273
|
category: "backlog" | "canceled" | "completed" | "started" | "triage" | "unstarted";
|
|
1235
1274
|
color: string | null;
|
|
1236
1275
|
createdAt: number;
|
|
@@ -1239,6 +1278,7 @@ export declare function createBoardOps<TStore extends BoardStore>(store: TStore)
|
|
|
1239
1278
|
id: string;
|
|
1240
1279
|
name: string;
|
|
1241
1280
|
order: number;
|
|
1281
|
+
wipLimit: number | null;
|
|
1242
1282
|
workspaceId: string;
|
|
1243
1283
|
}>;
|
|
1244
1284
|
readApproval: (issueId: string) => Promise<BoardApproval>;
|
|
@@ -1317,6 +1357,7 @@ export declare function createBoardOps<TStore extends BoardStore>(store: TStore)
|
|
|
1317
1357
|
carryTo?: string | null;
|
|
1318
1358
|
}, actor: BoardActor, scope?: BoardWriteScope<TStore>) => Promise<CloseSprintResult>;
|
|
1319
1359
|
listColumns: (workspaceId: string) => Promise<{
|
|
1360
|
+
allowedFrom: string | null;
|
|
1320
1361
|
category: "backlog" | "canceled" | "completed" | "started" | "triage" | "unstarted";
|
|
1321
1362
|
color: string | null;
|
|
1322
1363
|
createdAt: number;
|
|
@@ -1325,9 +1366,11 @@ export declare function createBoardOps<TStore extends BoardStore>(store: TStore)
|
|
|
1325
1366
|
id: string;
|
|
1326
1367
|
name: string;
|
|
1327
1368
|
order: number;
|
|
1369
|
+
wipLimit: number | null;
|
|
1328
1370
|
workspaceId: string;
|
|
1329
1371
|
}[]>;
|
|
1330
1372
|
findColumn: (workspaceId: string, nameOrId: string) => Promise<{
|
|
1373
|
+
allowedFrom: string | null;
|
|
1331
1374
|
category: "backlog" | "canceled" | "completed" | "started" | "triage" | "unstarted";
|
|
1332
1375
|
color: string | null;
|
|
1333
1376
|
createdAt: number;
|
|
@@ -1336,9 +1379,11 @@ export declare function createBoardOps<TStore extends BoardStore>(store: TStore)
|
|
|
1336
1379
|
id: string;
|
|
1337
1380
|
name: string;
|
|
1338
1381
|
order: number;
|
|
1382
|
+
wipLimit: number | null;
|
|
1339
1383
|
workspaceId: string;
|
|
1340
1384
|
} | null>;
|
|
1341
1385
|
requireColumn: (workspaceId: string, nameOrId: string) => Promise<{
|
|
1386
|
+
allowedFrom: string | null;
|
|
1342
1387
|
category: "backlog" | "canceled" | "completed" | "started" | "triage" | "unstarted";
|
|
1343
1388
|
color: string | null;
|
|
1344
1389
|
createdAt: number;
|
|
@@ -1347,9 +1392,11 @@ export declare function createBoardOps<TStore extends BoardStore>(store: TStore)
|
|
|
1347
1392
|
id: string;
|
|
1348
1393
|
name: string;
|
|
1349
1394
|
order: number;
|
|
1395
|
+
wipLimit: number | null;
|
|
1350
1396
|
workspaceId: string;
|
|
1351
1397
|
}>;
|
|
1352
1398
|
ensureDefaultColumns: (workspaceId: string, scope?: BoardWriteScope<TStore>) => Promise<{
|
|
1399
|
+
allowedFrom: string | null;
|
|
1353
1400
|
category: "backlog" | "canceled" | "completed" | "started" | "triage" | "unstarted";
|
|
1354
1401
|
color: string | null;
|
|
1355
1402
|
createdAt: number;
|
|
@@ -1358,9 +1405,11 @@ export declare function createBoardOps<TStore extends BoardStore>(store: TStore)
|
|
|
1358
1405
|
id: string;
|
|
1359
1406
|
name: string;
|
|
1360
1407
|
order: number;
|
|
1408
|
+
wipLimit: number | null;
|
|
1361
1409
|
workspaceId: string;
|
|
1362
1410
|
}[]>;
|
|
1363
1411
|
createColumn: (input: BoardColumnInput, actor: BoardActor, scope?: BoardWriteScope<TStore>) => Promise<{
|
|
1412
|
+
allowedFrom: string | null;
|
|
1364
1413
|
category: "backlog" | "canceled" | "completed" | "started" | "triage" | "unstarted";
|
|
1365
1414
|
color: string | null;
|
|
1366
1415
|
createdAt: number;
|
|
@@ -1369,9 +1418,11 @@ export declare function createBoardOps<TStore extends BoardStore>(store: TStore)
|
|
|
1369
1418
|
id: string;
|
|
1370
1419
|
name: string;
|
|
1371
1420
|
order: number;
|
|
1421
|
+
wipLimit: number | null;
|
|
1372
1422
|
workspaceId: string;
|
|
1373
1423
|
}>;
|
|
1374
1424
|
updateColumn: (statusId: string, patch: BoardColumnPatch, actor: BoardActor, scope?: BoardWriteScope<TStore>) => Promise<{
|
|
1425
|
+
allowedFrom: string | null;
|
|
1375
1426
|
category: "backlog" | "canceled" | "completed" | "started" | "triage" | "unstarted";
|
|
1376
1427
|
color: string | null;
|
|
1377
1428
|
createdAt: number;
|
|
@@ -1380,9 +1431,11 @@ export declare function createBoardOps<TStore extends BoardStore>(store: TStore)
|
|
|
1380
1431
|
id: string;
|
|
1381
1432
|
name: string;
|
|
1382
1433
|
order: number;
|
|
1434
|
+
wipLimit: number | null;
|
|
1383
1435
|
workspaceId: string;
|
|
1384
1436
|
}>;
|
|
1385
1437
|
describeColumn: (workspaceId: string, nameOrId: string, description: string | null, scope?: BoardWriteScope<TStore>) => Promise<{
|
|
1438
|
+
allowedFrom: string | null;
|
|
1386
1439
|
category: "backlog" | "canceled" | "completed" | "started" | "triage" | "unstarted";
|
|
1387
1440
|
color: string | null;
|
|
1388
1441
|
createdAt: number;
|
|
@@ -1391,9 +1444,11 @@ export declare function createBoardOps<TStore extends BoardStore>(store: TStore)
|
|
|
1391
1444
|
id: string;
|
|
1392
1445
|
name: string;
|
|
1393
1446
|
order: number;
|
|
1447
|
+
wipLimit: number | null;
|
|
1394
1448
|
workspaceId: string;
|
|
1395
1449
|
}>;
|
|
1396
1450
|
setColumnEntryRules: (workspaceId: string, nameOrId: string, entryRules: readonly string[] | null, actor: BoardActor, scope?: BoardWriteScope<TStore>) => Promise<{
|
|
1451
|
+
allowedFrom: string | null;
|
|
1397
1452
|
category: "backlog" | "canceled" | "completed" | "started" | "triage" | "unstarted";
|
|
1398
1453
|
color: string | null;
|
|
1399
1454
|
createdAt: number;
|
|
@@ -1402,8 +1457,35 @@ export declare function createBoardOps<TStore extends BoardStore>(store: TStore)
|
|
|
1402
1457
|
id: string;
|
|
1403
1458
|
name: string;
|
|
1404
1459
|
order: number;
|
|
1460
|
+
wipLimit: number | null;
|
|
1405
1461
|
workspaceId: string;
|
|
1406
1462
|
}>;
|
|
1463
|
+
setColumnFlowRules: (columnId: string, rules: ColumnFlowRules, actor: BoardActor, scope?: BoardWriteScope<TStore>) => Promise<{
|
|
1464
|
+
allowedFrom: string | null;
|
|
1465
|
+
category: "backlog" | "canceled" | "completed" | "started" | "triage" | "unstarted";
|
|
1466
|
+
color: string | null;
|
|
1467
|
+
createdAt: number;
|
|
1468
|
+
description: string | null;
|
|
1469
|
+
entryRules: string | null;
|
|
1470
|
+
id: string;
|
|
1471
|
+
name: string;
|
|
1472
|
+
order: number;
|
|
1473
|
+
wipLimit: number | null;
|
|
1474
|
+
workspaceId: string;
|
|
1475
|
+
}>;
|
|
1476
|
+
applyStandardFlow: (workspaceId: string, actor: BoardActor, scope?: BoardWriteScope<TStore>) => Promise<{
|
|
1477
|
+
allowedFrom: string | null;
|
|
1478
|
+
category: "backlog" | "canceled" | "completed" | "started" | "triage" | "unstarted";
|
|
1479
|
+
color: string | null;
|
|
1480
|
+
createdAt: number;
|
|
1481
|
+
description: string | null;
|
|
1482
|
+
entryRules: string | null;
|
|
1483
|
+
id: string;
|
|
1484
|
+
name: string;
|
|
1485
|
+
order: number;
|
|
1486
|
+
wipLimit: number | null;
|
|
1487
|
+
workspaceId: string;
|
|
1488
|
+
}[]>;
|
|
1407
1489
|
enforceColumnEntryForCards: (issueIds: string[], statusId: string, actor: BoardActor) => Promise<{
|
|
1408
1490
|
issueId: string;
|
|
1409
1491
|
unmet: UnmetEntryRule[];
|
|
@@ -1415,6 +1497,7 @@ export declare function createBoardOps<TStore extends BoardStore>(store: TStore)
|
|
|
1415
1497
|
added: string[];
|
|
1416
1498
|
}>;
|
|
1417
1499
|
addColumn: (workspaceId: string, input: AddColumnInput, actor: BoardActor, scope?: BoardWriteScope<TStore>) => Promise<{
|
|
1500
|
+
allowedFrom: string | null;
|
|
1418
1501
|
category: "backlog" | "canceled" | "completed" | "started" | "triage" | "unstarted";
|
|
1419
1502
|
color: string | null;
|
|
1420
1503
|
createdAt: number;
|
|
@@ -1423,6 +1506,7 @@ export declare function createBoardOps<TStore extends BoardStore>(store: TStore)
|
|
|
1423
1506
|
id: string;
|
|
1424
1507
|
name: string;
|
|
1425
1508
|
order: number;
|
|
1509
|
+
wipLimit: number | null;
|
|
1426
1510
|
workspaceId: string;
|
|
1427
1511
|
}>;
|
|
1428
1512
|
applyColumnTemplate: (workspaceId: string, columns: readonly ColumnSpec[], options: ApplyColumnTemplateOptions, scope?: BoardWriteScope<TStore>) => Promise<{
|
|
@@ -1430,6 +1514,7 @@ export declare function createBoardOps<TStore extends BoardStore>(store: TStore)
|
|
|
1430
1514
|
added: string[];
|
|
1431
1515
|
}>;
|
|
1432
1516
|
renameColumn: (workspaceId: string, nameOrId: string, newName: string, actor: BoardActor, scope?: BoardWriteScope<TStore>) => Promise<{
|
|
1517
|
+
allowedFrom: string | null;
|
|
1433
1518
|
category: "backlog" | "canceled" | "completed" | "started" | "triage" | "unstarted";
|
|
1434
1519
|
color: string | null;
|
|
1435
1520
|
createdAt: number;
|
|
@@ -1438,9 +1523,11 @@ export declare function createBoardOps<TStore extends BoardStore>(store: TStore)
|
|
|
1438
1523
|
id: string;
|
|
1439
1524
|
name: string;
|
|
1440
1525
|
order: number;
|
|
1526
|
+
wipLimit: number | null;
|
|
1441
1527
|
workspaceId: string;
|
|
1442
1528
|
}>;
|
|
1443
1529
|
moveColumn: (workspaceId: string, nameOrId: string, position: ColumnPosition, actor: BoardActor, scope?: BoardWriteScope<TStore>) => Promise<{
|
|
1530
|
+
allowedFrom: string | null;
|
|
1444
1531
|
category: "backlog" | "canceled" | "completed" | "started" | "triage" | "unstarted";
|
|
1445
1532
|
color: string | null;
|
|
1446
1533
|
createdAt: number;
|
|
@@ -1449,6 +1536,7 @@ export declare function createBoardOps<TStore extends BoardStore>(store: TStore)
|
|
|
1449
1536
|
id: string;
|
|
1450
1537
|
name: string;
|
|
1451
1538
|
order: number;
|
|
1539
|
+
wipLimit: number | null;
|
|
1452
1540
|
workspaceId: string;
|
|
1453
1541
|
}[]>;
|
|
1454
1542
|
removeColumn: (workspaceId: string, nameOrId: string, options: RemoveColumnOptions, actor: BoardActor, scope?: BoardWriteScope<TStore>) => Promise<RemoveColumnResult>;
|
|
@@ -1469,6 +1557,7 @@ export declare function createBoardOps<TStore extends BoardStore>(store: TStore)
|
|
|
1469
1557
|
state: "failed" | "finished" | "running" | "stopped";
|
|
1470
1558
|
worktreePath: string | null;
|
|
1471
1559
|
}>;
|
|
1560
|
+
claimCard: (input: ClaimCardInput, actor: BoardActor, scope?: BoardWriteScope<TStore>) => Promise<ClaimedCard>;
|
|
1472
1561
|
attachRunExecution: (runId: string, input: AttachRunExecutionInput, scope?: BoardWriteScope<TStore>) => Promise<{
|
|
1473
1562
|
agentId: string | null;
|
|
1474
1563
|
agentName: string;
|
|
@@ -1596,6 +1685,7 @@ export declare function createBoardOps<TStore extends BoardStore>(store: TStore)
|
|
|
1596
1685
|
limit?: number;
|
|
1597
1686
|
offset?: number;
|
|
1598
1687
|
}) => Promise<CardQueryResult>;
|
|
1688
|
+
listColumnEntries: (input: ListColumnEntriesInput) => Promise<ColumnEntry[]>;
|
|
1599
1689
|
buildPrimeText: (workspaceId: string) => Promise<string>;
|
|
1600
1690
|
};
|
|
1601
1691
|
/** The board's operations, as a type callers can name. */
|
|
@@ -1622,7 +1712,7 @@ interface BoardErrorResponse {
|
|
|
1622
1712
|
* answering for a person — approving a card, sending it back or closing a
|
|
1623
1713
|
* sprint — as anyone but one is 403, dropping a pull request link somebody else made is the same 403
|
|
1624
1714
|
* for the same reason, and acting on a run that has already ended is 409,
|
|
1625
|
-
* because the answer would have been yes a moment earlier. An agent putting a
|
|
1715
|
+
* because the answer would have been yes a moment earlier. Starting a run on a card that has one going, and claiming a card nobody can take right now, are 409 for the same reason. An agent putting a
|
|
1626
1716
|
* card in a column whose entry rules it does not meet yet is 409 for the same
|
|
1627
1717
|
* reason turned around: the answer will be yes once the card meets them, and
|
|
1628
1718
|
* `details.unmet` says what is missing. Deleting a column that still holds
|
|
@@ -1636,4 +1726,4 @@ interface BoardErrorResponse {
|
|
|
1636
1726
|
*/
|
|
1637
1727
|
export declare const BOARD_ERROR_RESPONSES: Record<BoardErrorCode, BoardErrorResponse>;
|
|
1638
1728
|
//#endregion
|
|
1639
|
-
export { type AddColumnInput, type AddCommentInput, type ApplyColumnTemplateOptions, type AttachRunExecutionInput, type BoardActiveRun, type BoardActor, type BoardApproval, type BoardCardPage, type BoardCardQuery, type BoardCardWrite, type BoardColumnInput, type BoardColumnPatch, type BoardErrorCode, type BoardErrorResponse, type BoardLinkedPullRequest, type BoardMilestoneCardCount, type BoardOps, type BoardPullRequestStanding, type BoardRunProjection, type BoardRunProjectionScope, type BoardRunView, type BoardSprint, type BoardStore, type BoardTransactionMode, type BoardWorkspaceIdentity, type BoardWriteScope, type BulkUpdateCardsInput, type BulkUpdateCardsResult, type CardAttention, type CardLastComment, type CardQueryInput, type CardQueryResult, type CloseSprintResult, type ColumnPosition, type ColumnSpec, type ColumnTemplateId, type CreateCardInput, type CreateCommentOnceInput, type CreateMilestoneInput, type CreateRelationInput, ENTRY_RULES, ENTRY_RULE_DESCRIPTIONS, type EntryRule, type EntryRuleFacts, type ExternalSessionRef, type FinishRunInput, type Issue, type IssueActivityAction, type IssueActivityCommentView, type IssueActivityField, type IssueActivityFieldChangeView, type IssueActivityItemView, type IssueActivityLookup, type IssueActivityResolver, type IssueActivityValueToken, type IssueActivityValueView, type IssueActorKind, type IssueActorReference, type IssueComment, type IssueCommentAuthorView, type IssueCommentStore, type IssueContextRefStore, type IssueFieldChange, type IssueFieldChangeStore, type IssueMilestone, type IssueMilestoneStore, type IssueMutationActor, type IssuePullRequest, type IssuePullRequestStore, type IssueRelation, type IssueRelationCounterpart, type IssueRelationStore, type IssueRelationView, type IssueRowStore, type IssueRun, type IssueRunStore, type IssueStatus, type IssueStatusStore, type IssueView, KANBO_TOOL_CLI_EQUIVALENTS, KANBO_TOOL_NAMES, type KanbanMeta, type KanbanMetaStore, type KanboBinding, type KanboCapabilities, type KanboCapabilitiesPackage, type KanboCapabilitiesRoles, type KanboCapabilityCommand, type KanboCapabilityCommandArgument, type KanboCapabilityCommandOption, type KanboCapabilityEntryRule, type KanboCapabilityStorage, type KanboCapabilityTool, type KanboToolCliEquivalent, type KanboToolName, type MigrateCardsInput, type MigrateCardsResult, type PullRequestFactKeys, type RemoveColumnOptions, type RemoveColumnResult, type StartRunInput, UNMET_ENTRY_RULE_REASONS, type UnmetEntryRule, type UpdateCardInput, type UpdateMilestoneInput, evaluateEntryRules, isOutsideWriter, normalizeCommentAuthorKind, readChecklist, readEntryRules, serializeEntryRules, toIssueView };
|
|
1729
|
+
export { type AddColumnInput, type AddCommentInput, type ApplyColumnTemplateOptions, type AttachRunExecutionInput, type BoardActiveRun, type BoardActor, type BoardApproval, type BoardCardPage, type BoardCardQuery, type BoardCardWrite, type BoardColumnInput, type BoardColumnPatch, type BoardErrorCode, type BoardErrorResponse, type BoardFieldChangeQuery, type BoardLinkedPullRequest, type BoardMilestoneCardCount, type BoardOps, type BoardPullRequestStanding, type BoardRunProjection, type BoardRunProjectionScope, type BoardRunView, type BoardSprint, type BoardStore, type BoardTransactionMode, type BoardWorkspaceFieldChange, type BoardWorkspaceIdentity, type BoardWriteScope, type BulkUpdateCardsInput, type BulkUpdateCardsResult, type CardAttention, type CardLastComment, type CardNotReadyReason, type CardQueryInput, type CardQueryResult, type ClaimCardInput, type ClaimedCard, type CloseSprintResult, type ColumnEntry, type ColumnFlowRules, type ColumnPosition, type ColumnSpec, type ColumnTemplateId, type CreateCardInput, type CreateCommentOnceInput, type CreateMilestoneInput, type CreateRelationInput, ENTRY_RULES, ENTRY_RULE_DESCRIPTIONS, type EntryRule, type EntryRuleFacts, type ExternalSessionRef, FLOW_RULES, type FinishRunInput, type FlowRule, type Issue, type IssueActivityAction, type IssueActivityCommentView, type IssueActivityField, type IssueActivityFieldChangeView, type IssueActivityItemView, type IssueActivityLookup, type IssueActivityResolver, type IssueActivityValueToken, type IssueActivityValueView, type IssueActorKind, type IssueActorReference, type IssueComment, type IssueCommentAuthorView, type IssueCommentStore, type IssueContextRefStore, type IssueFieldChange, type IssueFieldChangeStore, type IssueMilestone, type IssueMilestoneStore, type IssueMutationActor, type IssuePullRequest, type IssuePullRequestStore, type IssueRelation, type IssueRelationCounterpart, type IssueRelationStore, type IssueRelationView, type IssueRowStore, type IssueRun, type IssueRunStore, type IssueStatus, type IssueStatusStore, type IssueView, KANBO_TOOL_CLI_EQUIVALENTS, KANBO_TOOL_NAMES, type KanbanMeta, type KanbanMetaStore, type KanboBinding, type KanboCapabilities, type KanboCapabilitiesPackage, type KanboCapabilitiesRoles, type KanboCapabilityCommand, type KanboCapabilityCommandArgument, type KanboCapabilityCommandOption, type KanboCapabilityEntryRule, type KanboCapabilityStorage, type KanboCapabilityTool, type KanboToolCliEquivalent, type KanboToolName, type ListColumnEntriesInput, type MigrateCardsInput, type MigrateCardsResult, type PullRequestFactKeys, type RemoveColumnOptions, type RemoveColumnResult, type StartRunInput, UNMET_ENTRY_RULE_REASONS, type UnmetEntryRule, type UpdateCardInput, type UpdateMilestoneInput, evaluateEntryRules, isOutsideWriter, normalizeCommentAuthorKind, readChecklist, readEntryRules, readFlowRules, serializeEntryRules, toIssueView };
|