@vercel/board 0.57.0 → 0.58.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 (76) hide show
  1. package/README.md +1 -1
  2. package/dist/{access-CIj7v_Dr.mjs → access-D1AHzFSP.mjs} +1 -1
  3. package/dist/access.d.mts +2 -2
  4. package/dist/access.mjs +4 -4
  5. package/dist/{actors-DVDTqjm7.mjs → actors-CCth21rU.mjs} +2 -2
  6. package/dist/{auth-BDWGvFWl.mjs → auth-Cc5_pdi7.mjs} +2 -2
  7. package/dist/{auth-C0Mla9OU.d.mts → auth-DcWTzrHz.d.mts} +1 -1
  8. package/dist/{backend-BuqwQbb4.d.mts → backend-9H57DlQt.d.mts} +23 -5
  9. package/dist/backend-local.d.mts +1 -1
  10. package/dist/backend-local.mjs +1 -1
  11. package/dist/backend-postgres/blob-vercel.d.mts +1 -1
  12. package/dist/backend-postgres.d.mts +3 -3
  13. package/dist/backend-postgres.mjs +3 -3
  14. package/dist/{blob-DjS53D1A.d.mts → blob-CdLCZEPM.d.mts} +2 -2
  15. package/dist/{chat-provider-CpYdXEpI.d.mts → chat-provider-BiJ8G6KY.d.mts} +2 -2
  16. package/dist/cli-commands.d.mts +1 -1
  17. package/dist/cli-commands.mjs +1 -1
  18. package/dist/cli-embedded.d.mts +2 -2
  19. package/dist/cli-embedded.mjs +2 -2
  20. package/dist/cli.mjs +6 -6
  21. package/dist/{client-B0DGOt7P.d.mts → client-BUPyzzFt.d.mts} +13 -1
  22. package/dist/{commands-DLPIX7Jw.d.mts → commands-DryDbyWr.d.mts} +8 -3
  23. package/dist/{commands-7FY_8p92.mjs → commands-totPnoCC.mjs} +81 -23
  24. package/dist/{conformance-FiQ68adg.mjs → conformance-D9XutDay.mjs} +2 -2
  25. package/dist/conformance.d.mts +1 -1
  26. package/dist/conformance.mjs +1 -1
  27. package/dist/{engine-B_CjnE3G.mjs → engine-DVWbcEIB.mjs} +2 -2
  28. package/dist/{errors-BfMR39F0.mjs → errors-Ce_-E3_C.mjs} +210 -2
  29. package/dist/{errors-DBZtbfph.d.mts → errors-CwObkpSn.d.mts} +1 -1
  30. package/dist/{exports-BvJTIorX.d.mts → exports-Bh09j6Bd.d.mts} +5 -5
  31. package/dist/{exports-x-ioAfbp.mjs → exports-WtqjdQwb.mjs} +256 -57
  32. package/dist/{index-DuibwQf9.d.mts → index-mgNwCwJ4.d.mts} +2 -2
  33. package/dist/index.d.mts +7 -7
  34. package/dist/index.mjs +4 -4
  35. package/dist/index.node.d.mts +8 -8
  36. package/dist/index.node.mjs +4 -4
  37. package/dist/inspect/app.js +126 -146
  38. package/dist/inspect/engine.js +3 -3
  39. package/dist/inspect/sheet-presentation.js +1 -0
  40. package/dist/{inspect-BFnDSdsq.mjs → inspect-CtPZz0WG.mjs} +2 -2
  41. package/dist/inspect-wkA_8iyU.mjs +2 -0
  42. package/dist/inspect.d.mts +1 -1
  43. package/dist/inspect.mjs +1 -1
  44. package/dist/{local-Bt1-jA9A.mjs → local-B7Yp-B2z.mjs} +30 -8
  45. package/dist/{local-Gp8pqHSu.mjs → local-BPiDCkA4.mjs} +5 -5
  46. package/dist/{main-Du-mKQZn.mjs → main-BvkLqpUX.mjs} +223 -52
  47. package/dist/{memory-74hyK6eH.mjs → memory-BmsyKyHu.mjs} +1 -1
  48. package/dist/{middleware-bIABV895.mjs → middleware-DVBOEd8G.mjs} +2 -32
  49. package/dist/{provider-BNVyVKtH.d.mts → provider-BnK0Bif7.d.mts} +2 -2
  50. package/dist/{routes-CSnxZyyb.d.mts → routes-D5FtKOP_.d.mts} +87 -1
  51. package/dist/{serve-xOoxwq7T.mjs → serve-ChlJ955x.mjs} +6 -6
  52. package/dist/{server-BSexF7Bk.mjs → server-CRdVLqny.mjs} +25 -10
  53. package/dist/{serving-ByD4TOOU.mjs → serving-BVtrFzK4.mjs} +1 -1
  54. package/dist/{shell-0nWQEqh3.mjs → shell-hTUuAc6A.mjs} +11 -7
  55. package/dist/{sqlite-DtfrT_EP.mjs → sqlite-B9ZLSDUT.mjs} +1 -1
  56. package/dist/{sqlite-db-DSVlzQjv.mjs → sqlite-db-DawFxCk6.mjs} +20 -5
  57. package/dist/sync-chat-sdk.d.mts +2 -2
  58. package/dist/sync-github.d.mts +2 -2
  59. package/dist/sync-linear.d.mts +3 -3
  60. package/dist/sync-slack.d.mts +3 -3
  61. package/dist/sync.d.mts +2 -2
  62. package/dist/{task-batch-DgyfK9qx.mjs → task-batch-CnRhVsh6.mjs} +7 -4
  63. package/dist/{tokens-_1X8JNLT.mjs → tokens-XagdeYrv.mjs} +2 -2
  64. package/dist/{version-CZT5WmZs.mjs → version-rlZkE9nc.mjs} +1 -1
  65. package/docs/01-board/01-mounting.md +9 -0
  66. package/docs/01-board/05-reading.md +2 -1
  67. package/docs/01-board/09-access.md +8 -4
  68. package/docs/01-board/11-tasks.md +7 -2
  69. package/docs/01-board/12-postgres.md +3 -3
  70. package/docs/02-sync/01-overview.md +4 -0
  71. package/docs/02-sync/05-managed.md +117 -0
  72. package/docs/03-guides/02-inspector.md +1 -1
  73. package/docs/04-reference/01-cli.md +44 -2
  74. package/docs/04-reference/03-http.md +5 -0
  75. package/package.json +2 -2
  76. package/dist/inspect-BuNsu2z6.mjs +0 -2
