spur-board 0.78.0 → 0.80.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.
@@ -2080,7 +2080,9 @@ const eventPayloadSchemas = {
2080
2080
  turn: S.optional(),
2081
2081
  block: S.optional(),
2082
2082
  reason: z.enum(MOVE_REASONS).optional(),
2083
- gate: z.array(z.enum(GATE_REASONS)).optional()
2083
+ gate: z.array(z.enum(GATE_REASONS)).optional(),
2084
+ /** Number of review findings a return sent, when the returner gave it. */
2085
+ findings: z.int().min(0).optional()
2084
2086
  }),
2085
2087
  task_shadow_moved: z.looseObject({
2086
2088
  from: z.enum(COLUMN_IDS),
@@ -2575,6 +2577,22 @@ const taskTurnSchema = turnViewSchema.pick({
2575
2577
  at: z.iso.datetime().describe("When the turn closed, ISO 8601 UTC."),
2576
2578
  outcome: z.enum(TURN_OUTCOMES).describe("How the turn closed; turns closed by a return or a mode switch before those were recorded read moved.")
2577
2579
  }).nullable().describe("How and when the turn closed; null while it is open.") }).describe("A task's turn: the executor of a column is asked to act on it.");
2580
+ const omittedTurnDetail = "Always omitted by status.get, even with detail=true; use task.get --why or inbox.get for details.";
2581
+ /** A turn as a `status.get` row shows it: no feedback, return context or threads. */
2582
+ const statusTurnSchema = turnViewSchema.omit({ handed: true }).extend({
2583
+ returned: turnViewSchema.shape.returned.describe(omittedTurnDetail),
2584
+ threads: turnViewSchema.shape.threads.describe(omittedTurnDetail),
2585
+ addressedTo: z.string().nullable().describe("Newest assigned recipient session of an untaken turn; null when taken or unassigned."),
2586
+ stalledSince: z.iso.datetime().nullable().describe("When the executor stall on this turn began, ISO 8601 UTC, while its stall block is open; null otherwise.")
2587
+ }).describe("Unclosed turn without feedback, return context or thread details.");
2588
+ /** The return a `status.get` task row shows while the task stays in Dev after it. */
2589
+ const statusReturnedSchema = z.strictObject({
2590
+ from: z.enum(COLUMN_IDS).describe("Column the task was returned from."),
2591
+ at: z.iso.datetime().describe("When the task was returned, ISO 8601 UTC."),
2592
+ by: actorIdSchema.describe("Who returned the task to Dev."),
2593
+ block: blockIdSchema.describe("The code block the return opened."),
2594
+ findings: z.int().min(0).nullable().describe("Number of review findings the return sent; null when not given.")
2595
+ });
2578
2596
  //#endregion
2579
2597
  //#region ../contracts/src/ops/schemas.ts
