spur-board 0.158.0 → 0.159.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-Cly2ejBA.mjs → chunk-BUxxW9le.mjs} +6 -1
- package/dist/{chunk-Bhv5wzSj.mjs → chunk-BVb6nX0w.mjs} +2 -2
- package/dist/{chunk-PSohvh-P.mjs → chunk-f54aP3OF.mjs} +1 -1
- package/dist/cli.mjs +4 -3
- package/dist/client.mjs +1 -1
- package/dist/daemon.mjs +52 -6
- package/dist/mcp.mjs +3 -3
- package/package.json +1 -1
- package/skills/setup/references/inspect.md +1 -1
|
@@ -6022,6 +6022,11 @@ const tokenRequestStatusSchema = z.strictObject({ status: z.enum([...TOKEN_STATU
|
|
|
6022
6022
|
function requestHashOf(hash) {
|
|
6023
6023
|
return hash.slice(0, 10);
|
|
6024
6024
|
}
|
|
6025
|
+
/**
|
|
6026
|
+
* The oldest Spur release with every Spur API the Board calls: transition polling
|
|
6027
|
+
* (`GET /sessions/transitions`, Spur #1447). Bump it with the feature that needs a newer Spur.
|
|
6028
|
+
*/
|
|
6029
|
+
const SPUR_MIN_VERSION = "1.53.0";
|
|
6025
6030
|
const checkShape = {
|
|
6026
6031
|
id: z.string(),
|
|
6027
6032
|
status: z.enum([
|
|
@@ -6055,4 +6060,4 @@ const remoteDoctorReportSchema = z.object({
|
|
|
6055
6060
|
function assertNever(value) {
|
|
6056
6061
|
throw new Error(`Unexpected value: ${JSON.stringify(value)}`);
|
|
6057
6062
|
}
|
|
6058
|
-
export {
|
|
6063
|
+
export { prRefSchema as $, EVENT_KINDS as A, plainHttpAllowed as At, prSourceId as B, SLACK_BOT_SCOPES as Bt, inboundEventSchema as C, approvalRuleOf as Ct, skillReloadFileSchema as D, configSchema as Dt, userIdSchema as E, configBindings as Et, MIRROR_FAILURE_CODES as F, COLUMNS as Ft, REVIEW_DECISIONS as G, sourceCursorSchema as H, TODO_GROUP_COLUMN_IDS as Ht, batchSchema as I, COLUMN_GROUPS as It, SESSION_STATUSES as J, REVIEW_STATES as K, defaultBranchFactSchema as L, COLUMN_IDS as Lt, eventPayloadSchemas as M, requiredSecretKeys as Mt, AdapterError as N, resolveWebOrigin as Nt, skillReloadFilesSchema as O, defaultAddressee as Ot, MIRROR_FAILURES as P, BLOCK_TYPES as Pt, prFactsSchema as Q, entityRefSchema as R, DISPATCHER_MODES as Rt, conversationRefSchema as S, RESERVED_PROJECT as St, messageRefSchema as T, columnTurnTimings as Tt, trackerSourceId as U, VIAS as Ut, sessionTransitionSchema as V, TASK_HOLDS as Vt, PR_STATES as W, isTodoGroupColumn as Wt, parseRingMarker as X, isExternalAuthor as Y, prApprovalPairSchema as Z, turnHandedSchema as _, DEFAULT_HTTP_PORT as _t, TOKEN_REQUEST_LIMITS as a, REF_NUMBER as at, renderMcpError as b, DEFAULT_SLACK_COMMAND as bt, tokenRequestSchema as c, errorCodeOf as ct, SYSTEMD_SERVICE_SETTINGS as d, ERRORS as dt, prReviewRuleSchema as et, buildCatalogSnapshot as f, err as ft, inboxNoSessionSchema as g, successEnvelopeSchema as gt, defaultBranchViewSchema as h, ok as ht, remoteDoctorReportSchema as i, JIRA_PROJECT_KEY as it, GATE_REASONS as j, readyMirrorOf as jt, sortSkillFiles as k, externalQuietAfterMs as kt, tokenRequestStatusSchema as l, parseActorId as lt, OPERATIONS as m, errorEnvelopeSchema as mt, SPUR_MIN_VERSION as n, sessionFactsSchema as nt, requestHashOf as o, actorIdSchema as ot, roleCanUseOperation as p, errorContextSchema as pt, SESSION_HEALTH_STATES as q, doctorReportSchema as r, ticketFactsSchema as rt, tokenRequestResultSchema as s, encodeActorId as st, assertNever as t, ringMarker as tt, BOARD_TICK_MS as u, parseRef as ut, renderHttpProblem as v, DEFAULT_LINK as vt, interactionRefSchema as w, boardWideSpurProject as wt, SPACE_IDS as x, DEFAULT_STAND_PORT_RANGE as xt, renderJsonError as y, DEFAULT_SLACK_APP_NAME as yt, mirrorSourceId as z, ITEM_KINDS as zt };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { o as CliError, t as fetchCatalogVersion } from "./chunk-
|
|
1
|
+
import { At as plainHttpAllowed, Dt as configSchema, f as buildCatalogSnapshot, m as OPERATIONS } from "./chunk-BUxxW9le.mjs";
|
|
2
|
+
import { o as CliError, t as fetchCatalogVersion } from "./chunk-f54aP3OF.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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { dt as ERRORS, gt as successEnvelopeSchema, l as tokenRequestStatusSchema, mt as errorEnvelopeSchema, pt as errorContextSchema, s as tokenRequestResultSchema, y as renderJsonError } from "./chunk-BUxxW9le.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { request } from "node:http";
|
package/dist/cli.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bt as SLACK_BOT_SCOPES, D as skillReloadFileSchema, Dt as configSchema, Mt as requiredSecretKeys, Nt as resolveWebOrigin, d as SYSTEMD_SERVICE_SETTINGS, dt as ERRORS, gt as successEnvelopeSchema, i as remoteDoctorReportSchema, k as sortSkillFiles, m as OPERATIONS, o as requestHashOf, ot as actorIdSchema, p as roleCanUseOperation, xt as DEFAULT_STAND_PORT_RANGE } from "./chunk-BUxxW9le.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-f54aP3OF.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-BVb6nX0w.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";
|
|
@@ -689,6 +689,7 @@ const remoteBaseIds = [
|
|
|
689
689
|
"link.rules",
|
|
690
690
|
"spur.api",
|
|
691
691
|
"spur.send",
|
|
692
|
+
"spur.version",
|
|
692
693
|
"operator.path",
|
|
693
694
|
"operator.tokens",
|
|
694
695
|
"curator.sessions",
|
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-f54aP3OF.mjs";
|
package/dist/daemon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as prRefSchema, A as EVENT_KINDS, At as plainHttpAllowed, B as prSourceId, Bt as SLACK_BOT_SCOPES, C as inboundEventSchema, Ct as approvalRuleOf, Dt as configSchema, E as userIdSchema, Et as configBindings, F as MIRROR_FAILURE_CODES, Ft as COLUMNS, G as REVIEW_DECISIONS, H as sourceCursorSchema, Ht as TODO_GROUP_COLUMN_IDS, I as batchSchema, It as COLUMN_GROUPS, J as SESSION_STATUSES, K as REVIEW_STATES, L as defaultBranchFactSchema, Lt as COLUMN_IDS, M as eventPayloadSchemas, Mt as requiredSecretKeys, N as AdapterError, Nt as resolveWebOrigin, O as skillReloadFilesSchema, Ot as defaultAddressee, P as MIRROR_FAILURES, Pt as BLOCK_TYPES, Q as prFactsSchema, R as entityRefSchema, Rt as DISPATCHER_MODES, S as conversationRefSchema, St as RESERVED_PROJECT, T as messageRefSchema, Tt as columnTurnTimings, U as trackerSourceId, Ut as VIAS, V as sessionTransitionSchema, Vt as TASK_HOLDS, W as PR_STATES, Wt as isTodoGroupColumn, X as parseRingMarker, Y as isExternalAuthor, Z as prApprovalPairSchema, _ as turnHandedSchema, a as TOKEN_REQUEST_LIMITS, at as REF_NUMBER, bt as DEFAULT_SLACK_COMMAND, c as tokenRequestSchema, ct as errorCodeOf, dt as ERRORS, et as prReviewRuleSchema, f as buildCatalogSnapshot, ft as err, g as inboxNoSessionSchema, gt as successEnvelopeSchema, h as defaultBranchViewSchema, ht as ok, it as JIRA_PROJECT_KEY, j as GATE_REASONS, jt as readyMirrorOf, k as sortSkillFiles, kt as externalQuietAfterMs, l as tokenRequestStatusSchema, lt as parseActorId, m as OPERATIONS, n as SPUR_MIN_VERSION, nt as sessionFactsSchema, o as requestHashOf, ot as actorIdSchema, p as roleCanUseOperation, q as SESSION_HEALTH_STATES, r as doctorReportSchema, rt as ticketFactsSchema, s as tokenRequestResultSchema, st as encodeActorId, t as assertNever, tt as ringMarker, u as BOARD_TICK_MS, ut as parseRef$1, v as renderHttpProblem, vt as DEFAULT_LINK, w as interactionRefSchema, wt as boardWideSpurProject, x as SPACE_IDS, z as mirrorSourceId, zt as ITEM_KINDS } from "./chunk-BUxxW9le.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";
|
|
@@ -29485,6 +29485,9 @@ const DEADLINE_MS = 5e3;
|
|
|
29485
29485
|
const SPUR_PROBE_SESSION = "spur-board-doctor-probe";
|
|
29486
29486
|
const SPUR_SEND_UNREACHABLE_FIX = "Start Spur or correct adapters.spur.baseUrl in config.yaml, then restart the service; the daemon sends doorbells to that Spur API.";
|
|
29487
29487
|
const SPUR_SEND_FIX = "The Spur API at adapters.spur.baseUrl did not accept a doorbell send; update Spur or point adapters.spur.baseUrl at the Spur daemon.";
|
|
29488
|
+
const SPUR_VERSION_UNREAD_FIX = `Could not read a Spur release version from GET /info at adapters.spur.baseUrl. Start Spur, or make sure the running Spur daemon is ${SPUR_MIN_VERSION} or newer: upgrade Spur if needed, restart the Spur daemon, then rerun board doctor.`;
|
|
29489
|
+
const SPUR_VERSION = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-\d+-g[0-9a-f]+)?$/;
|
|
29490
|
+
const spurInfoWire = z.object({ version: z.string().max(64) });
|
|
29488
29491
|
const GITHUB_FIX = "Check the GitHub token and repository access.";
|
|
29489
29492
|
const GITHUB_CHECKS_FIX = "Use a classic GitHub personal access token with the repo scope, authorized for organization SSO where required, to read check runs.";
|
|
29490
29493
|
const GITHUB_TEAMS_FIX = "Use a classic GitHub personal access token with the repo and read:org scopes to read requested review teams.";
|
|
@@ -29960,6 +29963,32 @@ async function operatorTokensCheck(ctx, config) {
|
|
|
29960
29963
|
fix: null
|
|
29961
29964
|
} : warning("operator.tokens", line);
|
|
29962
29965
|
}
|
|
29966
|
+
function spurVersionParts(version) {
|
|
29967
|
+
const parts = SPUR_VERSION.exec(version);
|
|
29968
|
+
return parts === null ? null : parts.slice(1, 4).map(Number);
|
|
29969
|
+
}
|
|
29970
|
+
/** `spur.version` from the version the running Spur daemon reports, or null when unread. */
|
|
29971
|
+
function spurVersionCheck(version) {
|
|
29972
|
+
const id = "spur.version";
|
|
29973
|
+
const parts = version === null ? null : spurVersionParts(version);
|
|
29974
|
+
const min = spurVersionParts(SPUR_MIN_VERSION);
|
|
29975
|
+
if (version === null || parts === null || min === null) return warning(id, SPUR_VERSION_UNREAD_FIX);
|
|
29976
|
+
return check(id, (parts.map((part, index) => part - (min[index] ?? 0)).find((diff) => diff !== 0) ?? 0) >= 0, `Spur ${version} is running, older than ${SPUR_MIN_VERSION}, the oldest Spur the Board supports; upgrade Spur to ${SPUR_MIN_VERSION} or newer, restart the Spur daemon, then rerun board doctor.`);
|
|
29977
|
+
}
|
|
29978
|
+
function readSpurVersion(ctx, fetcher, deadlineMs, baseUrl) {
|
|
29979
|
+
return deadlineCall(ctx, deadlineMs, "doctor.spur.version", "Spur version read failed", async (signal) => {
|
|
29980
|
+
const response = await fetcher(new URL("info", apiBaseUrl(baseUrl)), {
|
|
29981
|
+
method: "GET",
|
|
29982
|
+
signal
|
|
29983
|
+
});
|
|
29984
|
+
if (!response.ok) {
|
|
29985
|
+
await response.body?.cancel().catch(() => void 0);
|
|
29986
|
+
return null;
|
|
29987
|
+
}
|
|
29988
|
+
const parsed = spurInfoWire.safeParse(await response.json());
|
|
29989
|
+
return parsed.success ? parsed.data.version : null;
|
|
29990
|
+
});
|
|
29991
|
+
}
|
|
29963
29992
|
async function request(ctx, fetcher, deadlineMs, id, url, init = {}) {
|
|
29964
29993
|
try {
|
|
29965
29994
|
return await ctx.logCall(`doctor.${id}`, () => fetcher(url, {
|
|
@@ -30060,6 +30089,7 @@ async function runDaemonDoctor(ctx, productVersion, fetcher = fetch, { deadlineM
|
|
|
30060
30089
|
const { config, secrets } = ctx;
|
|
30061
30090
|
const checks = [];
|
|
30062
30091
|
const spurUi = spurUiCheck(ctx, fetcher, deadlineMs);
|
|
30092
|
+
const spurVersion = readSpurVersion(ctx, fetcher, deadlineMs, config.adapters.spur.baseUrl);
|
|
30063
30093
|
if (config.web.port !== void 0) checks.push(webListening?.() === true ? check("web.listening", true, "") : warning("web.listening", "Free the configured web port and restart the daemon."));
|
|
30064
30094
|
const jiraTrackers = config.projects.flatMap((project) => project.tracker.type === "jira" ? [project.tracker] : []);
|
|
30065
30095
|
const slackConfigured = Boolean(config.slack.channels.feed || config.slack.channels.orchestrators);
|
|
@@ -30092,11 +30122,26 @@ async function runDaemonDoctor(ctx, productVersion, fetcher = fetch, { deadlineM
|
|
|
30092
30122
|
if (ruled) checks.push(reviewRuleCheck(reviewRules === null ? null : await reviewRules));
|
|
30093
30123
|
if (mirrored) checks.push(mirrorCheck(mirrors === null ? null : await mirrors));
|
|
30094
30124
|
const probe = spurSendRequest(config.adapters.spur.baseUrl, SPUR_PROBE_SESSION, "spur-board doctor probe");
|
|
30095
|
-
const [
|
|
30096
|
-
|
|
30097
|
-
|
|
30098
|
-
|
|
30099
|
-
|
|
30125
|
+
const [spurOk, spurSend] = await Promise.all([request(ctx, fetcher, deadlineMs, "spur", new URL("sessions", apiBaseUrl(config.adapters.spur.baseUrl))).then((response) => response?.ok === true), request(ctx, fetcher, deadlineMs, "spur.send", probe.url, probe.init).then(async (response) => {
|
|
30126
|
+
if (response === null) return {
|
|
30127
|
+
reachable: false,
|
|
30128
|
+
ok: false
|
|
30129
|
+
};
|
|
30130
|
+
if (response.status !== 404) {
|
|
30131
|
+
await response.body?.cancel().catch(() => void 0);
|
|
30132
|
+
return {
|
|
30133
|
+
reachable: true,
|
|
30134
|
+
ok: false
|
|
30135
|
+
};
|
|
30136
|
+
}
|
|
30137
|
+
return {
|
|
30138
|
+
reachable: true,
|
|
30139
|
+
ok: (await spurErrorText(response))?.startsWith("Session not found") ?? false
|
|
30140
|
+
};
|
|
30141
|
+
})]);
|
|
30142
|
+
checks.push(check("spur.api", spurOk, "Start or correct the configured Spur API."));
|
|
30143
|
+
checks.push(check("spur.send", spurSend.ok, spurSend.reachable ? SPUR_SEND_FIX : SPUR_SEND_UNREACHABLE_FIX));
|
|
30144
|
+
const spurVersionAt = checks.length;
|
|
30100
30145
|
if (!slackConfigured) checks.push(warning("slack.configured", "Slack is not configured: questions addressed to you are only visible through board inbox. Run the spur-board-setup skill to configure slack.channels."));
|
|
30101
30146
|
else {
|
|
30102
30147
|
const botToken = secrets["SLACK_BOT_TOKEN"];
|
|
@@ -30144,6 +30189,7 @@ async function runDaemonDoctor(ctx, productVersion, fetcher = fetch, { deadlineM
|
|
|
30144
30189
|
checks.push(curatorSessionsCheck(await curatorSessions(ctx.store.db, config)));
|
|
30145
30190
|
checks.push(orchestratorSessionsCheck(await orchestratorSessions(ctx.store.db, config)));
|
|
30146
30191
|
checks.push(await spurUi);
|
|
30192
|
+
checks.splice(spurVersionAt, 0, spurVersionCheck(await spurVersion));
|
|
30147
30193
|
return {
|
|
30148
30194
|
version: productVersion,
|
|
30149
30195
|
checks
|
package/dist/mcp.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
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 { b as renderMcpError, dt as ERRORS, m as OPERATIONS } from "./chunk-BUxxW9le.mjs";
|
|
2
|
+
import { o as CliError, r as requestOperation } from "./chunk-f54aP3OF.mjs";
|
|
3
|
+
import { a as memoryVerdictCache, c as loadClientConfig, r as compareCatalogs, t as checkCatalog } from "./chunk-BVb6nX0w.mjs";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import { readFileSync } from "node:fs";
|
|
6
6
|
import { z } from "zod";
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Inspect
|
|
2
2
|
|
|
3
3
|
- Check Linux, systemd user services, npm, `flock`, and Node 24.12+ (24.x) or 26.x. Read the PATH and Node executable from a live Spur session and check its version; the interactive shell may use another Node. Stop with a specific fix for any missing prerequisite.
|
|
4
|
-
- Check Spur through its HTTP API, or run its CLI from the home folder. Running it inside a folder with `spur.yaml` can attach that folder to the daemon.
|
|
4
|
+
- Check Spur through its HTTP API, or run its CLI from the home folder. The running Spur daemon must be Spur 1.53.0 or newer; `board doctor` reports it as `spur.version`. `spur --version` shows the installed CLI, not the daemon, so restart the Spur daemon after upgrading Spur. Running it inside a folder with `spur.yaml` can attach that folder to the daemon.
|
|
5
5
|
- Locate `config.yaml` and `secrets.env` under `$XDG_CONFIG_HOME/spur-board/` (default `$HOME/.config/spur-board/`), or under `$BOARD_HOME` when set. Inspect configured fields, required secret _names_ and file modes, package and skill versions, service status, operator access, and product-skill visibility. Never print private file contents.
|