spur-board 0.39.1 → 0.40.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/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { F as ERRORS, J as SLACK_BOT_SCOPES, K as configSchema, l as roleCanUseOperation, q as requiredSecretKeys, r as SYSTEMD_SERVICE_SETTINGS, u as OPERATIONS } from "./src-BlWszv-5.mjs";
2
- import { a as CliError, c as escapeTerminalControls, i as requestTokenEnrollment, n as fetchTokenStatus, o as errorExitCode, r as requestOperation, s as renderCliError } from "./client-C9eksZvn.mjs";
3
- 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 "./config-D_e37DkD.mjs";
1
+ import { F as ERRORS, J as requiredSecretKeys, K as configSchema, Y as SLACK_BOT_SCOPES, l as roleCanUseOperation, r as SYSTEMD_SERVICE_SETTINGS, u as OPERATIONS } from "./src-BI3t7Lzd.mjs";
2
+ import { a as CliError, c as escapeTerminalControls, i as requestTokenEnrollment, n as fetchTokenStatus, o as errorExitCode, r as requestOperation, s as renderCliError } from "./client-xhD478pB.mjs";
3
+ 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 "./config-BrVK6VAI.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";
@@ -1,4 +1,4 @@
1
- import { B as successEnvelopeSchema, F as ERRORS, L as errorContextSchema, R as errorEnvelopeSchema, p as renderJsonError } from "./src-BlWszv-5.mjs";
1
+ import { B as successEnvelopeSchema, F as ERRORS, L as errorContextSchema, R as errorEnvelopeSchema, p as renderJsonError } from "./src-BI3t7Lzd.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 { i as requestTokenEnrollment, n as fetchTokenStatus, r as requestOperation, t as fetchCatalogVersion } from "./client-C9eksZvn.mjs";
1
+ import { i as requestTokenEnrollment, n as fetchTokenStatus, r as requestOperation, t as fetchCatalogVersion } from "./client-xhD478pB.mjs";
2
2
  export { fetchCatalogVersion, fetchTokenStatus, requestOperation, requestTokenEnrollment };
