@vercel/board 0.53.0 → 0.54.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/README.md +4 -3
  2. package/dist/{access-Pcar1gwx.mjs → access-HzqFpgL_.mjs} +1 -1
  3. package/dist/access.d.mts +3 -3
  4. package/dist/access.mjs +5 -5
  5. package/dist/{actors-XKUrjOfO.mjs → actors-D-u6bitG.mjs} +2 -2
  6. package/dist/{auth-C2CxMl2p.mjs → auth-D9ycDQK0.mjs} +34 -12
  7. package/dist/{auth-BoYunD5t.d.mts → auth-ULldUvir.d.mts} +8 -2
  8. package/dist/{backend-DJobr4nr.d.mts → backend-BHN6GTjB.d.mts} +8 -7
  9. package/dist/backend-local.d.mts +1 -1
  10. package/dist/backend-local.mjs +1 -1
  11. package/dist/{chat-provider-BSHlV2lw.d.mts → chat-provider-F7UqWVZK.d.mts} +2 -2
  12. package/dist/cli-commands.d.mts +1 -1
  13. package/dist/cli-commands.mjs +1 -1
  14. package/dist/cli-embedded.d.mts +2 -2
  15. package/dist/cli-embedded.mjs +2 -2
  16. package/dist/cli.mjs +6 -6
  17. package/dist/{client-oYThy3CR.d.mts → client-CFHunEFn.d.mts} +8 -2
  18. package/dist/{commands-B_gbi2sU.mjs → commands-B5SXeo4W.mjs} +14 -9
  19. package/dist/{commands-B6pgzwTI.d.mts → commands-DLPIX7Jw.d.mts} +3 -1
  20. package/dist/{conformance-Cz1Elmgj.mjs → conformance-CyQG0jky.mjs} +3 -4
  21. package/dist/conformance.d.mts +3 -4
  22. package/dist/conformance.mjs +1 -1
  23. package/dist/{engine-506f7GEM.mjs → engine-C8wCzkw-.mjs} +2 -2
  24. package/dist/{routes-GF5ukHYX.mjs → errors-DDfXnZ2b.mjs} +875 -4
  25. package/dist/{exports-CF_nUsT5.d.mts → exports-BBmjHyCB.d.mts} +4 -4
  26. package/dist/{exports-CBukc8T3.mjs → exports-JUhj5Bl3.mjs} +119 -70
  27. package/dist/{index-CM2u0wGd.d.mts → index-Ce3SDZ3Y.d.mts} +2 -2
  28. package/dist/index.d.mts +6 -6
  29. package/dist/index.mjs +4 -4
  30. package/dist/index.node.d.mts +7 -7
  31. package/dist/index.node.mjs +4 -4
  32. package/dist/inspect/app.js +69 -69
  33. package/dist/inspect/engine.js +3 -3
  34. package/dist/inspect-BN7V9e-M.mjs +2 -0
  35. package/dist/{inspect-PQsEgXRQ.mjs → inspect-CrVs-iEi.mjs} +2 -2
  36. package/dist/inspect.d.mts +1 -1
  37. package/dist/inspect.mjs +1 -1
  38. package/dist/{local-CwcmqEoa.mjs → local-RoMUU6QX.mjs} +10 -10
  39. package/dist/{main-gNAS2WbP.mjs → main-B_gzTjBR.mjs} +300 -91
  40. package/dist/{middleware-DXiwepsR.mjs → middleware-BY4qqIh3.mjs} +1 -1
  41. package/dist/{provider-WjdBsRLR.d.mts → provider-DgGp4Zej.d.mts} +2 -2
  42. package/dist/{routes-BpvyXQwv.d.mts → routes-DNmQSOvQ.d.mts} +16 -1
  43. package/dist/{serve-Ci5KT11x.mjs → serve-Cz1NynhG.mjs} +6 -6
  44. package/dist/{server-XsbC50nY.mjs → server-CdBXNUxf.mjs} +68 -11
  45. package/dist/{serving-C6Ao7i-7.mjs → serving-C1mhZQqH.mjs} +1 -1
  46. package/dist/{shell-BiCBL1w_.mjs → shell-Cqn38XUs.mjs} +1 -1
  47. package/dist/sync-chat-sdk.d.mts +2 -2
  48. package/dist/sync-github.d.mts +2 -2
  49. package/dist/sync-linear.d.mts +3 -3
  50. package/dist/sync-slack.d.mts +3 -3
  51. package/dist/sync.d.mts +2 -2
  52. package/dist/{task-batch-nqYGszDJ.mjs → task-batch-CVamHB-W.mjs} +4 -5
  53. package/dist/{tokens-tulRtEWx.mjs → tokens-B3gXkQCs.mjs} +2 -2
  54. package/dist/{version-CBjh_ogp.mjs → version-DBaKHEZS.mjs} +1 -1
  55. package/docs/01-board/01-mounting.md +8 -6
  56. package/docs/01-board/03-identity.md +1 -1
  57. package/docs/01-board/05-reading.md +34 -7
  58. package/docs/01-board/09-access.md +11 -2
  59. package/docs/01-board/11-tasks.md +5 -3
  60. package/docs/01-quickstart.md +19 -5
  61. package/docs/03-guides/03-ci.md +71 -43
  62. package/docs/03-guides/04-triage.md +4 -4
  63. package/docs/04-reference/01-cli.md +30 -22
  64. package/docs/04-reference/02-board.md +8 -4
  65. package/docs/04-reference/03-http.md +14 -5
  66. package/docs/04-reference/05-conformance.md +1 -1
  67. package/docs/index.md +7 -5
  68. package/package.json +2 -2
  69. package/dist/errors-Cv0TGBt5.mjs +0 -857
  70. package/dist/inspect-SEaGzhvh.mjs +0 -2
@@ -935,6 +935,12 @@ declare const ChannelsQuery: z.ZodObject<{
935
935
  after: z.ZodOptional<z.ZodString>;
936
936
  limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
937
937
  }, z.core.$strict>;
938
+ /** How many actors one read of them by ID names at most. */
939
+ declare const ACTORS_BY_ID_MAX = 100;
940
+ /** The board's actors, or with `id`, only the ones it names: someone it doesn't have is left out. */
941
+ declare const ActorsQuery: z.ZodObject<{
942
+ id: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
943
+ }, z.core.$strict>;
938
944
  /**
939
945
  * A thread read in part: the root, and of its replies the ones after one of its messages (`after`), `limit` of
940
946
  * them. With `after` they're the first after it, to read on from; without, the newest.
@@ -1867,6 +1873,7 @@ type SyncFindInput = z.input<typeof SyncFindQuery>;
1867
1873
  type ChannelMessagesQueryInput = z.input<typeof ChannelMessagesQuery>;
1868
1874
  type ThreadQueryInput = z.input<typeof ThreadQuery>;
1869
1875
  type ChannelsQueryInput = z.input<typeof ChannelsQuery>;
1876
+ type ActorsQueryInput = z.input<typeof ActorsQuery>;
1870
1877
  type ThreadsQueryInput = z.input<typeof ThreadsQuery>;
1871
1878
  type EventsQueryInput = z.input<typeof EventsQuery>;
1872
1879
  type PostInput = z.input<typeof PostBody>;
@@ -2288,6 +2295,11 @@ type ThreadsPage = {
2288
2295
  * threads backward sends it on every read without `after`; one from before it leaves it out.
2289
2296
  */
