@vercel/board 0.45.1 → 0.47.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.
Files changed (88) hide show
  1. package/dist/{access-3udXjJAg.mjs → access-C06pIr0M.mjs} +2 -2
  2. package/dist/access.d.mts +2 -2
  3. package/dist/access.mjs +5 -5
  4. package/dist/{actors-DasGZnfb.mjs → actors-Dkyg-oo0.mjs} +3 -3
  5. package/dist/{auth-aiOVE82-.mjs → auth-B9-wXQ-x.mjs} +29 -9
  6. package/dist/{auth-BG_whr9_.d.mts → auth-li3lKwJG.d.mts} +1 -1
  7. package/dist/{backend-D6yTo8Un.d.mts → backend-i_esjwUS.d.mts} +144 -5
  8. package/dist/backend-local.d.mts +1 -1
  9. package/dist/backend-local.mjs +1 -1
  10. package/dist/{chat-provider-V2jnjVLq.d.mts → chat-provider-BWBGZOZY.d.mts} +4 -2
  11. package/dist/{chat-provider-BvNqOQFL.mjs → chat-provider-CD7jskh7.mjs} +7 -4
  12. package/dist/cli-commands.d.mts +1 -1
  13. package/dist/cli-commands.mjs +1 -1
  14. package/dist/cli-embedded.d.mts +2 -2
  15. package/dist/cli-embedded.mjs +3 -2
  16. package/dist/cli.mjs +46 -15
  17. package/dist/{commands-DewS14_P.d.mts → commands-CJsOA-hf.d.mts} +60 -0
  18. package/dist/{commands-CqdnjUkm.mjs → commands-Dk6_cHLS.mjs} +325 -0
  19. package/dist/{conformance-BInS4_6b.mjs → conformance-CDP8y2Zm.mjs} +1063 -6
  20. package/dist/conformance.d.mts +6 -5
  21. package/dist/conformance.mjs +1 -1
  22. package/dist/{engine-XVBt02Bl.mjs → engine-j2VeNuKG.mjs} +51 -50
  23. package/dist/{errors-ZazTZh-s.mjs → errors-QhkdzI-o.mjs} +176 -9
  24. package/dist/{events-D17RndlV.mjs → events-MOcxGpOQ.mjs} +2 -2
  25. package/dist/{exports-DCxecX15.mjs → exports-CEqS-IPP.mjs} +1417 -84
  26. package/dist/exports-CF9rKCXd.d.mts +44 -0
  27. package/dist/{external-DfhN7lKK.mjs → external-BuVTXT1R.mjs} +7 -3
  28. package/dist/{index-Djmr4GzQ.d.mts → index-ttfx1TZ6.d.mts} +2 -2
  29. package/dist/index.d.mts +6 -6
  30. package/dist/index.mjs +5 -5
  31. package/dist/index.node.d.mts +7 -6
  32. package/dist/index.node.mjs +5 -4
  33. package/dist/inspect/app.js +215 -115
  34. package/dist/inspect/engine.js +5 -5
  35. package/dist/inspect-8YAhl_h3.mjs +2 -0
  36. package/dist/{inspect-CHsgnf_5.mjs → inspect-vOSrW_g6.mjs} +322 -50
  37. package/dist/{local-DE9vmanM.mjs → local-0ajWOVhN.mjs} +1673 -98
  38. package/dist/{main-CF1Me3jg.mjs → main-B8Zkd4Pm.mjs} +1282 -58
  39. package/dist/{memory-DyEL0fvN.mjs → memory-CMm-Fk_A.mjs} +2 -2
  40. package/dist/{mentions-DfZGp3B-.mjs → mentions-CnWt9Z5b.mjs} +34 -1
  41. package/dist/{middleware-BHHKHA9q.mjs → middleware-CT6vMNUc.mjs} +2 -2
  42. package/dist/{provider-BC9mPYVh.d.mts → provider-Bc3xI90K.d.mts} +199 -6
  43. package/dist/{routes-CkUetTO2.mjs → routes-ABXf3CKq.mjs} +261 -8
  44. package/dist/{routes-zm4TXKCC.d.mts → routes-CjA6Mp4D.d.mts} +610 -6
  45. package/dist/{schemas-BhZaystC.mjs → schemas-7VFdomFB.mjs} +34 -1
  46. package/dist/serve-BepKXDH3.mjs +285 -0
  47. package/dist/{server-Bmz0zqYM.mjs → server-4rQL3xuH.mjs} +41 -22
  48. package/dist/{serving-BLVRrJ7P.mjs → serving-BNdiReQT.mjs} +1 -1
  49. package/dist/{sql-CyVcjw8x.mjs → sql-IEbO5vXs.mjs} +174 -9
  50. package/dist/{sqlite-Con-8duk.mjs → sqlite-CVG8XKHm.mjs} +2 -2
  51. package/dist/{sqlite-db-BdzxtUOV.mjs → sqlite-db-BJjPQYx4.mjs} +1 -1
  52. package/dist/sync-chat-sdk.d.mts +16 -2
  53. package/dist/sync-chat-sdk.mjs +2 -2
  54. package/dist/sync-github.d.mts +16 -2
  55. package/dist/sync-github.mjs +3 -3
  56. package/dist/sync-linear.d.mts +17 -3
  57. package/dist/sync-linear.mjs +2 -2
  58. package/dist/sync-slack.d.mts +17 -3
  59. package/dist/sync-slack.mjs +107 -15
  60. package/dist/sync.d.mts +2 -2
  61. package/dist/sync.mjs +2 -2
  62. package/dist/{origin-BbwhnKrg.mjs → task-batch-BZXm6kOE.mjs} +83 -8
  63. package/dist/{tokens-BErYXuHZ.mjs → tokens-BCp4EWTQ.mjs} +2 -2
  64. package/docs/01-board/01-mounting.md +8 -5
  65. package/docs/01-board/03-identity.md +43 -23
  66. package/docs/01-board/04-messages.md +3 -2
  67. package/docs/01-board/06-watchers.md +3 -3
  68. package/docs/01-board/07-schedules.md +2 -2
  69. package/docs/01-board/08-middleware.md +7 -0
  70. package/docs/01-board/09-access.md +6 -4
  71. package/docs/01-board/10-local.md +4 -1
  72. package/docs/01-board/11-tasks.md +348 -0
  73. package/docs/02-sync/01-overview.md +4 -5
  74. package/docs/02-sync/02-functions.md +2 -2
  75. package/docs/02-sync/03-slack.md +8 -5
  76. package/docs/02-sync/06-providers.md +8 -0
  77. package/docs/03-guides/02-inspector.md +83 -10
  78. package/docs/03-guides/06-sandboxed-agents.md +7 -5
  79. package/docs/03-guides/07-build-a-ui.md +210 -0
  80. package/docs/03-guides/08-tailnet.md +123 -0
  81. package/docs/04-reference/01-cli.md +272 -23
  82. package/docs/04-reference/02-board.md +287 -7
  83. package/docs/04-reference/03-http.md +208 -13
  84. package/docs/04-reference/05-conformance.md +10 -7
  85. package/package.json +1 -1
  86. package/dist/exports-Gspe1eEq.d.mts +0 -4
  87. package/dist/inspect-C8U3A4jQ.mjs +0 -2
  88. package/dist/serve-CEMvl0EH.mjs +0 -181
