spur-board 0.137.0 → 0.138.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 { Ct as plainHttpAllowed, d as buildCatalogSnapshot, p as OPERATIONS, xt as configSchema } from "./chunk-CRtgKvgx.mjs";
2
- import { o as CliError, t as fetchCatalogVersion } from "./chunk-CEGynnHg.mjs";
1
+ import { Et as plainHttpAllowed, d as buildCatalogSnapshot, p as OPERATIONS, wt as configSchema } from "./chunk-ELGKyFVI.mjs";
2
+ import { o as CliError, t as fetchCatalogVersion } from "./chunk-CDsQwru1.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, at as ERRORS, c as tokenRequestStatusSchema, ct as errorEnvelopeSchema, o as tokenRequestResultSchema, st as errorContextSchema, ut as successEnvelopeSchema } from "./chunk-CRtgKvgx.mjs";
1
+ import { _ as renderJsonError, c as tokenRequestStatusSchema, ct as ERRORS, dt as errorEnvelopeSchema, o as tokenRequestResultSchema, pt as successEnvelopeSchema, ut as errorContextSchema } from "./chunk-ELGKyFVI.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { z } from "zod";
4
4
  import { request } from "node:http";
@@ -454,6 +454,14 @@ const DEFAULT_CYCLE_LIMIT = 10;
454
454
  const DEFAULT_COURSE_CHECK = 3;
455
455
  /** A built-in column id; an unknown string names the built-in columns. */
456
456
  const columnId = z.enum(COLUMN_IDS, { error: (issue) => typeof issue.input === "string" ? `Unknown column ${JSON.stringify(issue.input)}: custom columns arrive with custom matchers and are not supported yet. Built-in columns: ${COLUMN_IDS.join(", ")}` : void 0 });