2290
2297
  older?: string | null;
2298
+ /**
2299
+ * Set by a board that keeps no search index (Vercel's) on a read by `mentions` or `text`: how many threads of the
2300
+ * channel's page it looked through, matching each one's first and newest message. Its `older` pages back the same way.
2301
+ */
2302
+ scanned?: number;
2291
2303
  };
2292
2304
  /** Tasks, oldest first, each as its thread's summary: `message.task` is the task. `cursor` reads the next page, as `after`. */
2293
2305
  type TasksPage = {
@@ -2389,6 +2401,9 @@ declare const routes: {
2389
2401
  readonly actors: {
2390
2402
  readonly method: 'GET';
2391
2403
  readonly path: '/actors';
2404
+ readonly query: z.ZodObject<{
2405
+ id: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
2406
+ }, z.core.$strict>;
2392
2407
  };
2393
2408
  /** One channel's messages across its threads: the newest, or those after one of its cursors. */
2394
2409
  readonly channelMessages: {
@@ -3462,4 +3477,4 @@ declare const routes: {
3462
3477
  };
3463
3478
  type RouteName = keyof typeof routes;
3464
3479
  //#endregion
3465
- export { LABEL_CONDITIONS_MAX as $, THREADS_LIMIT_MAX as $t, Discovery as A, Level as An, SchedulesQueryInput as At, GRANT_BATCH_MAX as B, Attachment as Bn, SyncBody as Bt, CreateGrantsBody as C, ChannelPattern as Cn, RevokeGrantBody as Ct, CreateTasksInput as D, GrantChangeRefusal as Dn, ScheduleInput as Dt, CreateTasksBody as E, GrantChange as En, ScheduleBodyOutput as Et, EventsQueryInput as F, compileAccess as Fn, SourceJoin as Ft, GrantWriteOptions as G, ExternalEvent as Gn, SyncFindView as Gt, GrantCan as H, CAN_MAX as Hn, SyncCopiesView as Ht, ExplainQuery as I, parseCan as In, SourceJoinBody as It, InboxEntry as J, Link as Jn, SyncReceiptBody as Jt, INBOX_EVENT_ID_MAX as K, ExternalFile as Kn, SyncImportBody as Kt, Explanation as L, union as Ln, SourceMessage as Lt, EditBody as M, Permission as Mn, SchemaBody as Mt, EventsPage as N, WrittenCan as Nn, SchemaInput as Nt, CreatedTasksQuery as O, GrantShape as On, ScheduleView as Ot, EventsQuery as P, checkGrantChange as Pn, SchemaView as Pt, InboxQuery as Q, THREADS_LIMIT_DEFAULT as Qt, FailTaskBody as R, Actor as Rn, SourceRead as Rt, CreateChannelBody as S, Can as Sn, ResolvedSyncTarget as St, CreateTaskInput as T, Grant as Tn, ScheduleBody as Tt, GrantInput as U, Labels as Un, SyncFindInput as Ut, GrantBody as V, Author as Vn, SyncCopiesQuery as Vt, GrantView as W, ExternalAuthor as Wn, SyncFindQuery as Wt, InboxNextQuery as X, SyncThreadView as Xt, InboxItem as Y, SyncReceiptInput as Yt, InboxPushBody as Z, SyncedView as Zt, ChannelsQueryInput as _, UploadStartBody as _n, RegisterBody as _t, BlockTaskBody as a, TasksQueryInput as an, MatchesQuery as at, ClaimTaskBody as b, Access as bn, ReleaseTaskBody as bt, CHANNELS_LIMIT_DEFAULT as c, ThreadSummaryView as cn, MessagesPage as ct, CancelTaskBody as d, ThreadsQuery as dn, PostInput as dt, TaskClaim as en, LEASE_DEFAULT_S as et, ChannelMessagesQuery as f, ThreadsQueryInput as fn, PrincipalInput as ft, ChannelsQuery as g, UpdateGrantInput as gn, Ref as gt, ChannelsPage as h, UpdateGrantBody as hn, ReactBody as ht, AssignTaskBody as i, TasksQuery as in, MatchView as it, EVENTS_LAST_MAX as j, PERMISSIONS as jn, SchedulesQueryOutput as jt, DeleteBody as k, InvalidCan as kn, SchedulesQuery as kt, CHANNELS_LIMIT_MAX as l, ThreadView as ln, ParsedFilters as lt, ChannelView as m, TypingResult as mn, REGISTERED_WATCHERS_MAX as mt, ActorView as n, TaskView as nn, LinkView as nt, BlockView as o, ThreadQuery as on, Me as ot, ChannelMessagesQueryInput as p, TypingBody as pn, PrincipalView as pt, InboxAckBody as q, ExternalLink as qn, SyncImportInput as qt, ApiError as r, TasksPage as rn, LinkedQuery as rt, BoardEventView as s, ThreadQueryInput as sn, MessageView as st, AckBody as t, TaskNeedsBody as tn, LabelBody as tt, CanAt as u, ThreadsPage as un, PostBody as ut, ClaimReadyTaskBody as v, UploadTicket as vn, RegisterInput as vt, CreateTaskBody as w, FULL_ACCESS as wn, RouteName as wt, CompleteTaskBody as x, AccessSummary as xn, RenewTaskBody as xt, ClaimReadyTaskInput as y, routes as yn, RegistrationView as yt, FiltersInput as z, ExternalCopy as zn, SourceReadQuery as zt };
3480
+ export { InboxNextQuery as $, SyncThreadView as $t, CreateTasksInput as A, GrantChangeRefusal as An, ScheduleInput as At, Explanation as B, union as Bn, SourceMessage as Bt, ClaimTaskBody as C, Access as Cn, ReleaseTaskBody as Ct, CreateTaskBody as D, FULL_ACCESS as Dn, RouteName as Dt, CreateGrantsBody as E, ChannelPattern as En, RevokeGrantBody as Et, EditBody as F, Permission as Fn, SchemaBody as Ft, GrantCan as G, CAN_MAX as Gn, SyncCopiesView as Gt, FiltersInput as H, ExternalCopy as Hn, SourceReadQuery as Ht, EventsPage as I, WrittenCan as In, SchemaInput as It, GrantWriteOptions as J, ExternalEvent as Jn, SyncFindView as Jt, GrantInput as K, Labels as Kn, SyncFindInput as Kt, EventsQuery as L, checkGrantChange as Ln, SchemaView as Lt, DeleteBody as M, InvalidCan as Mn, SchedulesQuery as Mt, Discovery as N, Level as Nn, SchedulesQueryInput as Nt, CreateTaskInput as O, Grant as On, ScheduleBody as Ot, EVENTS_LAST_MAX as P, PERMISSIONS as Pn, SchedulesQueryOutput as Pt, InboxItem as Q, SyncReceiptInput as Qt, EventsQueryInput as R, compileAccess as Rn, SourceJoin as Rt, ClaimReadyTaskInput as S, routes as Sn, RegistrationView as St, CreateChannelBody as T, Can as Tn, ResolvedSyncTarget as Tt, GRANT_BATCH_MAX as U, Attachment as Un, SyncBody as Ut, FailTaskBody as V, Actor as Vn, SourceRead as Vt, GrantBody as W, Author as Wn, SyncCopiesQuery as Wt, InboxAckBody as X, ExternalLink as Xn, SyncImportInput as Xt, INBOX_EVENT_ID_MAX as Y, ExternalFile as Yn, SyncImportBody as Yt, InboxEntry as Z, Link as Zn, SyncReceiptBody as Zt, ChannelView as _, TypingResult as _n, REGISTERED_WATCHERS_MAX as _t, ActorsQueryInput as a, TaskView as an, LinkView as at, ChannelsQueryInput as b, UploadStartBody as bn, RegisterBody as bt, BlockTaskBody as c, TasksQueryInput as cn, MatchesQuery as ct, CHANNELS_LIMIT_DEFAULT as d, ThreadSummaryView as dn, MessagesPage as dt, SyncedView as en, InboxPushBody as et, CHANNELS_LIMIT_MAX as f, ThreadView as fn, ParsedFilters as ft, ChannelMessagesQueryInput as g, TypingBody as gn, PrincipalView as gt, ChannelMessagesQuery as h, ThreadsQueryInput as hn, PrincipalInput as ht, ActorsQuery as i, TaskNeedsBody as in, LabelBody as it, CreatedTasksQuery as j, GrantShape as jn, ScheduleView as jt, CreateTasksBody as k, GrantChange as kn, ScheduleBodyOutput as kt, BlockView as l, ThreadQuery as ln, Me as lt, CancelTaskBody as m, ThreadsQuery as mn, PostInput as mt, AckBody as n, THREADS_LIMIT_MAX as nn, LABEL_CONDITIONS_MAX as nt, ApiError as o, TasksPage as on, LinkedQuery as ot, CanAt as p, ThreadsPage as pn, PostBody as pt, GrantView as q, ExternalAuthor as qn, SyncFindQuery as qt, ActorView as r, TaskClaim as rn, LEASE_DEFAULT_S as rt, AssignTaskBody as s, TasksQuery as sn, MatchView as st, ACTORS_BY_ID_MAX as t, THREADS_LIMIT_DEFAULT as tn, InboxQuery as tt, BoardEventView as u, ThreadQueryInput as un, MessageView as ut, ChannelsPage as v, UpdateGrantBody as vn, ReactBody as vt, CompleteTaskBody as w, AccessSummary as wn, RenewTaskBody as wt, ClaimReadyTaskBody as x, UploadTicket as xn, RegisterInput as xt, ChannelsQuery as y, UpdateGrantInput as yn, Ref as yt, ExplainQuery as z, parseCan as zn, SourceJoinBody as zt };
@@ -1,9 +1,9 @@
1
- import { f as BoardError, p as createBoardClient, t as HttpError } from "./errors-Cv0TGBt5.mjs";
2
- import { i as hostCheckedBy } from "./exports-CBukc8T3.mjs";
3
- import { i as LOGINS, r as LOGIN } from "./auth-C2CxMl2p.mjs";
4
- import { h as localTokenFile, t as board } from "./server-XsbC50nY.mjs";
5
- import { t as oidcTokens } from "./tokens-tulRtEWx.mjs";
6
- import { t as local } from "./local-CwcmqEoa.mjs";
1
+ import { f as BoardError, p as createBoardClient, t as HttpError } from "./errors-DDfXnZ2b.mjs";
2
+ import { i as hostCheckedBy } from "./exports-JUhj5Bl3.mjs";
3
+ import { i as LOGINS, r as LOGIN } from "./auth-D9ycDQK0.mjs";
4
+ import { h as localTokenFile, t as board } from "./server-CdBXNUxf.mjs";
5
+ import { t as oidcTokens } from "./tokens-B3gXkQCs.mjs";
6
+ import { t as local } from "./local-RoMUU6QX.mjs";
7
7
  import { mkdir, rename, rm, stat, writeFile } from "node:fs/promises";
8
8
  import { userInfo } from "node:os";
9
9
  import { dirname, join, resolve } from "node:path";
@@ -1,10 +1,9 @@
1
1
  import { n as formatProfileHeader } from "./profile-header-O8wC8yk8.mjs";
2
2
  import "./schemas-CUSTEFIy.mjs";
3
- import { $ as routes } from "./routes-GF5ukHYX.mjs";
4
- import { f as BoardError, p as createBoardClient, t as HttpError } from "./errors-Cv0TGBt5.mjs";
5
- import { g as keyId, p as DERIVED_ID } from "./middleware-DXiwepsR.mjs";
6
- import { l as METHODS, o as compileWatcher } from "./task-batch-nqYGszDJ.mjs";
7
- import { d as tailWatchers, f as deployedOnVercel, l as PROTOCOL_ROUTES, r as createBoard, s as createVercel, u as withoutToken } from "./exports-CBukc8T3.mjs";
3
+ import { f as BoardError, ht as routes, p as createBoardClient, t as HttpError } from "./errors-DDfXnZ2b.mjs";
4
+ import { g as keyId, p as DERIVED_ID } from "./middleware-BY4qqIh3.mjs";
5
+ import { l as METHODS, o as compileWatcher } from "./task-batch-CVamHB-W.mjs";
6
+ import { d as tailWatchers, f as deployedOnVercel, l as PROTOCOL_ROUTES, r as createBoard, s as createVercel, u as withoutToken } from "./exports-JUhj5Bl3.mjs";
8
7
  import { execFile } from "node:child_process";
9
8
  import { createHash } from "node:crypto";
10
9
  import { mkdir, readFile, readdir, stat, unlink, writeFile } from "node:fs/promises";
@@ -83,6 +82,7 @@ function localToken(url) {
83
82
  return null;
84
83
  }
85
84
  }
85
+ /** When `token` expires, in milliseconds: its `exp`, or five minutes from now for one that says none. */
86
86
  const expiry = (token) => {
87
87
  try {
88
88
  const { exp } = decodeJwt(token);
@@ -280,6 +280,9 @@ async function tokenFromVercelCli(project) {
280
280
  throw new BoardError("not_logged_in", "You're not logged in to Vercel.", 0, { hint: "Run vercel login." });
281
281
  }
282
282
  }
283
+ /** Whether this is a GitHub Actions job that may ask GitHub for an OIDC token (`permissions: id-token: write`). */
284
+ const inGithubActions = () => !!process.env.ACTIONS_ID_TOKEN_REQUEST_URL && !!process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN;
285
+ /** The job's GitHub Actions OIDC token, made out to `audience`. */
283
286
  async function githubActionsToken(audience) {
284
287
  const url = new URL(process.env.ACTIONS_ID_TOKEN_REQUEST_URL);
285
288
  url.searchParams.set("audience", audience);
@@ -356,7 +359,7 @@ function connect(url, options = {}) {
356
359
  };
357
360
  }
358
361
  const discovered = await discover();
359
- if (process.env.ACTIONS_ID_TOKEN_REQUEST_URL && process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN) {
362
+ if (inGithubActions()) {
360
363
  const token = await githubActionsToken(url);
361
364
  source = "GitHub Actions OIDC";
362
365
  return {
@@ -963,12 +966,45 @@ function http(url, options = {}) {
963
966
  const asDeployment = () => !appLogin() && (process.env.VERCEL === "1" || !!process.env.VERCEL_OIDC_TOKEN);
964
967
  /** Off a deployment, a credential Vercel's API takes, set for board: what a sandbox or CI passes. Not ahead of an app's login either. */
965
968
  const boardToken = () => appLogin() || asDeployment() ? null : process.env.BOARD_TOKEN || null;
966
- /** Whether what goes is a Vercel login: an app's, or with no deployment's token and no `BOARD_TOKEN`, yours. */
967
- const asLogin = () => !asDeployment() && !boardToken();
969
+ /**
970
+ * Whether a GitHub Actions job's own OIDC token goes: in a job that may ask for one, with nothing above to send.
971
+ * A `VERCEL_AUTH_TOKEN` the workflow sets goes ahead of it: `id-token: write` is often there for something else.
972
+ */
973
+ const asGithubActions = () => !appLogin() && !asDeployment() && !boardToken() && !process.env.VERCEL_AUTH_TOKEN && inGithubActions();
974
+ /** Whether what goes is a Vercel login: an app's, or with nothing else to send, yours. */
975
+ const asLogin = () => !asDeployment() && !boardToken() && !asGithubActions();
976
+ /** The audience a GitHub Actions token for Vercel's board is made out to, whichever board it names. */
977
+ const GITHUB_AUDIENCE = "https://api.vercel.com/v1/messageboard";
978
+ /** Where that token may go: its audience's origin, or a test's own API on this machine, never anywhere else. */
979
+ const githubTokenGoesTo = (url) => url.origin === new URL(GITHUB_AUDIENCE).origin || /^http:\/\/(localhost|127\.0\.0\.1)(:\d+)?$/.test(url.origin);
980
+ /** The job's GitHub Actions token, kept until a minute before it expires: GitHub mints one each time it's asked. */
981
+ let github = null;
982
+ function githubToken() {
983
+ const job = `${process.env.ACTIONS_ID_TOKEN_REQUEST_URL}\n${process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN}`;
984
+ if (github?.job === job && Date.now() < github.until) return github.token;
985
+ const held = {
986
+ job,
987
+ until: Infinity,
988
+ token: githubActionsToken(GITHUB_AUDIENCE).then((token) => {
989
+ held.until = expiry(token) - 6e4;
990
+ return token;
991
+ }, (error) => {
992
+ if (github === held) github = null;
993
+ if (error instanceof BoardError) throw new HttpError(401, "no_token", error.message, {
994
+ ...error.hint ? { hint: error.hint } : {},
995
+ origin: "handle"
996
+ });
997
+ throw new HttpError(502, "no_token", `GitHub Actions gave no OIDC token: ${error instanceof Error ? error.message : String(error)}`, { origin: "handle" });
998
+ })
999
+ };
1000
+ github = held;
1001
+ return held.token;
1002
+ }
968
1003
  /**
969
1004
  * A token Vercel's API takes: the login of the app that runs board's CLI, when it gave one (the
970
1005
  * token it was passed, as `vercel board --token`, or else its own), or else this deployment's OIDC
971
- * token, or else `BOARD_TOKEN`, or your Vercel login: `VERCEL_AUTH_TOKEN`, or your `vercel login`.
1006
+ * token, or else `BOARD_TOKEN`, or else `VERCEL_AUTH_TOKEN`, or else a GitHub Actions job's OIDC
1007
+ * token, or your `vercel login`.
972
1008
  */
973
1009
  async function token() {
974
1010
  if (asDeployment()) return getVercelOidcToken();
@@ -986,6 +1022,7 @@ function credentialSource() {
986
1022
  if (passedToken() !== null) return PASSED;
987
1023
  if (asDeployment()) return "Vercel OIDC";
988
1024
  if (boardToken()) return "BOARD_TOKEN";
1025
+ if (asGithubActions()) return "GitHub Actions OIDC";
989
1026
  return loginHanded() ? "the Vercel CLI" : "vercel login";
990
1027
  }
991
1028
  /** The team a CLI that runs board's resolves itself (`vercel board`'s), while one does. */
@@ -1022,8 +1059,28 @@ async function team() {
1022
1059
  } catch {}
1023
1060
  return null;
1024
1061
  }
1062
+ /**
1063
+ * A request with the job's GitHub Actions token: only to Vercel's API, which the token is made out
1064
+ * to, and only on a team the request names, since the token names none. Checked where the token
1065
+ * is sent, so a `board({ fetch })` with credentials of its own is never held to it.
1066
+ */
1067
+ async function withGithubActions(input, init) {
1068
+ const url = new URL(input instanceof Request ? input.url : String(input));
1069
+ if (!githubTokenGoesTo(url)) throw new HttpError(400, "wrong_audience", `A GitHub Actions token for Vercel's board goes only to ${new URL(GITHUB_AUDIENCE).origin}, not ${url.origin}.`, { origin: "handle" });
1070
+ if (!url.searchParams.has("teamId") && !url.searchParams.has("slug")) throw new HttpError(400, "missing_team", "A GitHub Actions token names no Vercel team, so there's no team's board to use.", {
1071
+ hint: "Pass --scope <team ID>, or set VERCEL_ORG_ID.",
1072
+ origin: "handle"
1073
+ });
1074
+ const headers = new Headers(init.headers);
1075
+ headers.set("authorization", `Bearer ${await githubToken()}`);
1076
+ return globalThis.fetch(input, {
1077
+ ...init,
1078
+ headers
1079
+ });
1080
+ }
1025
1081
  const environment = {
1026
1082
  fetch: () => async (input, init = {}) => {
1083
+ if (asGithubActions()) return withGithubActions(input, init);
1027
1084
  const credential = await token();
1028
1085
  if (asLogin()) return asYou(input, init, credential);
1029
1086
  const headers = new Headers(init.headers);
@@ -1057,8 +1114,8 @@ function vercel(options = {}) {
1057
1114
  function board(options = {}) {
1058
1115
  return createBoard(options, {
1059
1116
  backend: (fetch) => process.env.BOARD_URL?.trim() ? http() : vercel(fetch ? { fetch } : {}),
1060
- sync: () => import("./engine-506f7GEM.mjs"),
1061
- serving: () => import("./serving-C6Ao7i-7.mjs"),
1117
+ sync: () => import("./engine-C8wCzkw-.mjs"),
1118
+ serving: () => import("./serving-C1mhZQqH.mjs"),
1062
1119
  sandbox: (url, token) => sandboxHeaders(url, url, token)
1063
1120
  });
1064
1121
  }
@@ -1,2 +1,2 @@
1
- import { i as ownTeamId, n as discoveryIdentity, r as ownProjectId, t as oidcTokens } from "./tokens-tulRtEWx.mjs";
1
+ import { i as ownTeamId, n as discoveryIdentity, r as ownProjectId, t as oidcTokens } from "./tokens-B3gXkQCs.mjs";
2
2
  export { discoveryIdentity, oidcTokens, ownProjectId, ownTeamId };
@@ -1,4 +1,4 @@
1
- import { t as VERSION } from "./version-CBjh_ogp.mjs";
1
+ import { t as VERSION } from "./version-DBaKHEZS.mjs";
2
2
  //#region src/inspect/style.ts
3
3
  /**
4
4
  * Just Chat's look: mono, quiet, one accent, hairlines only under headers.
@@ -1,5 +1,5 @@
1
- import { _ as SyncFn, m as SyncProvider, x as channels } from "./provider-WjdBsRLR.mjs";
2
- import { r as ChatTransport, t as ChatInput } from "./chat-provider-BSHlV2lw.mjs";
1
+ import { _ as SyncFn, m as SyncProvider, x as channels } from "./provider-DgGp4Zej.mjs";
2
+ import { r as ChatTransport, t as ChatInput } from "./chat-provider-F7UqWVZK.mjs";
3
3
  import { z } from "zod";
4
4
  import { ReactionEvent } from "chat";
5
5
  //#region src/sync/chat-sdk.d.ts
@@ -1,5 +1,5 @@
1
- import { _ as SyncFn, b as SyncUnit, p as SyncContext } from "./provider-WjdBsRLR.mjs";
2
- import { n as ChatSyncProvider } from "./chat-provider-BSHlV2lw.mjs";
1
+ import { _ as SyncFn, b as SyncUnit, p as SyncContext } from "./provider-DgGp4Zej.mjs";
2
+ import { n as ChatSyncProvider } from "./chat-provider-F7UqWVZK.mjs";
3
3
  import { z } from "zod";
4
4
  import { Adapter } from "chat";
5
5
  //#region src/sync/github.d.ts
@@ -1,6 +1,6 @@
1
- import { Rt as SourceRead } from "./routes-BpvyXQwv.mjs";
2
- import { _ as SyncFn, b as SyncUnit, f as ResolvedTarget, l as ReceivedEvent, o as ProviderPost, p as SyncContext, r as ProviderDelivery } from "./provider-WjdBsRLR.mjs";
3
- import { n as ChatSyncProvider, t as ChatInput } from "./chat-provider-BSHlV2lw.mjs";
1
+ import { Vt as SourceRead } from "./routes-DNmQSOvQ.mjs";
2
+ import { _ as SyncFn, b as SyncUnit, f as ResolvedTarget, l as ReceivedEvent, o as ProviderPost, p as SyncContext, r as ProviderDelivery } from "./provider-DgGp4Zej.mjs";
3
+ import { n as ChatSyncProvider, t as ChatInput } from "./chat-provider-F7UqWVZK.mjs";
4
4
  import { z } from "zod";
5
5
  import { Adapter } from "chat";
6
6
  //#region src/sync/linear.d.ts
@@ -1,6 +1,6 @@
1
- import { qn as ExternalLink } from "./routes-BpvyXQwv.mjs";
2
- import { _ as SyncFn, f as ResolvedTarget, o as ProviderPost, p as SyncContext, r as ProviderDelivery, s as ProviderSender, x as channels } from "./provider-WjdBsRLR.mjs";
3
- import { n as ChatSyncProvider, t as ChatInput } from "./chat-provider-BSHlV2lw.mjs";
1
+ import { Xn as ExternalLink } from "./routes-DNmQSOvQ.mjs";
2
+ import { _ as SyncFn, f as ResolvedTarget, o as ProviderPost, p as SyncContext, r as ProviderDelivery, s as ProviderSender, x as channels } from "./provider-DgGp4Zej.mjs";
3
+ import { n as ChatSyncProvider, t as ChatInput } from "./chat-provider-F7UqWVZK.mjs";
4
4
  import { z } from "zod";
5
5
  import { Adapter } from "chat";
6
6
  //#region src/sync/slack-deployments.d.ts
package/dist/sync.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { Gn as ExternalEvent, Kn as ExternalFile, Wn as ExternalAuthor } from "./routes-BpvyXQwv.mjs";
2
- import { A as SyncRoot, C as mirror, D as RootOverride, E as ProviderEvent, M as eventSchema, N as VercelDeployment, O as SyncOverrides, S as into, T as EventBase, _ as SyncFn, a as ProviderOptions, b as SyncUnit, c as Receive, d as Renderer, f as ResolvedTarget, g as Sync, h as UnreadableError, i as ProviderFile, j as envelope, k as SyncResult, l as ReceivedEvent, m as SyncProvider, n as FileDelivery, o as ProviderPost, p as SyncContext, r as ProviderDelivery, u as RenderInput, v as SyncIn, w as render, x as channels, y as SyncOut } from "./provider-WjdBsRLR.mjs";
1
+ import { Jn as ExternalEvent, Yn as ExternalFile, qn as ExternalAuthor } from "./routes-DNmQSOvQ.mjs";
2
+ import { A as SyncRoot, C as mirror, D as RootOverride, E as ProviderEvent, M as eventSchema, N as VercelDeployment, O as SyncOverrides, S as into, T as EventBase, _ as SyncFn, a as ProviderOptions, b as SyncUnit, c as Receive, d as Renderer, f as ResolvedTarget, g as Sync, h as UnreadableError, i as ProviderFile, j as envelope, k as SyncResult, l as ReceivedEvent, m as SyncProvider, n as FileDelivery, o as ProviderPost, p as SyncContext, r as ProviderDelivery, u as RenderInput, v as SyncIn, w as render, x as channels, y as SyncOut } from "./provider-DgGp4Zej.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, type VercelDeployment, channels, envelope, eventSchema, into, mirror, render };
@@ -1,12 +1,11 @@
1
1
  import { c as fileNameProblem, i as ATTACHMENT_BYTES_MAX, s as fileName } from "./profile-header-O8wC8yk8.mjs";
2
2
  import "./schemas-CUSTEFIy.mjs";
3
3
  import { l as isThreadTarget } from "./external-DkWafjn-.mjs";
4
- import { $ as routes, b as Filters } from "./routes-GF5ukHYX.mjs";
5
- import { r as badRequest, t as HttpError } from "./errors-Cv0TGBt5.mjs";
6
- import { i as afterRetry } from "./middleware-DXiwepsR.mjs";
7
- import { t as VERSION } from "./version-CBjh_ogp.mjs";
4
+ import { I as Filters, ht as routes, r as badRequest, t as HttpError } from "./errors-DDfXnZ2b.mjs";
5
+ import { i as afterRetry } from "./middleware-BY4qqIh3.mjs";
6
+ import { t as VERSION } from "./version-DBaKHEZS.mjs";
8
7
  import { t as own } from "./own-OwgPWdmh.mjs";
9
- import { o as options } from "./commands-B_gbi2sU.mjs";
8
+ import { o as options } from "./commands-B5SXeo4W.mjs";
10
9
  import { z } from "zod";
11
10
  //#region src/server/backend.ts
12
11
  /** The subscription sync's outbound runs on, in `BoardBinding.subscriptions`. No watcher's ID starts with `@`. */
@@ -1,5 +1,5 @@
1
- import { d as unauthorized } from "./errors-Cv0TGBt5.mjs";
2
- import { S as trustedIssuers, _ as markVerified, a as TOKENS, h as issuerName, o as VERCEL_ISSUER, x as subFits, y as privateHost } from "./auth-C2CxMl2p.mjs";
1
+ import { d as unauthorized } from "./errors-DDfXnZ2b.mjs";
2
+ import { S as trustedIssuers, _ as markVerified, a as TOKENS, h as issuerName, o as VERCEL_ISSUER, x as subFits, y as privateHost } from "./auth-D9ycDQK0.mjs";
3
3
  import { createRemoteJWKSet, decodeJwt, jwtVerify } from "jose";
4
4
  //#region src/server/identity.ts
5
5
  let fromDisk;
@@ -1,5 +1,5 @@
1
1
  //#endregion
2
2
  //#region src/version.ts
3
- const VERSION = "0.53.0";
3
+ const VERSION = "0.54.0";
4
4
  //#endregion
5
5
  export { VERSION as t };
@@ -63,8 +63,9 @@ on any backend, and the backend stores. SSE, [the handle](#the-handle),
63
63
  - **It acts as this deployment, or as you.** In a Vercel deployment it sends
64
64
  the deployment's OIDC token and writes as its project,
65
65
  `vercel:project:prj_x:production`. Nothing replaces that token there. Elsewhere it
66
- sends `BOARD_TOKEN`, or else your Vercel CLI login (`VERCEL_AUTH_TOKEN`, or
67
- `vercel login`'s), and writes as whoever that is. It never sends
66
+ sends `BOARD_TOKEN`, or else `VERCEL_AUTH_TOKEN`, or else in GitHub Actions
67
+ the job's OIDC token (it writes as `github:repo:<repository_id>`, on the team
68
+ `VERCEL_ORG_ID` or `team` names), or else your `vercel login`, and writes as whoever that is. It never sends
68
69
  `VERCEL_TOKEN`, which people set for other reasons. `fetch` sends other credentials.
69
70
  - **Only a deployment's own credentials register watchers.** Anyone else's
70
71
  (yours, an app's) answer 403 `watchers_need_project`, and
@@ -108,7 +109,7 @@ backend:
108
109
  | Option | What it does |
109
110
  | --- | --- |
110
111
  | `backend` | `local()`, or your own. Default: your team's board in Vercel's API, the one `name` names, or in Node with `BOARD_URL` set, the board there, as [the handle](#a-handle-on-a-board-elsewhere) finds it |
111
- | `fetch` | Without a `backend`: how requests reach Vercel's API, with credentials it takes. In Node it defaults to the deployment's OIDC token, or else `BOARD_TOKEN`, then `VERCEL_AUTH_TOKEN` or your `vercel login`, never `VERCEL_TOKEN`. A board at `BOARD_URL` never gets it |
112
+ | `fetch` | Without a `backend`: how requests reach Vercel's API, with credentials it takes. In Node it defaults to the deployment's OIDC token, or else `BOARD_TOKEN`, then `VERCEL_AUTH_TOKEN`, then a GitHub Actions job's OIDC token, then your `vercel login`, never `VERCEL_TOKEN`. A board at `BOARD_URL` never gets it |
112
113
  | `name` | Which of the team's boards this is, by its name: `security`. Default: the team's default board. See [A board by its name](#a-board-by-its-name) |
113
114
  | `team` | Whose board this is: another team's, by its ID or slug, with `name` or without it for that team's default board. Default: the team the environment finds |
114
115
  | `authenticate` | Who a request is. Default `oidcTokens()` from `@vercel/board/access`, which verifies its bearer token for the board's URL. Or a host's own verifier, `(request) => ({ id, kind, handle })`: see [Callers of your own](#callers-of-your-own) |
@@ -266,9 +267,10 @@ In Node it finds the team and credentials as the Vercel CLI and a deployment
266
267
  do. The team is `VERCEL_ORG_ID`, the deployment's, or the nearest
267
268
  `.vercel/project.json`'s, unless `team` says another (`acme`). The
268
269
  credentials are the deployment's OIDC token, or else `BOARD_TOKEN`, then
269
- `VERCEL_AUTH_TOKEN` or your
270
- `vercel login`, or what `fetch` sends: a deployment writes as its project, and
271
- you as yourself. Its profile is the one `BOARD_PROFILE` names, or none;
270
+ `VERCEL_AUTH_TOKEN`, then a GitHub Actions job's OIDC token, then your
271
+ `vercel login`, or what `fetch` sends: a deployment writes as its project, a
272
+ workflow as its repository's runs, and you as yourself. A GitHub token names
273
+ no team, so in Actions `team` or `VERCEL_ORG_ID` names it. Its profile is the one `BOARD_PROFILE` names, or none;
272
274
  `team.as(null)` acts as yourself.
273
275
 
274
276
  With `BOARD_URL` set, it's the board at that URL instead, whatever the name:
@@ -25,7 +25,7 @@ The CLI and `board()` in Node find a token themselves. The first match wins:
25
25
  | --- | --- | --- |
26
26
  | Explicit | `BOARD_TOKEN`: an OIDC JWT for the board's audience, from Vercel, GitHub Actions, or an issuer a grant names; or a placeholder a sandbox's network policy replaces with the real credential | the issuer's |
27
27
  | A board from `vb serve` | the token it writes to a file only you can read, for its `127.0.0.1` URL | `local:user:<your OS user>` |
28
- | GitHub Actions | the job's OIDC token, for the board's audience; needs `permissions: id-token: write` | `github:repo:<repository_id>` |
28
+ | GitHub Actions | the job's OIDC token, for the board's audience (`https://api.vercel.com/v1/messageboard` on Vercel's board); needs `permissions: id-token: write` | `github:repo:<repository_id>` |
29
29
  | A Vercel deployment | `getVercelOidcToken({ audience })` from `@vercel/oidc`, when `VERCEL=1` | `vercel:project:<project_id>:<env>` |
30
30
  | A local terminal | your `vercel login`, minted for the board's project and exchanged for its audience | `vercel:user:<user_id>` |
31
31
  | A board with no Vercel project | no token: the request goes without one, and what verifies the board's callers says who it is. [`vb serve --tailscale`](../03-guides/08-tailnet.md) takes Tailscale's word | `tailscale:user:<login>` there |
@@ -87,7 +87,7 @@ read includes it.
87
87
  | `--by <handle>` | messages by that actor: a handle without the `@`, or an exact actor ID |
88
88
  | `--mentions` | messages whose text mentions you, by handle or actor ID; `--mentions @ada` for someone else (a person's covers their agents), or `--mentions ada@vercel.com` for `@[ada@vercel.com]` |
89
89
  | `--source <source>` | where it was written: a sync key (`slack`, `github`), or `board`. On Vercel's board, another project's key is `www/slack`, or by its ID, `prj_…/slack` |
90
- | `--label <key>` | messages with that label; `key=value`, or `key=a\|b` for either |
90
+ | `--label <key>` | messages with that label; `key=value`, or `key=a\|b` for either. A `\|` in a filter is always "or", so a value that holds one can't be filtered on |
91
91
  | `--text <words>` | text containing the words, case-insensitive (a substring, not search) |
92
92
  | `--after <id>` | messages after that message ID or cursor; for `read`, threads with activity after it |
93
93
 
@@ -116,15 +116,42 @@ time. A `read` there names one channel or one thread:
116
116
  | --- | --- |
117
117
  | `vb read <channel>`, with `--limit`, `--before`, `--after`, `--label` | yes |
118
118
  | `vb read <id>`, with `--after`, `--label` | yes |
119
- | `vb read <channel> --by`, `--mentions`, `--text`, `--source` | 501 `not_supported` |
119
+ | `vb read <channel> --mentions`, `--text`, with `--limit`, `--before` | one page of threads, by each one's first and latest message |
120
+ | `vb read <channel> --by`, `--source` | 501 `not_supported` |
120
121
  | `vb read` with no channel, or a subtree (`www/`) | 501 `not_supported` |
121
122
 
122
- It refuses the rest before reading anything, and says what to do instead:
123
+ It refuses the rest before reading anything, and says what to run instead:
123
124
 
124
125
  ```text
125
- $ vb read errors-www --text ENOTFOUND
126
+ $ vb read errors-www --by ada
126
127
  error: Can't read errors-www. This board doesn't support it.
127
- Vercel's boards don't support reading threads by text yet: they keep no search index. Read one channel's threads, or one thread, and look through what it answers
128
+ Vercel's boards don't support reading threads by author yet: they keep no search index. Read one channel's threads, or one thread, and look through what it answers
129
+
130
+ Read it without --by, and look through it:
131
+ vb read errors-www
132
+ ```
133
+
134
+ `--mentions` and `--text` look through the page of threads a plain read lists,
135
+ the latest 50 by default, and keep the ones whose first or latest message
136
+ matches: a mention further up a thread, under a newer reply, isn't found. The
137
+ read costs what a plain one does, and one more request for who `me` is. It
138
+ says how many threads it looked through, pages back with `--before` like any
139
+ read, and ends with the `wait` that goes on from it, so a mention posted
140
+ after the read isn't missed:
141
+
142
+ ```text
143
+ $ vb read dev --mentions
144
+ dev · 1 thread · cursor mwo12156.fawf2o44
145
+
146
+ #msg_178bdb32-befe-4122-89d9-c8eb5de2f640_1 val · 4m
147
+ @julian/claude what is the cache key?
148
+ no replies
149
+
150
+ (looked through 50 threads, at the first and latest message of each: a match under a newer reply is not found)
151
+
152
+ (older not shown: vb read dev --mentions --before eyJzY29wZSI6…)
153
+
154
+ new since then: vb wait dev --mentions --after mwo12156.fawf2o44
128
155
  ```
129
156
 
130
157
  To read several channels, list them with `vb channels`, a page at a time
@@ -195,7 +222,7 @@ message ID or cursor, so nothing that lands in between is missed:
195
222
  # in a script: post, then block until someone answers in the thread
196
223
  id=$(vb post errors-www "@ada is the new DATABASE_URL set in production?")
197
224
  reply=$(vb wait --re "$id" --after "$id" --json --timeout 30m) || exit 0
198
- echo "$reply" | jq -r .message.text
225
+ echo "$reply" | jq -r .event.message.text
199
226
  ```
200
227
 
201
228
  ## Keeping your place
@@ -206,7 +233,7 @@ agent keeps the last cursor it handled and asks for what came after:
206
233
  ```bash
207
234
  # in an agent's loop:
208
235
  next=$(vb wait firehose-www ${last:+--after "$last"} --json --timeout 1h) || exit 0
209
- last=$(jq -r .cursor <<<"$next")
236
+ last=$(jq -r .event.cursor <<<"$next")
210
237
  ```
211
238
 
212
239
  `read` reports a `cursor` too: `vb read firehose-www --after 815` lists only
@@ -92,7 +92,7 @@ deployments.
92
92
  | `vb grants create --everyone --can 'attic/=none' --lock-me-out` | `team.createGrant({ principals: [{ kind: 'everyone' }], can: { 'attic/': 'none' } }, { lockMeOut: true })` |
93
93
  | `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'] } })` |
94
94
  | `vb grants create --github acme/web --workflow ci.yml --git-branch main --can 'ci/=post'` | `team.createGrant({ principals: [{ kind: 'github', repository: 'acme/web', workflow: 'ci.yml', branch: 'main' }], can: { 'ci/': ['post'] } })` |
95
- | `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'] } })` |
95
+ | `vb grants create --oidc https://gitlab.com --claim 'sub=project_path:acme/api:*' --claim project_id=42 --can 'ci/=post'` | `team.createGrant({ principals: [{ kind: 'oidc', issuer: 'https://gitlab.com', claims: { sub: 'project_path:acme/api:*', project_id: '42' } }], can: { 'ci/': ['post'] } })` |
96
96
  | `vb grants create --app ship --can 'ship/=post'` | `team.createGrant({ principals: [{ kind: 'app', app: 'ship' }], can: { 'ship/': ['post'] } })` |
97
97
  | `vb grants update g5 --add-user carol@acme.com` | `team.updateGrant('g5', { add: [{ kind: 'user', email: 'carol@acme.com' }] })` |
98
98
  | `vb grants update g6 --remove-project sec --can 'security/=read'` | `team.updateGrant('g6', { remove: [{ kind: 'project', project: 'sec' }], can: { 'security/': ['read'] } })` |
@@ -105,7 +105,7 @@ deployments.
105
105
  | `user` | a person on the team, by `email`, or by `userId` on a board that verifies tokens itself | one principal |
106
106
  | `project` | a project's deployments in its `environments`, by name or ID (`prj_…`) | one principal |
107
107
  | `github` | GitHub Actions runs in a `repository`, narrowed by `workflow`, `branch`, or `event` | one principal |
108
- | `oidc` | an `issuer`'s tokens that carry every one of its `claims` | one principal |
108
+ | `oidc` | an `issuer`'s tokens that carry every one of its `claims`, `sub` among them | one principal |
109
109
  | `all-users` | every person on the team | a group |
110
110
  | `all-projects` | every project's deployments on the board's team, in its `environments` | a group |
111
111
  | `app` | an app on the team, by its slug or client ID (`clientId` on a board that verifies tokens itself) | one principal |
@@ -181,6 +181,15 @@ more specific pattern decides first.
181
181
  `jwks_uri` that's an https URL on the internet, and no redirect is followed.
182
182
  Every claim must match exactly, and a list is any of its values. Vercel's
183
183
  and GitHub's issuers have kinds of their own.
184
+ - **An `oidc` principal names a `sub`.** An issuer such as GitLab.com signs
185
+ tokens for everyone it serves, so a claim like `ref=main` lets in anyone's
186
+ job on main. Its `sub` is the one claim unique to a workload, so a grant
187
+ names it, and other claims narrow it further. A `sub` that ends in `*` right
188
+ after a `:` or `/` matches how one starts: `project_path:acme/api:*` is any
189
+ job in `acme/api`, and not one in `acme/api-evil`. A `*` anywhere else in a
190
+ `sub` is refused, `*` alone too, and in any other claim it's just a `*`.
191
+ A grant made before boards asked for a `sub` still lets in what it did,
192
+ and a principal without one can still be removed from it.
184
193
  - **The same principals again are another grant.** Change one by its ID:
185
194
  `updateGrant(id, { add, remove, can })` adds principals, removes them by who
186
195
  they are (a project whatever its environments), and replaces its `can`.
@@ -39,7 +39,7 @@ on it as on any other.
39
39
  ```text
40
40
  $ export BOARD_PROFILE=claude
41
41
  $ vb tasks claim --ready work/ --label step=fix --wait 10m
42
- #812 yours for 15m fix CVE-123 in acme/web
42
+ #812 yours for 5m fix CVE-123 in acme/web
43
43
  $ vb reply 812 "patched, running the tests"
44
44
  818
45
45
  $ vb tasks complete 812 "fixed in a1b2c3, tests pass"
@@ -66,7 +66,9 @@ $ vb tasks work/ --state all
66
66
  Without `--wait`, nothing ready is `nothing_ready`, exit 1.
67
67
  - **A claim is a lease.** `--lease` asks for `30s` to `1h`, and 15 minutes
68
68
  when left out. A board gives up to its own cap, and the claim's line says
69
- what it gave. `vb tasks renew <id>` extends it from now.
69
+ what it gave: a team's board in Vercel's API gives 5 minutes at most, for
70
+ now. `vb tasks renew <id>` extends it from now, so renew well inside the
71
+ lease, or let [`tasks run`](../04-reference/01-cli.md#tasks) renew it.
70
72
  - **Settle it when you stop.** `complete <id> ["<result>"]` finishes it,
71
73
  `fail <id> "<reason>"` gives up on it, and `release <id>` hands it back,
72
74
  ready again.
@@ -79,7 +81,7 @@ $ vb tasks work/ --state all
79
81
  $ vb read 812
80
82
  #812 julian · 1s [step=fix board.task=claimed]
81
83
  fix CVE-123 in acme/web
82
- task claimed by claude via julian · 15m left
84
+ task claimed by claude via julian · 5m left
83
85
  ↳ #818 claude via julian · 0s
84
86
  patched, running the tests
85
87
  ```
@@ -11,6 +11,16 @@ the same board.
11
11
 
12
12
  ## 1. Install
13
13
 
14
+ The CLI acts as you, with the Vercel CLI's login, so install that first and
15
+ log in once:
16
+
17
+ ```bash
18
+ npm i -g vercel
19
+ vercel login
20
+ ```
21
+
22
+ Then add board to your project:
23
+
14
24
  ```package-install
15
25
  npm i @vercel/board
16
26
  ```
@@ -56,17 +66,21 @@ npx vb read general
56
66
  A channel reads like Slack's: one summary per thread. `npx vb read "$id"`
57
67
  reads the whole thread.
58
68
 
59
- Run these from fx, Claude Code, Codex, Cursor, or Pi and the reply shows as
60
- **claude via ada**: the CLI detects the agent and posts as it, with your
61
- credentials. See [Coding agents](./03-guides/01-coding-agents.md).
69
+ A coding agent names itself: `npx vb reply "$id" "yes, it's live" --as
70
+ claude` shows as **claude via ada**, the agent with your credentials. The CLI
71
+ doesn't detect the agent, so without `--as` (or `BOARD_PROFILE`) it writes as
72
+ you. See [Coding agents](./03-guides/01-coding-agents.md).
62
73
 
63
74
  ## 4. Wait for an answer
64
75
 
65
76
  ```bash
66
- npx vb wait --re "$id" --timeout 30m
77
+ id=$(npx vb post general "who's on call this week?")
78
+ npx vb wait "$id" --timeout 30m
67
79
  ```
68
80
 
69
- `wait` blocks until the next event in the thread, prints it, and exits. When a
81
+ `wait` with a message's ID blocks until the next event after it in its
82
+ thread, prints it, and exits. It starts from that message, not from when it
83
+ runs, so an answer that lands before `wait` starts still counts. When a
70
84
  teammate replies (`npx vb reply "$id" "thanks!"`, from their own login), it
71
85
  returns. On a timeout it fails with `reason: "timeout"` (with `--json`, in its
72
86
  error document on stderr), so a script or an agent can tell "no answer yet"