spur-board 0.21.0 → 0.21.1
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/cli.mjs +6 -6
- package/dist/{client-DPui_SJQ.mjs → client-B4JXkdZu.mjs} +1 -1
- package/dist/client.mjs +1 -1
- package/dist/{config-5V7e_pTh.mjs → config-CreYUbFe.mjs} +21 -5
- package/dist/daemon.mjs +2 -1
- package/dist/mcp.mjs +3 -3
- package/dist/{src-21T39XXT.mjs → src-C6fOCG5L.mjs} +5 -1
- package/package.json +1 -1
- package/skills/setup/SKILL.md +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { G as SLACK_BOT_SCOPES, P as ERRORS, U as configSchema, W as requiredSecretKeys, l as roleCanUseOperation, r as SYSTEMD_SERVICE_SETTINGS, u as OPERATIONS } from "./src-
|
|
2
|
-
import { a as errorExitCode, i as CliError, n as requestOperation, o as renderCliError, r as requestTokenEnrollment, s as escapeTerminalControls } from "./client-
|
|
3
|
-
import { a as memoryVerdictCache, c as loadClientConfig, d as resolveDaemonAddress, i as fileVerdictCache, l as loadEnrollmentConfig, n as cliPackageVersion, o as configFile, s as dataDirectory, t as checkCatalog, u as readConfiguredPort } from "./config-
|
|
1
|
+
import { G as SLACK_BOT_SCOPES, P as ERRORS, U as configSchema, W as requiredSecretKeys, l as roleCanUseOperation, r as SYSTEMD_SERVICE_SETTINGS, u as OPERATIONS } from "./src-C6fOCG5L.mjs";
|
|
2
|
+
import { a as errorExitCode, i as CliError, n as requestOperation, o as renderCliError, r as requestTokenEnrollment, s as escapeTerminalControls } from "./client-B4JXkdZu.mjs";
|
|
3
|
+
import { a as memoryVerdictCache, c as loadClientConfig, d as resolveDaemonAddress, i as fileVerdictCache, l as loadEnrollmentConfig, n as cliPackageVersion, o as configFile, s as dataDirectory, t as checkCatalog, u as readConfiguredPort } from "./config-CreYUbFe.mjs";
|
|
4
4
|
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
5
5
|
import { accessSync, chmodSync, closeSync, constants, cpSync, existsSync, ftruncateSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync, writeSync } from "node:fs";
|
|
6
6
|
import { homedir, hostname, userInfo } from "node:os";
|
|
@@ -669,7 +669,7 @@ async function installService(options = {}) {
|
|
|
669
669
|
const paths = servicePaths(options);
|
|
670
670
|
await preflight(paths);
|
|
671
671
|
const runner = options.runner ?? runCommand;
|
|
672
|
-
const fix = await checkHttpPort(readConfiguredPort(options.env ?? process.env, resolve(options.home ?? homedir())), {
|
|
672
|
+
const fix = await checkHttpPort(readConfiguredPort(options.env ?? process.env, resolve(options.home ?? homedir())) ?? 4777, {
|
|
673
673
|
bind: options.bind ?? bindLoopback,
|
|
674
674
|
run: runner
|
|
675
675
|
});
|
|
@@ -2160,9 +2160,9 @@ function registerSetupCommands(program, options, io, env) {
|
|
|
2160
2160
|
commandFor(program, "mcp").summary("Start the MCP server for an agent on standard input and output.").description([
|
|
2161
2161
|
"Start the MCP server for an agent on standard input and output. Stdout carries only JSON-RPC.",
|
|
2162
2162
|
"",
|
|
2163
|
-
"Each tool call finds the caller: `SPUR_SESSION` inside a Spur session, otherwise `BOARD_TOKEN`, otherwise the first `.spur-board/token` found walking upward from the directory the agent starts it in, stopping at home.",
|
|
2163
|
+
"Each tool call finds the caller: `SPUR_SESSION` inside a Spur session, otherwise `BOARD_TOKEN`, otherwise the first `.spur-board/token` found walking upward from the directory the agent starts it in, stopping at the root of its git worktree, or at home outside git; home itself is never searched.",
|
|
2164
2164
|
"",
|
|
2165
|
-
"It reaches the daemon at `BOARD_DAEMON_URL`, otherwise at `http.port` from `config.yaml
|
|
2165
|
+
"It reaches the daemon at `BOARD_DAEMON_URL`, otherwise at `http.port` from `config.yaml`; with neither set nor a valid config, each call fails with `config` before any request.",
|
|
2166
2166
|
"",
|
|
2167
2167
|
"A `version_mismatch` answer means the server and the daemon have different catalogs: restart the agent session so `board mcp` loads the daemon's catalog; if it remains, run `board service restart`.",
|
|
2168
2168
|
"",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as errorContextSchema, I as errorEnvelopeSchema, L as successEnvelopeSchema, P as ERRORS, f as renderJsonError } from "./src-
|
|
1
|
+
import { F as errorContextSchema, I as errorEnvelopeSchema, L as successEnvelopeSchema, P as ERRORS, f as renderJsonError } from "./src-C6fOCG5L.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { request } from "node:http";
|
package/dist/client.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as requestOperation, r as requestTokenEnrollment, t as fetchCatalogVersion } from "./client-
|
|
1
|
+
import { n as requestOperation, r as requestTokenEnrollment, t as fetchCatalogVersion } from "./client-B4JXkdZu.mjs";
|
|
2
2
|
export { fetchCatalogVersion, requestOperation, requestTokenEnrollment };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as CliError, t as fetchCatalogVersion } from "./client-
|
|
1
|
+
import { U as configSchema, c as buildCatalogSnapshot, u as OPERATIONS } from "./src-C6fOCG5L.mjs";
|
|
2
|
+
import { i as CliError, t as fetchCatalogVersion } from "./client-B4JXkdZu.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";
|
|
@@ -27,7 +27,7 @@ function dataDirectory(env, home, cwd = process.cwd()) {
|
|
|
27
27
|
const xdg = env["XDG_DATA_HOME"];
|
|
28
28
|
return join(xdg && isAbsolute(xdg) ? xdg : join(home, ".local", "share"), "spur-board");
|
|
29
29
|
}
|
|
30
|
-
/** The http.port in config.yaml, or
|
|
30
|
+
/** The http.port in config.yaml, or undefined when the file is missing or invalid. */
|
|
31
31
|
function readConfiguredPort(env, home) {
|
|
32
32
|
try {
|
|
33
33
|
const parsed = YAML.parseDocument(readFileSync(configFile(env, home), "utf8"));
|
|
@@ -36,13 +36,19 @@ function readConfiguredPort(env, home) {
|
|
|
36
36
|
if (config.success) return config.data.http.port;
|
|
37
37
|
}
|
|
38
38
|
} catch {}
|
|
39
|
-
return DEFAULT_HTTP_PORT;
|
|
40
39
|
}
|
|
41
40
|
function resolveDaemonAddress(env = process.env, home = homedir(), configuredPort) {
|
|
42
41
|
const rawAddress = env["BOARD_DAEMON_URL"];
|
|
43
42
|
if (rawAddress === void 0) {
|
|
44
43
|
const port = configuredPort ?? readConfiguredPort(env, home);
|
|
45
|
-
if (port === 0) throw new CliError("config",
|
|
44
|
+
if (port === void 0) throw new CliError("config", {
|
|
45
|
+
environmentVariable: "BOARD_DAEMON_URL",
|
|
46
|
+
configPath: configFile(env, home)
|
|
47
|
+
}, void 0, "Set BOARD_DAEMON_URL to the daemon address, or make config.yaml valid and set http.port in it; `board doctor --offline` names what is wrong.");
|
|
48
|
+
if (port === 0) throw new CliError("config", {
|
|
49
|
+
environmentVariable: "BOARD_DAEMON_URL",
|
|
50
|
+
configPath: configFile(env, home)
|
|
51
|
+
}, void 0, "http.port: 0 assigns a runtime port that clients cannot discover. Set BOARD_DAEMON_URL to the daemon listening address.");
|
|
46
52
|
return new URL(`http://127.0.0.1:${String(port)}`);
|
|
47
53
|
}
|
|
48
54
|
let address;
|
|
@@ -78,6 +84,15 @@ function tokenInFolder(folder, warn) {
|
|
|
78
84
|
return;
|
|
79
85
|
}
|
|
80
86
|
}
|
|
87
|
+
/** A `.git` file or directory marks the worktree root; an unreadable entry counts as one. */
|
|
88
|
+
function isWorktreeRoot(folder) {
|
|
89
|
+
try {
|
|
90
|
+
lstatSync(join(folder, ".git"));
|
|
91
|
+
return true;
|
|
92
|
+
} catch (error) {
|
|
93
|
+
return !(error !== null && typeof error === "object" && "code" in error && error.code === "ENOENT");
|
|
94
|
+
}
|
|
95
|
+
}
|
|
81
96
|
function findTokenFile(cwd, home, warn = (message) => {
|
|
82
97
|
process.stderr.write(message);
|
|
83
98
|
}) {
|
|
@@ -94,6 +109,7 @@ function findTokenFile(cwd, home, warn = (message) => {
|
|
|
94
109
|
}
|
|
95
110
|
const token = tokenInFolder(folder, warn);
|
|
96
111
|
if (token !== void 0) return token;
|
|
112
|
+
if (isWorktreeRoot(folder)) break;
|
|
97
113
|
const parent = dirname(folder);
|
|
98
114
|
if (parent === folder) break;
|
|
99
115
|
folder = parent;
|
package/dist/daemon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as errorCodeOf, C as SESSION_STATUSES, D as ticketFactsSchema, E as sessionFactsSchema, G as SLACK_BOT_SCOPES, H as RESERVED_PROJECT, L as successEnvelopeSchema, M as parseRef$1, N as taskKeySchema, O as actorIdSchema, P as ERRORS, S as SESSION_HEALTH_STATES, T as prRefSchema, U as configSchema, V as DEFAULT_SLACK_COMMAND, W as requiredSecretKeys, _ as interactionRefSchema, a as batchSchema, b as EVENT_KINDS, c as buildCatalogSnapshot, d as renderHttpProblem, g as inboundEventSchema, h as conversationRefSchema, i as AdapterError, j as parseActorId, k as encodeActorId, l as roleCanUseOperation, m as SPACE_IDS, n as BOARD_TICK_MS, o as entityRefSchema, s as sourceCursorSchema, t as assertNever, u as OPERATIONS, v as messageRefSchema, w as prFactsSchema, x as eventPayloadSchemas, y as userIdSchema, z as DEFAULT_LINK } from "./src-
|
|
1
|
+
import { A as errorCodeOf, C as SESSION_STATUSES, D as ticketFactsSchema, E as sessionFactsSchema, G as SLACK_BOT_SCOPES, H as RESERVED_PROJECT, L as successEnvelopeSchema, M as parseRef$1, N as taskKeySchema, O as actorIdSchema, P as ERRORS, S as SESSION_HEALTH_STATES, T as prRefSchema, U as configSchema, V as DEFAULT_SLACK_COMMAND, W as requiredSecretKeys, _ as interactionRefSchema, a as batchSchema, b as EVENT_KINDS, c as buildCatalogSnapshot, d as renderHttpProblem, g as inboundEventSchema, h as conversationRefSchema, i as AdapterError, j as parseActorId, k as encodeActorId, l as roleCanUseOperation, m as SPACE_IDS, n as BOARD_TICK_MS, o as entityRefSchema, s as sourceCursorSchema, t as assertNever, u as OPERATIONS, v as messageRefSchema, w as prFactsSchema, x as eventPayloadSchemas, y as userIdSchema, z as DEFAULT_LINK } from "./src-C6fOCG5L.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import { closeSync, existsSync, fstatSync, fsyncSync, ftruncateSync, linkSync, mkdirSync, openSync, readFileSync, readdirSync, renameSync, rmSync, statSync, writeSync } from "node:fs";
|
|
@@ -7609,6 +7609,7 @@ const creator = {
|
|
|
7609
7609
|
const MAX_STRINGS = 4096;
|
|
7610
7610
|
const MAX_PASSES = 32;
|
|
7611
7611
|
const receipts = new AsyncLocalStorage();
|
|
7612
|
+
secretLintProfiler.setEnabled(false);
|
|
7612
7613
|
const SCAN_PENDING = Symbol("gateway scan pending");
|
|
7613
7614
|
const scannerRules = rules.filter((rule) => rule.meta.id !== "@secretlint/secretlint-rule-filter-comments");
|
|
7614
7615
|
const scannerPreset = {
|
package/dist/mcp.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as ERRORS, p as renderMcpError, u as OPERATIONS } from "./src-
|
|
2
|
-
import { i as CliError, n as requestOperation } from "./client-
|
|
3
|
-
import { a as memoryVerdictCache, c as loadClientConfig, r as compareCatalogs, t as checkCatalog } from "./config-
|
|
1
|
+
import { P as ERRORS, p as renderMcpError, u as OPERATIONS } from "./src-C6fOCG5L.mjs";
|
|
2
|
+
import { i as CliError, n as requestOperation } from "./client-B4JXkdZu.mjs";
|
|
3
|
+
import { a as memoryVerdictCache, c as loadClientConfig, r as compareCatalogs, t as checkCatalog } from "./config-CreYUbFe.mjs";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import { readFileSync } from "node:fs";
|
|
6
6
|
import { z } from "zod";
|
|
@@ -601,7 +601,11 @@ const ERRORS = {
|
|
|
601
601
|
exit: EXIT_CODES.config,
|
|
602
602
|
message: "The configuration is missing or invalid.",
|
|
603
603
|
hint: "Fix the configuration file named in the error, then run the command again.",
|
|
604
|
-
recovery: noRetry("Fix the named configuration file and retry.")
|
|
604
|
+
recovery: noRetry("Fix the named configuration file and retry."),
|
|
605
|
+
mcp: {
|
|
606
|
+
hint: "Fix the variable named in `context.environmentVariable` where `board mcp` starts. Only when `context.configPath` is also present, making that config.yaml valid with an `http.port` works instead; `board doctor --offline` names what is wrong in it.",
|
|
607
|
+
recovery: noRetry("Fix the named variable or config.yaml, restarting your agent session after a variable change, then retry the tool call.")
|
|
608
|
+
}
|
|
605
609
|
}),
|
|
606
610
|
identity_missing: spec("identity_missing", {
|
|
607
611
|
status: null,
|
package/package.json
CHANGED
package/skills/setup/SKILL.md
CHANGED
|
@@ -30,7 +30,7 @@ Ask one question at a time, only when current state cannot answer it. Check befo
|
|
|
30
30
|
## 4. Start service and grant access
|
|
31
31
|
|
|
32
32
|
- Check `board service status`; if absent, run `board service install`. Ask before enabling user lingering, which keeps the service running after logout.
|
|
33
|
-
- If operator access is unset, ask whether the operator will use a Spur project marked `operator
|
|
33
|
+
- If operator access is unset, ask whether the operator will use a Spur project marked `operator`, which needs no token, or a session outside Spur rooted in a chosen folder, inside its git worktree if any, not above the root. Check for an existing valid token; only if absent run `board token create --name <name> --into <folder>`, then ask the operator to approve it in Slack. Check existing agent registration before registering `board mcp`.
|
|
34
34
|
- Check installed skill stamps and content. If absent or older, ask before writing skill folders, run `board skills install`, then verify both Claude Code and Codex copies.
|
|
35
35
|
- For a Spur project used by Codex, check `.agents/skills/spur-board/SKILL.md` in a fresh session. If missing, ask before touching the project's main checkout. In that checkout, link the path to the installed product skill, for example `ln -s "$HOME/.codex/skills/spur-board" .agents/skills/spur-board`. Add `/.agents/skills/spur-board` to the Git exclude file resolved by `git rev-parse --git-path info/exclude`. Add `.agents/skills/spur-board` to that project's `symlinks` in `spur.yaml` and reload Spur config. Start a new session and verify the injected SKILL.md resolves.
|
|
36
36
|
|