spur-board 0.17.0 → 0.18.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 { 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-vzl2nFf6.mjs";
2
- import { a as errorExitCode, i as CliError, n as requestOperation, o as renderCliError, r as requestTokenEnrollment, s as escapeTerminalControls } from "./client-Swp5TBku.mjs";
3
- import { a as memoryVerdictCache, c as loadEnrollmentConfig, i as fileVerdictCache, l as readConfiguredPort, n as cliPackageVersion, o as configFile, s as loadClientConfig, t as checkCatalog, u as resolveDaemonAddress } from "./config-C1ly8wCm.mjs";
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-BQIJz8yP.mjs";
2
+ import { a as errorExitCode, i as CliError, n as requestOperation, o as renderCliError, r as requestTokenEnrollment, s as escapeTerminalControls } from "./client-DfvJWQFq.mjs";
3
+ import { a as memoryVerdictCache, c as loadEnrollmentConfig, i as fileVerdictCache, l as readConfiguredPort, n as cliPackageVersion, o as configFile, s as loadClientConfig, t as checkCatalog, u as resolveDaemonAddress } from "./config-BDEvO1UV.mjs";
4
4
  import { createHash, randomBytes, randomUUID } from "node:crypto";
5
5
  import { chmodSync, closeSync, constants, existsSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, readlinkSync, realpathSync, statSync, unlinkSync, writeFileSync } from "node:fs";
6
6
  import { homedir, hostname, userInfo } from "node:os";
@@ -1,4 +1,4 @@
1
- import { F as errorContextSchema, I as errorEnvelopeSchema, L as successEnvelopeSchema, P as ERRORS, f as renderJsonError } from "./src-vzl2nFf6.mjs";
1
+ import { F as errorContextSchema, I as errorEnvelopeSchema, L as successEnvelopeSchema, P as ERRORS, f as renderJsonError } from "./src-BQIJz8yP.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-Swp5TBku.mjs";
1
+ import { n as requestOperation, r as requestTokenEnrollment, t as fetchCatalogVersion } from "./client-DfvJWQFq.mjs";
2
2
  export { fetchCatalogVersion, requestOperation, requestTokenEnrollment };
@@ -1,5 +1,5 @@
1
- import { R as DEFAULT_HTTP_PORT, U as configSchema, c as buildCatalogSnapshot, u as OPERATIONS } from "./src-vzl2nFf6.mjs";
2
- import { i as CliError, t as fetchCatalogVersion } from "./client-Swp5TBku.mjs";
1
+ import { R as DEFAULT_HTTP_PORT, U as configSchema, c as buildCatalogSnapshot, u as OPERATIONS } from "./src-BQIJz8yP.mjs";
2
+ import { i as CliError, t as fetchCatalogVersion } from "./client-DfvJWQFq.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 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-vzl2nFf6.mjs";
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-BQIJz8yP.mjs";
2
2
  import { createRequire } from "node:module";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
4
  import { closeSync, existsSync, fstatSync, ftruncateSync, mkdirSync, openSync, readFileSync, readdirSync, writeSync } from "node:fs";
@@ -9050,6 +9050,50 @@ async function restartNotification(trx, sourceKey, at) {
9050
9050
  next_at: at.toISOString()
9051
9051
  }).where("source_key", "=", sourceKey).where("acked_at", "is", null).where("exhausted_at", "is not", null).returning("id").executeTakeFirst() === void 0) throw new CommandError("retry_not_applicable", "The doorbell was read or is still ringing; close the item instead.");
9052
9052
  }