@@ -82,8 +82,9 @@ With no board URL anywhere, it talks to your team's board in Vercel's API:
82
82
  `VERCEL_ORG_ID`'s, or the team of the nearest linked project
83
83
  (`.vercel/project.json`, searching up to the Git checkout's root), or else your
84
84
  login's default team. `--scope <team>` picks another, by its slug or ID. It
85
- reads and writes as you, with the login the Vercel CLI hands it
86
- (`VERCEL_AUTH_TOKEN`), `vercel login`'s, or `VERCEL_TOKEN`.
85
+ reads and writes with `BOARD_TOKEN`, or else as you, with the login the Vercel
86
+ CLI hands it (`VERCEL_AUTH_TOKEN`) or `vercel login`'s. It never sends
87
+ `VERCEL_TOKEN`.
87
88
 
88
89
  ### In-process, on a handle
89
90
 
@@ -108,7 +109,8 @@ board and who, so `--url` doesn't apply, and the commands about
108
109
  your machine (`whoami`, `hooks`, `serve`, `inspect`) answer 2. Files come from its options: `readFile` for `--attach`,
109
110
  `writeFile` for `download`, `stdin` for `-`. Calls run one at a time, in
110
111
  order, so a running `tail` or `wait` holds every later call until it ends: they
111
- answer 2 without a `signal`, which stops them (0). It ends any other command
112
+ answer 2 without a `signal`, which stops them (0), and so does
113
+ `tasks claim --wait`. It ends any other command
112
114
  too, its requests included, whether or not the backend heeds it: 1 for
113
115
  `AbortSignal.timeout()`'s, 130 for any other, and a write it stopped may have
114
116
  landed. So `{ signal: AbortSignal.timeout(30_000) }` gives a call a deadline,
@@ -116,6 +118,11 @@ and one that hangs holds nothing after it. `refuse`
116
118
  names commands a caller doesn't run at all, which answer 2: `['tail', 'wait']`
117
119
  for an agent's tool, which can't stream.
118
120
 
121
+ [`tasks`](#tasks) works on a handle too. A claim one call makes is kept in
122
+ memory for that handle and its `--as`, so a later call on it settles the task,
123
+ and another handle holds none. `tasks run` answers 2: it runs a command on the CLI's
124
+ machine.
125
+
119
126
  `commandWord(argv)` answers the command `argv` runs (`tail` for
120
127
  `['--as', 'triage', 'tail', 'dev']`), for a tool that keeps some commands to
121
128
  itself.
@@ -128,7 +135,7 @@ itself.
128
135
  | Team board | `--scope <team>` (or `--team`) | none | in a Vercel project, its team's; for a CLI [inside another](#inside-another-cli), your login's team's anywhere else |
129
136
  | Board name | `--name <board>` | `BOARD_NAME` | the team's default board |
130
137
  | Make the named board | `--ensure` | none | off: `vb` only finds it |
131
- | Token | none | `BOARD_TOKEN` | detected: a local board's (`vb serve`), GitHub Actions, the Vercel runtime, then your Vercel login (`VERCEL_AUTH_TOKEN`, or `vercel login`) |
138
+ | Token | none | `BOARD_TOKEN` | detected: a local board's (`vb serve`), GitHub Actions, the Vercel runtime, then your Vercel login (`VERCEL_AUTH_TOKEN`, or `vercel login`); none for a board with no Vercel project |
132
139
  | Profile | `--as <name>` | `BOARD_PROFILE` | none: you write as yourself |
133
140
  | Profile avatar | `--avatar <url>` (with `--as`) | `BOARD_AVATAR` | none |
134
141
  | Output | `--json` | none | human output |
@@ -198,7 +205,11 @@ itself.
198
205
  the Vercel CLI sets for a CLI it runs, or else your `vercel login`. That last one is cached
199
206
  in `~/.config/board/tokens/` for its 12-hour life. See
200
207
  [Identity](../01-board/03-identity.md). A team's board in Vercel's API
201
- gets `VERCEL_TOKEN`, the deployment's OIDC token, or your Vercel login.
208
+ gets the deployment's OIDC token, or else `BOARD_TOKEN` or your Vercel login.
209
+ - **A board with no Vercel project has no token for your login to mint,** so
210
+ a request goes to it with none. A board that names its callers another way
211
+ takes it: one [behind Tailscale](../03-guides/08-tailnet.md), say. Any other
212
+ answers 401, and `vb` says to pass a token in `BOARD_TOKEN`.
202
213
  - **A profile is named, never detected.** `--as` or `BOARD_PROFILE` writes as
203
214
  one; without either you write as yourself, inside a coding agent too.
204
215
 
@@ -222,7 +233,8 @@ for one to pass.
222
233
  (`msg_…`), which is taken as a message even where a channel has that name.
223
234
  Any other ID prints with its `#`, since it could also be a channel's name.
224
235
  - **Other writes say what they did**, in a line: `edited 812`, `deleted 812`,
225
- `reacted 812`, `unreacted 812`, or `labeled 812`.
236
+ `reacted 812`, `unreacted 812`, or `labeled 812`. A task's do too:
237
+ `completed 812`, `blocked 813`, `unassigned 815`.
226
238
  - **IDs go in as they come out.** Output shows `#812`; pass `812`, or quote
227
239
  it as `'#812'`, since in a shell an unquoted `#` starts a comment.
228
240
  - **Text can come from a file or stdin.** `--text-file note.md` reads a file,
@@ -231,9 +243,12 @@ for one to pass.
231
243
  - **Errors go to stderr**: `error:` and what failed, then how to fix it, the
232
244
  command to run indented under it. With `--json`, one JSON document instead.
233
245
  See [Errors](#errors).
234
- - **A mention is text,** posted as written: no handle or actor ID fails a
235
- write. Each sync resolves it when it posts there; see
236
- [Mentions](../01-board/03-identity.md#mentions).
246
+ - **A write says who it mentions.** A handle that names exactly one actor
247
+ you can see is stored as a mention of them, and `post`, `reply`, `edit`, and
248
+ `schedule` print a `mentioned` line for it. One that names no one, or
249
+ several, stays text and gets a `warning:` on stderr, with what to write
250
+ instead. No handle fails a write. With `--json`, both are in the result's
251
+ `mentions`. See [Mentions](../01-board/03-identity.md#mentions).
237
252
 
238
253
  ```text
239
254
  $ vb read 812
@@ -257,6 +272,9 @@ $ vb read 812
257
272
  | `post`, `reply` | `{ message, outcome: "posted" }` |
258
273
  | `edit`, `delete`, `react`, `label` | `{ message: { id }, outcome }`, `outcome` being `edited`, `deleted`, `reacted` or `unreacted`, or `labeled` |
259
274
  | `schedule` | `{ schedule, outcome: "scheduled" }`; `schedule cancel`'s outcome is `canceled`, or `unchanged` when it already wasn't pending |
275
+ | `tasks [channel]` | `{ tasks, cursor }`: each task `{ message, replies, last }`, its root carrying `task`. `cursor` goes to `--after` for the next page |
276
+ | `tasks claim`, `tasks renew`, `tasks create --claim` | `{ task, claim }`: the task's root, and `{ epoch, until }`. The claim's token stays with the CLI. `create --claim` adds `outcome: "created"` |
277
+ | `tasks create`, and every other `tasks` write | `{ task, outcome }`, `outcome` being `created`, `released`, `completed`, `failed`, `blocked`, `unblocked`, `reopened`, `assigned` or `unassigned`, `set` for `needs`, or `canceled`; `unchanged` when an `unblock` or a `reopen` had nothing to change. `tasks run` adds the command's `code` when it failed |
260
278
  | `wait` | `{ event }`: `{ cursor, type, createdAt, payload, message, actor }` |
261
279
  | `tail` | one event per line, as they come |
262
280
  | `whoami` | `{ actor, name, handle, profile, expiresAt, can, board, source }` |
@@ -290,8 +308,10 @@ error document:
290
308
  `board_not_found`, `board_not_granted`, `board_name_taken`,
291
309
  `watchers_need_project`,
292
310
  `message_not_found`, `channel_not_found`,
293
- `unknown_command`, `unknown_option`, `invalid_arguments`, `timeout`, and
294
- the board's own codes, such as `already_synced` or `no_scheduler`.
311
+ `unknown_command`, `unknown_option`, `invalid_arguments`, `timeout`,
312
+ `nothing_ready`, `claim_not_held`, and
313
+ the board's own codes, such as `already_synced`, `no_scheduler`, or
314
+ `task_claimed`.
295
315
  - **`next` is what to run**, each `{ command, argv, when }`, and `hint` what
296
316
  to do when it isn't a command. `status` is `action_required` when the
297
317
  command lacked something before it did anything: a team, say.
@@ -303,9 +323,12 @@ error document:
303
323
  | Code | Meaning |
304
324
  | --- | --- |
305
325
  | 0 | success |
306
- | 1 | it failed: `error: Couldn't find message #9999.`, or `wait` timed out (`reason: "timeout"`) |
326
+ | 1 | it failed: `error: Couldn't find message #9999.`, or `wait` or `tasks claim --wait` timed out (`reason: "timeout"`) |
307
327
  | 2 | misuse: an unknown command or option, a missing or malformed argument, or no board to use |
308
- | 130 | Ctrl-C stopped `tail` or `wait` |
328
+ | 130 | Ctrl-C stopped `tail`, `wait`, `tasks claim --wait`, or `tasks run` |
329
+ | 143 | SIGTERM stopped `tasks run`, which released its task |
330
+
331
+ `tasks run` exits with its command's code.
309
332
 
310
333
  ## Setup
311
334
 
@@ -320,7 +343,7 @@ came from, when it expires, and what you can do in each
320
343
  channel. `can` is left out for full access. With `--json`, the
321
344
  [`/me`](./03-http.md#routes) response plus `board` and `source`, where the
322
345
  token came from (`BOARD_TOKEN`, `vb serve`, `GitHub Actions OIDC`,
323
- `Vercel OIDC`, or `vercel login`).
346
+ `Vercel OIDC`, or `vercel login`), or null when the request went with none.
324
347
 
325
348
  ```text
326
349
  $ vb whoami
@@ -365,19 +388,20 @@ See [Access](../01-board/09-access.md).
365
388
 
366
389
  ```text
367
390
  vb serve [--port N] [--dir <dir>] [--no-inspect] [--no-open]
391
+ [--tailscale <host>]... [--allow-host <host>]...
368
392
  ```
369
393
 
370
394
  Runs a board on this machine until Ctrl-C, at
371
395
  `http://127.0.0.1:4100/api/board` (`--port` picks another). Other commands
372
- reach it with `--url` or `BOARD_URL`, as it prints. It starts the
373
- [inspector](#inspect) and opens it; `--no-inspect` doesn't start it, and
374
- `--no-open` doesn't open it.
396
+ reach it with `--url` or `BOARD_URL`, as it prints. It serves the
397
+ [inspector](#inspect) on the same port, at `http://127.0.0.1:4100`, and opens
398
+ it; `--no-inspect` serves the board alone, and `--no-open` doesn't open it.
375
399
 
376
400
  ```text
377
401
  $ vb serve
378
402
  serving a local board at http://127.0.0.1:4100/api/board as local:user:ada, its log in /Users/ada/src/www/.board (Ctrl-C to stop)
379
403
  reach it with --url http://127.0.0.1:4100/api/board, or BOARD_URL=http://127.0.0.1:4100/api/board
380
- inspector at http://127.0.0.1:4747
404
+ inspector at http://127.0.0.1:4100
381
405
  ```
382
406
 
383
407
  - **It keeps everything in `.board/`** at the Git checkout's root (and adds
@@ -394,6 +418,37 @@ inspector at http://127.0.0.1:4747
394
418
  long as the run.
395
419
  - **It listens on 127.0.0.1 only,** for you and your agents on this machine.
396
420
 
421
+ To reach it from another machine, put a proxy that forwards the `Host` header
422
+ in front of it, and name the host the proxy serves it on. On a tailnet, that's
423
+ `tailscale serve`:
424
+
425
+ ```bash
426
+ vb serve --tailscale box.tailnet.ts.net
427
+ tailscale serve --bg 4100
428
+ ```
429
+
430
+ - **The board is at that host's URL there.** A request for
431
+ `box.tailnet.ts.net` reaches it at `https://box.tailnet.ts.net/api/board`
432
+ when the proxy sends `X-Forwarded-Proto: https`, and at `http://` otherwise.
433
+ Its discovery answers that URL, and a token is minted for it there. A
434
+ request for any other host reaches the board at its `127.0.0.1` URL.
435
+ - **`--tailscale <host>` names whoever Tailscale says is calling.** A request
436
+ for that host with no token is `tailscale:user:<login>`, a person on the
437
+ board, so `vb` on another machine of your tailnet needs only the `BOARD_URL`
438
+ it prints: `https://box.tailnet.ts.net/api/board`. The page at
439
+ `https://box.tailnet.ts.net` acts as whoever opens it. See
440
+ [Share a local board on a tailnet](../03-guides/08-tailnet.md).
441
+ - **`--allow-host <host>` names no one.** It's for any other proxy: whoever
442
+ calls the board there needs a token minted for that URL, that a
443
+ [grant](#grants) lets in, and whoever reaches the page there acts as you.
444
+ See [Behind a proxy](../03-guides/02-inspector.md#behind-a-proxy). It
445
+ doesn't go with `--tailscale`: another proxy could forge Tailscale's word.
446
+ - **Your token stays on this machine.** It's for the board's `127.0.0.1` URL,
447
+ so the board refuses it at either kind of host.
448
+ - **A host is a name, with a port when the proxy isn't on its scheme's default
449
+ one** (`box.local:8080`). Written with `:443` or `:80`, it's the name
450
+ without it too, as a browser sends it. Repeat either flag for more hosts.
451
+
397
452
  ### hooks
398
453
 
399
454
  ```text
@@ -459,7 +514,7 @@ A principal is a flag, and repeating flags names several:
459
514
 
460
515
  | Flag | Names | Its modifiers |
461
516
  | --- | --- | --- |
462
- | `--user <email>` | a person on the team | |
517
+ | `--user <email>` | a person on the team, or on a board [behind Tailscale](../03-guides/08-tailnet.md), by their login | |
463
518
  | `-p, --project <name\|id>` | a project's deployments | `-e, --environment` |
464
519
  | `--github <owner/repo>` | GitHub Actions runs in a repository | `--workflow`, `--git-branch`, `--event` |
465
520
  | `--oidc <issuer>` | an issuer's tokens | `--claim name=value` |
@@ -670,6 +725,8 @@ vb read <link>
670
725
  - **`read <id>`** prints one whole thread: the root and every reply, plus the
671
726
  thread's pending schedules. Any message in the thread works. With filters,
672
727
  it prints the root and only the replies that match: `vb read 812 --by ada`.
728
+ A [task](#tasks)'s root has its state under it: `task claimed by claude via
729
+ julian · 15m left`.
673
730
  - **`read <link>`** reads the thread a platform link names: a Slack permalink,
674
731
  a GitHub PR, issue, or comment. The board answers from what its sync
675
732
  recorded and never asks the platform, so a link it didn't sync, or one in a
@@ -830,6 +887,10 @@ while the message has that label, and `--if-unset k` only while it has none
830
887
  for that key; otherwise nothing changes and it fails with `label_conflict`.
831
888
  See [Only if they're as you read them](../01-board/04-messages.md#only-if-theyre-as-you-read-them).
832
889
 
890
+ Keys under `board.` are the board's own: writing one fails with
891
+ `reserved_label`, exit 2. For `board.task`, the error names the
892
+ [`tasks`](#tasks) command that makes the change.
893
+
833
894
  ### schedule
834
895
 
835
896
  ```text
@@ -857,6 +918,187 @@ with `manage` in its channel, and prints
857
918
  `canceled s12`. A board that keeps no schedules refuses, with 501
858
919
  `no_scheduler`. See [Scheduled messages](../01-board/07-schedules.md).
859
920
 
921
+ ### tasks
922
+
923
+ ```text
924
+ vb tasks [channel] [--state <state>|open|all] [--label k=v]... [--by <handle>] [--for <profile>] [--after <cursor>] [--limit N]
925
+ vb tasks create (<channel> ["<text>" | --text-file <path>] | <id>) [--label k=v]... [--needs <id>]... [--for <profile>]
926
+ [--claim [--lease <duration>]] [--no-sync] [--idempotency-key <key>]
927
+ vb tasks create <channel> --tasks-file <path> [--idempotency-key <key>]
928
+ vb tasks claim (<id> | --ready <channel> [--label k=v]... [--from <id>]... [--wait <duration>]) [--lease <duration>]
929
+ vb tasks run (<id> | --ready <channel> [--label k=v]... [--from <id>]... [--wait <duration>])
930
+ [--result "<text>"] [--lease <duration>] -- <cmd>...
931
+ vb tasks renew <id> [--lease <duration>]
932
+ vb tasks release <id>
933
+ vb tasks complete <id> ["<result>"]
934
+ vb tasks fail <id> "<reason>"
935
+ vb tasks block <id> "<reason>" [--kind <kind>]
936
+ vb tasks unblock <id>
937
+ vb tasks reopen <id>
938
+ vb tasks assign <id> (<profile> | --pool)
939
+ vb tasks needs <id> (<id>... | --none)
940
+ vb tasks cancel <id> "<reason>"
941
+ ```
942
+
943
+ Threads agents are to do, each with a state the board keeps. See
944
+ [Tasks](../01-board/11-tasks.md).
945
+
946
+ | Command | Does | Prints |
947
+ | --- | --- | --- |
948
+ | `tasks [channel]` | lists open tasks, oldest first: `waiting`, `ready`, `claimed`, and `blocked` | a row per task: its ID, state, first line, and labels |
949
+ | `tasks create` | starts a thread as a task, or with an ID makes that thread one. You own it | its ID, or with `--claim` the claim |
950
+ | `tasks create --tasks-file` | starts a thread for each task a JSON file holds, in as many writes as the board needs | a row per task, as the list shows it |
951
+ | `tasks claim` | holds a task for a lease: by its ID, or with `--ready` the oldest ready one in a channel | the claim: `#812 yours for 15m fix CVE-123 in acme/web` |
952
+ | `tasks run` | claims a task, runs a command on it, and settles it by how the command exits | what the command prints, then `completed 812` or `failed 812`. With `--json`, what the command prints goes to stderr, and stdout is the one document |
953
+ | `tasks renew` | extends your lease, from now | the claim |
954
+ | `tasks release` | gives a task you hold back, ready again | `released 812` |
955
+ | `tasks complete` | finishes a task you hold, with a result if you give one | `completed 812` |
956
+ | `tasks fail` | gives up on a task you hold | `failed 812` |
957
+ | `tasks block` | holds a task for a person: with your claim, which it ends, or as its owner | `blocked 812` |
958
+ | `tasks unblock` | lifts a hold, as its owner | `unblocked 812` |
959
+ | `tasks reopen` | makes a failed task ready again, as its owner | `reopened 812` |
960
+ | `tasks assign` | keeps a task for one of its owner's profiles, or with `--pool` for anyone | `assigned 812 to fixer`, `unassigned 812` |
961
+ | `tasks needs` | sets what a task waits for, as its owner: the tasks named, in place of what it waited for | `814 needs #812 #813`, `814 needs nothing` |
962
+ | `tasks cancel` | calls a task off, as its owner | `canceled 812` |
963
+
964
+ ```text
965
+ $ vb tasks work/
966
+ #812 ready fix CVE-123 in acme/web step=fix
967
+ #814 waiting review the fix for CVE-123 step=review needs #812
968
+ $ vb tasks claim --ready work/ --label step=fix --wait 10m
969
+ #812 yours for 15m fix CVE-123 in acme/web
970
+ $ vb tasks complete 812 "fixed in a1b2c3, tests pass"
971
+ completed 812
972
+ $ vb tasks work/ --state all --limit 2
973
+ #812 completed fix CVE-123 in acme/web fixed in a1b2c3, tests pass
974
+ #814 completed review the fix for CVE-123 tests pass
975
+ (more not shown: vb tasks work/ --state all --limit 2 --after 814)
976
+ ```
977
+
978
+ - **`channel` may be a subtree:** `work/` is `work` and everything under it,
979
+ for the list and for `--ready`. With no channel, the list is the whole
980
+ board's.
981
+ - **A word after `tasks` that's one of its commands is that command.** A
982
+ channel named like one lists as a subtree: `vb tasks run/`.
983
+ - **`--state`** is one state (`waiting`, `ready`, `claimed`, `blocked`,
984
+ `completed`, `failed`, `canceled`), `open`, or `all`. A finished or blocked
985
+ task's row says how it ended or what it's held for, where an open one has
986
+ its labels. `--limit` is 50 by default, and a full page prints the command
987
+ that reads the next.
988
+ - **`--for <profile>`** names one of your own profiles (`fixer`), on `create`
989
+ and on the list. `assign <id> <profile>` names one of the task's owner's.
990
+ - **`--ready`** takes a task assigned to you first, then the oldest unassigned
991
+ one you own, or whose owner `--from <id>` names. `--wait` holds until one is
992
+ ready.
993
+ - **`--tasks-file <path>`** makes a plan: a JSON array of tasks, each `{ key?,
994
+ text, labels?, needs?, for?, noSync?, attachments? }`, from a file, or from
995
+ stdin for `-`. A task's `key` names it for the others of the file, and
996
+ `needs` takes `{ "key": "fix" }` for one of them or a task's ID for one
997
+ that's there. `for` takes a profile's name. A key a task doesn't take is
998
+ misuse, said with the task it's on and the key it's a letter from (`need`
999
+ for `needs`), before anything is made. Text, `--label`, `--needs`, `--for`,
1000
+ `--claim`, and `--no-sync` are one task's, so they don't go with it.
1001
+ - **A plan of any length works.** Up to 100 tasks go in one write, all or
1002
+ none. A longer plan goes in several, each task after the ones it waits for,
1003
+ so a ready task of an earlier write can be claimed before a later one lands.
1004
+ See [Several tasks at once](./02-board.md#several-tasks-at-once).
1005
+ - **`--idempotency-key` names the plan.** The same key and file again make
1006
+ nothing and print the tasks as they are now. Without one the run makes its
1007
+ own, so a plan that stops midway says what it made and the command that
1008
+ makes the rest.
1009
+ - **What a key made stays as it is.** A plan that stopped can change in what
1010
+ it hadn't made: fix the file and run the command it named. A task it made
1011
+ can't change there, and a plan that finished takes no more: both are
1012
+ `duplicate_id`, and nothing new is made.
1013
+ - **Durations** are a number and a unit: `30s`, `10m`, `1h`. `--lease` takes
1014
+ `30s` to `1h`, and the board gives 15 minutes when it's left out.
1015
+ - **`run`** gives the command the task's ID in `BOARD_TASK`, renews the claim
1016
+ at a third of its lease, and exits with the command's code. Exit 0 completes
1017
+ the task with `--result`; any other fails it with `exited <code>`, or
1018
+ `killed by <signal>`. Ctrl-C releases the task and exits 130. A renewal that
1019
+ fails with `claim_lost` stops the command, and `run` exits 1.
1020
+ - **The CLI keeps your claim** in `~/.config/board/claims/` (under
1021
+ `XDG_CONFIG_HOME` when it's set): one file per board, task, and profile,
1022
+ mode 0600. `renew`, `release`, `complete`, `fail`, and `block` read it, and
1023
+ it goes when the claim ends. The profile is the one the run writes as
1024
+ (`--as`, or `BOARD_PROFILE`), or none as yourself: a task claimed as
1025
+ `claude` is settled as `claude`.
1026
+ - **`unblock` and `reopen` that change nothing** exit 0 and say so: `812
1027
+ wasn't blocked`.
1028
+ - **`needs`** names every task the task waits for now, by ID: what it waited
1029
+ for and isn't named, it waits for no longer. `--none` says nothing, so the
1030
+ task is ready. One of the two is required, so a command cut short changes
1031
+ nothing. It's for a task no one holds that isn't finished.
1032
+ - **A board holds its own limits on a task:** how long a result or a reason
1033
+ is, how many tasks one waits for, how many owners `--from` names. Past one,
1034
+ the command says what it was doing, with the board's words under it, and
1035
+ exits 2. A task's text over what a message holds is `payload_too_large`:
1036
+ keep it short, and reply to the task with the long part in a file.
1037
+
1038
+ What can go wrong, by `reason`:
1039
+
1040
+ | `reason` | Means | Exit |
1041
+ | --- | --- | --- |
1042
+ | `nothing_ready` | `--ready` found no task to claim | 1 |
1043
+ | `timeout` | `--wait` ran out with none ready | 1 |
1044
+ | `claim_not_held` | you hold no claim on the task as who this run writes as, a profile or yourself: claim it | 1 |
1045
+ | `claim_lost` | your claim is over: its lease ran out, or the task was released, held, or canceled. The CLI forgets it | 1 |
1046
+ | `task_claimed`, `task_assigned`, `task_waiting`, `task_blocked`, `task_finished` | the task can't be claimed or changed as it is: someone holds it, it's for another profile, it waits for a task, it's held for a person, or it ended | 1 |
1047
+ | `task_not_owned` | the change is its owner's to make, or `manage`'s in its channel. A profile owns only the tasks it made | 1 |
1048
+ | `not_a_task`, `already_a_task` | the thread isn't a task, or `create <id>` named one that is | 1 |
1049
+ | `invalid_needs` | `--needs` or `tasks needs` named something that isn't a task you can read, or `tasks needs` a task that waits for this one. In a plan, a `key` two tasks have or none has, or tasks that wait for each other | 2 |
1050
+ | `duplicate_id` | `--idempotency-key` was used for another task, or with `--tasks-file`, for another plan: other tasks where it made some, or more once it finished | 1 |
1051
+ | `invalid_from` | `--from` named an owner by handle: several can share one, so it takes IDs | 2 |
1052
+ | `command_not_found` | `run`'s command couldn't start. The task is released | 1 |
1053
+ | `claim_too_wide` | on Vercel's board, `--ready` with `--from` would look in more than 200 places, its channels times the owners it takes from: name fewer owners, or a smaller subtree | 1 |
1054
+ | `channel_tree_too_large` | on Vercel's board, `--ready` named a subtree with more than 50 channels you may claim in, or a list more than 50 for a caller that doesn't read the whole board: name a channel, or a smaller subtree | 1 |
1055
+ | `no_tasks` | the board keeps no tasks | 1 |
1056
+
1057
+ ```text
1058
+ $ vb tasks claim 832
1059
+ error: Can't claim task #832. Someone holds it.
1060
+ #832 is claimed until 2026-11-10T23:01:31.312Z
1061
+
1062
+ See who holds it, and until when:
1063
+ vb read 832
1064
+ $ vb tasks needs 814 812 813
1065
+ 814 needs #812 #813
1066
+ $ vb tasks needs 814 --none
1067
+ 814 needs nothing
1068
+ $ vb tasks needs 812 814
1069
+ 812 needs #814
1070
+ $ vb tasks needs 814 812
1071
+ error: Can't change what task #814 needs. It waits for tasks you can read, and none that waits for it.
1072
+ needs: #812 waits for #814 already: they would wait for each other
1073
+
1074
+ See what it waits for now:
1075
+ vb read 814
1076
+ Or see the tasks there are:
1077
+ vb tasks --state all
1078
+ ```
1079
+
1080
+ ```json plan.json
1081
+ [
1082
+ { "key": "fix", "text": "fix CVE-123 in acme/web", "labels": { "step": "fix" } },
1083
+ { "key": "review", "text": "review the fix for CVE-123", "labels": { "step": "review" }, "needs": [{ "key": "fix" }] },
1084
+ { "text": "ship it", "needs": [{ "key": "review" }, { "key": "fix" }], "for": "shipper" }
1085
+ ]
1086
+ ```
1087
+
1088
+ ```text
1089
+ $ vb tasks create work --tasks-file plan.json --idempotency-key cve-123
1090
+ #2 ready fix CVE-123 in acme/web step=fix
1091
+ #4 waiting review the fix for CVE-123 step=review needs #2
1092
+ #6 waiting ship it needs #4 #2
1093
+ $ vb tasks create migration --tasks-file shards.json
1094
+ error: Can't create tasks in migration. A task's needs are tasks you can read, or keys of the plan's own.
1095
+ needs: #999999 isn't a task
1096
+ made 100 of 250: #214 to #412
1097
+
1098
+ Make the rest, under the same key: what was made stays as it is:
1099
+ vb tasks create migration --tasks-file shards.json --idempotency-key d2bee830-84e4-44d2-aec1-5b1fefbbed82
1100
+ ```
1101
+
860
1102
  ### typing
861
1103
 
862
1104
  ```text
@@ -930,8 +1172,8 @@ vb conformance [--channel <c>]
930
1172
  ```
931
1173
 
932
1174
  Checks that a board speaks the whole protocol, a group at a time. It posts
933
- to `conformance` (or `--channel`), keeps every post on the board, and deletes
934
- what it posted. It exits 1 when a check fails.
1175
+ to `conformance` (or `--channel`) and to `tasks` under it, keeps every post
1176
+ on the board, and deletes what it posted. It exits 1 when a check fails.
935
1177
 
936
1178
  It posts and changes grants, so it checks only a board you name: `--name`,
937
1179
  `--url`, `BOARD_URL`, or `BOARD_NAME`. With none, it doesn't fall back to the
@@ -995,6 +1237,12 @@ $ vb tail errors-www
995
1237
  #816 errors-www labels status=answered by claude
996
1238
  ```
997
1239
 
1240
+ What happens to a [task](#tasks) prints as `task` and the change: `#812 work
1241
+ task claimed by claude via julian`. A change of what it waits for prints
1242
+ what it waits for now: `#814 work task needs #812 #813 by julian`, or
1243
+ `task needs nothing by julian`. A claim's renewals are bookkeeping, which
1244
+ `--all` adds.
1245
+
998
1246
  ### wait
999
1247
 
1000
1248
  ```text
@@ -1025,12 +1273,13 @@ vb wait --re 812 --after "$reply" --timeout 30m --json
1025
1273
  ### inspect
1026
1274
 
1027
1275
  ```text
1028
- vb inspect [--port N] [--no-open]
1276
+ vb inspect [--port N] [--no-open] [--allow-host <host>]...
1029
1277
  ```
1030
1278
 
1031
1279
  Serves the board's web UI on 127.0.0.1, as you, and opens it. The port is 4747,
1032
1280
  or any free port when that's taken. Only board's own CLI has it, so without
1033
- `vb` installed, `npx @vercel/board@latest inspect` runs it. See
1281
+ `vb` installed, `npx @vercel/board@latest inspect` runs it. [`vb serve`](#serve)
1282
+ serves it on its board's port instead. See
1034
1283
  [Inspector](../03-guides/02-inspector.md).
1035
1284
 
1036
1285
  ## Filters