spur-board 0.57.0 → 0.59.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-BiDQ4g_3.mjs → chunk-BY5dr3F6.mjs} +1 -1
- package/dist/{chunk-Fhr2daA8.mjs → chunk-DjdHFn4C.mjs} +2 -2
- package/dist/{chunk-CTXzapf8.mjs → chunk-ZywNbxbW.mjs} +66 -14
- package/dist/cli.mjs +5 -4
- package/dist/client.mjs +1 -1
- package/dist/daemon.mjs +395 -208
- package/dist/mcp.mjs +3 -3
- package/dist/migrations/0018_project_block.sql +115 -0
- package/package.json +1 -1
- package/skills/spur-board/SKILL.md +19 -16
- package/skills/spur-board/references/commands.md +15 -5
- package/skills/spur-board/references/how-board-works.md +138 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as errorContextSchema, S as renderJsonError,
|
|
1
|
+
import { $ as errorEnvelopeSchema, Q as errorContextSchema, S as renderJsonError, X as ERRORS, c as tokenRequestStatusSchema, o as tokenRequestResultSchema, tt as successEnvelopeSchema } from "./chunk-ZywNbxbW.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 { _ as buildCatalogSnapshot, ct as
|
|
2
|
-
import { o as CliError, t as fetchCatalogVersion } from "./chunk-
|
|
1
|
+
import { _ as buildCatalogSnapshot, ct as plainHttpAllowed, st as configSchema, y as OPERATIONS } from "./chunk-ZywNbxbW.mjs";
|
|
2
|
+
import { o as CliError, t as fetchCatalogVersion } from "./chunk-BY5dr3F6.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";
|
|
@@ -292,8 +292,9 @@ const spurProject = z.strictObject({
|
|
|
292
292
|
role: z.enum([
|
|
293
293
|
"worker",
|
|
294
294
|
"operator",
|
|
295
|
-
"curator"
|
|
296
|
-
|
|
295
|
+
"curator",
|
|
296
|
+
"orchestrator"
|
|
297
|
+
]).describe("worker: sessions of this Spur project may link to this project's tasks through their PR or branch. operator: sessions act as the operator. orchestrator: sessions execute named columns and never become task workers. curator: sessions answer the questions no column orchestrator takes and escalate the rest to the operator; a board project has at most one."),
|
|
297
298
|
displayName: nonEmpty.max(80).optional().describe("The name a curator's answer lines in the feed are posted under. Defaults to the Spur project name. Only for a curator."),
|
|
298
299
|
icon: z.string().regex(/^:[a-z0-9_+'-]+:$/, "Expected an emoji shortcode such as :owl:").optional().describe("The emoji shortcode, such as :owl:, shown on a curator's answer lines in the feed instead of the curator icon. Only for a curator.")
|
|
299
300
|
});
|
|
@@ -302,7 +303,7 @@ const DEFAULT_COURSE_CHECK = 3;
|
|
|
302
303
|
const columnConfig = z.strictObject({
|
|
303
304
|
id: z.enum(COLUMN_IDS, { error: (issue) => typeof issue.input === "string" ? `Unknown column ${JSON.stringify(issue.input)}: custom columns arrive with custom matchers and are not supported yet. Built-in columns: ${COLUMN_IDS.join(", ")}` : void 0 }).describe("The built-in column this entry configures."),
|
|
304
305
|
enabled: z.boolean().default(true).describe("false skips the column: tasks move past it and its exit condition is not checked. todo, dev and done cannot be disabled."),
|
|
305
|
-
orchestrator: nonEmpty.default("none").describe("Who takes the column's turns. none: the task's live worker session, else the operator. operator: the operator, who also gets the questions asked in the column. Otherwise the name of a spurProjects entry whose sessions orchestrate the column and get the questions others ask in it."),
|
|
306
|
+
orchestrator: nonEmpty.default("none").describe("Who takes the column's turns. none: the task's live worker session, else the operator. operator: the operator, who also gets the questions asked in the column. Otherwise the name of a spurProjects entry with role orchestrator or curator whose sessions orchestrate the column and get the questions others ask in it."),
|
|
306
307
|
cycleLimit: z.int().min(1).default(DEFAULT_CYCLE_LIMIT).describe("How many times a task may return to Dev from this column before the board stops it for the operator. Returns by the column executor, changes requested and external comments count; a conflict, red CI and a draft do not."),
|
|
307
308
|
courseCheck: z.int().min(0).default(DEFAULT_COURSE_CHECK).describe("How many returns to Dev from this column, counted as for cycleLimit, before the board holds the task and asks courseCheckTo (by default the curator, or the operator when the project has no curator) to check its course. The answer resets the count and reaches the worker as a task comment. 0 turns the check off; cycleLimit is checked first."),
|
|
308
309
|
courseCheckTo: nonEmpty.optional().describe("Who answers this column's course check: operator, the curator's name, or the name of a column orchestrator. Without it, the curator, or the operator when the project has no curator. When the addressee has no live session the question moves to the operator; a conductor that is rung and does not answer keeps it, and the operator gets an item.")
|
|
@@ -397,7 +398,7 @@ const projectSchema = z.strictObject({
|
|
|
397
398
|
message: `Repository ${JSON.stringify(repo)} is not in repos`
|
|
398
399
|
});
|
|
399
400
|
});
|
|
400
|
-
const spurNames = new Set(project.spurProjects.map((p) => p.name));
|
|
401
|
+
const spurNames = new Set(project.spurProjects.filter((p) => p.role === "orchestrator" || p.role === "curator").map((p) => p.name));
|
|
401
402
|
project.columns.forEach(({ orchestrator }, j) => {
|
|
402
403
|
if (orchestrator === "none" || orchestrator === "operator" || spurNames.has(orchestrator)) return;
|
|
403
404
|
ctx.addIssue({
|
|
@@ -407,14 +408,14 @@ const projectSchema = z.strictObject({
|
|
|
407
408
|
j,
|
|
408
409
|
"orchestrator"
|
|
409
410
|
],
|
|
410
|
-
message: `Unknown orchestrator ${JSON.stringify(orchestrator)}: use none, operator or a spurProjects name`
|
|
411
|
+
message: `Unknown orchestrator ${JSON.stringify(orchestrator)}: use none, operator or a spurProjects name with role orchestrator or curator`
|
|
411
412
|
});
|
|
412
413
|
});
|
|
413
414
|
const curator = project.spurProjects.find((p) => p.role === "curator")?.name;
|
|
414
415
|
const orchestrators = new Set(project.columns.map((column) => column.orchestrator).filter((name) => name !== "none" && name !== "operator"));
|
|
415
416
|
project.columns.forEach(({ courseCheckTo }, j) => {
|
|
416
417
|
if (courseCheckTo === void 0 || courseCheckTo === "operator") return;
|
|
417
|
-
const known =
|
|
418
|
+
const known = project.spurProjects.some((spur) => spur.name === courseCheckTo);
|
|
418
419
|
if (known && (courseCheckTo === curator || orchestrators.has(courseCheckTo))) return;
|
|
419
420
|
const name = JSON.stringify(courseCheckTo);
|
|
420
421
|
ctx.addIssue({
|
|
@@ -1873,7 +1874,7 @@ function defineOperation(spec) {
|
|
|
1873
1874
|
*/
|
|
1874
1875
|
const commentSchema = z.strictObject({
|
|
1875
1876
|
id: commentIdSchema,
|
|
1876
|
-
task: taskKeySchema,
|
|
1877
|
+
task: taskKeySchema.nullable().describe("Task the comment is on; null on a project-level block."),
|
|
1877
1878
|
block: blockIdSchema.nullable().describe("Block this comment belongs to; null for a task comment."),
|
|
1878
1879
|
author: actorIdSchema,
|
|
1879
1880
|
at: z.iso.datetime().describe("When the comment was written, ISO 8601 UTC."),
|
|
@@ -1890,7 +1891,8 @@ const taskViewSchema = z.strictObject({
|
|
|
1890
1891
|
}).describe("A task on the board.");
|
|
1891
1892
|
const blockViewSchema = z.strictObject({
|
|
1892
1893
|
id: blockIdSchema,
|
|
1893
|
-
task: taskKeySchema,
|
|
1894
|
+
task: taskKeySchema.nullable().describe("Task the block is on; null for a project-level block."),
|
|
1895
|
+
project: z.string().min(1).optional().describe("Board project of a project-level block; absent on a task block."),
|
|
1894
1896
|
type: z.enum(BLOCK_TYPES).describe("Block type."),
|
|
1895
1897
|
state: z.enum(BLOCK_STATES).describe("Whether the block is open or unblocked."),
|
|
1896
1898
|
author: actorIdSchema,
|
|
@@ -2324,7 +2326,7 @@ const OPERATIONS = [
|
|
|
2324
2326
|
kind: "query",
|
|
2325
2327
|
description: "List actionable items, source freshness and compact tasks; detail adds full facts and links.",
|
|
2326
2328
|
mcp: {
|
|
2327
|
-
whenToUse: "Get a board overview
|
|
2329
|
+
whenToUse: "Get a board overview.",
|
|
2328
2330
|
whenNotToUse: "Use task_get for one task."
|
|
2329
2331
|
},
|
|
2330
2332
|
input: z.strictObject({
|
|
@@ -2345,6 +2347,10 @@ const OPERATIONS = [
|
|
|
2345
2347
|
}).describe("Transport health of one gateway.")).describe("Transport health of each chat gateway."),
|
|
2346
2348
|
sources: z.array(sourceViewSchema).describe("Freshness and availability of each source."),
|
|
2347
2349
|
tasks: z.array(statusTaskSchema).describe("Tasks on the board with state and counts; facts and links with detail."),
|
|
2350
|
+
projectBlocks: z.array(z.strictObject({
|
|
2351
|
+
project: z.string().min(1).describe("Board project."),
|
|
2352
|
+
openBlocks: z.int().min(0).describe("Open project-level blocks, without a task.")
|
|
2353
|
+
}).describe("Open project-level blocks of one project.")).describe("Open project-level blocks of each requested project."),
|
|
2348
2354
|
unlinkedPrs: z.array(statusUnlinkedPrSchema).describe("Observed pull requests without a task link; merged or closed ones with no change for over 7 days are left out."),
|
|
2349
2355
|
unlinkedSessions: z.array(statusUnlinkedSessionSchema).describe("Observed sessions without a task link; ones ended, or gone from Spur's session list, for over 7 days are left out."),
|
|
2350
2356
|
hiddenUnlinkedPrs: z.int().min(0).describe("Unlinked pull requests not listed: merged or closed, with no change for over 7 days. Counted within the requested projects; detail does not list them."),
|
|
@@ -2377,6 +2383,10 @@ const OPERATIONS = [
|
|
|
2377
2383
|
sessionCount: 0,
|
|
2378
2384
|
openBlocks: 0
|
|
2379
2385
|
}],
|
|
2386
|
+
projectBlocks: [{
|
|
2387
|
+
project: "web",
|
|
2388
|
+
openBlocks: 0
|
|
2389
|
+
}],
|
|
2380
2390
|
unlinkedPrs: [],
|
|
2381
2391
|
unlinkedSessions: [],
|
|
2382
2392
|
hiddenUnlinkedPrs: 0,
|
|
@@ -2403,6 +2413,10 @@ const OPERATIONS = [
|
|
|
2403
2413
|
sessions: [],
|
|
2404
2414
|
links: []
|
|
2405
2415
|
}],
|
|
2416
|
+
projectBlocks: [{
|
|
2417
|
+
project: "web",
|
|
2418
|
+
openBlocks: 0
|
|
2419
|
+
}],
|
|
2406
2420
|
unlinkedPrs: [],
|
|
2407
2421
|
unlinkedSessions: [],
|
|
2408
2422
|
hiddenUnlinkedPrs: 0,
|
|
@@ -2566,7 +2580,7 @@ const OPERATIONS = [
|
|
|
2566
2580
|
usage: "/board task <KEY> history"
|
|
2567
2581
|
},
|
|
2568
2582
|
examples: [{
|
|
2569
|
-
summary: "Show
|
|
2583
|
+
summary: "Show task history",
|
|
2570
2584
|
input: { task: "acme/web#42" },
|
|
2571
2585
|
output: {
|
|
2572
2586
|
task: {
|
|
@@ -3037,6 +3051,44 @@ const OPERATIONS = [
|
|
|
3037
3051
|
output: { block: question }
|
|
3038
3052
|
}]
|
|
3039
3053
|
}),
|
|
3054
|
+
defineOperation({
|
|
3055
|
+
id: "project.ask",
|
|
3056
|
+
kind: "mutation",
|
|
3057
|
+
description: "Ask the operator about a project, not a task.",
|
|
3058
|
+
mcp: {
|
|
3059
|
+
whenToUse: "A question has no task.",
|
|
3060
|
+
whenNotToUse: "Use block_ask for a task question.",
|
|
3061
|
+
destructive: false
|
|
3062
|
+
},
|
|
3063
|
+
input: z.strictObject({
|
|
3064
|
+
project: z.string().min(1).max(NAME_MAX).describe("Board project the question is about."),
|
|
3065
|
+
to: z.literal("operator").describe("Who answers; only the operator."),
|
|
3066
|
+
text: text("The question.", TEXT_MAX)
|
|
3067
|
+
}),
|
|
3068
|
+
output: blockOutput,
|
|
3069
|
+
grants: [{ grant: "project-agent" }],
|
|
3070
|
+
errors: ["not_found"],
|
|
3071
|
+
cli: {
|
|
3072
|
+
command: "project ask",
|
|
3073
|
+
args: ["project", "text"]
|
|
3074
|
+
},
|
|
3075
|
+
slack: null,
|
|
3076
|
+
examples: [{
|
|
3077
|
+
summary: "Ask to restart",
|
|
3078
|
+
input: {
|
|
3079
|
+
project: "web",
|
|
3080
|
+
to: "operator",
|
|
3081
|
+
text: "Restart?"
|
|
3082
|
+
},
|
|
3083
|
+
output: { block: {
|
|
3084
|
+
...question,
|
|
3085
|
+
id: "B15",
|
|
3086
|
+
task: null,
|
|
3087
|
+
project: "web",
|
|
3088
|
+
reason: "Restart?"
|
|
3089
|
+
} }
|
|
3090
|
+
}]
|
|
3091
|
+
}),
|
|
3040
3092
|
defineOperation({
|
|
3041
3093
|
id: "comment.add",
|
|
3042
3094
|
kind: "mutation",
|
|
@@ -3180,7 +3232,7 @@ const OPERATIONS = [
|
|
|
3180
3232
|
},
|
|
3181
3233
|
slack: null,
|
|
3182
3234
|
examples: [{
|
|
3183
|
-
summary: "Escalate a failing build
|
|
3235
|
+
summary: "Escalate a failing build",
|
|
3184
3236
|
input: { block: "B13" },
|
|
3185
3237
|
output: { block: {
|
|
3186
3238
|
...codeBlock,
|
|
@@ -3345,7 +3397,7 @@ const OPERATIONS = [
|
|
|
3345
3397
|
slack: null,
|
|
3346
3398
|
examples: [
|
|
3347
3399
|
{
|
|
3348
|
-
summary: "Unblock after
|
|
3400
|
+
summary: "Unblock after a fix",
|
|
3349
3401
|
input: {
|
|
3350
3402
|
mode: "done",
|
|
3351
3403
|
block: "B13",
|
|
@@ -3427,7 +3479,7 @@ const OPERATIONS = [
|
|
|
3427
3479
|
},
|
|
3428
3480
|
slack: null,
|
|
3429
3481
|
examples: [{
|
|
3430
|
-
summary: "Submit the pull request head
|
|
3482
|
+
summary: "Submit the pull request head",
|
|
3431
3483
|
input: {
|
|
3432
3484
|
turn: "T4",
|
|
3433
3485
|
sha: submittedSha
|
|
@@ -3901,4 +3953,4 @@ function assertNever(value) {
|
|
|
3901
3953
|
throw new Error(`Unexpected value: ${JSON.stringify(value)}`);
|
|
3902
3954
|
}
|
|
3903
3955
|
//#endregion
|
|
3904
|
-
export {
|
|
3956
|
+
export { errorEnvelopeSchema as $, EVENT_KINDS as A, ringMarker as B, renderMcpError as C, interactionRefSchema as D, inboundEventSchema as E, SESSION_STATUSES as F, actorIdSchema as G, ticketFactsSchema as H, isExternalAuthor as I, parseActorId as J, encodeActorId as K, parseRingMarker as L, PR_STATES as M, REVIEW_STATES as N, messageRefSchema as O, SESSION_HEALTH_STATES as P, errorContextSchema as Q, prFactsSchema as R, renderJsonError as S, conversationRefSchema as T, JIRA_PROJECT_KEY as U, sessionFactsSchema as V, REF_NUMBER as W, ERRORS as X, parseRef as Y, err as Z, buildCatalogSnapshot as _, requestHashOf as a, DEFAULT_SLACK_COMMAND as at, turnHandedSchema as b, tokenRequestStatusSchema as c, plainHttpAllowed as ct, AdapterError as d, DISPATCHER_MODES as dt, ok as et, batchSchema as f, SLACK_BOT_SCOPES as ft, trackerSourceId as g, sourceCursorSchema as h, TOKEN_REQUEST_LIMITS as i, DEFAULT_SLACK_APP_NAME as it, eventPayloadSchemas as j, userIdSchema as k, BOARD_TICK_MS as l, requiredSecretKeys as lt, prSourceId as m, doctorReportSchema as n, DEFAULT_HTTP_PORT as nt, tokenRequestResultSchema as o, RESERVED_PROJECT as ot, entityRefSchema as p, TASK_HOLDS as pt, errorCodeOf as q, remoteDoctorReportSchema as r, DEFAULT_LINK as rt, tokenRequestSchema as s, configSchema as st, assertNever as t, successEnvelopeSchema as tt, SYSTEMD_SERVICE_SETTINGS as u, COLUMN_IDS as ut, roleCanUseOperation as v, SPACE_IDS as w, renderHttpProblem as x, OPERATIONS as y, prRefSchema as z };
|
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { G as actorIdSchema,
|
|
1
|
+
import { G as actorIdSchema, X as ERRORS, a as requestHashOf, ft as SLACK_BOT_SCOPES, lt as requiredSecretKeys, r as remoteDoctorReportSchema, st as configSchema, tt as successEnvelopeSchema, u as SYSTEMD_SERVICE_SETTINGS, v as roleCanUseOperation, y as OPERATIONS } from "./chunk-ZywNbxbW.mjs";
|
|
2
2
|
import { t as apiBaseUrl } from "./chunk-DAMwWWmT.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-BY5dr3F6.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-DjdHFn4C.mjs";
|
|
5
5
|
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
6
6
|
import { accessSync, chmodSync, closeSync, constants, cpSync, existsSync, ftruncateSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync, writeSync } from "node:fs";
|
|
7
7
|
import { homedir, hostname, userInfo } from "node:os";
|
|
@@ -321,7 +321,8 @@ const remoteBaseIds = [
|
|
|
321
321
|
"spur.send",
|
|
322
322
|
"operator.path",
|
|
323
323
|
"operator.tokens",
|
|
324
|
-
"curator.sessions"
|
|
324
|
+
"curator.sessions",
|
|
325
|
+
"orchestrator.sessions"
|
|
325
326
|
];
|
|
326
327
|
const remoteSlackIds = [
|
|
327
328
|
"slack.auth",
|
package/dist/client.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as requestTokenEnrollment, i as requestSkillReload, n as fetchTokenStatus, r as requestOperation, t as fetchCatalogVersion } from "./chunk-
|
|
1
|
+
import { a as requestTokenEnrollment, i as requestSkillReload, n as fetchTokenStatus, r as requestOperation, t as fetchCatalogVersion } from "./chunk-BY5dr3F6.mjs";
|
|
2
2
|
export { fetchCatalogVersion, fetchTokenStatus, requestOperation, requestSkillReload, requestTokenEnrollment };
|