457
+ /** A GitHub Project as `owner/number`, the owner's login and the Project number. */
458
+ const githubProjectRef = z.string().regex(/^[A-Za-z0-9-]+\/[1-9][0-9]*$/, "Expected owner/number, such as example-org/3");
459
+ const trackerColumnSource = z.strictObject({
460
+ type: z.literal("tracker").describe("tracker: the board places idle Todo-group tasks between todo and ready-for-dev from the status of their issue in a GitHub Project, read on every poll with GITHUB_TOKEN (scope read:project). An issue whose field has the value moves to ready-for-dev; one that loses it, leaves the Project or is archived there moves back to todo. Tasks with started work, and triage, are never moved. Manual moves into or out of ready-for-dev are refused with column_mirrored. A failed or incomplete read moves nothing. Only on the ready-for-dev column of a github-issues project."),
461
+ project: githubProjectRef.describe("The GitHub Project as owner/number: the user or organization login that owns it and its number from the Project URL."),
462
+ field: nonEmpty.describe("Name of the single-select field of the Project to read, such as Status."),
463
+ value: nonEmpty.describe("The option of field that places a task in ready-for-dev, such as Ready; matched to an option name exactly, letter case included.")
464
+ });
457
465
  const columnConfig = z.strictObject({
458
466
  id: columnId.describe("The built-in column this entry configures."),
459
467
  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."),
@@ -464,7 +472,8 @@ const columnConfig = z.strictObject({
464
472
  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."),
465
473
  approvalRule: z.enum(APPROVAL_RULES).optional().describe("What lets a task leave External Review. any-approval, the default: an approval by someone other than operatorGithubLogin and no changes requested by one. github-rules: that, and GitHub's review rule for the PR's base branch, from branch protection and rulesets, met on the PR's head: no changes requested (GitHub's review decision counts only once the merge state is computed), a required check completed, or, when none is required, every check except skipped ones green and at least one (no checks at all also counts); and the merge not blocked. A required check, one GitHub marks required or a context the rule lists, pending or without a run GitHub marks required holds the head on CI unless the merge state is clean, unstable or has hooks. Only on the external-review column; a disabled one ignores it."),
466
474
  quietTurnAfterMs: z.int().min(1).optional().describe("How long the orchestrator session holding a turn of this column may sit quiet at its prompt before the board reminds it, then raises a stuck-turn anomaly, in milliseconds. Defaults to health.idleInDevAfterMs. Named orchestrator only: allowed on an enabled column whose orchestrator is a Spur project, set here or filled board-wide; a worker or operator turn left in the column keeps health.idleInDevAfterMs."),
467
- noRecipientAfterMs: z.int().min(1).optional().describe("How long an untaken turn of this column may wait with no live session to ring before the board raises one operator item for the project and column, in milliseconds. The time runs from the later of the turn ring's creation and the moment the last session that could take it stopped being a recipient: the first of its end, leaving Spur's list or reaching a finished state (stopped, killed, errored or completed), so later changes in the same gap do not move it. Sessions that could take it are those of the column's Spur project and the task's linked orchestrator. Defaults to 600000 (10 minutes). Named orchestrator only: allowed on an enabled column whose orchestrator is a Spur project, set here or filled board-wide.")
475
+ noRecipientAfterMs: z.int().min(1).optional().describe("How long an untaken turn of this column may wait with no live session to ring before the board raises one operator item for the project and column, in milliseconds. The time runs from the later of the turn ring's creation and the moment the last session that could take it stopped being a recipient: the first of its end, leaving Spur's list or reaching a finished state (stopped, killed, errored or completed), so later changes in the same gap do not move it. Sessions that could take it are those of the column's Spur project and the task's linked orchestrator. Defaults to 600000 (10 minutes). Named orchestrator only: allowed on an enabled column whose orchestrator is a Spur project, set here or filled board-wide."),
476
+ source: z.union([z.literal("manual").describe("manual: the operator moves tasks into and out of the column, the default."), trackerColumnSource]).optional().describe("Where ready-for-dev takes its tasks from: manual (the default), or a GitHub Project field mirrored by the board. Only on the ready-for-dev column.")
468
477
  });
469
478
  const TURN_TIMING_KEYS = ["quietTurnAfterMs", "noRecipientAfterMs"];
470
479
  /**
@@ -475,6 +484,23 @@ function approvalRuleOf(project) {
475
484
  const column = project.columns.find((entry) => entry.id === "external-review");
476
485
  return column?.enabled === true && column.approvalRule === "github-rules" ? "github-rules" : "any-approval";
477
486
  }
487
+ /**
488
+ * The GitHub Project status a project's ready-for-dev column mirrors: set only when the column
489
+ * is enabled and sets a tracker source on a github-issues project, else undefined (manual).
490
+ */
491
+ function readyMirrorOf(project) {
492
+ const column = project.columns.find((entry) => entry.id === "ready-for-dev");
493
+ const source = column?.source;
494
+ if (column?.enabled !== true || typeof source !== "object" || project.tracker.type !== "github-issues") return void 0;
495
+ const [owner = "", number = ""] = source.project.split("/");
496
+ return {
497
+ project: source.project,
498
+ owner,
499
+ number: Number(number),
500
+ field: source.field,
501
+ value: source.value
502
+ };
503
+ }
478
504
  /** Columns a task never leaves through the Dev gate, so they cannot require resolved threads. */
479
505
  const NO_THREAD_GATE = /* @__PURE__ */ new Set([...TODO_GROUP_COLUMN_IDS, "done"]);
480
506
  /**
@@ -502,6 +528,16 @@ function checkBoard(items, ctx) {
502
528
  path: [i, "approvalRule"],
503
529
  message: `Column ${JSON.stringify(item.id)} cannot set approvalRule: approvalRule is allowed only on the external-review column`
504
530
  });
531
+ if (item.source !== void 0 && item.id !== "ready-for-dev") ctx.addIssue({
532
+ code: "custom",
533
+ path: [i, "source"],
534
+ message: `Column ${JSON.stringify(item.id)} cannot set source: source is allowed only on the ready-for-dev column`
535
+ });
536
+ if (item.id === "ready-for-dev" && typeof item.source === "object" && !item.enabled) ctx.addIssue({
537
+ code: "custom",
538
+ path: [i, "source"],
539
+ message: "Column \"ready-for-dev\" cannot mirror a GitHub Project while disabled: set enabled: true or remove source"
540
+ });
505
541
  if (item.requireResolvedThreads === true && NO_THREAD_GATE.has(item.id)) ctx.addIssue({
506
542
  code: "custom",
507
543
  path: [i, "requireResolvedThreads"],
@@ -594,6 +630,18 @@ const projectSchema = z.strictObject({
594
630
  message: `Unknown orchestrator ${JSON.stringify(orchestrator)}: use none, operator or a spurProjects name with role orchestrator or curator`
595
631
  });
596
632
  });
633
+ project.columns.forEach(({ source }, j) => {
634
+ if (typeof source !== "object" || project.tracker.type === "github-issues") return;
635
+ ctx.addIssue({
636
+ code: "custom",
637
+ path: [
638
+ "columns",
639
+ j,
640
+ "source"
641
+ ],
642
+ message: `source type tracker needs a github-issues project: tracker ${JSON.stringify(project.tracker.type)} has no GitHub Project to mirror`
643
+ });
644
+ });
597
645
  const curator = project.spurProjects.find((p) => p.role === "curator")?.name;
598
646
  const orchestrators = new Set(project.columns.map((column) => column.orchestrator).filter((name) => name !== "none" && name !== "operator"));
599
647
  project.columns.forEach(({ courseCheckTo }, j) => {
@@ -1102,7 +1150,7 @@ const SECRET_ENV_KEYS = [
1102
1150
  {
1103
1151
  name: "GITHUB_TOKEN",
1104
1152
  requiredWhen: "always",
1105
- purpose: "Read GitHub repositories and check runs."
1153
+ purpose: "Read GitHub repositories and check runs; also read:project when a ready-for-dev column mirrors a GitHub Project."
1106
1154
  },
1107
1155
  {
1108
1156
  name: "JIRA_EMAIL",
@@ -2054,8 +2102,34 @@ const batchSchema = z.strictObject({
2054
2102
  limit: z.int().positive().optional().describe("Full budget the source restores at reset; omitted when it reports none."),
2055
2103
  resetAt: z.iso.datetime().describe("When the source restores the full budget.")
2056
2104
  }).optional().describe("Request budget the source reported on this poll; omitted when it reports none."),
2057
- defaultBranch: defaultBranchFactSchema.optional().describe("Colour of the default-branch head read by this poll; omitted when the poll did not read a settled colour.")
2105
+ defaultBranch: defaultBranchFactSchema.optional().describe("Colour of the default-branch head read by this poll; omitted when the poll did not read a settled colour."),
2106
+ mirror: z.strictObject({
2107
+ title: z.string().min(1).describe("Title of the GitHub Project read."),
2108
+ readiness: z.array(z.strictObject({
2109
+ key: taskKeySchema.describe("Task key of one open tracker issue."),
2110
+ state: z.enum(["ready", "not_ready"]).describe("ready: the issue has the configured option in the Project; not_ready: it has another, none, or is not in the Project.")
2111
+ })).describe("One entry per open issue of the tracker repository.")
2112
+ }).optional().describe("The GitHub Project status read by a github-project source; only on a complete batch.")
2058
2113
  }).superRefine((batch, ctx) => {
2114
+ if (batch.mirror !== void 0 && !batch.complete) ctx.addIssue({
2115
+ code: "custom",
2116
+ path: ["mirror"],
2117
+ message: "Only a complete batch carries mirror"
2118
+ });
2119
+ const readiness = /* @__PURE__ */ new Set();
2120
+ batch.mirror?.readiness.forEach((entry, index) => {
2121
+ if (readiness.has(entry.key)) ctx.addIssue({
2122
+ code: "custom",
2123
+ path: [
2124
+ "mirror",
2125
+ "readiness",
2126
+ index,
2127
+ "key"
2128
+ ],
2129
+ message: "Report each task key once"
2130
+ });
2131
+ readiness.add(entry.key);
2132
+ });
2059
2133
  const positions = /* @__PURE__ */ new Set();
2060
2134
  batch.sessionTransitions?.forEach((edge, index) => {
2061
2135
  if (positions.has(edge.position)) ctx.addIssue({
@@ -2117,16 +2191,58 @@ function prSourceId(projectId, repo) {
2117
2191
  function trackerSourceId(project) {
2118
2192
  return project.tracker.type === "jira" ? `jira:${project.id}` : `github-issues:${project.id}:${project.tracker.repo.toLowerCase()}`;
2119
2193
  }
2194
+ /**
2195
+ * Source id of a project's GitHub Project mirror, `github-project:<project>:<owner/number
2196
+ * lowercased>`, or undefined when its ready-for-dev column is manual.
2197
+ */
2198
+ function mirrorSourceId(project) {
2199
+ const mirror = readyMirrorOf(project);
2200
+ return mirror === void 0 ? void 0 : `github-project:${project.id}:${mirror.project.toLowerCase()}`;
2201
+ }
2202
+ /** Why a github-project source read no complete snapshot; positions stay where they are. */
2203
+ const MIRROR_FAILURE_CODES = [
2204
+ "mirror_project_forbidden",
2205
+ "mirror_field_not_found",
2206
+ "mirror_snapshot_incomplete",
2207
+ "mirror_rate_limited",
2208
+ "mirror_read_failed"
2209
+ ];
2210
+ /** Meaning and fix of each mirror failure code, for docs/errors.md and board doctor. */
2211
+ const MIRROR_FAILURES = {
2212
+ mirror_project_forbidden: {
2213
+ meaning: "The GitHub Project was not found or is not readable with GITHUB_TOKEN: a wrong owner or number, a missing read:project scope, or no access to the Project.",
2214
+ fix: "Check projects[].columns[].source.project against the Project URL and give GITHUB_TOKEN the read:project scope (a fine-grained token: Projects read access for the owner). Restart the daemon after changing config.yaml or secrets.env."
2215
+ },
2216
+ mirror_field_not_found: {
2217
+ meaning: "The Project has no single-select field with the configured name, the field has no option with the configured value, or an open issue's item in the Project holds an option the field does not list.",
2218
+ fix: "Set source.field to the name of a single-select field of the Project and source.value to one of its option names, letter case included, and restart the daemon; or set the field again on the named issue in the Project."
2219
+ },
2220
+ mirror_snapshot_incomplete: {
2221
+ meaning: "The read did not fit one page: the tracker repository has more than 100 open issues, or an issue sits in more than 20 Projects.",
2222
+ fix: "Close or move open issues until the repository has at most 100, or remove an issue from Projects it does not need; the mirror applies the next complete read."
2223
+ },
2224
+ mirror_rate_limited: {
2225
+ meaning: "GitHub rate-limited the read; the board retries after the reset.",
2226
+ fix: "Wait for the reset. If it repeats, lower the GraphQL load of other clients of the token or raise adapters.githubIssues.intervalMs."
2227
+ },
2228
+ mirror_read_failed: {
2229
+ meaning: "The read failed for another reason: a network or server error, a malformed response, an open issue's item whose field value is not a single-select value, or a GraphQL error on the repository.",
2230
+ fix: "Usually transient: the board retries on its next poll. If it persists, check the daemon log for the GitHub error."
2231
+ }
2232
+ };
2120
2233
  /** A whole-poll failure (A6). `retryAt` is when the source allows the next attempt. */
2121
2234
  var AdapterError = class extends Error {
2122
2235
  kind;
2123
2236
  retryAt;
2237
+ /** The mirror failure code a github-project source reports with this failure. */
2238
+ code;
2124
2239
  usage;
2125
2240
  constructor(kind, message, options = {}) {
2126
2241
  super(message, "cause" in options ? { cause: options.cause } : void 0);
2127
2242
  this.name = "AdapterError";
2128
2243
  this.kind = kind;
2129
2244
  this.retryAt = options.retryAt;
2245
+ this.code = options.code;
2130
2246
  }
2131
2247
  };
2132
2248
  // ../contracts/src/events.ts
@@ -2151,6 +2267,7 @@ const EVENT_KINDS = [
2151
2267
  "task_shadow_moved",
2152
2268
  "task_corrected",
2153
2269
  "task_manually_moved",
2270
+ "task_mirror_moved",
2154
2271
  "external_round",
2155
2272
  "dispatcher_mode_changed",
2156
2273
  "turn_opened",
@@ -2333,6 +2450,13 @@ const eventPayloadSchemas = {
2333
2450
  to: z.enum(COLUMN_IDS),
2334
2451
  reason: S
2335
2452
  }),
2453
+ task_mirror_moved: z.looseObject({
2454
+ from: z.enum(COLUMN_IDS),
2455
+ to: z.enum(COLUMN_IDS),
2456
+ source: S,
2457
+ /** Only the shadow column moved; `from` and `to` are shadow positions. */
2458
+ shadow: z.literal(true).optional()
2459
+ }),
2336
2460
  /** An external change request on a new PR head while the task is in Dev: one course-check round. */
2337
2461
  external_round: z.looseObject({
2338
2462
  repo: S,
@@ -2928,8 +3052,9 @@ const moveViewSchema = z.strictObject({
2928
3052
  "task_moved",
2929
3053
  "task_shadow_moved",
2930
3054
  "task_corrected",
2931
- "task_manually_moved"
2932
- ]).describe("task_moved moves the column, task_shadow_moved only the shadow column, task_corrected is an operator correction, task_manually_moved is an operator Todo-group placement."),
3055
+ "task_manually_moved",
3056
+ "task_mirror_moved"
3057
+ ]).describe("task_moved moves the column, task_shadow_moved only the shadow column, task_corrected is an operator correction, task_manually_moved is an operator Todo-group placement, task_mirror_moved is a placement between todo and ready-for-dev by the GitHub Project mirror."),
2933
3058
  actor: actorIdSchema,
2934
3059
  from: z.enum(COLUMN_IDS).describe("Column the task left."),
2935
3060
  to: z.enum(COLUMN_IDS).describe("Column the task entered."),
@@ -2937,10 +3062,11 @@ const moveViewSchema = z.strictObject({
2937
3062
  ...MOVE_REASONS,
2938
3063
  "returned",
2939
3064
  "corrected",
2940
- "manual"
2941
- ]).describe("Why it moved: a dispatcher reason, returned (executor return), corrected (operator correction), or manual (operator Todo-group placement)."),
3065
+ "manual",
3066
+ "mirrored"
3067
+ ]).describe("Why it moved: a dispatcher reason, returned (executor return), corrected (operator correction), manual (operator Todo-group placement), or mirrored (GitHub Project mirror)."),
2942
3068
  gate: z.array(z.enum(GATE_REASONS)).describe("The failing gate reasons of a gate_broken move; empty otherwise."),
2943
- text: z.string().nullable().describe("The block a return opened, or the literal reason for an operator correction or manual move; null otherwise.")
3069
+ text: z.string().nullable().describe("The block a return opened, the literal reason for an operator correction or manual move, or the source id of a mirror move; null otherwise.")
2944
3070
  }).describe("A column move of a task.");
2945
3071
  const gateConditionSchema = z.strictObject({
2946
3072
  condition: z.enum(GATE_CONDITIONS).describe("Exit condition of the column."),
@@ -3118,6 +3244,10 @@ const sourceViewSchema = z.strictObject({
3118
3244
  "stale"
3119
3245
  ]).nullable().describe("Why this source is blind, or null when it is usable."),
3120
3246
  message: z.string().nullable().describe("Short explanation of the source state."),
3247
+ failure: z.strictObject({
3248
+ code: z.enum(MIRROR_FAILURE_CODES).describe("Mirror failure code."),
3249
+ message: z.string().min(1).describe("What the last poll failed on.")
3250
+ }).nullable().optional().describe("Why the last poll failed, or null after a delivered batch; present only on github-project: sources."),
3121
3251
  budget: z.strictObject({
3122
3252
  remaining: z.int().nonnegative().describe("Requests or points the source still allowed."),
3123
3253
  limit: z.int().positive().nullable().describe("Full budget the source restores at reset, or null when it reported none."),
@@ -3234,6 +3364,24 @@ const configViewSchema = z.strictObject({
3234
3364
  name: z.string().nullable().describe("Named Spur project, or null for automatic routing.")
3235
3365
  }).describe("Effective column executor."),
3236
3366
  group: z.enum(COLUMN_GROUPS).optional().describe("Column group; present only on Todo-group columns."),
3367
+ source: z.discriminatedUnion("kind", [z.strictObject({ kind: z.literal("manual").describe("manual: the operator places tasks in this column.") }), z.strictObject({
3368
+ kind: z.literal("mirror").describe("mirror: the board places tasks between todo and ready-for-dev from a GitHub Project field."),
3369
+ tracker: z.literal("github-project").describe("The mirrored tracker."),
3370
+ name: z.string().min(1).describe("Title of the GitHub Project from its last complete read, else project."),
3371
+ project: z.string().min(1).describe("The configured Project as owner/number."),
3372
+ field: z.string().min(1).describe("The configured single-select field."),
3373
+ value: z.string().min(1).describe("The configured option that places a task in ready-for-dev."),
3374
+ health: z.enum([
3375
+ "healthy",
3376
+ "degraded",
3377
+ "failing"
3378
+ ]).describe("Health of the github-project source, by the rule of status.get services."),
3379
+ readAt: z.iso.datetime().nullable().describe("Poll start of the last complete read, or null before one."),
3380
+ error: z.strictObject({
3381
+ code: z.enum(MIRROR_FAILURE_CODES).describe("Mirror failure code."),
3382
+ message: z.string().min(1).describe("What the last read failed on.")
3383
+ }).optional().describe("Why the last read failed; positions stay as the last complete read left them. Absent after a complete read.")
3384
+ })]).optional().describe("Where the column takes its tasks from; present only on Todo-group columns."),
3237
3385
  quietTurnAfterMs: z.int().min(1).optional().describe("Effective quiet time of an orchestrator turn before its reminder, in milliseconds; present only on columns with a named orchestrator."),
3238
3386
  noRecipientAfterMs: z.int().min(1).optional().describe("Effective wait of an untaken turn with no live session before the operator item, in milliseconds; present only on columns with a named orchestrator.")
3239
3387
  })).describe("Enabled board columns."),
@@ -3313,7 +3461,11 @@ const columnsDescribeOutputSchema = z.strictObject({ projects: z.array(z.strictO
3313
3461
  }).nullable().describe("Taken-agent-turn silence policy; null for operator, dispatcher and Todo.")
3314
3462
  }).describe("Question and silent-executor escalation."),
3315
3463
  movedBy: z.strictObject({
3316
- kind: z.enum(["manual", "dispatcher"]).describe("Current placement mechanism."),
3464
+ kind: z.enum([
3465
+ "manual",
3466
+ "dispatcher",
3467
+ "mirror"
3468
+ ]).describe("Current placement mechanism; mirror: a GitHub Project field places tasks in ready-for-dev."),
3317
3469
  text: z.string().describe("How the column is entered, including shadow-mode qualification.")
3318
3470
  }).describe("Column placement policy.")
3319
3471
  })).describe("Enabled columns only, in canonical order.")