@@ -1,5 +1,5 @@
1
- import { K as configSchema, c as buildCatalogSnapshot, u as OPERATIONS } from "./src-BlWszv-5.mjs";
2
- import { a as CliError, t as fetchCatalogVersion } from "./client-C9eksZvn.mjs";
1
+ import { K as configSchema, c as buildCatalogSnapshot, u as OPERATIONS } from "./src-BI3t7Lzd.mjs";
2
+ import { a as CliError, t as fetchCatalogVersion } from "./client-xhD478pB.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";
package/dist/daemon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { A as encodeActorId, B as successEnvelopeSchema, C as SESSION_HEALTH_STATES, D as sessionFactsSchema, E as prRefSchema, F as ERRORS, G as RESERVED_PROJECT, H as DEFAULT_LINK, I as err, J as SLACK_BOT_SCOPES, K as configSchema, M as parseActorId, N as parseRef$1, O as ticketFactsSchema, P as taskKeySchema, S as eventPayloadSchemas, T as prFactsSchema, W as DEFAULT_SLACK_COMMAND, _ as inboundEventSchema, a as batchSchema, b as userIdSchema, c as buildCatalogSnapshot, d as turnHandedSchema, f as renderHttpProblem, g as conversationRefSchema, h as SPACE_IDS, i as AdapterError, j as errorCodeOf, k as actorIdSchema, l as roleCanUseOperation, n as BOARD_TICK_MS, o as entityRefSchema, q as requiredSecretKeys, s as sourceCursorSchema, t as assertNever, u as OPERATIONS, v as interactionRefSchema, w as SESSION_STATUSES, x as EVENT_KINDS, y as messageRefSchema, z as ok } from "./src-BlWszv-5.mjs";
1
+ import { A as encodeActorId, B as successEnvelopeSchema, C as SESSION_HEALTH_STATES, D as sessionFactsSchema, E as prRefSchema, F as ERRORS, G as RESERVED_PROJECT, H as DEFAULT_LINK, I as err, J as requiredSecretKeys, K as configSchema, M as parseActorId, N as parseRef$1, O as ticketFactsSchema, P as taskKeySchema, S as eventPayloadSchemas, T as prFactsSchema, W as DEFAULT_SLACK_COMMAND, Y as SLACK_BOT_SCOPES, _ as inboundEventSchema, a as batchSchema, b as userIdSchema, c as buildCatalogSnapshot, d as turnHandedSchema, f as renderHttpProblem, g as conversationRefSchema, h as SPACE_IDS, i as AdapterError, j as errorCodeOf, k as actorIdSchema, l as roleCanUseOperation, n as BOARD_TICK_MS, o as entityRefSchema, q as plainHttpAllowed, s as sourceCursorSchema, t as assertNever, u as OPERATIONS, v as interactionRefSchema, w as SESSION_STATUSES, x as EVENT_KINDS, y as messageRefSchema, z as ok } from "./src-BI3t7Lzd.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";
@@ -14619,7 +14619,7 @@ function loadConfig(paths) {
14619
14619
  //#region ../daemon/src/logger.ts
14620
14620
  const REDACTED = "[Redacted]";
14621
14621
  const MIN_SECRET_LENGTH = 8;
14622
- const CREDENTIAL_KEY = /^(?:proxy-)?authorization$|^(?:set-)?cookie$|token$/i;
14622
+ const CREDENTIAL_KEY = /^(?:proxy-)?authorization$|^(?:set-)?cookie$|token$|password$|secret$|api[-_]?key$/i;
14623
14623
  /** A copy of `value` with every credential key's value replaced, at any depth. */
14624
14624
  function censorKeys(value) {
14625
14625
  if (Array.isArray(value)) return value.map(censorKeys);
@@ -19091,6 +19091,7 @@ function slackSettings(config, secrets) {
19091
19091
  throw new ConfigError("SLACK_API_URL must be an HTTP(S) URL");
19092
19092
  }
19093
19093
  if (url.protocol !== "http:" && url.protocol !== "https:") throw new ConfigError("SLACK_API_URL must be an HTTP(S) URL");
19094
+ if (!plainHttpAllowed(url)) throw new ConfigError("SLACK_API_URL must use https:; http: is allowed only on a loopback host (localhost, 127.0.0.0/8, ::1) because it receives the Slack bot token");
19094
19095
  }
19095
19096
  return {
19096
19097
  token,
package/dist/mcp.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { F as ERRORS, m as renderMcpError, u as OPERATIONS } from "./src-BlWszv-5.mjs";
2
- import { a as CliError, r as requestOperation } from "./client-C9eksZvn.mjs";
3
- import { a as memoryVerdictCache, c as loadClientConfig, r as compareCatalogs, t as checkCatalog } from "./config-D_e37DkD.mjs";
1
+ import { F as ERRORS, m as renderMcpError, u as OPERATIONS } from "./src-BI3t7Lzd.mjs";
2
+ import { a as CliError, r as requestOperation } from "./client-xhD478pB.mjs";
3
+ import { a as memoryVerdictCache, c as loadClientConfig, r as compareCatalogs, t as checkCatalog } from "./config-BrVK6VAI.mjs";
4
4
  import { randomUUID } from "node:crypto";
5
5
  import { readFileSync } from "node:fs";
6
6
  import { z } from "zod";
@@ -161,9 +161,25 @@ function rejectDuplicates(items, key, label, ctx) {
161
161
  seen.add(value);
162
162
  });
163
163
  }
