@vercel/board 0.53.0 → 0.54.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/dist/{access-Pcar1gwx.mjs → access-HzqFpgL_.mjs} +1 -1
- package/dist/access.d.mts +3 -3
- package/dist/access.mjs +5 -5
- package/dist/{actors-XKUrjOfO.mjs → actors-D-u6bitG.mjs} +2 -2
- package/dist/{auth-C2CxMl2p.mjs → auth-D9ycDQK0.mjs} +34 -12
- package/dist/{auth-BoYunD5t.d.mts → auth-ULldUvir.d.mts} +8 -2
- package/dist/{backend-DJobr4nr.d.mts → backend-BHN6GTjB.d.mts} +8 -7
- package/dist/backend-local.d.mts +1 -1
- package/dist/backend-local.mjs +1 -1
- package/dist/{chat-provider-BSHlV2lw.d.mts → chat-provider-F7UqWVZK.d.mts} +2 -2
- package/dist/cli-commands.d.mts +1 -1
- package/dist/cli-commands.mjs +1 -1
- package/dist/cli-embedded.d.mts +2 -2
- package/dist/cli-embedded.mjs +2 -2
- package/dist/cli.mjs +6 -6
- package/dist/{client-oYThy3CR.d.mts → client-CFHunEFn.d.mts} +8 -2
- package/dist/{commands-B_gbi2sU.mjs → commands-D8HctFGJ.mjs} +15 -10
- package/dist/{commands-B6pgzwTI.d.mts → commands-DLPIX7Jw.d.mts} +3 -1
- package/dist/{conformance-Cz1Elmgj.mjs → conformance-BNiLcKra.mjs} +34 -4
- package/dist/conformance.d.mts +3 -4
- package/dist/conformance.mjs +1 -1
- package/dist/{engine-506f7GEM.mjs → engine-C8wCzkw-.mjs} +2 -2
- package/dist/{routes-GF5ukHYX.mjs → errors-DDfXnZ2b.mjs} +875 -4
- package/dist/{exports-CF_nUsT5.d.mts → exports-BBmjHyCB.d.mts} +4 -4
- package/dist/{exports-CBukc8T3.mjs → exports-D6Q99t_O.mjs} +144 -88
- package/dist/{index-CM2u0wGd.d.mts → index-Ce3SDZ3Y.d.mts} +2 -2
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +4 -4
- package/dist/index.node.d.mts +7 -7
- package/dist/index.node.mjs +4 -4
- package/dist/inspect/app.js +88 -88
- package/dist/inspect/engine.js +3 -3
- package/dist/{inspect-PQsEgXRQ.mjs → inspect-Cb1Sj8QV.mjs} +2 -2
- package/dist/inspect-DeY883DA.mjs +2 -0
- package/dist/inspect.d.mts +1 -1
- package/dist/inspect.mjs +1 -1
- package/dist/{local-CwcmqEoa.mjs → local-BtzF9fRs.mjs} +10 -10
- package/dist/{main-gNAS2WbP.mjs → main-Dicvkp6D.mjs} +360 -100
- package/dist/{middleware-DXiwepsR.mjs → middleware-BY4qqIh3.mjs} +1 -1
- package/dist/{provider-WjdBsRLR.d.mts → provider-DgGp4Zej.d.mts} +2 -2
- package/dist/{routes-BpvyXQwv.d.mts → routes-DNmQSOvQ.d.mts} +16 -1
- package/dist/{serve-Ci5KT11x.mjs → serve-BMOtQEiQ.mjs} +6 -6
- package/dist/{server-XsbC50nY.mjs → server--J1DfQjI.mjs} +68 -11
- package/dist/{serving-C6Ao7i-7.mjs → serving-C1mhZQqH.mjs} +1 -1
- package/dist/{shell-BiCBL1w_.mjs → shell-DsDyOFd1.mjs} +1 -1
- package/dist/sync-chat-sdk.d.mts +2 -2
- package/dist/sync-github.d.mts +2 -2
- package/dist/sync-linear.d.mts +3 -3
- package/dist/sync-slack.d.mts +3 -3
- package/dist/sync.d.mts +2 -2
- package/dist/{task-batch-nqYGszDJ.mjs → task-batch-BviIruES.mjs} +4 -5
- package/dist/{tokens-tulRtEWx.mjs → tokens-B3gXkQCs.mjs} +2 -2
- package/dist/{version-CBjh_ogp.mjs → version-1isUFDyU.mjs} +1 -1
- package/docs/01-board/01-mounting.md +8 -6
- package/docs/01-board/03-identity.md +1 -1
- package/docs/01-board/05-reading.md +34 -7
- package/docs/01-board/09-access.md +11 -2
- package/docs/01-board/11-tasks.md +5 -3
- package/docs/01-quickstart.md +19 -5
- package/docs/03-guides/03-ci.md +71 -43
- package/docs/03-guides/04-triage.md +4 -4
- package/docs/04-reference/01-cli.md +30 -22
- package/docs/04-reference/02-board.md +8 -4
- package/docs/04-reference/03-http.md +14 -5
- package/docs/04-reference/05-conformance.md +1 -1
- package/docs/index.md +7 -5
- package/package.json +2 -2
- package/dist/errors-Cv0TGBt5.mjs +0 -857
- package/dist/inspect-SEaGzhvh.mjs +0 -2
package/docs/03-guides/03-ci.md
CHANGED
|
@@ -24,16 +24,26 @@ jobs:
|
|
|
24
24
|
- uses: actions/checkout@v4
|
|
25
25
|
# your deploy steps…
|
|
26
26
|
- if: failure()
|
|
27
|
-
run: npx -y
|
|
27
|
+
run: npx -y vercel board post errors-www "deploy failed on $SHA" --label source=ci --idempotency-key "deploy-$SHA" --scope "$TEAM_ID"
|
|
28
28
|
env:
|
|
29
|
-
|
|
29
|
+
TEAM_ID: team_abc123 # the team whose board it is, by its ID
|
|
30
30
|
SHA: ${{ github.sha }}
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
> [!NOTE]
|
|
34
|
+
> This needs a Vercel CLI release that runs `vercel board` without a Vercel
|
|
35
|
+
> login.
|
|
36
|
+
|
|
37
|
+
- **The CLI finds the token itself.** The runner has no Vercel login, so
|
|
38
|
+
`vercel board` hands board none, and board asks GitHub for a token whose
|
|
39
|
+
audience is Vercel's API, `https://api.vercel.com/v1/messageboard`. It sends
|
|
40
|
+
it as it is, so it's good for the team's boards and nothing else. Without
|
|
41
|
+
`id-token: write`, GitHub gives the job no token, so there's nothing to
|
|
42
|
+
send, and the step fails: you're not logged in to Vercel.
|
|
43
|
+
- **You name the team, by its ID.** A GitHub token names no Vercel team, so
|
|
44
|
+
`--scope` says whose board it is, or `VERCEL_ORG_ID` in `env:` with no
|
|
45
|
+
`--scope`. With no login there's no slug to look up, so it takes the team's
|
|
46
|
+
ID (`team_…`). With neither, the CLI says to pass one.
|
|
37
47
|
- **`--idempotency-key` makes a retried step post once.** The same ID with the same write
|
|
38
48
|
returns the message already posted.
|
|
39
49
|
- **The post is an ordinary thread.** If `errors-www` mirrors a Slack channel,
|
|
@@ -46,28 +56,25 @@ jobs:
|
|
|
46
56
|
|
|
47
57
|
### Let the workflow in
|
|
48
58
|
|
|
49
|
-
A workflow has no Vercel login
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
team serves in a long-running
|
|
53
|
-
[backend of your own](../01-board/01-mounting.md#a-backend-of-your-own).
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
App. An OIDC exchange policy issues the run a Vercel App token, and a grant
|
|
57
|
-
names that app, `vb grants create --app <slug> --can …`, or every app with
|
|
58
|
-
`--all-apps`. On a board that keeps them, someone with `manage` in every
|
|
59
|
-
channel grants the repo's runs what they may do, with no deploy:
|
|
59
|
+
A workflow has no Vercel login. The board lets it in by its token, through a
|
|
60
|
+
[grant](../01-board/09-access.md#grants) for its repository: the team's board
|
|
61
|
+
in Vercel's API does, and so does any board that keeps grants, such as one on
|
|
62
|
+
[`local()`](../01-board/10-local.md) that your team serves in a long-running
|
|
63
|
+
process, or a [backend of your own](../01-board/01-mounting.md#a-backend-of-your-own).
|
|
64
|
+
Someone with `manage` in every channel grants the repo's runs what they may
|
|
65
|
+
do, with no deploy:
|
|
60
66
|
|
|
61
67
|
```text
|
|
62
|
-
$
|
|
63
|
-
created g4 --github acme/www --
|
|
68
|
+
$ vercel board grants create --github acme/www --git-branch main --can 'errors-www=post,label;deploys=read,post'
|
|
69
|
+
created g4 --github acme/www --git-branch main errors-www=post,label deploys=read,post
|
|
64
70
|
```
|
|
65
71
|
|
|
66
|
-
The grant matches the token's `repository
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
handle `acme/www`. A
|
|
70
|
-
grant
|
|
72
|
+
The grant matches the token's `repository`, and `--git-branch` its `ref`:
|
|
73
|
+
this one lets in runs on `main`, as the workflow above is. A `--workflow` or
|
|
74
|
+
`--event` you add narrows it to that workflow file or event. The workflow
|
|
75
|
+
writes as `github:repo:<repository_id>`, with the handle `acme/www`. A
|
|
76
|
+
workflow no grant lets in gets a 403 whose hint is the grant to create:
|
|
77
|
+
`Grant it: vb grants create --github acme/www`.
|
|
71
78
|
|
|
72
79
|
`--can` says what it may do where. This one posts and labels in `errors-www`,
|
|
73
80
|
for the step above, and reads and posts in `deploys`, which the wait below
|
|
@@ -95,18 +102,23 @@ Writes print the new message's ID, so a step can post and then block on the
|
|
|
95
102
|
answer:
|
|
96
103
|
|
|
97
104
|
```bash
|
|
98
|
-
# in a workflow step, with
|
|
99
|
-
id=$(npx -y
|
|
100
|
-
npx -y
|
|
105
|
+
# in a workflow step, with TEAM_ID and DEPLOY_URL in env:
|
|
106
|
+
id=$(npx -y vercel board post deploys "Ready to promote $DEPLOY_URL?" --scope "$TEAM_ID")
|
|
107
|
+
npx -y vercel board wait --re "$id" --after "$id" --text "ship it" --timeout 30m --scope "$TEAM_ID"
|
|
101
108
|
```
|
|
102
109
|
|
|
103
110
|
`wait` exits 0 once someone replies in the thread with "ship it" (in Slack
|
|
104
111
|
too, if `deploys` mirrors a channel), or 1 when the timeout passes, which
|
|
105
112
|
fails the step.
|
|
106
113
|
|
|
107
|
-
### A
|
|
114
|
+
### A board of your own
|
|
115
|
+
|
|
116
|
+
For a board your team serves itself, use its own CLI, `vb`: run
|
|
117
|
+
`npx -y @vercel/board` in the step with `BOARD_URL` in `env:`. It asks GitHub
|
|
118
|
+
for a token whose audience is that board's URL, and `vb grants create` makes
|
|
119
|
+
that board's grants, as above.
|
|
108
120
|
|
|
109
|
-
If
|
|
121
|
+
If that board is behind Vercel Deployment Protection, add the
|
|
110
122
|
project's bypass secret to the step's `env:` and the CLI sends it:
|
|
111
123
|
|
|
112
124
|
```yaml
|
|
@@ -167,37 +179,53 @@ this project's own `VERCEL_AUTOMATION_BYPASS_SECRET` to another project's board.
|
|
|
167
179
|
## From anywhere else
|
|
168
180
|
|
|
169
181
|
`BOARD_TOKEN` takes an OIDC token you got yourself, and the CLI and `board()`
|
|
170
|
-
send it as is. It must be one the board
|
|
171
|
-
|
|
172
|
-
[grant](../01-board/09-access.md#grants) lets in.
|
|
173
|
-
audience
|
|
182
|
+
send it as is. It must be one the board verifies. For the team's board in
|
|
183
|
+
Vercel's API, its audience is `https://api.vercel.com/v1/messageboard`, and a
|
|
184
|
+
[grant](../01-board/09-access.md#grants) lets its caller in. For the board at
|
|
185
|
+
`BOARD_URL`, its audience is the board's URL, and it's from the board's own
|
|
186
|
+
project or a caller a grant lets in. Discovery tells you the audience:
|
|
174
187
|
|
|
175
188
|
```bash
|
|
176
189
|
# in a terminal:
|
|
177
190
|
curl -s https://team.example/api/board | jq -r .audience
|
|
178
191
|
```
|
|
179
192
|
|
|
180
|
-
Another CI's tokens work through a grant that names its issuer by URL
|
|
181
|
-
the claims to match, each exactly
|
|
193
|
+
Another CI's tokens work through a grant that names its issuer by URL and
|
|
194
|
+
the `sub` of the jobs to let in, with any other claims to match, each exactly.
|
|
195
|
+
An issuer like GitLab.com signs tokens for everyone it serves, and only `sub`
|
|
196
|
+
says whose a token is, so a grant always names one. A `sub` that ends in `*`
|
|
197
|
+
right after a `:` or `/` matches how one starts, here any job in `acme/api`:
|
|
182
198
|
|
|
183
199
|
```text
|
|
184
|
-
$
|
|
185
|
-
created g4 --oidc https://gitlab.com --claim
|
|
200
|
+
$ vercel board grants create --oidc https://gitlab.com --claim 'sub=project_path:acme/api:*' --claim project_id=42 --can deploys=post
|
|
201
|
+
created g4 --oidc https://gitlab.com --claim project_id=42 --claim sub=project_path:acme/api:* deploys=post
|
|
186
202
|
```
|
|
187
203
|
|
|
204
|
+
`sub=project_path:acme/api:ref_type:branch:ref:main` is its jobs on main
|
|
205
|
+
alone.
|
|
206
|
+
|
|
188
207
|
In GitLab, a job's `id_tokens` with the board's audience is the token:
|
|
189
208
|
|
|
190
209
|
```yaml .gitlab-ci.yml
|
|
191
210
|
notify:
|
|
192
211
|
variables:
|
|
193
|
-
|
|
212
|
+
TEAM_ID: team_abc123 # the team whose board it is, by its ID
|
|
194
213
|
id_tokens:
|
|
195
214
|
BOARD_TOKEN:
|
|
196
|
-
aud: https://
|
|
215
|
+
aud: https://api.vercel.com/v1/messageboard
|
|
197
216
|
script:
|
|
198
|
-
- npx -y
|
|
217
|
+
- npx -y vercel board post deploys "api $CI_COMMIT_SHORT_SHA is live" --scope "$TEAM_ID"
|
|
199
218
|
```
|
|
200
219
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
220
|
+
It writes as `oidc:<issuer host and path>:<sub>`, here
|
|
221
|
+
`oidc:gitlab.com:project_path:acme/api:ref_type:branch:ref:main`, with its
|
|
222
|
+
`sub` as its handle. For a board of your own, run `npx -y @vercel/board` with
|
|
223
|
+
`BOARD_URL` set, and make `aud` that board's URL.
|
|
224
|
+
|
|
225
|
+
On the team's board in Vercel's API, `vercel board` sends your Vercel login
|
|
226
|
+
when there is one. With none, as on a runner, board looks for a token in this
|
|
227
|
+
order: the deployment's OIDC token, `BOARD_TOKEN`, `VERCEL_AUTH_TOKEN`, GitHub
|
|
228
|
+
Actions, then a `vercel login`. For a board at `BOARD_URL`, `vb` looks in this order:
|
|
229
|
+
`BOARD_TOKEN`, a local board's (`vb serve`), GitHub Actions, the Vercel
|
|
230
|
+
runtime, then your `vercel login`. See [Identity](../01-board/03-identity.md)
|
|
231
|
+
for how each one maps to a principal.
|
|
@@ -64,11 +64,11 @@ prints it, and exits, so each turn handles one event. Every event carries a
|
|
|
64
64
|
# triage-turn.sh: one event per run
|
|
65
65
|
last=$(cat .triage-cursor 2>/dev/null)
|
|
66
66
|
next=$(vb wait firehose --source slack ${last:+--after "$last"} --json --timeout 1h) || exit 0
|
|
67
|
-
jq -r '.cursor' <<<"$next" > .triage-cursor
|
|
67
|
+
jq -r '.event.cursor' <<<"$next" > .triage-cursor
|
|
68
68
|
|
|
69
|
-
[ "$(jq -r '.type' <<<"$next")" = "message.posted" ] || exit 0
|
|
70
|
-
[ "$(jq -r '.message.re' <<<"$next")" = "null" ] || exit 0
|
|
71
|
-
id=$(jq -r '.message.id' <<<"$next")
|
|
69
|
+
[ "$(jq -r '.event.type' <<<"$next")" = "message.posted" ] || exit 0
|
|
70
|
+
[ "$(jq -r '.event.message.re' <<<"$next")" = "null" ] || exit 0
|
|
71
|
+
id=$(jq -r '.event.message.id' <<<"$next")
|
|
72
72
|
|
|
73
73
|
vb react "$id" eyes
|
|
74
74
|
vb label "$id" status=triaged dup-of=640
|
|
@@ -97,8 +97,8 @@ With no board URL anywhere, it talks to your team's board in Vercel's API:
|
|
|
97
97
|
login's default team. `--scope <team>` picks another, by its slug or ID. It
|
|
98
98
|
reads and writes as the login the CLI that runs it gives it. Given none, it
|
|
99
99
|
finds its credentials as `vb` does: a deployment's own token, or else
|
|
100
|
-
`BOARD_TOKEN`, or else
|
|
101
|
-
never sends `VERCEL_TOKEN`.
|
|
100
|
+
`BOARD_TOKEN`, or else `VERCEL_AUTH_TOKEN`, or else a GitHub Actions job's
|
|
101
|
+
OIDC token, or else your `vercel login`. It never sends `VERCEL_TOKEN`.
|
|
102
102
|
|
|
103
103
|
### In-process, on a handle
|
|
104
104
|
|
|
@@ -273,7 +273,10 @@ itself.
|
|
|
273
273
|
the Vercel CLI sets for a CLI it runs, or else your `vercel login`. That last one is cached
|
|
274
274
|
in `~/.config/board/tokens/` for its 12-hour life. See
|
|
275
275
|
[Identity](../01-board/03-identity.md). A team's board in Vercel's API
|
|
276
|
-
gets the deployment's OIDC token, or else `BOARD_TOKEN
|
|
276
|
+
gets the deployment's OIDC token, or else `BOARD_TOKEN`, or else a GitHub
|
|
277
|
+
Actions OIDC token made out to `https://api.vercel.com/v1/messageboard`, or
|
|
278
|
+
else your Vercel login. A GitHub token names no Vercel team, so in Actions
|
|
279
|
+
`--scope <team ID>` or `VERCEL_ORG_ID` names it.
|
|
277
280
|
- **A board with no Vercel project has no token for your login to mint,** so
|
|
278
281
|
a request goes to it with none. A board that names its callers another way
|
|
279
282
|
takes it: one [behind Tailscale](../03-guides/08-tailnet.md), say. Any other
|
|
@@ -563,7 +566,8 @@ examples:
|
|
|
563
566
|
react with eyes
|
|
564
567
|
board react 812 eyes
|
|
565
568
|
|
|
566
|
-
|
|
569
|
+
global: --json --as <profile> --scope <team> --url <url>
|
|
570
|
+
and the rest every command takes: board help
|
|
567
571
|
```
|
|
568
572
|
|
|
569
573
|
## Access
|
|
@@ -591,7 +595,7 @@ A principal is a flag, and repeating flags names several:
|
|
|
591
595
|
| `--user <email>` | a person on the team, or on a board [behind Tailscale](../03-guides/08-tailnet.md), by their login | |
|
|
592
596
|
| `-p, --project <name\|id>` | a project's deployments | `-e, --environment` |
|
|
593
597
|
| `--github <owner/repo>` | GitHub Actions runs in a repository | `--workflow`, `--git-branch`, `--event` |
|
|
594
|
-
| `--oidc <issuer>` | an issuer's tokens | `--claim name=value` |
|
|
598
|
+
| `--oidc <issuer>` | an issuer's tokens | `--claim name=value`, `sub` always |
|
|
595
599
|
| `--app <slug\|id>` | an app installed on the team | |
|
|
596
600
|
| `--all-users` | every person on the team | |
|
|
597
601
|
| `--all-projects` | every project's deployments on the team | `-e, --environment` |
|
|
@@ -603,8 +607,13 @@ A modifier goes after the principal it's for, so one grant mixes them:
|
|
|
603
607
|
`--environment` takes a comma-separated list and is `production` when left
|
|
604
608
|
out. `--workflow` matches the run's workflow file (`ci.yml` is
|
|
605
609
|
`.github/workflows/ci.yml`), `--git-branch` its `refs/heads/` branch, and
|
|
606
|
-
`--event` its event. `--
|
|
607
|
-
|
|
610
|
+
`--event` its event. `--oidc` takes a `--claim sub=…`, since its issuer
|
|
611
|
+
signs tokens for everyone it serves and only `sub` says whose a token is:
|
|
612
|
+
exact, or ending in `*` right after a `:` or `/` to match how one starts, as
|
|
613
|
+
`--claim 'sub=project_path:acme/api:*' --claim project_id=42` does for GitLab
|
|
614
|
+
(quoted, so the shell leaves the `*`). Its other claims narrow it, and a
|
|
615
|
+
repeated claim is any of its values. `--can pattern=permissions` repeats;
|
|
616
|
+
permissions are a comma-separated list, `all`, or `none`. A board that verifies tokens itself,
|
|
608
617
|
as `vb serve` does, takes IDs: `--user u_123`, `--project prj_123`, and an
|
|
609
618
|
app's client ID.
|
|
610
619
|
|
|
@@ -671,24 +680,20 @@ $ vb grants create --everyone --can factory/=read
|
|
|
671
680
|
created g5 --everyone factory/=read
|
|
672
681
|
```
|
|
673
682
|
|
|
674
|
-
Vercel's board
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
with reason `unsupported_principal`:
|
|
683
|
+
On Vercel's board too, a grant names a repository's runs or an issuer, and a
|
|
684
|
+
workflow gets in with its own OIDC token, with no secret to store. See
|
|
685
|
+
[CI and deploys](../03-guides/03-ci.md#let-the-workflow-in):
|
|
678
686
|
|
|
679
687
|
```text
|
|
680
|
-
$ vb grants create --github acme/web --can 'ci/=post' --scope acme
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
Grant an app that an OIDC exchange policy issues tokens for: --app <slug>.
|
|
688
|
+
$ vb grants create --github acme/web --git-branch main --can 'ci/=post' --scope acme
|
|
689
|
+
created g4 --github acme/web --git-branch main ci/=post
|
|
684
690
|
```
|
|
685
691
|
|
|
686
692
|
`explain` says which grant decides a channel: the pattern that won and those
|
|
687
693
|
it won over, the closest grants there, and what they give. It explains you, or
|
|
688
694
|
with `manage` at `*`, the one `--user`, `--project` (in one `--environment`),
|
|
689
695
|
`--github`, `--oidc`, or `--app` it names. A local board has no apps, so
|
|
690
|
-
nothing lets one in there.
|
|
691
|
-
caller, since no grant there names one (`unsupported_principal`). A caller that can't list grants sees that
|
|
696
|
+
nothing lets one in there. A caller that can't list grants sees that
|
|
692
697
|
one decides, not which:
|
|
693
698
|
|
|
694
699
|
```text
|
|
@@ -869,7 +874,7 @@ vb read <link>
|
|
|
869
874
|
filters that find threads (`--by`, `--text`, `--mentions`, `--source`)
|
|
870
875
|
don't narrow one, and are a usage error there, exit 2.
|
|
871
876
|
A [task](#tasks)'s root has its state under it: `task claimed by claude via
|
|
872
|
-
julian ·
|
|
877
|
+
julian · 5m left`.
|
|
873
878
|
- **`read <link>`** reads the thread a platform link names: a Slack permalink,
|
|
874
879
|
a GitHub PR, issue, or comment. The board answers from what its sync
|
|
875
880
|
recorded and never asks the platform, so a link it didn't sync, or one in a
|
|
@@ -1095,7 +1100,7 @@ Threads agents are to do, each with a state the board keeps. See
|
|
|
1095
1100
|
| `tasks [channel]` | lists open tasks, oldest first: `waiting`, `ready`, `claimed`, and `blocked` | a row per task: its ID, state, first line, and labels |
|
|
1096
1101
|
| `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 |
|
|
1097
1102
|
| `tasks create --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 |
|
|
1098
|
-
| `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
|
|
1103
|
+
| `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 5m fix CVE-123 in acme/web` |
|
|
1099
1104
|
| `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 |
|
|
1100
1105
|
| `tasks renew` | extends your lease, from now | the claim |
|
|
1101
1106
|
| `tasks release` | gives a task you hold back, ready again | `released 812` |
|
|
@@ -1113,7 +1118,7 @@ $ vb tasks work/
|
|
|
1113
1118
|
#812 ready fix CVE-123 in acme/web step=fix
|
|
1114
1119
|
#814 waiting review the fix for CVE-123 step=review needs #812
|
|
1115
1120
|
$ vb tasks claim --ready work/ --label step=fix --wait 10m
|
|
1116
|
-
#812 yours for
|
|
1121
|
+
#812 yours for 5m fix CVE-123 in acme/web
|
|
1117
1122
|
$ vb tasks complete 812 "fixed in a1b2c3, tests pass"
|
|
1118
1123
|
completed 812
|
|
1119
1124
|
$ vb tasks work/ --state all --limit 2
|
|
@@ -1136,7 +1141,8 @@ $ vb tasks work/ --state all --limit 2
|
|
|
1136
1141
|
and on the list. `assign <id> <profile>` names one of the task's owner's.
|
|
1137
1142
|
- **`--ready`** takes a task assigned to you first, then the oldest unassigned
|
|
1138
1143
|
one you own, or whose owner `--from <id>` names. `--wait` holds until one is
|
|
1139
|
-
ready.
|
|
1144
|
+
ready. Its `--label` is an exact `key=value`: the list's `key=a|b` and bare
|
|
1145
|
+
`key` are misuse there, said with the claim of one value.
|
|
1140
1146
|
- **`--file <path>`** makes a plan: a JSON array of tasks, each `{ key?,
|
|
1141
1147
|
text, labels?, needs?, for?, noSync?, attachments? }`, from a file, or from
|
|
1142
1148
|
stdin for `-`. A task's `key` names it for the others of the file, and
|
|
@@ -1158,7 +1164,9 @@ $ vb tasks work/ --state all --limit 2
|
|
|
1158
1164
|
can't change there, and a plan that finished takes no more: both are
|
|
1159
1165
|
`duplicate_id`, and nothing new is made.
|
|
1160
1166
|
- **Durations** are a number and a unit: `30s`, `10m`, `1h`. `--lease` takes
|
|
1161
|
-
`30s` to `1h`, and
|
|
1167
|
+
`30s` to `1h`, and asks for 15 minutes when it's left out. A board gives up
|
|
1168
|
+
to its own cap: a team's board in Vercel's API gives 5 minutes at most, for
|
|
1169
|
+
now.
|
|
1162
1170
|
- **`run`** gives the command the task's ID in `BOARD_TASK`, renews the claim
|
|
1163
1171
|
at a third of its lease, and exits with the command's code. Exit 0 completes
|
|
1164
1172
|
the task with `--result`; any other fails it with `exited <code>`, or
|
|
@@ -37,7 +37,8 @@ The short samples below act on that `team`, and on `msg`, the message
|
|
|
37
37
|
|
|
38
38
|
In Node, `board()` with no backend is your team's board in Vercel's API, the
|
|
39
39
|
one `name` names (`security`), or with `team`, another team's, with
|
|
40
|
-
the deployment's OIDC token, or else `BOARD_TOKEN`, then
|
|
40
|
+
the deployment's OIDC token, or else `BOARD_TOKEN`, then a GitHub Actions job's OIDC token (audience
|
|
41
|
+
`https://api.vercel.com/v1/messageboard`, with the team from `team` or `VERCEL_ORG_ID`), then `VERCEL_AUTH_TOKEN` or your `vercel login`, or what
|
|
41
42
|
`board({ fetch })` sends. See [A board by its name](../01-board/01-mounting.md#a-board-by-its-name).
|
|
42
43
|
|
|
43
44
|
With `BOARD_URL` set, it's the board at that URL instead. It sends a token
|
|
@@ -769,10 +770,12 @@ first `limit` threads active after that cursor.
|
|
|
769
770
|
| `text` | a case-insensitive substring |
|
|
770
771
|
|
|
771
772
|
A team board in Vercel's API keeps no search index, and lists threads one
|
|
772
|
-
channel at a time: `by
|
|
773
|
+
channel at a time: `by` and `from` there are 501
|
|
773
774
|
`not_supported`, and so is a read with no `channel` or with a subtree, unless
|
|
774
775
|
`re` names one thread. It reads nothing before it refuses, and its message
|
|
775
|
-
says what to do instead.
|
|
776
|
+
says what to do instead. `mentions` and `text` look through one page of the
|
|
777
|
+
channel's threads, by each one's first and newest message, and the page says
|
|
778
|
+
how many as `scanned`: `older` pages back the same way. [`events`](#events) and [`wait`](#wait) take every
|
|
776
779
|
filter there.
|
|
777
780
|
|
|
778
781
|
`older` is the `before` for the threads last active before the page's, or
|
|
@@ -807,7 +810,7 @@ that reply in it.
|
|
|
807
810
|
```ts
|
|
808
811
|
channels(query?: { prefix?: string; limit?: number; after?: string }): Promise<{ channels: ChannelView[]; cursor: string; next: string | null }> // each { path, lastIndex?, messages?, threads? }
|
|
809
812
|
createChannel(path: string, options?: { private?: boolean }): Promise<{ channel: ChannelView; created: boolean; grants?: GrantView[] }>
|
|
810
|
-
actors(): Promise<Actor[]>
|
|
813
|
+
actors(query?: { id?: string[] }): Promise<Actor[]> // { id, kind, handle, name, avatar }; with `id`, only those
|
|
811
814
|
me(): Promise<Me> // who this handle writes as
|
|
812
815
|
discovery(): Promise<Discovery> // no token needed: url, audience, team_id, project_id, version, sync, name?
|
|
813
816
|
```
|
|
@@ -1034,6 +1037,7 @@ fails with the status its URL answered, or 502.
|
|
|
1034
1037
|
| `no_access` | your Vercel account can't access the board's project, or can't see the project the board's host belongs to |
|
|
1035
1038
|
| `wrong_project` | the board's host is a deployment of a project other than the one its discovery names, so the handle mints no token for it |
|
|
1036
1039
|
| `no_token` | GitHub Actions refused an OIDC token (`permissions: id-token: write`) |
|
|
1040
|
+
| `missing_team` | in GitHub Actions on Vercel's board, nothing names the team: a GitHub token names none, so pass `team` or set `VERCEL_ORG_ID` |
|
|
1037
1041
|
| `protected` | the board is behind Vercel Deployment Protection: set `VERCEL_AUTOMATION_BYPASS_SECRET` |
|
|
1038
1042
|
| `invalid_duration` | a `timeout` the handle can't read |
|
|
1039
1043
|
| `too_many_redirects` | the board's URL redirects more than 20 times |
|
|
@@ -97,7 +97,7 @@ a refused write it can read answers 403. `GET /me` returns the caller's
|
|
|
97
97
|
| GET | `/me` | Who this token and profile write as: `{ actor, principal, kind, handle, name, avatar, profile, expiresAt, can }`, where `can` maps each channel pattern to its permissions |
|
|
98
98
|
| GET | `/channels` | A page: `{ channels, cursor, next }`, each `{ path, lastIndex?, messages?, threads? }`. `prefix` keeps the ones whose path starts with it, `limit` is how many (100 by default, 500 at most), and `after` takes a page's `next`, which is null on the last. By path on `local()`, and on Vercel's board under a prefix. A board that doesn't count them, as one on Vercel's API doesn't, leaves the counts out |
|
|
99
99
|
| POST | `/channels` | `{ path }`: makes a channel before anything posts to it. `{ channel, created }`, 201 when it made it, and 200 with `created: false` for one that's there, which it leaves as it is. A key it doesn't know is 400, so `private` makes nothing |
|
|
100
|
-
| GET | `/actors
|
|
100
|
+
| GET | `/actors?id=` | `{ actors, cursor }`: each `{ id, kind, handle, name, avatar, via?, platform?, verified? }`, sorted by handle. `id` (repeated, up to 100) answers only those actors, leaving out one the board doesn't have. `verified: true` is for one the board checked rather than took their name from what they sent: shown under the handle a credential it checked gave them (an OIDC token, a host's verifier), as itself or after `via` |
|
|
101
101
|
| GET | `/messages` | `{ messages, cursor }`: one channel's messages. See [Listing a channel's messages](#listing-a-channels-messages) |
|
|
102
102
|
| GET | `/threads` | `{ threads, cursor, older }`: a summary per matching thread. See [Listing threads](#listing-threads) |
|
|
103
103
|
| GET | `/messages/:id` | The thread around any message: `{ message, replies, cursor, schedules }`, where `message` is the root. `after`, one of its messages, answers the replies after it, and `limit` that many: the first after it, or without `after`, the newest |
|
|
@@ -340,11 +340,15 @@ none), newest last. On `local()`, filters read tables the board keeps from its
|
|
|
340
340
|
log, where labels and mentions are an index lookup.
|
|
341
341
|
|
|
342
342
|
Vercel's board keeps no search index, and lists threads one channel at a time.
|
|
343
|
-
There, `by
|
|
343
|
+
There, `by` and `from` are 501 `not_supported`, and so is
|
|
344
344
|
a read with no `channel`, or with a pattern, unless `re` names one thread. It
|
|
345
345
|
refuses them before it reads anything, and its message says what to do
|
|
346
346
|
instead. `label`, `after`, `before`, and `re` work as on any board, in one
|
|
347
|
-
channel.
|
|
347
|
+
channel. `mentions` and `text` look through the one page of the channel's
|
|
348
|
+
threads a read without them lists, `limit` of them before `before`, and keep
|
|
349
|
+
those whose first or newest message matches; the page says how many it looked
|
|
350
|
+
through as `scanned`, and its `older` pages back the same way. With `re`,
|
|
351
|
+
`label`, or `after` they are 501 `not_supported`.
|
|
348
352
|
|
|
349
353
|
A page read without `after` has `older`: the `before` for the next older page,
|
|
350
354
|
or `null` when no thread is older. Pass it as it came; it isn't a message ID.
|
|
@@ -572,7 +576,12 @@ show `{ kind: 'user', userId, email }`, `{ kind: 'project', projectId, name,
|
|
|
572
576
|
environments }`, and `{ kind: 'github', repositoryId, repository, … }`. One
|
|
573
577
|
that verifies tokens itself takes a user's ID and a project's `prj_…`, and
|
|
574
578
|
answers 400 `invalid_grant` for a name, as for a principal that would name
|
|
575
|
-
more than it says.
|
|
579
|
+
more than it says. An `oidc` principal's `claims` name a `sub`, since its
|
|
580
|
+
issuer signs tokens for everyone it serves: exact, or ending in `*` right
|
|
581
|
+
after a `:` or `/` to match how one starts (`project_path:acme/api:*`), and
|
|
582
|
+
others narrow it. Without one, or with a `*` anywhere else in it, it's 400
|
|
583
|
+
`invalid_grant`, except to remove it from a grant. See
|
|
584
|
+
[how grants combine](../01-board/09-access.md#how-grants-combine).
|
|
576
585
|
|
|
577
586
|
### Schemas
|
|
578
587
|
|
|
@@ -912,7 +921,7 @@ When the board knows what fixes it, the error carries a `hint` too, as
|
|
|
912
921
|
| 501 | `no_files` | an upload, a download, or a write that carries files, on a board that keeps no files |
|
|
913
922
|
| 501 | `no_schemas` | a schema route on a board that keeps no schemas |
|
|
914
923
|
| 501 | `no_direct_uploads` | a direct upload on a board that can't sign upload URLs, `local()` among them |
|
|
915
|
-
| 501 | `not_supported` | on Vercel's board, what its API doesn't keep: for now files on a scheduled message, a post's `sync` targets, and [threads found](#listing-threads) by `by
|
|
924
|
+
| 501 | `not_supported` | on Vercel's board, what its API doesn't keep: for now files on a scheduled message, a post's `sync` targets, and [threads found](#listing-threads) by `by` or `from`, or read across channels |
|
|
916
925
|
| 501 | `no_verifier` | a request to a board on board's default build, outside Node, with no `authenticate` |
|
|
917
926
|
| 501 | `no_wake_by_path` | a `path` in `POST /watchers` on a board that wakes only a `url`: `` this board wakes a url, not a path: register `url` instead `` |
|
|
918
927
|
| 502 | `no_client`, `list_failed`, … | the platform failed a source read |
|
|
@@ -149,7 +149,7 @@ Then the rest, a group each in the report:
|
|
|
149
149
|
| `paging` | posts three threads, reads the channel's latest two, then pages back by each page's `older` until it's `null`, and finds each thread once, its own three included; and refuses `before` with `after` (400 `invalid_request`). Skipped on a board whose pages have no `older` |
|
|
150
150
|
| `schedules` | schedules a reply a day out, lists it, and cancels it; and keeps a schedule's `noSync`, so its sends stay off every platform |
|
|
151
151
|
| `tasks` | starts a thread as a task and makes one of a thread that was there: its root reads with `task`, whose `by` is the actor that made it one, a reply lands in its thread, `board.task=ready` finds it, and `GET /tasks` lists it. A task made under a client ID lands once, and a create under an ID a reply or a thread that is no task landed with is 409 `duplicate_id`, with nothing made. Of three claims that race for a task, one lands and the rest get 409 `task_claimed`. A claim that asks for 300 seconds gets it, its `until` says so, a renewal moves it, and a claim that asks for none gets at least 5 minutes. A claim's writes are 409 `claim_lost` with the wrong token, after its release, and once another claim holds the task, and change nothing. A task waits for the tasks it needs, a failed or canceled one never readies it, and a reopened one that completes does, within a few seconds. A task that needs one already canceled is 400 `invalid_needs`, as a new thread or one that was there, and one that needs a failed task waits. What a task needs can change: it waits for the new ones, is ready in the same write when they have completed and at once with none, a held task stays held, and the feed shows each change with the task's state after it. A change that would make a task wait for itself, straight back or through another, is 400 `invalid_needs`, as is one a new task couldn't take. A claimed task refuses it with 409 `task_claimed`, and a completed, failed, or canceled one with 409 `task_finished`. A batch of four tasks is made in one request and answered in the order given: one that needs a later task of the batch waits for it by the ID the batch gave it, one that needs nothing is ready, one whose needs were there and have completed is ready, and one that needs both kinds waits. They list in that order, the same `id` again answers the same tasks and makes none, the `id` with one task more, or with as many but another text, is 409 `duplicate_id`, and completing one of the batch readies what waited only for it. A batch is 400 `invalid_needs`, and makes none of its tasks, for a `key` no task has, a `key` two have, a task that needs itself, tasks that need each other, and a last task that needs a canceled one. `GET /tasks?needs=` with a channel lists only that channel's tasks that wait for one, with a `prefix/` only that subtree's, and with neither the whole board's: two wait for one, in `conformance` and in `conformance/tasks`. Skipped for a token that can't post there. A task that needs others waits as it's made and as it's unblocked, and once they have completed, its `task.ready` follows, before the claim it was made with: the feed shows each change with the task's state after it, and no `task.ready` for a task that needs none. A hold blocks claims until it's lifted, and a claimed task's hold is its claim's. A task assigned to a profile is claimed only as that actor. A profile, narrowed with `x-board-can` to no `manage`, changes only the tasks it made: assigning, holding, canceling, or changing the needs of its principal's or another profile's is 403 `task_not_owned`, its principal as itself changes any of them, and a profile's edit of a thread its principal made a task holds it. Skipped for a run that can't send headers, or that writes as a profile. A caller narrowed with `x-board-can` to reading and posting claims no task, by ID or as the next ready one (403 `forbidden`): skipped for a run that can't send the header. So is the next: a caller narrowed to posting everywhere and reading only `conformance` names a prerequisite in `conformance/tasks`, which it can't read, and gets 400 `invalid_needs` starting a task and making one of a thread, with nothing made, while one it reads is a prerequisite as for anyone. A claim of the next ready task takes the oldest in a channel or its subtree that has the labels asked for, and one that waits gets a task released while it does. A feed filtered on `board.task=ready` shows a task become ready and get claimed, with no token in it. A label write or a post that sets a label under `board.` is 400 `reserved_label`. A label write holds on `board.task` as on any label: one whose `if` names a state the task isn't in, or none, is 409 `label_conflict`. An edit of a task's root by anyone but its owner blocks the task with kind `edited`, and ends its claim: the kit imports a thread as a platform user to check it, so it's skipped for a token that can't sync in the channel, or that has watchers or a sync registered. The assignment check is skipped through a board's own handle in its process, where each profile is a principal of its own. It waits out no lease, and has one principal: what a second one may claim or change isn't checked |
|
|
152
|
-
| `grants` | grants a project, lists it, and revokes it twice. Makes a second grant for the same principals, adds an app (or without one, a repository) and the project again (joining its environments) by the grant's ID, removes the project whatever its environments, and refuses to remove one it doesn't name (`not_in_grant`) or the last (`grant_empty`). Keeps `can` as written, a pattern with `[]` included. Through `explain`, in `conformance/grants/`: the most specific pattern decides, then the closest principal there, ties add up, `everyone` lets no one in and loses to `all-projects`, and a viewer reads but neither posts nor manages. Names an app and keeps it by client ID, then every app as a group. A caller narrowed with `x-board-can` to no `manage` changes no grant, and one narrowed to it only under `conformance/grants/inner/` only there. One narrowed out of a pattern grants no one past it, even once `everyone` is kept out too, and lets no one in while `everyone` gets more than it has somewhere. Skipped when the run can't change the board's grants, when it can't send `x-board-can`, for a caller no grant could keep in a pattern closed to everyone, without a viewer or an app to check (a local board has no apps), for a name the board can't look up, for a member shut out under a lock (a run couldn't lift the lock after), and across teams, which isn't specified yet. The checks that grant to someone besides the project name the `app` in `principals`, or without one the repository. On a board that takes no GitHub or OIDC principal in a grant (400 `unsupported_principal
|
|
152
|
+
| `grants` | grants a project, lists it, and revokes it twice. Makes a second grant for the same principals, adds an app (or without one, a repository) and the project again (joining its environments) by the grant's ID, removes the project whatever its environments, and refuses to remove one it doesn't name (`not_in_grant`) or the last (`grant_empty`). Keeps `can` as written, a pattern with `[]` included. Through `explain`, in `conformance/grants/`: the most specific pattern decides, then the closest principal there, ties add up, `everyone` lets no one in and loses to `all-projects`, and a viewer reads but neither posts nor manages. Names an app and keeps it by client ID, then every app as a group. A caller narrowed with `x-board-can` to no `manage` changes no grant, and one narrowed to it only under `conformance/grants/inner/` only there. One narrowed out of a pattern grants no one past it, even once `everyone` is kept out too, and lets no one in while `everyone` gets more than it has somewhere. Skipped when the run can't change the board's grants, when it can't send `x-board-can`, for a caller no grant could keep in a pattern closed to everyone, without a viewer or an app to check (a local board has no apps), for a name the board can't look up, for a member shut out under a lock (a run couldn't lift the lock after), and across teams, which isn't specified yet. The checks that grant to someone besides the project name the `app` in `principals`, or without one the repository. On a board that takes no GitHub or OIDC principal in a grant (400 `unsupported_principal`), they're skipped without an app, and so is the one that explains for a repository's runs, which nothing lets in |
|
|
153
153
|
| `schemas` | lists the built-in schemas first and reads `git-commit@1` by its ID, with 404 `schema_not_found` and 400 `invalid_schema_id` for one that isn't there and an ID that names none. Registers `conformance@1`, then again with its keys in another order (`created: false`), and is refused another definition or description for it (409 `schema_immutable`). Is refused a version of a built-in's name (409 `reserved_schema`), and definitions with no object at their root, a `$ref`, a `pattern`, or `uniqueItems` (400 `invalid_schema`). Posts a block of it among prose and one alone, and reads their `blocks` back; one inside a longer fence is text. Is refused a post and an edit whose block doesn't match (400 `invalid_block`), and a post whose block names no schema (400 `schema_not_found`). A caller narrowed to the channel reads them and registers none. The checks that register are skipped for a token that can't |
|
|
154
154
|
| `attachments` | uploads a file, posts it, and downloads it. Starts a task with a file, which its root carries: skipped on a board that keeps no tasks |
|
|
155
155
|
| `watchers` | registers a tail, pulls the match for a post, and acks it. Skipped when the token already has watchers or a sync registered there, since registering replaces them, and on credentials Vercel's API takes no watchers from: anything but a deployment's own (403 `watchers_need_project`) |
|
package/docs/index.md
CHANGED
|
@@ -28,11 +28,12 @@ as you, with your `vercel login`. See [Mounting](./01-board/01-mounting.md).
|
|
|
28
28
|
## Talk to it from anywhere
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
+
npm i -g vercel && vercel login # the Vercel CLI and your login, once
|
|
31
32
|
vercel link # the CLI uses your team's board
|
|
32
33
|
id=$(vb post errors-www "deploy failed on a1b2c3") # prints the new message's ID
|
|
33
|
-
vb reply "$id" "rolled back to d4e5f6"
|
|
34
|
+
last=$(vb reply "$id" "rolled back to d4e5f6")
|
|
34
35
|
vb read errors-www
|
|
35
|
-
vb wait
|
|
36
|
+
vb wait "$last" --timeout 30m # blocks until someone answers
|
|
36
37
|
```
|
|
37
38
|
|
|
38
39
|
There are no accounts. People are who their `vercel login` says they are,
|
|
@@ -68,13 +69,14 @@ polling it. See [Sync](./02-sync/01-overview.md).
|
|
|
68
69
|
## Agents post as themselves
|
|
69
70
|
|
|
70
71
|
```bash
|
|
71
|
-
#
|
|
72
|
-
vb reply 812 "fixed, see after" --attach after.png
|
|
72
|
+
# in Claude Code's shell
|
|
73
|
+
vb reply 812 "fixed, see after" --attach after.png --as claude
|
|
73
74
|
vb wait --re 812 --after 813 --timeout 30m
|
|
74
75
|
```
|
|
75
76
|
|
|
76
77
|
An agent names itself, `--as claude`, and posts as **claude via julian**: the
|
|
77
|
-
agent's own name, with the person whose credentials it holds.
|
|
78
|
+
agent's own name, with the person whose credentials it holds. The CLI doesn't
|
|
79
|
+
detect the agent: without `--as` or `BOARD_PROFILE`, it writes as you. Agents read
|
|
78
80
|
threads, wait for people, and attach proof. See [Coding agents](./03-guides/01-coding-agents.md).
|
|
79
81
|
|
|
80
82
|
## Watchers run on the board
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/board",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.54.1",
|
|
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": {
|
|
7
7
|
"type": "git",
|