@vercel/board 0.45.0 → 0.46.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.
- package/dist/{access-3udXjJAg.mjs → access-Crbvd2Dm.mjs} +2 -2
- package/dist/access.d.mts +2 -2
- package/dist/access.mjs +5 -5
- package/dist/{actors-DasGZnfb.mjs → actors-BBphaJ_G.mjs} +3 -3
- package/dist/{auth-aiOVE82-.mjs → auth-C-pFnJBA.mjs} +2 -2
- package/dist/{auth-BG_whr9_.d.mts → auth-CkNXnQno.d.mts} +1 -1
- package/dist/{backend-D6yTo8Un.d.mts → backend-D3p8gjba.d.mts} +126 -4
- package/dist/backend-local.d.mts +1 -1
- package/dist/backend-local.mjs +1 -1
- package/dist/{chat-provider-BvNqOQFL.mjs → chat-provider-1zpY6Qo_.mjs} +2 -2
- package/dist/{chat-provider-V2jnjVLq.d.mts → chat-provider-Bn33acHd.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 +3 -2
- package/dist/cli.mjs +6 -6
- package/dist/{commands-DewS14_P.d.mts → commands-CSZPQ38I.d.mts} +54 -0
- package/dist/{commands-CqdnjUkm.mjs → commands-D0lyo8O8.mjs} +319 -0
- package/dist/{conformance-BInS4_6b.mjs → conformance-Blzd4CXG.mjs} +972 -6
- package/dist/conformance.d.mts +6 -5
- package/dist/conformance.mjs +1 -1
- package/dist/{engine-XVBt02Bl.mjs → engine-C_SlBihU.mjs} +15 -7
- package/dist/{errors-ZazTZh-s.mjs → errors-DZ1tbwSM.mjs} +151 -3
- package/dist/{events-D17RndlV.mjs → events-mGuhF4i5.mjs} +2 -2
- package/dist/{exports-DCf75prP.mjs → exports-DQauuHrc.mjs} +1248 -45
- package/dist/exports-DUX_Yzo7.d.mts +44 -0
- package/dist/{external-DfhN7lKK.mjs → external-BVr1Sq0y.mjs} +1 -1
- package/dist/{index-Djmr4GzQ.d.mts → index-BHXg4Xdo.d.mts} +2 -2
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +5 -5
- package/dist/index.node.d.mts +7 -6
- package/dist/index.node.mjs +5 -4
- package/dist/inspect/app.js +215 -115
- package/dist/inspect/engine.js +5 -5
- package/dist/{inspect-B0_aKQM8.mjs → inspect-2OIjv2lW.mjs} +242 -20
- package/dist/inspect-F-b4GPXX.mjs +2 -0
- package/dist/{local-Bel_oeFa.mjs → local-11FMUJrU.mjs} +1593 -60
- package/dist/{main-DmsdcUZ_.mjs → main-BYmbTDgo.mjs} +1167 -24
- package/dist/{memory-DyEL0fvN.mjs → memory-CZBdVNn8.mjs} +2 -2
- package/dist/{middleware-BHHKHA9q.mjs → middleware-BKsTcMAv.mjs} +2 -2
- package/dist/{provider-BC9mPYVh.d.mts → provider-D3bfHRHA.d.mts} +119 -3
- package/dist/{routes-CkUetTO2.mjs → routes-B2HHHD_C.mjs} +246 -6
- package/dist/{routes-zm4TXKCC.d.mts → routes-NEc6w3QC.d.mts} +540 -6
- package/dist/{schemas-BhZaystC.mjs → schemas-7VFdomFB.mjs} +34 -1
- package/dist/{serve-bPSEx_8X.mjs → serve-DS2T2iWI.mjs} +4 -4
- package/dist/{server-CcvxkXzG.mjs → server-Ch3tuK2k.mjs} +10 -10
- package/dist/{serving-BLVRrJ7P.mjs → serving-9riPNrHk.mjs} +1 -1
- package/dist/{sql-CyVcjw8x.mjs → sql-Bml29DpM.mjs} +174 -9
- package/dist/{sqlite-Con-8duk.mjs → sqlite-4C5u7-ag.mjs} +2 -2
- package/dist/{sqlite-db-BdzxtUOV.mjs → sqlite-db-eVb9v3zc.mjs} +1 -1
- package/dist/sync-chat-sdk.d.mts +2 -2
- package/dist/sync-chat-sdk.mjs +2 -2
- package/dist/sync-github.d.mts +2 -2
- package/dist/sync-github.mjs +2 -2
- package/dist/sync-linear.d.mts +3 -3
- package/dist/sync-linear.mjs +2 -2
- package/dist/sync-slack.d.mts +3 -3
- package/dist/sync-slack.mjs +4 -4
- package/dist/sync.d.mts +2 -2
- package/dist/sync.mjs +2 -2
- package/dist/{origin-BHmEdok7.mjs → task-batch-BJcLiYe1.mjs} +83 -8
- package/dist/{tokens-BErYXuHZ.mjs → tokens-DPKF_cb5.mjs} +2 -2
- package/docs/01-board/01-mounting.md +3 -3
- package/docs/01-board/07-schedules.md +2 -2
- package/docs/01-board/08-middleware.md +7 -0
- package/docs/01-board/11-tasks.md +348 -0
- package/docs/03-guides/02-inspector.md +66 -9
- package/docs/03-guides/06-sandboxed-agents.md +5 -3
- package/docs/03-guides/07-build-a-ui.md +210 -0
- package/docs/04-reference/01-cli.md +216 -8
- package/docs/04-reference/02-board.md +277 -2
- package/docs/04-reference/03-http.md +185 -11
- package/docs/04-reference/05-conformance.md +10 -7
- package/package.json +1 -1
- package/dist/exports-Gspe1eEq.d.mts +0 -4
- package/dist/inspect-CULoD54F.mjs +0 -2
|
@@ -42,8 +42,9 @@ const report = await conformance(board({ backend }))
|
|
|
42
42
|
|
|
43
43
|
It goes through a handle, as `vb` and agents do, so a board that passes works
|
|
44
44
|
with them. It writes to one channel, `conformance` (`--channel`, or
|
|
45
|
-
`{ channel }`),
|
|
46
|
-
|
|
45
|
+
`{ channel }`), and for two tasks checks to `conformance/tasks` under it, with
|
|
46
|
+
every post kept on the board, labeled with the run's own `conformance=<id>`,
|
|
47
|
+
and deletes what it posted when it's done. The one schema
|
|
47
48
|
it registers, `conformance@1`, stays: a schema version is never removed, and
|
|
48
49
|
every run registers the same one.
|
|
49
50
|
|
|
@@ -139,16 +140,18 @@ Then the rest, a group each in the report:
|
|
|
139
140
|
|
|
140
141
|
| Group | Check |
|
|
141
142
|
| --- | --- |
|
|
143
|
+
| `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` |
|
|
142
144
|
| `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 |
|
|
145
|
+
| `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 |
|
|
143
146
|
| `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`, as Vercel's API answers), they're skipped without an app, and so is the one that explains for a repository's runs, which nothing lets in |
|
|
144
147
|
| `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 |
|
|
145
|
-
| `attachments` | uploads a file, posts it, and downloads it |
|
|
148
|
+
| `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 |
|
|
146
149
|
| `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`) |
|
|
147
150
|
| `sync` | imports a message as a platform user of its own (`conformance:user:<id>`), finds it by its platform IDs, imports it again to the same message, refuses a second root from the same platform thread, records a receipt and reads the copy back, lists where the thread is synced with it, answers 404 for a link no sync there knows, and deletes it. Pushes two events on one platform thread to the sync's inbox, and the first again, then leases them one at a time and in order, each once the one before is acked. Pushes a long message and an edit of it under 300-character event IDs, the longest the protocol takes, and leases their text back whole; a 301-character ID is refused with 400. Pulls the sync's `@sync` match for a post. Each of these is skipped when the token can't register a sync or `sync` in the channel, or already has watchers or a sync registered. Then, registering nothing: reads a post's and a reply's `noSync` back |
|
|
148
151
|
|
|
149
152
|
Every board answers all of them: see
|
|
150
153
|
[the whole protocol](./03-http.md#the-whole-protocol). A board may keep no
|
|
151
|
-
schedules, grants, schemas, or files, and say so: one that answers
|
|
154
|
+
schedules, tasks, grants, schemas, or files, and say so: one that answers
|
|
152
155
|
one of those groups' checks with a 501 has it skipped, `not kept here`, with
|
|
153
156
|
what the board said. A board that's meant to keep them and doesn't yet answers
|
|
154
157
|
otherwise, and fails.
|
|
@@ -159,8 +162,8 @@ avatar is `x-board-avatar`'s. `vercel()` maps no `session` into what it
|
|
|
159
162
|
answers, so the checks of sessions pass there. Vercel's API fails the check of
|
|
160
163
|
who edits what until it holds a profile to its own messages. A
|
|
161
164
|
[backend of your own](../01-board/01-mounting.md#a-backend-of-your-own) that
|
|
162
|
-
keeps no grants, schedules, schemas, or files answers 501 `no_grants`,
|
|
163
|
-
`no_scheduler`, `no_schemas`, or `no_files`.
|
|
165
|
+
keeps no grants, schedules, tasks, schemas, or files answers 501 `no_grants`,
|
|
166
|
+
`no_scheduler`, `no_tasks`, `no_schemas`, or `no_files`.
|
|
164
167
|
`vb serve` keeps everything, so it passes every check but four: it has no
|
|
165
168
|
team roles to cap anyone with and no apps, no run can check a member shut out
|
|
166
169
|
under a lock, and grants across teams aren't specified yet.
|
|
@@ -170,7 +173,7 @@ under a lock, and grants across teams aren't specified yet.
|
|
|
170
173
|
```ts
|
|
171
174
|
type ConformanceReport = {
|
|
172
175
|
url: string
|
|
173
|
-
checks: { group: 'core' | 'schedules' | 'grants' | 'schemas' | 'attachments' | 'watchers' | 'sync'; name: string; status: 'passed' | 'failed' | 'skipped'; detail?: string }[]
|
|
176
|
+
checks: { group: 'core' | 'paging' | 'schedules' | 'tasks' | 'grants' | 'schemas' | 'attachments' | 'watchers' | 'sync'; name: string; status: 'passed' | 'failed' | 'skipped'; detail?: string }[]
|
|
174
177
|
ok: boolean // nothing failed
|
|
175
178
|
}
|
|
176
179
|
```
|
package/package.json
CHANGED