@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
@@ -0,0 +1,348 @@
1
+ ---
2
+ title: Tasks
3
+ description: "Hand work to agents. A task is a thread with a state the board keeps: who may work it, who holds it, what it waits for, and how it ended."
4
+ ---
5
+
6
+ ## Hand work over
7
+
8
+ ```text
9
+ $ vb tasks create work "fix CVE-123 in acme/web" --label step=fix
10
+ 812
11
+ $ vb tasks create work "review the fix for CVE-123" --label step=review --needs 812
12
+ 814
13
+ $ vb tasks work/
14
+ #812 ready fix CVE-123 in acme/web step=fix
15
+ #814 waiting review the fix for CVE-123 step=review needs #812
16
+ ```
17
+
18
+ A task is a thread that someone's agents are to do. Its root says what, its
19
+ replies are the work log, and the board keeps its state. It's still a thread:
20
+ `read`, `tail`, labels, reactions, [watchers](./06-watchers.md), and sync work
21
+ on it as on any other.
22
+
23
+ - **`vb tasks create <channel> "<text>"`** starts a thread as a task. It takes
24
+ `--label`, `--text-file`, `--no-sync`, and `--idempotency-key` as `post`
25
+ does.
26
+ - **`vb tasks create <id>`** makes a task of a thread that's there, as it is:
27
+ an issue someone filed, a question from Slack. Its text stays its author's.
28
+ - **You own the tasks you make.** A task's owner, or anyone with `manage` in
29
+ its channel, assigns, holds, reopens, and cancels it.
30
+ - **Labels route work.** `--label step=fix` here is what `claim --ready
31
+ --label step=fix` asks for there.
32
+ - **`vb tasks [channel]`** lists open tasks, oldest first, the order a queue
33
+ works them in. `--state` narrows it to one state, or widens it to `all`.
34
+ `--label`, `--by`, and `--for` narrow it further. A page is 50 tasks, and a
35
+ full one prints the command that reads the next.
36
+
37
+ ## Work a task
38
+
39
+ ```text
40
+ $ export BOARD_PROFILE=claude
41
+ $ vb tasks claim --ready work/ --label step=fix --wait 10m
42
+ #812 yours for 15m fix CVE-123 in acme/web
43
+ $ vb reply 812 "patched, running the tests"
44
+ 818
45
+ $ vb tasks complete 812 "fixed in a1b2c3, tests pass"
46
+ completed 812
47
+ $ vb tasks work/ --state all
48
+ #812 completed fix CVE-123 in acme/web fixed in a1b2c3, tests pass
49
+ #814 ready review the fix for CVE-123 step=review
50
+ ```
51
+
52
+ - **An agent names its profile,** with `BOARD_PROFILE` or `--as`, and claims
53
+ as it: **claude via julian**. Without one, you claim as yourself. See
54
+ [Identity](./03-identity.md).
55
+ - **`vb tasks claim <id>`** holds a task. **`claim --ready <channel>`** holds
56
+ the oldest ready one there (`work`, or `work/` for everything under it) that
57
+ has every `--label`: one assigned to you first, then an unassigned one you
58
+ own.
59
+ - **`--from <id>` takes another owner's tasks too.** A task's text is
60
+ instructions for whoever claims it, so `--ready` takes only your own until
61
+ you name whose you take. Name each owner by ID (`vb actors` lists them). A
62
+ handle names no owner, since several can share one, and fails with
63
+ `invalid_from`.
64
+ - **`--wait 10m` holds until one is ready.** With none in time it exits 1 with
65
+ `reason: "timeout"`, as [`wait`](../04-reference/01-cli.md#wait) does.
66
+ Without `--wait`, nothing ready is `nothing_ready`, exit 1.
67
+ - **A claim is a lease.** `--lease` asks for `30s` to `1h`, and 15 minutes
68
+ when left out. A board gives up to its own cap, and the claim's line says
69
+ what it gave. `vb tasks renew <id>` extends it from now.
70
+ - **Settle it when you stop.** `complete <id> ["<result>"]` finishes it,
71
+ `fail <id> "<reason>"` gives up on it, and `release <id>` hands it back,
72
+ ready again.
73
+ - **Of claims that race, one lands.** The rest fail with `task_claimed`, and
74
+ the way out reads the task.
75
+
76
+ `vb read` shows the state under the root, with who holds it and for how long:
77
+
78
+ ```text
79
+ $ vb read 812
80
+ #812 julian · 1s [step=fix board.task=claimed]
81
+ fix CVE-123 in acme/web
82
+ task claimed by claude via julian · 15m left
83
+ ↳ #818 claude via julian · 0s
84
+ patched, running the tests
85
+ ```
86
+
87
+ ## States
88
+
89
+ | State | Means |
90
+ | --- | --- |
91
+ | `waiting` | a task it needs hasn't completed |
92
+ | `ready` | it can be claimed |
93
+ | `claimed` | an agent holds it until its lease ends |
94
+ | `blocked` | held for a person |
95
+ | `completed` | done, with its result |
96
+ | `failed` | given up on, with why. `vb tasks reopen <id>` makes it ready again |
97
+ | `canceled` | called off by its owner, with why |
98
+
99
+ - **The state is a label too:** `board.task` on the root. `vb read work --label
100
+ board.task=ready` lists ready tasks, `vb wait work/ --label board.task=ready`
101
+ wakes on one, and a watcher's `tail` filters on it.
102
+ - **Labels under `board.` are the board's own.** Setting one by hand fails
103
+ with `reserved_label`, and the error names the command that makes the
104
+ change:
105
+
106
+ ```text
107
+ $ vb label 832 board.task=completed
108
+ error: Can't label #832. Labels under board. are the board's own.
109
+ board.task is the board's own label: only its task writes set labels under board.
110
+
111
+ Complete it, with the claim you hold:
112
+ vb tasks complete 832
113
+ ```
114
+ - **`vb tail` prints what happens to a task,** each change a line:
115
+
116
+ ```text
117
+ $ vb tail work
118
+ #828 work julian: rotate the deploy keys
119
+ #828 work task created by julian
120
+ #828 work task claimed by claude via julian
121
+ #828 work task canceled by julian · superseded by the nightly rotation
122
+ ```
123
+
124
+ ## The claim stays with who took it
125
+
126
+ A claim answers an `epoch` and a `token` once, and every write the claim makes
127
+ carries both. The CLI keeps them, so `renew`, `release`, `complete`, `fail`,
128
+ and `block` take only the task's ID.
129
+
130
+ - **They're in `~/.config/board/claims/`,** or under `XDG_CONFIG_HOME`: one
131
+ file per board, task, and profile, that only you can read. The token prints
132
+ nowhere, `--json` included.
133
+ - **The profile is the one the run writes as:** `--as`'s, or
134
+ `BOARD_PROFILE`'s, or none as yourself. `--as Claude` and
135
+ `BOARD_PROFILE=claude` are one profile, as they are one actor.
136
+ - **A run as anyone else holds no claim.** A task claimed as `claude` is
137
+ settled as `claude`. As yourself, or as another profile, it fails with
138
+ `claim_not_held`:
139
+
140
+ ```text
141
+ $ vb tasks complete 814 "looks good"
142
+ error: You hold no claim on task #814 as yourself.
143
+
144
+ Claim it:
145
+ vb tasks claim 814
146
+ ```
147
+ - **The board fences what a claim does.** Each claim raises the task's epoch.
148
+ A write from a claim that's over, because its lease ran out or the task was
149
+ released, held, or canceled, fails with `claim_lost` and changes nothing. An
150
+ agent that stalls past its lease can't settle a task another has taken. The
151
+ CLI forgets a claim it's told is lost:
152
+
153
+ ```text
154
+ $ vb tasks complete 828 rotated
155
+ error: Lost the claim on task #828. Its lease ran out, or the task moved on.
156
+ this claim on #828 is over: claim it again
157
+
158
+ See where it stands:
159
+ vb read 828
160
+ Or claim it again:
161
+ vb tasks claim 828
162
+ ```
163
+
164
+ ## Run a command as the work
165
+
166
+ ```text
167
+ $ vb tasks run 841 --result "tests pass" -- sh -c 'echo "testing for task $BOARD_TASK"'
168
+ testing for task 841
169
+ completed 841
170
+ ```
171
+
172
+ `vb tasks run <id> -- <cmd>` claims the task, runs the command, and settles
173
+ the task by how the command exits. `run --ready <channel>` takes the next
174
+ ready one, with `--label`, `--from`, and `--wait` as `claim` takes them.
175
+
176
+ - **The command gets `BOARD_TASK`,** the task's ID, so `vb reply
177
+ "$BOARD_TASK" "…"` logs from inside it.
178
+ - **Exit 0 completes the task,** with `--result "<text>"` as its result. Any
179
+ other exit fails it, with `exited <code>` or `killed by <signal>` as the
180
+ reason. `run` exits with the command's code.
181
+ - **It renews the claim while the command runs,** at a third of the lease.
182
+ - **Ctrl-C releases the task** and exits 130. A supervisor's SIGTERM
183
+ releases it too, and exits 143.
184
+ - **A lost claim stops the command.** When a renewal fails with `claim_lost`,
185
+ `run` stops the command and exits 1.
186
+ - **A command that can't start** releases the task, and `run` exits 1.
187
+
188
+ ## Dependencies
189
+
190
+ `--needs <id>`, repeated for several, makes a task wait until each of them has
191
+ completed.
192
+
193
+ - **A prerequisite is any task you can read,** in any channel, whoever owns
194
+ it. Anything else fails with `invalid_needs`.
195
+ - **Completing a task readies what waited only for it.**
196
+ - **A failed or canceled prerequisite readies nothing.** `vb tasks reopen
197
+ <id>` retries a failed task in place, and its dependents keep waiting for
198
+ it.
199
+ - **What a task waits for can change.** `vb tasks needs <id> <id>...` names
200
+ the tasks it waits for now, in place of what it waited for, and `--none`
201
+ makes it wait for nothing. It's its owner's to change, while no one holds
202
+ the task and it isn't finished.
203
+
204
+ ```text
205
+ $ vb tasks needs 814 812 813
206
+ 814 needs #812 #813
207
+ $ vb tasks needs 814 --none
208
+ 814 needs nothing
209
+ ```
210
+
211
+ ## A plan of tasks
212
+
213
+ ```json plan.json
214
+ [
215
+ { "key": "fix", "text": "fix CVE-123 in acme/web", "labels": { "step": "fix" } },
216
+ { "key": "review", "text": "review the fix for CVE-123", "labels": { "step": "review" }, "needs": [{ "key": "fix" }] },
217
+ { "text": "ship it", "needs": [{ "key": "review" }, { "key": "fix" }], "for": "shipper" }
218
+ ]
219
+ ```
220
+
221
+ ```bash
222
+ vb tasks create work --tasks-file plan.json --idempotency-key cve-123
223
+ ```
224
+
225
+ ```text
226
+ #2 ready fix CVE-123 in acme/web step=fix
227
+ #4 waiting review the fix for CVE-123 step=review needs #2
228
+ #6 waiting ship it needs #4 #2
229
+ ```
230
+
231
+ - **A plan is a JSON array of tasks,** from a file, or from stdin for `-`.
232
+ Each is `{ key?, text, labels?, needs?, for?, noSync?, attachments? }`. Any
233
+ other key is refused before a task is made, so a `need` for `needs` can't
234
+ make a task that waits for nothing.
235
+ - **A task's `key` names it for the others of the plan.** `needs` takes
236
+ `{ "key": "fix" }` for a task of the plan, before it or after it, or an ID
237
+ for one that's there.
238
+ - **Up to 100 tasks are one write:** all of them or none, and none shows
239
+ before all have landed. A longer plan goes in several writes, each task
240
+ after the ones it waits for, so it isn't one: a ready task of an earlier
241
+ write can be claimed before a later one lands.
242
+ - **`--idempotency-key` names the plan.** The same key and file again make
243
+ nothing. A plan that stops midway says what it made, and the command that
244
+ makes the rest under the same key, once the file is fixed. What the key
245
+ made stays as it is, and a plan that finished takes no more tasks.
246
+ - **In code** it's `team.tasks.createMany` for one write and
247
+ `createTasksInChunks` for a plan of any length. See
248
+ [Several tasks at once](../04-reference/02-board.md#several-tasks-at-once).
249
+
250
+ ## Hold a task for a person
251
+
252
+ ```text
253
+ $ vb tasks block 814 "approve the prod deploy?" --kind awaiting_approval
254
+ blocked 814
255
+ $ vb read 814
256
+ #814 julian · 26s [step=review board.task=blocked]
257
+ review the fix for CVE-123
258
+ task blocked · awaiting_approval · approve the prod deploy? · needs #812
259
+ $ vb reply 814 "approved, go ahead"
260
+ 823
261
+ $ vb tasks unblock 814
262
+ unblocked 814
263
+ $ vb tasks unblock 814
264
+ 814 wasn't blocked
265
+ ```
266
+
267
+ - **`vb tasks block <id> "<reason>"`** holds a task until a person answers.
268
+ With the claim you hold, it ends the claim. With none, a task's owner holds
269
+ one that no one has claimed. `--kind` says what for, in words of your own:
270
+ `needs_input`, `awaiting_approval`.
271
+ - **The person answers in the task's thread,** which, synced, is where they
272
+ already are.
273
+ - **`vb tasks unblock <id>`** returns it to `ready`, or to `waiting` while a
274
+ task it needs hasn't completed. Its owner lifts the hold.
275
+
276
+ ## Whose task it is
277
+
278
+ ```text
279
+ $ vb tasks create work "deploy acme/web to production" --label step=deploy --for deployer
280
+ 832
281
+ $ vb tasks claim 832
282
+ error: Can't claim task #832. It's assigned to another profile.
283
+ #832 is assigned to local:user:julian+deployer
284
+
285
+ See whom it's for:
286
+ vb read 832
287
+ Or, as its owner, return it to the pool:
288
+ vb tasks assign 832 --pool
289
+ $ vb tasks assign 832 --pool
290
+ unassigned 832
291
+ ```
292
+
293
+ - **Its owner made it a task.** `block`, `unblock`, `reopen`, `assign`, and
294
+ `cancel` are for its owner, or anyone with `manage` in its channel. Anyone
295
+ else fails with `task_not_owned`.
296
+ - **A profile owns only the tasks it made.** `vb --as fixer` changes what
297
+ `fixer` made a task, and not what you or `--as triage` did. As yourself,
298
+ with no `--as`, you change what any of your profiles made.
299
+ - **Anyone who may `label` in its channel may claim it** by its ID. `claim
300
+ --ready` takes another owner's only with `--from`.
301
+ - **`--for <profile>` keeps a task for one of its owner's profiles:** on
302
+ `create`, or later with `vb tasks assign <id> <profile>`. Only that profile
303
+ claims it, even after a lease runs out, and its `claim --ready` takes what's
304
+ assigned to it first. `vb tasks assign <id> --pool` returns it to anyone who
305
+ may claim it.
306
+ - **`vb tasks cancel <id> "<reason>"`** calls a task off, and ends any claim.
307
+ - **Deleting a task's root cancels it,** unless it completed. **An edit of the
308
+ root by anyone but the task's owner holds it,** with kind `edited`: its
309
+ owner reads the new text, then unblocks or cancels it.
310
+
311
+ ## In code
312
+
313
+ ```ts worker.ts
314
+ import { board } from '@vercel/board'
315
+
316
+ const team = board()
317
+
318
+ const { task: fix } = await team.tasks.create('work', { text: 'fix CVE-123 in acme/web', labels: { step: 'fix' } })
319
+ await team.tasks.create('work', { text: 'review the fix for CVE-123', labels: { step: 'review' }, needs: [fix.id] })
320
+
321
+ const claim = await team.tasks.claim({ channel: 'work/', label: { step: 'fix' }, wait: 600 }) // null when none came
322
+ if (claim) {
323
+ await team.reply(claim.task.id, 'patched, running the tests')
324
+ await claim.complete('fixed in a1b2c3, tests pass')
325
+ }
326
+ ```
327
+
328
+ A claim in code holds its own `epoch` and `token`, and `team.tasks.held(id,
329
+ { epoch, token })` gives the same writes to a process that kept them. See
330
+ [`tasks`](../04-reference/02-board.md#tasks).
331
+
332
+ ## How it runs
333
+
334
+ - **The board that keeps the log keeps the tasks.** [`local()`](./10-local.md)
335
+ and `vb serve` keep them, with a timer in the process for each lease. A
336
+ lease that runs out makes its task claimable at once, whether or not the
337
+ timer has fired.
338
+ - **Vercel's board keeps them on its threads.** A claim there gets 5 minutes
339
+ at most, and `--ready` looks in 200 places at most, its channels times the
340
+ owners it takes from: past that it fails with `claim_too_wide`, and `vb`
341
+ says what to narrow. See [`tasks`](../04-reference/02-board.md#tasks) for
342
+ what else differs.
343
+ - **A board that keeps no tasks** fails every `tasks` command with 501
344
+ `no_tasks`, and `vb` says the board keeps none.
345
+ - **A synced copy doesn't follow a task's state yet.** Sync delivers label
346
+ changes, and a task's state changes through `task.*` events.
347
+ - **`vb()` keeps a handle's claims in memory,** and has no `tasks run`. See
348
+ [In-process, on a handle](../04-reference/01-cli.md#in-process-on-a-handle).
@@ -156,11 +156,10 @@ new since then: vb read firehose --after 6
156
156
  ```
157
157
 
158
158
  Each sync's Malte is an actor of its own, named only by that sync's imports. A
159
- mention resolves as each sync posts it, against its own users: support's Malte
160
- is `@support/malte`, `@malte` renders natively (`<@U0456>`) through the sync
161
- whose Malte it is, and a
162
- platform user named by actor only through the key they came through, and of a
163
- sync elsewhere's only through that sync; any other posts their name. Renaming a key changes its users' IDs. See
159
+ mention names one of them: support's Malte is `@support/malte`, stored as his
160
+ actor ID when it's written. It renders natively (`<@U0456>`) only through the
161
+ key he came through, and for a sync elsewhere's user only through that sync;
162
+ any other posts his name. Renaming a key changes its users' IDs. See
164
163
  [platform users](../01-board/03-identity.md#platform-users).
165
164
 
166
165
  ## Each project's keys
@@ -328,8 +328,8 @@ a platform user another sync speaks for. A text that opens a block (a code
328
328
  block, a list, a heading, a quote, or a table) goes on a line of its own under
329
329
  that label, where it's still one, and under yours when your renderer opens with
330
330
  the same label. board still adds a line per attachment the platform
331
- didn't take, and resolves mentions to the platform's own form after your
332
- renderer runs, against this sync's own users
331
+ didn't take, and puts each mention of one of this sync's own users in the
332
+ platform's own form after your renderer runs
333
333
  ([mentions](../01-board/03-identity.md#mentions)).
334
334
 
335
335
  Each channel can render its own way, since `render` wraps any function:
@@ -87,11 +87,14 @@ most once a minute, while the other channels sync.
87
87
 
88
88
  - **Messages, replies, edits, deletes, and reactions,** both ways. Slack's mrkdwn
89
89
  arrives as markdown, and the board's markdown posts back as Slack formatting.
90
- - **Mentions** go out as Slack's own. `<@U0456>` comes in as `@` and their
91
- display name. A board mention posts as `<@U0456>` when it's one of this
92
- sync's Slack users: `@ada` when exactly one of them goes by `ada` (of
93
- several, the one who wrote in the thread), and `@[slack:user:U0456]`. Anyone
94
- else's handle goes as written, and their actor ID as their name. A board
90
+ - **Mentions** sync both ways by the user's ID. `<@U0456>` comes in as a
91
+ mention of that user, `@[slack:user:U0456]` under key `slack`, and the board
92
+ meets them, by their Slack name, handle, and picture, though they never
93
+ wrote: a reply on the board can mention them back. A board mention,
94
+ `@[actor-id]`, posts as `<@U0456>` when the
95
+ actor is one of this sync's Slack users, and as their name for anyone else.
96
+ An `@handle` that was never settled is text, and goes as written: Slack is
97
+ sent `@vercel/board` as that, and pings no one for it. A board
95
98
  message can mention someone by email, `@[ada@acme.com]`, which Slack looks
96
99
  up as it posts (it needs `users:read.email`), and posts as `ada@acme.com`
97
100
  when it finds no one. See
@@ -225,6 +225,14 @@ under the entry's key instead, so a provider under key `support` brings
225
225
  `support:user:7`, and `mention(actor)` gets them back with your prefix
226
226
  (`desk:user:7`). A user is the key's, and renaming a key changes its users' IDs.
227
227
 
228
+ **Mentions.** When a message mentions one of your users, write them in its
229
+ `text` as `@[desk:user:7]` and list them in the event's `mentioned`, each shaped
230
+ like an `author`, on a `message` or an `edited` event. The board names them
231
+ under the key as it does authors, and meets each one it hasn't seen, so people
232
+ can mention them back before they've written. Up to 50 a message are met;
233
+ every mention in the text is named under the key, and one the text doesn't
234
+ mention is left out.
235
+
228
236
  **Dedupe.** `dedupe` is the identity of one occurrence. A platform redelivering the
229
237
  same event must produce the same value, so the retry does nothing; a later
230
238
  identical action (a reaction added, removed, and added again) must produce a new
@@ -21,6 +21,10 @@ The inspector is the board's own UI. Every board has it, whoever mounted it,
21
21
  and nothing is hosted: it runs on your machine for as long as the command
22
22
  does.
23
23
 
24
+ The top of the sidebar says which board it is, and so does the tab's title. A
25
+ team's board in Vercel's API shows its name over its host. Any other board
26
+ shows its host over where it's mounted.
27
+
24
28
  | Flag | Does |
25
29
  | --- | --- |
26
30
  | `--port N` | Listens on that port. Without it, the inspector uses 4747, or any free port when 4747 is taken |
@@ -41,26 +45,76 @@ Everything you can do from the CLI, with the board laid out:
41
45
  (`?thread=812`), so a link opens the same view.
42
46
  - **Write.** Start threads with labels, reply, react from a picker, set and
43
47
  unset labels, and edit or delete your own messages. A toggle keeps a post on
44
- the board instead of syncing it.
48
+ the board instead of syncing it, and the clock
49
+ [sends it later](../01-board/07-schedules.md), once or on a repeat.
45
50
  - **Files.** Attach files, or paste them into the composer. Images and video
46
51
  show inline, in a fixed frame so loading one doesn't move the page; other
47
52
  files are chips that download.
53
+ - **Work tasks.** A root that's a [task](../04-reference/02-board.md#tasks)
54
+ wears one more line: its state, who holds it and how long is left, who it's
55
+ for, what it waits for, and how it ended. The Tasks view lists open tasks
56
+ oldest first, by state, channel, label, owner, and who they're for
57
+ (`/tasks?state=ready&channel=work/`). A thread's pane shows its task in
58
+ full, with what you can do to it now.
59
+ - **Read data.** A message's [blocks](../01-board/04-messages.md#data) show as
60
+ cards where their fences are: the schema's name and version, its fields, and
61
+ the JSON on demand.
48
62
  - **Switch who you are.** Post as yourself, as an agent's profile (claude,
49
63
  codex, grok), or as a profile you name ("reviewer"), with an avatar you give it (an https
50
64
  URL). The page remembers each profile's avatar. Your permissions don't
51
65
  change: a profile is always shown with you.
52
- - **Debug sync.** Each sync entry's raw inbox lists what the platform sent,
53
- newest first, as [`vb inbox`](../04-reference/01-cli.md) does.
66
+ - **Make a channel.** The plus beside the channel list makes one before
67
+ anything posts to it, private if you say so.
54
68
 
55
69
  Messages also show where they came from (Slack, GitHub, WhatsApp), links to
56
- platform messages quoted under them, and any platform a message didn't reach.
70
+ platform messages quoted under them, any platform a message didn't reach, and
71
+ whether a schedule sent them. A thread's pane lists where it's synced, with a
72
+ link to its copy on each platform, and what's scheduled to reply in it.
73
+
74
+ ## Tasks
75
+
76
+ What a task's pane offers depends on its state and on you:
77
+
78
+ | You | Can |
79
+ | --- | --- |
80
+ | Anyone with `label` there | Claim a ready task, or one whose lease ran out |
81
+ | Holding the claim, in this tab | Renew, release, complete with a result, fail with a reason, or block for a person |
82
+ | Its owner, or `manage` there | Block one no one holds, unblock, reopen a failed one, assign it to a profile or back to the pool, or cancel |
83
+
84
+ Start a thread as a task from the composer, with what it needs and who it's
85
+ for, or make any thread one from its pane.
86
+
87
+ > [!WARNING]
88
+ > A claim's token is a secret, so the page keeps it in the tab's memory and
89
+ > never in storage. Reloading the page gives the claim up: the task stays
90
+ > claimed until its lease runs out, and the pane says so.
91
+
92
+ The board decides every write. When it refuses one (someone else claimed the
93
+ task first, your claim ended), the page says what happened.
94
+
95
+ ## Settings
96
+
97
+ The gear at the foot of the sidebar opens the board's configuration, a tab
98
+ per section at `/settings/<section>`:
99
+
100
+ | Section | Shows |
101
+ | --- | --- |
102
+ | access | What you may do, the board's [grants](../01-board/09-access.md#grants), a form that makes one, and revoke. Explain asks the board which grants decide a channel, for you or for a principal you name, and shows its answer |
103
+ | schemas | The registry: each schema's versions, fields, and JSON Schema. Registers a version where you may |
104
+ | schedules | What's scheduled, when it next sends, and how often. Cancels one |
105
+ | watchers | The [watchers](../01-board/06-watchers.md#woken-by-the-board) boards elsewhere registered here, and what each tails |
106
+ | sync | Each sync entry's raw inbox: what the platform sent, newest first, as [`vb inbox`](../04-reference/01-cli.md) does |
57
107
 
58
108
  ## How it works
59
109
 
60
- The page is another board client: a handle from `board()`, as in the CLI,
61
- on a local proxy at `/board`. Its `fetch` sends the page's own credential, a
62
- token only this run's page has, and the proxy forwards the board's API with
63
- yours:
110
+ The page is another board client: a handle from `board()`, and every read and
111
+ write is a method on it (`team.messages`, `team.tasks.claim`, `team.explain`).
112
+ Nothing in the page calls the board's routes by hand, and the inspector has no
113
+ API of its own. In an app of yours the handle lives in server code, as
114
+ `const team = board()`; this page's server is the CLI on your machine, so its
115
+ handle is in the page and reaches the board through a local proxy at `/board`.
116
+ Its `fetch` sends the page's own credential, a token only this run's page has,
117
+ and the proxy forwards the board's API with yours:
64
118
 
65
119
  ```text
66
120
  browser ──▶ 127.0.0.1:4747/board/* ──▶ vb (adds your token) ──▶ https://team.example/api/board
@@ -69,7 +123,10 @@ browser ──▶ 127.0.0.1:4747/board/* ──▶ vb (adds your token) ──
69
123
  It loads each view's snapshot, then follows the board's event feed from that
70
124
  snapshot's cursor, a long-poll at a time. Every event carries its message as it is afterwards, so
71
125
  the page updates in place and navigates without fetching again. Your writes
72
- show at once and are confirmed by the stream.
126
+ show at once and are confirmed by the stream. Who you post as is
127
+ `team.as(profile)`, as in any code on a board.
128
+
129
+ [Build a UI](07-build-a-ui.md) shows these patterns with the page's own code.
73
130
 
74
131
  The page is a React bundle built into the package and served from
75
132
  `node:http`, so installing board installs no UI dependencies.
@@ -81,6 +138,11 @@ The proxy acts as you, so it answers no one but its own page:
81
138
  - **It listens on 127.0.0.1.** Nothing else on your network can reach it.
82
139
  - **It checks the `Host` header.** A request naming any other host gets a 421,
83
140
  so a web page can't reach the proxy through DNS rebinding.
141
+ - **Its own name is this machine's alone.** A request a proxy forwarded, one
142
+ with `X-Forwarded-For`, `X-Forwarded-Host`, `X-Forwarded-Proto`,
143
+ `Forwarded`, or `X-Real-IP`, gets a 421 unless it names a host you
144
+ [allowed](#behind-a-proxy): a caller behind a proxy can send `127.0.0.1` as
145
+ its `Host`.
84
146
  - **Every proxied request needs a per-run token** that only the page carries,
85
147
  and writes also need the page's `Origin`. Another tab, or another site,
86
148
  gets a 403.
@@ -105,6 +167,17 @@ proxy isn't on its scheme's default one (`box.local:8080`), and repeat the
105
167
  flag for more hosts. Whoever reaches the page there acts as you, so allow
106
168
  only a host only you, or people you trust with your access, can reach.
107
169
 
170
+ A forwarder that passes raw TCP adds no header to say a request came through
171
+ it. Whoever connects through one is on this machine, as far as the page can
172
+ tell, and acts as you with or without `--allow-host`.
173
+
174
+ [`vb serve`](../04-reference/01-cli.md#serve) serves the inspector on its
175
+ board's port, so one name reaches both: the page at the host's root, and the
176
+ board under it at `/api/board`. Behind `tailscale serve`, use
177
+ `vb serve --tailscale box.tailnet.ts.net` instead: the page there acts as
178
+ whoever Tailscale says opened it, not as you. See
179
+ [Share a local board on a tailnet](08-tailnet.md).
180
+
108
181
  ## Try writes safely
109
182
 
110
183
  The inspector writes to whichever board it points at, and a board's writes
@@ -118,6 +191,6 @@ vb inspect --url http://localhost:3000/api/board
118
191
 
119
192
  A board on `local()` keeps its log in SQLite under `.board/`, in the directory
120
193
  it runs in; see [Local boards](../01-board/10-local.md). `vb serve` runs a
121
- local board with no sync and opens the inspector on it. Sync
194
+ local board with no sync and serves the inspector beside it, on the same port. Sync
122
195
  config runs wherever the board runs, so a local board that mirrors Slack posts
123
196
  to Slack too.
@@ -30,8 +30,8 @@ export async function startFixer(thread: string) {
30
30
  const { url } = await team.discovery()
31
31
  const sandbox = await Sandbox.create({
32
32
  networkPolicy: await networkPolicy(),
33
- // vb needs a credential to send (VERCEL_TOKEN on Vercel's board, BOARD_TOKEN on a board at a URL); the policy replaces it on the way out.
34
- env: { BOARD_URL: url, VERCEL_TOKEN: 'set-by-the-network-policy' },
33
+ // vb needs a credential to send in BOARD_TOKEN; the policy replaces it on the way out.
34
+ env: { BOARD_URL: url, BOARD_TOKEN: 'set-by-the-network-policy' },
35
35
  })
36
36
  await sandbox.runCommand('npm', ['install', '-g', '@vercel/board'])
37
37
  await sandbox.runCommand('vb', ['reply', thread, 'looking into it'])
@@ -58,7 +58,8 @@ export async function refresh(sandbox: Sandbox) {
58
58
  - **The board's host, and its routes.** The board's routes under its URL's
59
59
  path, each by its method and shape (`GET /api/board/messages/:id`), or on
60
60
  Vercel's board, with its `teamId`, exactly the calls `vb` makes under
61
- `/v1/messageboard/boards/<id>` for what an agent does, get `authorization`,
61
+ `/v1/messageboard/boards/<id>` for what an agent does, and under
62
+ `/v2/messageboard/boards/<id>/tasks` for its tasks, get `authorization`,
62
63
  `x-board-profile`, and `x-board-can`. Nothing else under the board does:
63
64
  not changing or deleting the board itself, nor a route the API adds later.
64
65
  Anything else on that host is answered 403 by the sandbox's proxy, a path
@@ -79,8 +80,9 @@ export async function refresh(sandbox: Sandbox) {
79
80
  [Trusted Sources](../01-board/03-identity.md#every-request-carries-a-token).
80
81
  - **Only its own writes to change.** The sandbox writes as its profile, which
81
82
  its policy always sets, so it edits, deletes, and cancels the schedules of
82
- only what it wrote as that profile: not what the deployment wrote as another
83
- profile, or as itself. See
83
+ only what it wrote as that profile, and changes only the tasks it made: not
84
+ what the deployment wrote or made as another profile, or as itself. It
85
+ claims any task its `can` lets it, which is how it works a queue. See
84
86
  [Who edits what](../01-board/09-access.md#who-edits-what).
85
87
 
86
88
  The agent writes as a profile of this deployment's project: **fixer via www**,