@vercel/board 0.34.0 → 0.35.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-CdBcYPQH.mjs → access-BsP0hvcC.mjs} +1 -1
- package/dist/access.d.mts +2 -2
- package/dist/access.mjs +4 -4
- package/dist/{actors-MrIEr9LI.mjs → actors-DFOpTw89.mjs} +2 -2
- package/dist/{auth-aaoKt5DK.d.mts → auth-C21V0EK1.d.mts} +1 -1
- package/dist/{auth-DjoJygbG.mjs → auth-CrjXLgOb.mjs} +2 -2
- package/dist/{backend-u1sVvybh.d.mts → backend-D21q8mdm.d.mts} +3 -3
- package/dist/backend-local.d.mts +1 -1
- package/dist/backend-local.mjs +1 -1
- package/dist/{chat-provider-De0iDnUB.d.mts → chat-provider-DmZCmBkb.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 +1 -1
- package/dist/cli.mjs +5 -5
- package/dist/{commands-BkVMdXP1.d.mts → commands-BorACIFS.d.mts} +173 -0
- package/dist/{commands-B8oZEByR.mjs → commands-CENWob9m.mjs} +322 -26
- package/dist/{conformance-gqYBkXFS.mjs → conformance-CKrwglzA.mjs} +480 -87
- package/dist/conformance.d.mts +20 -2
- package/dist/conformance.mjs +1 -1
- package/dist/{engine-rtOVWsiF.mjs → engine-wN7quvbU.mjs} +2 -2
- package/dist/{errors-D8ifv16L.mjs → errors-rYDxZEuN.mjs} +98 -4
- package/dist/exports-BxljH73E.d.mts +4 -0
- package/dist/{exports-Bx2dGpzr.mjs → exports-GIRJm2Ja.mjs} +87 -22
- package/dist/{index-D6mK0Ial.d.mts → index-LREsSZb2.d.mts} +2 -2
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +4 -4
- package/dist/index.node.d.mts +6 -6
- package/dist/index.node.mjs +3 -3
- package/dist/inspect/app.js +32 -32
- package/dist/{local-CPz22MQ8.mjs → local-yKwdgukb.mjs} +6 -6
- package/dist/{main-DScDKwQN.mjs → main-DjokcEAL.mjs} +406 -23
- package/dist/{middleware-BjYpk4yq.mjs → middleware-BxgizazV.mjs} +1 -1
- package/dist/{provider-hB8QNrwm.d.mts → provider-DEOfc4Ls.d.mts} +21 -3
- package/dist/{routes-De4W6lEs.d.mts → routes-BpKdMvgX.d.mts} +19 -8
- package/dist/{serve-B1noQRkn.mjs → serve-CJ8hauK2.mjs} +4 -4
- package/dist/{server-Ov6GBJ8j.mjs → server-CtaTtyhw.mjs} +6 -6
- package/dist/{serving-2s7lqSBS.mjs → serving-6_bhBNAW.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/{targets-aMdbp84G.mjs → targets-n2i2ZOWI.mjs} +9 -5
- package/dist/{tokens-LHLrnV_P.mjs → tokens-Dn4cPZIr.mjs} +2 -2
- package/docs/01-board/01-mounting.md +7 -2
- package/docs/01-board/09-access.md +31 -0
- package/docs/03-guides/03-ci.md +4 -2
- package/docs/04-reference/01-cli.md +98 -14
- package/docs/04-reference/02-board.md +23 -3
- package/docs/04-reference/03-http.md +1 -1
- package/docs/04-reference/05-conformance.md +31 -5
- package/package.json +1 -1
- package/dist/exports-uwRl5qIj.d.mts +0 -4
|
@@ -1360,10 +1360,14 @@ declare const ReactBody: z.ZodObject<{
|
|
|
1360
1360
|
emoji: z.ZodString;
|
|
1361
1361
|
remove: z.ZodOptional<z.ZodBoolean>;
|
|
1362
1362
|
}, z.core.$strip>;
|
|
1363
|
-
/**
|
|
1363
|
+
/**
|
|
1364
|
+
* A channel to make before anything posts to it, and nothing else: a key it doesn't know is a 400,
|
|
1365
|
+
* so a client that asks for more than a channel (one that expects `private: true` to close it, say)
|
|
1366
|
+
* is told, never handed an open one.
|
|
1367
|
+
*/
|
|
1364
1368
|
declare const CreateChannelBody: z.ZodObject<{
|
|
1365
1369
|
path: z.ZodString;
|
|
1366
|
-
}, z.core.$
|
|
1370
|
+
}, z.core.$strict>;
|
|
1367
1371
|
/** At most this many labels in a label write's `if`. */
|
|
1368
1372
|
declare const LABEL_CONDITIONS_MAX = 16;
|
|
1369
1373
|
declare const LabelBody: z.ZodObject<{
|
|
@@ -1383,9 +1387,16 @@ type ScheduleInput = z.input<typeof ScheduleBody>;
|
|
|
1383
1387
|
type ScheduleBodyOutput = z.output<typeof ScheduleBody>;
|
|
1384
1388
|
type SchedulesQueryInput = z.input<typeof SchedulesQuery>;
|
|
1385
1389
|
/** A principal as `createGrant` and `updateGrant` take it. */
|
|
1390
|
+
/**
|
|
1391
|
+
* A principal as a handle takes it. A project's environments, and every project's, are production
|
|
1392
|
+
* when left out, so the board always gets them; a principal to remove goes by who it is, and keeps
|
|
1393
|
+
* none.
|
|
1394
|
+
*/
|
|
1386
1395
|
type PrincipalInput = z.input<typeof PrincipalInput>;
|
|
1387
|
-
/**
|
|
1388
|
-
type
|
|
1396
|
+
/** What a grant gives at a pattern, as a handle takes it: `'all'`, `'none'`, or permissions. `'none'` is `[]` on the wire. */
|
|
1397
|
+
type CanAt = 'all' | 'none' | readonly Permission[];
|
|
1398
|
+
/** A grant's `can`, as a handle takes it: each channel pattern and what it gives. */
|
|
1399
|
+
type GrantCan = Readonly<Record<string, CanAt>>;
|
|
1389
1400
|
/** What `createGrant` takes. */
|
|
1390
1401
|
type GrantInput = {
|
|
1391
1402
|
principals: readonly PrincipalInput[];
|
|
@@ -1397,9 +1408,9 @@ type UpdateGrantInput = {
|
|
|
1397
1408
|
remove?: readonly PrincipalInput[];
|
|
1398
1409
|
can?: GrantCan;
|
|
1399
1410
|
};
|
|
1400
|
-
/** What `token` takes: `can` as `access` writes it. */
|
|
1411
|
+
/** What `token` takes: `can` as `access` writes it, with `'none'` for a pattern it may do nothing in. */
|
|
1401
1412
|
type TokenInput = Omit<z.input<typeof TokenBody>, 'can'> & {
|
|
1402
|
-
can?: Can;
|
|
1413
|
+
can?: Can | GrantCan;
|
|
1403
1414
|
};
|
|
1404
1415
|
type SchedulesQueryOutput = z.output<typeof SchedulesQuery>;
|
|
1405
1416
|
/** A scheduled message. It posts as `by`, its creator; each message it posts carries `schedule: { id, n }`. */
|
|
@@ -1813,7 +1824,7 @@ declare const routes: {
|
|
|
1813
1824
|
readonly path: '/channels';
|
|
1814
1825
|
readonly body: z.ZodObject<{
|
|
1815
1826
|
path: z.ZodString;
|
|
1816
|
-
}, z.core.$
|
|
1827
|
+
}, z.core.$strict>;
|
|
1817
1828
|
};
|
|
1818
1829
|
readonly actors: {
|
|
1819
1830
|
readonly method: 'GET';
|
|
@@ -2652,4 +2663,4 @@ declare const routes: {
|
|
|
2652
2663
|
};
|
|
2653
2664
|
type RouteName = keyof typeof routes;
|
|
2654
2665
|
//#endregion
|
|
2655
|
-
export {
|
|
2666
|
+
export { ScheduleInput as $, ExternalCopy as $t, LinkedQuery as A, TypingResult as At, PostInput as B, FULL_ACCESS as Bt, InboxItem as C, ThreadsPage as Ct, LABEL_CONDITIONS_MAX as D, TokenInput as Dt, InboxQuery as E, TokenBody as Et, MessagesPage as F, routes as Ft, Ref as G, InvalidCan as Gt, PrincipalView as H, GrantChange as Ht, MessagesQuery as I, Access as It, RegistrationView as J, WrittenCan as Jt, RegisterBody as K, Level as Kt, MessagesQueryInput as L, AccessSummary as Lt, MatchesQuery as M, UpdateGrantInput as Mt, Me as N, UploadStartBody as Nt, LabelBody as O, TokenView as Ot, MessageView as P, UploadTicket as Pt, ScheduleBodyOutput as Q, Actor as Qt, ParsedFilters as R, Can as Rt, InboxEntry as S, ThreadView as St, InboxPushBody as T, ThreadsQueryInput as Tt, REGISTERED_WATCHERS_MAX as U, GrantChangeRefusal as Ut, PrincipalInput as V, Grant as Vt, ReactBody as W, GrantShape as Wt, RouteName as X, compileAccess as Xt, ResolvedSyncTarget as Y, checkGrantChange as Yt, ScheduleBody as Z, union as Zt, GrantBody as _, SyncReceiptBody as _t, CanAt as a, ExternalFile as an, SourceJoinBody as at, GrantView as b, SyncedView as bt, DeleteBody as c, SourceReadQuery as ct, EventsPage as d, SyncCopiesView as dt, Attachment as en, ScheduleView as et, EventsQuery as f, SyncFindInput as ft, FiltersInput as g, SyncImportInput as gt, Explanation as h, SyncImportBody as ht, BoardEventView as i, ExternalEvent as in, SourceJoin as it, MatchView as j, UpdateGrantBody as jt, LinkView as k, TypingBody as kt, Discovery as l, SyncBody as lt, ExplainQuery as m, SyncFindView as mt, ActorView as n, Labels as nn, SchedulesQueryInput as nt, ChannelView as o, ExternalLink as on, SourceMessage as ot, EventsQueryInput as p, SyncFindQuery as pt, RegisterInput as q, Permission as qt, ApiError as r, ExternalAuthor as rn, SchedulesQueryOutput as rt, CreateChannelBody as s, Link as sn, SourceRead as st, AckBody as t, Author as tn, SchedulesQuery as tt, EditBody as u, SyncCopiesQuery as ut, GrantCan as v, SyncReceiptInput as vt, InboxNextQuery as w, ThreadsQuery as wt, InboxAckBody as x, ThreadSummaryView as xt, GrantInput as y, SyncThreadView as yt, PostBody as z, ChannelPattern as zt };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { u as BoardError } from "./errors-
|
|
2
|
-
import { t as board, u as localTokenFile } from "./server-
|
|
3
|
-
import { t as oidcTokens } from "./tokens-
|
|
4
|
-
import { t as local } from "./local-
|
|
1
|
+
import { u as BoardError } from "./errors-rYDxZEuN.mjs";
|
|
2
|
+
import { t as board, u as localTokenFile } from "./server-CtaTtyhw.mjs";
|
|
3
|
+
import { t as oidcTokens } from "./tokens-Dn4cPZIr.mjs";
|
|
4
|
+
import { t as local } from "./local-yKwdgukb.mjs";
|
|
5
5
|
import { mkdir, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
6
6
|
import { userInfo } from "node:os";
|
|
7
7
|
import { dirname, join, resolve } from "node:path";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { d as createBoardClient, o as json, t as HttpError, u as BoardError } from "./errors-
|
|
1
|
+
import { d as createBoardClient, o as json, t as HttpError, u as BoardError } from "./errors-rYDxZEuN.mjs";
|
|
2
2
|
import "./schemas-BG205xds.mjs";
|
|
3
|
-
import { P as RegisterBody, Y as routes, a as compileWatcher, c as METHODS, i as canonicalWatchers } from "./targets-
|
|
4
|
-
import { a as DERIVED_ID, c as keyId, l as sha256 } from "./middleware-
|
|
5
|
-
import { a as registrant, o as wakePath, r as createVercel, t as createBoard } from "./exports-
|
|
3
|
+
import { P as RegisterBody, Y as routes, a as compileWatcher, c as METHODS, i as canonicalWatchers } from "./targets-n2i2ZOWI.mjs";
|
|
4
|
+
import { a as DERIVED_ID, c as keyId, l as sha256 } from "./middleware-BxgizazV.mjs";
|
|
5
|
+
import { a as registrant, o as wakePath, r as createVercel, t as createBoard } from "./exports-GIRJm2Ja.mjs";
|
|
6
6
|
import { execFile } from "node:child_process";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
8
8
|
import { mkdir, readFile, readdir, stat, unlink, writeFile } from "node:fs/promises";
|
|
@@ -1087,8 +1087,8 @@ function vercel(options = {}) {
|
|
|
1087
1087
|
function board(options = {}) {
|
|
1088
1088
|
return createBoard(options, {
|
|
1089
1089
|
backend: (fetch) => process.env.BOARD_URL?.trim() ? http() : vercel(fetch ? { fetch } : {}),
|
|
1090
|
-
sync: () => import("./engine-
|
|
1091
|
-
serving: () => import("./serving-
|
|
1090
|
+
sync: () => import("./engine-wN7quvbU.mjs"),
|
|
1091
|
+
serving: () => import("./serving-6_bhBNAW.mjs")
|
|
1092
1092
|
});
|
|
1093
1093
|
}
|
|
1094
1094
|
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as ownTeamId, n as discoveryIdentity, r as ownProjectId, t as oidcTokens } from "./tokens-
|
|
1
|
+
import { i as ownTeamId, n as discoveryIdentity, r as ownProjectId, t as oidcTokens } from "./tokens-Dn4cPZIr.mjs";
|
|
2
2
|
export { discoveryIdentity, oidcTokens, ownProjectId, ownTeamId };
|
package/dist/sync-chat-sdk.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as channels, g as SyncFn, p as SyncProvider } from "./provider-
|
|
2
|
-
import { r as ChatTransport, t as ChatInput } from "./chat-provider-
|
|
1
|
+
import { b as channels, g as SyncFn, p as SyncProvider } from "./provider-DEOfc4Ls.mjs";
|
|
2
|
+
import { r as ChatTransport, t as ChatInput } from "./chat-provider-DmZCmBkb.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { ReactionEvent } from "chat";
|
|
5
5
|
//#region src/sync/chat-sdk.d.ts
|
package/dist/sync-github.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as SyncContext, g as SyncFn, y as SyncUnit } from "./provider-
|
|
2
|
-
import { n as ChatSyncProvider } from "./chat-provider-
|
|
1
|
+
import { f as SyncContext, g as SyncFn, y as SyncUnit } from "./provider-DEOfc4Ls.mjs";
|
|
2
|
+
import { n as ChatSyncProvider } from "./chat-provider-DmZCmBkb.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { Adapter } from "chat";
|
|
5
5
|
//#region src/sync/github.d.ts
|
package/dist/sync-linear.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as ReceivedEvent, d as ResolvedTarget, f as SyncContext, g as SyncFn, o as ProviderPost, r as ProviderDelivery, y as SyncUnit } from "./provider-
|
|
3
|
-
import { n as ChatSyncProvider, t as ChatInput } from "./chat-provider-
|
|
1
|
+
import { st as SourceRead } from "./routes-BpKdMvgX.mjs";
|
|
2
|
+
import { c as ReceivedEvent, d as ResolvedTarget, f as SyncContext, g as SyncFn, o as ProviderPost, r as ProviderDelivery, y as SyncUnit } from "./provider-DEOfc4Ls.mjs";
|
|
3
|
+
import { n as ChatSyncProvider, t as ChatInput } from "./chat-provider-DmZCmBkb.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { Adapter } from "chat";
|
|
6
6
|
//#region src/sync/linear.d.ts
|
package/dist/sync-slack.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { b as channels, d as ResolvedTarget, f as SyncContext, g as SyncFn, o as ProviderPost, r as ProviderDelivery } from "./provider-
|
|
3
|
-
import { n as ChatSyncProvider, t as ChatInput } from "./chat-provider-
|
|
1
|
+
import { on as ExternalLink } from "./routes-BpKdMvgX.mjs";
|
|
2
|
+
import { b as channels, d as ResolvedTarget, f as SyncContext, g as SyncFn, o as ProviderPost, r as ProviderDelivery } from "./provider-DEOfc4Ls.mjs";
|
|
3
|
+
import { n as ChatSyncProvider, t as ChatInput } from "./chat-provider-DmZCmBkb.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { Adapter } from "chat";
|
|
6
6
|
//#region src/sync/slack.d.ts
|
package/dist/sync.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as envelope, C as render, D as SyncOverrides, E as RootOverride, O as SyncResult, S as mirror, T as ProviderEvent, _ as SyncIn, a as ProviderOptions, b as channels, c as ReceivedEvent, d as ResolvedTarget, f as SyncContext, g as SyncFn, h as Sync, i as ProviderFile, j as eventSchema, k as SyncRoot, l as RenderInput, m as UnreadableError, n as FileDelivery, o as ProviderPost, p as SyncProvider, r as ProviderDelivery, s as Receive, u as Renderer, v as SyncOut, w as EventBase, x as into, y as SyncUnit } from "./provider-
|
|
1
|
+
import { an as ExternalFile, in as ExternalEvent, rn as ExternalAuthor } from "./routes-BpKdMvgX.mjs";
|
|
2
|
+
import { A as envelope, C as render, D as SyncOverrides, E as RootOverride, O as SyncResult, S as mirror, T as ProviderEvent, _ as SyncIn, a as ProviderOptions, b as channels, c as ReceivedEvent, d as ResolvedTarget, f as SyncContext, g as SyncFn, h as Sync, i as ProviderFile, j as eventSchema, k as SyncRoot, l as RenderInput, m as UnreadableError, n as FileDelivery, o as ProviderPost, p as SyncProvider, r as ProviderDelivery, s as Receive, u as Renderer, v as SyncOut, w as EventBase, x as into, y as SyncUnit } from "./provider-DEOfc4Ls.mjs";
|
|
3
3
|
export { EventBase, type ExternalAuthor, ExternalEvent, type ExternalFile, type FileDelivery, type ProviderDelivery, type ProviderEvent, type ProviderFile, type ProviderOptions, type ProviderPost, type Receive, ReceivedEvent, type RenderInput, type Renderer, ResolvedTarget, type RootOverride, type Sync, type SyncContext, type SyncFn, type SyncIn, type SyncOut, SyncOverrides, SyncProvider, type SyncResult, type SyncRoot, type SyncUnit, UnreadableError, channels, envelope, eventSchema, into, mirror, render };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { m as DIRECT_UPLOAD_BYTES_MAX, p as ATTACHMENT_BYTES_MAX, r as badRequest, t as HttpError } from "./errors-
|
|
1
|
+
import { m as DIRECT_UPLOAD_BYTES_MAX, p as ATTACHMENT_BYTES_MAX, r as badRequest, t as HttpError } from "./errors-rYDxZEuN.mjs";
|
|
2
2
|
import { a as ChannelPath, c as LabelKey, d as MESSAGE_TEXT_MAX, l as LabelValue, o as Emoji, p as MessageText, r as AttachmentId, u as Labels, v as platformAvatar, y as storable } from "./schemas-BG205xds.mjs";
|
|
3
3
|
import { a as Link, i as ExternalTarget, l as isThreadTarget, n as ExternalEvent, o as Origin, t as ExternalAuthor } from "./external-CYe424fO.mjs";
|
|
4
|
-
import { o as options } from "./commands-
|
|
4
|
+
import { o as options } from "./commands-CENWob9m.mjs";
|
|
5
5
|
import { n as replaceMentions, t as extractMentions } from "./mentions-CB6ShY4R.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/api/routes.ts
|
|
@@ -469,8 +469,12 @@ const ReactBody = z.object({
|
|
|
469
469
|
emoji: Emoji,
|
|
470
470
|
remove: z.boolean().optional()
|
|
471
471
|
});
|
|
472
|
-
/**
|
|
473
|
-
|
|
472
|
+
/**
|
|
473
|
+
* A channel to make before anything posts to it, and nothing else: a key it doesn't know is a 400,
|
|
474
|
+
* so a client that asks for more than a channel (one that expects `private: true` to close it, say)
|
|
475
|
+
* is told, never handed an open one.
|
|
476
|
+
*/
|
|
477
|
+
const CreateChannelBody = z.strictObject({ path: ChannelPath });
|
|
474
478
|
const LabelBody = z.object({
|
|
475
479
|
set: Labels.optional(),
|
|
476
480
|
unset: z.array(LabelKey).optional(),
|
|
@@ -760,7 +764,7 @@ const routes = {
|
|
|
760
764
|
};
|
|
761
765
|
//#endregion
|
|
762
766
|
//#region src/version.ts
|
|
763
|
-
const VERSION = "0.
|
|
767
|
+
const VERSION = "0.35.0";
|
|
764
768
|
//#endregion
|
|
765
769
|
//#region src/server/backend.ts
|
|
766
770
|
/** The subscription sync's outbound runs on, in `BoardBinding.subscriptions`. No watcher's ID starts with `@`. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as unauthorized } from "./errors-
|
|
2
|
-
import { _ as privateHost, a as VERCEL_ISSUER, b as trustedIssuers, g as markVerified, i as TOKENS, m as issuerName } from "./auth-
|
|
1
|
+
import { l as unauthorized } from "./errors-rYDxZEuN.mjs";
|
|
2
|
+
import { _ as privateHost, a as VERCEL_ISSUER, b as trustedIssuers, g as markVerified, i as TOKENS, m as issuerName } from "./auth-CrjXLgOb.mjs";
|
|
3
3
|
import { createRemoteJWKSet, decodeJwt, jwtVerify } from "jose";
|
|
4
4
|
//#region src/server/identity.ts
|
|
5
5
|
let fromDisk;
|
|
@@ -64,10 +64,15 @@ on any backend, and the backend stores. SSE, [the handle](#the-handle),
|
|
|
64
64
|
the deployment's OIDC token and writes as its project,
|
|
65
65
|
`vercel:project:prj_x:production`. Elsewhere it sends `VERCEL_TOKEN`, or
|
|
66
66
|
your Vercel CLI login, and writes as you. `fetch` sends other credentials.
|
|
67
|
+
- **A board token reaches its own board, by its ID.** `BOARD_TOKEN` goes to
|
|
68
|
+
Vercel's API as it is, and acts as whoever minted it. Name its board in
|
|
69
|
+
`BOARD_URL`, `--url`, or `vercel({ board })`: finding one by name, or the
|
|
70
|
+
team's default, answers 403 `board_token_scope`. Registering watchers with
|
|
71
|
+
one answers 403 `board_token_unsupported`,
|
|
72
|
+
`a board token can't register watchers yet.`
|
|
67
73
|
- **What Vercel's API doesn't keep yet answers 501 `not_supported`:** files on
|
|
68
74
|
a scheduled message, labels on a scheduled reply, and a post's `sync`
|
|
69
|
-
targets.
|
|
70
|
-
yet. A channel's message and thread counts are left out.
|
|
75
|
+
targets. A channel's message and thread counts are left out.
|
|
71
76
|
|
|
72
77
|
A request's caller is who `board()` verified it is: `authenticate` checks its
|
|
73
78
|
credential for the board's URL, which a token's audience must equal, works out
|
|
@@ -76,6 +76,27 @@ console.log(await team.grants())
|
|
|
76
76
|
await team.revokeGrant(grant.id)
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
+
The CLI says the same with a flag for each principal, its modifiers after it
|
|
80
|
+
(see [`vb grants`](../04-reference/01-cli.md#grants)), and each command is the
|
|
81
|
+
handle call beside it. The handle fills in what the CLI does: `'none'` at a
|
|
82
|
+
pattern is `[]`, and a project without `environments` is its production
|
|
83
|
+
deployments.
|
|
84
|
+
|
|
85
|
+
| CLI | Handle |
|
|
86
|
+
| --- | --- |
|
|
87
|
+
| `vb grants` | `team.grants()` |
|
|
88
|
+
| `vb grants create --everyone --can 'security/=none'` | `team.createGrant({ principals: [{ kind: 'everyone' }], can: { 'security/': 'none' } })` |
|
|
89
|
+
| `vb grants create --user alice@acme.com --user bob@acme.com --can 'security/=all'` | `team.createGrant({ principals: [{ kind: 'user', email: 'alice@acme.com' }, { kind: 'user', email: 'bob@acme.com' }], can: { 'security/': 'all' } })` |
|
|
90
|
+
| `vb grants create --project sec --environment production,preview --can 'security/=read,post'` | `team.createGrant({ principals: [{ kind: 'project', project: 'sec', environments: ['production', 'preview'] }], can: { 'security/': ['read', 'post'] } })` |
|
|
91
|
+
| `vb grants create --github acme/web --workflow ci.yml --branch main --can 'ci/=post'` | `team.createGrant({ principals: [{ kind: 'github', repository: 'acme/web', workflow: 'ci.yml', branch: 'main' }], can: { 'ci/': ['post'] } })` |
|
|
92
|
+
| `vb grants create --oidc https://gitlab.com --claim project_id=42 --can 'ci/=post'` | `team.createGrant({ principals: [{ kind: 'oidc', issuer: 'https://gitlab.com', claims: { project_id: '42' } }], can: { 'ci/': ['post'] } })` |
|
|
93
|
+
| `vb grants create --app ship --can 'ship/=post'` | `team.createGrant({ principals: [{ kind: 'app', app: 'ship' }], can: { 'ship/': ['post'] } })` |
|
|
94
|
+
| `vb grants update g5 --add-user carol@acme.com` | `team.updateGrant('g5', { add: [{ kind: 'user', email: 'carol@acme.com' }] })` |
|
|
95
|
+
| `vb grants update g6 --remove-project sec --can 'security/=read'` | `team.updateGrant('g6', { remove: [{ kind: 'project', project: 'sec' }], can: { 'security/': ['read'] } })` |
|
|
96
|
+
| `vb grants revoke g4` | `team.revokeGrant('g4')` |
|
|
97
|
+
| `vb grants explain --user bob@acme.com security/incidents` | `team.explain('security/incidents', { user: 'bob@acme.com' })` |
|
|
98
|
+
| `vb channels create security --private` | `team.createChannel('security', { private: true })` |
|
|
99
|
+
|
|
79
100
|
| Principal | Names | Level |
|
|
80
101
|
| --- | --- | --- |
|
|
81
102
|
| `user` | a person on the team, by `email`, or by `userId` on a board that verifies tokens itself | one principal |
|
|
@@ -174,6 +195,16 @@ more specific pattern decides first.
|
|
|
174
195
|
its local user, the one `vb serve` mints a token for: a person on the team
|
|
175
196
|
is a principal like any other. Reading a closed channel still takes a
|
|
176
197
|
grant, an owner's too.
|
|
198
|
+
- **A private channel is two grants and the channel.**
|
|
199
|
+
`createChannel(path, { private: true })` makes a grant letting you in at
|
|
200
|
+
`<path>/`, then one closing it to `everyone`, then the channel. Before it
|
|
201
|
+
writes anything, it lists the grants, and refuses a path a grant other than
|
|
202
|
+
`*`'s reaches (409 `channel_granted`, naming it), since that grant would
|
|
203
|
+
still let in whom it names, and a path where it or a channel under it is
|
|
204
|
+
there (409 `channel_exists`), since the lock would close those too. Two
|
|
205
|
+
people making the same one at once never both keep a way in, and a grant
|
|
206
|
+
someone makes, or adds themselves to, before the lock lands undoes it, with
|
|
207
|
+
nothing made.
|
|
177
208
|
- **A grant takes only the keys it knows.** A misspelled one, `workflows` for
|
|
178
209
|
`workflow` say, is 400, never dropped, so a grant never names more than you
|
|
179
210
|
wrote.
|
package/docs/03-guides/03-ci.md
CHANGED
|
@@ -51,8 +51,10 @@ API by itself. A board that keeps [grants](../01-board/09-access.md#grants)
|
|
|
51
51
|
lets it in by its token: one on [`local()`](../01-board/10-local.md) that your
|
|
52
52
|
team serves in a long-running process, or a
|
|
53
53
|
[backend of your own](../01-board/01-mounting.md#a-backend-of-your-own).
|
|
54
|
-
Vercel's board
|
|
55
|
-
|
|
54
|
+
Vercel's board keeps these grants, but doesn't sign in GitHub or OIDC callers
|
|
55
|
+
yet, so a run's token gets a 401 there. The grant works once it does, with
|
|
56
|
+
nothing to change. Someone with `manage` in every channel grants the repo's
|
|
57
|
+
runs what they may do, with no deploy:
|
|
56
58
|
|
|
57
59
|
```text
|
|
58
60
|
$ vb grants create --github acme/www --event push --can 'errors-www=post,label;deploys=read,post'
|
|
@@ -179,12 +179,12 @@ itself.
|
|
|
179
179
|
$ vb read dev --name security --ensure
|
|
180
180
|
error: this project has no access to board security (prj_pong, preview).
|
|
181
181
|
|
|
182
|
-
|
|
182
|
+
Grant it: vb grants create --project prj_pong --environment preview --name security --can '*=read,post,react,label'
|
|
183
183
|
|
|
184
184
|
$ vb read dev
|
|
185
185
|
error: this project has no access to the team's board (prj_pong, preview).
|
|
186
186
|
|
|
187
|
-
|
|
187
|
+
Grant it: vb grants create --project prj_pong --environment preview --can '*=read,post,react,label'
|
|
188
188
|
```
|
|
189
189
|
- **A team's board has a URL too:** the one `whoami` prints for it
|
|
190
190
|
(`https://api.vercel.com/v1/messageboard/boards/<board>?teamId=<team>`), which
|
|
@@ -299,6 +299,7 @@ error document:
|
|
|
299
299
|
- **`reason` is what a program branches on:** `missing_scope`,
|
|
300
300
|
`login_required`, `permission_denied`, `deployment_protected`,
|
|
301
301
|
`board_not_found`, `board_not_granted`, `board_name_taken`,
|
|
302
|
+
`board_token_scope`, `board_token_unsupported`,
|
|
302
303
|
`message_not_found`, `channel_not_found`,
|
|
303
304
|
`unknown_command`, `unknown_option`, `invalid_arguments`, `timeout`, and
|
|
304
305
|
the board's own codes, such as `already_synced` or `no_scheduler`.
|
|
@@ -485,22 +486,91 @@ t1 feedback-widget feedback/=post expires in 30d
|
|
|
485
486
|
|
|
486
487
|
```text
|
|
487
488
|
vb grants [list]
|
|
489
|
+
vb grants create <principal>... --can <pattern=permissions>...
|
|
490
|
+
vb grants update <grant> [--add-<kind> <name>]... [--remove-<kind> <name>]... [--can <pattern=permissions>]...
|
|
491
|
+
vb grants explain [<principal>] <channel>
|
|
488
492
|
vb grants revoke <grant>
|
|
489
493
|
```
|
|
490
494
|
|
|
491
495
|
`vb grants` lists each grant's ID, the principals it names as the flags that
|
|
492
496
|
name them, and what it lets them do: `*` alone in words, any other pattern as
|
|
493
|
-
`pattern=permissions`, `none` for a closed one. It needs `manage` at `*`.
|
|
494
|
-
|
|
495
|
-
each pattern it names. See [Grants](../01-board/09-access.md#grants).
|
|
497
|
+
`pattern=permissions`, `none` for a closed one. It needs `manage` at `*`. See
|
|
498
|
+
[Grants](../01-board/09-access.md#grants).
|
|
496
499
|
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
500
|
+
A principal is a flag, and repeating flags names several:
|
|
501
|
+
|
|
502
|
+
| Flag | Names | Its modifiers |
|
|
503
|
+
| --- | --- | --- |
|
|
504
|
+
| `--user <email>` | a person on the team | |
|
|
505
|
+
| `--project <name\|id>` | a project's deployments | `--environment` |
|
|
506
|
+
| `--github <owner/repo>` | GitHub Actions runs in a repository | `--workflow`, `--branch`, `--event` |
|
|
507
|
+
| `--oidc <issuer>` | an issuer's tokens | `--claim name=value` |
|
|
508
|
+
| `--app <slug\|id>` | an app installed on the team | |
|
|
509
|
+
| `--all-users` | every person on the team | |
|
|
510
|
+
| `--all-projects` | every project's deployments on the team | `--environment` |
|
|
511
|
+
| `--all-apps` | every app installed on the team | |
|
|
512
|
+
| `--everyone` | everyone something else lets in | |
|
|
513
|
+
|
|
514
|
+
A modifier goes after the principal it's for, so one grant mixes them:
|
|
515
|
+
`--github acme/web --workflow ci.yml --github acme/api --workflow deploy.yml`.
|
|
516
|
+
`--environment` takes a comma-separated list and is `production` when left
|
|
517
|
+
out. `--workflow` matches the run's workflow file (`ci.yml` is
|
|
518
|
+
`.github/workflows/ci.yml`), `--branch` its `refs/heads/` branch, and
|
|
519
|
+
`--event` its event. `--can pattern=permissions` repeats; permissions are a
|
|
520
|
+
comma-separated list, `all`, or `none`. A board that verifies tokens itself,
|
|
521
|
+
as `vb serve` does, takes IDs: `--user u_123`, `--project prj_123`, and an
|
|
522
|
+
app's client ID.
|
|
523
|
+
|
|
524
|
+
`create` prints the grant it made as its row. `update` takes `--add-<kind>` and
|
|
525
|
+
`--remove-<kind>` for each kind (`--add-user`, `--remove-project`,
|
|
526
|
+
`--add-github … --workflow …`), and `--can`, which replaces the grant's.
|
|
527
|
+
Adding a project it names already adds the environments; to narrow one,
|
|
528
|
+
remove it and add it back in the same update. Each needs `manage` at the
|
|
529
|
+
patterns the grant names, before and after. `revoke` stops one.
|
|
530
|
+
|
|
531
|
+
```text
|
|
532
|
+
$ vb grants create --everyone --can 'security/=none'
|
|
533
|
+
created g4 --everyone security/=none
|
|
534
|
+
$ vb grants create --user alice@acme.com --user bob@acme.com --can 'security/=all'
|
|
535
|
+
created g5 --user alice@acme.com --user bob@acme.com security/=all
|
|
536
|
+
$ vb grants create --project sec --environment production,preview --can 'security/=read,post'
|
|
537
|
+
created g6 --project sec --environment production,preview security/=read,post
|
|
538
|
+
$ vb grants update g5 --add-user carol@acme.com
|
|
539
|
+
updated g5 --user alice@acme.com --user bob@acme.com --user carol@acme.com security/=all
|
|
540
|
+
$ vb grants update g6 --remove-project sec --add-project sec --environment production --can 'security/=read'
|
|
541
|
+
updated g6 --project sec --environment production security/=read
|
|
542
|
+
$ vb grants revoke g4
|
|
543
|
+
revoked g4
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
Vercel's board keeps a grant for `--github` or `--oidc`, but doesn't sign in
|
|
547
|
+
GitHub or OIDC callers yet, so `create` says so under it, and with `--json` in
|
|
548
|
+
`warnings` (`callers_not_signed_in`):
|
|
549
|
+
|
|
550
|
+
```text
|
|
551
|
+
$ vb grants create --github acme/web --can 'ci/=post' --scope acme
|
|
552
|
+
created g4 --github acme/web ci/=post
|
|
553
|
+
note Vercel's board doesn't sign in GitHub or OIDC callers yet: this grant works once it does
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
`explain` says which grant decides a channel: the pattern that won and those
|
|
557
|
+
it won over, the closest grants there, and what they give. It explains you, or
|
|
558
|
+
with `manage` at `*`, the one `--user`, `--project` (in one `--environment`),
|
|
559
|
+
`--github`, `--oidc`, or `--app` it names. A local board has no apps, so
|
|
560
|
+
nothing lets one in there. A caller that can't list grants sees that
|
|
561
|
+
one decides, not which:
|
|
562
|
+
|
|
563
|
+
```text
|
|
564
|
+
$ vb grants explain --user bob@acme.com security/incidents
|
|
565
|
+
security/ wins over *. Closest grant for bob@acme.com: g4 (--user): all.
|
|
566
|
+
$ vb grants explain --user dan@acme.com security/incidents
|
|
567
|
+
security/ wins over *. Closest grant for dan@acme.com: g3 (--everyone): none.
|
|
568
|
+
$ vb grants explain dev
|
|
569
|
+
* wins. Closest grant for you: g1 (--all-users): all.
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
With `--json`, `create` and `update` print `{ grant, outcome }` and `explain`
|
|
573
|
+
prints `{ explanation }`.
|
|
504
574
|
|
|
505
575
|
## Reading
|
|
506
576
|
|
|
@@ -508,7 +578,7 @@ revoked g2
|
|
|
508
578
|
|
|
509
579
|
```text
|
|
510
580
|
vb channels
|
|
511
|
-
vb channels create <channel>
|
|
581
|
+
vb channels create <channel> [--private]
|
|
512
582
|
```
|
|
513
583
|
|
|
514
584
|
Channels, grouped by path prefix, each with its thread and message counts and
|
|
@@ -527,8 +597,22 @@ $ vb channels create dev/alerts
|
|
|
527
597
|
dev/alerts already exists
|
|
528
598
|
```
|
|
529
599
|
|
|
600
|
+
`--private` closes it to everyone but you, as `createChannel(path, { private:
|
|
601
|
+
true })` does: a grant letting you in, one closing it to everyone else, then
|
|
602
|
+
the channel. It needs `manage` at `*`, since it lists the grants first, and
|
|
603
|
+
makes nothing where the channel, or one under it, is there already, or where a
|
|
604
|
+
grant other than `*`'s reaches it already, which it names, since that grant
|
|
605
|
+
would still let in whom it names:
|
|
606
|
+
|
|
607
|
+
```text
|
|
608
|
+
$ vb channels create security --private
|
|
609
|
+
created channel security
|
|
610
|
+
created g7 --user alice@acme.com security/=all
|
|
611
|
+
created g8 --everyone security/=none
|
|
612
|
+
```
|
|
613
|
+
|
|
530
614
|
With `--json`, it prints `{ channel, outcome }`, where `outcome` is `created`
|
|
531
|
-
or `unchanged
|
|
615
|
+
or `unchanged`, and with `--private`, the `grants` it made.
|
|
532
616
|
|
|
533
617
|
### actors
|
|
534
618
|
|
|
@@ -310,8 +310,10 @@ revokeGrant(id: string): Promise<{ revoked: boolean }>
|
|
|
310
310
|
```
|
|
311
311
|
|
|
312
312
|
`createGrant` lets `principals` do what `can` says: a map from channel pattern
|
|
313
|
-
to `'all'` or a list of permissions,
|
|
314
|
-
|
|
313
|
+
to `'all'`, `'none'`, or a list of permissions, which the handle sends as the
|
|
314
|
+
protocol has it (`'none'` as `[]`). A `project` or `all-projects` without
|
|
315
|
+
`environments` is its production deployments. The same principals again are
|
|
316
|
+
another grant. `updateGrant` adds principals (a project it names already
|
|
315
317
|
gets the new environments), removes them by who they are, and replaces `can`.
|
|
316
318
|
Making or widening one needs what you'd grant: `manage` at its patterns and
|
|
317
319
|
under them wherever your own limits narrow you, and what `everyone` gives, for
|
|
@@ -414,7 +416,7 @@ that reply in it.
|
|
|
414
416
|
|
|
415
417
|
```ts
|
|
416
418
|
channels(): Promise<ChannelView[]> // { path, lastIndex?, messages?, threads? }
|
|
417
|
-
createChannel(path: string): Promise<{ channel: ChannelView; created: boolean }>
|
|
419
|
+
createChannel(path: string, options?: { private?: boolean }): Promise<{ channel: ChannelView; created: boolean; grants?: GrantView[] }>
|
|
418
420
|
actors(): Promise<Actor[]> // { id, kind, handle, name, avatar }
|
|
419
421
|
me(): Promise<Me> // who this handle writes as
|
|
420
422
|
discovery(): Promise<Discovery> // no token needed: url, audience, team_id, project_id, version, sync
|
|
@@ -433,6 +435,24 @@ and Vercel's board, which counts nothing in a channel, leaves them out.
|
|
|
433
435
|
would. It needs `read` and `post` there. `created` is false for one that's
|
|
434
436
|
there already, made by a post or another create, which it leaves as it is.
|
|
435
437
|
|
|
438
|
+
`{ private: true }` closes it to everyone but you, with the grant methods
|
|
439
|
+
alone: a grant letting you in at `<path>/`, then one closing `<path>/` to
|
|
440
|
+
`everyone`, then the channel, answered as `grants`. Before it writes anything,
|
|
441
|
+
it refuses a caller that's neither a person nor a project's deployment (400
|
|
442
|
+
`no_own_principal`), one that can't list grants, a path a grant other than
|
|
443
|
+
`*`'s reaches (409 `channel_granted`, naming it), since that grant would still
|
|
444
|
+
let in whom it names, and a path where it or a channel under it is there (409
|
|
445
|
+
`channel_exists`), since closing `security/` closes `security/incidents` too.
|
|
446
|
+
A failure part way never shuts you out: it leaves the channel open with a
|
|
447
|
+
grant too many, or closed and not made yet. A board that keeps no grants fails
|
|
448
|
+
on the listing, with nothing made. Once its own grant is made, it lists the
|
|
449
|
+
grants again and takes its own back if another reaches the path, so two people
|
|
450
|
+
making the same channel at once never both keep a way in. Once the lock is
|
|
451
|
+
made, it lists them a last time: a grant someone made before the lock landed,
|
|
452
|
+
or its own two changed (someone added to its grant, or the lock opened), would
|
|
453
|
+
still let them in, so it takes both of its grants back, the lock first, and
|
|
454
|
+
refuses with `channel_granted`.
|
|
455
|
+
|
|
436
456
|
`discovery()` is the backend's: on `local()`, the board's own, and with
|
|
437
457
|
`BOARD_URL` set, the board at that URL's.
|
|
438
458
|
|
|
@@ -99,7 +99,7 @@ a refused write it can read answers 403. `GET /me` returns the caller's
|
|
|
99
99
|
| GET | `/` | Discovery (no token): `{ version, url, audience, team_id, project_id, sync, wake_by_path? }`, where `sync` lists each entry's `key` and `platform`, and `wake_by_path` says `POST /watchers` takes a `path`. A board with no backend has none: it answers only wake-ups and webhooks |
|
|
100
100
|
| GET | `/me` | Who this token and profile write as: `{ actor, principal, kind, handle, name, avatar, profile, session, expiresAt, can }`, where `can` maps each channel pattern to its permissions |
|
|
101
101
|
| GET | `/channels` | `{ channels, cursor }`: each `{ path, lastIndex?, messages?, threads? }`, sorted by path. A board that doesn't count them, as one on Vercel's API doesn't, leaves the counts out |
|
|
102
|
-
| 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 |
|
|
102
|
+
| 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 |
|
|
103
103
|
| GET | `/actors` | `{ actors, cursor }`: each `{ id, kind, handle, name, avatar }`, sorted by handle |
|
|
104
104
|
| GET | `/messages` | `{ messages, cursor }`, filtered. See [Listing messages](#listing-messages) |
|
|
105
105
|
| GET | `/threads` | `{ threads, cursor }`: a summary per matching thread. See [Listing threads](#listing-threads) |
|
|
@@ -51,6 +51,30 @@ that secret as the credential, as `BOARD_TOKEN` sends it. `vb conformance`
|
|
|
51
51
|
passes it. From code, pass your own, which a backend of your own can make with
|
|
52
52
|
`board({ backend })`, or that check is skipped.
|
|
53
53
|
|
|
54
|
+
Every grant it makes is in `conformance/grants/`, the same subtree and the same
|
|
55
|
+
channels each run, so a run leaves no channel behind and no grant reaches
|
|
56
|
+
outside it. It revokes them all when a check ends, and a revoke that fails
|
|
57
|
+
fails the check. Two runs on one board at once see each other's grants there,
|
|
58
|
+
so run one at a time, on a scratch board.
|
|
59
|
+
|
|
60
|
+
The grants checks name a project, a GitHub repository, a person who's a
|
|
61
|
+
viewer, and an app installed on the team. A board that verifies tokens
|
|
62
|
+
itself, as `vb serve` does, takes the made-up IDs they use by default, and
|
|
63
|
+
skips the app's check, since it has no apps. One that looks names up, as a
|
|
64
|
+
board on Vercel's API does, needs real ones on its team, or skips the checks
|
|
65
|
+
that name them: pass `principals`, with a repository no grant names. None may
|
|
66
|
+
be the run's own project, repository, or app, since the checks would change
|
|
67
|
+
what the run itself may do: it throws before it writes anything, or, for a
|
|
68
|
+
project named by name, which only the board can resolve, after one grant that
|
|
69
|
+
changes nothing for the run, which it revokes.
|
|
70
|
+
|
|
71
|
+
```ts scripts/conformance.ts
|
|
72
|
+
import { board } from '@vercel/board'
|
|
73
|
+
import { conformance } from '@vercel/board/conformance'
|
|
74
|
+
|
|
75
|
+
const report = await conformance(board(), { principals: { project: 'web', repository: 'acme/web', viewer: 'val@acme.com', app: 'ship' } })
|
|
76
|
+
```
|
|
77
|
+
|
|
54
78
|
## What it checks
|
|
55
79
|
|
|
56
80
|
The whole protocol, on every board:
|
|
@@ -89,10 +113,10 @@ Then the rest, a group each in the report:
|
|
|
89
113
|
| Group | Check |
|
|
90
114
|
| --- | --- |
|
|
91
115
|
| `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 |
|
|
92
|
-
| `grants` | grants a project
|
|
116
|
+
| `grants` | grants a project, lists it, and revokes it twice. Makes a second grant for the same principals, adds 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 token without `manage` changes no grant, and one with it only under `conformance/grants/inner/` only there. A token kept 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 token can't change the board's grants, when the board mints no tokens (501, 404, or 403), 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 |
|
|
93
117
|
| `tokens` | mints a token for an hour that reads the channel, checks its `can` and its expiry, lists it without its secret, and revokes it twice. Then, with another one's secret: `/me` names its minter and only what it may read, it reads the channel and can't post there, and once it's revoked, it's refused with a 401 |
|
|
94
118
|
| `attachments` | uploads a file, posts it, and downloads it |
|
|
95
|
-
| `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 |
|
|
119
|
+
| `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 a board token Vercel's API won't register watchers for yet (403 `board_token_unsupported`) |
|
|
96
120
|
| `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. 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 |
|
|
97
121
|
|
|
98
122
|
Every board answers all of them: see
|
|
@@ -100,12 +124,14 @@ Every board answers all of them: see
|
|
|
100
124
|
schedules, grants, or files, or issue no tokens, and say so: one that answers
|
|
101
125
|
one of those groups' checks with a 501 has it skipped, `not kept here`, with
|
|
102
126
|
what the board said. A board that's meant to keep them and doesn't yet answers
|
|
103
|
-
otherwise, and fails: Vercel's boards fail
|
|
104
|
-
|
|
127
|
+
otherwise, and fails: Vercel's boards fail the tokens group until Vercel's API
|
|
128
|
+
keeps tokens. A
|
|
105
129
|
[backend of your own](../01-board/01-mounting.md#a-backend-of-your-own) that
|
|
106
130
|
keeps no grants, schedules, or files answers 501 `no_grants`, `no_scheduler`,
|
|
107
131
|
or `no_files`.
|
|
108
|
-
`vb serve` keeps everything, so it passes every check
|
|
132
|
+
`vb serve` keeps everything, so it passes every check but four: it has no
|
|
133
|
+
team roles to cap anyone with and no apps, no run can check a member shut out
|
|
134
|
+
under a lock, and grants across teams aren't specified yet.
|
|
109
135
|
|
|
110
136
|
## The report
|
|
111
137
|
|
package/package.json
CHANGED