spur-board 0.124.0 → 0.125.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,5 @@
1
- import { bt as plainHttpAllowed, d as buildCatalogSnapshot, p as OPERATIONS, vt as configSchema } from "./chunk-Bdi5PEuV.mjs";
2
- import { o as CliError, t as fetchCatalogVersion } from "./chunk-MSHt4j9s.mjs";
1
+ import { bt as plainHttpAllowed, d as buildCatalogSnapshot, p as OPERATIONS, vt as configSchema } from "./chunk-CY5-uNaf.mjs";
2
+ import { o as CliError, t as fetchCatalogVersion } from "./chunk-DcRmoCME.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";
@@ -3072,6 +3072,73 @@ const configViewSchema = z.strictObject({
3072
3072
  spurUiOrigin: z.url({ protocol: /^https?$/ }).nullable().describe("Origin of the Spur web UI clients link sessions to; HTTP works on any host without voice. Null when not configured; UI reachability only warns in doctor and never blocks updates.")
3073
3073
  }).describe("Web origins of the board listener and the Spur UI.")
3074
3074
  }).describe("Allowlisted effective configuration without credentials or adapter settings.");
3075
+ // ../contracts/src/ops/columns-schema.ts
3076
+ const configProject = configViewSchema.shape.projects.element;
3077
+ const session = z.strictObject({
3078
+ id: statusSessionFactsSchema.shape.id,
3079
+ links: statusSessionFactsSchema.shape.links
3080
+ });
3081
+ const destination = z.strictObject({
3082
+ role: z.enum(ADDRESSEE_ROLES).describe("Runtime addressee role."),
3083
+ project: z.string().nullable().describe("Named Spur project, or null for the operator or task worker."),
3084
+ displayName: z.string().nullable().describe("Configured display name, falling back to project name."),
3085
+ session: session.nullable().describe("Project-selected live session, as in doctor; task-linked or author sessions can override it. Null when absent or task-specific."),
3086
+ text: z.string().describe("Routing and no-session behavior.")
3087
+ });
3088
+ const columnsDescribeOutputSchema = z.strictObject({ projects: z.array(z.strictObject({
3089
+ id: configProject.shape.id,
3090
+ dispatcher: configProject.shape.dispatcher,
3091
+ checksGate: z.enum(CHECKS_GATE_COLUMNS).describe("Effective column requiring green checks."),
3092
+ reposWithoutCi: z.array(z.string()).describe("Repositories whose open PR with no checks and no required checks passes CI; does not waive failed or pending checks."),
3093
+ resolvedThreadsFrom: z.enum(COLUMN_IDS).nullable().describe("Leftmost enabled thread gate, or null when none."),
3094
+ completion: z.strictObject({
3095
+ to: z.literal("done").describe("Completion destination, separate from ordinary gate progression."),
3096
+ text: z.string().describe("Alternative completion routes: eligible linked merged PR with a tracker-done ticket (GitHub closed or effective Jira doneStatuses), or a done ticket without open linked PRs/live workers after fresh complete non-blind repository and Spur observations. Missing/unconfirmed merged-ticket status holds dispatch; confirmed-open evidence after the effective tracker interval, in filter or manually included, resumes work. Blind GitHub and pending submits hold both routes. Includes eligibility/readability, non-archived scope and dispatcher-mode qualifications.")
3097
+ }).describe("Project-wide completion route from any column other than Done. Completion bypasses normal gates; it is not conjoined with exit.conditions."),
3098
+ columns: z.array(z.strictObject({
3099
+ id: z.enum(COLUMN_IDS).describe("Enabled column in canonical order."),
3100
+ name: z.string().describe("Human column name."),
3101
+ group: z.enum(COLUMN_GROUPS).optional().describe("Group, present only for Todo columns."),
3102
+ exit: z.strictObject({
3103
+ to: z.enum(COLUMN_IDS).nullable().describe("Next normal gate destination, skipping the remaining Todo group; null at the last enabled stage before Done and at Done itself. The project completion route separately describes entry into Done."),
3104
+ conditions: z.array(z.strictObject({
3105
+ id: z.enum([...GATE_CONDITIONS, "work_started"]).describe("Condition identifier; each rule appears at its effective owner."),
3106
+ text: z.string().describe("Canonical positive exit rule, independent of task state.")
3107
+ })).describe("Own gate conditions; gates accumulate from earlier enabled columns. Passing them alone never moves into Done. The separate project completion route bypasses these gates rather than adding a conjunctive requirement.")
3108
+ }).describe("Normal gate progression and effective own rules; completion into Done is described separately at project level."),
3109
+ returns: z.array(z.string()).describe("Applicable return triggers and completion/reopening qualifications."),
3110
+ limits: z.strictObject({
3111
+ cycleLimit: z.int().min(1).describe("Counted returns before operator hold; takes precedence over courseCheck."),
3112
+ courseCheck: z.int().min(0).describe("Counted returns before a course check; zero disables it. Executor, feedback and thread returns count; draft, conflict and red CI do not."),
3113
+ courseCheckTo: destination.describe("Resolved course-check destination; missing live recipient falls back to operator.")
3114
+ }).nullable().describe("Return limits, or null when the column cannot return to Dev."),
3115
+ executor: z.strictObject({
3116
+ kind: configProject.shape.columns.element.shape.executor.shape.kind,
3117
+ project: destination.shape.project,
3118
+ role: configProject.shape.spurProjects.element.shape.role.nullable().describe("Configured Spur role, or null for automatic/operator routing."),
3119
+ displayName: destination.shape.displayName,
3120
+ session: destination.shape.session,
3121
+ text: z.string().describe("Turn ownership, fallback and project-selected session scope.")
3122
+ }).describe("Effective executor; Todo does not open turns, Done may open an agent wrap-up turn."),
3123
+ escalation: z.strictObject({
3124
+ chain: z.array(destination).describe("Question escalation starting at the executor; self-role steps are skipped using runtime routing."),
3125
+ noRecipient: z.strictObject({
3126
+ 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."),
3127
+ text: z.string().describe("Wait origin, recipient eligibility, source readiness, item clearing and no-reroute qualifications.")
3128
+ }).nullable().describe("Untaken named-turn no-recipient policy; null for Todo or columns without a named orchestrator. The turn keeps waiting while the operator item is raised."),
3129
+ silent: z.strictObject({
3130
+ remindAfterMs: z.int().min(0).describe("Idle time before reminder for the configured agent executor: effective quietTurnAfterMs for a named turn, global idle threshold for a worker turn. Existing turns retain role-based timing."),
3131
+ operatorItemAfterReminderReadMs: z.int().min(0).describe("Further quiet time after reminder read/current quiet period before operator item."),
3132
+ unhealthyAfterMs: z.int().min(0).describe("Unhealthy executor episode before operator item."),
3133
+ text: z.string().describe("Timing origins, pauses and dispatcher-mode qualification.")
3134
+ }).nullable().describe("Taken-agent-turn silence policy; null for operator, dispatcher and Todo.")
3135
+ }).describe("Question and silent-executor escalation."),
3136
+ movedBy: z.strictObject({
3137
+ kind: z.enum(["manual", "dispatcher"]).describe("Current placement mechanism."),
3138
+ text: z.string().describe("How the column is entered, including shadow-mode qualification.")
3139
+ }).describe("Column placement policy.")
3140
+ })).describe("Enabled columns only, in canonical order.")
3141
+ })).describe("Effective configured projects visible to the caller; bounded by config and built-in columns.") });
3075
3142
  // ../contracts/src/ops/inbox-schemas.ts