9053
+ /**
9054
+ * Ends a ring Spur will not take (a permanent rejection, or no answer for the retry window): its
9055
+ * notification stops ringing, the operator gets an item and `doorbell_undelivered` is journalled.
9056
+ * The operator's Retry on the item restarts the series (`restartNotification`). An inbound author
9057
+ * ring has no notification: it ends like an author found unavailable at enqueue.
9058
+ */
9059
+ async function ringUndelivered(trx, input) {
9060
+ const { at, reason } = input;
9061
+ if (input.notificationId === void 0) {
9062
+ const task = await ringTask(trx, void 0, input.dedupeKey);
9063
+ if (task === void 0) return;
9064
+ await emit(trx, "doorbell_undelivered", task.project, task.id, at.toISOString(), {
9065
+ doorbell: input.dedupeKey,
9066
+ reason
9067
+ });
9068
+ await raiseItem(trx, {
9069
+ itemKey: `doorbell:unavailable:${input.dedupeKey}`,
9070
+ kind: "answer_author_unavailable",
9071
+ text: `Answer author unavailable: ${reason}`,
9072
+ url: taskUrl(task, input.config),
9073
+ taskId: task.id,
9074
+ blockId: null,
9075
+ at
9076
+ });
9077
+ return;
9078
+ }
9079
+ const n = await trx.selectFrom("notification").selectAll().where("id", "=", input.notificationId).executeTakeFirst();
9080
+ if (n === void 0 || n.acked_at !== null || n.exhausted_at !== null) return;
9081
+ const task = await trx.selectFrom("task").selectAll().where("id", "=", n.task_id).executeTakeFirstOrThrow();
9082
+ await trx.updateTable("notification").set({ exhausted_at: at.toISOString() }).where("id", "=", n.id).execute();
9083
+ await raiseItem(trx, {
9084
+ itemKey: exhaustedItemKey(n),
9085
+ kind: exhaustedItemKind(n),
9086
+ text: n.kind === "answer" ? `Answer to block B${String(n.block_id)} on ${task.key} was not delivered: ${reason}` : `worker ${input.session} did not get block B${String(n.block_id)} on ${task.key}: ${reason}`,
9087
+ url: taskUrl(task, input.config),
9088
+ taskId: task.id,
9089
+ blockId: n.block_id,
9090
+ at
9091
+ });
9092
+ await journal$2(trx, n, "doorbell_undelivered", {
9093
+ doorbell: `N${String(n.id)}`,
9094
+ reason
9095
+ }, at);
9096
+ }
9053
9097
  /** Reconcile due semantic notifications in the sender's claim transaction. */