@@ -3382,14 +3534,14 @@ const hostSchema = z.strictObject({
3382
3534
  volumes: z.array(hostVolumeSchema).describe("Each distinct volume among /, the board data directory and the temp directory, least free bytes first. A volume that cannot be read is left out.")
3383
3535
  }).nullable().describe("Host CPU, memory and disk usage from the last sample of the daemon; null before the first sample.");
3384
3536
  const serviceSchema = z.strictObject({
3385
- service: z.string().min(1).describe("daemon, github, jira, spur, or a chat gateway kind such as slack."),
3537
+ service: z.string().min(1).describe("daemon, github, github-project, jira, spur, or a chat gateway kind such as slack."),
3386
3538
  state: z.enum([
3387
3539
  "healthy",
3388
3540
  "degraded",
3389
3541
  "failing"
3390
- ]).describe("failing: a blind source 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."),
3391
- 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, 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."),
3392
- 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, jira and spur (null when one has none); null for a gateway."),
3542
+ ]).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."),
3543
+ 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."),
3544
+ 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."),
3393
3545
  reason: z.string().nullable().describe("Why the service is not healthy, from its first worst source for github, jira and spur; null when healthy.")
3394
3546
  }).describe("Health of one service.");
3395
3547
  const statusInputSchema = z.strictObject({
@@ -3402,7 +3554,7 @@ const statusOutputSchema = z.strictObject({
3402
3554
  spurUnavailable: z.string().nullable().describe("One combined Spur availability line, or null when available."),
3403
3555
  hostLoad: z.string().nullable().describe("Host-load episode line, or null when absent."),
3404
3556
  host: hostSchema,
3405
- services: z.array(serviceSchema).describe("One health row per service: daemon, each chat gateway, then github, spur and jira when sources lists one. Daemon and gateway rows are board-wide; source services roll up the sources listed, which cover every project the caller may see whatever project says."),
3557
+ services: z.array(serviceSchema).describe("One health row per service: daemon, each chat gateway, then github, github-project (only when a column mirrors a GitHub Project), spur and jira when sources lists one. Daemon and gateway rows are board-wide; source services roll up the sources listed, which cover every project the caller may see whatever project says."),
3406
3558
  transport: z.array(z.strictObject({
3407
3559
  gateway: z.string().min(1).describe("Chat gateway kind."),
3408
3560
  state: z.enum(["up", "down"]).describe("down while delivery to any space of the gateway is suspended."),
@@ -5545,4 +5697,4 @@ const remoteDoctorReportSchema = z.object({
5545
5697
  function assertNever(value) {
5546
5698
  throw new Error(`Unexpected value: ${JSON.stringify(value)}`);
5547
5699
  }
5548
- export { REF_NUMBER as $, eventPayloadSchemas as A, ITEM_KINDS as At, REVIEW_DECISIONS as B, messageRefSchema as C, plainHttpAllowed as Ct, sortSkillFiles as D, COLUMN_GROUPS as Dt, skillReloadFilesSchema as E, COLUMNS as Et, prSourceId as F, isTodoGroupColumn as Ft, parseRingMarker as G, SESSION_HEALTH_STATES as H, sessionTransitionSchema as I, prReviewRuleSchema as J, prFactsSchema as K, sourceCursorSchema as L, batchSchema as M, TASK_HOLDS as Mt, defaultBranchFactSchema as N, TODO_GROUP_COLUMN_IDS as Nt, EVENT_KINDS as O, COLUMN_IDS as Ot, entityRefSchema as P, VIAS as Pt, JIRA_PROJECT_KEY as Q, trackerSourceId as R, interactionRefSchema as S, defaultAddressee as St, skillReloadFileSchema as T, resolveWebOrigin as Tt, SESSION_STATUSES as U, REVIEW_STATES as V, isExternalAuthor as W, sessionFactsSchema as X, ringMarker as Y, ticketFactsSchema as Z, renderJsonError as _, approvalRuleOf as _t, requestHashOf as a, ERRORS as at, conversationRefSchema as b, configBindings as bt, tokenRequestStatusSchema as c, errorEnvelopeSchema as ct, buildCatalogSnapshot as d, DEFAULT_HTTP_PORT as dt, actorIdSchema as et, roleCanUseOperation as f, DEFAULT_LINK as ft, renderHttpProblem as g, RESERVED_PROJECT as gt, turnHandedSchema as h, DEFAULT_STAND_PORT_RANGE as ht, TOKEN_REQUEST_LIMITS as i, parseRef as it, AdapterError as j, SLACK_BOT_SCOPES as jt, GATE_REASONS as k, DISPATCHER_MODES as kt, BOARD_TICK_MS as l, ok as lt, defaultBranchViewSchema as m, DEFAULT_SLACK_COMMAND as mt, doctorReportSchema as n, errorCodeOf as nt, tokenRequestResultSchema as o, err as ot, OPERATIONS as p, DEFAULT_SLACK_APP_NAME as pt, prRefSchema as q, remoteDoctorReportSchema as r, parseActorId as rt, tokenRequestSchema as s, errorContextSchema as st, assertNever as t, encodeActorId as tt, SYSTEMD_SERVICE_SETTINGS as u, successEnvelopeSchema as ut, renderMcpError as v, boardWideSpurProject as vt, userIdSchema as w, requiredSecretKeys as wt, inboundEventSchema as x, configSchema as xt, SPACE_IDS as y, columnTurnTimings as yt, PR_STATES as z };
5700
+ export { sessionFactsSchema as $, eventPayloadSchemas as A, COLUMNS as At, sourceCursorSchema as B, messageRefSchema as C, configBindings as Ct, sortSkillFiles as D, readyMirrorOf as Dt, skillReloadFilesSchema as E, plainHttpAllowed as Et, defaultBranchFactSchema as F, SLACK_BOT_SCOPES as Ft, SESSION_HEALTH_STATES as G, PR_STATES as H, entityRefSchema as I, TASK_HOLDS as It, parseRingMarker as J, SESSION_STATUSES as K, mirrorSourceId as L, TODO_GROUP_COLUMN_IDS as Lt, MIRROR_FAILURES as M, COLUMN_IDS as Mt, MIRROR_FAILURE_CODES as N, DISPATCHER_MODES as Nt, EVENT_KINDS as O, requiredSecretKeys as Ot, batchSchema as P, ITEM_KINDS as Pt, ringMarker as Q, prSourceId as R, VIAS as Rt, interactionRefSchema as S, columnTurnTimings as St, skillReloadFileSchema as T, defaultAddressee as Tt, REVIEW_DECISIONS as U, trackerSourceId as V, REVIEW_STATES as W, prRefSchema as X, prFactsSchema as Y, prReviewRuleSchema as Z, renderJsonError as _, DEFAULT_SLACK_COMMAND as _t, requestHashOf as a, errorCodeOf as at, conversationRefSchema as b, approvalRuleOf as bt, tokenRequestStatusSchema as c, ERRORS as ct, buildCatalogSnapshot as d, errorEnvelopeSchema as dt, ticketFactsSchema as et, roleCanUseOperation as f, ok as ft, renderHttpProblem as g, DEFAULT_SLACK_APP_NAME as gt, turnHandedSchema as h, DEFAULT_LINK as ht, TOKEN_REQUEST_LIMITS as i, encodeActorId as it, AdapterError as j, COLUMN_GROUPS as jt, GATE_REASONS as k, resolveWebOrigin as kt, BOARD_TICK_MS as l, err as lt, defaultBranchViewSchema as m, DEFAULT_HTTP_PORT as mt, doctorReportSchema as n, REF_NUMBER as nt, tokenRequestResultSchema as o, parseActorId as ot, OPERATIONS as p, successEnvelopeSchema as pt, isExternalAuthor as q, remoteDoctorReportSchema as r, actorIdSchema as rt, tokenRequestSchema as s, parseRef as st, assertNever as t, JIRA_PROJECT_KEY as tt, SYSTEMD_SERVICE_SETTINGS as u, errorContextSchema as ut, renderMcpError as v, DEFAULT_STAND_PORT_RANGE as vt, userIdSchema as w, configSchema as wt, inboundEventSchema as x, boardWideSpurProject as xt, SPACE_IDS as y, RESERVED_PROJECT as yt, sessionTransitionSchema as z, isTodoGroupColumn as zt };
package/dist/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { D as sortSkillFiles, T as skillReloadFileSchema, Tt as resolveWebOrigin, a as requestHashOf, at as ERRORS, et as actorIdSchema, f as roleCanUseOperation, ht as DEFAULT_STAND_PORT_RANGE, jt as SLACK_BOT_SCOPES, p as OPERATIONS, r as remoteDoctorReportSchema, u as SYSTEMD_SERVICE_SETTINGS, ut as successEnvelopeSchema, wt as requiredSecretKeys, xt as configSchema } from "./chunk-CRtgKvgx.mjs";
1
+ import { D as sortSkillFiles, Ft as SLACK_BOT_SCOPES, Ot as requiredSecretKeys, T as skillReloadFileSchema, a as requestHashOf, ct as ERRORS, f as roleCanUseOperation, kt as resolveWebOrigin, p as OPERATIONS, pt as successEnvelopeSchema, r as remoteDoctorReportSchema, rt as actorIdSchema, u as SYSTEMD_SERVICE_SETTINGS, vt as DEFAULT_STAND_PORT_RANGE, wt as configSchema } from "./chunk-ELGKyFVI.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-CEGynnHg.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-ssUCRu8d.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-CDsQwru1.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-BZqvZUqX.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-CEGynnHg.mjs";
1
+ export { t as fetchCatalogVersion, n as fetchTokenStatus, r as requestOperation, i as requestSkillReload, a as requestTokenEnrollment } from "./chunk-CDsQwru1.mjs";