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.
- package/CHANGELOG.md +30 -0
- package/dist/cli-main.cjs +1322 -154
- 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-BjhiH9TZ.d.mts} +38 -2
- package/dist/lib/{board-store-Dx-mw2I6.d.cts → board-store-CsyBXBwH.d.cts} +38 -2
- package/dist/lib/index.cjs +9 -1
- package/dist/lib/index.d.cts +302 -6
- package/dist/lib/index.d.mts +302 -6
- package/dist/lib/index.mjs +2 -2
- package/dist/lib/{manifest-DcIMYvWk.cjs → manifest-BFI4HGPh.cjs} +1410 -225
- package/dist/lib/{manifest-Dmo6IlWk.mjs → manifest-DHI1fkoW.mjs} +1395 -258
- package/dist/lib/mcp/index.cjs +24 -4
- package/dist/lib/mcp/index.d.cts +19 -4
- package/dist/lib/mcp/index.d.mts +19 -4
- package/dist/lib/mcp/index.mjs +24 -4
- package/dist/lib/{migrate-Dca5WdYd.cjs → migrate-36aT0rV0.cjs} +17 -0
- package/dist/lib/{migrate-DtBeW3Fs.mjs → migrate-Bgj_aABY.mjs} +18 -1
- 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-9OkYvsNM.mjs} +26 -2
- package/dist/lib/{roles.sql-E58x7mLS.cjs → roles.sql-BC7k_zPh.cjs} +25 -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/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.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. */
|
|
@@ -156,6 +162,12 @@ interface IssueCommentStore {
|
|
|
156
162
|
* is absent. "Latest" is the order `listByIssue` lists them in, its last.
|
|
157
163
|
*/
|
|
158
164
|
listLatestByIssues: (issueIds: readonly string[], authorKinds?: readonly IssueComment['authorKind'][]) => Promise<IssueComment[]>;
|
|
165
|
+
/**
|
|
166
|
+
* The comments of these kinds on the cards of these workspaces, oldest first
|
|
167
|
+
* (insertion order within one second), in one statement — what the board's
|
|
168
|
+
* metrics read for every approval. An empty list of either reads nothing.
|
|
169
|
+
*/
|
|
170
|
+
listByWorkspaces: (workspaceIds: readonly string[], authorKinds: readonly IssueComment['authorKind'][]) => Promise<IssueComment[]>;
|
|
159
171
|
findById: (commentId: string) => Promise<IssueComment | null>;
|
|
160
172
|
/**
|
|
161
173
|
* The comment on that issue carrying `dedupeKey`, or `null` — one read of the
|
|
@@ -200,6 +212,12 @@ interface IssueRunStore {
|
|
|
200
212
|
* nothing about, and is still going for all the board can tell.
|
|
201
213
|
*/
|
|
202
214
|
listRunningWithSession: () => Promise<IssueRun[]>;
|
|
215
|
+
/**
|
|
216
|
+
* Every run of the cards of these workspaces, oldest first (insertion order
|
|
217
|
+
* within one second), in one statement — what the board's metrics read. An
|
|
218
|
+
* empty list reads nothing.
|
|
219
|
+
*/
|
|
220
|
+
listByWorkspaces: (workspaceIds: readonly string[]) => Promise<IssueRun[]>;
|
|
203
221
|
findById: (runId: string) => Promise<IssueRun | null>;
|
|
204
222
|
/** The newest run driving that chat session, across every issue. */
|
|
205
223
|
findByChatSessionId: (chatSessionId: string) => Promise<IssueRun | null>;
|
|
@@ -272,12 +290,30 @@ interface IssueContextRefStore {
|
|
|
272
290
|
/** Replace the whole ref list of one issue with the serialized value the caller built. */
|
|
273
291
|
replace: (issueId: string, contextRefs: Issue['contextRefs'], updatedAt: number) => Promise<void>;
|
|
274
292
|
}
|
|
293
|
+
/** Which field changes `listByFieldSince` reads: the cards of these workspaces, from `since` and up to `until` (unix seconds, both inclusive), `limit` at most. */
|
|
294
|
+
interface BoardFieldChangeQuery {
|
|
295
|
+
workspaceIds: readonly string[];
|
|
296
|
+
since: number;
|
|
297
|
+
until?: number;
|
|
298
|
+
limit?: number;
|
|
299
|
+
}
|
|
300
|
+
/** A field change with the workspace its card is on — one row of `listByFieldSince`. */
|
|
301
|
+
type BoardWorkspaceFieldChange = IssueFieldChange & {
|
|
302
|
+
workspaceId: string;
|
|
303
|
+
};
|
|
275
304
|
/** Append-only audit of issue field edits. */
|
|
276
305
|
interface IssueFieldChangeStore {
|
|
277
306
|
/** Field changes of one issue, oldest first. */
|
|
278
307
|
listByIssue: (issueId: string) => Promise<IssueFieldChange[]>;
|
|
279
308
|
/** Field changes of one issue touching one field, oldest first. */
|
|
280
309
|
listByIssueField: (issueId: string, field: string) => Promise<IssueFieldChange[]>;
|
|
310
|
+
/**
|
|
311
|
+
* The changes of one field on the cards of the named workspaces, ordered by
|
|
312
|
+
* `(created_at, id)` — the `(field, created_at)` index answers it. An empty
|
|
313
|
+
* `workspaceIds` lists nothing. Changes whose new value is null are left out.
|
|
314
|
+
* What the column-entry feed reads.
|
|
315
|
+
*/
|
|
316
|
+
listByFieldSince: (field: string, query: BoardFieldChangeQuery) => Promise<BoardWorkspaceFieldChange[]>;
|
|
281
317
|
create: (values: typeof issueFieldChanges.$inferInsert) => Promise<void>;
|
|
282
318
|
}
|
|
283
319
|
/** A pull request a card names, with the workspace of that card — one row of `listLinked`. */
|
|
@@ -351,4 +387,4 @@ interface BoardStore {
|
|
|
351
387
|
}) => Promise<T>;
|
|
352
388
|
}
|
|
353
389
|
//#endregion
|
|
354
|
-
export {
|
|
390
|
+
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.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. */
|
|
@@ -156,6 +162,12 @@ interface IssueCommentStore {
|
|
|
156
162
|
* is absent. "Latest" is the order `listByIssue` lists them in, its last.
|
|
157
163
|
*/
|
|
158
164
|
listLatestByIssues: (issueIds: readonly string[], authorKinds?: readonly IssueComment['authorKind'][]) => Promise<IssueComment[]>;
|
|
165
|
+
/**
|
|
166
|
+
* The comments of these kinds on the cards of these workspaces, oldest first
|
|
167
|
+
* (insertion order within one second), in one statement — what the board's
|
|
168
|
+
* metrics read for every approval. An empty list of either reads nothing.
|
|
169
|
+
*/
|
|
170
|
+
listByWorkspaces: (workspaceIds: readonly string[], authorKinds: readonly IssueComment['authorKind'][]) => Promise<IssueComment[]>;
|
|
159
171
|
findById: (commentId: string) => Promise<IssueComment | null>;
|
|
160
172
|
/**
|
|
161
173
|
* The comment on that issue carrying `dedupeKey`, or `null` — one read of the
|
|
@@ -200,6 +212,12 @@ interface IssueRunStore {
|
|
|
200
212
|
* nothing about, and is still going for all the board can tell.
|
|
201
213
|
*/
|
|
202
214
|
listRunningWithSession: () => Promise<IssueRun[]>;
|
|
215
|
+
/**
|
|
216
|
+
* Every run of the cards of these workspaces, oldest first (insertion order
|
|
217
|
+
* within one second), in one statement — what the board's metrics read. An
|
|
218
|
+
* empty list reads nothing.
|
|
219
|
+
*/
|
|
220
|
+
listByWorkspaces: (workspaceIds: readonly string[]) => Promise<IssueRun[]>;
|
|
203
221
|
findById: (runId: string) => Promise<IssueRun | null>;
|
|
204
222
|
/** The newest run driving that chat session, across every issue. */
|
|
205
223
|
findByChatSessionId: (chatSessionId: string) => Promise<IssueRun | null>;
|
|
@@ -272,12 +290,30 @@ interface IssueContextRefStore {
|
|
|
272
290
|
/** Replace the whole ref list of one issue with the serialized value the caller built. */
|
|
273
291
|
replace: (issueId: string, contextRefs: Issue['contextRefs'], updatedAt: number) => Promise<void>;
|
|
274
292
|
}
|
|
293
|
+
/** Which field changes `listByFieldSince` reads: the cards of these workspaces, from `since` and up to `until` (unix seconds, both inclusive), `limit` at most. */
|
|
294
|
+
interface BoardFieldChangeQuery {
|
|
295
|
+
workspaceIds: readonly string[];
|
|
296
|
+
since: number;
|
|
297
|
+
until?: number;
|
|
298
|
+
limit?: number;
|
|
299
|
+
}
|
|
300
|
+
/** A field change with the workspace its card is on — one row of `listByFieldSince`. */
|
|
301
|
+
type BoardWorkspaceFieldChange = IssueFieldChange & {
|
|
302
|
+
workspaceId: string;
|
|
303
|
+
};
|
|
275
304
|
/** Append-only audit of issue field edits. */
|
|
276
305
|
interface IssueFieldChangeStore {
|
|
277
306
|
/** Field changes of one issue, oldest first. */
|
|
278
307
|
listByIssue: (issueId: string) => Promise<IssueFieldChange[]>;
|
|
279
308
|
/** Field changes of one issue touching one field, oldest first. */
|
|
280
309
|
listByIssueField: (issueId: string, field: string) => Promise<IssueFieldChange[]>;
|
|
310
|
+
/**
|
|
311
|
+
* The changes of one field on the cards of the named workspaces, ordered by
|
|
312
|
+
* `(created_at, id)` — the `(field, created_at)` index answers it. An empty
|
|
313
|
+
* `workspaceIds` lists nothing. Changes whose new value is null are left out.
|
|
314
|
+
* What the column-entry feed reads.
|
|
315
|
+
*/
|
|
316
|
+
listByFieldSince: (field: string, query: BoardFieldChangeQuery) => Promise<BoardWorkspaceFieldChange[]>;
|
|
281
317
|
create: (values: typeof issueFieldChanges.$inferInsert) => Promise<void>;
|
|
282
318
|
}
|
|
283
319
|
/** A pull request a card names, with the workspace of that card — one row of `listLinked`. */
|
|
@@ -351,4 +387,4 @@ interface BoardStore {
|
|
|
351
387
|
}) => Promise<T>;
|
|
352
388
|
}
|
|
353
389
|
//#endregion
|
|
354
|
-
export {
|
|
390
|
+
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-BFI4HGPh.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;
|
|
@@ -21,9 +22,12 @@ exports.UNMET_ENTRY_RULE_REASONS = require_manifest.UNMET_ENTRY_RULE_REASONS;
|
|
|
21
22
|
exports.activityKindOrder = require_manifest.activityKindOrder;
|
|
22
23
|
exports.activityText = require_manifest.activityText;
|
|
23
24
|
exports.activityToken = require_manifest.activityToken;
|
|
25
|
+
exports.boardMetricsAgentKey = require_manifest.boardMetricsAgentKey;
|
|
26
|
+
exports.boardMetricsRuns = require_manifest.boardMetricsRuns;
|
|
24
27
|
exports.buildCapabilitiesManifest = require_manifest.buildCapabilitiesManifest;
|
|
25
28
|
exports.cardDisplayTitle = require_manifest.cardDisplayTitle;
|
|
26
29
|
exports.commentAuthorReference = require_manifest.commentAuthorReference;
|
|
30
|
+
exports.computeBoardMetrics = require_manifest.computeBoardMetrics;
|
|
27
31
|
exports.createBoardOps = require_manifest.createBoardOps;
|
|
28
32
|
exports.currentUnixSeconds = require_manifest.currentUnixSeconds;
|
|
29
33
|
exports.diffFieldChanges = require_manifest.diffFieldChanges;
|
|
@@ -36,8 +40,10 @@ exports.ignoreBoardFile = require_manifest.ignoreBoardFile;
|
|
|
36
40
|
exports.isEmptyActivityValue = require_manifest.isEmptyActivityValue;
|
|
37
41
|
exports.isOutsideWriter = require_manifest.isOutsideWriter;
|
|
38
42
|
exports.isValidCardKey = require_manifest.isValidCardKey;
|
|
43
|
+
exports.isoWeekOf = require_manifest.isoWeekOf;
|
|
39
44
|
exports.maskDatabaseUrl = require_manifest.maskDatabaseUrl;
|
|
40
45
|
exports.maskDatabaseUrls = require_manifest.maskDatabaseUrls;
|
|
46
|
+
exports.nearestRank = require_manifest.nearestRank;
|
|
41
47
|
exports.nextIssueIdentity = require_manifest.nextIssueIdentity;
|
|
42
48
|
exports.nextIssueNumber = require_manifest.nextIssueNumber;
|
|
43
49
|
exports.nextIssueOrder = require_manifest.nextIssueOrder;
|
|
@@ -50,6 +56,7 @@ exports.readBinding = require_manifest.readBinding;
|
|
|
50
56
|
exports.readChangeSeq = require_manifest.readChangeSeq;
|
|
51
57
|
exports.readChecklist = require_manifest.readChecklist;
|
|
52
58
|
exports.readEntryRules = require_manifest.readEntryRules;
|
|
59
|
+
exports.readFlowRules = require_manifest.readFlowRules;
|
|
53
60
|
exports.readIssuePrefix = require_manifest.readIssuePrefix;
|
|
54
61
|
exports.readProjectBinding = require_manifest.readProjectBinding;
|
|
55
62
|
exports.readSystemCommentKind = require_manifest.readSystemCommentKind;
|
|
@@ -58,4 +65,5 @@ exports.runBoardWrite = require_manifest.runBoardWrite;
|
|
|
58
65
|
exports.serializeEntryRules = require_manifest.serializeEntryRules;
|
|
59
66
|
exports.suggestCardKey = require_manifest.suggestCardKey;
|
|
60
67
|
exports.toIssueView = require_manifest.toIssueView;
|
|
68
|
+
exports.utcDayLabel = require_manifest.utcDayLabel;
|
|
61
69
|
exports.writeBinding = require_manifest.writeBinding;
|