spur-board 0.124.0 → 0.126.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.
- package/dist/{chunk-MSHt4j9s.mjs → chunk-2vFOidpZ.mjs} +1 -1
- package/dist/{chunk-D9XJdrky.mjs → chunk-B9WekLbU.mjs} +2 -2
- package/dist/{chunk-Bdi5PEuV.mjs → chunk-CgQL6u77.mjs} +264 -60
- package/dist/cli.mjs +7 -5
- package/dist/client.mjs +1 -1
- package/dist/daemon.mjs +5140 -4829
- package/dist/mcp.mjs +5 -5
- package/dist/web/assets/index-DQ9p0c48.js +64 -0
- package/dist/web/index.html +1 -1
- package/package.json +1 -1
- package/skills/spur-board/SKILL.md +1 -0
- package/skills/spur-board/references/config.md +11 -1
- package/skills/spur-board/references/how-board-works-columns.md +37 -9
- package/skills/spur-board/references/how-board-works-history.md +5 -0
- package/skills/spur-board/references/how-board-works-web.md +4 -2
- package/dist/web/assets/index-BnHV99O_.js +0 -64
|
@@ -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-
|
|
1
|
+
import { _ as renderJsonError, at as errorContextSchema, c as tokenRequestStatusSchema, ct as successEnvelopeSchema, o as tokenRequestResultSchema, ot as errorEnvelopeSchema, rt as ERRORS } from "./chunk-CgQL6u77.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 { bt as plainHttpAllowed, d as buildCatalogSnapshot, p as OPERATIONS, vt as configSchema } from "./chunk-
|
|
2
|
-
import { o as CliError, t as fetchCatalogVersion } from "./chunk-
|
|
1
|
+
import { bt as plainHttpAllowed, d as buildCatalogSnapshot, p as OPERATIONS, vt as configSchema } from "./chunk-CgQL6u77.mjs";
|
|
2
|
+
import { o as CliError, t as fetchCatalogVersion } from "./chunk-2vFOidpZ.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";
|
|
@@ -1304,6 +1304,27 @@ const ERRORS = {
|
|
|
1304
1304
|
hint: "Read why with `board task <KEY> --why`; pick an enabled column, and unlink a merged pull request with `board unlink` first.",
|
|
1305
1305
|
recovery: noRetry("Read why the task is where it is; pick an enabled column, and unlink a merged pull request first.")
|
|
1306
1306
|
}),
|
|
1307
|
+
move_outside_todo_group: spec("move_outside_todo_group", {
|
|
1308
|
+
status: 409,
|
|
1309
|
+
exit: EXIT_CODES.refused,
|
|
1310
|
+
message: "Manual moves require an enabled Todo-group source and destination.",
|
|
1311
|
+
hint: "Pick an enabled Todo-group column; use `board move --correct` to correct a wrong column.",
|
|
1312
|
+
recovery: noRetry("Pick an enabled Todo-group column or correct a wrong column.")
|
|
1313
|
+
}),
|
|
1314
|
+
work_started: spec("work_started", {
|
|
1315
|
+
status: 409,
|
|
1316
|
+
exit: EXIT_CODES.refused,
|
|
1317
|
+
message: "Work has started on this task.",
|
|
1318
|
+
hint: "Read `board task <KEY> --why`; resolve the open pull request or live worker before moving idle work.",
|
|
1319
|
+
recovery: noRetry("Resolve the open pull request or live worker before moving idle work.")
|
|
1320
|
+
}),
|
|
1321
|
+
column_mirrored: spec("column_mirrored", {
|
|
1322
|
+
status: 409,
|
|
1323
|
+
exit: EXIT_CODES.refused,
|
|
1324
|
+
message: "The column is mirrored from the project tracker.",
|
|
1325
|
+
hint: "Change the task status in the named project tracker instead.",
|
|
1326
|
+
recovery: noRetry("Change the task status in the named project tracker instead.")
|
|
1327
|
+
}),
|
|
1307
1328
|
task_archived: spec("task_archived", {
|
|
1308
1329
|
status: 409,
|
|
1309
1330
|
exit: EXIT_CODES.refused,
|
|
@@ -2086,6 +2107,7 @@ const EVENT_KINDS = [
|
|
|
2086
2107
|
"task_moved",
|
|
2087
2108
|
"task_shadow_moved",
|
|
2088
2109
|
"task_corrected",
|
|
2110
|
+
"task_manually_moved",
|
|
2089
2111
|
"dispatcher_mode_changed",
|
|
2090
2112
|
"turn_opened",
|
|
2091
2113
|
"turn_taken",
|
|
@@ -2258,6 +2280,11 @@ const eventPayloadSchemas = {
|
|
|
2258
2280
|
gate: z.array(z.enum(GATE_REASONS)).optional(),
|
|
2259
2281
|
courseCheck: z.literal(true).optional()
|
|
2260
2282
|
}),
|
|
2283
|
+
task_manually_moved: z.looseObject({
|
|
2284
|
+
from: z.enum(COLUMN_IDS),
|
|
2285
|
+
to: z.enum(COLUMN_IDS),
|
|
2286
|
+
reason: S
|
|
2287
|
+
}),
|
|
2261
2288
|
task_corrected: z.looseObject({
|
|
2262
2289
|
from: z.enum(COLUMN_IDS),
|
|
2263
2290
|
to: z.enum(COLUMN_IDS),
|
|
@@ -2673,6 +2700,8 @@ const MUTATION_ERRORS = ["idempotency_key_mismatch"];
|
|
|
2673
2700
|
*/
|
|
2674
2701
|
function defineOperation(spec) {
|
|
2675
2702
|
const mutation = spec.kind === "mutation";
|
|
2703
|
+
for (const mode of [...spec.explicitKeyModes ?? [], ...spec.cli.defaultMode === void 0 ? [] : [spec.cli.defaultMode]]) if (!spec.cli.modes?.some((entry) => entry.mode === mode)) throw new Error(`Unknown mode ${mode} in ${spec.id}.`);
|
|
2704
|
+
if (!mutation && spec.explicitKeyModes?.length) throw new Error("Only mutations require explicit keys.");
|
|
2676
2705
|
const order = Object.keys(ERRORS);
|
|
2677
2706
|
const errors = [.../* @__PURE__ */ new Set([
|
|
2678
2707
|
...COMMON_ERRORS,
|
|
@@ -2688,6 +2717,7 @@ function defineOperation(spec) {
|
|
|
2688
2717
|
command: spec.cli.command,
|
|
2689
2718
|
args: spec.cli.args,
|
|
2690
2719
|
modes: spec.cli.modes ?? null,
|
|
2720
|
+
...spec.cli.defaultMode === void 0 ? {} : { defaultMode: spec.cli.defaultMode },
|
|
2691
2721
|
key: mutation ? "--key" : null
|
|
2692
2722
|
},
|
|
2693
2723
|
mcp: {
|
|
@@ -2842,18 +2872,20 @@ const moveViewSchema = z.strictObject({
|
|
|
2842
2872
|
kind: z.enum([
|
|
2843
2873
|
"task_moved",
|
|
2844
2874
|
"task_shadow_moved",
|
|
2845
|
-
"task_corrected"
|
|
2846
|
-
|
|
2875
|
+
"task_corrected",
|
|
2876
|
+
"task_manually_moved"
|
|
2877
|
+
]).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."),
|
|
2847
2878
|
actor: actorIdSchema,
|
|
2848
2879
|
from: z.enum(COLUMN_IDS).describe("Column the task left."),
|
|
2849
2880
|
to: z.enum(COLUMN_IDS).describe("Column the task entered."),
|
|
2850
2881
|
reason: z.enum([
|
|
2851
2882
|
...MOVE_REASONS,
|
|
2852
2883
|
"returned",
|
|
2853
|
-
"corrected"
|
|
2854
|
-
|
|
2884
|
+
"corrected",
|
|
2885
|
+
"manual"
|
|
2886
|
+
]).describe("Why it moved: a dispatcher reason, returned (executor return), corrected (operator correction), or manual (operator Todo-group placement)."),
|
|
2855
2887
|
gate: z.array(z.enum(GATE_REASONS)).describe("The failing gate reasons of a gate_broken move; empty otherwise."),
|
|
2856
|
-
text: z.string().nullable().describe("The block a return opened, or the reason
|
|
2888
|
+
text: z.string().nullable().describe("The block a return opened, or the literal reason for an operator correction or manual move; null otherwise.")
|
|
2857
2889
|
}).describe("A column move of a task.");
|
|
2858
2890
|
const gateConditionSchema = z.strictObject({
|
|
2859
2891
|
condition: z.enum(GATE_CONDITIONS).describe("Exit condition of the column."),
|
|
@@ -2989,8 +3021,10 @@ const schemaGetOutputSchema = z.strictObject({
|
|
|
2989
3021
|
description: z.string().describe("What the operation does."),
|
|
2990
3022
|
grants: z.union([z.literal("any"), z.array(grantRuleSchema).min(1)]).describe("Who may call it: any identified caller, or the listed rules."),
|
|
2991
3023
|
errors: z.array(z.string()).describe("Error codes the operation can return."),
|
|
3024
|
+
explicitKeyModes: z.array(z.string()).optional().describe("Modes requiring a caller-chosen idempotency key, including for operators."),
|
|
2992
3025
|
cli: z.strictObject({
|
|
2993
3026
|
command: z.string().describe("CLI command after `board`."),
|
|
3027
|
+
defaultMode: z.string().optional().describe("Input mode used when no mode flag is supplied."),
|
|
2994
3028
|
args: z.array(z.string()).describe("Input fields given as positional arguments."),
|
|
2995
3029
|
modes: z.array(cliModeSchema).min(1).nullable().describe("Flags that pick a branch of a union input; null for a plain input."),
|
|
2996
3030
|
key: z.literal("--key").nullable().describe("Idempotency key flag; null for a query.")
|
|
@@ -3038,6 +3072,25 @@ const sourceViewSchema = z.strictObject({
|
|
|
3038
3072
|
warmingUp: z.boolean().describe("Whether this source needs a complete poll in this daemon run."),
|
|
3039
3073
|
defaultBranch: defaultBranchViewSchema.nullable().optional().describe("GitHub pull request sources only: the default-branch colour, red when the latest check run of a push-triggered workflow finished without success (failed, cancelled, timed out) or a commit status failed (scheduled and other runs ignored, branch protection not read); null until a poll reads it.")
|
|
3040
3074
|
}).describe("Freshness and availability of one source.");
|
|
3075
|
+
// ../contracts/src/ops/move-schemas.ts
|
|
3076
|
+
const taskMoveInputSchema = z.discriminatedUnion("mode", [z.strictObject({
|
|
3077
|
+
mode: z.literal("manual").describe("Place an idle task inside the Todo group."),
|
|
3078
|
+
task: taskKeyInputSchema,
|
|
3079
|
+
column: z.enum(COLUMN_IDS).describe("Enabled Todo-group destination; a new visit places the task at its end."),
|
|
3080
|
+
reason: z.string().min(1).max(2e4).regex(/\S/).describe("Literal reason for the move, kept exactly in the journal; must contain non-whitespace text.")
|
|
3081
|
+
}), z.strictObject({
|
|
3082
|
+
mode: z.literal("correct").describe("Correct a wrong column by hand."),
|
|
3083
|
+
task: taskKeyInputSchema,
|
|
3084
|
+
column: z.enum(COLUMN_IDS).exclude(["done"]).describe("Enabled column to put the task in; Done is reached only from the facts."),
|
|
3085
|
+
reason: z.string().min(1).max(2e4).describe("Literal reason for manual placement or correction, kept in the journal.")
|
|
3086
|
+
})]);
|
|
3087
|
+
const taskMoveOutputSchema = z.strictObject({
|
|
3088
|
+
task: taskViewSchema,
|
|
3089
|
+
from: z.enum(COLUMN_IDS).describe("Column the task left; correction uses the dispatcher position."),
|
|
3090
|
+
to: z.enum(COLUMN_IDS).describe("Requested destination column."),
|
|
3091
|
+
column: z.enum(COLUMN_IDS).describe("Resulting position; correction uses the shadow position in shadow mode."),
|
|
3092
|
+
settled: z.array(moveViewSchema).describe("Dispatcher moves after a correction, oldest first; empty for manual placement.")
|
|
3093
|
+
});
|
|
3041
3094
|
// ../contracts/src/ops/config-view-schema.ts
|
|
3042
3095
|
const configViewSchema = z.strictObject({
|
|
3043
3096
|
projects: z.array(z.strictObject({
|
|
@@ -3072,6 +3125,73 @@ const configViewSchema = z.strictObject({
|
|
|
3072
3125
|
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
3126
|
}).describe("Web origins of the board listener and the Spur UI.")
|
|
3074
3127
|
}).describe("Allowlisted effective configuration without credentials or adapter settings.");
|
|
3128
|
+
// ../contracts/src/ops/columns-schema.ts
|
|
3129
|
+
const configProject = configViewSchema.shape.projects.element;
|
|
3130
|
+
const session = z.strictObject({
|
|
3131
|
+
id: statusSessionFactsSchema.shape.id,
|
|
3132
|
+
links: statusSessionFactsSchema.shape.links
|
|
3133
|
+
});
|
|
3134
|
+
const destination = z.strictObject({
|
|
3135
|
+
role: z.enum(ADDRESSEE_ROLES).describe("Runtime addressee role."),
|
|
3136
|
+
project: z.string().nullable().describe("Named Spur project, or null for the operator or task worker."),
|
|
3137
|
+
displayName: z.string().nullable().describe("Configured display name, falling back to project name."),
|
|
3138
|
+
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."),
|
|
3139
|
+
text: z.string().describe("Routing and no-session behavior.")
|
|
3140
|
+
});
|
|
3141
|
+
const columnsDescribeOutputSchema = z.strictObject({ projects: z.array(z.strictObject({
|
|
3142
|
+
id: configProject.shape.id,
|
|
3143
|
+
dispatcher: configProject.shape.dispatcher,
|
|
3144
|
+
checksGate: z.enum(CHECKS_GATE_COLUMNS).describe("Effective column requiring green checks."),
|
|
3145
|
+
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."),
|
|
3146
|
+
resolvedThreadsFrom: z.enum(COLUMN_IDS).nullable().describe("Leftmost enabled thread gate, or null when none."),
|
|
3147
|
+
completion: z.strictObject({
|
|
3148
|
+
to: z.literal("done").describe("Completion destination, separate from ordinary gate progression."),
|
|
3149
|
+
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.")
|
|
3150
|
+
}).describe("Project-wide completion route from any column other than Done. Completion bypasses normal gates; it is not conjoined with exit.conditions."),
|
|
3151
|
+
columns: z.array(z.strictObject({
|
|
3152
|
+
id: z.enum(COLUMN_IDS).describe("Enabled column in canonical order."),
|
|
3153
|
+
name: z.string().describe("Human column name."),
|
|
3154
|
+
group: z.enum(COLUMN_GROUPS).optional().describe("Group, present only for Todo columns."),
|
|
3155
|
+
exit: z.strictObject({
|
|
3156
|
+
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."),
|
|
3157
|
+
conditions: z.array(z.strictObject({
|
|
3158
|
+
id: z.enum([...GATE_CONDITIONS, "work_started"]).describe("Condition identifier; each rule appears at its effective owner."),
|
|
3159
|
+
text: z.string().describe("Canonical positive exit rule, independent of task state.")
|
|
3160
|
+
})).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.")
|
|
3161
|
+
}).describe("Normal gate progression and effective own rules; completion into Done is described separately at project level."),
|
|
3162
|
+
returns: z.array(z.string()).describe("Applicable return triggers and completion/reopening qualifications."),
|
|
3163
|
+
limits: z.strictObject({
|
|
3164
|
+
cycleLimit: z.int().min(1).describe("Counted returns before operator hold; takes precedence over courseCheck."),
|
|
3165
|
+
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."),
|
|
3166
|
+
courseCheckTo: destination.describe("Resolved course-check destination; missing live recipient falls back to operator.")
|
|
3167
|
+
}).nullable().describe("Return limits, or null when the column cannot return to Dev."),
|
|
3168
|
+
executor: z.strictObject({
|
|
3169
|
+
kind: configProject.shape.columns.element.shape.executor.shape.kind,
|
|
3170
|
+
project: destination.shape.project,
|
|
3171
|
+
role: configProject.shape.spurProjects.element.shape.role.nullable().describe("Configured Spur role, or null for automatic/operator routing."),
|
|
3172
|
+
displayName: destination.shape.displayName,
|
|
3173
|
+
session: destination.shape.session,
|
|
3174
|
+
text: z.string().describe("Turn ownership, fallback and project-selected session scope.")
|
|
3175
|
+
}).describe("Effective executor; Todo does not open turns, Done may open an agent wrap-up turn."),
|
|
3176
|
+
escalation: z.strictObject({
|
|
3177
|
+
chain: z.array(destination).describe("Question escalation starting at the executor; self-role steps are skipped using runtime routing."),
|
|
3178
|
+
noRecipient: z.strictObject({
|
|
3179
|
+
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."),
|
|
3180
|
+
text: z.string().describe("Wait origin, recipient eligibility, source readiness, item clearing and no-reroute qualifications.")
|
|
3181
|
+
}).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."),
|
|
3182
|
+
silent: z.strictObject({
|
|
3183
|
+
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."),
|
|
3184
|
+
operatorItemAfterReminderReadMs: z.int().min(0).describe("Further quiet time after reminder read/current quiet period before operator item."),
|
|
3185
|
+
unhealthyAfterMs: z.int().min(0).describe("Unhealthy executor episode before operator item."),
|
|
3186
|
+
text: z.string().describe("Timing origins, pauses and dispatcher-mode qualification.")
|
|
3187
|
+
}).nullable().describe("Taken-agent-turn silence policy; null for operator, dispatcher and Todo.")
|
|
3188
|
+
}).describe("Question and silent-executor escalation."),
|
|
3189
|
+
movedBy: z.strictObject({
|
|
3190
|
+
kind: z.enum(["manual", "dispatcher"]).describe("Current placement mechanism."),
|
|
3191
|
+
text: z.string().describe("How the column is entered, including shadow-mode qualification.")
|
|
3192
|
+
}).describe("Column placement policy.")
|
|
3193
|
+
})).describe("Enabled columns only, in canonical order.")
|
|
3194
|
+
})).describe("Effective configured projects visible to the caller; bounded by config and built-in columns.") });
|
|
3075
3195
|
// ../contracts/src/ops/inbox-schemas.ts
|
|
3076
3196
|
/** One entry of the operator inbox: an operator item, a block addressed to the operator or a turn. */
|
|
3077
3197
|
const inboxEntrySchema = z.strictObject({
|
|
@@ -4969,81 +5089,99 @@ const OPERATIONS = [
|
|
|
4969
5089
|
defineOperation({
|
|
4970
5090
|
id: "task.move",
|
|
4971
5091
|
kind: "mutation",
|
|
4972
|
-
description: "
|
|
5092
|
+
description: "Move an idle task inside the Todo group, or correct its column and settle the gates.",
|
|
4973
5093
|
mcp: {
|
|
4974
|
-
whenToUse: "
|
|
5094
|
+
whenToUse: "Place idle work at the end of an enabled Todo-group column with a literal reason and explicit key, or correct a wrong column with mode correct.",
|
|
4975
5095
|
whenNotToUse: "Use task_get with why to read why the task is where it is."
|
|
4976
5096
|
},
|
|
4977
|
-
input:
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
reason: text("Why the column is corrected, kept in the journal.", TEXT_MAX)
|
|
4982
|
-
})]),
|
|
4983
|
-
output: z.strictObject({
|
|
4984
|
-
task: taskViewSchema,
|
|
4985
|
-
from: z.enum(COLUMN_IDS).describe("Column the dispatcher worked from before the correction."),
|
|
4986
|
-
to: z.enum(COLUMN_IDS).describe("Column the correction put the task in."),
|
|
4987
|
-
column: z.enum(COLUMN_IDS).describe("Column the gates settled the task in; the shadow column while the dispatcher is in shadow mode."),
|
|
4988
|
-
settled: z.array(moveViewSchema).describe("The dispatcher moves from the corrected column, oldest first.")
|
|
4989
|
-
}),
|
|
5097
|
+
input: taskMoveInputSchema,
|
|
5098
|
+
output: taskMoveOutputSchema,
|
|
5099
|
+
explicitKeyModes: ["manual"],
|
|
5100
|
+
web: true,
|
|
4990
5101
|
grants: operatorOnly,
|
|
4991
5102
|
errors: [
|
|
4992
5103
|
"wrong_id_kind",
|
|
4993
5104
|
"not_found",
|
|
4994
5105
|
"task_archived",
|
|
4995
|
-
"move_not_allowed"
|
|
5106
|
+
"move_not_allowed",
|
|
5107
|
+
"move_outside_todo_group",
|
|
5108
|
+
"work_started",
|
|
5109
|
+
"column_mirrored"
|
|
4996
5110
|
],
|
|
4997
5111
|
cli: {
|
|
4998
5112
|
command: "move",
|
|
4999
5113
|
args: ["task", "column"],
|
|
5000
5114
|
modes: [{
|
|
5115
|
+
mode: "manual",
|
|
5116
|
+
flag: "--manual",
|
|
5117
|
+
value: null
|
|
5118
|
+
}, {
|
|
5001
5119
|
mode: "correct",
|
|
5002
5120
|
flag: "--correct",
|
|
5003
5121
|
value: null
|
|
5004
|
-
}]
|
|
5122
|
+
}],
|
|
5123
|
+
defaultMode: "manual"
|
|
5005
5124
|
},
|
|
5006
5125
|
slack: null,
|
|
5007
|
-
examples: [
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
summary: "Correct a task into Review while its Dev gate is broken",
|
|
5024
|
-
input: {
|
|
5025
|
-
mode: "correct",
|
|
5026
|
-
task: "PROJ-123",
|
|
5027
|
-
column: "review",
|
|
5028
|
-
reason: "The review was done outside the board."
|
|
5126
|
+
examples: [
|
|
5127
|
+
{
|
|
5128
|
+
summary: "Place idle work at the end of Ready for Dev",
|
|
5129
|
+
input: {
|
|
5130
|
+
mode: "manual",
|
|
5131
|
+
task: "PROJ-123",
|
|
5132
|
+
column: "ready-for-dev",
|
|
5133
|
+
reason: "Ready for the next worker."
|
|
5134
|
+
},
|
|
5135
|
+
output: {
|
|
5136
|
+
task,
|
|
5137
|
+
from: "todo",
|
|
5138
|
+
to: "ready-for-dev",
|
|
5139
|
+
column: "ready-for-dev",
|
|
5140
|
+
settled: []
|
|
5141
|
+
}
|
|
5029
5142
|
},
|
|
5030
|
-
|
|
5031
|
-
task,
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5143
|
+
{
|
|
5144
|
+
summary: "Correct a task the board put in Done by mistake",
|
|
5145
|
+
input: {
|
|
5146
|
+
mode: "correct",
|
|
5147
|
+
task: "PROJ-123",
|
|
5148
|
+
column: "dev",
|
|
5149
|
+
reason: "The linked pull request belongs to another ticket."
|
|
5150
|
+
},
|
|
5151
|
+
output: {
|
|
5152
|
+
task,
|
|
5153
|
+
from: "done",
|
|
5040
5154
|
to: "dev",
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5155
|
+
column: "dev",
|
|
5156
|
+
settled: []
|
|
5157
|
+
}
|
|
5158
|
+
},
|
|
5159
|
+
{
|
|
5160
|
+
summary: "Correct a task into Review while its Dev gate is broken",
|
|
5161
|
+
input: {
|
|
5162
|
+
mode: "correct",
|
|
5163
|
+
task: "PROJ-123",
|
|
5164
|
+
column: "review",
|
|
5165
|
+
reason: "The review was done outside the board."
|
|
5166
|
+
},
|
|
5167
|
+
output: {
|
|
5168
|
+
task,
|
|
5169
|
+
from: "dev",
|
|
5170
|
+
to: "review",
|
|
5171
|
+
column: "dev",
|
|
5172
|
+
settled: [{
|
|
5173
|
+
at,
|
|
5174
|
+
kind: "task_moved",
|
|
5175
|
+
actor: "system",
|
|
5176
|
+
from: "review",
|
|
5177
|
+
to: "dev",
|
|
5178
|
+
reason: "gate_broken",
|
|
5179
|
+
gate: ["external_comments"],
|
|
5180
|
+
text: null
|
|
5181
|
+
}]
|
|
5182
|
+
}
|
|
5045
5183
|
}
|
|
5046
|
-
|
|
5184
|
+
]
|
|
5047
5185
|
}),
|
|
5048
5186
|
defineOperation({
|
|
5049
5187
|
id: "config.get",
|
|
@@ -5091,6 +5229,71 @@ const OPERATIONS = [
|
|
|
5091
5229
|
}
|
|
5092
5230
|
}
|
|
5093
5231
|
}]
|
|
5232
|
+
}),
|
|
5233
|
+
defineOperation({
|
|
5234
|
+
id: "columns.describe",
|
|
5235
|
+
web: true,
|
|
5236
|
+
kind: "query",
|
|
5237
|
+
description: "Describe effective column exit rules, returns, executors and escalation.",
|
|
5238
|
+
mcp: {
|
|
5239
|
+
whenToUse: "Read the project column policy before deciding how to progress work; selected sessions are project-level choices, not task-specific recipients.",
|
|
5240
|
+
whenNotToUse: "Use task_get with why for a task’s current gates and turn, or config_get for compact bindings and web origins."
|
|
5241
|
+
},
|
|
5242
|
+
input: configGetInputSchema,
|
|
5243
|
+
output: columnsDescribeOutputSchema,
|
|
5244
|
+
grants: operatorOrProjectAgent,
|
|
5245
|
+
errors: ["not_found"],
|
|
5246
|
+
cli: {
|
|
5247
|
+
command: "columns describe",
|
|
5248
|
+
args: []
|
|
5249
|
+
},
|
|
5250
|
+
slack: null,
|
|
5251
|
+
examples: [{
|
|
5252
|
+
summary: "Describe project column policies",
|
|
5253
|
+
input: { project: "web" },
|
|
5254
|
+
output: { projects: [{
|
|
5255
|
+
id: "web",
|
|
5256
|
+
dispatcher: { mode: "on" },
|
|
5257
|
+
checksGate: "dev",
|
|
5258
|
+
reposWithoutCi: [],
|
|
5259
|
+
resolvedThreadsFrom: null,
|
|
5260
|
+
completion: {
|
|
5261
|
+
to: "done",
|
|
5262
|
+
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."
|
|
5263
|
+
},
|
|
5264
|
+
columns: [{
|
|
5265
|
+
id: "todo",
|
|
5266
|
+
name: "To Do",
|
|
5267
|
+
group: "todo",
|
|
5268
|
+
exit: {
|
|
5269
|
+
to: "dev",
|
|
5270
|
+
conditions: [{
|
|
5271
|
+
id: "work_started",
|
|
5272
|
+
text: "Work has started: an open PR, or a live worker with a fresh source and no reopened ticket."
|
|
5273
|
+
}]
|
|
5274
|
+
},
|
|
5275
|
+
returns: [],
|
|
5276
|
+
limits: null,
|
|
5277
|
+
executor: {
|
|
5278
|
+
kind: "worker",
|
|
5279
|
+
project: null,
|
|
5280
|
+
role: null,
|
|
5281
|
+
displayName: null,
|
|
5282
|
+
session: null,
|
|
5283
|
+
text: "No executor turn opens in the Todo group, even with a configured binding."
|
|
5284
|
+
},
|
|
5285
|
+
escalation: {
|
|
5286
|
+
chain: [],
|
|
5287
|
+
noRecipient: null,
|
|
5288
|
+
silent: null
|
|
5289
|
+
},
|
|
5290
|
+
movedBy: {
|
|
5291
|
+
kind: "manual",
|
|
5292
|
+
text: "Manual placement; work starting leaves the whole Todo group."
|
|
5293
|
+
}
|
|
5294
|
+
}]
|
|
5295
|
+
}] }
|
|
5296
|
+
}]
|
|
5094
5297
|
})
|
|
5095
5298
|
];
|
|
5096
5299
|
// ../contracts/src/ops/roles.ts
|
|
@@ -5140,6 +5343,7 @@ function catalogSnapshotBody(operations) {
|
|
|
5140
5343
|
grants: op.grants,
|
|
5141
5344
|
preconditions: op.preconditions,
|
|
5142
5345
|
errors: op.errors,
|
|
5346
|
+
...op.explicitKeyModes === void 0 ? {} : { explicitKeyModes: op.explicitKeyModes },
|
|
5143
5347
|
cli: op.cli,
|
|
5144
5348
|
mcp: op.mcp,
|
|
5145
5349
|
slack: op.slack,
|
|
@@ -5252,4 +5456,4 @@ const remoteDoctorReportSchema = z.object({
|
|
|
5252
5456
|
function assertNever(value) {
|
|
5253
5457
|
throw new Error(`Unexpected value: ${JSON.stringify(value)}`);
|
|
5254
5458
|
}
|
|
5255
|
-
export { encodeActorId as $, eventPayloadSchemas as A,
|
|
5459
|
+
export { encodeActorId as $, eventPayloadSchemas as A, TODO_GROUP_COLUMN_IDS as At, REVIEW_STATES as B, messageRefSchema as C, COLUMNS as Ct, sortSkillFiles as D, ITEM_KINDS as Dt, skillReloadFilesSchema as E, DISPATCHER_MODES 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, isTodoGroupColumn as Mt, defaultBranchFactSchema as N, EVENT_KINDS as O, SLACK_BOT_SCOPES as Ot, entityRefSchema as P, actorIdSchema as Q, trackerSourceId as R, interactionRefSchema as S, resolveWebOrigin as St, skillReloadFileSchema as T, COLUMN_IDS 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 _, configBindings as _t, requestHashOf as a, errorContextSchema as at, conversationRefSchema as b, plainHttpAllowed 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, columnTurnTimings as gt, turnHandedSchema as h, boardWideSpurProject as ht, TOKEN_REQUEST_LIMITS as i, err as it, AdapterError as j, VIAS as jt, GATE_REASONS as k, TASK_HOLDS 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, configSchema as vt, userIdSchema as w, COLUMN_GROUPS as wt, inboundEventSchema as x, requiredSecretKeys as xt, SPACE_IDS as y, defaultAddressee as yt, PR_STATES as z };
|
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-
|
|
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-CgQL6u77.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-
|
|
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-
|
|
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-2vFOidpZ.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-B9WekLbU.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";
|
|
@@ -2468,7 +2468,8 @@ function buildInput(op, args, options) {
|
|
|
2468
2468
|
if (options[flag] !== void 0) input[field] = options[flag];
|
|
2469
2469
|
}
|
|
2470
2470
|
const selected = op.cli.modes?.filter((mode) => options[optionField(mode.flag)] !== void 0);
|
|
2471
|
-
if (selected && selected.length
|
|
2471
|
+
if (selected && (selected.length > 1 || selected.length === 0 && op.cli.defaultMode === void 0)) throw new CliError("usage", void 0, void 0, `Pass exactly one of ${(op.cli.modes ?? []).map((mode) => mode.flag).join(", ")}.`);
|
|
2472
|
+
if (selected?.length === 0 && op.cli.defaultMode !== void 0) input["mode"] = op.cli.defaultMode;
|
|
2472
2473
|
if (selected?.[0]) {
|
|
2473
2474
|
input["mode"] = selected[0].mode;
|
|
2474
2475
|
if (selected[0].value) {
|
|
@@ -2615,12 +2616,13 @@ function createProgram(options = {}) {
|
|
|
2615
2616
|
const command = commandFor(program, op.cli.command);
|
|
2616
2617
|
command.description(op.description);
|
|
2617
2618
|
registerOptions(command, op);
|
|
2618
|
-
command.addHelpText("after", `\nExamples:\n${op.examples.map((example) => ` ${exampleCommand(op, example.input)} — ${example.summary}`).join("\n")}\n`);
|
|
2619
|
+
command.addHelpText("after", `\nExamples:\n${op.examples.map((example) => ` ${exampleCommand(op, example.input)}${op.explicitKeyModes?.includes(String(example.input["mode"])) ? ` --key ${op.mcp.name}-example-001` : ""} — ${example.summary}`).join("\n")}\n`);
|
|
2619
2620
|
command.action(async (...parts) => {
|
|
2620
2621
|
const invoked = parts.at(-1);
|
|
2621
2622
|
const json = Boolean(invoked.opts()["json"] || program.opts()["json"]);
|
|
2622
2623
|
const input = buildInput(op, parts.slice(0, -1), invoked.opts());
|
|
2623
2624
|
const keyOption = invoked.opts()["key"];
|
|
2625
|
+
if (op.explicitKeyModes?.includes(input["mode"] ?? "") && (typeof keyOption !== "string" || keyOption.trim() === "")) throw new CliError("usage", void 0, void 0, "Pass an explicit non-blank --key for this mode.");
|
|
2624
2626
|
if (keyOption !== void 0 && (typeof keyOption !== "string" || keyOption === "")) throw new CliError("usage", void 0, void 0, "Pass a nonempty --key, or omit it to have one generated.");
|
|
2625
2627
|
if (keyOption !== void 0 && escapeTerminalControls(keyOption) !== keyOption) throw new CliError("usage", void 0, void 0, "The idempotency key must contain only printable characters.");
|
|
2626
2628
|
const config = options.clientConfig ?? loadOperationConfig(op, input, env);
|
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-
|
|
1
|
+
export { t as fetchCatalogVersion, n as fetchTokenStatus, r as requestOperation, i as requestSkillReload, a as requestTokenEnrollment } from "./chunk-2vFOidpZ.mjs";
|