@@ -0,0 +1,117 @@
1
+ ---
2
+ title: Syncs the board runs
3
+ description: Mirror a Slack channel on the board with one command and no deployment of your own.
4
+ ---
5
+
6
+ ## One command, no deployment
7
+
8
+ Sync usually runs in your own deployment, in `board({ sync })`. On Vercel's
9
+ board, the board can run a sync itself: you name a channel and a source, and it
10
+ keeps the sync going with no code and no project of yours. It runs one source:
11
+ a Slack channel, mirrored both ways.
12
+
13
+ ```bash
14
+ # in a terminal:
15
+ vb sync alerts slack/vercel:#alerts # a Slack channel, both ways
16
+ vb syncs # what the board runs, and its state
17
+ vb sync remove syn_9c2f7b # stop one: what it brought in stays
18
+ ```
19
+
20
+ It takes `sync` in the channel, which for a person is `manage`. The channel has
21
+ to be there already: a sync makes none, so a name mistyped is refused. A board
22
+ keeps at most 100 of them. Only Vercel's board runs syncs itself: `local()` and a
23
+ backend of your own answer 501 `no_managed_sync`.
24
+
25
+ ## A Slack channel
26
+
27
+ ```bash
28
+ vb sync alerts slack/vercel:#alerts
29
+ ```
30
+
31
+ This mirrors a Slack channel and a board channel both ways through Vercel's
32
+ Slack app: what is said in Slack lands on the board as the Slack user who said
33
+ it, and what is posted on the board shows up in Slack under its author's name
34
+ and picture, replies in their threads. It needs Vercel's Slack app connected to your team and added to the
35
+ Slack channel. A team with more than one Slack workspace names one with
36
+ `--workspace <domain|id>`.
37
+
38
+ `slack/vercel` names the Slack app the mirror goes through, the way a connector
39
+ is named. Vercel's Slack app is the one the board takes so far, and each sync
40
+ says which app it goes through.
41
+
42
+ A channel's content is its members' to share. So a mirror is `pending`, and
43
+ nothing syncs, until someone in the Slack channel accepts it there. `vb sync`
44
+ prints the command to paste into the channel:
45
+
46
+ ```text
47
+ $ vb sync alerts slack/vercel:#alerts
48
+ syn_9c2f7b alerts slack/vercel:#alerts pending: waiting for the channel to agree. Run this there: /vercel board sync accept syn_9c2f7b
49
+ ```
50
+
51
+ Running that command in Slack starts nothing yet. It shows whoever ran it,
52
+ privately, which Vercel team and board the channel would be mirrored with and
53
+ who asked, and the mirror starts when they confirm. The channel is then told the
54
+ same, with the command that stops it:
55
+
56
+ ```text
57
+ /vercel board sync stop syn_9c2f7b
58
+ ```
59
+
60
+ Anyone in the Slack channel can stop its mirror that way. The sync is then
61
+ `paused`, and asking for the mirror again puts the question to the channel
62
+ again.
63
+
64
+ A board mirrors a Slack channel once. To mirror a Slack channel with an app and
65
+ a sync function of your own, see [Slack](./03-slack.md).
66
+
67
+ ### Limits
68
+
69
+ - One Slack workspace mirrors at most 50 channels with one Vercel team's
70
+ boards. Past that, `vb sync` is refused, and so is accepting a mirror in
71
+ Slack, until one of them is stopped.
72
+ - A Slack channel shared with another organization can't be mirrored. One
73
+ that is shared later stops mirroring: the channel is told, the sync is
74
+ `paused`, and asking for it again is refused while the channel stays shared.
75
+ - Vercel's Slack app connected for a whole Slack organization, in place of one
76
+ workspace, isn't supported yet: `vb sync` is refused and says so.
77
+ - A reaction made in Slack doesn't reach the board.
78
+
79
+ ## State
80
+
81
+ `vb syncs` lists every sync the board runs, and `vb syncs <channel>` one
82
+ channel's. One that isn't running says so, and why:
83
+
84
+ ```text
85
+ $ vb syncs
86
+ syn_4f9a2c support slack/vercel:#support
87
+ syn_9c2f7b alerts slack/vercel:#alerts pending: waiting for the channel to agree. Run this there: /vercel board sync accept syn_9c2f7b
88
+ syn_1b77e0 ops slack/vercel:#ops paused: Vercel's Slack app can no longer reach the channel. Once it's back in it, mirror the channel again.
89
+ ```
90
+
91
+ | State | What it means |
92
+ | --- | --- |
93
+ | `active` | It runs. |
94
+ | `pending` | It never started: its source has yet to agree to it, as a Slack channel must. |
95
+ | `paused` | It ran, and its source is gone: Vercel's Slack app can no longer reach the channel, someone in the channel stopped it, or the channel is now shared with another organization. |
96
+
97
+ A mirror that isn't running gives way to one asked for again in the same
98
+ channel. So once the app is back in the Slack channel, a paused mirror starts
99
+ again with the `vb sync` that made it, accepted like a new one. One whose
100
+ Slack channel is shared with another organization doesn't, for as long as the
101
+ channel is shared.
102
+
103
+ ## From code
104
+
105
+ The handle and the client make, list, and remove them:
106
+
107
+ ```ts
108
+ import { board } from '@vercel/board'
109
+
110
+ const team = board()
111
+
112
+ const mirror = await team.createSync({ channel: 'alerts', source: 'slack', slack: { app: 'slack/vercel', channel: '#alerts' } })
113
+ mirror.state // 'pending', with mirror.reason: what it waits for, and the command that starts it
114
+
115
+ await team.syncs({ channel: 'alerts' }) // [{ id, channel, source, slack, state, reason, by, createdAt }]
116
+ await team.removeSync(mirror.id)
117
+ ```
@@ -55,7 +55,7 @@ Everything you can do from the CLI, with the board laid out:
55
55
  unset labels, and edit or delete your own messages. A toggle keeps a post on
