spur-board 0.118.0 → 0.120.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.
@@ -1,5 +1,7 @@
1
1
  import { z } from "zod";
2
2
  // ../contracts/src/enums.ts
3
+ /** Column groups. The dispatcher never moves a task between two columns of one group. */
4
+ const COLUMN_GROUPS = ["todo"];
3
5
  /**
4
6
  * Built-in board columns in canonical order, left to right. Everything stored or addressed
5
7
  * (journal, store, addressee roles) uses the `id`; `name` is display text only.
@@ -8,51 +10,102 @@ const COLUMNS = [
8
10
  {
9
11
  id: "todo",
10
12
  name: "To Do",
11
- required: true
13
+ required: true,
14
+ group: "todo",
15
+ returnable: false,
16
+ marks: false,
17
+ defaultEnabled: true
18
+ },
19
+ {
20
+ id: "triage",
21
+ name: "Triage",
22
+ required: false,
23
+ group: "todo",
24
+ returnable: false,
25
+ marks: false,
26
+ defaultEnabled: false
12
27
  },
13
28
  {
14
29
  id: "ready-for-dev",
15
30
  name: "Ready for Dev",
16
- required: false
31
+ required: false,
32
+ group: "todo",
33
+ returnable: false,
34
+ marks: false,
35
+ defaultEnabled: true
17
36
  },
18
37
  {
19
38
  id: "dev",
20
39
  name: "Dev",
21
- required: true
40
+ required: true,
41
+ group: null,
42
+ returnable: false,
43
+ marks: false,
44
+ defaultEnabled: true
22
45
  },
23
46
  {
24
47
  id: "review",
25
48
  name: "Review",
26
- required: false
49
+ required: false,
50
+ group: null,
51
+ returnable: true,
52
+ marks: true,
53
+ defaultEnabled: true
27
54
  },
28
55
  {
29
56
  id: "product-review",
30
57
  name: "Product Review",
31
- required: false
58
+ required: false,
59
+ group: null,
60
+ returnable: true,
61
+ marks: true,
62
+ defaultEnabled: true
32
63
  },
33
64
  {
34
65
  id: "external-review",
35
66
  name: "External Review",
36
- required: false
67
+ required: false,
68
+ group: null,
69
+ returnable: true,
70
+ marks: false,
71
+ defaultEnabled: true
37
72
  },
38
73
  {
39
74
  id: "qa",
40
75
  name: "QA",
41
- required: false
76
+ required: false,
77
+ group: null,
78
+ returnable: true,
79
+ marks: false,
80
+ defaultEnabled: true
42
81
  },
43
82
  {
44
83
  id: "ready-to-merge",
45
84
  name: "Ready to Merge",
46
- required: false
85
+ required: false,
86
+ group: null,
87
+ returnable: true,
88
+ marks: false,
89
+ defaultEnabled: true
47
90
  },
48
91
  {
49
92
  id: "done",
50
93
  name: "Done",
51
- required: true
94
+ required: true,
95
+ group: null,
96
+ returnable: false,
97
+ marks: false,
98
+ defaultEnabled: true
52
99
  }
53
100
  ];
54
101
  /** Column ids in canonical order. */
55
102
  const COLUMN_IDS = COLUMNS.map((column) => column.id);
103
+ /** Columns of the Todo group in canonical order. */
104
+ const TODO_GROUP_COLUMN_IDS = COLUMNS.filter((column) => column.group === "todo").map((column) => column.id);
105
+ /** True for a column of the Todo group. */
106
+ function isTodoGroupColumn(column) {
107
+ return TODO_GROUP_COLUMN_IDS.includes(column);
108
+ }
56
109
  /** Columns every project board has, enabled. */
57
110
  const REQUIRED_COLUMN_IDS = COLUMNS.filter((column) => column.required).map((column) => column.id);
58
111
  /** Where a column's effective orchestrator comes from: its own column entry or top-level `spurProjects`. */
@@ -393,11 +446,7 @@ const columnConfig = z.strictObject({
393
446
  requireResolvedThreads: z.boolean().optional().describe("true: a task leaves this column, and every column right of it, only when its PR has no unresolved review thread; an unresolved one sends it back to Dev, and the worker's Dev turn lists each thread. Outdated threads count; a thread counts until someone resolves it, whoever wrote it. Defaults to true on ready-to-merge and false elsewhere; allowed on dev through ready-to-merge.")
394
447
  });
