spur-board 0.36.1 → 0.37.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/cli.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { F as ERRORS, J as SLACK_BOT_SCOPES, K as configSchema, l as roleCanUseOperation, q as requiredSecretKeys, r as SYSTEMD_SERVICE_SETTINGS, u as OPERATIONS } from "./src-B2L79Nf9.mjs";
2
- import { a as errorExitCode, i as CliError, n as requestOperation, o as renderCliError, r as requestTokenEnrollment, s as escapeTerminalControls } from "./client-dHOLiNKd.mjs";
3
- import { a as memoryVerdictCache, c as loadClientConfig, d as resolveDaemonAddress, i as fileVerdictCache, l as loadEnrollmentConfig, n as cliPackageVersion, o as configFile, s as dataDirectory, t as checkCatalog, u as readConfiguredPort } from "./config-BsZv50VN.mjs";
1
+ import { F as ERRORS, J as SLACK_BOT_SCOPES, K as configSchema, l as roleCanUseOperation, q as requiredSecretKeys, r as SYSTEMD_SERVICE_SETTINGS, u as OPERATIONS } from "./src-CzmL-_Vf.mjs";
2
+ import { a as errorExitCode, i as CliError, n as requestOperation, o as renderCliError, r as requestTokenEnrollment, s as escapeTerminalControls } from "./client-t6dYFDI2.mjs";
3
+ import { a as memoryVerdictCache, c as loadClientConfig, d as resolveDaemonAddress, i as fileVerdictCache, l as loadEnrollmentConfig, n as cliPackageVersion, o as configFile, s as dataDirectory, t as checkCatalog, u as readConfiguredPort } from "./config-BTHOs3O3.mjs";
4
4
  import { createHash, randomBytes, randomUUID } from "node:crypto";
5
5
  import { accessSync, chmodSync, closeSync, constants, cpSync, existsSync, ftruncateSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync, writeSync } from "node:fs";
6
6
  import { homedir, hostname, userInfo } from "node:os";
@@ -1,4 +1,4 @@
1
- import { B as successEnvelopeSchema, F as ERRORS, L as errorContextSchema, R as errorEnvelopeSchema, p as renderJsonError } from "./src-B2L79Nf9.mjs";
1
+ import { B as successEnvelopeSchema, F as ERRORS, L as errorContextSchema, R as errorEnvelopeSchema, p as renderJsonError } from "./src-CzmL-_Vf.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { z } from "zod";
4
4
  import { request } from "node:http";
package/dist/client.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { n as requestOperation, r as requestTokenEnrollment, t as fetchCatalogVersion } from "./client-dHOLiNKd.mjs";
1
+ import { n as requestOperation, r as requestTokenEnrollment, t as fetchCatalogVersion } from "./client-t6dYFDI2.mjs";
2
2
  export { fetchCatalogVersion, requestOperation, requestTokenEnrollment };
