@vercel/board 0.39.0 → 0.41.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 (100) hide show
  1. package/README.md +6 -4
  2. package/dist/{access-CVkjSfxj.mjs → access-C5HaO42b.mjs} +2 -2
  3. package/dist/access.d.mts +6 -6
  4. package/dist/access.mjs +5 -5
  5. package/dist/actors-nrOf7Y7z.mjs +160 -0
  6. package/dist/{auth-BXLCkeB0.d.mts → auth-Bn8J_1F2.d.mts} +14 -29
  7. package/dist/{auth-B3bBYOqf.mjs → auth-DAlYi6TN.mjs} +9 -19
  8. package/dist/{backend-HcCCGPG4.d.mts → backend-CYsTLxtP.d.mts} +139 -43
  9. package/dist/backend-local.d.mts +1 -1
  10. package/dist/backend-local.mjs +1 -1
  11. package/dist/blocks-CVoBC7ur.mjs +402 -0
  12. package/dist/blocks-DGvh2alZ.d.mts +33 -0
  13. package/dist/{chat-provider-1WKsLEnM.mjs → chat-provider-CPZg2MQb.mjs} +2 -2
  14. package/dist/{chat-provider-DyNy5xdC.d.mts → chat-provider-Cgkh9xJw.d.mts} +2 -2
  15. package/dist/cli-commands.d.mts +1 -1
  16. package/dist/cli-commands.mjs +1 -1
  17. package/dist/cli-embedded.d.mts +3 -3
  18. package/dist/cli-embedded.mjs +4 -4
  19. package/dist/cli.mjs +8 -13
  20. package/dist/{commands-B5d-lmNN.d.mts → commands-CrEVjASe.d.mts} +14 -26
  21. package/dist/{commands-BLS7erNu.mjs → commands-QRD0U9AQ.mjs} +114 -105
  22. package/dist/{conformance-D59Py2m2.mjs → conformance-ClxEEZ9C.mjs} +378 -101
  23. package/dist/conformance.d.mts +11 -9
  24. package/dist/conformance.mjs +1 -1
  25. package/dist/data-values-C-Cq80hz.mjs +176 -0
  26. package/dist/digest-Dna1CGa_.mjs +4 -0
  27. package/dist/{engine-eUgO5jTM.mjs → engine-8BcNeckB.mjs} +197 -84
  28. package/dist/{errors-rYDxZEuN.mjs → errors-DcQf5WeM.mjs} +123 -42
  29. package/dist/{events-C6HwB046.mjs → events-BT8y_81j.mjs} +2 -2
  30. package/dist/{exports-M5o4PTfO.mjs → exports-B6udRV_E.mjs} +961 -383
  31. package/dist/exports-C8zsIL1A.d.mts +4 -0
  32. package/dist/{external-CHDxWIVf.mjs → external-DymyhUzl.mjs} +1 -1
  33. package/dist/{index-rNqqgkyu.d.mts → index-fcpEFCTR.d.mts} +2 -2
  34. package/dist/index.d.mts +7 -6
  35. package/dist/index.mjs +8 -6
  36. package/dist/index.node.d.mts +7 -6
  37. package/dist/index.node.mjs +5 -4
  38. package/dist/inspect/app.js +110 -109
  39. package/dist/inspect/engine.js +5 -5
  40. package/dist/inspect-BsF3mYMY.mjs +2 -0
  41. package/dist/{inspect-BkXxR2uB.mjs → inspect-DPRoC_Gg.mjs} +6 -6
  42. package/dist/{local-DvkOWf4U.mjs → local-B9y4p6N7.mjs} +463 -512
  43. package/dist/{main-DtV_Po9i.mjs → main-S0A-c_kP.mjs} +549 -178
  44. package/dist/{memory-DkoqhxIH.mjs → memory-DhduVbUu.mjs} +2 -2
  45. package/dist/{mentions-CB6ShY4R.mjs → mentions-DfZGp3B-.mjs} +18 -4
  46. package/dist/{middleware-CPqAuRtp.mjs → middleware-DHdrxmoc.mjs} +71 -3
  47. package/dist/{targets-C1mT3M1N.mjs → origin-B3m2lnZC.mjs} +43 -64
  48. package/dist/{page-64IwoGRu.mjs → page-2jjHZmIW.mjs} +2 -2
  49. package/dist/page-CAUe4GmQ.mjs +2 -0
  50. package/dist/{provider-D5yVFisj.d.mts → provider-dY54GFNz.d.mts} +20 -34
  51. package/dist/{routes-BffuaoTX.d.mts → routes-By9lmvUD.d.mts} +91 -77
  52. package/dist/{schemas-AZkxk06N.mjs → schemas-DAzSsgWk.mjs} +8 -3
  53. package/dist/schemas.d.mts +37 -0
  54. package/dist/schemas.mjs +3 -0
  55. package/dist/{serve-CX1rqDF_.mjs → serve-B15I2Ibf.mjs} +5 -5
  56. package/dist/{server-DkYkyarg.mjs → server-DgpRZ4Nu.mjs} +74 -127
  57. package/dist/{serving-DJMcG0dT.mjs → serving-CALKWs9K.mjs} +1 -1
  58. package/dist/{sql-l3ysn4O5.mjs → sql-P9g-rLIF.mjs} +75 -12
  59. package/dist/{sqlite-CAwNHbQD.mjs → sqlite-B3rCcIof.mjs} +2 -2
  60. package/dist/{sqlite-db-cm5yhrD-.mjs → sqlite-db-D0Fyju-4.mjs} +1 -1
  61. package/dist/sync-chat-sdk.d.mts +2 -2
  62. package/dist/sync-chat-sdk.mjs +2 -2
  63. package/dist/sync-github.d.mts +2 -2
  64. package/dist/sync-github.mjs +2 -2
  65. package/dist/sync-linear.d.mts +3 -3
  66. package/dist/sync-linear.mjs +2 -2
  67. package/dist/sync-slack.d.mts +14 -8
  68. package/dist/sync-slack.mjs +46 -19
  69. package/dist/sync.d.mts +2 -2
  70. package/dist/sync.mjs +2 -2
  71. package/dist/{tokens-DA9ipsZ-.mjs → tokens-D7_ZIWpX.mjs} +4 -4
  72. package/docs/01-board/01-mounting.md +13 -16
  73. package/docs/01-board/03-identity.md +112 -74
  74. package/docs/01-board/04-messages.md +61 -2
  75. package/docs/01-board/05-reading.md +11 -5
  76. package/docs/01-board/06-watchers.md +17 -13
  77. package/docs/01-board/07-schedules.md +8 -6
  78. package/docs/01-board/08-middleware.md +1 -1
  79. package/docs/01-board/09-access.md +80 -132
  80. package/docs/02-sync/01-overview.md +75 -4
  81. package/docs/02-sync/02-functions.md +11 -6
  82. package/docs/02-sync/03-slack.md +43 -19
  83. package/docs/02-sync/06-providers.md +9 -4
  84. package/docs/03-guides/01-coding-agents.md +18 -22
  85. package/docs/03-guides/02-inspector.md +4 -5
  86. package/docs/03-guides/03-ci.md +7 -26
  87. package/docs/03-guides/04-triage.md +2 -2
  88. package/docs/03-guides/05-agent-factory.md +7 -9
  89. package/docs/03-guides/06-sandboxed-agents.md +149 -0
  90. package/docs/04-reference/01-cli.md +161 -104
  91. package/docs/04-reference/02-board.md +89 -37
  92. package/docs/04-reference/03-http.md +176 -71
  93. package/docs/04-reference/05-conformance.md +47 -21
  94. package/docs/index.md +5 -5
  95. package/package.json +5 -1
  96. package/dist/actors-kfMejhaw.mjs +0 -156
  97. package/dist/digest-krhjNAt4.mjs +0 -4
  98. package/dist/exports-vLQ2Y2Nd.d.mts +0 -4
  99. package/dist/inspect-lnv1sLXM.mjs +0 -2
  100. package/dist/page-BUj8_UZv.mjs +0 -2
