spur-board 0.118.0 → 0.119.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/dist/{chunk-DsnvKf_Q.mjs → chunk-B1Mpg_7f.mjs} +1 -1
- package/dist/{chunk-CBEgOEgI.mjs → chunk-CBZ5yyYo.mjs} +2 -2
- package/dist/{chunk-BLyH3LBD.mjs → chunk-CkMLCW2S.mjs} +96 -19
- package/dist/cli.mjs +3 -3
- package/dist/client.mjs +1 -1
- package/dist/daemon.mjs +38 -27
- package/dist/mcp.mjs +3 -3
- package/dist/web/assets/index-CyU8PkHH.js +64 -0
- package/dist/web/index.html +1 -1
- package/package.json +1 -1
- package/skills/spur-board/references/how-board-works-columns.md +11 -2
- package/skills/spur-board/references/web-ui-task-view.md +3 -0
- package/dist/web/assets/index-CjILYmqD.js +0 -64
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as renderJsonError, at as errorContextSchema, c as tokenRequestStatusSchema, ct as successEnvelopeSchema, o as tokenRequestResultSchema, ot as errorEnvelopeSchema, rt as ERRORS } from "./chunk-
|
|
1
|
+
import { _ as renderJsonError, at as errorContextSchema, c as tokenRequestStatusSchema, ct as successEnvelopeSchema, o as tokenRequestResultSchema, ot as errorEnvelopeSchema, rt as ERRORS } from "./chunk-CkMLCW2S.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { request } from "node:http";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _t as configSchema, d as buildCatalogSnapshot, p as OPERATIONS, yt as plainHttpAllowed } from "./chunk-
|
|
2
|
-
import { o as CliError, t as fetchCatalogVersion } from "./chunk-
|
|
1
|
+
import { _t as configSchema, d as buildCatalogSnapshot, p as OPERATIONS, yt as plainHttpAllowed } from "./chunk-CkMLCW2S.mjs";
|
|
2
|
+
import { o as CliError, t as fetchCatalogVersion } from "./chunk-B1Mpg_7f.mjs";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { closeSync, constants, fstatSync, lstatSync, mkdirSync, openSync, readFileSync, realpathSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { homedir } from "node:os";
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
// ../contracts/src/enums.ts
|
|
3
|
+
/** Column groups. The dispatcher never moves a task between two columns of one group. */
|
|
4
|
+
const COLUMN_GROUPS = ["todo"];
|
|
3
5
|
/**
|
|
4
6
|
* Built-in board columns in canonical order, left to right. Everything stored or addressed
|
|
5
7
|
* (journal, store, addressee roles) uses the `id`; `name` is display text only.
|
|
@@ -8,51 +10,102 @@ const COLUMNS = [
|
|
|
8
10
|
{
|
|
9
11
|
id: "todo",
|
|
10
12
|
name: "To Do",
|
|
11
|
-
required: true
|
|
13
|
+
required: true,
|
|
14
|
+
group: "todo",
|
|
15
|
+
returnable: false,
|
|
16
|
+
marks: false,
|
|
17
|
+
defaultEnabled: true
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: "triage",
|
|
21
|
+
name: "Triage",
|
|
22
|
+
required: false,
|
|
23
|
+
group: "todo",
|
|
24
|
+
returnable: false,
|
|
25
|
+
marks: false,
|
|
26
|
+
defaultEnabled: false
|
|
12
27
|
},
|
|
13
28
|
{
|
|
14
29
|
id: "ready-for-dev",
|
|
15
30
|
name: "Ready for Dev",
|
|
16
|
-
required: false
|
|
31
|
+
required: false,
|
|
32
|
+
group: "todo",
|
|
33
|
+
returnable: false,
|
|
34
|
+
marks: false,
|
|
35
|
+
defaultEnabled: true
|
|
17
36
|
},
|
|
18
37
|
{
|
|
19
38
|
id: "dev",
|
|
20
39
|
name: "Dev",
|
|
21
|
-
required: true
|
|
40
|
+
required: true,
|
|
41
|
+
group: null,
|
|
42
|
+
returnable: false,
|
|
43
|
+
marks: false,
|
|
44
|
+
defaultEnabled: true
|
|
22
45
|
},
|
|
23
46
|
{
|
|
24
47
|
id: "review",
|
|
25
48
|
name: "Review",
|
|
26
|
-
required: false
|
|
49
|
+
required: false,
|
|
50
|
+
group: null,
|
|
51
|
+
returnable: true,
|
|
52
|
+
marks: true,
|
|
53
|
+
defaultEnabled: true
|
|
27
54
|
},
|
|
28
55
|
{
|
|
29
56
|
id: "product-review",
|
|
30
57
|
name: "Product Review",
|
|
31
|
-
required: false
|
|
58
|
+
required: false,
|
|
59
|
+
group: null,
|
|
60
|
+
returnable: true,
|
|
61
|
+
marks: true,
|
|
62
|
+
defaultEnabled: true
|
|
32
63
|
},
|
|
33
64
|
{
|
|
34
65
|
id: "external-review",
|
|
35
66
|
name: "External Review",
|
|
36
|
-
required: false
|
|
67
|
+
required: false,
|
|
68
|
+
group: null,
|
|
69
|
+
returnable: true,
|
|
70
|
+
marks: false,
|
|
71
|
+
defaultEnabled: true
|
|
37
72
|
},
|
|
38
73
|
{
|
|
39
74
|
id: "qa",
|
|
40
75
|
name: "QA",
|
|
41
|
-
required: false
|
|
76
|
+
required: false,
|
|
77
|
+
group: null,
|
|
78
|
+
returnable: true,
|
|
79
|
+
marks: false,
|
|
80
|
+
defaultEnabled: true
|
|
42
81
|
},
|
|
43
82
|
{
|
|
44
83
|
id: "ready-to-merge",
|
|
45
84
|
name: "Ready to Merge",
|
|
46
|
-
required: false
|
|
85
|
+
required: false,
|
|
86
|
+
group: null,
|
|
87
|
+
returnable: true,
|
|
88
|
+
marks: false,
|
|
89
|
+
defaultEnabled: true
|
|
47
90
|
},
|
|
48
91
|
{
|
|
49
92
|
id: "done",
|
|
50
93
|
name: "Done",
|
|
51
|
-
required: true
|
|
94
|
+
required: true,
|
|
95
|
+
group: null,
|
|
96
|
+
returnable: false,
|
|
97
|
+
marks: false,
|
|
98
|
+
defaultEnabled: true
|
|
52
99
|
}
|
|
53
100
|
];
|
|
54
101
|
/** Column ids in canonical order. */
|
|
55
102
|
const COLUMN_IDS = COLUMNS.map((column) => column.id);
|
|
103
|
+
/** Columns of the Todo group in canonical order. */
|
|
104
|
+
const TODO_GROUP_COLUMN_IDS = COLUMNS.filter((column) => column.group === "todo").map((column) => column.id);
|
|
105
|
+
/** True for a column of the Todo group. */
|
|
106
|
+
function isTodoGroupColumn(column) {
|
|
107
|
+
return TODO_GROUP_COLUMN_IDS.includes(column);
|
|
108
|
+
}
|
|
56
109
|
/** Columns every project board has, enabled. */
|
|
57
110
|
const REQUIRED_COLUMN_IDS = COLUMNS.filter((column) => column.required).map((column) => column.id);
|
|
58
111
|
/** Where a column's effective orchestrator comes from: its own column entry or top-level `spurProjects`. */
|
|
@@ -393,11 +446,7 @@ const columnConfig = z.strictObject({
|
|
|
393
446
|
requireResolvedThreads: z.boolean().optional().describe("true: a task leaves this column, and every column right of it, only when its PR has no unresolved review thread; an unresolved one sends it back to Dev, and the worker's Dev turn lists each thread. Outdated threads count; a thread counts until someone resolves it, whoever wrote it. Defaults to true on ready-to-merge and false elsewhere; allowed on dev through ready-to-merge.")
|
|
394
447
|
});
|
|
395
448
|
/** Columns a task never leaves through the Dev gate, so they cannot require resolved threads. */
|
|
396
|
-
const NO_THREAD_GATE = /* @__PURE__ */ new Set([
|
|
397
|
-
"todo",
|
|
398
|
-
"ready-for-dev",
|
|
399
|
-
"done"
|
|
400
|
-
]);
|
|
449
|
+
const NO_THREAD_GATE = /* @__PURE__ */ new Set([...TODO_GROUP_COLUMN_IDS, "done"]);
|
|
401
450
|
/**
|
|
402
451
|
* The board rules: required columns present and enabled, resolved threads required only from Dev
|
|
403
452
|
* to Ready to Merge, built-ins in canonical order.
|
|
@@ -470,13 +519,13 @@ const projectSchema = z.strictObject({
|
|
|
470
519
|
curator ??= item.name;
|
|
471
520
|
});
|
|
472
521
|
}).default([]).describe("Spur projects whose sessions work on this board project, each with a role; at most one curator. An operator listed here replaces the top-level spurProjects operator for this project. Board commands from a session whose Spur project is in no spurProjects list, here or top-level, are refused."),
|
|
473
|
-
columns: z.array(columnConfig).superRefine(checkBoard).default(() =>
|
|
522
|
+
columns: z.array(columnConfig).superRefine(checkBoard).default(() => COLUMNS.map(({ id, defaultEnabled }) => ({
|
|
474
523
|
id,
|
|
475
|
-
enabled:
|
|
524
|
+
enabled: defaultEnabled,
|
|
476
525
|
orchestrator: "none",
|
|
477
526
|
cycleLimit: DEFAULT_CYCLE_LIMIT,
|
|
478
527
|
courseCheck: DEFAULT_COURSE_CHECK
|
|
479
|
-
}))).describe("The project's board columns in canonical order. todo, dev and done must be present and enabled. A column left out or disabled is skipped. Without this key,
|
|
528
|
+
}))).describe("The project's board columns in canonical order. todo, dev and done must be present and enabled. A column left out or disabled is skipped. Without this key, every built-in column is enabled with orchestrator none except triage, listed disabled. todo, triage and ready-for-dev form the Todo group: the dispatcher never moves a task between them."),
|
|
480
529
|
dispatcher: z.strictObject({
|
|
481
530
|
mode: z.enum(DISPATCHER_MODES).default("shadow").describe("shadow: the board evaluates the column gates and records where each task would go in its shadow column, and opens no turn, doorbell or block; the column executor submits with the task key. on: the board moves the task between columns, hands the column executor a turn, and raises the cycle-limit and course-check blocks."),
|
|
482
531
|
submitConfirmMs: durationMs(18e4, "How long the board waits to confirm a turn submit it accepted pending (no PR linked yet, or GitHub not confirming the head) before handing the turn back to its executor with the reason")
|
|
@@ -2941,7 +2990,8 @@ const configViewSchema = z.strictObject({
|
|
|
2941
2990
|
"operator"
|
|
2942
2991
|
]).describe("Configured executor; worker falls back to operator without a live worker."),
|
|
2943
2992
|
name: z.string().nullable().describe("Named Spur project, or null for automatic routing.")
|
|
2944
|
-
}).describe("Effective column executor.")
|
|
2993
|
+
}).describe("Effective column executor."),
|
|
2994
|
+
group: z.enum(COLUMN_GROUPS).optional().describe("Column group; present only on Todo-group columns.")
|
|
2945
2995
|
})).describe("Enabled board columns."),
|
|
2946
2996
|
dispatcher: z.strictObject({ mode: z.enum(DISPATCHER_MODES).describe("Effective dispatcher mode.") }).describe("Dispatcher configuration."),
|
|
2947
2997
|
spurProjects: z.array(z.strictObject({
|
|
@@ -3050,6 +3100,10 @@ const statusOutputSchema = z.strictObject({
|
|
|
3050
3100
|
}).describe("Transport health of one gateway.")).describe("Transport health of each chat gateway."),
|
|
3051
3101
|
sources: z.array(sourceViewSchema).describe("Freshness and availability of each source."),
|
|
3052
3102
|
tasks: z.array(statusTaskSchema).describe("Tasks with state, turn, PR summary arrays and navigation; full facts with detail."),
|
|
3103
|
+
columnGroups: z.array(z.strictObject({
|
|
3104
|
+
id: z.enum(COLUMN_GROUPS).describe("Column group."),
|
|
3105
|
+
columns: z.array(z.enum(COLUMN_IDS)).describe("Built-in columns of the group in canonical order, enabled or not.")
|
|
3106
|
+
}).describe("One column group.")).describe("Column groups, the same for every project. The dispatcher never moves a task between columns of one group; once work starts it moves the task to the first enabled column right of the group."),
|
|
3053
3107
|
projectBlocks: z.array(z.strictObject({
|
|
3054
3108
|
project: z.string().min(1).describe("Board project."),
|
|
3055
3109
|
openBlocks: z.int().min(0).describe("Open project-level blocks, without a task.")
|
|
@@ -3298,6 +3352,13 @@ const reviewGates = [
|
|
|
3298
3352
|
blockedIn: null,
|
|
3299
3353
|
conditions: []
|
|
3300
3354
|
},
|
|
3355
|
+
{
|
|
3356
|
+
column: "triage",
|
|
3357
|
+
enabled: false,
|
|
3358
|
+
ok: true,
|
|
3359
|
+
blockedIn: null,
|
|
3360
|
+
conditions: []
|
|
3361
|
+
},
|
|
3301
3362
|
{
|
|
3302
3363
|
column: "ready-for-dev",
|
|
3303
3364
|
enabled: false,
|
|
@@ -3450,6 +3511,14 @@ const OPERATIONS = [
|
|
|
3450
3511
|
sessions: []
|
|
3451
3512
|
}
|
|
3452
3513
|
}],
|
|
3514
|
+
columnGroups: [{
|
|
3515
|
+
id: "todo",
|
|
3516
|
+
columns: [
|
|
3517
|
+
"todo",
|
|
3518
|
+
"triage",
|
|
3519
|
+
"ready-for-dev"
|
|
3520
|
+
]
|
|
3521
|
+
}],
|
|
3453
3522
|
projectBlocks: [{
|
|
3454
3523
|
project: "web",
|
|
3455
3524
|
openBlocks: 0
|
|
@@ -3508,6 +3577,14 @@ const OPERATIONS = [
|
|
|
3508
3577
|
prs: [],
|
|
3509
3578
|
sessions: []
|
|
3510
3579
|
}],
|
|
3580
|
+
columnGroups: [{
|
|
3581
|
+
id: "todo",
|
|
3582
|
+
columns: [
|
|
3583
|
+
"todo",
|
|
3584
|
+
"triage",
|
|
3585
|
+
"ready-for-dev"
|
|
3586
|
+
]
|
|
3587
|
+
}],
|
|
3511
3588
|
projectBlocks: [{
|
|
3512
3589
|
project: "web",
|
|
3513
3590
|
openBlocks: 0
|
|
@@ -5100,4 +5177,4 @@ const remoteDoctorReportSchema = z.object({
|
|
|
5100
5177
|
function assertNever(value) {
|
|
5101
5178
|
throw new Error(`Unexpected value: ${JSON.stringify(value)}`);
|
|
5102
5179
|
}
|
|
5103
|
-
export { encodeActorId as $, eventPayloadSchemas as A, REVIEW_STATES as B, messageRefSchema as C,
|
|
5180
|
+
export { encodeActorId as $, eventPayloadSchemas as A, isTodoGroupColumn as At, REVIEW_STATES as B, messageRefSchema as C, COLUMN_GROUPS as Ct, sortSkillFiles as D, SLACK_BOT_SCOPES as Dt, skillReloadFilesSchema as E, ITEM_KINDS as Et, prSourceId as F, prFactsSchema as G, SESSION_STATUSES as H, sessionTransitionSchema as I, sessionFactsSchema as J, prRefSchema as K, sourceCursorSchema as L, batchSchema as M, defaultBranchFactSchema as N, EVENT_KINDS as O, TASK_HOLDS as Ot, entityRefSchema as P, actorIdSchema as Q, trackerSourceId as R, interactionRefSchema as S, COLUMNS as St, skillReloadFileSchema as T, DISPATCHER_MODES as Tt, isExternalAuthor as U, SESSION_HEALTH_STATES as V, parseRingMarker as W, JIRA_PROJECT_KEY as X, ticketFactsSchema as Y, REF_NUMBER as Z, renderJsonError as _, configSchema as _t, requestHashOf as a, errorContextSchema as at, conversationRefSchema as b, requiredSecretKeys as bt, tokenRequestStatusSchema as c, successEnvelopeSchema as ct, buildCatalogSnapshot as d, DEFAULT_SLACK_APP_NAME as dt, errorCodeOf as et, roleCanUseOperation as f, DEFAULT_SLACK_COMMAND as ft, renderHttpProblem as g, configBindings as gt, turnHandedSchema as h, boardWideSpurProject as ht, TOKEN_REQUEST_LIMITS as i, err as it, AdapterError as j, GATE_REASONS as k, VIAS as kt, BOARD_TICK_MS as l, DEFAULT_HTTP_PORT as lt, defaultBranchViewSchema as m, RESERVED_PROJECT as mt, doctorReportSchema as n, parseRef as nt, tokenRequestResultSchema as o, errorEnvelopeSchema as ot, OPERATIONS as p, DEFAULT_STAND_PORT_RANGE as pt, ringMarker as q, remoteDoctorReportSchema as r, ERRORS as rt, tokenRequestSchema as s, ok as st, assertNever as t, parseActorId as tt, SYSTEMD_SERVICE_SETTINGS as u, DEFAULT_LINK as ut, renderMcpError as v, defaultAddressee as vt, userIdSchema as w, COLUMN_IDS as wt, inboundEventSchema as x, resolveWebOrigin as xt, SPACE_IDS as y, plainHttpAllowed as yt, PR_STATES as z };
|
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { D as sortSkillFiles,
|
|
1
|
+
import { D as sortSkillFiles, Dt as SLACK_BOT_SCOPES, Q as actorIdSchema, T as skillReloadFileSchema, _t as configSchema, a as requestHashOf, bt as requiredSecretKeys, ct as successEnvelopeSchema, f as roleCanUseOperation, p as OPERATIONS, pt as DEFAULT_STAND_PORT_RANGE, r as remoteDoctorReportSchema, rt as ERRORS, u as SYSTEMD_SERVICE_SETTINGS, xt as resolveWebOrigin } from "./chunk-CkMLCW2S.mjs";
|
|
2
2
|
import { t as apiBaseUrl } from "./chunk-Bzb7aI8R.mjs";
|
|
3
|
-
import { a as requestTokenEnrollment, c as renderCliError, i as requestSkillReload, l as escapeTerminalControls, n as fetchTokenStatus, o as CliError, r as requestOperation, s as errorExitCode } from "./chunk-
|
|
4
|
-
import { a as memoryVerdictCache, c as loadClientConfig, d as resolveDaemonAddress, f as tokenInFolder, i as fileVerdictCache, l as loadEnrollmentConfig, n as cliPackageVersion, o as configFile, s as dataDirectory, t as checkCatalog, u as readConfiguredPort } from "./chunk-
|
|
3
|
+
import { a as requestTokenEnrollment, c as renderCliError, i as requestSkillReload, l as escapeTerminalControls, n as fetchTokenStatus, o as CliError, r as requestOperation, s as errorExitCode } from "./chunk-B1Mpg_7f.mjs";
|
|
4
|
+
import { a as memoryVerdictCache, c as loadClientConfig, d as resolveDaemonAddress, f as tokenInFolder, i as fileVerdictCache, l as loadEnrollmentConfig, n as cliPackageVersion, o as configFile, s as dataDirectory, t as checkCatalog, u as readConfiguredPort } from "./chunk-CBZ5yyYo.mjs";
|
|
5
5
|
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
6
6
|
import { accessSync, chmodSync, closeSync, constants, cpSync, existsSync, ftruncateSync, lstatSync, mkdirSync, mkdtempSync, openSync, readFileSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync, writeSync } from "node:fs";
|
|
7
7
|
import { homedir, hostname, tmpdir, userInfo } from "node:os";
|
package/dist/client.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as fetchCatalogVersion, n as fetchTokenStatus, r as requestOperation, i as requestSkillReload, a as requestTokenEnrollment } from "./chunk-
|
|
1
|
+
export { t as fetchCatalogVersion, n as fetchTokenStatus, r as requestOperation, i as requestSkillReload, a as requestTokenEnrollment } from "./chunk-B1Mpg_7f.mjs";
|
package/dist/daemon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as encodeActorId, A as eventPayloadSchemas, B as REVIEW_STATES, C as messageRefSchema, Ct as
|
|
1
|
+
import { $ as encodeActorId, A as eventPayloadSchemas, At as isTodoGroupColumn, B as REVIEW_STATES, C as messageRefSchema, Ct as COLUMN_GROUPS, D as sortSkillFiles, Dt as SLACK_BOT_SCOPES, E as skillReloadFilesSchema, Et as ITEM_KINDS, F as prSourceId, G as prFactsSchema, H as SESSION_STATUSES, I as sessionTransitionSchema, J as sessionFactsSchema, K as prRefSchema, L as sourceCursorSchema, M as batchSchema, N as defaultBranchFactSchema, O as EVENT_KINDS, Ot as TASK_HOLDS, P as entityRefSchema, Q as actorIdSchema, R as trackerSourceId, S as interactionRefSchema, St as COLUMNS, Tt as DISPATCHER_MODES, U as isExternalAuthor, V as SESSION_HEALTH_STATES, W as parseRingMarker, X as JIRA_PROJECT_KEY, Y as ticketFactsSchema, Z as REF_NUMBER, _t as configSchema, a as requestHashOf, b as conversationRefSchema, bt as requiredSecretKeys, c as tokenRequestStatusSchema, ct as successEnvelopeSchema, d as buildCatalogSnapshot, et as errorCodeOf, f as roleCanUseOperation, ft as DEFAULT_SLACK_COMMAND, g as renderHttpProblem, gt as configBindings, h as turnHandedSchema, ht as boardWideSpurProject, i as TOKEN_REQUEST_LIMITS, it as err, j as AdapterError, k as GATE_REASONS, kt as VIAS, l as BOARD_TICK_MS, m as defaultBranchViewSchema, mt as RESERVED_PROJECT, n as doctorReportSchema, nt as parseRef$1, o as tokenRequestResultSchema, p as OPERATIONS, q as ringMarker, rt as ERRORS, s as tokenRequestSchema, st as ok, t as assertNever, tt as parseActorId, ut as DEFAULT_LINK, vt as defaultAddressee, w as userIdSchema, wt as COLUMN_IDS, x as inboundEventSchema, xt as resolveWebOrigin, y as SPACE_IDS, yt as plainHttpAllowed, z as PR_STATES } from "./chunk-CkMLCW2S.mjs";
|
|
2
2
|
import { t as apiBaseUrl } from "./chunk-Bzb7aI8R.mjs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -14603,6 +14603,13 @@ async function readOutageEnds(db) {
|
|
|
14603
14603
|
return outageEnds;
|
|
14604
14604
|
}
|
|
14605
14605
|
// ../core/src/app/status-views.ts
|
|
14606
|
+
/** The column groups with their built-in columns in canonical order, the same for every project. */
|
|
14607
|
+
function columnGroupViews() {
|
|
14608
|
+
return COLUMN_GROUPS.map((id) => ({
|
|
14609
|
+
id,
|
|
14610
|
+
columns: COLUMNS.filter((c) => c.group === id).map((c) => c.id)
|
|
14611
|
+
}));
|
|
14612
|
+
}
|
|
14606
14613
|
/** Factual PR rollup; the caller owns snapshot freshness and all reads. */
|
|
14607
14614
|
function summarizePr(fact, factAt, unconfirmed) {
|
|
14608
14615
|
const checks = fact.requiredChecks.length > 0 ? fact.requiredChecks : fact.checks;
|
|
@@ -14727,6 +14734,10 @@ function sourceInterval(config, source) {
|
|
|
14727
14734
|
if (source.startsWith("github-issues:")) return config.adapters.githubIssues.intervalMs;
|
|
14728
14735
|
return config.adapters.github.intervalMs;
|
|
14729
14736
|
}
|
|
14737
|
+
/** Counts of each value, rendered as `<n> <value>` in the given order. */
|
|
14738
|
+
function counts(values, order) {
|
|
14739
|
+
return order.map((value) => [value, values.filter((entry) => entry === value).length]).filter(([, n]) => n > 0).map(([value, n]) => `${String(n)} ${value}`).join(", ");
|
|
14740
|
+
}
|
|
14730
14741
|
/** Session facts rendered in status detail. */
|
|
14731
14742
|
function sessionView(fact) {
|
|
14732
14743
|
return {
|
|
@@ -14738,10 +14749,6 @@ function sessionView(fact) {
|
|
|
14738
14749
|
};
|
|
14739
14750
|
}
|
|
14740
14751
|
// ../core/src/app/status.ts
|
|
14741
|
-
/** Counts of each value, rendered as `<n> <value>` in the given order. */
|
|
14742
|
-
function counts(values, order) {
|
|
14743
|
-
return order.map((value) => [value, values.filter((entry) => entry === value).length]).filter(([, n]) => n > 0).map(([value, n]) => `${String(n)} ${value}`).join(", ");
|
|
14744
|
-
}
|
|
14745
14752
|
/** End reasons in the words of the "worker ended" item (`ENDED_WORKER_LABELS`, fromYou.ts). */
|
|
14746
14753
|
const END_WORDS = {
|
|
14747
14754
|
complete: "completed",
|
|
@@ -15041,6 +15048,7 @@ async function getStatus(deps, options = {}) {
|
|
|
15041
15048
|
transport,
|
|
15042
15049
|
sources,
|
|
15043
15050
|
tasks,
|
|
15051
|
+
columnGroups: columnGroupViews(),
|
|
15044
15052
|
projectBlocks,
|
|
15045
15053
|
unlinkedPrs,
|
|
15046
15054
|
unlinkedSessions,
|
|
@@ -15147,9 +15155,8 @@ function devReasons(facts, columns, waived, threads) {
|
|
|
15147
15155
|
* `blockedIn` from `evaluateGate`.
|
|
15148
15156
|
*/
|
|
15149
15157
|
function columnCondition(column, facts, columns, waived, threads) {
|
|
15158
|
+
if (isTodoGroupColumn(column)) return [];
|
|
15150
15159
|
switch (column) {
|
|
15151
|
-
case "todo":
|
|
15152
|
-
case "ready-for-dev":
|
|
15153
15160
|
case "done": return [];
|
|
15154
15161
|
case "dev": return devReasons(facts, columns, waived, threads);
|
|
15155
15162
|
case "review":
|
|
@@ -15190,10 +15197,11 @@ function evaluateGate(column, facts, project) {
|
|
|
15190
15197
|
...marker
|
|
15191
15198
|
};
|
|
15192
15199
|
}
|
|
15193
|
-
/**
|
|
15200
|
+
/**
|
|
15201
|
+
* The exit conditions of each column outside the Todo group, which has none, in the order the
|
|
15202
|
+
* gates report their reasons.
|
|
15203
|
+
*/
|
|
15194
15204
|
const COLUMN_CONDITIONS = {
|
|
15195
|
-
todo: [],
|
|
15196
|
-
"ready-for-dev": [],
|
|
15197
15205
|
dev: [
|
|
15198
15206
|
"pr_open",
|
|
15199
15207
|
"not_draft",
|
|
@@ -15249,7 +15257,7 @@ function explainGates(facts, project) {
|
|
|
15249
15257
|
const gate = evaluateGate(column, facts, project);
|
|
15250
15258
|
const blockedIn = gate.ok ? null : gate.column;
|
|
15251
15259
|
const stopped = reasons.some((reason) => STOPS_DEV.has(reason));
|
|
15252
|
-
const conditions = COLUMN_CONDITIONS[column].map((condition) => {
|
|
15260
|
+
const conditions = (isTodoGroupColumn(column) ? [] : COLUMN_CONDITIONS[column]).map((condition) => {
|
|
15253
15261
|
const reason = reasons.find((r) => CONDITION_OF[r] === condition) ?? null;
|
|
15254
15262
|
if (reason === null) return {
|
|
15255
15263
|
condition,
|
|
@@ -15312,9 +15320,14 @@ const indexOf$2 = (column) => COLUMN_IDS.indexOf(column);
|
|
|
15312
15320
|
function orchestratorOf(project, column) {
|
|
15313
15321
|
return project.columns.find((c) => c.id === column)?.orchestrator ?? "none";
|
|
15314
15322
|
}
|
|
15315
|
-
|
|
15323
|
+
const groupOf = (column) => COLUMNS.find((c) => c.id === column)?.group ?? null;
|
|
15324
|
+
/**
|
|
15325
|
+
* The next enabled column of the project right of `column`, if any. From a column of a group it
|
|
15326
|
+
* skips the rest of that group, so a task leaves the group in one move.
|
|
15327
|
+
*/
|
|
15316
15328
|
function nextColumn(project, column) {
|
|
15317
|
-
|
|
15329
|
+
const group = groupOf(column);
|
|
15330
|
+
return project.columns.find((c) => c.enabled && indexOf$2(c.id) > indexOf$2(column) && (group === null || groupOf(c.id) !== group))?.id;
|
|
15318
15331
|
}
|
|
15319
15332
|
/** A left move to `to` voids the submits of `to` and right of it; marks stay. */
|
|
15320
15333
|
function dropSubmits(marks, to) {
|
|
@@ -15334,8 +15347,9 @@ function absenceReady(input) {
|
|
|
15334
15347
|
/**
|
|
15335
15348
|
* What holds the dispatcher on the task now: a blind GitHub or a pending submit stops it, a blind
|
|
15336
15349
|
* Spur defers a worker's turn, an active cycle-limit or course-check item stops every turn and
|
|
15337
|
-
* move right, and To Do
|
|
15338
|
-
* task's column, while `dispatch` judges it at each column the cascade
|
|
15350
|
+
* move right, and the Todo group (To Do, Triage, Ready for Dev) waits for the work to start. The
|
|
15351
|
+
* last is judged at the task's column, while `dispatch` judges it at each column the cascade
|
|
15352
|
+
* reaches.
|
|
15339
15353
|
*/
|
|
15340
15354
|
function dispatchHolds(input) {
|
|
15341
15355
|
const holds = [];
|
|
@@ -15343,7 +15357,7 @@ function dispatchHolds(input) {
|
|
|
15343
15357
|
if (input.spurBlind || input.column !== "done" && input.facts.pr?.state !== "merged" && ticketFinished(input) && !input.spurReady) holds.push("spur_blind");
|
|
15344
15358
|
if (input.submitPending) holds.push("submit_pending");
|
|
15345
15359
|
if (input.cycleHeld) holds.push("cycle_limit");
|
|
15346
|
-
if ((input.column
|
|
15360
|
+
if (isTodoGroupColumn(input.column) && !workStarted(input) && !absenceReady(input)) holds.push("work_not_started");
|
|
15347
15361
|
return holds;
|
|
15348
15362
|
}
|
|
15349
15363
|
/**
|
|
@@ -15428,7 +15442,7 @@ function dispatch(input) {
|
|
|
15428
15442
|
}
|
|
15429
15443
|
const gate = evaluateGate(column, facts, project);
|
|
15430
15444
|
if (gate.ok) {
|
|
15431
|
-
if ((column
|
|
15445
|
+
if (isTodoGroupColumn(column) && !started) return result(null);
|
|
15432
15446
|
const next = nextColumn(project, column);
|
|
15433
15447
|
if (cycleHeld || next === void 0 || next === "done") return result(null);
|
|
15434
15448
|
move(next, "gate_passed");
|
|
@@ -16467,7 +16481,8 @@ const modeKey = (project) => `dispatcher_mode:${project}`;
|
|
|
16467
16481
|
const cursorSchema = z.int().min(0);
|
|
16468
16482
|
const modeSchema = z.enum(DISPATCHER_MODES);
|
|
16469
16483
|
/** Columns whose submissions are marks: they last for their head across visits. */
|
|
16470
|
-
const MARK_COLUMNS =
|
|
16484
|
+
const MARK_COLUMNS = COLUMNS.filter((c) => c.marks).map((c) => c.id);
|
|
16485
|
+
const isMarkColumn = (column) => MARK_COLUMNS.includes(column);
|
|
16471
16486
|
const indexOf = (column) => COLUMN_IDS.indexOf(column);
|
|
16472
16487
|
/**
|
|
16473
16488
|
* Sets `voided_at` on the unvoided submits of `columns`. Review and product-review marks are
|
|
@@ -16950,7 +16965,7 @@ async function readInput(trx, task, project, mode, blind, config, clock) {
|
|
|
16950
16965
|
"pending_until"
|
|
16951
16966
|
]).where("task_id", "=", task.id).where("voided_at", "is", null).orderBy("id").execute()).filter((row) => row.pending_until === null || pending?.state === "confirmed" && row.id === pending.id).map((row) => {
|
|
16952
16967
|
const headSha = row.commit_sha.toLowerCase();
|
|
16953
|
-
return row.column
|
|
16968
|
+
return isMarkColumn(row.column) ? {
|
|
16954
16969
|
kind: "mark",
|
|
16955
16970
|
column: row.column,
|
|
16956
16971
|
headSha
|
|
@@ -17835,13 +17850,7 @@ function createTaskQueries(deps) {
|
|
|
17835
17850
|
}
|
|
17836
17851
|
// ../core/src/app/turn-commands.ts
|
|
17837
17852
|
/** Columns a task returns to Dev from: right of Dev, before the terminal Done. */
|
|
17838
|
-
const RETURNABLE =
|
|
17839
|
-
"review",
|
|
17840
|
-
"product-review",
|
|
17841
|
-
"external-review",
|
|
17842
|
-
"qa",
|
|
17843
|
-
"ready-to-merge"
|
|
17844
|
-
];
|
|
17853
|
+
const RETURNABLE = COLUMNS.filter((c) => c.returnable).map((c) => c.id);
|
|
17845
17854
|
const turnNumber = (id) => Number(id.slice(1));
|
|
17846
17855
|
const turnLabel = (id) => `T${String(id)}`;
|
|
17847
17856
|
async function turnById(db, id) {
|
|
@@ -18296,12 +18305,14 @@ function createOperationRegistry(deps) {
|
|
|
18296
18305
|
id: project.id,
|
|
18297
18306
|
columns: project.columns.filter((column) => column.enabled).map((column) => {
|
|
18298
18307
|
const named = column.orchestrator === "none" || column.orchestrator === "operator" ? void 0 : project.spurProjects.find((spur) => spur.name === column.orchestrator);
|
|
18308
|
+
const group = COLUMNS.find((c) => c.id === column.id)?.group ?? null;
|
|
18299
18309
|
return {
|
|
18300
18310
|
id: column.id,
|
|
18301
18311
|
executor: {
|
|
18302
18312
|
kind: column.orchestrator === "operator" ? "operator" : named?.role === "curator" ? "curator" : named !== void 0 ? "orchestrator" : column.id === "external-review" ? "dispatcher" : "worker",
|
|
18303
18313
|
name: named?.name ?? null
|
|
18304
|
-
}
|
|
18314
|
+
},
|
|
18315
|
+
...group === null ? {} : { group }
|
|
18305
18316
|
};
|
|
18306
18317
|
}),
|
|
18307
18318
|
dispatcher: { mode: project.dispatcher.mode },
|
package/dist/mcp.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { p as OPERATIONS, rt as ERRORS, v as renderMcpError } from "./chunk-
|
|
2
|
-
import { o as CliError, r as requestOperation } from "./chunk-
|
|
3
|
-
import { a as memoryVerdictCache, c as loadClientConfig, r as compareCatalogs, t as checkCatalog } from "./chunk-
|
|
1
|
+
import { p as OPERATIONS, rt as ERRORS, v as renderMcpError } from "./chunk-CkMLCW2S.mjs";
|
|
2
|
+
import { o as CliError, r as requestOperation } from "./chunk-B1Mpg_7f.mjs";
|
|
3
|
+
import { a as memoryVerdictCache, c as loadClientConfig, r as compareCatalogs, t as checkCatalog } from "./chunk-CBZ5yyYo.mjs";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import { readFileSync } from "node:fs";
|
|
6
6
|
import { z } from "zod";
|