2580
2598
  /**
@@ -2695,12 +2713,6 @@ const linkViewSchema = z.strictObject({
2695
2713
  }).describe("An effective link to a task.");
2696
2714
  const detailOnly = "Present only with detail.";
2697
2715
  const count = (what) => z.int().min(0).describe(what);
2698
- const omittedTurnDetail = "Always omitted by status.get, even with detail=true; use task.get --why or inbox.get for details.";
2699
- const statusTurnSchema = turnViewSchema.omit({ handed: true }).extend({
2700
- returned: turnViewSchema.shape.returned.describe(omittedTurnDetail),
2701
- threads: turnViewSchema.shape.threads.describe(omittedTurnDetail),
2702
- addressedTo: z.string().nullable().describe("Newest assigned recipient session of an untaken turn; null when taken or unassigned.")
2703
- }).describe("Unclosed turn without feedback, return context or thread details.");
2704
2716
  const prSummarySchema = z.strictObject({
2705
2717
  repo: prFactsSchema.shape.repo,
2706
2718
  number: prFactsSchema.shape.number,
@@ -2729,6 +2741,12 @@ const statusTaskSchema = taskViewSchema.extend({
2729
2741
  prCount: count("Number of effective pull request links."),
2730
2742
  sessionCount: count("Number of effective session links."),
2731
2743
  openBlocks: count("Number of open blocks on the task."),
2744
+ blocks: z.array(z.strictObject({
2745
+ id: blockIdSchema,
2746
+ addressee: blockViewSchema.shape.addressee,
2747
+ session: z.string().min(1).nullable().describe("Session the newest block notification for the addressee went to; null for the operator or before assignment.")
2748
+ }).describe("One open block.")).describe("Open blocks on the task, oldest first, without their text."),
2749
+ returned: statusReturnedSchema.optional().describe("The return that put the task in Dev. Present only while the task stays in Dev after the return and before its next submit."),
2732
2750
  ticket: ticketFactsSchema.nullable().optional().describe(`Latest ticket facts, or null before observation. ${detailOnly}`),
2733
2751
  prs: z.array(prFactsSchema).optional().describe(`Latest facts for linked pull requests. ${detailOnly}`),
2734
2752
  sessions: z.array(statusSessionFactsSchema).optional().describe(`Latest facts for linked sessions. ${detailOnly}`),
@@ -2877,7 +2895,12 @@ const statusOutputSchema = z.strictObject({
2877
2895
  unlinkedSessions: z.array(statusUnlinkedSessionSchema).describe("Observed sessions without a task link; ones ended, or gone from Spur's session list, for over 7 days are left out."),
2878
2896
  hiddenUnlinkedPrs: z.int().min(0).describe("Unlinked pull requests not listed: merged or closed, with no change for over 7 days. Counted within the requested projects; detail does not list them."),
2879
2897
  hiddenUnlinkedSessions: z.int().min(0).describe("Unlinked sessions not listed: ended, or gone from Spur's session list, for over 7 days. Counted within the requested projects; detail does not list them."),
2880
- bindings: statusBindingsSchema
2898
+ bindings: statusBindingsSchema,
2899
+ daemon: z.strictObject({
2900
+ version: z.string().min(1).describe("Product version of the running daemon."),
2901
+ startedAt: z.iso.datetime().describe("When the daemon started, ISO 8601 UTC."),
2902
+ lastDispatchAt: z.iso.datetime().nullable().describe("When the last completed board tick (dispatch pass) ended, ISO 8601 UTC; null until the first tick after start.")
2903
+ }).describe("The running daemon: version, start time and last completed tick.")
2881
2904
  });
2882
2905
  const commentAddInputSchema = z.strictObject({
2883
2906
  task: taskKeyInputSchema,
@@ -2896,28 +2919,34 @@ const blockAnswerOutputSchema = z.strictObject({
2896
2919
  });
2897
2920
  //#endregion
2898
2921
  //#region ../contracts/src/ops/config-view-schema.ts
2899
- const configViewSchema = z.strictObject({ projects: z.array(z.strictObject({
2900
- id: z.string().min(1).describe("Board project ID."),
2901
- columns: z.array(z.strictObject({
2902
- id: z.enum(COLUMN_IDS).describe("Enabled column in canonical order."),
2903
- executor: z.strictObject({
2904
- kind: z.enum([
2905
- "dispatcher",
2906
- "worker",
2907
- "orchestrator",
2908
- "curator",
2909
- "operator"
2910
- ]).describe("Configured executor; worker falls back to operator without a live worker."),
2911
- name: z.string().nullable().describe("Named Spur project, or null for automatic routing.")
2912
- }).describe("Effective column executor.")
2913
- })).describe("Enabled board columns."),
2914
- dispatcher: z.strictObject({ mode: z.enum(DISPATCHER_MODES).describe("Effective dispatcher mode.") }).describe("Dispatcher configuration."),
2915
- spurProjects: z.array(z.strictObject({
2916
- name: z.string().min(1).describe("Spur project name."),
2917
- role: configSchema.shape.projects.element.shape.spurProjects.unwrap().element.shape.role,
2918
- displayName: z.string().min(1).describe("Configured display name, falling back to project name.")
2919
- })).describe("Effective Spur project bindings.")
2920
- })).describe("Effective projects visible to this caller.") }).describe("Allowlisted effective configuration without credentials or adapter settings.");
2922
+ const configViewSchema = z.strictObject({
2923
+ projects: z.array(z.strictObject({
2924
+ id: z.string().min(1).describe("Board project ID."),
2925
+ columns: z.array(z.strictObject({
2926
+ id: z.enum(COLUMN_IDS).describe("Enabled column in canonical order."),
2927
+ executor: z.strictObject({
2928
+ kind: z.enum([
2929
+ "dispatcher",
2930
+ "worker",
2931
+ "orchestrator",
2932
+ "curator",
2933
+ "operator"
2934
+ ]).describe("Configured executor; worker falls back to operator without a live worker."),
2935
+ name: z.string().nullable().describe("Named Spur project, or null for automatic routing.")
2936
+ }).describe("Effective column executor.")
2937
+ })).describe("Enabled board columns."),
2938
+ dispatcher: z.strictObject({ mode: z.enum(DISPATCHER_MODES).describe("Effective dispatcher mode.") }).describe("Dispatcher configuration."),
2939
+ spurProjects: z.array(z.strictObject({
2940
+ name: z.string().min(1).describe("Spur project name."),
2941
+ role: configSchema.shape.projects.element.shape.spurProjects.unwrap().element.shape.role,
2942
+ displayName: z.string().min(1).describe("Configured display name, falling back to project name.")
2943
+ })).describe("Effective Spur project bindings.")
2944
+ })).describe("Effective projects visible to this caller."),
2945
+ web: z.strictObject({
2946
+ publicOrigin: z.url({ protocol: /^https?$/ }).nullable().describe("Origin the board web listener answers on; null when the listener is off or not bound yet."),
2947
+ spurUiOrigin: z.url({ protocol: /^https?$/ }).nullable().describe("Origin of the Spur web UI clients link sessions to; null when not configured.")
2948
+ }).describe("Web origins of the board listener and the Spur UI.")
2949
+ }).describe("Allowlisted effective configuration without credentials or adapter settings.");
2921
2950
  //#endregion
2922
2951
  //#region ../contracts/src/ops/inbox-schemas.ts
2923
2952
  /** One entry of the operator inbox: an operator item, a block addressed to the operator or a turn. */
