spur-board 0.169.0 → 0.170.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.
@@ -1,4 +1,4 @@
1
- import { d as tokenRequestStatusSchema, gt as errorEnvelopeSchema, ht as errorContextSchema, l as tokenRequestResultSchema, pt as ERRORS, vt as successEnvelopeSchema, x as renderJsonError } from "./chunk-_tWJWhul.mjs";
1
+ import { d as tokenRequestStatusSchema, gt as errorEnvelopeSchema, ht as errorContextSchema, l as tokenRequestResultSchema, pt as ERRORS, vt as successEnvelopeSchema, x as renderJsonError } from "./chunk-BebxFmW0.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { z } from "zod";
4
4
  import { request } from "node:http";
@@ -1406,7 +1406,7 @@ const ERRORS = {
1406
1406
  status: 409,
1407
1407
  exit: EXIT_CODES.refused,
1408
1408
  message: "The submission basis fields are inconsistent.",
1409
- hint: "Use from and a nonblank reason for carried, a nonblank reason for skipped, and from only with carried.",
1409
+ hint: "Use from and a nonblank reason for carried, a nonblank reason for skipped, and from only with carried; a submit without sha takes only a nonblank reason, no basis or from.",
1410
1410
  recovery: noRetry("Correct the basis fields and submit again.")
1411
1411
  }),