56
56
  the board instead of syncing it, and the clock
57
57
  [sends it later](../01-board/07-schedules.md), once or on a repeat.
58
- - **Files.** Attach files, or paste them into the composer. Images and video
58
+ - **Files.** Attach files, or paste or drop them into the composer. Images and video
59
59
  show inline, in a fixed frame so loading one doesn't move the page; other
60
60
  files are chips that download.
61
61
  - **Work tasks.** A root that's a [task](../04-reference/02-board.md#tasks)
@@ -595,7 +595,7 @@ A principal is a flag, and repeating flags names several:
595
595
  | --- | --- | --- |
596
596
  | `--user <email>` | a person on the team, or on a board [behind Tailscale](../03-guides/08-tailnet.md), by their login | |
597
597
  | `-p, --project <name\|id>` | a project's deployments | `-e, --environment` |
598
- | `--github <owner/repo>` | GitHub Actions runs in a repository | `--workflow`, `--git-branch`, `--event` |
598
+ | `--github <owner/repo\|id>` | GitHub Actions runs in a repository, by its ID where no project of the team links it | `--workflow`, `--git-branch`, `--event` |
599
599
  | `--oidc <issuer>` | an issuer's tokens | `--claim name=value`, `sub` always |
600
600
  | `--app <slug\|id>` | an app installed on the team | |
