spur-board 0.144.0 → 0.146.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.
Files changed (28) hide show
  1. package/dist/{chunk-Bt8v7TND.mjs → chunk-BS5xzBWL.mjs} +106 -5
  2. package/dist/{chunk-sn-nSSNs.mjs → chunk-CTCKroE3.mjs} +2 -2
  3. package/dist/{chunk-B9Pt8i90.mjs → chunk-DEbPRDF0.mjs} +1 -1
  4. package/dist/cli.mjs +3 -3
  5. package/dist/client.mjs +1 -1
  6. package/dist/daemon.mjs +2310 -1999
  7. package/dist/mcp.mjs +3 -3
  8. package/dist/migrations/0030_turn_wait.sql +9 -0
  9. package/dist/web/assets/{index-D8GjtUEd.css → index-CoOyeVqE.css} +1 -1
  10. package/dist/web/assets/index-DuIWV_i0.js +64 -0
  11. package/dist/web/index.html +2 -2
  12. package/package.json +1 -1
  13. package/skills/spur-board/SKILL.md +6 -2
  14. package/skills/spur-board/references/blocks.md +10 -0
  15. package/skills/spur-board/references/errors.md +1 -0
  16. package/skills/spur-board/references/how-board-works-columns.md +6 -6
  17. package/skills/spur-board/references/how-board-works-history.md +1 -0
  18. package/skills/spur-board/references/how-board-works-inbox.md +2 -2
  19. package/skills/spur-board/references/how-board-works-turns.md +17 -13
  20. package/skills/spur-board/references/how-board-works-waits.md +75 -0
  21. package/skills/spur-board/references/how-board-works-web.md +2 -2
  22. package/skills/spur-board/references/how-board-works.md +4 -2
  23. package/skills/spur-board/references/tasks.md +2 -2
  24. package/skills/spur-board/references/web-ui-board.md +29 -28
  25. package/skills/spur-board/references/web-ui-task-turn.md +26 -22
  26. package/skills/spur-board/references/web-ui-task-view.md +3 -3
  27. package/skills/spur-board/references/web-ui.md +3 -2
  28. package/dist/web/assets/index-BdbbRbrA.js +0 -64
@@ -206,6 +206,17 @@ const TURN_OUTCOMES = [
206
206
  "mode_changed",
207
207
  "archived"
208
208
  ];
209
+ /**
210
+ * How a turn wait ended: `woken` when its time ran out, `submitted` by the holder's submit,
211
+ * `closed` by any other turn close, a take or the holder's end, `limit` when it ran out and the
212
+ * turn's waits reached their count or total time.
213
+ */
214
+ const TURN_WAIT_OUTCOMES = [
215
+ "woken",
216
+ "submitted",
217
+ "closed",
218
+ "limit"
219
+ ];
209
220
  /** The exit conditions of the column gates, as `board task --why` names them. */