3076
3143
  /** One entry of the operator inbox: an operator item, a block addressed to the operator or a turn. */
3077
3144
  const inboxEntrySchema = z.strictObject({
@@ -5091,6 +5158,71 @@ const OPERATIONS = [
5091
5158
  }
5092
5159
  }
5093
5160
  }]
5161
+ }),
5162
+ defineOperation({
5163
+ id: "columns.describe",
5164
+ web: true,
5165
+ kind: "query",
5166
+ description: "Describe effective column exit rules, returns, executors and escalation.",
5167
+ mcp: {
5168
+ whenToUse: "Read the project column policy before deciding how to progress work; selected sessions are project-level choices, not task-specific recipients.",
5169
+ whenNotToUse: "Use task_get with why for a task’s current gates and turn, or config_get for compact bindings and web origins."
5170
+ },
5171
+ input: configGetInputSchema,
5172
+ output: columnsDescribeOutputSchema,
5173
+ grants: operatorOrProjectAgent,
5174
+ errors: ["not_found"],
5175
+ cli: {
5176
+ command: "columns describe",
5177
+ args: []
5178
+ },
5179
+ slack: null,
5180
+ examples: [{
5181
+ summary: "Describe project column policies",
5182
+ input: { project: "web" },
5183
+ output: { projects: [{
5184
+ id: "web",
5185
+ dispatcher: { mode: "on" },
5186
+ checksGate: "dev",
5187
+ reposWithoutCi: [],
5188
+ resolvedThreadsFrom: null,
5189
+ completion: {
5190
+ to: "done",
5191
+ text: "Completion bypasses normal gates: an eligible linked merged PR with a done ticket (GitHub closed or configured Jira doneStatuses), or a done ticket without open linked PRs/live workers and with fresh complete non-blind repository and Spur observations. Missing/unconfirmed merged-ticket status holds dispatch. An open ticket resumes work after the configured tracker interval with in-filter or manual-inclusion evidence. Blind GitHub or a pending submit holds both routes."
5192
+ },
5193
+ columns: [{
5194
+ id: "todo",
5195
+ name: "To Do",
5196
+ group: "todo",
5197
+ exit: {
5198
+ to: "dev",
5199
+ conditions: [{
5200
+ id: "work_started",
5201
+ text: "Work has started: an open PR, or a live worker with a fresh source and no reopened ticket."
5202
+ }]
5203
+ },
5204
+ returns: [],
5205
+ limits: null,
5206
+ executor: {
5207
+ kind: "worker",
5208
+ project: null,
5209
+ role: null,
5210
+ displayName: null,
5211
+ session: null,
5212
+ text: "No executor turn opens in the Todo group, even with a configured binding."
5213
+ },
5214
+ escalation: {
5215
+ chain: [],
5216
+ noRecipient: null,
5217
+ silent: null
5218
+ },
5219
+ movedBy: {
5220
+ kind: "manual",
5221
+ text: "Manual placement; work starting leaves the whole Todo group."
5222
+ }
5223
+ }]
5224
+ }] }
5225
+ }]
5094
5226
  })
5095
5227
  ];
5096
5228
  // ../contracts/src/ops/roles.ts
@@ -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-Bdi5PEuV.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-CY5-uNaf.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 { D as sortSkillFiles, Ot as SLACK_BOT_SCOPES, Q as actorIdSchema, St as resolveWebOrigin, T as skillReloadFileSchema, a as requestHashOf, 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, vt as configSchema, xt as requiredSecretKeys } from "./chunk-Bdi5PEuV.mjs";
1
+ import { D as sortSkillFiles, Ot as SLACK_BOT_SCOPES, Q as actorIdSchema, St as resolveWebOrigin, T as skillReloadFileSchema, a as requestHashOf, 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, vt as configSchema, xt as requiredSecretKeys } from "./chunk-CY5-uNaf.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-MSHt4j9s.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-D9XJdrky.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-DcRmoCME.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-B_idjhSg.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-MSHt4j9s.mjs";
1
+ export { t as fetchCatalogVersion, n as fetchTokenStatus, r as requestOperation, i as requestSkillReload, a as requestTokenEnrollment } from "./chunk-DcRmoCME.mjs";