@@ -1,5 +1,5 @@
1
- import { K as configSchema, c as buildCatalogSnapshot, u as OPERATIONS } from "./src-B2L79Nf9.mjs";
2
- import { i as CliError, t as fetchCatalogVersion } from "./client-dHOLiNKd.mjs";
1
+ import { K as configSchema, c as buildCatalogSnapshot, u as OPERATIONS } from "./src-CzmL-_Vf.mjs";
2
+ import { i as CliError, t as fetchCatalogVersion } from "./client-t6dYFDI2.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/daemon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { A as encodeActorId, B as successEnvelopeSchema, C as SESSION_HEALTH_STATES, D as sessionFactsSchema, E as prRefSchema, F as ERRORS, G as RESERVED_PROJECT, H as DEFAULT_LINK, I as err, J as SLACK_BOT_SCOPES, K as configSchema, M as parseActorId, N as parseRef$1, O as ticketFactsSchema, P as taskKeySchema, S as eventPayloadSchemas, T as prFactsSchema, W as DEFAULT_SLACK_COMMAND, _ as inboundEventSchema, a as batchSchema, b as userIdSchema, c as buildCatalogSnapshot, d as turnHandedSchema, f as renderHttpProblem, g as conversationRefSchema, h as SPACE_IDS, i as AdapterError, j as errorCodeOf, k as actorIdSchema, l as roleCanUseOperation, n as BOARD_TICK_MS, o as entityRefSchema, q as requiredSecretKeys, s as sourceCursorSchema, t as assertNever, u as OPERATIONS, v as interactionRefSchema, w as SESSION_STATUSES, x as EVENT_KINDS, y as messageRefSchema, z as ok } from "./src-B2L79Nf9.mjs";
1
+ import { A as encodeActorId, B as successEnvelopeSchema, C as SESSION_HEALTH_STATES, D as sessionFactsSchema, E as prRefSchema, F as ERRORS, G as RESERVED_PROJECT, H as DEFAULT_LINK, I as err, J as SLACK_BOT_SCOPES, K as configSchema, M as parseActorId, N as parseRef$1, O as ticketFactsSchema, P as taskKeySchema, S as eventPayloadSchemas, T as prFactsSchema, W as DEFAULT_SLACK_COMMAND, _ as inboundEventSchema, a as batchSchema, b as userIdSchema, c as buildCatalogSnapshot, d as turnHandedSchema, f as renderHttpProblem, g as conversationRefSchema, h as SPACE_IDS, i as AdapterError, j as errorCodeOf, k as actorIdSchema, l as roleCanUseOperation, n as BOARD_TICK_MS, o as entityRefSchema, q as requiredSecretKeys, s as sourceCursorSchema, t as assertNever, u as OPERATIONS, v as interactionRefSchema, w as SESSION_STATUSES, x as EVENT_KINDS, y as messageRefSchema, z as ok } from "./src-CzmL-_Vf.mjs";
2
2
  import { createRequire } from "node:module";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
4
  import { closeSync, existsSync, fstatSync, fsyncSync, ftruncateSync, linkSync, mkdirSync, openSync, readFileSync, readdirSync, renameSync, rmSync, statSync, writeSync } from "node:fs";