210
221
  const GATE_CONDITIONS = [
211
222
  "pr_open",
@@ -458,7 +469,7 @@ const trackerColumnSource = z.strictObject({
458
469
  const columnConfig = z.strictObject({
459
470
  id: columnId.describe("The built-in column this entry configures."),
460
471
  enabled: z.boolean().default(true).describe("false skips the column: tasks move past it and its exit condition is not checked. todo, dev and done cannot be disabled."),
461
- orchestrator: nonEmpty.default("none").describe("Who takes the column's turns. none: the task's live worker session, else the operator. operator: the operator, who also gets the questions asked in the column. Otherwise the name of a spurProjects entry with role orchestrator or curator whose sessions orchestrate the column and get the questions others ask in it. A column left at none, and enabled, takes the top-level spurProjects orchestrator that lists it."),
472
+ orchestrator: nonEmpty.default("none").describe("Who takes the column's turns. none: in Dev the task's live worker session, else the operator; in Done a wrap-up turn for the live worker, else no turn; in Review, Product Review, QA and Ready to Merge the operator; External Review waits for approval with no turn. operator: the operator, who also gets the questions asked in the column. Otherwise the name of a spurProjects entry with role orchestrator or curator whose sessions orchestrate the column and get the questions others ask in it. A column left at none, and enabled, takes the top-level spurProjects orchestrator that lists it."),
462
473
  cycleLimit: z.int().min(1).default(DEFAULT_CYCLE_LIMIT).describe("How many times a task may return to Dev from this column before the board stops it for the operator. Returns by the column executor, for external comments and for unresolved review threads count, a changes-requested review included (it is an external comment, not a separate return); a conflict, red CI and a draft do not."),
463
474
  courseCheck: z.int().min(0).default(DEFAULT_COURSE_CHECK).describe("How many returns to Dev from this column, counted as for cycleLimit, before the board holds the task and asks courseCheckTo (by default the curator, or the operator when the project has no curator) to check its course. The answer resets the count and reaches the worker as a task comment. 0 turns the check off; cycleLimit is checked first. With External Review enabled, returns for external comments from any column, and each external change request on a new PR head while the task is in Dev (once per head), count toward External Review's courseCheck instead of this column's; cycleLimit still counts them per column."),
464
475
  courseCheckTo: nonEmpty.optional().describe("Who answers this column's course check: operator, the curator's name, or the name of a column orchestrator listed in this project's spurProjects; a board-wide orchestrator is refused. Without it, the curator, or the operator when the project has no curator. When the addressee has no live session the question moves to the operator; a conductor that is rung and does not answer keeps it, and the operator gets an item."),
@@ -877,6 +888,10 @@ const configObject = z.strictObject({
877
888
  sessions: z.int().min(1).default(3).describe("Sessions entering error within the window that start an episode."),
878
889
  windowMs: durationMs(6e4, "Window in which that many sessions entering error start a host-load episode"),
879
890
  maxEpisodeMs: durationMs(3e5, "Longest a host-load episode lasts before error flags resume")
891
+ }).prefault({}),
892
+ turnWait: z.strictObject({
893
+ maxWaits: z.int().min(1).default(8).describe("Waits a turn may start, counted over its whole life."),
894
+ maxTotalMs: durationMs(72e5, "Total time the waits of one turn may last")
880
895
  }).prefault({})
881
896
  }).prefault({})
882
897
  });
@@ -1334,6 +1349,13 @@ const ERRORS = {
1334
1349
  hint: "Take the turn with `board inbox ack` first; only the session that took it can submit or return it.",
1335
1350
  recovery: noRetry("Take the turn first; only the session that took it can submit or return it.")
1336
1351
  }),