@@ -2991,6 +3020,11 @@ const linkModes = [
2991
3020
  }
2992
3021
  ];
2993
3022
  const at = "2026-01-05T09:30:00.000Z";
3023
+ const daemon = {
3024
+ version: "0.4.0",
3025
+ startedAt: "2026-01-05T08:00:00.000Z",
3026
+ lastDispatchAt: at
3027
+ };
2994
3028
  const task = {
2995
3029
  key: "PROJ-123",
2996
3030
  project: "web",
@@ -3216,6 +3250,7 @@ const OPERATIONS = [
3216
3250
  prCount: 0,
3217
3251
  sessionCount: 0,
3218
3252
  openBlocks: 0,
3253
+ blocks: [],
3219
3254
  turn: null,
3220
3255
  prSummary: null,
3221
3256
  links: {
@@ -3248,7 +3283,8 @@ const OPERATIONS = [
3248
3283
  spurProject: "hq",
3249
3284
  source: "board-wide"
3250
3285
  }
3251
- }
3286
+ },
3287
+ daemon
3252
3288
  }
3253
3289
  }, {
3254
3290
  summary: "Show the board with full facts and links",
@@ -3266,6 +3302,7 @@ const OPERATIONS = [
3266
3302
  prCount: 0,
3267
3303
  sessionCount: 0,
3268
3304
  openBlocks: 0,
3305
+ blocks: [],
3269
3306
  turn: null,
3270
3307
  prSummary: null,
3271
3308
  links: {
@@ -3289,7 +3326,8 @@ const OPERATIONS = [
3289
3326
  columns: [],
3290
3327
  operators: [],
3291
3328
  defaultAddressee: null
3292
- }
3329
+ },
3330
+ daemon
3293
3331
  }
3294
3332
  }]
3295
3333
  }),
@@ -4484,14 +4522,15 @@ const OPERATIONS = [
4484
4522
  defineOperation({
4485
4523
  id: "task.return",
4486
4524
  kind: "mutation",
4487
- description: "Return the task of a turn this session took to Dev, opening a code block on the worker with the reason.",
4525
+ description: "Return the task of a turn this session took to Dev; the reason opens a worker code block.",
4488
4526
  mcp: {
4489
- whenToUse: "Send the task back to Dev because the work needs code changes.",
4527
+ whenToUse: "Send the task back to Dev when the work needs code changes.",
4490
4528
  whenNotToUse: "Use task_submit to hand in the work instead."
4491
4529
  },
4492
4530
  input: z.strictObject({
4493
4531
  turn: turnIdSchema,
4494
- reason: text("What the worker must change, sent to the worker as a code block.", TEXT_MAX)
4532
+ reason: text("What the worker must change, sent to the worker as a code block.", TEXT_MAX),
4533
+ findings: z.int().min(0).optional().describe("Number of review findings the return sends; shown on the task's status row.")
4495
4534
  }),
4496
4535
  output: z.strictObject({
4497
4536
  task: taskViewSchema,
@@ -4526,6 +4565,22 @@ const OPERATIONS = [
4526
4565
  reason: "Handle the empty list in the parser."
4527
4566
  }
4528
4567
  }
4568
+ }, {
4569
+ summary: "Return a reviewed task to Dev with the number of findings",
4570
+ input: {
4571
+ turn: "T4",
4572
+ reason: "Fix the two review findings.",
4573
+ findings: 2
4574
+ },
4575
+ output: {
4576
+ task,
4577
+ block: {
4578
+ ...codeBlock,
4579
+ id: "B14",
4580
+ author: "agent:rev/rev-1",
4581
+ reason: "Fix the two review findings."
4582
+ }
4583
+ }
4529
4584
  }]
4530
4585
  }),