164
+ const LOOPBACK_IPV4 = /^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;
165
+ /**
166
+ * False for an `http:` URL whose host is not loopback: such a URL would carry credentials in
167
+ * clear text. Loopback is `localhost`, 127.0.0.0/8 or `[::1]` after WHATWG normalization; no DNS.
168
+ */
169
+ function plainHttpAllowed(url) {
170
+ if (url.protocol !== "http:") return true;
171
+ const host = url.hostname;
172
+ return host === "localhost" || host === "[::1]" || LOOPBACK_IPV4.test(host);
173
+ }
164
174
  const jiraTracker = z.strictObject({
165
175
  type: z.literal("jira"),
166
- baseUrl: z.url({ protocol: /^https?$/ }),
176
+ baseUrl: z.url({ protocol: /^https?$/ }).refine((value) => {
177
+ try {
178
+ return plainHttpAllowed(new URL(value));
179
+ } catch {
180
+ return true;
181
+ }
182
+ }, { error: "Use https: for the Jira URL; http: is allowed only on a loopback host (localhost, 127.0.0.0/8, ::1) because it receives your Jira credentials" }).describe("Jira site URL. https:, or http: only on a loopback host."),
167
183
  jql: nonEmpty,
168
184
  doneStatuses: z.array(nonEmpty).min(1),
169
185
  readyStatuses: z.array(nonEmpty).min(1),
@@ -459,7 +475,7 @@ const SECRET_ENV_KEYS = [
459
475
  {
460
476
  name: "SLACK_API_URL",
461
477
  requiredWhen: "optional",
462
- purpose: "Override the Slack API URL for local testing."
478
+ purpose: "Override the Slack API URL for local testing. https:, or http: only on a loopback host."
463
479
  }
464
480
  ];
465
481
  function requiredSecretKeys(config) {
@@ -3201,4 +3217,4 @@ function assertNever(value) {
3201
3217
  throw new Error(`Unexpected value: ${JSON.stringify(value)}`);
3202
3218
  }
3203
3219
  //#endregion
3204
- export { encodeActorId as A, successEnvelopeSchema as B, SESSION_HEALTH_STATES as C, sessionFactsSchema as D, prRefSchema as E, ERRORS as F, RESERVED_PROJECT as G, DEFAULT_LINK as H, err as I, SLACK_BOT_SCOPES as J, configSchema as K, errorContextSchema as L, parseActorId as M, parseRef as N, ticketFactsSchema as O, taskKeySchema as P, errorEnvelopeSchema as R, eventPayloadSchemas as S, prFactsSchema as T, DEFAULT_SLACK_APP_NAME as U, DEFAULT_HTTP_PORT as V, DEFAULT_SLACK_COMMAND as W, inboundEventSchema as _, batchSchema as a, userIdSchema as b, buildCatalogSnapshot as c, turnHandedSchema as d, renderHttpProblem as f, conversationRefSchema as g, SPACE_IDS as h, AdapterError as i, errorCodeOf as j, actorIdSchema as k, roleCanUseOperation as l, renderMcpError as m, BOARD_TICK_MS as n, entityRefSchema as o, renderJsonError as p, requiredSecretKeys as q, SYSTEMD_SERVICE_SETTINGS as r, sourceCursorSchema as s, assertNever as t, OPERATIONS as u, interactionRefSchema as v, SESSION_STATUSES as w, EVENT_KINDS as x, messageRefSchema as y, ok as z };
3220
+ export { encodeActorId as A, successEnvelopeSchema as B, SESSION_HEALTH_STATES as C, sessionFactsSchema as D, prRefSchema as E, ERRORS as F, RESERVED_PROJECT as G, DEFAULT_LINK as H, err as I, requiredSecretKeys as J, configSchema as K, errorContextSchema as L, parseActorId as M, parseRef as N, ticketFactsSchema as O, taskKeySchema as P, errorEnvelopeSchema as R, eventPayloadSchemas as S, prFactsSchema as T, DEFAULT_SLACK_APP_NAME as U, DEFAULT_HTTP_PORT as V, DEFAULT_SLACK_COMMAND as W, SLACK_BOT_SCOPES as Y, inboundEventSchema as _, batchSchema as a, userIdSchema as b, buildCatalogSnapshot as c, turnHandedSchema as d, renderHttpProblem as f, conversationRefSchema as g, SPACE_IDS as h, AdapterError as i, errorCodeOf as j, actorIdSchema as k, roleCanUseOperation as l, renderMcpError as m, BOARD_TICK_MS as n, entityRefSchema as o, renderJsonError as p, plainHttpAllowed as q, SYSTEMD_SERVICE_SETTINGS as r, sourceCursorSchema as s, assertNever as t, OPERATIONS as u, interactionRefSchema as v, SESSION_STATUSES as w, EVENT_KINDS as x, messageRefSchema as y, ok as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spur-board",
3
- "version": "0.39.1",
3
+ "version": "0.40.0",
4
4
  "license": "MIT",
5
5
  "engines": {
6
6
  "node": "^24.12.0 || ^26.0.0"