1352
+ turn_wait_limit: spec("turn_wait_limit", {
1353
+ status: 409,
1354
+ exit: EXIT_CODES.refused,
1355
+ message: "The turn has used its waits: the count or the total wait time reached the limit.",
1356
+ hint: "Submit or return the turn; the operator gets an inbox item once the wait ends.",
1357
+ recovery: noRetry("Submit or return the turn instead of waiting again.")
1358
+ }),
1337
1359
  submit_basis_invalid: spec("submit_basis_invalid", {
1338
1360
  status: 409,
1339
1361
  exit: EXIT_CODES.refused,
@@ -2301,6 +2323,8 @@ const EVENT_KINDS = [
2301
2323
  "turn_opened",
2302
2324
  "turn_taken",
2303
2325
  "turn_closed",
2326
+ "turn_wait_started",
2327
+ "turn_wait_ended",
2304
2328
  "block_opened",
2305
2329
  "block_escalated",
2306
2330
  "block_unblocked",
@@ -2523,6 +2547,19 @@ const eventPayloadSchemas = {
2523
2547
  turn: S,
2524
2548
  outcome: z.enum(TURN_OUTCOMES)
2525
2549
  }),
2550
+ /** `until` is when the board wakes the holder; `waits` counts the turn's waits so far. */
2551
+ turn_wait_started: z.looseObject({
2552
+ turn: S,
2553
+ reason: S,
2554
+ until: S,
2555
+ waits: N
2556
+ }),
2557
+ turn_wait_ended: z.looseObject({
2558
+ turn: S,
2559
+ outcome: z.enum(TURN_WAIT_OUTCOMES),
2560
+ waitedMs: z.int().min(0),
2561
+ waits: N
2562
+ }),
2526
2563
  block_opened: z.looseObject({
2527
2564
  block: S,
2528
2565
  type: z.enum(BLOCK_TYPES),
@@ -2958,6 +2995,12 @@ const turnReturnSchema = z.strictObject({
2958
2995
  block: blockIdSchema.describe("The code block the return opened."),
2959
2996
  reason: z.string().describe("Reason of the return, verbatim from its code block.")
2960
2997
  }).describe("The return that sent the task back to Dev and opened this visit.");
2998
+ /** The active wait of a taken turn, started by its holder with `task.wait`. */
2999
+ const turnWaitSchema = z.strictObject({
3000
+ reason: z.string().min(1).describe("What the holder waits for, as it gave it."),
3001
+ since: z.iso.datetime().describe("When the wait started, ISO 8601 UTC."),
3002
+ wakesAt: z.iso.datetime().describe("When the board ends the wait and rings the holder, ISO 8601 UTC.")
3003
+ }).describe("The active wait of the turn.");
2961
3004
  const turnViewSchema = z.strictObject({
2962
3005
  id: turnIdSchema,
2963
3006
  task: taskKeySchema,
@@ -2972,6 +3015,7 @@ const turnViewSchema = z.strictObject({
2972
3015
  by: actorIdSchema,
2973
3016
  at: z.iso.datetime().describe("When the turn was taken, ISO 8601 UTC.")
2974
3017
  }).nullable().describe("Who took the turn and when; null until it is taken."),
3018
+ wait: turnWaitSchema.optional().describe("The active wait the holder started with task.wait: its reason, start and wake time. Absent when the turn is not waiting."),
2975
3019
  threads: z.array(z.strictObject({
2976
3020
  id: z.string().min(1).describe("Node ID of the review thread."),
2977
3021
  url: z.url({ protocol: /^https?$/ }).describe("Web URL of the thread's first comment."),
@@ -2985,6 +3029,7 @@ const taskTurnSchema = turnViewSchema.pick({
2985
3029
  addressee: true,
2986
3030
  at: true,
2987
3031
  taken: true,
3032
+ wait: true,
2988
3033
  handed: true,
2989
3034
  returned: true
2990
3035
  }).extend({ closed: z.strictObject({
@@ -3367,6 +3412,16 @@ const taskReturnOutputSchema = z.strictObject({
3367
3412
  task: taskViewSchema,
3368
3413
  block: blockViewSchema
3369
3414
  });
3415
+ const taskWaitInputSchema = z.strictObject({
3416
+ turn: turnIdSchema.describe("Turn ID you took (T4)."),
3417
+ for: z.int().min(1).max(120).describe("Whole minutes to wait, 1 to 120; the turn total cap may shorten it."),
3418
+ reason: z.string().min(1).max(200).regex(/\S/).describe("What you wait for, up to 200 characters; the wake ring repeats it.")
3419
+ });
3420
+ const taskWaitOutputSchema = z.strictObject({
3421
+ turn: turnIdSchema.describe("The waiting turn."),
3422
+ wait: turnWaitSchema,
3423
+ waits: z.int().min(1).describe("Waits the turn has started, this one included.")
3424
+ });
3370
3425
  /**
3371
3426
  * The three writes as `browserOperations` entries (`../browser.ts`), kept beside their schemas: the
3372
3427
  * web Turn section calls them, and the catalog shares the same schema objects.
@@ -3404,7 +3459,7 @@ const configViewSchema = z.strictObject({
3404
3459
  "orchestrator",
3405
3460
  "curator",
3406
3461
  "operator"
3407
- ]).describe("Configured executor; worker falls back to operator without a live worker."),
3462
+ ]).describe("Configured executor; worker falls back to operator without a live worker, except in Done, which then opens no turn; unbound Review, Product Review, QA and Ready to Merge read operator."),
3408
3463
  name: z.string().nullable().describe("Named Spur project, or null for automatic routing.")
3409
3464
  }).describe("Effective column executor."),
3410
3465
  group: z.enum(COLUMN_GROUPS).optional().describe("Column group; present only on Todo-group columns."),
@@ -3492,7 +3547,7 @@ const columnsDescribeOutputSchema = z.strictObject({ projects: z.array(z.strictO
3492
3547
  text: z.string().describe("Turn ownership, fallback and project-selected session scope.")
3493
3548
  }).describe("Effective executor; Todo does not open turns, Done may open an agent wrap-up turn."),
3494
3549
  escalation: z.strictObject({
3495
- chain: z.array(destination).describe("Question escalation starting at the executor; self-role steps are skipped using runtime routing."),
3550
+ chain: z.array(destination).describe("Question escalation starting at the first recipient: the executor, or the task's live worker in a column with no executor bound; self-role steps are skipped using runtime routing."),
3496
3551
  noRecipient: z.strictObject({
3497
3552
  operatorItemAfterMs: z.int().min(1).describe("Effective noRecipientAfterMs before one operator item per project/column for untaken named-orchestrator turns without a recipient; a positive duration, not a zero-disabled policy."),
3498
3553
  text: z.string().describe("Wait origin, recipient eligibility, source readiness, item clearing and no-reroute qualifications.")
@@ -4481,8 +4536,8 @@ const OPERATIONS = [
4481
4536
  kind: "mutation",
4482
4537
  description: "Mark comments, agent-addressed blocks, turns or doorbell rings as read; acking a turn makes the caller its taker.",
4483
4538
  mcp: {
4484
- whenToUse: "Mark handled inbox items or a ring ID like N18-1 read; an item handled before comes back under alreadyHandled. The operator acks a turn ID to take over an open orchestrator turn, taken or not.",
4485
- whenNotToUse: "Use inbox_get to inspect them first."
4539
+ whenToUse: "Mark handled inbox items or a ring ID like N18-1 read; an item handled before comes back under alreadyHandled. The operator acks a turn ID to take a turn addressed to the operator, or to take over an open orchestrator turn, taken or not.",
4540
+ whenNotToUse: "Use inbox_get to inspect them first; the operator finds the turns addressed to it with inbox_operator."
4486
4541
  },
4487
4542
  input: inboxAckInputSchema,
4488
4543
  output: inboxAckOutputSchema,
@@ -5408,6 +5463,52 @@ const OPERATIONS = [
5408
5463
  }
5409
5464
  }]
5410
5465
  }),
5466
+ defineOperation({
5467
+ id: "task.wait",
5468
+ kind: "mutation",
5469
+ description: "Wait on a turn the caller took for an outside condition; the Board stays quiet, then rings the holder when the wait ends.",
5470
+ mcp: {
5471
+ whenToUse: "You hold a turn and must re-check an outside condition later, such as a busy test stand: wait for whole minutes with the reason instead of sitting quiet. The Board rings you with the reason when the wait ends; submit, return or a close ends it earlier. Waits per turn are capped by count and total time.",
5472
+ whenNotToUse: "Use task_submit to hand in finished work, or task_return to send the task back to Dev."
5473
+ },
5474
+ input: taskWaitInputSchema,
5475
+ output: taskWaitOutputSchema,
5476
+ grants: [
5477
+ { grant: "task-worker" },
5478
+ { grant: "column-orchestrator" },
5479
+ { grant: "operator" }
5480
+ ],
5481
+ errors: [
5482
+ "wrong_id_kind",
5483
+ "not_found",
5484
+ "task_archived",
5485
+ "turn_closed",
5486
+ "not_turn_taker",
5487
+ "turn_wait_limit"
5488
+ ],
5489
+ cli: {
5490
+ command: "wait",
5491
+ args: ["turn"]
5492
+ },
5493
+ slack: null,
5494
+ examples: [{
5495
+ summary: "Wait 30 minutes for a free test stand",
5496
+ input: {
5497
+ turn: "T4",
5498
+ for: 30,
5499
+ reason: "waiting for a free test stand"
5500
+ },
5501
+ output: {
5502
+ turn: "T4",
5503
+ wait: {
5504
+ reason: "waiting for a free test stand",
5505
+ since: at,
5506
+ wakesAt: "2026-01-05T10:00:00.000Z"
5507
+ },
5508
+ waits: 1
5509
+ }
5510
+ }]
5511
+ }),
5411
5512
  defineOperation({
5412
5513
  id: "task.move",
5413
5514
  kind: "mutation",
@@ -1,5 +1,5 @@
1
- import { Dt as plainHttpAllowed, Tt as configSchema, d as buildCatalogSnapshot, p as OPERATIONS } from "./chunk-Bt8v7TND.mjs";
2
- import { o as CliError, t as fetchCatalogVersion } from "./chunk-B9Pt8i90.mjs";
1
+ import { Dt as plainHttpAllowed, Tt as configSchema, d as buildCatalogSnapshot, p as OPERATIONS } from "./chunk-BS5xzBWL.mjs";
2
+ import { o as CliError, t as fetchCatalogVersion } from "./chunk-DEbPRDF0.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";
@@ -1,4 +1,4 @@
1
- import { _ as renderJsonError, c as tokenRequestStatusSchema, dt as errorContextSchema, ft as errorEnvelopeSchema, lt as ERRORS, mt as successEnvelopeSchema, o as tokenRequestResultSchema } from "./chunk-Bt8v7TND.mjs";
1
+ import { _ as renderJsonError, c as tokenRequestStatusSchema, dt as errorContextSchema, ft as errorEnvelopeSchema, lt as ERRORS, mt as successEnvelopeSchema, o as tokenRequestResultSchema } from "./chunk-BS5xzBWL.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { z } from "zod";
4
4
  import { request } from "node:http";
package/dist/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { At as resolveWebOrigin, D as sortSkillFiles, It as SLACK_BOT_SCOPES, T as skillReloadFileSchema, Tt as configSchema, a as requestHashOf, f as roleCanUseOperation, it as actorIdSchema, kt as requiredSecretKeys, lt as ERRORS, mt as successEnvelopeSchema, p as OPERATIONS, r as remoteDoctorReportSchema, u as SYSTEMD_SERVICE_SETTINGS, yt as DEFAULT_STAND_PORT_RANGE } from "./chunk-Bt8v7TND.mjs";
1
+ import { At as resolveWebOrigin, D as sortSkillFiles, It as SLACK_BOT_SCOPES, T as skillReloadFileSchema, Tt as configSchema, a as requestHashOf, f as roleCanUseOperation, it as actorIdSchema, kt as requiredSecretKeys, lt as ERRORS, mt as successEnvelopeSchema, p as OPERATIONS, r as remoteDoctorReportSchema, u as SYSTEMD_SERVICE_SETTINGS, yt as DEFAULT_STAND_PORT_RANGE } from "./chunk-BS5xzBWL.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-B9Pt8i90.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-sn-nSSNs.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-DEbPRDF0.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-CTCKroE3.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-B9Pt8i90.mjs";
1
+ export { t as fetchCatalogVersion, n as fetchTokenStatus, r as requestOperation, i as requestSkillReload, a as requestTokenEnrollment } from "./chunk-DEbPRDF0.mjs";