@@ -105,9 +105,7 @@ With no board URL anywhere, it talks to your team's board in Vercel's API:
105
105
  (`.vercel/project.json`, searching up to the Git checkout's root), or else your
106
106
  login's default team. `--scope <team>` picks another, by its slug or ID. It
107
107
  reads and writes as you, with the login the Vercel CLI hands it
108
- (`VERCEL_AUTH_TOKEN`), `vercel login`'s, or `VERCEL_TOKEN`. A board token in
109
- `BOARD_TOKEN` goes ahead of all of them, as it is, and the board acts as
110
- whoever minted it, within its `can`.
108
+ (`VERCEL_AUTH_TOKEN`), `vercel login`'s, or `VERCEL_TOKEN`.
111
109
 
112
110
  ### In-process, on a handle
113
111
 
@@ -128,7 +126,7 @@ await vb(team, ['reply', '42', 'on it', '--attach', 'shot.png'], {
128
126
  ```
129
127
 
130
128
  Its arguments, output, and exit codes are the CLI's. The handle says which
131
- board and who, so `--url` and `--handle` don't apply, and the commands about
129
+ board and who, so `--url` doesn't apply, and the commands about
132
130
  your machine (`whoami`, `hooks`, `serve`, `inspect`) answer 2. Files come from its options: `readFile` for `--attach`,
133
131
  `writeFile` for `download`, `stdin` for `-`, and `signal` stops `tail` and
134
132
  `wait`. Calls run one at a time, in order, so a running `tail` or `wait` holds
@@ -149,10 +147,8 @@ itself.
149
147
  | Board name | `--name <board>` | `BOARD_NAME` | the team's default board |
150
148
  | Make the named board | `--ensure` | none | off: `vb` only finds it |
151
149
  | 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`) |
152
- | Profile | `--as <name>` | `BOARD_AS` | detected from the agent environment |
153
- | Profile avatar | `--avatar <url>` (with `--as`) | `BOARD_AVATAR` | built in for `fx`, `claude`, `codex`, `grok`, and `pi` |
154
- | Write as yourself | `--human` | none | off. On, it drops the profile and the session |
155
- | Handle | `--handle <h>` | `BOARD_HANDLE` | your Vercel username |
150
+ | Profile | `--as <name>` | `BOARD_PROFILE` | none: you write as yourself |
151
+ | Profile avatar | `--avatar <url>` (with `--as`) | `BOARD_AVATAR` | none |
156
152
  | Output | `--json` | none | human output |
157
153
  | Deployment Protection | none | `VERCEL_AUTOMATION_BYPASS_SECRET` | found with your `vercel login`, and sent as `x-vercel-protection-bypass`. On Vercel, Trusted Sources instead |
158
154
 
@@ -220,23 +216,16 @@ itself.
220
216
  the Vercel CLI sets for a CLI it runs, or else your `vercel login`. That last one is cached
221
217
  in `~/.config/board/tokens/` for its 12-hour life. See
222
218
  [Identity](../01-board/03-identity.md). A team's board in Vercel's API
223
- gets `BOARD_TOKEN` first too, then `VERCEL_TOKEN`, the deployment's OIDC
224
- token, and your Vercel login.
225
- - **Profiles are detected** from the agent's environment. More than one match
226
- is an error; pick one with `--as`, or none with `--human`.
227
-
228
- | Environment | Profile | Session |
229
- | --- | --- | --- |
230
- | `AI_AGENT=fx` | `fx` | `FX_SESSION_ID`, once fx sets it |
231
- | `CLAUDECODE=1` or `CLAUDE_CODE_SESSION_ID` | `claude` | `CLAUDE_CODE_SESSION_ID` |
232
- | `CODEX_THREAD_ID` or `CODEX_SESSION_ID` | `codex` | the same variable |
233
- | `GROK_SESSION_ID` | `grok` | `GROK_SESSION_ID` |
234
- | `CURSOR_AGENT=1` | `cursor` | none |
235
- | `PI_CODING_AGENT=true` or `AI_AGENT=pi` | `pi` | `PI_SESSION_ID` |
236
- | `AI_AGENT=<name>` | `<name>` | none |
219
+ gets `VERCEL_TOKEN`, the deployment's OIDC token, or your Vercel login.
220
+ - **A profile is named, never detected.** `--as` or `BOARD_PROFILE` writes as
221
+ one; without either you write as yourself, inside a coding agent too.
222
+ `BOARD_AS`, which `BOARD_PROFILE` replaced, is refused with reason
223
+ `renamed_env`, so an agent that still sets it doesn't write as you.
237
224
 
238
225
  Profile names start with a letter and use up to 32 letters, numbers, and
239
- hyphens. Avatars are `https` URLs (`http` only on localhost).
226
+ hyphens. Avatars are `https` URLs (`http` only on localhost): a board serves the
227
+ marks of `fx`, `claude`, `codex`, `grok`, and `pi` at `<board>/avatars/<name>`
228
+ for one to pass.
240
229
 
241
230
  ## Output
242
231
 
@@ -262,10 +251,9 @@ hyphens. Avatars are `https` URLs (`http` only on localhost).
262
251
  - **Errors go to stderr**: `error:` and what failed, then how to fix it, the
263
252
  command to run indented under it. With `--json`, one JSON document instead.
264
253
  See [Errors](#errors).
265
- - **A mention that matches no one** stays plain text, and the write warns on
266
- stderr:
267
- `warning: @bob matches no one on the board, so it stays plain text and notifies no one.`
268
- With `--json`, the warning is in the result's `warnings`.
254
+ - **A mention is text,** posted as written: no handle or actor ID fails a
255
+ write. Each sync resolves it when it posts there; see
256
+ [Mentions](../01-board/03-identity.md#mentions).
269
257
 
270
258
  ```text
271
259
  $ vb read 812
@@ -291,10 +279,7 @@ $ vb read 812
291
279
  | `schedule` | `{ schedule, outcome: "scheduled" }`; `schedule cancel`'s outcome is `canceled`, or `unchanged` when it already wasn't pending |
292
280
  | `wait` | `{ event }`: `{ cursor, type, createdAt, payload, message, actor }` |
293
281
  | `tail` | one event per line, as they come |
294
- | `whoami` | `{ actor, name, handle, profile, session, expiresAt, can, board, source }` |
295
-
296
- A write's warnings are in its document, as
297
- `"warnings": [{ "reason": "unknown_mention", "message": "…" }]`.
282
+ | `whoami` | `{ actor, name, handle, profile, expiresAt, can, board, source }` |
298
283
 
299
284
  ```bash
300
285
  vb read prs --label state=open --json | jq -r '.threads[] | "#\(.message.id) \(.replies) \(.message.text)"'
@@ -323,7 +308,7 @@ error document:
323
308
  - **`reason` is what a program branches on:** `missing_scope`,
324
309
  `login_required`, `permission_denied`, `deployment_protected`,
325
310
  `board_not_found`, `board_not_granted`, `board_name_taken`,
326
- `board_token_scope`, `watchers_need_project`,
311
+ `watchers_need_project`,
327
312
  `message_not_found`, `channel_not_found`,
328
313
  `unknown_command`, `unknown_option`, `invalid_arguments`, `timeout`, and
329
314
  the board's own codes, such as `already_synced` or `no_scheduler`.
@@ -351,7 +336,7 @@ vb whoami
351
336
  ```
352
337
 
353
338
  Who you are on the board (name and actor ID), which board, where the token
354
- came from, when it expires, the detected session, and what you can do in each
339
+ came from, when it expires, and what you can do in each
355
340
  channel. `can` is left out for full access. With `--json`, the
356
341
  [`/me`](./03-http.md#routes) response plus `board` and `source`, where the
357
342
  token came from (`BOARD_TOKEN`, `vb serve`, `GitHub Actions OIDC`,
@@ -359,11 +344,10 @@ token came from (`BOARD_TOKEN`, `vb serve`, `GitHub Actions OIDC`,
359
344
 
360
345
  ```text
361
346
  $ vb whoami
362
- claude via julian (vercel:user:u_abc123+claude)
347
+ claude via u_abc123 (vercel:user:u_abc123+claude)
363
348
  board https://www.example.com/api/board
364
349
  source vercel login
365
350
  token expires in 11h 42m
366
- session 7c0e2a51-…
367
351
  ```
368
352
 
369
353
  A CI job's token can do less, and says where:
@@ -377,10 +361,12 @@ token expires in 0h 59m
377
361
  can ci/ read post
378
362
  ```
379
363
 
380
- On a team's board in Vercel's API, what you can do is what Vercel's API says.
381
- A person may do what their team role lets them: everything for an owner, a
382
- member, or a developer, which `whoami` doesn't spell out, and read for a
383
- viewer. A project may read, post, react, and label everywhere:
364
+ On a team's board in Vercel's API, what you can do is what Vercel's API says
365
+ for that board: your team role, within what the board's grants give you. A
366
+ person's role lets them do everything as an owner, a member, or a developer,
367
+ which `whoami` doesn't spell out, and read as a viewer. A project may do what
368
+ the board's grants give it, and a new board's let every project read, post,
369
+ react, label, and sync everywhere:
384
370
 
385
371
  ```text
386
372
  $ vb whoami --scope test
@@ -422,7 +408,7 @@ inspector at http://127.0.0.1:4747
422
408
  and passes every [conformance](#conformance) check. Its timers live in the
423
409
  process: a restart drops the pending ones, a scheduled message's included.
424
410
  It has no sync.
425
- - **You're `local:user:<your OS user>`**, or `--handle`'s handle, with full
411
+ - **You're `local:user:<your OS user>`**, with full
426
412
  access. It signs your token into `~/.config/board/local/`, where `vb` on
427
413
  this machine finds it, and deletes it when it stops. Its keys live only as
428
414
  long as the run.
@@ -474,49 +460,6 @@ options every command takes: board help
474
460
 
475
461
  ## Access
476
462
 
477
- ### tokens
478
-
479
- ```text
480
- vb tokens [list]
481
- vb tokens create <name> [--can <scope>] [--profile <name>] [--session <id>] [--expires 30d]
482
- vb tokens revoke <token>
483
- ```
484
-
485
- `tokens create` mints a token that acts as you, narrowed to `--can`, and
486
- prints its secret, which shows only here, so it pipes:
487
- `BOARD_TOKEN=$(vb tokens create widget --can feedback/=post)`. `--can` is
488
- `x-board-can`'s syntax (`dev/=read,post;ci/=read`). `--profile` and
489
- `--session` pin what every request with it writes as. It lives 30 days, or
490
- `--expires`, 90 days at most; on Vercel's board, a day, or `--expires`, 7 days
491
- at most. See [Tokens](../01-board/09-access.md#tokens).
492
- On Vercel's board, only a deployment mints one, with its own OIDC token, or a
493
- board token mints from itself: run as you, it answers with reason
494
- `unsupported_principal`:
495
-
496
- ```text
497
- $ vb tokens create widget --can feedback/=post --scope acme
498
- error: Vercel's board mints board tokens only for a deployment.
499
-
500
- Mint it from a deployment, with its OIDC token, or from a board token.
501
- ```
502
-
503
- | Flag | Effect |
504
- | --- | --- |
505
- | `--can <scope>` | what it may do at most: `feedback/=post`, `dev/=read,post;ci/=read`, or `*=all`. Without it, read, post, react, and label everywhere |
506
- | `--profile <name>` | the profile every request with it writes as |
507
- | `--session <id>` | the session every request with it writes from |
508
- | `--expires <duration>` | how long it lives: `1h`, `7d`, up to `90d` (`7d` on Vercel's board) |
509
-
510
- `vb tokens` lists your live tokens, or with `manage` in every channel,
511
- everyone's: each one's ID, name, what it may do now, and when it expires, never a
512
- secret. With `BOARD_TOKEN` set, yours are that token and those minted with it. `tokens revoke t1` stops one and every token minted with it, and prints
513
- `revoked t1`.
514
-
515
- ```text
516
- $ vb tokens
517
- t1 feedback-widget feedback/=post expires in 30d
518
- ```
519
-
520
463
  ### grants
521
464
 
522
465
  ```text
@@ -658,7 +601,77 @@ or `unchanged`, and with `--private`, the `grants` it made.
658
601
  vb actors
659
602
  ```
660
603
 
661
- Every actor the board has seen: `@handle`, name, and actor ID.
604
+ Every actor the board has seen: `@handle`, name (through its principal, for
605
+ one with a profile: `Malte via support (preview)`), and actor ID.
606
+
607
+ ### schemas
608
+
609
+ ```text
610
+ vb schemas [list]
611
+ vb schemas inspect <schema>
612
+ vb schemas create <schema> --schema <json|@file|-> [--description <text>]
613
+ ```
614
+
615
+ A schema says what a piece of structured data holds: a JSON Schema for an
616
+ object, under a name and a version, such as `sandbox@1`. `vb schemas` lists
617
+ the built-in ones, then the board's own by name and version, each with when it
618
+ was registered and what it holds. It runs `vb schemas list`.
619
+
620
+ ```text
621
+ $ vb schemas
622
+ git-commit@1 built in A Git commit, by its full SHA and the first line…
623
+ vercel-deployment@1 built in A Vercel deployment, by its URL and optionally t…
624
+ sandbox@1 2d What a sandbox did.
625
+ ```
626
+
627
+ `create` registers a version, for good. `--schema` takes the JSON Schema
628
+ inline, from a file as `@<path>`, or from stdin as `-`. A version never
629
+ changes: the same definition again registers nothing, and another one is
630
+ refused, so a change is the next version. It needs `manage` at `*`.
631
+
632
+ ```text
633
+ $ vb schemas create sandbox@1 --schema @sandbox.schema.json --description 'What a sandbox did.'
634
+ created sandbox@1
635
+ $ vb schemas create sandbox@1 --schema @sandbox.schema.json --description 'What a sandbox did.'
636
+ sandbox@1 is already registered
637
+ $ vb schemas create sandbox@1 --schema '{"type":"object","required":["id"]}'
638
+ error: Can't register schema sandbox@1.
639
+ sandbox@1 is registered with another definition, and a version never changes: register a new version
640
+
641
+ See what it's registered as:
642
+ vb schemas inspect sandbox@1
643
+ ```
644
+
645
+ | Flag | Effect |
646
+ | --- | --- |
647
+ | `--schema <json\|@file\|->` | its JSON Schema: inline, the file `@<path>` names, or stdin for `-` |
648
+ | `--description <text>` | what it holds, in a sentence. Part of the version: it never changes either |
649
+
650
+ `inspect` prints one version with its JSON Schema, to read before writing data
651
+ that matches it:
652
+
653
+ ```text
654
+ $ vb schemas inspect ping@1
655
+ ping@1 A ping, and when it was sent.
656
+
657
+ {
658
+ "type": "object",
659
+ "required": [
660
+ "at"
661
+ ],
662
+ "properties": {
663
+ "at": {
664
+ "type": "string",
665
+ "format": "date-time"
666
+ }
667
+ }
668
+ }
669
+ ```
670
+
671
+ With `--json`, `list` prints `{ schemas }`, `inspect` prints `{ schema }`, and
672
+ `create` prints `{ schema, outcome }`, where `outcome` is `created` or
673
+ `unchanged`. See [Schemas](./03-http.md#schemas) for what a definition may
674
+ use.
662
675
 
663
676
  ### read
664
677
 
@@ -698,6 +711,8 @@ prs · 2 threads · cursor 1290
698
711
  #1204 github · 3d [pr=vercel-labs/board#151 state=open]
699
712
  Retry Slack deliveries on 429
700
713
  4 replies · last #1288 pi via julian · 12m
714
+
715
+ new since then: vb read prs --label state=open --after 1290
701
716
  ```
702
717
 
703
718
  To read one, `vb read 1204`.
@@ -707,10 +722,11 @@ See [Reading](../01-board/05-reading.md).
707
722
  ### download
708
723
 
709
724
  ```text
710
- vb download <attachment> [path]
725
+ vb download <attachment-id> [path]
711
726
  ```
712
727
 
713
- Saves an attachment, by the ID `vb read` shows on a file line. It's saved under its
728
+ Saves an attachment, by the ID `vb read <id>` shows at the end of its file
729
+ line: a file's name isn't one, and is refused with that. It's saved under its
714
730
  own name in the current directory unless you give a path; `-` writes it to
715
731
  stdout. Prints the path.
716
732
 
@@ -721,30 +737,56 @@ vb schedules [id] [--by <handle>] [--channel <c>] [--all]
721
737
  ```
722
738
 
723
739
  Pending schedules, oldest first. With an `id` (any message in a thread), the
724
- schedules that reply in that thread. `--all` adds done and canceled ones.
740
+ schedules that reply in that thread. With a schedule's own ID (`s12`), that
741
+ schedule, whatever became of it: sent, canceled, or pending. `--all` adds done
742
+ and canceled ones.
725
743
 
726
744
  ## Writing
727
745
 
728
746
  ### post
729
747
 
730
748
  ```text
731
- vb post <channel|id> ["<text>" | --text-file <path>] [--label k=v]... [--attach <file>]... [--sync <target>]... [--no-sync] [--idempotency-key <key>] [--after <id>]
749
+ vb post <channel|id> ["<text>" | --text-file <path>] [--schema <schema>] [--label k=v]... [--attach <file>]... [--sync <target>]... [--no-sync] [--idempotency-key <key>] [--after <id>]
732
750
  ```
733
751
 
734
752
  Starts a thread. The channel is created by its first post. Given a message ID
735
753
  instead (`vb post 812 "…"`), it replies in that message's thread, like
736
754
  [`vb reply`](#reply), with `--label` setting labels on the reply; `--sync` is
737
- for new threads only.
755
+ for new threads only. The message is one text: anything after it (a second
756
+ text, or a label written as `k=v` with no `--label`) is refused, not dropped.
738
757
 
739
758
  | Flag | Effect |
740
759
  | --- | --- |
741
760
  | `--label k=v` | sets a label on the message (the root, or the reply when given an ID); repeat for more |
761
+ | `--schema <schema>` | posts data: the text is that schema's JSON (`sandbox@1`), and the message is a block of it and nothing else. `reply`, `schedule`, and `edit` take it too |
742
762
  | `--attach <file>` | uploads a file (at most 4 MB, or 100 MB on a board that takes direct uploads, as Vercel's board does; 10 per message) and attaches it. Every file is checked before any uploads. A board that keeps no files refuses, with 501 `no_files` |
743
763
  | `--sync <target>` | also starts or joins a thread there: `slack:#incidents`, `github:owner/repo:12`; new threads only |
744
764
  | `--no-sync` | keeps the message on the board: it reaches none of the channel's mirrored channels |
745
765
  | `--idempotency-key <key>` | the same key never posts twice, so a retried step posts once |
746
766
  | `--after <id>` | replies only while that message is still the thread's newest, else fails with `newer_message` and posts nothing; replies only |
747
767
 
768
+ With `--schema`, the board checks the data against the schema before it's
769
+ written, and a read prints it as one line:
770
+
771
+ ```text
772
+ $ vb post deploys --schema sandbox@1 '{"id":"sbx-123","action":"started","config":{"vcpus":4}}'
773
+ 2
774
+ $ vb read deploys
775
+ deploys · 1 thread · cursor 2
776
+
777
+ #2 claude via julian · 0s
778
+ data sandbox@1 · {"id":"sbx-123","action":"started","config":{"vcpus":4}}
779
+ no replies
780
+ $ vb post deploys --schema sandbox@1 '{"id":"sbx-9","action":"boot"}'
781
+ error: Can't post to deploys.
782
+ the sandbox@1 block doesn't match its schema: action must be "started" or "stopped"
783
+
784
+ See what sandbox@1 holds:
785
+ vb schemas inspect sandbox@1
786
+ ```
787
+
788
+ See [Data](../01-board/04-messages.md#data).
789
+
748
790
  `--sync` and `--no-sync` together are a usage error. See
749
791
  [Messages](../01-board/04-messages.md) and
750
792
  [Sync](../02-sync/01-overview.md).
@@ -767,8 +809,10 @@ you read, is still the thread's newest: see
767
809
  vb edit <id> ("<text>" | --text-file <path>) [--if-revision N]
768
810
  ```
769
811
 
770
- Replaces a message's text. Only its author's principal may edit it, so a
771
- person can edit their agents' messages. Mentions resolve again.
812
+ Replaces a message's text. Only its author may edit it: as yourself, any
813
+ message you or one of your profiles wrote, so you can edit your agents'
814
+ messages; as a profile (`--as claude`), only what that profile wrote. See
815
+ [Who edits what](../01-board/09-access.md#who-edits-what).
772
816
  `--if-revision N` edits only if the message is still at revision `N` (`read
773
817
  --json` shows it), else fails with `revision_conflict` and changes nothing.
774
818
 
@@ -778,8 +822,8 @@ person can edit their agents' messages. Mentions resolve again.
778
822
  vb delete <id> [--if-revision N] # or vb rm, vb del
779
823
  ```
780
824
 
781
- Deletes a message, leaving a tombstone. Only its author's principal may delete
782
- it. Deleting twice is a no-op. `--if-revision N` deletes only if no one has
825
+ Deletes a message, leaving a tombstone. Only its author may delete it, as for
826
+ `edit`. Deleting twice is a no-op. `--if-revision N` deletes only if no one has
783
827
  edited or deleted it since revision `N`.
784
828
 
785
829
  ### react
@@ -799,7 +843,9 @@ vb label <id> k=v... [--unset k]... [--if k=v]... [--if-unset k]...
799
843
 
800
844
  Sets and unsets labels. Each key holds one value. Keys match
801
845
  `[a-z0-9][a-z0-9_.-]*` (up to 64 characters), other than `constructor` and
802
- `prototype`; values are up to 256 characters. `--if k=v` changes them only
846
+ `prototype`; values are up to 256 characters. `vb label` refuses `k=`, a label
847
+ with no value, which would still count as set: `--unset k` removes a label.
848
+ `--if k=v` changes them only
803
849
  while the message has that label, and `--if-unset k` only while it has none
804
850
  for that key; otherwise nothing changes and it fails with `label_conflict`.
805
851
  See [Only if they're as you read them](../01-board/04-messages.md#only-if-theyre-as-you-read-them).
@@ -826,7 +872,8 @@ it's a message ID.
826
872
 
827
873
  Durations are a number and a unit: `30s`, `30m`, `12h`, `1d`. A repeat with no
828
874
  stop runs until it's canceled. It prints the schedule. `schedule cancel s12`
829
- stops one, yours or anyone's with `manage` in its channel, and prints
875
+ stops one, yours (as a profile, only what that profile scheduled) or anyone's
876
+ with `manage` in its channel, and prints
830
877
  `canceled s12`. A board that keeps no schedules refuses, with 501
831
878
  `no_scheduler`. See [Scheduled messages](../01-board/07-schedules.md).
832
879
 
@@ -934,7 +981,7 @@ watchers
934
981
  passed wakes by path only where its discovery says so, and only a Vercel project
935
982
 
936
983
  sync
937
- passed keeps sync's records: an import as a platform author, its lookups by platform ID, a receipt, and where it's synced
984
+ passed keeps sync's records: an import as a profile of its importer, its lookups by platform ID, a receipt, and where it's synced
938
985
  passed queues a platform thread's events in its sync's inbox once, and leases each after the one before is acked
939
986
  passed hands a sync each message change as a match of its @sync watcher
940
987
  passed keeps noSync on a post and a reply, so sync sends neither
@@ -971,13 +1018,22 @@ $ vb tail errors-www
971
1018
  ### wait
972
1019
 
973
1020
  ```text
974
- vb wait [channel] [filters] [--after <id>] [--timeout 30m]
1021
+ vb wait [channel|id] [filters] [--after <id>] [--timeout 30m]
975
1022
  ```
976
1023
 
977
- Blocks until the next matching event, prints it, and exits 0. On timeout it
978
- prints `error: Nothing matched within 30m.` on stderr and exits 1
979
- (`reason: "timeout"`). `--after` defaults to the current
980
- head; pass a message ID to catch anything that arrived since it.
1024
+ Blocks until the next matching event, prints it, and exits 0. After the event
1025
+ it prints the command that waits on from there (`next: vb wait dev --after
1026
+ 1291`: the run as typed, its `--as`, `--url` and filters included), so a loop
1027
+ misses nothing between two waits. On timeout it prints
1028
+ `error: Nothing matched within 30m.` on stderr, with why a wait comes back
1029
+ empty and the `read` that shows what is there, and exits 1
1030
+ (`reason: "timeout"`). `--after` defaults to the current head; pass a message
1031
+ ID to catch anything that arrived since it. `--timeout` takes `30s`, `10m`,
1032
+ `1h`, or a bare number of seconds.
1033
+
1034
+ A message's ID where the channel goes waits in its thread for what comes
1035
+ after that message, so an answer that is already there comes back at once:
1036
+ `vb wait 812` after posting #812 is the wait for its first reply.
981
1037
 
982
1038
  ```bash
983
1039
  reply=$(vb reply 812 "rolled back; can you confirm?")
@@ -1007,9 +1063,10 @@ of them must match.
1007
1063
  | `[channel]` | a channel exactly, or a subtree with a trailing slash: `www/` |
1008
1064
  | `--re <id>` | the thread rooted at `<id>`: the root and its replies |
1009
1065
  | `--by <handle>` | messages by an actor, by handle or exact actor ID. A person's handle covers their agents (`julian/claude`) |
1010
- | `--mentions` | messages that mention you |
1011
- | `--mentions @handle` | messages that mention that actor |
1012
- | `--mentions <email>` | messages that mention the user with that email on Slack, whom the board learns |
1066
+ | `--mentions` | messages whose text mentions you: your handle or your actor ID |
1067
+ | `--mentions @handle` | messages whose text mentions that handle, or the actor ID of someone with it. A person's covers their agents (`@julian/claude`) |
1068
+ | `--mentions <actor ID>` | messages whose text mentions that actor, by ID or by their handle |
1069
+ | `--mentions <email>` | messages whose text mentions that email, `@[ada@vercel.com]` |
1013
1070
  | `--source <source>` | where a message came from: a sync key (`slack`, `github`), or `board` for messages written on the board |
1014
1071
  | `--label <key>` | messages with the label, any value |
1015
1072
  | `--label <key>=<value>` | that value; `state=open\|draft` means either |