spur-board 0.108.0 → 0.109.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.
@@ -3052,7 +3052,7 @@ const taskGetOutputSchema = z.strictObject({
3052
3052
  links: z.array(linkViewSchema).describe("Effective pull request, session, and ticket links."),
3053
3053
  sessions: z.array(statusSessionFactsSchema).optional().describe("Current facts of effective linked sessions."),
3054
3054
  blocks: z.array(taskBlockViewSchema).describe("Blocks on the task, open and unblocked."),
3055
- comments: z.array(commentSchema).describe("Comments on the task, oldest first."),
3055
+ comments: z.array(commentSchema).describe("Comments on the task, oldest first; a block's opening comment, by its author with its reason as text, is left out."),
3056
3056
  why: taskWhySchema.optional().describe("Present only with why.")
3057
3057
  });
3058
3058
  const taskHistoryInputSchema = z.strictObject({ task: taskKeyInputSchema });
@@ -1,4 +1,4 @@
1
- import { _ as renderJsonError, at as successEnvelopeSchema, c as tokenRequestStatusSchema, et as ERRORS, nt as errorContextSchema, o as tokenRequestResultSchema, rt as errorEnvelopeSchema } from "./chunk-CShDPfEG.mjs";
1
+ import { _ as renderJsonError, at as successEnvelopeSchema, c as tokenRequestStatusSchema, et as ERRORS, nt as errorContextSchema, o as tokenRequestResultSchema, rt as errorEnvelopeSchema } from "./chunk-5l4Msgb0.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 { d as buildCatalogSnapshot, gt as plainHttpAllowed, mt as configSchema, p as OPERATIONS } from "./chunk-CShDPfEG.mjs";
2
- import { o as CliError, t as fetchCatalogVersion } from "./chunk-B9KHYcVy.mjs";
1
+ import { d as buildCatalogSnapshot, gt as plainHttpAllowed, mt as configSchema, p as OPERATIONS } from "./chunk-5l4Msgb0.mjs";
2
+ import { o as CliError, t as fetchCatalogVersion } from "./chunk-Bw_gFKmQ.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/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { St as SLACK_BOT_SCOPES, Y as actorIdSchema, _t as requiredSecretKeys, a as requestHashOf, at as successEnvelopeSchema, et as ERRORS, f as roleCanUseOperation, mt as configSchema, p as OPERATIONS, r as remoteDoctorReportSchema, u as SYSTEMD_SERVICE_SETTINGS, ut as DEFAULT_STAND_PORT_RANGE, vt as resolveWebOrigin } from "./chunk-CShDPfEG.mjs";
1
+ import { St as SLACK_BOT_SCOPES, Y as actorIdSchema, _t as requiredSecretKeys, a as requestHashOf, at as successEnvelopeSchema, et as ERRORS, f as roleCanUseOperation, mt as configSchema, p as OPERATIONS, r as remoteDoctorReportSchema, u as SYSTEMD_SERVICE_SETTINGS, ut as DEFAULT_STAND_PORT_RANGE, vt as resolveWebOrigin } from "./chunk-5l4Msgb0.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-B9KHYcVy.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-CE1ORAjy.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-Bw_gFKmQ.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-DFqvm5hQ.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";
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-B9KHYcVy.mjs";
1
+ export { t as fetchCatalogVersion, n as fetchTokenStatus, r as requestOperation, i as requestSkillReload, a as requestTokenEnrollment } from "./chunk-Bw_gFKmQ.mjs";
package/dist/daemon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as parseRef$1, A as defaultBranchFactSchema, B as isExternalAuthor, C as messageRefSchema, Ct as TASK_HOLDS, D as eventPayloadSchemas, E as GATE_REASONS, F as trackerSourceId, G as sessionFactsSchema, H as prFactsSchema, I as PR_STATES, J as REF_NUMBER, K as ticketFactsSchema, L as REVIEW_STATES, M as prSourceId, N as sessionTransitionSchema, O as AdapterError, P as sourceCursorSchema, Q as parseActorId, R as SESSION_HEALTH_STATES, S as interactionRefSchema, St as SLACK_BOT_SCOPES, T as EVENT_KINDS, U as prRefSchema, V as parseRingMarker, W as ringMarker, X as encodeActorId, Y as actorIdSchema, Z as errorCodeOf, _t as requiredSecretKeys, a as requestHashOf, at as successEnvelopeSchema, b as conversationRefSchema, bt as DISPATCHER_MODES, c as tokenRequestStatusSchema, d as buildCatalogSnapshot, dt as RESERVED_PROJECT, et as ERRORS, f as roleCanUseOperation, ft as boardWideSpurProject, g as renderHttpProblem, gt as plainHttpAllowed, h as turnHandedSchema, ht as defaultAddressee, i as TOKEN_REQUEST_LIMITS, it as ok, j as entityRefSchema, k as batchSchema, l as BOARD_TICK_MS, lt as DEFAULT_SLACK_COMMAND, m as defaultBranchViewSchema, mt as configSchema, n as doctorReportSchema, o as tokenRequestResultSchema, p as OPERATIONS, pt as configBindings, q as JIRA_PROJECT_KEY, s as tokenRequestSchema, st as DEFAULT_LINK, t as assertNever, tt as err, vt as resolveWebOrigin, w as userIdSchema, wt as VIAS, x as inboundEventSchema, xt as ITEM_KINDS, y as SPACE_IDS, yt as COLUMN_IDS, z as SESSION_STATUSES } from "./chunk-CShDPfEG.mjs";
1
+ import { $ as parseRef$1, A as defaultBranchFactSchema, B as isExternalAuthor, C as messageRefSchema, Ct as TASK_HOLDS, D as eventPayloadSchemas, E as GATE_REASONS, F as trackerSourceId, G as sessionFactsSchema, H as prFactsSchema, I as PR_STATES, J as REF_NUMBER, K as ticketFactsSchema, L as REVIEW_STATES, M as prSourceId, N as sessionTransitionSchema, O as AdapterError, P as sourceCursorSchema, Q as parseActorId, R as SESSION_HEALTH_STATES, S as interactionRefSchema, St as SLACK_BOT_SCOPES, T as EVENT_KINDS, U as prRefSchema, V as parseRingMarker, W as ringMarker, X as encodeActorId, Y as actorIdSchema, Z as errorCodeOf, _t as requiredSecretKeys, a as requestHashOf, at as successEnvelopeSchema, b as conversationRefSchema, bt as DISPATCHER_MODES, c as tokenRequestStatusSchema, d as buildCatalogSnapshot, dt as RESERVED_PROJECT, et as ERRORS, f as roleCanUseOperation, ft as boardWideSpurProject, g as renderHttpProblem, gt as plainHttpAllowed, h as turnHandedSchema, ht as defaultAddressee, i as TOKEN_REQUEST_LIMITS, it as ok, j as entityRefSchema, k as batchSchema, l as BOARD_TICK_MS, lt as DEFAULT_SLACK_COMMAND, m as defaultBranchViewSchema, mt as configSchema, n as doctorReportSchema, o as tokenRequestResultSchema, p as OPERATIONS, pt as configBindings, q as JIRA_PROJECT_KEY, s as tokenRequestSchema, st as DEFAULT_LINK, t as assertNever, tt as err, vt as resolveWebOrigin, w as userIdSchema, wt as VIAS, x as inboundEventSchema, xt as ITEM_KINDS, y as SPACE_IDS, yt as COLUMN_IDS, z as SESSION_STATUSES } from "./chunk-5l4Msgb0.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";
@@ -17402,6 +17402,21 @@ function projectTargets(config, project, actor) {
17402
17402
  const projects = config.projects.filter((entry) => visible.has(entry.id));
17403
17403
  return projects.length === 0 ? [{ kind: "missing" }] : projects.map((entry) => projectTarget(entry.id));
17404
17404
  }