1412
1412
  submit_source_not_tested: spec("submit_source_not_tested", {
@@ -1416,6 +1416,13 @@ const ERRORS = {
1416
1416
  hint: "Choose a tested submission SHA on this task, or a carried SHA with a tested origin; otherwise test or explicitly skip with a reason.",
1417
1417
  recovery: noRetry("Choose a source with a tested origin on this task or change the basis.")
1418
1418
  }),
1419
+ submit_sha_required: spec("submit_sha_required", {
1420
+ status: 409,
1421
+ exit: EXIT_CODES.refused,
1422
+ message: "The submit needs a commit SHA.",
1423
+ hint: "Submit the pull request head; only a turn outside Dev on a task with no linked pull request closes without a commit.",
1424
+ recovery: noRetry("Submit the pull request head.")
1425
+ }),
1419
1426
  head_mismatch: spec("head_mismatch", {
1420
1427
  status: 409,
1421
1428
  exit: EXIT_CODES.refused,
@@ -2525,7 +2532,8 @@ const eventPayloadSchemas = {
2525
2532
  reason: S.optional(),
2526
2533
  turn: S.optional(),
2527
2534
  column: z.enum(COLUMN_IDS),
2528
- sha: S,
2535
+ /** Absent for a submit without a commit: a turn outside Dev on a task with no linked PR. */
2536
+ sha: S.optional(),
2529
2537
  /** The head was confirmed by the board's newest poll; GitHub did not answer the submit. */
2530
2538
  confirmedByPoll: z.literal(true).optional(),
2531
2539
  /** The board accepted the submit before it could confirm the head; it confirms it on a later poll. */
@@ -3234,6 +3242,12 @@ const taskWhySchema = z.strictObject({
3234
3242
  until: z.iso.datetime().describe("When the board stops waiting for a PR, ISO 8601 UTC; a linked PR is waited for until a poll observes it."),
3235
3243
  text: z.string().describe("The hold in words: submit pending confirmation of <sha7>.")
3236
3244
  }).optional().describe("The turn submit the board accepted pending; absent when no submit waits."),
3245
+ submittedWithoutCommit: z.strictObject({
3246
+ turn: turnIdSchema.describe("The closed turn."),
3247
+ at: z.iso.datetime().describe("When the turn closed, ISO 8601 UTC."),
3248
+ reason: z.string().describe("The reason the submit gave."),
3249
+ text: z.string().describe("The close in words: submitted without a commit: <reason>.")
3250
+ }).optional().describe("The current visit's turn closed by a submit without a commit; absent otherwise."),
3237
3251
  gates: z.array(z.strictObject({
3238
3252
  column: z.enum(COLUMN_IDS).describe("Board column."),
3239
3253
  enabled: z.boolean().describe("Whether the column is enabled in the project."),
@@ -3493,16 +3507,16 @@ const inboxAckOutputSchema = z.strictObject({
3493
3507
  });
3494
3508
  const taskSubmitInputSchema = z.strictObject({
3495
3509
  turn: z.union([turnIdSchema, taskKeyInputSchema]).describe("Turn ID you took (T4); while the project dispatcher is in shadow mode, the task key instead."),
3496
- sha: commitShaSchema.max(64).describe("Full commit SHA at the head of the pull request, lowercase."),
3497
- basis: z.enum(SUBMISSION_BASES).optional().describe("Testing provenance: tested (default), carried from a tested origin on this task, or skipped with a reason."),
3498
- from: commitShaSchema.max(64).optional().describe("Full lowercase source SHA on this task; required only for carried."),
3499
- reason: z.string().max(2e3).optional().describe("Literal nonblank explanation, up to 2000 UTF-16 units; required for carried and skipped.")
3510
+ sha: commitShaSchema.max(64).optional().describe("Full commit SHA at the head of the pull request, lowercase. Omit it only outside Dev on a task with no linked pull request, and give reason."),
3511
+ basis: z.enum(SUBMISSION_BASES).optional().describe("Testing provenance: tested (default), carried from a tested origin on this task, or skipped with a reason. Omit it for a submit without sha."),
3512
+ from: commitShaSchema.max(64).optional().describe("Full lowercase source SHA on this task; required only for carried. Omit it for a submit without sha."),
3513
+ reason: z.string().max(2e3).optional().describe("Literal nonblank explanation, up to 2000 UTF-16 units; required for carried and skipped, and for a submit without sha.")
3500
3514
  });
3501
3515
  const taskSubmitOutputSchema = z.strictObject({
3502
3516
  task: taskViewSchema,
3503
3517
  turn: turnIdSchema.nullable().describe("The closed turn; null for a submit by task key in shadow mode."),
3504
- sha: commitShaSchema.describe("The submitted commit SHA."),
3505
- status: z.enum(["confirmed", "pending"]).default("confirmed").describe("confirmed: the board saw the PR head at sha. pending: accepted, pending confirmation - the board confirms the head on its next polls and hands the turn back with the reason if it cannot; do not resubmit or raise a block.")
3518
+ sha: commitShaSchema.nullable().describe("The submitted commit SHA; null for a submit without a commit."),
3519
+ status: z.enum(["confirmed", "pending"]).default("confirmed").describe("confirmed: the board saw the PR head at sha, or the turn closed without a commit. pending: accepted, pending confirmation - the board confirms the head on its next polls and hands the turn back with the reason if it cannot; do not resubmit or raise a block.")
3506
3520
  });
3507
3521
  const taskReturnInputSchema = z.strictObject({
3508
3522
  turn: turnIdSchema,
@@ -3747,7 +3761,7 @@ const serviceSchema = z.strictObject({
3747
3761
  "failing"
3748
3762
  ]).describe("failing: a blind source, a github-project source whose last poll failed, or a gateway that is down; degraded: a source that never completed, is stale, warms up or waits for its rate budget, or a daemon with no completed board tick for over 120 seconds; else healthy. A source service takes its worst source."),
3749
3763
  since: z.iso.datetime().nullable().describe("Healthy: since when the service has been usable in this daemon run. That is daemon.startedAt for the daemon, the latest healthySince of its sources for github, github-project, jira and spur, and for a gateway the end of its last recorded outage or daemon.startedAt, whichever is later. Failing gateway: when the outage started. Otherwise null."),
3750
- lastGoodAt: z.iso.datetime().nullable().describe("Last sign of work: the last completed board tick for the daemon, the oldest latest observation of its sources for github, github-project, jira and spur (null when one has none); null for a gateway."),
3764
+ lastGoodAt: z.iso.datetime().nullable().describe("Last sign of work: the last completed board tick for the daemon, the oldest latest observation of its sources for github, github-project, jira and spur (null when one has none); for a gateway, the time of this read while its Socket Mode connection is up in this daemon run, even when a delivery failure makes it failing (`state` and `reason` name that failure); otherwise when it was last known up (when its connection dropped, or its last connect in an earlier daemon run); null for a gateway that was never up."),
3751
3765
  reason: z.string().nullable().describe("Why the service is not healthy, from its first worst source for github, jira and spur; null when healthy.")
3752
3766
  }).describe("Health of one service.");
3753
3767
  const statusInputSchema = z.strictObject({
@@ -5479,7 +5493,7 @@ const OPERATIONS = [
5479
5493
  kind: "mutation",
5480
5494
  description: "Submit the task's pull request head for a turn the caller took; the turn closes; a pending result is final.",
5481
5495
  mcp: {
5482
- whenToUse: "Hand in the work of a turn you took, at the pull request head. Declare tested (default), carried from a tested origin on this task, or skipped; carried requires from and reason, skipped requires reason. While the project dispatcher is in shadow mode no turn opens: the column executor submits with the task key.",
5496
+ whenToUse: "Hand in the work of a turn you took, at the pull request head. Declare tested (default), carried from a tested origin on this task, or skipped; carried requires from and reason, skipped requires reason. While the project dispatcher is in shadow mode no turn opens: the column executor submits with the task key. Outside Dev, on a task with no linked pull request, omit sha, basis and from, and give a nonblank reason to close the turn without a commit.",
5483
5497
  whenNotToUse: "Use task_return to send the task back to Dev instead."
5484
5498
  },
5485
5499
  input: taskSubmitInputSchema,
@@ -5496,6 +5510,7 @@ const OPERATIONS = [
5496
5510
  "task_archived",
5497
5511
  "turn_closed",
5498
5512
  "not_turn_taker",
5513
+ "submit_sha_required",
5499
5514
  "submit_basis_invalid",
5500
5515
  "submit_source_not_tested",
5501
5516
  "head_mismatch",
@@ -5570,6 +5585,22 @@ const OPERATIONS = [
5570
5585
  sha: submittedSha,
5571
5586
  status: "confirmed"
5572
5587
  }
5588
+ },
5589
+ {
5590
+ summary: "Close a Done wrap-up on a task with no pull request",
5591
+ input: {
5592
+ turn: "T5",
5593
+ reason: "Findings are in the ticket; no code change."
5594
+ },
5595
+ output: {
5596
+ task: {
5597
+ ...task,
5598
+ column: "done"
5599
+ },
5600
+ turn: "T5",
5601
+ sha: null,
5602
+ status: "confirmed"
5603
+ }
5573
5604
  }
5574
5605
  ]
5575
5606
  }),
@@ -1,5 +1,5 @@
1
- import { Mt as plainHttpAllowed, g as OPERATIONS, kt as configSchema, m as buildCatalogSnapshot } from "./chunk-_tWJWhul.mjs";
2
- import { o as CliError, t as fetchCatalogVersion } from "./chunk-Bp_JzHSF.mjs";
1
+ import { Mt as plainHttpAllowed, g as OPERATIONS, kt as configSchema, m as buildCatalogSnapshot } from "./chunk-BebxFmW0.mjs";
2
+ import { o as CliError, t as fetchCatalogVersion } from "./chunk-BbohDnMm.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 { Ct as DEFAULT_STAND_PORT_RANGE, Ft as resolveWebOrigin, It as slackConfigured, Pt as requiredSecretKeys, Ut as SLACK_BOT_SCOPES, c as requestHashOf, ct as actorIdSchema, g as OPERATIONS, h as roleCanUseOperation, j as sortSkillFiles, k as skillReloadFileSchema, kt as configSchema, n as SLACK_OFF_FIX, o as remoteDoctorReportSchema, p as SYSTEMD_SERVICE_SETTINGS, pt as ERRORS, r as SLACK_PARTLY_FIX, vt as successEnvelopeSchema } from "./chunk-_tWJWhul.mjs";
1
+ import { Ct as DEFAULT_STAND_PORT_RANGE, Ft as resolveWebOrigin, It as slackConfigured, Pt as requiredSecretKeys, Ut as SLACK_BOT_SCOPES, c as requestHashOf, ct as actorIdSchema, g as OPERATIONS, h as roleCanUseOperation, j as sortSkillFiles, k as skillReloadFileSchema, kt as configSchema, n as SLACK_OFF_FIX, o as remoteDoctorReportSchema, p as SYSTEMD_SERVICE_SETTINGS, pt as ERRORS, r as SLACK_PARTLY_FIX, vt as successEnvelopeSchema } from "./chunk-BebxFmW0.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-Bp_JzHSF.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-BzKjwY-N.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-BbohDnMm.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-DEHqpoRe.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";
@@ -2439,7 +2439,8 @@ function registerOptions(command, op) {
2439
2439
  for (const arg of op.cli.args) {
2440
2440
  const schema = fieldSchema(op, arg);
2441
2441
  if (!schema) throw new Error(`Catalog argument ${arg} is missing from ${op.id}.`);
2442
- command.argument(bareSchema(schema) instanceof z.ZodArray ? `<${arg}...>` : `<${arg}>`);
2442
+ if (bareSchema(schema) instanceof z.ZodArray) command.argument(`<${arg}...>`);
2443
+ else command.argument(schema instanceof z.ZodOptional ? `[${arg}]` : `<${arg}>`);
2443
2444
  }
2444
2445
  const modeValues = new Set(op.cli.modes?.flatMap((mode) => mode.value ? [mode.value] : []));
2445
2446
  const fields = /* @__PURE__ */ new Map();
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-Bp_JzHSF.mjs";
1
+ export { t as fetchCatalogVersion, n as fetchTokenStatus, r as requestOperation, i as requestSkillReload, a as requestTokenEnrollment } from "./chunk-BbohDnMm.mjs";