9054
9098
  async function reconcileDoorbells(trx, at, config) {
9055
9099
  const due = await trx.selectFrom("notification").innerJoin("task", "task.id", "notification.task_id").selectAll("notification").where("task.membership", "!=", "archived").where("notification.acked_at", "is", null).where("notification.exhausted_at", "is", null).where("notification.next_at", "<=", at.toISOString()).orderBy("notification.id").execute();
@@ -9719,7 +9763,7 @@ async function archiveTask(trx, input) {
9719
9763
  await trx.updateTable("outbox").set({
9720
9764
  state: "dead",
9721
9765
  last_error: "superseded"
9722
- }).where("kind", "=", "doorbell").where("state", "in", ["pending", "post_failed"]).where("uncertain", "=", 0).where((eb) => eb.or([eb("id", "in", eb.selectFrom("notification").select("last_outbox_id").where("task_id", "=", task.id).where("last_outbox_id", "is not", null)), ...comments.map((comment) => eb("dedupe_key", "like", `doorbell:comment:${String(comment.id)}:%`))])).execute();
9766
+ }).where("kind", "=", "doorbell").where("state", "in", ["pending", "post_failed"]).where((eb) => eb.or([eb("id", "in", eb.selectFrom("notification").select("last_outbox_id").where("task_id", "=", task.id).where("last_outbox_id", "is not", null)), ...comments.map((comment) => eb("dedupe_key", "like", `doorbell:comment:${String(comment.id)}:%`))])).execute();
9723
9767
  await trx.updateTable("task").set({
9724
9768
  membership: "archived",
9725
9769
  archive_reason: reason,
@@ -9844,6 +9888,13 @@ function orderItems(items) {
9844
9888
  }
9845
9889
  //#endregion
9846
9890
  //#region ../core/src/app/sender.ts
9891
+ /**
9892
+ * Spur refused a doorbell for good (a permanent 4xx): the sender stops ringing and ends the ring
9893
+ * instead of retrying it. Any other error from `send` is retried.
9894
+ */
9895
+ var SpurRejectedError = class extends Error {
9896
+ name = "SpurRejectedError";
9897
+ };
9847
9898
  /** 1 msg/s per space: a platform limit, not an operator setting. */
9848
9899
  const SPACE_INTERVAL_MS = 1e3;
9849
9900
  const RETRY_WINDOW_MS = 30 * 6e4;
@@ -9966,6 +10017,28 @@ async function requeuePostFailed(trx, ids, nowIso) {
9966
10017
  }
9967
10018
  return failed.length;
9968
10019
  }
10020
+ /**
10021
+ * Returns every `in_flight` row to `pending`: one whose send never started gives its attempt
10022
+ * back; one whose send started may be out, so it goes again at once as uncertain. Its comment
10023
+ * goes back to `pending`. Only a crash or a failed earlier tick leaves a row `in_flight`.
10024
+ */
10025
+ async function releaseOrphans(trx, nowIso) {
10026
+ const rows = await trx.selectFrom("outbox").select(["kind", "payload"]).where("state", "=", "in_flight").execute();
10027
+ if (rows.length === 0) return;
10028
+ await trx.updateTable("outbox").set((eb) => ({
10029
+ state: "pending",
10030
+ attempts: eb("attempts", "-", 1)
10031
+ })).where("state", "=", "in_flight").where("attempt_started", "=", 0).execute();
10032
+ await trx.updateTable("outbox").set({
10033
+ state: "pending",
10034
+ uncertain: 1,
10035
+ next_at: nowIso
10036
+ }).where("state", "=", "in_flight").where("attempt_started", "=", 1).execute();
10037
+ for (const row of rows) {
10038
+ const body = parseBody(row);
10039
+ if (typeof body !== "string") await setComment(trx, body, { delivery_state: "pending" });
10040
+ }
10041
+ }
9969
10042
  function backoff(attempts) {
9970
10043
  return Math.min(1e3 * 2 ** Math.max(attempts - 1, 0), MAX_BACKOFF_MS$1);
9971
10044
  }
@@ -10044,11 +10117,13 @@ function createSender(options) {
10044
10117
  await trx.updateTable("outbox").set({ first_attempt_at: null }).where("state", "in", ["pending", "in_flight"]).where("kind", "in", kinds).execute();
10045
10118
  }
10046
10119
  /**
10047
- * tx 1: cancels stale rows, raises down-health and claims at most one due row per lane.
10120
+ * tx 1: returns rows a failed tick left in flight, cancels stale rows, raises down-health and
10121
+ * claims at most one due row per lane.
10048
10122
  * `ranThreshold` says the outage's down rows were written; the caller records that after commit.
10049
10123
  */
10050
10124
  async function claim(trx, at) {
10051
10125
  const nowIso = new Date(at).toISOString();
10126
+ await releaseOrphans(trx, nowIso);
10052
10127
  await reconcileDoorbells(trx, new Date(at), options.config);
10053
10128
  const rows = await trx.selectFrom("outbox").selectAll().where("state", "in", ["pending", "post_failed"]).orderBy("id").execute();
10054
10129
  const bodies = /* @__PURE__ */ new Map();
@@ -10160,7 +10235,7 @@ function createSender(options) {
10160
10235
  };
10161
10236
  }
10162
10237
  }