4531
4586
  defineOperation({
@@ -4611,7 +4666,7 @@ const OPERATIONS = [
4611
4666
  id: "config.get",
4612
4667
  web: true,
4613
4668
  kind: "query",
4614
- description: "Show effective project columns, executors and Spur bindings.",
4669
+ description: "Show effective project columns, executors, Spur bindings and web origins.",
4615
4670
  mcp: {
4616
4671
  whenToUse: "Read configuration before rendering the Board overview.",
4617
4672
  whenNotToUse: "Use status_get for task state and freshness."
@@ -4628,22 +4683,28 @@ const OPERATIONS = [
4628
4683
  examples: [{
4629
4684
  summary: "Show effective configuration",
4630
4685
  input: {},
4631
- output: { projects: [{
4632
- id: "web",
4633
- columns: [{
4634
- id: "dev",
4635
- executor: {
4636
- kind: "worker",
4637
- name: null
4638
- }
4686
+ output: {
4687
+ projects: [{
4688
+ id: "web",
4689
+ columns: [{
4690
+ id: "dev",
4691
+ executor: {
4692
+ kind: "worker",
4693
+ name: null
4694
+ }
4695
+ }],
4696
+ dispatcher: { mode: "on" },
4697
+ spurProjects: [{
4698
+ name: "web-worker",
4699
+ role: "worker",
4700
+ displayName: "web-worker"
4701
+ }]
4639
4702
  }],
4640
- dispatcher: { mode: "on" },
4641
- spurProjects: [{
4642
- name: "web-worker",
4643
- role: "worker",
4644
- displayName: "web-worker"
4645
- }]
4646
- }] }
4703
+ web: {
4704
+ publicOrigin: "http://127.0.0.1:4778",
4705
+ spurUiOrigin: null
4706
+ }
4707
+ }
4647
4708
  }]
4648
4709
  })
4649
4710
  ];
@@ -1,4 +1,4 @@
1
- import { Q as ERRORS, c as tokenRequestStatusSchema, et as errorContextSchema, g as renderJsonError, o as tokenRequestResultSchema, rt as successEnvelopeSchema, tt as errorEnvelopeSchema } from "./chunk-7XUx0JWq.mjs";
1
+ import { Q as ERRORS, c as tokenRequestStatusSchema, et as errorContextSchema, g as renderJsonError, o as tokenRequestResultSchema, rt as successEnvelopeSchema, tt as errorEnvelopeSchema } from "./chunk-BN-Cz4Ql.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, ft as configSchema, mt as plainHttpAllowed, p as OPERATIONS } from "./chunk-7XUx0JWq.mjs";
2
- import { o as CliError, t as fetchCatalogVersion } from "./chunk-C06XgrL3.mjs";
1
+ import { d as buildCatalogSnapshot, ft as configSchema, mt as plainHttpAllowed, p as OPERATIONS } from "./chunk-BN-Cz4Ql.mjs";
2
+ import { o as CliError, t as fetchCatalogVersion } from "./chunk-D9dHqOgX.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 { Q as ERRORS, a as requestHashOf, bt as SLACK_BOT_SCOPES, ct as DEFAULT_STAND_PORT_RANGE, f as roleCanUseOperation, ft as configSchema, gt as resolveWebOrigin, ht as requiredSecretKeys, p as OPERATIONS, q as actorIdSchema, r as remoteDoctorReportSchema, rt as successEnvelopeSchema, u as SYSTEMD_SERVICE_SETTINGS } from "./chunk-7XUx0JWq.mjs";
1
+ import { Q as ERRORS, a as requestHashOf, bt as SLACK_BOT_SCOPES, ct as DEFAULT_STAND_PORT_RANGE, f as roleCanUseOperation, ft as configSchema, gt as resolveWebOrigin, ht as requiredSecretKeys, p as OPERATIONS, q as actorIdSchema, r as remoteDoctorReportSchema, rt as successEnvelopeSchema, u as SYSTEMD_SERVICE_SETTINGS } from "./chunk-BN-Cz4Ql.mjs";
2
2
  import { t as apiBaseUrl } from "./chunk-DAMwWWmT.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-C06XgrL3.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-Ck64u-eo.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-D9dHqOgX.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-DncwJ_X0.mjs";
5
5
  import { createHash, randomBytes, randomUUID } from "node:crypto";
6
6
  import { accessSync, chmodSync, closeSync, constants, cpSync, existsSync, ftruncateSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync, writeSync } from "node:fs";
7
7
  import { homedir, hostname, userInfo } from "node:os";
package/dist/client.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as requestTokenEnrollment, i as requestSkillReload, n as fetchTokenStatus, r as requestOperation, t as fetchCatalogVersion } from "./chunk-C06XgrL3.mjs";
1
+ import { a as requestTokenEnrollment, i as requestSkillReload, n as fetchTokenStatus, r as requestOperation, t as fetchCatalogVersion } from "./chunk-D9dHqOgX.mjs";
2
2
  export { fetchCatalogVersion, fetchTokenStatus, requestOperation, requestSkillReload, requestTokenEnrollment };