395
448
  /** Columns a task never leaves through the Dev gate, so they cannot require resolved threads. */
396
- const NO_THREAD_GATE = /* @__PURE__ */ new Set([
397
- "todo",
398
- "ready-for-dev",
399
- "done"
400
- ]);
449
+ const NO_THREAD_GATE = /* @__PURE__ */ new Set([...TODO_GROUP_COLUMN_IDS, "done"]);
401
450
  /**
402
451
  * The board rules: required columns present and enabled, resolved threads required only from Dev
403
452
  * to Ready to Merge, built-ins in canonical order.
@@ -470,13 +519,13 @@ const projectSchema = z.strictObject({
470
519
  curator ??= item.name;
471
520
  });
472
521
  }).default([]).describe("Spur projects whose sessions work on this board project, each with a role; at most one curator. An operator listed here replaces the top-level spurProjects operator for this project. Board commands from a session whose Spur project is in no spurProjects list, here or top-level, are refused."),
473
- columns: z.array(columnConfig).superRefine(checkBoard).default(() => COLUMN_IDS.map((id) => ({
522
+ columns: z.array(columnConfig).superRefine(checkBoard).default(() => COLUMNS.map(({ id, defaultEnabled }) => ({
474
523
  id,
475
- enabled: true,
524
+ enabled: defaultEnabled,
476
525
  orchestrator: "none",
477
526
  cycleLimit: DEFAULT_CYCLE_LIMIT,
478
527
  courseCheck: DEFAULT_COURSE_CHECK
479
- }))).describe("The project's board columns in canonical order. todo, dev and done must be present and enabled. A column left out or disabled is skipped. Without this key, all nine columns are enabled with orchestrator none."),
528
+ }))).describe("The project's board columns in canonical order. todo, dev and done must be present and enabled. A column left out or disabled is skipped. Without this key, every built-in column is enabled with orchestrator none except triage, listed disabled. todo, triage and ready-for-dev form the Todo group: the dispatcher never moves a task between them."),
480
529
  dispatcher: z.strictObject({
481
530
  mode: z.enum(DISPATCHER_MODES).default("shadow").describe("shadow: the board evaluates the column gates and records where each task would go in its shadow column, and opens no turn, doorbell or block; the column executor submits with the task key. on: the board moves the task between columns, hands the column executor a turn, and raises the cycle-limit and course-check blocks."),
482
531
  submitConfirmMs: durationMs(18e4, "How long the board waits to confirm a turn submit it accepted pending (no PR linked yet, or GitHub not confirming the head) before handing the turn back to its executor with the reason")
@@ -2941,7 +2990,8 @@ const configViewSchema = z.strictObject({
2941
2990
  "operator"
2942
2991
  ]).describe("Configured executor; worker falls back to operator without a live worker."),
2943
2992
  name: z.string().nullable().describe("Named Spur project, or null for automatic routing.")
2944
- }).describe("Effective column executor.")
2993
+ }).describe("Effective column executor."),
2994
+ group: z.enum(COLUMN_GROUPS).optional().describe("Column group; present only on Todo-group columns.")
2945
2995
  })).describe("Enabled board columns."),
2946
2996
  dispatcher: z.strictObject({ mode: z.enum(DISPATCHER_MODES).describe("Effective dispatcher mode.") }).describe("Dispatcher configuration."),
2947
2997
  spurProjects: z.array(z.strictObject({
@@ -3050,6 +3100,10 @@ const statusOutputSchema = z.strictObject({
3050
3100
  }).describe("Transport health of one gateway.")).describe("Transport health of each chat gateway."),
3051
3101
  sources: z.array(sourceViewSchema).describe("Freshness and availability of each source."),
3052
3102
  tasks: z.array(statusTaskSchema).describe("Tasks with state, turn, PR summary arrays and navigation; full facts with detail."),
3103
+ columnGroups: z.array(z.strictObject({
3104
+ id: z.enum(COLUMN_GROUPS).describe("Column group."),
3105
+ columns: z.array(z.enum(COLUMN_IDS)).describe("Built-in columns of the group in canonical order, enabled or not.")
3106
+ }).describe("One column group.")).describe("Column groups, the same for every project. The dispatcher never moves a task between columns of one group; once work starts it moves the task to the first enabled column right of the group."),
3053
3107
  projectBlocks: z.array(z.strictObject({
3054
3108
  project: z.string().min(1).describe("Board project."),
3055
3109
  openBlocks: z.int().min(0).describe("Open project-level blocks, without a task.")
@@ -3298,6 +3352,13 @@ const reviewGates = [
3298
3352
  blockedIn: null,
3299
3353
  conditions: []
3300
3354
  },
3355
+ {
3356
+ column: "triage",
3357
+ enabled: false,
3358
+ ok: true,
3359
+ blockedIn: null,
3360
+ conditions: []
3361
+ },
3301
3362
  {
3302
3363
  column: "ready-for-dev",
3303
3364
  enabled: false,
@@ -3450,6 +3511,14 @@ const OPERATIONS = [
3450
3511
  sessions: []
3451
3512
  }
3452
3513
  }],
3514
+ columnGroups: [{
3515
+ id: "todo",
3516
+ columns: [
3517
+ "todo",
3518
+ "triage",
3519
+ "ready-for-dev"
3520
+ ]
3521
+ }],
3453
3522
  projectBlocks: [{
3454
3523
  project: "web",
3455
3524
  openBlocks: 0
@@ -3508,6 +3577,14 @@ const OPERATIONS = [
3508
3577
  prs: [],
3509
3578
  sessions: []
3510
3579
  }],
3580
+ columnGroups: [{
3581
+ id: "todo",
3582
+ columns: [
3583
+ "todo",
3584
+ "triage",
3585
+ "ready-for-dev"
3586
+ ]
3587
+ }],
3511
3588
  projectBlocks: [{
3512
3589
  project: "web",
3513
3590
  openBlocks: 0
@@ -3860,7 +3937,7 @@ const OPERATIONS = [
3860
3937
  kind: "mutation",
3861
3938
  description: "Mark comments, agent-addressed blocks, turns or doorbell rings as read; acking a turn makes the caller its taker.",
3862
3939
  mcp: {
3863
- whenToUse: "Mark handled inbox items or a ring ID like N18-1 read; an item handled before comes back under alreadyHandled.",
3940
+ 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.",
3864
3941
  whenNotToUse: "Use inbox_get to inspect them first."
3865
3942
  },
3866
3943
  input: z.strictObject({ entries: z.array(z.union([
@@ -3886,7 +3963,7 @@ const OPERATIONS = [
3886
3963
  ringIdSchema
3887
3964
  ])).optional().describe("Entries that were already handled; nothing new was acknowledged for them.")
3888
3965
  }),
3889
- grants: [{ grant: "project-agent" }],
3966
+ grants: [{ grant: "project-agent" }, { grant: "operator" }],
3890
3967
  errors: [
3891
3968
  "wrong_id_kind",
3892
3969
  "not_found",
@@ -4649,7 +4726,7 @@ const OPERATIONS = [
4649
4726
  defineOperation({
4650
4727
  id: "task.submit",
4651
4728
  kind: "mutation",
4652
- description: "Submit the task's pull request head for a turn this session took; the turn closes; a pending result is final.",
4729
+ description: "Submit the task's pull request head for a turn the caller took; the turn closes; a pending result is final.",
4653
4730
  mcp: {
4654
4731
  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.",
4655
4732
  whenNotToUse: "Use task_return to send the task back to Dev instead."
@@ -4667,7 +4744,11 @@ const OPERATIONS = [
4667
4744
  sha: commitShaSchema.describe("The submitted commit SHA."),
4668
4745
  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.")
4669
4746
  }),
4670
- grants: [{ grant: "task-worker" }, { grant: "column-orchestrator" }],
4747
+ grants: [
4748
+ { grant: "task-worker" },
4749
+ { grant: "column-orchestrator" },
4750
+ { grant: "operator" }
4751
+ ],
4671
4752
  errors: [
4672
4753
  "wrong_id_kind",
4673
4754
  "not_found",
@@ -4754,7 +4835,7 @@ const OPERATIONS = [
4754
4835
  defineOperation({
4755
4836
  id: "task.return",
4756
4837
  kind: "mutation",
4757
- description: "Return the task of a turn this session took to Dev; the reason opens a worker code block.",
4838
+ description: "Return the task of a turn the caller took to Dev; the reason opens a worker code block.",
4758
4839
  mcp: {
4759
4840
  whenToUse: "Send the task back to Dev when the work needs code changes.",
4760
4841
  whenNotToUse: "Use task_submit to hand in the work instead."
@@ -4768,7 +4849,11 @@ const OPERATIONS = [
4768
4849
  task: taskViewSchema,
4769
4850
  block: blockViewSchema
4770
4851
  }),
4771
- grants: [{ grant: "task-worker" }, { grant: "column-orchestrator" }],
4852
+ grants: [
4853
+ { grant: "task-worker" },
4854
+ { grant: "column-orchestrator" },
4855
+ { grant: "operator" }
4856
+ ],
4772
4857
  errors: [
4773
4858
  "wrong_id_kind",
4774
4859
  "not_found",
@@ -5100,4 +5185,4 @@ const remoteDoctorReportSchema = z.object({
5100
5185
  function assertNever(value) {
5101
5186
  throw new Error(`Unexpected value: ${JSON.stringify(value)}`);
5102
5187
  }
5103
- export { encodeActorId as $, eventPayloadSchemas as A, REVIEW_STATES as B, messageRefSchema as C, DISPATCHER_MODES as Ct, sortSkillFiles as D, VIAS as Dt, skillReloadFilesSchema as E, TASK_HOLDS as Et, prSourceId as F, prFactsSchema as G, SESSION_STATUSES as H, sessionTransitionSchema as I, sessionFactsSchema as J, prRefSchema as K, sourceCursorSchema as L, batchSchema as M, defaultBranchFactSchema as N, EVENT_KINDS as O, entityRefSchema as P, actorIdSchema as Q, trackerSourceId as R, interactionRefSchema as S, COLUMN_IDS as St, skillReloadFileSchema as T, SLACK_BOT_SCOPES as Tt, isExternalAuthor as U, SESSION_HEALTH_STATES as V, parseRingMarker as W, JIRA_PROJECT_KEY as X, ticketFactsSchema as Y, REF_NUMBER as Z, renderJsonError as _, configSchema as _t, requestHashOf as a, errorContextSchema as at, conversationRefSchema as b, requiredSecretKeys as bt, tokenRequestStatusSchema as c, successEnvelopeSchema as ct, buildCatalogSnapshot as d, DEFAULT_SLACK_APP_NAME as dt, errorCodeOf as et, roleCanUseOperation as f, DEFAULT_SLACK_COMMAND as ft, renderHttpProblem as g, configBindings as gt, turnHandedSchema as h, boardWideSpurProject as ht, TOKEN_REQUEST_LIMITS as i, err as it, AdapterError as j, GATE_REASONS as k, BOARD_TICK_MS as l, DEFAULT_HTTP_PORT as lt, defaultBranchViewSchema as m, RESERVED_PROJECT as mt, doctorReportSchema as n, parseRef as nt, tokenRequestResultSchema as o, errorEnvelopeSchema as ot, OPERATIONS as p, DEFAULT_STAND_PORT_RANGE as pt, ringMarker as q, remoteDoctorReportSchema as r, ERRORS as rt, tokenRequestSchema as s, ok as st, assertNever as t, parseActorId as tt, SYSTEMD_SERVICE_SETTINGS as u, DEFAULT_LINK as ut, renderMcpError as v, defaultAddressee as vt, userIdSchema as w, ITEM_KINDS as wt, inboundEventSchema as x, resolveWebOrigin as xt, SPACE_IDS as y, plainHttpAllowed as yt, PR_STATES as z };
5188
+ export { encodeActorId as $, eventPayloadSchemas as A, isTodoGroupColumn as At, REVIEW_STATES as B, messageRefSchema as C, COLUMN_GROUPS as Ct, sortSkillFiles as D, SLACK_BOT_SCOPES as Dt, skillReloadFilesSchema as E, ITEM_KINDS as Et, prSourceId as F, prFactsSchema as G, SESSION_STATUSES as H, sessionTransitionSchema as I, sessionFactsSchema as J, prRefSchema as K, sourceCursorSchema as L, batchSchema as M, defaultBranchFactSchema as N, EVENT_KINDS as O, TASK_HOLDS as Ot, entityRefSchema as P, actorIdSchema as Q, trackerSourceId as R, interactionRefSchema as S, COLUMNS as St, skillReloadFileSchema as T, DISPATCHER_MODES as Tt, isExternalAuthor as U, SESSION_HEALTH_STATES as V, parseRingMarker as W, JIRA_PROJECT_KEY as X, ticketFactsSchema as Y, REF_NUMBER as Z, renderJsonError as _, configSchema as _t, requestHashOf as a, errorContextSchema as at, conversationRefSchema as b, requiredSecretKeys as bt, tokenRequestStatusSchema as c, successEnvelopeSchema as ct, buildCatalogSnapshot as d, DEFAULT_SLACK_APP_NAME as dt, errorCodeOf as et, roleCanUseOperation as f, DEFAULT_SLACK_COMMAND as ft, renderHttpProblem as g, configBindings as gt, turnHandedSchema as h, boardWideSpurProject as ht, TOKEN_REQUEST_LIMITS as i, err as it, AdapterError as j, GATE_REASONS as k, VIAS as kt, BOARD_TICK_MS as l, DEFAULT_HTTP_PORT as lt, defaultBranchViewSchema as m, RESERVED_PROJECT as mt, doctorReportSchema as n, parseRef as nt, tokenRequestResultSchema as o, errorEnvelopeSchema as ot, OPERATIONS as p, DEFAULT_STAND_PORT_RANGE as pt, ringMarker as q, remoteDoctorReportSchema as r, ERRORS as rt, tokenRequestSchema as s, ok as st, assertNever as t, parseActorId as tt, SYSTEMD_SERVICE_SETTINGS as u, DEFAULT_LINK as ut, renderMcpError as v, defaultAddressee as vt, userIdSchema as w, COLUMN_IDS as wt, inboundEventSchema as x, resolveWebOrigin as xt, SPACE_IDS as y, plainHttpAllowed as yt, PR_STATES as z };
@@ -1,4 +1,4 @@
1
- import { _ as renderJsonError, at as errorContextSchema, c as tokenRequestStatusSchema, ct as successEnvelopeSchema, o as tokenRequestResultSchema, ot as errorEnvelopeSchema, rt as ERRORS } from "./chunk-BLyH3LBD.mjs";
1
+ import { _ as renderJsonError, at as errorContextSchema, c as tokenRequestStatusSchema, ct as successEnvelopeSchema, o as tokenRequestResultSchema, ot as errorEnvelopeSchema, rt as ERRORS } from "./chunk-CkCVuwFY.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 { _t as configSchema, d as buildCatalogSnapshot, p as OPERATIONS, yt as plainHttpAllowed } from "./chunk-BLyH3LBD.mjs";
2
- import { o as CliError, t as fetchCatalogVersion } from "./chunk-DsnvKf_Q.mjs";
1
+ import { _t as configSchema, d as buildCatalogSnapshot, p as OPERATIONS, yt as plainHttpAllowed } from "./chunk-CkCVuwFY.mjs";
2
+ import { o as CliError, t as fetchCatalogVersion } from "./chunk-DLPQMmSY.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 { D as sortSkillFiles, Q as actorIdSchema, T as skillReloadFileSchema, Tt as SLACK_BOT_SCOPES, _t as configSchema, a as requestHashOf, bt as requiredSecretKeys, ct as successEnvelopeSchema, f as roleCanUseOperation, p as OPERATIONS, pt as DEFAULT_STAND_PORT_RANGE, r as remoteDoctorReportSchema, rt as ERRORS, u as SYSTEMD_SERVICE_SETTINGS, xt as resolveWebOrigin } from "./chunk-BLyH3LBD.mjs";
1
+ import { D as sortSkillFiles, Dt as SLACK_BOT_SCOPES, Q as actorIdSchema, T as skillReloadFileSchema, _t as configSchema, a as requestHashOf, bt as requiredSecretKeys, ct as successEnvelopeSchema, f as roleCanUseOperation, p as OPERATIONS, pt as DEFAULT_STAND_PORT_RANGE, r as remoteDoctorReportSchema, rt as ERRORS, u as SYSTEMD_SERVICE_SETTINGS, xt as resolveWebOrigin } from "./chunk-CkCVuwFY.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-DsnvKf_Q.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-CBEgOEgI.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-DLPQMmSY.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-zj6P829U.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-DsnvKf_Q.mjs";
1
+ export { t as fetchCatalogVersion, n as fetchTokenStatus, r as requestOperation, i as requestSkillReload, a as requestTokenEnrollment } from "./chunk-DLPQMmSY.mjs";