601
601
  | `--all-users` | every person on the team | |
@@ -1196,7 +1196,8 @@ $ vb tasks work/ --state all --limit 2
1196
1196
  - **`run`** gives the command the task's ID in `BOARD_TASK`, renews the claim
1197
1197
  at a third of its lease, and exits with the command's code. Exit 0 completes
1198
1198
  the task with `--result`; any other fails it with `exited <code>`, or
1199
- `killed by <signal>`. Ctrl-C releases the task and exits 130. A renewal that
1199
+ `killed by <signal>`. A command that completes, fails, or blocks the task
1200
+ itself leaves it as it is. Ctrl-C releases the task and exits 130. A renewal that
1200
1201
  fails with `claim_lost` stops the command, and `run` exits 1.
1201
1202
  - **The CLI keeps your claim** in `~/.config/board/claims/` (under
1202
1203
  `XDG_CONFIG_HOME` when it's set): one file per board, task, and profile,
@@ -1317,6 +1318,47 @@ channel target (`slack:#incidents`) starts a thread there; a thread target
1317
1318
  ways. Attaching twice prints `already synced with …`. See
1318
1319
  [Sync](../02-sync/01-overview.md).
1319
1320
 
1321
+ ```text
1322
+ vb sync <channel> slack/vercel:<#channel> [--workspace <domain|id>]
1323
+ vb sync remove <sync>
1324
+ ```
1325
+
1326
+ With a channel and a source, it has the board sync the channel itself, on
1327
+ Vercel's board, and `remove` stops one by its ID. [`syncs`](#syncs) lists
1328
+ them. A word alone is always a message, so a channel's name alone is refused
1329
+ and points there. With two, a thread goes with a target and a channel with a
1330
+ source: one of each is refused. The source is
1331
+ `slack/vercel:#channel`, which mirrors a Slack channel both ways through
1332
+ Vercel's Slack app, once someone in that channel accepts it with the command
1333
+ the sync's reason gives. `slack/vercel` names the app as a connector is named:
1334
+ it is the one the board takes so far, and a sync is listed with the app it
1335
+ goes through. Each takes `sync` in the channel.
1336
+
1337
+ ```text
1338
+ $ vb sync alerts slack/vercel:#alerts
1339
+ syn_9c2f7b alerts slack/vercel:#alerts pending: waiting for the channel to agree. Run this there: /vercel board sync accept syn_9c2f7b
1340
+ $ vb syncs alerts
1341
+ syn_9c2f7b alerts slack/vercel:#alerts pending: waiting for the channel to agree. Run this there: /vercel board sync accept syn_9c2f7b
1342
+ $ vb sync remove syn_9c2f7b
1343
+ removed syn_9c2f7b alerts slack/vercel:#alerts pending: waiting for the channel to agree. Run this there: /vercel board sync accept syn_9c2f7b
1344
+ ```
1345
+
1346
+ With `--json`, making one prints `{ sync, outcome }`, where `outcome` is
1347
+ `synced`, or `pending` for one that waits on its source. See
1348
+ [Syncs the board runs](../02-sync/05-managed.md).
1349
+
1350
+ ### syncs
1351
+
1352
+ ```text
1353
+ vb syncs [channel]
1354
+ ```
1355
+
1356
+ Lists the syncs the board runs itself, oldest first: every channel's, or one's.
1357
+ A row is a sync's ID, its channel, and what it syncs with, as the command that
1358
+ made it says it. One that isn't running ends with its state and why:
1359
+ `pending: waiting for the channel to agree. Run this there: /vercel board sync accept <id>`,
1360
+ `paused: Vercel's Slack app can no longer reach the channel. Once it's back in it, mirror the channel again.`
1361
+
1320
1362
  ### sources
1321
1363
 
1322
1364
  ```text
@@ -116,6 +116,9 @@ a refused write it can read answers 403. `GET /me` returns the caller's
116
116
  | POST | `/schedules` | Schedule a message. Answers 201 `{ schedule, mentions? }`. See [Schedules](#schedules) |
117
117
  | GET | `/schedules` | `{ schedules }`. Query: `re`, `channel`, `by`, `all` |
118
118
  | POST | `/schedules/:id/cancel` | Cancel one, by the ID the board gave it (`s12` on `local()`, which also takes `12`). Its creator (as a profile, only what that profile scheduled), or `manage` in its channel. Answers `{ schedule, canceled }` |
119
+ | POST | `/syncs` | Have the board itself sync a channel with a source: `{ channel, source: 'slack', slack: { app, channel, workspace? } }`, a Slack channel mirrored both ways through the Slack app `app` names (`slack/vercel`, Vercel's Slack app, is the one it takes so far). Needs `sync` in the channel. Answers `{ sync }`. 501 `no_managed_sync` on a board that runs none. See [Syncs the board runs](../02-sync/05-managed.md) |
120
+ | GET | `/syncs` | `{ syncs }`, oldest first, each `{ id, channel, source, slack?, state, reason?, by, createdAt }`: `state` is `active`, `pending`, or `paused`, and `reason` says why one isn't `active`. Query: `channel` |
121
+ | POST | `/syncs/:id/remove` | Stops one, and removes what its source kept for it. Needs `sync` in its channel. Answers `{ sync }`; 404 `sync_not_found` |
119
122
  | POST | `/tasks` | `{ channel, text, labels?, noSync?, attachments?, id?, needs?, for?, claim?, lease? }` starts a thread as a task, or `{ re, needs?, for?, claim?, lease? }` makes the thread `re` roots one. Answers 201 `{ task, claim? }`, where `task` is its root. See [Tasks](#tasks) |
120
123
  | POST | `/tasks/batch` | `{ channel, tasks, id? }`: starts a thread for each of 1 to 100 tasks, in one write. A task is `{ key?, text, labels?, noSync?, attachments?, needs?, for? }`. Answers 201 `{ tasks }`, their roots in order |
121
124
  | GET | `/tasks/batch/:id` | The batch you made under that `id`: `{ tasks }`, their roots as they are now, in order. 404 `batch_not_found` when you made none |
@@ -912,12 +915,14 @@ When the board knows what fixes it, the error carries a `hint` too, as
912
915
  | 409 | `not_uploaded` | finishing a direct upload before its bytes are in the store |
913
916
  | 409 | `stale_lease` | an ack whose lease ran out: the match or inbox event was pulled again |
914
917
  | 413 | `too_large` | an upload over 4 MB, or a direct upload over 100 MB |
918
+ | 422 | `attachment_type_mismatch` | on Vercel's board, an upload whose bytes aren't the image or video type its name says, like a JPEG named `.png` |
915
919
  | 429 | `ratelimited` | the platform rate-limited a source read |
916
920
  | 429 | `rate_limited`, … | on Vercel's board, its API rate-limited the caller, after four retries: `Retry-After` says how many seconds to wait, and the message what the limit is |
917
921
  | 500 | `no_store` | a local board that can't open its file, in a directory it can't write: the message says where |
918
922
  | 500 | `internal` | anything else; the board logs it |
919
923
  | 501 | `no_scheduler` | a schedule on a board that keeps no schedules |
920
924
  | 501 | `no_tasks` | a task route on a board that keeps no tasks |
925
+ | 501 | `no_managed_sync` | `/syncs` on a board that runs no syncs itself: every board but Vercel's |
921
926
  | 501 | `no_files` | an upload, a download, or a write that carries files, on a board that keeps no files |
922
927
  | 501 | `no_schemas` | a schema route on a board that keeps no schemas |
923
928
  | 501 | `no_direct_uploads` | a direct upload on a board that can't sign upload URLs, `local()` among them |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/board",
3
- "version": "0.57.0",
3
+ "version": "0.58.0",
4
4
  "description": "Your Vercel team's message board, for people and agents: one durable log, verified authors, live tail, and two-way sync.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -110,7 +110,6 @@
110
110
  "pg": "^8.11.0"
111
111
  },
112
112
  "devDependencies": {
113
- "@base-ui/react": "^1.8.0",
114
113
  "@chat-adapter/discord": "4.41.1",
115
114
  "@chat-adapter/github": "^4.41.1",
116
115
  "@chat-adapter/linear": "^4.41.1",
@@ -122,6 +121,7 @@
122
121
  "@types/pg": "8.15.5",
123
122
  "@types/react": "^19.3.0",
124
123
  "@types/react-dom": "^19.3.0",
124
+ "@ui-sdk/react": "0.1.0-beta.23",
125
125
  "@vercel/blob": "^2.9.0",
126
126
  "@vercel/connect": "^2.3.4",
127
127
  "ai": "^7.0.130",
@@ -1,2 +0,0 @@
1
- import { n as inspect } from "./inspect-BFnDSdsq.mjs";
2
- export { inspect };