17405
+ /**
17406
+ * Drops each block's opening comment: its earliest comment when author, text and time equal the
17407
+ * block's author, reason and creation time. `block.ask` writes it as the Slack thread root, so the
17408
+ * reply list would repeat the question. Order is kept.
17409
+ */
17410
+ function withoutBlockOpenings(comments, blocks) {
17411
+ const byId = new Map(blocks.map((block) => [block.id, block]));
17412
+ const seen = /* @__PURE__ */ new Set();
17413
+ return comments.filter((comment) => {
17414
+ if (comment.block_id === null || seen.has(comment.block_id)) return true;
17415
+ seen.add(comment.block_id);
17416
+ const block = byId.get(`B${String(comment.block_id)}`);
17417
+ return !(block !== void 0 && comment.author === block.author && comment.text === block.reason && comment.created_at === block.at);
17418
+ });
17419
+ }
17405
17420
  async function taskByKey(trx, key) {
17406
17421
  const task = await trx.selectFrom("task").selectAll().where("key", "=", key).executeTakeFirst();
17407
17422
  if (task === void 0) throw new CommandError("not_found", "Check the task key.");
@@ -17513,7 +17528,7 @@ function createTaskQueries(deps) {
17513
17528
  };
17514
17529
  }),
17515
17530
  blocks,
17516
- comments: comments.map((comment) => commentView(comment, subject)),
17531
+ comments: withoutBlockOpenings(comments, blocks).map((comment) => commentView(comment, subject)),
17517
17532
  ...input.why === true ? { why: await why(trx, task) } : {}
17518
17533
  };
17519
17534
  }
package/dist/mcp.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { et as ERRORS, p as OPERATIONS, v as renderMcpError } from "./chunk-CShDPfEG.mjs";
2
- import { o as CliError, r as requestOperation } from "./chunk-B9KHYcVy.mjs";
3
- import { a as memoryVerdictCache, c as loadClientConfig, r as compareCatalogs, t as checkCatalog } from "./chunk-CE1ORAjy.mjs";
1
+ import { et as ERRORS, p as OPERATIONS, v as renderMcpError } from "./chunk-5l4Msgb0.mjs";
2
+ import { o as CliError, r as requestOperation } from "./chunk-Bw_gFKmQ.mjs";
3
+ import { a as memoryVerdictCache, c as loadClientConfig, r as compareCatalogs, t as checkCatalog } from "./chunk-DFqvm5hQ.mjs";
4
4
  import { randomUUID } from "node:crypto";
5
5
  import { readFileSync } from "node:fs";
6
6
  import { z } from "zod";