10163
- if (c.body.kind === "doorbell" && !c.maybeSent && (await ringTask(trx, c.body.payload.notificationId, c.key))?.membership === "archived") {
10238
+ if (c.body.kind === "doorbell" && (await ringTask(trx, c.body.payload.notificationId, c.key))?.membership === "archived") {
10164
10239
  await kill(trx, [c.id], "superseded");
10165
10240
  return {
10166
10241
  at,
@@ -10254,12 +10329,17 @@ function createSender(options) {
10254
10329
  error: null
10255
10330
  };
10256
10331
  } catch (error) {
10332
+ const message = error instanceof Error ? error.message : String(error);
10333
+ if (error instanceof SpurRejectedError) return {
10334
+ outcome: { status: "rejected" },
10335
+ error: message
10336
+ };
10257
10337
  return {
10258
10338
  outcome: {
10259
10339
  status: "retry",
10260
10340
  uncertain: true
10261
10341
  },
10262
- error: error instanceof Error ? error.message : String(error)
10342
+ error: message
10263
10343
  };
10264
10344
  }
10265
10345
  }
@@ -10275,6 +10355,19 @@ function createSender(options) {
10275
10355
  }).execute();
10276
10356
  await setComment(trx, body, { delivery_state: "post_failed" });
10277
10357
  };