@@ -11810,6 +11810,8 @@ const EVENT_SUMMARIES = {
11810
11810
  link_removed: "Link removed",
11811
11811
  task_added: "Task added",
11812
11812
  task_archived: "Task archived",
11813
+ task_submitted: "Turn submitted",
11814
+ task_moved: "Task moved",
11813
11815
  block_opened: "Block opened",
11814
11816
  block_escalated: "Block escalated",
11815
11817
  block_unblocked: "Block unblocked",
@@ -12010,6 +12012,15 @@ function createTaskQueries(config) {
12010
12012
  //#endregion
12011
12013
  //#region ../core/src/app/registry.ts
12012
12014
  const catalog = await buildCatalogSnapshot(OPERATIONS);
12015
+ /** Catalog entry whose handler has not landed yet (#322): every call answers `not_implemented`. */
12016
+ function notImplemented(id) {
12017
+ const refuse = () => Promise.reject(new CommandError("not_implemented", `Operation ${id} is not available in this daemon build. Ask the operator to update the daemon.`));
12018
+ return {
12019
+ id,
12020
+ resolveTargets: refuse,
12021
+ run: refuse
12022
+ };
12023
+ }
12013
12024
  /** Concrete handlers shared by the daemon's HTTP and inbound transports. */
12014
12025
  function createOperationRegistry(deps) {
12015
12026
  const { config, clock, completeSince, gateways } = deps;
@@ -12091,7 +12102,9 @@ function createOperationRegistry(deps) {
12091
12102
  "comment.edit": blocks.edit,
12092
12103
  "inbox.ack": blocks.ack,
12093
12104
  "item.retry": items.retry,
12094
- "item.close": items.close
12105
+ "item.close": items.close,
12106
+ "task.submit": notImplemented("task.submit"),
12107
+ "task.return": notImplemented("task.return")
12095
12108
  };
12096
12109
  }
12097
12110
  //#endregion
package/dist/mcp.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { F as ERRORS, m as renderMcpError, u as OPERATIONS } from "./src-B2L79Nf9.mjs";
2
- import { i as CliError, n as requestOperation } from "./client-dHOLiNKd.mjs";
3
- import { a as memoryVerdictCache, c as loadClientConfig, r as compareCatalogs, t as checkCatalog } from "./config-BsZv50VN.mjs";
1
+ import { F as ERRORS, m as renderMcpError, u as OPERATIONS } from "./src-CzmL-_Vf.mjs";
2
+ import { i as CliError, n as requestOperation } from "./client-t6dYFDI2.mjs";
3
+ import { a as memoryVerdictCache, c as loadClientConfig, r as compareCatalogs, t as checkCatalog } from "./config-BTHOs3O3.mjs";
4
4
  import { randomUUID } from "node:crypto";
5
5
  import { readFileSync } from "node:fs";
6
6
  import { z } from "zod";
@@ -595,6 +595,34 @@ const ERRORS = {
595
595
  hint: "Read the latest comment revision, then acknowledge that revision.",
596
596
  recovery: noRetry("Read the latest comment revision before acknowledging it.")
597
597
  }),
598
+ turn_closed: spec("turn_closed", {
599
+ status: 409,
600
+ exit: EXIT_CODES.refused,
601
+ message: "The turn is closed: the task was submitted, moved or archived since.",
602
+ hint: "Read your open turns with `board inbox` and act only on a turn listed there.",
603
+ recovery: noRetry("Read your open turns and act only on a turn listed there.")
604
+ }),
605
+ not_turn_taker: spec("not_turn_taker", {
606
+ status: 409,
607
+ exit: EXIT_CODES.refused,
608
+ message: "This session has not taken the turn.",
609
+ hint: "Take the turn with `board inbox ack` first; only the session that took it can submit or return it.",
610
+ recovery: noRetry("Take the turn first; only the session that took it can submit or return it.")
611
+ }),
612
+ head_mismatch: spec("head_mismatch", {
613
+ status: 409,
614
+ exit: EXIT_CODES.refused,
615
+ message: "The commit is not the head of the task's pull request, or the task has none.",
616
+ hint: "Push the commit to the task's pull request branch and submit its head; if the task has none, ask the operator to link the pull request with `board link` first.",
617
+ recovery: noRetry("Push the commit to the task's pull request branch and submit its head; if the task has none, ask the operator to link the pull request first.")
618
+ }),
619
+ return_not_allowed: spec("return_not_allowed", {
620
+ status: 409,
621
+ exit: EXIT_CODES.refused,
622
+ message: "A task can be returned to Dev only from a column right of Dev.",
623
+ hint: "In Dev, ask with `board ask` instead.",
624
+ recovery: noRetry("In Dev, ask with a block instead of returning the task.")
625
+ }),
598
626
  task_archived: spec("task_archived", {
599
627
  status: 409,
600
628
  exit: EXIT_CODES.refused,
@@ -637,6 +665,13 @@ const ERRORS = {
637
665
  hint: "Wait until the daemon is ready, then retry the command with its existing idempotency key if it has one.",
638
666
  recovery: retry("Wait until the daemon is ready, then retry the command with its existing idempotency key if it has one.", "After the daemon is ready; wait briefly between retries.")
639
667
  }),
668
+ github_unavailable: spec("github_unavailable", {
669
+ status: 503,
670
+ exit: EXIT_CODES.notApplied,
671
+ message: "GitHub did not confirm the pull request head; nothing was applied.",
672
+ hint: "Wait until GitHub answers, then submit again.",
673
+ recovery: retry("Wait until GitHub answers, then submit again.", "After GitHub is reachable; wait briefly between retries.")
674
+ }),
640
675
  version_mismatch: spec("version_mismatch", {
641
676
  status: 409,
642
677
  exit: EXIT_CODES.notApplied,
@@ -959,7 +994,8 @@ const SESSION_HEALTH_STATES = [
959
994
  const at$2 = z.iso.datetime();
960
995
  const webUrl = z.url({ protocol: /^https?$/ });
961
996
  const login = z.string().min(1);
962
- const commitSha = z.string().regex(/^[0-9a-f]{40,64}$/, "Expected a full commit SHA");
997
+ /** A full lowercase commit SHA (SHA-1 or SHA-256). */
998
+ const commitShaSchema = z.string().regex(/^[0-9a-f]{40,64}$/, "Expected a full commit SHA");
963
999
  /** A pull request by repository and number. */
964
1000
  const prRefSchema = z.strictObject({
965
1001
  repo: repoSlugSchema.describe("Repository as owner/name."),
@@ -985,7 +1021,7 @@ const prFactsSchema = z.strictObject({
985
1021
  url: webUrl.describe("Web URL of the pull request."),
986
1022
  title: z.string().describe("Pull request title."),
987
1023
  author: login.describe("Login of the pull request author."),
988
- headSha: commitSha.describe("Commit SHA of the head of the pull request."),
1024
+ headSha: commitShaSchema.describe("Commit SHA of the head of the pull request."),
989
1025
  headBranch: z.string().min(1).describe("Branch name of the head of the pull request."),
990
1026
  state: z.enum(PR_STATES).describe("Whether the pull request is open, closed or merged."),
991
1027
  draft: z.boolean().describe("Whether the pull request is a draft."),
@@ -996,7 +1032,7 @@ const prFactsSchema = z.strictObject({
996
1032
  reviews: z.array(z.strictObject({
997
1033
  reviewer: login.describe("Login of the reviewer."),
998
1034
  state: z.enum(REVIEW_STATES).describe("State of the latest review by this reviewer."),
999
- commitSha: commitSha.describe("Commit the review was given on."),
1035
+ commitSha: commitShaSchema.describe("Commit the review was given on."),
1000
1036
  submittedAt: at$2.describe("When the review was submitted.")
1001
1037
  })).describe("The latest review of each reviewer, with the commit it was given on."),
1002
1038
  reviewThreads: z.array(z.strictObject({ resolved: z.boolean().describe("Whether the review thread is resolved.") })).describe("Review threads on the pull request."),
@@ -1078,6 +1114,8 @@ const EVENT_KINDS = [
1078
1114
  "link_removed",
1079
1115
  "task_added",
1080
1116
  "task_archived",
1117
+ "task_submitted",
1118
+ "task_moved",
1081
1119
  "block_opened",
1082
1120
  "block_escalated",
1083
1121
  "block_unblocked",
@@ -1187,6 +1225,17 @@ const eventPayloadSchemas = {
1187
1225
  ]),
1188
1226
  task_added: z.looseObject({ column: z.enum(COLUMN_IDS) }),
1189
1227
  task_archived: z.looseObject({ reason: z.enum(ARCHIVE_REASONS) }),
1228
+ task_submitted: z.looseObject({
1229
+ turn: S,
1230
+ column: z.enum(COLUMN_IDS),
1231
+ sha: S
1232
+ }),
1233
+ task_moved: z.looseObject({
1234
+ from: z.enum(COLUMN_IDS),
1235
+ to: z.enum(COLUMN_IDS),
1236
+ turn: S.optional(),
1237
+ block: S.optional()
1238
+ }),
1190
1239
  block_opened: z.looseObject({
1191
1240
  block: S,
1192
1241
  type: z.enum(BLOCK_TYPES),
@@ -1851,6 +1900,7 @@ const handedReview = {
1851
1900
  id: "PRR_kwDOA1",
1852
1901
  postedAt: at
1853
1902
  };
1903
+ const submittedSha = "9f2c4e1b7a3d5c8e0f1a2b3c4d5e6f708192a3b4";
1854
1904
  const item = {
1855
1905
  id: "I7",
1856
1906
  task: "PROJ-123",
@@ -2809,6 +2859,101 @@ const OPERATIONS = [
2809
2859
  } }
2810
2860
  }
2811
2861
  ]
2862
+ }),
2863
+ defineOperation({
2864
+ id: "task.submit",
2865
+ kind: "mutation",
2866
+ description: "Submit the commit at the head of the task's pull request for a turn this session took; the turn closes.",
2867
+ mcp: {
2868
+ whenToUse: "Hand in the work of a turn you took, at the pull request head.",
2869
+ whenNotToUse: "Use task_return to send the task back to Dev instead."
2870
+ },
2871
+ input: z.strictObject({
2872
+ turn: turnIdSchema,
2873
+ sha: commitShaSchema.describe("Full commit SHA at the head of the pull request, lowercase.")
2874
+ }),
2875
+ output: z.strictObject({
2876
+ task: taskViewSchema,
2877
+ turn: turnIdSchema,
2878
+ sha: commitShaSchema.describe("The submitted commit SHA.")
2879
+ }),
2880
+ grants: [{ grant: "task-worker" }, { grant: "column-orchestrator" }],
2881
+ errors: [
2882
+ "wrong_id_kind",
2883
+ "not_found",
2884
+ "task_archived",
2885
+ "turn_closed",
2886
+ "not_turn_taker",
2887
+ "head_mismatch",
2888
+ "github_unavailable"
2889
+ ],
2890
+ cli: {
2891
+ command: "submit",
2892
+ args: ["turn", "sha"]
2893
+ },
2894
+ slack: null,
2895
+ examples: [{
2896
+ summary: "Submit the pull request head for a review turn",
2897
+ input: {
2898
+ turn: "T4",
2899
+ sha: submittedSha
2900
+ },
2901
+ output: {
2902
+ task: {
2903
+ ...task,
2904
+ column: "review"
2905
+ },
2906
+ turn: "T4",
2907
+ sha: submittedSha
2908
+ }
2909
+ }]
2910
+ }),
2911
+ defineOperation({
2912
+ id: "task.return",
2913
+ kind: "mutation",
2914
+ description: "Return the task of a turn this session took to Dev, opening a code block on the worker with the reason.",
2915
+ mcp: {
2916
+ whenToUse: "Send the task back to Dev because the work needs code changes.",
2917
+ whenNotToUse: "Use task_submit to hand in the work instead."
2918
+ },
2919
+ input: z.strictObject({
2920
+ turn: turnIdSchema,
2921
+ reason: text("What the worker must change, sent to the worker as a code block.")
2922
+ }),
2923
+ output: z.strictObject({
2924
+ task: taskViewSchema,
2925
+ block: blockViewSchema
2926
+ }),
2927
+ grants: [{ grant: "task-worker" }, { grant: "column-orchestrator" }],
2928
+ errors: [
2929
+ "wrong_id_kind",
2930
+ "not_found",
2931
+ "task_archived",
2932
+ "turn_closed",
2933
+ "not_turn_taker",
2934
+ "return_not_allowed"
2935
+ ],
2936
+ cli: {
2937
+ command: "return",
2938
+ args: ["turn", "reason"]
2939
+ },
2940
+ slack: null,
2941
+ examples: [{
2942
+ summary: "Return a reviewed task to Dev",
2943
+ input: {
2944
+ turn: "T4",
2945
+ reason: "Handle the empty list in the parser."
2946
+ },
2947
+ output: {
2948
+ task,
2949
+ block: {
2950
+ ...codeBlock,
2951
+ id: "B14",
2952
+ author: "agent:rev/rev-1",
2953
+ reason: "Handle the empty list in the parser."
2954
+ }
2955
+ }
2956
+ }]
2812
2957
  })
2813
2958
  ];
2814
2959
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spur-board",
3
- "version": "0.36.1",
3
+ "version": "0.37.0",
4
4
  "license": "MIT",
5
5
  "engines": {
6
6
  "node": "^24.12.0 || ^26.0.0"
@@ -58,33 +58,37 @@ operation result or current state before retrying.
58
58
 
59
59
  ### Worker
60
60
 
61
- - `board status` — [details](references/commands.md#board-status)
62
- - `board task` — [details](references/commands.md#board-task)
63
- - `board task history` — [details](references/commands.md#board-task-history)
64
- - `board schema` — [details](references/commands.md#board-schema)
65
- - `board inbox` — [details](references/commands.md#board-inbox)
66
- - `board inbox ack` — [details](references/commands.md#board-inbox-ack)
67
- - `board ask` — [details](references/commands.md#board-ask)
68
- - `board comment` — [details](references/commands.md#board-comment)
69
- - `board comment edit` — [details](references/commands.md#board-comment-edit)
70
- - `board escalate` — [details](references/commands.md#board-escalate)
71
- - `board answer` — [details](references/commands.md#board-answer)
72
- - `board unblock` — [details](references/commands.md#board-unblock)
61
+ - [`board status`](references/commands.md#board-status)
62
+ - [`board task`](references/commands.md#board-task)
63
+ - [`board task history`](references/commands.md#board-task-history)
64
+ - [`board schema`](references/commands.md#board-schema)
65
+ - [`board inbox`](references/commands.md#board-inbox)
66
+ - [`board inbox ack`](references/commands.md#board-inbox-ack)
67
+ - [`board ask`](references/commands.md#board-ask)
68
+ - [`board comment`](references/commands.md#board-comment)
69
+ - [`board comment edit`](references/commands.md#board-comment-edit)
70
+ - [`board escalate`](references/commands.md#board-escalate)
71
+ - [`board answer`](references/commands.md#board-answer)
72
+ - [`board unblock`](references/commands.md#board-unblock)
73
+ - [`board submit`](references/commands.md#board-submit)
74
+ - [`board return`](references/commands.md#board-return)
73
75
 
74
76
  ### Orchestrator
75
77
 
76
- - `board status` — [details](references/commands.md#board-status)
77
- - `board task` — [details](references/commands.md#board-task)
78
- - `board task history` — [details](references/commands.md#board-task-history)
79
- - `board schema` — [details](references/commands.md#board-schema)
80
- - `board inbox` — [details](references/commands.md#board-inbox)
81
- - `board inbox ack` — [details](references/commands.md#board-inbox-ack)
82
- - `board ask` — [details](references/commands.md#board-ask)
83
- - `board comment` — [details](references/commands.md#board-comment)
84
- - `board comment edit` — [details](references/commands.md#board-comment-edit)
85
- - `board block` — [details](references/commands.md#board-block)
86
- - `board escalate` — [details](references/commands.md#board-escalate)
87
- - `board answer` — [details](references/commands.md#board-answer)
88
- - `board unblock` — [details](references/commands.md#board-unblock)
78
+ - [`board status`](references/commands.md#board-status)
79
+ - [`board task`](references/commands.md#board-task)
80
+ - [`board task history`](references/commands.md#board-task-history)
81
+ - [`board schema`](references/commands.md#board-schema)
82
+ - [`board inbox`](references/commands.md#board-inbox)
83
+ - [`board inbox ack`](references/commands.md#board-inbox-ack)
84
+ - [`board ask`](references/commands.md#board-ask)
85
+ - [`board comment`](references/commands.md#board-comment)
86
+ - [`board comment edit`](references/commands.md#board-comment-edit)
87
+ - [`board block`](references/commands.md#board-block)
88
+ - [`board escalate`](references/commands.md#board-escalate)
89
+ - [`board answer`](references/commands.md#board-answer)
90
+ - [`board unblock`](references/commands.md#board-unblock)
91
+ - [`board submit`](references/commands.md#board-submit)
92
+ - [`board return`](references/commands.md#board-return)
89
93
 
90
94
  <!-- END GENERATED BOARD COMMANDS -->
@@ -1,24 +1,6 @@
1
1
  # Board command reference
2
2
 
3
- Every command can return the common errors below. Each entry lists its other codes; find their hints here too.
4
-
5
- ## Errors every command can return
6
-
7
- - `usage`: Run `board schema` to see the expected input and fix the arguments.
8
- - `forbidden`: Check which role may run the operation in `board schema`, or ask the operator.
9
- - `not_implemented`: Ask the operator to update the daemon to a build with this operation.
10
- - `identity_unavailable`: Ask in your own session, then retry the same command later with its existing idempotency key if it has one.
11
- - `starting`: Wait until the daemon is ready, then retry the command with its existing idempotency key if it has one.
12
-
13
- ## Other error hints
14
-
15
- - `not_found`: Check the ID with `board status` or `board task <KEY>`.
16
- - `wrong_id_kind`: Pass the ID kind the operation expects, e.g. B<n> for a block or a task key for a task.
17
- - `stale_comment_revision`: Read the latest comment revision, then acknowledge that revision.
18
- - `idempotency_key_mismatch`: Use a new key for a new command, or repeat the earlier input with the same key.
19
- - `task_archived`: Ask an operator to add the task to the board again if work continues.
20
- - `block_not_open`: Read the task with `board task <KEY>` to see the current blocks.
21
- - `wrong_block_type`: Read the block type with `board task <KEY>` and use the operation for that type.
3
+ Every command can return the common errors in [errors.md](errors.md). Each entry lists its other codes; their hints are there too.
22
4
 
23
5
  ### `board status`
24
6
 
@@ -152,3 +134,23 @@ Avoid when: Use `board answer <block> <text>` for a question answer.
152
134
  Worker example: `board unblock B13 --done example/web#9 --key unblock-PROJ-123-fixing-build-1432` — Unblock after fixing the build.
153
135
  Orchestrator example: `board unblock B13 --reason "The build issue was resolved." --key unblock-PROJ-123-code-block-1432` — Explain why a code block no longer applies.
154
136
  Other errors: `wrong_id_kind`, `not_found`, `block_not_open`, `task_archived`, `idempotency_key_mismatch`.
137
+
138
+ ### `board submit`
139
+
140
+ Purpose: Submit the commit at the head of the task's pull request for a turn this session took; the turn closes.
141
+ Arguments: `<turn>`, `<sha>`.
142
+ Flags: `--key <key>`, `--json`.
143
+ Use when: Hand in the work of a turn you took, at the pull request head.
144
+ Avoid when: Use `board return <turn> <reason>` to send the task back to Dev instead.
145
+ Example: `board submit T4 9f2c4e1b7a3d5c8e0f1a2b3c4d5e6f708192a3b4 --key submit-PROJ-123-submit-pull-1432` — Submit the pull request head for a review turn.
146
+ Other errors: `wrong_id_kind`, `not_found`, `turn_closed`, `not_turn_taker`, `head_mismatch`, `task_archived`, `idempotency_key_mismatch`, `github_unavailable`.
147
+
148
+ ### `board return`
149
+
150
+ Purpose: Return the task of a turn this session took to Dev, opening a code block on the worker with the reason.
151
+ Arguments: `<turn>`, `<reason>`.
152
+ Flags: `--key <key>`, `--json`.
153
+ Use when: Send the task back to Dev because the work needs code changes.
154
+ Avoid when: Use `board submit <turn> <sha>` to hand in the work instead.
155
+ Example: `board return T4 "Handle the empty list in the parser." --key return-PROJ-123-return-reviewed-1432` — Return a reviewed task to Dev.
156
+ Other errors: `wrong_id_kind`, `not_found`, `turn_closed`, `not_turn_taker`, `return_not_allowed`, `task_archived`, `idempotency_key_mismatch`.
@@ -0,0 +1,24 @@
1
+ # Board error hints
2
+
3
+ ## Errors every command can return
4
+
5
+ - `usage`: Run `board schema` to see the expected input and fix the arguments.
6
+ - `forbidden`: Check which role may run the operation in `board schema`, or ask the operator.
7
+ - `not_implemented`: Ask the operator to update the daemon to a build with this operation.
8
+ - `identity_unavailable`: Ask in your own session, then retry the same command later with its existing idempotency key if it has one.
9
+ - `starting`: Wait until the daemon is ready, then retry the command with its existing idempotency key if it has one.
10
+
11
+ ## Other error hints
12
+
13
+ - `not_found`: Check the ID with `board status` or `board task <KEY>`.
14
+ - `wrong_id_kind`: Pass the ID kind the operation expects, e.g. B<n> for a block or a task key for a task.
15
+ - `stale_comment_revision`: Read the latest comment revision, then acknowledge that revision.
16
+ - `idempotency_key_mismatch`: Use a new key for a new command, or repeat the earlier input with the same key.
17
+ - `task_archived`: Ask an operator to add the task to the board again if work continues.
18
+ - `block_not_open`: Read the task with `board task <KEY>` to see the current blocks.
19
+ - `wrong_block_type`: Read the block type with `board task <KEY>` and use the operation for that type.
20
+ - `turn_closed`: Read your open turns with `board inbox` and act only on a turn listed there.
21
+ - `not_turn_taker`: Take the turn with `board inbox ack` first; only the session that took it can submit or return it.
22
+ - `head_mismatch`: Push the commit to the task's pull request branch and submit its head; if the task has none, ask the operator to link the pull request with `board link` first.
23
+ - `github_unavailable`: Wait until GitHub answers, then submit again.
24
+ - `return_not_allowed`: In Dev, ask with `board ask` instead.