10358
+ /** Kills a ring Spur will not take and ends its notification. */
10359
+ const endRing = async (reason) => {
10360
+ await kill(trx, [c.id], reason);
10361
+ if (body.kind !== "doorbell") return;
10362
+ await ringUndelivered(trx, {
10363
+ notificationId: body.payload.notificationId,
10364
+ dedupeKey: c.key,
10365
+ session: body.payload.session,
10366
+ reason,
10367
+ at: new Date(at),
10368
+ config: options.config
10369
+ });
10370
+ };
10278
10371
  switch (outcome.status) {
10279
10372
  case "sent":
10280
10373
  await row.set({
@@ -10349,6 +10442,7 @@ function createSender(options) {
10349
10442
  uncertain,
10350
10443
  last_error: lastError
10351
10444
  });
10445
+ if (space === null && at - firstAt >= RETRY_WINDOW_MS) return endRing(`no answer from Spur for 30 min: ${lastError}`);
10352
10446
  await row.set({
10353
10447
  state: "pending",
10354
10448
  uncertain,
@@ -10359,6 +10453,7 @@ function createSender(options) {
10359
10453
  await setComment(trx, body, { delivery_state: "pending" });
10360
10454
  return;
10361
10455
  }
10456
+ case "rejected": return endRing(error ?? "rejected by Spur");
10362
10457
  case "failed":
10363
10458
  if (outcome.scope === "message" || space === null) return postFailed({ last_error: outcome.reason });
10364
10459
  if ((await trx.insertInto("transport_health").values({
@@ -10403,26 +10498,8 @@ function createSender(options) {
10403
10498
  async recover() {
10404
10499
  const nowIso = now().toISOString();
10405
10500
  const failed = await scanTransaction(store, options.config, async (trx) => {
10406
- const rows = await trx.selectFrom("outbox").select([
10407
- "id",
10408
- "kind",
10409
- "payload",
10410
- "state"
10411
- ]).where("state", "in", ["in_flight", "post_failed"]).execute();
10412
- await trx.updateTable("outbox").set((eb) => ({
10413
- state: "pending",
10414
- attempts: eb("attempts", "-", 1)
10415
- })).where("state", "=", "in_flight").where("attempt_started", "=", 0).execute();
10416
- await trx.updateTable("outbox").set({
10417
- state: "pending",
10418
- uncertain: 1,
10419
- next_at: nowIso
10420
- }).where("state", "=", "in_flight").where("attempt_started", "=", 1).execute();
10421
- for (const row of rows.filter((candidate) => candidate.state === "in_flight")) {
10422
- const body = parseBody(row);
10423
- if (typeof body !== "string") await setComment(trx, body, { delivery_state: "pending" });
10424
- }
10425
- return rows.filter((row) => row.state === "post_failed").map((row) => row.id);
10501
+ await releaseOrphans(trx, nowIso);
10502
+ return (await trx.selectFrom("outbox").select("id").where("state", "=", "post_failed").execute()).map((row) => row.id);
10426
10503
  });
10427
10504
  for (let i = 0; i < failed.length; i += RECOVER_BATCH) {
10428
10505
  const batch = failed.slice(i, i + RECOVER_BATCH);
@@ -11870,6 +11947,12 @@ async function pr(trx, config, fact, at, source) {
11870
11947
  await trx.updateTable("task").set({ last_change_at: at }).where("id", "=", task.id).execute();
11871
11948
  }
11872
11949
  }
11950
+ function branchHasKey(branch, key) {
11951
+ const text = branch.toLowerCase();
11952
+ const needle = key.toLowerCase();
11953
+ for (let index = text.indexOf(needle); index !== -1; index = text.indexOf(needle, index + 1)) if (!/[a-z0-9]/.test(text[index - 1] ?? "") && !/[0-9]/.test(text[index + needle.length] ?? "")) return true;
11954
+ return false;
11955
+ }
11873
11956
  async function session(trx, config, fact, at, source, ambiguousBranches) {
11874
11957
  const old = await trx.selectFrom("session_snapshot").selectAll().where("id", "=", fact.id).executeTakeFirst();
11875
11958
  const previous = old === void 0 ? null : parseJson(sessionFactsSchema, old.detail);
@@ -11920,7 +12003,7 @@ async function session(trx, config, fact, at, source, ambiguousBranches) {
11920
12003
  const tasks = await trx.selectFrom("task").selectAll().where("membership", "!=", "archived").execute();
11921
12004
  const branchPrs = await trx.selectFrom("link").innerJoin("pr_snapshot", (join) => join.on(sql`lower(pr_snapshot.repo) = lower(link.repo)`).onRef("pr_snapshot.number", "=", "link.number")).select(["link.task_id", "pr_snapshot.head_branch"]).where("link.entity", "=", "pr").where("pr_snapshot.head_branch", "=", fact.branch).where("link.banned", "=", 0).execute();
11922
12005
  const matches = tasks.filter((task) => {
11923
- return config.projects.find((entry) => entry.id === task.project)?.spurProjects.some((spur) => spur.name === fact.spurProject && spur.role === "worker") === true && (fact.branch?.includes(task.key) === true || branchPrs.some((pr) => pr.task_id === task.id));
12006
+ return config.projects.find((entry) => entry.id === task.project)?.spurProjects.some((spur) => spur.name === fact.spurProject && spur.role === "worker") === true && (fact.branch !== null && branchHasKey(fact.branch, task.key) || branchPrs.some((pr) => pr.task_id === task.id));
11924
12007
  });
11925
12008
  if (matches.length === 1) {
11926
12009
  const candidate = matches[0];
@@ -14166,10 +14249,14 @@ function normalize(issue, trackerId, repo, inFilter) {
14166
14249
  };
14167
14250
  }
14168
14251
  function matchesFilter(issue, tracker) {
14252
+ if (tracker.label === void 0 && tracker.milestone === void 0) return true;
14169
14253
  if (tracker.label !== void 0) return issue.labels.some((label) => label.name === tracker.label);
14170
14254
  return issue.milestone?.title === tracker.milestone;
14171
14255
  }
14172
- /** Lists open filter issues and resolves requested tickets missing from that listing. */
14256
+ /**
14257
+ * Lists open filter issues, or every open issue when neither label nor milestone is set, and
14258
+ * resolves requested tickets missing from that listing.
14259
+ */
14173
14260
  function createGithubIssuesAdapter(options) {
14174
14261
  const transport = options.fetch ?? fetch;
14175
14262
  const [owner, name] = options.tracker.repo.split("/");
@@ -15852,10 +15939,14 @@ function createDeliveryGateway(client, channels) {
15852
15939
  };
15853
15940
  } catch (error) {
15854
15941
  const result = apiFailure(error);
15855
- return result.status === "retry" && confirmed ? {
15942
+ if (!confirmed) return result;
15943
+ return result.status === "retry" ? {
15856
15944
  ...result,
15857
15945
  uncertain: true
15858
- } : result;
15946
+ } : {
15947
+ status: "retry",
15948
+ uncertain: true
15949
+ };
15859
15950
  }
15860
15951
  }
15861
15952
  return {
@@ -16436,6 +16527,13 @@ function createBoardModules(ctxFor, options = {}) {
16436
16527
  //#region ../daemon/src/spur-port.ts
16437
16528
  const SEND_TIMEOUT_MS = 8e3;
16438
16529
  const ERROR_TEXT_LIMIT = 200;
16530
+ /** 4xx statuses Spur may answer for a passing state; every other 4xx ends the ring. */
16531
+ const RETRYABLE_4XX = /* @__PURE__ */ new Set([
16532
+ 408,
16533
+ 409,
16534
+ 425,
16535
+ 429
16536
+ ]);
16439
16537
  /** The request Spur's own `spur send` makes; the doctor probe sends the same one. */
16440
16538
  function spurSendRequest(baseUrl, session, text) {
16441
16539
  return {
@@ -16476,7 +16574,10 @@ function createSpurPort(options) {
16476
16574
  return;
16477
16575
  }
16478
16576
  const error = await spurErrorText(response);
16479
- throw new Error(`Spur send failed with HTTP ${String(response.status)}${error === null ? "" : `: ${error}`}`);
16577
+ const { status } = response;
16578
+ const message = `Spur send failed with HTTP ${String(status)}${error === null ? "" : `: ${error}`}`;
16579
+ if (status >= 400 && status < 500 && !RETRYABLE_4XX.has(status)) throw new SpurRejectedError(message);
16580
+ throw new Error(message);
16480
16581
  } };
16481
16582
  }
16482
16583
  //#endregion
package/dist/mcp.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { P as ERRORS, p as renderMcpError, u as OPERATIONS } from "./src-vzl2nFf6.mjs";
2
- import { i as CliError, n as requestOperation } from "./client-Swp5TBku.mjs";
3
- import { a as memoryVerdictCache, r as compareCatalogs, s as loadClientConfig, t as checkCatalog } from "./config-C1ly8wCm.mjs";
1
+ import { P as ERRORS, p as renderMcpError, u as OPERATIONS } from "./src-BQIJz8yP.mjs";
2
+ import { i as CliError, n as requestOperation } from "./client-DfvJWQFq.mjs";
3
+ import { a as memoryVerdictCache, r as compareCatalogs, s as loadClientConfig, t as checkCatalog } from "./config-BDEvO1UV.mjs";
4
4
  import { randomUUID } from "node:crypto";
5
5
  import { readFileSync } from "node:fs";
6
6
  import { z } from "zod";
@@ -194,13 +194,13 @@ function linkPattern(fallback, description) {
194
194
  const githubIssuesTracker = z.strictObject({
195
195
  type: z.literal("github-issues"),
196
196
  repo: repoSlugSchema,
197
- label: nonEmpty.optional(),
198
- milestone: nonEmpty.optional()
197
+ label: nonEmpty.describe("Only open issues with this label become tasks. Set at most one of label and milestone; with neither, every open issue of tracker.repo becomes a task.").optional(),
198
+ milestone: nonEmpty.describe("Only open issues in the milestone with this title become tasks. Set at most one of label and milestone; with neither, every open issue of tracker.repo becomes a task.").optional()
199
199
  }).superRefine((tracker, ctx) => {
200
- if (tracker.label === void 0 === (tracker.milestone === void 0)) ctx.addIssue({
200
+ if (tracker.label !== void 0 && tracker.milestone !== void 0) ctx.addIssue({
201
201
  code: "custom",
202
202
  path: ["label"],
203
- message: "Set exactly one of label or milestone"
203
+ message: "Set at most one of label or milestone"
204
204
  });
205
205
  });
206
206
  const spurProject = z.strictObject({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spur-board",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "license": "MIT",
5
5
  "engines": {
6
6
  "node": "^24.12.0 || ^26.0.0"