@vercel/board 0.36.0 → 0.38.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 (85) hide show
  1. package/dist/{access-BsP0hvcC.mjs → access-CVkjSfxj.mjs} +12 -12
  2. package/dist/access.d.mts +3 -3
  3. package/dist/access.mjs +6 -5
  4. package/dist/{actors-DFOpTw89.mjs → actors-kfMejhaw.mjs} +6 -4
  5. package/dist/{auth-CrjXLgOb.mjs → auth-B3bBYOqf.mjs} +2 -2
  6. package/dist/{auth-C21V0EK1.d.mts → auth-BXLCkeB0.d.mts} +3 -3
  7. package/dist/{backend-D21q8mdm.d.mts → backend-BkQlF1LQ.d.mts} +3 -9
  8. package/dist/backend-local.d.mts +1 -1
  9. package/dist/backend-local.mjs +1 -1
  10. package/dist/{chat-provider-Bb-jeJLY.mjs → chat-provider-1WKsLEnM.mjs} +2 -2
  11. package/dist/{chat-provider-DmZCmBkb.d.mts → chat-provider-DyNy5xdC.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 +18 -2
  15. package/dist/cli-embedded.mjs +22 -4
  16. package/dist/cli.mjs +50 -676
  17. package/dist/{commands-DGID-4Z2.d.mts → commands-B5d-lmNN.d.mts} +1 -1
  18. package/dist/{commands-BLtqSwha.mjs → commands-BLS7erNu.mjs} +12 -1
  19. package/dist/{conformance-CKrwglzA.mjs → conformance-qJF96jZI.mjs} +164 -23
  20. package/dist/conformance.d.mts +10 -2
  21. package/dist/conformance.mjs +1 -1
  22. package/dist/digest-DAxy9Ula.mjs +4 -0
  23. package/dist/{engine-B_prP0b8.mjs → engine-eUgO5jTM.mjs} +18 -14
  24. package/dist/{events-AEKh9tJm.mjs → events-C6HwB046.mjs} +23 -9
  25. package/dist/exports-BJ3wmEMY.d.mts +4 -0
  26. package/dist/{exports-Ck4Xu3OV.mjs → exports-BsfcChdp.mjs} +805 -193
  27. package/dist/{external-BA2aCC_3.mjs → external-CHDxWIVf.mjs} +1 -1
  28. package/dist/{index-LREsSZb2.d.mts → index-DpVyZa9b.d.mts} +2 -2
  29. package/dist/index.d.mts +5 -5
  30. package/dist/index.mjs +3 -3
  31. package/dist/index.node.d.mts +5 -5
  32. package/dist/index.node.mjs +2 -2
  33. package/dist/inspect/app.js +44 -44
  34. package/dist/inspect/engine.js +5 -5
  35. package/dist/inspect-5mkjJYMS.mjs +2 -0
  36. package/dist/inspect-DtCbBtOW.mjs +643 -0
  37. package/dist/{local-DJ_qI9q7.mjs → local-Bo3XzEKB.mjs} +29 -84
  38. package/dist/{main-Jz4nbNJi.mjs → main-0nvLgajF.mjs} +45 -37
  39. package/dist/{memory-DqwXlyK4.mjs → memory-DkoqhxIH.mjs} +2 -2
  40. package/dist/{middleware-BxgizazV.mjs → middleware-CPqAuRtp.mjs} +10 -2
  41. package/dist/page-R0RoE_gM.mjs +2 -0
  42. package/dist/page-UsfvSIWc.mjs +30 -0
  43. package/dist/{provider-DEOfc4Ls.d.mts → provider-D5yVFisj.d.mts} +5 -3
  44. package/dist/{routes-BpKdMvgX.d.mts → routes-BffuaoTX.d.mts} +11 -18
  45. package/dist/{schemas-BG205xds.mjs → schemas-AZkxk06N.mjs} +3 -3
  46. package/dist/{serve-Puf3I-oI.mjs → serve-D7I3KisQ.mjs} +3 -3
  47. package/dist/{server-CS-1aeTl.mjs → server-Cc3nYq3H.mjs} +23 -13
  48. package/dist/{serving-6_bhBNAW.mjs → serving-DJMcG0dT.mjs} +1 -1
  49. package/dist/{sql-aetuEBZC.mjs → sql-l3ysn4O5.mjs} +2 -2
  50. package/dist/{sqlite-DvsB8ENQ.mjs → sqlite-CAwNHbQD.mjs} +2 -2
  51. package/dist/{sqlite-db-BPwRoDI7.mjs → sqlite-db-cm5yhrD-.mjs} +1 -1
  52. package/dist/sync-chat-sdk.d.mts +2 -2
  53. package/dist/sync-chat-sdk.mjs +2 -2
  54. package/dist/sync-github.d.mts +2 -2
  55. package/dist/sync-github.mjs +2 -2
  56. package/dist/sync-linear.d.mts +3 -3
  57. package/dist/sync-linear.mjs +2 -2
  58. package/dist/sync-slack.d.mts +3 -3
  59. package/dist/sync-slack.mjs +4 -4
  60. package/dist/sync.d.mts +2 -2
  61. package/dist/sync.mjs +2 -2
  62. package/dist/{targets-Dk_xgS9q.mjs → targets-B4Uikw0J.mjs} +66 -21
  63. package/dist/{tokens-Dn4cPZIr.mjs → tokens-DA9ipsZ-.mjs} +1 -1
  64. package/docs/01-board/01-mounting.md +12 -9
  65. package/docs/01-board/03-identity.md +2 -1
  66. package/docs/01-board/06-watchers.md +71 -40
  67. package/docs/01-board/09-access.md +10 -5
  68. package/docs/01-quickstart.md +1 -1
  69. package/docs/02-sync/01-overview.md +7 -7
  70. package/docs/02-sync/02-functions.md +5 -8
  71. package/docs/02-sync/03-slack.md +0 -8
  72. package/docs/02-sync/04-github.md +0 -8
  73. package/docs/02-sync/07-linear.md +0 -6
  74. package/docs/03-guides/01-coding-agents.md +1 -0
  75. package/docs/03-guides/02-inspector.md +3 -2
  76. package/docs/03-guides/03-ci.md +10 -4
  77. package/docs/03-guides/04-triage.md +8 -13
  78. package/docs/04-reference/01-cli.md +51 -13
  79. package/docs/04-reference/02-board.md +2 -1
  80. package/docs/04-reference/03-http.md +4 -4
  81. package/docs/04-reference/05-conformance.md +10 -3
  82. package/docs/index.md +3 -10
  83. package/package.json +2 -1
  84. package/dist/attempts-HXcskN1w.mjs +0 -10
  85. package/dist/exports-BxljH73E.d.mts +0 -4
@@ -1,5 +1,5 @@
1
1
  import { a as forbidden } from "./errors-rYDxZEuN.mjs";
2
- import { a as ChannelPath, h as SCOPE_MAX } from "./schemas-BG205xds.mjs";
2
+ import { a as CAN_MAX, o as ChannelPath } from "./schemas-AZkxk06N.mjs";
3
3
  //#region src/server/access.ts
4
4
  /**
5
5
  * What a principal may do in a channel. `read` covers messages, threads,
@@ -278,37 +278,37 @@ function decide(matched, channel) {
278
278
  permissions: [...winner.permissions].sort((a, b) => ORDER.get(a) - ORDER.get(b))
279
279
  };
280
280
  }
281
- /** An access as `x-board-scope` writes it, `dev/=read,post;ci/=read`, or `*=` for nothing: what a stored principal keeps. */
282
- function scopeOf(access) {
281
+ /** An access as `x-board-can` writes it, `dev/=read,post;ci/=read`, or `*=` for nothing: what a stored principal keeps. */
282
+ function canText(access) {
283
283
  const entries = Object.entries(access.summary()).map(([pattern, permissions]) => `${pattern}=${permissions.join(",")}`);
284
284
  return entries.length > 0 ? entries.join(";") : "*=";
285
285
  }
286
286
  /**
287
- * `x-board-scope`: `dev/=read,post,react,label;ci/=read`. Each entry is a
287
+ * `x-board-can`: `dev/=read,post,react,label;ci/=read`. Each entry is a
288
288
  * pattern and its permissions (or `all`). It's meant for a proxy that holds the
289
289
  * credential, like Pi's sandbox: the board intersects it with the principal's
290
290
  * access, so it can only narrow, and a caller holding its own token gains
291
- * nothing by sending it.
291
+ * nothing by sending it. `name` is what its errors call it: the CLI's `--can` writes the same.
292
292
  */
293
- function parseScope(header) {
294
- if (header.length > 4e3) throw new InvalidCan(`x-board-scope is longer than ${SCOPE_MAX} characters`);
293
+ function parseCan(header, name = "x-board-can") {
294
+ if (header.length > 4e3) throw new InvalidCan(`${name} is longer than ${CAN_MAX} characters`);
295
295
  const out = {};
296
296
  const entries = header.split(";").map((entry) => entry.trim());
297
- if (entries.every((entry) => entry === "")) throw new InvalidCan("x-board-scope is empty: write pattern=permissions, like dev/=read,post");
297
+ if (entries.every((entry) => entry === "")) throw new InvalidCan(`${name} is empty: write pattern=permissions, like dev/=read,post`);
298
298
  for (const entry of entries) {
299
299
  if (entry === "") continue;
300
300
  const split = entry.indexOf("=");
301
- if (split < 0) throw new InvalidCan(`x-board-scope entry ${entry} needs =: write pattern=permissions, like dev/=read,post`);
301
+ if (split < 0) throw new InvalidCan(`${name} entry ${entry} needs =: write pattern=permissions, like dev/=read,post`);
302
302
  const pattern = entry.slice(0, split).trim();
303
303
  const list = entry.slice(split + 1).trim();
304
- if (Object.hasOwn(out, pattern)) throw new InvalidCan(`x-board-scope lists ${pattern} twice`);
304
+ if (Object.hasOwn(out, pattern)) throw new InvalidCan(`${name} lists ${pattern} twice`);
305
305
  parsePattern(pattern);
306
306
  const permissions = list === "" ? [] : list.split(",").map((permission) => permission.trim());
307
307
  if (permissions.length === 1 && permissions[0] === "all") {
308
308
  out[pattern] = "all";
309
309
  continue;
310
310
  }
311
- for (const permission of permissions) if (!ORDER.has(permission)) throw new InvalidCan(`x-board-scope: unknown permission ${permission || "(empty)"}: use ${PERMISSIONS.join(", ")}, or all`);
311
+ for (const permission of permissions) if (!ORDER.has(permission)) throw new InvalidCan(`${name}: unknown permission ${permission || "(empty)"}: use ${PERMISSIONS.join(", ")}, or all`);
312
312
  out[pattern] = permissions;
313
313
  }
314
314
  return out;
@@ -396,4 +396,4 @@ function checkGrantChange(change) {
396
396
  return null;
397
397
  }
398
398
  //#endregion
399
- export { checkGrantChange as a, decide as c, scopeOf as d, union as f, authorize as i, parsePattern as l, InvalidCan as n, combine as o, writtenCan as p, PERMISSIONS as r, compileAccess as s, FULL_ACCESS as t, parseScope as u };
399
+ export { canText as a, compileAccess as c, parsePattern as d, union as f, authorize as i, decide as l, InvalidCan as n, checkGrantChange as o, writtenCan as p, PERMISSIONS as r, combine as s, FULL_ACCESS as t, parseCan as u };
package/dist/access.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { Bt as FULL_ACCESS, Gt as InvalidCan, Ht as GrantChange, It as Access, Lt as AccessSummary, Qt as Actor, Rt as Can, Ut as GrantChangeRefusal, Vt as Grant, Wt as GrantShape, Xt as compileAccess, Yt as checkGrantChange, Zt as union, qt as Permission, tn as Author, zt as ChannelPattern } from "./routes-BpKdMvgX.mjs";
2
- import { _ as GrantExplanation, a as DEFAULT_CAN, b as explainGrants, c as IssuerConfig, f as Principal, g as DecidingGrant, h as Caller, i as Claims, l as Known, n as AuthenticateContext, p as PrincipalKind, r as CallerRequest, s as HostPrincipal, t as Authenticate, u as OidcTokensOptions, v as GrantFacts, x as grantAccess, y as GrantSource } from "./auth-C21V0EK1.mjs";
1
+ import { $t as Actor, Bt as FULL_ACCESS, Gt as InvalidCan, Ht as GrantChange, It as Access, Lt as AccessSummary, Qt as union, Rt as Can, Ut as GrantChangeRefusal, Vt as Grant, Wt as GrantShape, Xt as compileAccess, Yt as checkGrantChange, Zt as parseCan, nn as Author, qt as Permission, rn as CAN_MAX, zt as ChannelPattern } from "./routes-BffuaoTX.mjs";
2
+ import { _ as GrantExplanation, a as DEFAULT_CAN, b as explainGrants, c as IssuerConfig, f as Principal, g as DecidingGrant, h as Caller, i as Claims, l as Known, n as AuthenticateContext, p as PrincipalKind, r as CallerRequest, s as HostPrincipal, t as Authenticate, u as OidcTokensOptions, v as GrantFacts, x as grantAccess, y as GrantSource } from "./auth-BXLCkeB0.mjs";
3
3
  //#region src/server/tokens.d.ts
4
4
  /**
5
5
  * The OIDC tokens made out to this board: a request's bearer token, from Vercel (people and
@@ -25,4 +25,4 @@ type ResolvedActor = {
25
25
  */
26
26
  export declare function resolveActor(principal: Principal, claims: Claims, audience: string): ResolvedActor;
27
27
  //#endregion
28
- export { type Access, type AccessSummary, type Authenticate, type AuthenticateContext, type Caller, type CallerRequest, type Can, type ChannelPattern, type Claims, DEFAULT_CAN, type DecidingGrant, FULL_ACCESS, type Grant, type GrantChange, type GrantChangeRefusal, type GrantExplanation, type GrantFacts, type GrantShape, type GrantSource, type HostPrincipal, InvalidCan, type IssuerConfig, type Known, type OidcTokensOptions, type Permission, type Principal, type PrincipalKind, checkGrantChange, compileAccess, explainGrants, grantAccess, union };
28
+ export { type Access, type AccessSummary, type Authenticate, type AuthenticateContext, CAN_MAX, type Caller, type CallerRequest, type Can, type ChannelPattern, type Claims, DEFAULT_CAN, type DecidingGrant, FULL_ACCESS, type Grant, type GrantChange, type GrantChangeRefusal, type GrantExplanation, type GrantFacts, type GrantShape, type GrantSource, type HostPrincipal, InvalidCan, type IssuerConfig, type Known, type OidcTokensOptions, type Permission, type Principal, type PrincipalKind, checkGrantChange, compileAccess, explainGrants, grantAccess, parseCan, union };
package/dist/access.mjs CHANGED
@@ -1,5 +1,6 @@
1
- import { a as checkGrantChange, f as union, n as InvalidCan, s as compileAccess, t as FULL_ACCESS } from "./access-BsP0hvcC.mjs";
2
- import { E as grantAccess, T as explainGrants, n as DEFAULT_CAN } from "./auth-CrjXLgOb.mjs";
3
- import { i as resolveActor } from "./actors-DFOpTw89.mjs";
4
- import { t as oidcTokens } from "./tokens-Dn4cPZIr.mjs";
5
- export { DEFAULT_CAN, FULL_ACCESS, InvalidCan, checkGrantChange, compileAccess, explainGrants, grantAccess, oidcTokens, resolveActor, union };
1
+ import { a as CAN_MAX } from "./schemas-AZkxk06N.mjs";
2
+ import { c as compileAccess, f as union, n as InvalidCan, o as checkGrantChange, t as FULL_ACCESS, u as parseCan } from "./access-CVkjSfxj.mjs";
3
+ import { E as grantAccess, T as explainGrants, n as DEFAULT_CAN } from "./auth-B3bBYOqf.mjs";
4
+ import { i as resolveActor } from "./actors-kfMejhaw.mjs";
5
+ import { t as oidcTokens } from "./tokens-DA9ipsZ-.mjs";
6
+ export { CAN_MAX, DEFAULT_CAN, FULL_ACCESS, InvalidCan, checkGrantChange, compileAccess, explainGrants, grantAccess, oidcTokens, parseCan, resolveActor, union };
@@ -1,11 +1,12 @@
1
1
  import { r as badRequest } from "./errors-rYDxZEuN.mjs";
2
- import { b as toStorable } from "./schemas-BG205xds.mjs";
3
- import { u as parseScope } from "./access-BsP0hvcC.mjs";
2
+ import { b as toStorable } from "./schemas-AZkxk06N.mjs";
3
+ import { u as parseCan } from "./access-CVkjSfxj.mjs";
4
4
  import { t as own } from "./own-OwgPWdmh.mjs";
5
5
  import { t as extractMentions } from "./mentions-CB6ShY4R.mjs";
6
6
  //#region src/server/actors.ts
7
7
  /** Agents whose avatars the board serves itself. */
8
8
  const KNOWN_AGENTS = [
9
+ "fx",
9
10
  "claude",
10
11
  "codex",
11
12
  "grok",
@@ -35,9 +36,10 @@ function claimsOf(headers) {
35
36
  } catch {
36
37
  throw badRequest("x-board-name must be URI-encoded");
37
38
  }
38
- const scope = headers.get("x-board-scope");
39
+ if (headers.get("x-board-scope") !== null) throw badRequest("x-board-scope is x-board-can now: send the same value as x-board-can", "invalid_scope");
40
+ const scope = headers.get("x-board-can");
39
41
  if (scope !== null) try {
40
- parseScope(scope);
42
+ parseCan(scope);
41
43
  } catch (error) {
42
44
  throw badRequest(error.message, "invalid_scope");
43
45
  }
@@ -1,5 +1,5 @@
1
1
  import { a as forbidden, l as unauthorized, r as badRequest, t as HttpError } from "./errors-rYDxZEuN.mjs";
2
- import { c as decide, o as combine, p as writtenCan, s as compileAccess, t as FULL_ACCESS, u as parseScope } from "./access-BsP0hvcC.mjs";
2
+ import { c as compileAccess, l as decide, p as writtenCan, s as combine, t as FULL_ACCESS, u as parseCan } from "./access-CVkjSfxj.mjs";
3
3
  //#region src/server/grants.ts
4
4
  /**
5
5
  * How close `principal` is to the caller, or null when it doesn't name it: `principal` for its own
@@ -498,7 +498,7 @@ function createAuthority(options) {
498
498
  */
499
499
  async function grant(principal, snapshot) {
500
500
  const resolved = await resolve(principal, snapshot);
501
- const scope = principal.scope === void 0 ? void 0 : parseScope(principal.scope);
501
+ const scope = principal.scope === void 0 ? void 0 : parseCan(principal.scope);
502
502
  if ("fixed" in resolved) return scope === void 0 ? resolved.fixed : resolved.fixed.narrow(scope);
503
503
  const decided = grantAccess({
504
504
  ...resolved.facts,
@@ -1,4 +1,4 @@
1
- import { It as Access, Jt as WrittenCan, Kt as Level, Rt as Can, qt as Permission } from "./routes-BpKdMvgX.mjs";
1
+ import { It as Access, Jt as WrittenCan, Kt as Level, Rt as Can, qt as Permission } from "./routes-BffuaoTX.mjs";
2
2
  import { JWTVerifyGetKey } from "jose";
3
3
  //#region src/server/grants.d.ts
4
4
  /** Who asks, as a verified token says, in the terms grants name them by. */
@@ -99,7 +99,7 @@ type Claims = {
99
99
  /** `x-board-handle` and `x-board-name`: a person's handle and display name. */
100
100
  handle: string | null;
101
101
  name: string | null;
102
- /** `x-board-scope`: what it narrows itself to, `dev/=read,post`. It only narrows. */
102
+ /** `x-board-can`: what it narrows itself to, `dev/=read,post`. It only narrows. */
103
103
  scope: string | null;
104
104
  };
105
105
  /** A request, as board() hands it to `authenticate`: what it said, none of it verified yet. */
@@ -127,7 +127,7 @@ type Principal = {
127
127
  expiresAt: Date | null;
128
128
  /** The verified token's claims, so its access can be worked out again later, as a schedule's sends do. Absent for people and the board's own code. */
129
129
  facts?: TokenFacts;
130
- /** The `x-board-scope` a proxy sent, which narrows whatever it may do. */
130
+ /** The `x-board-can` a proxy sent, which narrows whatever it may do. */
131
131
  scope?: string;
132
132
  /**
133
133
  * The board token it came with (its ID), kept with what it stores: a schedule or a registration
@@ -1,6 +1,6 @@
1
- import { A as LinkedQuery, C as InboxItem, Ct as ThreadsPage, E as InboxQuery, Et as TokenBody, F as MessagesPage, I as MessagesQuery, It as Access, J as RegistrationView, K as RegisterBody, Kt as Level, M as MatchesQuery, N as Me, Nt as UploadStartBody, O as LabelBody, Ot as TokenView, P as MessageView, Pt as UploadTicket, Qt as Actor, S as InboxEntry, St as ThreadView, T as InboxPushBody, W as ReactBody, Z as ScheduleBody, _ as GrantBody, _t as SyncReceiptBody, at as SourceJoinBody, b as GrantView, bt as SyncedView, c as DeleteBody, ct as SourceReadQuery, d as EventsPage, dt as SyncCopiesView, en as Attachment, et as ScheduleView, f as EventsQuery, h as Explanation, ht as SyncImportBody, i as BoardEventView, in as ExternalEvent, it as SourceJoin, j as MatchView, jt as UpdateGrantBody, kt as TypingBody, l as Discovery, m as ExplainQuery, mt as SyncFindView, nn as Labels, o as ChannelView, pt as SyncFindQuery, qt as Permission, s as CreateChannelBody, st as SourceRead, t as AckBody, tn as Author, tt as SchedulesQuery, u as EditBody, ut as SyncCopiesQuery, w as InboxNextQuery, wt as ThreadsQuery, x as InboxAckBody, yt as SyncThreadView, z as PostBody } from "./routes-BpKdMvgX.mjs";
2
- import { d as Pinned, l as Known, m as StoredGrant, o as Granted, t as Authenticate } from "./auth-C21V0EK1.mjs";
3
- import { L as ProfileOption, M as BoardClient, P as ErrorOrigin, p as SyncProvider } from "./provider-DEOfc4Ls.mjs";
1
+ import { $t as Actor, A as LinkedQuery, C as InboxItem, Ct as ThreadsPage, E as InboxQuery, Et as TokenBody, F as MessagesPage, I as MessagesQuery, It as Access, J as RegistrationView, K as RegisterBody, Kt as Level, M as MatchesQuery, N as Me, Nt as UploadStartBody, O as LabelBody, Ot as TokenView, P as MessageView, Pt as UploadTicket, S as InboxEntry, St as ThreadView, T as InboxPushBody, W as ReactBody, Z as ScheduleBody, _ as GrantBody, _t as SyncReceiptBody, at as SourceJoinBody, b as GrantView, bt as SyncedView, c as DeleteBody, ct as SourceReadQuery, d as EventsPage, dt as SyncCopiesView, et as ScheduleView, f as EventsQuery, h as Explanation, ht as SyncImportBody, i as BoardEventView, in as Labels, it as SourceJoin, j as MatchView, jt as UpdateGrantBody, kt as TypingBody, l as Discovery, m as ExplainQuery, mt as SyncFindView, nn as Author, o as ChannelView, on as ExternalEvent, pt as SyncFindQuery, qt as Permission, s as CreateChannelBody, st as SourceRead, t as AckBody, tn as Attachment, tt as SchedulesQuery, u as EditBody, ut as SyncCopiesQuery, w as InboxNextQuery, wt as ThreadsQuery, x as InboxAckBody, yt as SyncThreadView, z as PostBody } from "./routes-BffuaoTX.mjs";
2
+ import { d as Pinned, l as Known, m as StoredGrant, o as Granted, t as Authenticate } from "./auth-BXLCkeB0.mjs";
3
+ import { L as ProfileOption, M as BoardClient, P as ErrorOrigin, p as SyncProvider } from "./provider-D5yVFisj.mjs";
4
4
  import { z } from "zod";
5
5
  //#region src/api/protocol.d.ts
6
6
  type Input<S extends z.ZodType> = NonNullable<z.output<S>>;
@@ -477,11 +477,6 @@ type Watcher = {
477
477
  * delivery receipts, as in `vb tail`: `message.synced` says where a message landed on a platform.
478
478
  */
479
479
  tail: string;
480
- /**
481
- * `matches` (the default) runs on every event the tail prints. `enters` runs only when a
482
- * message enters the view: it didn't match before the event and does after it.
483
- */
484
- when?: 'matches' | 'enters';
485
480
  run: (context: WatcherContext) => unknown;
486
481
  };
487
482
  //#endregion
@@ -632,7 +627,6 @@ type Subscription =
632
627
  {
633
628
  kind: 'tail';
634
629
  tail: string;
635
- when: 'matches' | 'enters';
636
630
  } |
637
631
  /** Sync's outbound: every post, change, and thread sync in every channel, as its own code sees them. */
638
632
  {
@@ -1,4 +1,4 @@
1
- import { t as Backend } from "./backend-D21q8mdm.mjs";
1
+ import { t as Backend } from "./backend-BkQlF1LQ.mjs";
2
2
  //#region src/server/local.d.ts
3
3
  type LocalOptions = {
4
4
  /**
@@ -1,2 +1,2 @@
1
- import { t as local } from "./local-DJ_qI9q7.mjs";
1
+ import { t as local } from "./local-Bo3XzEKB.mjs";
2
2
  export { local };
@@ -1,5 +1,5 @@
1
- import "./external-BA2aCC_3.mjs";
2
- import { c as SyncProvider, s as ResolvedTarget } from "./events-AEKh9tJm.mjs";
1
+ import "./external-CHDxWIVf.mjs";
2
+ import { c as SyncProvider, s as ResolvedTarget } from "./events-C6HwB046.mjs";
3
3
  import { AsyncLocalStorage } from "node:async_hooks";
4
4
  import { Chat, stringifyMarkdown } from "chat";
5
5
  //#region src/sync/chat.ts
@@ -1,5 +1,5 @@
1
- import { Qt as Actor, an as ExternalFile, it as SourceJoin, on as ExternalLink, rn as ExternalAuthor, st as SourceRead } from "./routes-BpKdMvgX.mjs";
2
- import { T as ProviderEvent, a as ProviderOptions, c as ReceivedEvent, d as ResolvedTarget, g as SyncFn, i as ProviderFile, k as SyncRoot, n as FileDelivery, o as ProviderPost, p as SyncProvider, r as ProviderDelivery, s as Receive, t as FetchedLink } from "./provider-DEOfc4Ls.mjs";
1
+ import { $t as Actor, an as ExternalAuthor, cn as ExternalLink, it as SourceJoin, sn as ExternalFile, st as SourceRead } from "./routes-BffuaoTX.mjs";
2
+ import { T as ProviderEvent, a as ProviderOptions, c as ReceivedEvent, d as ResolvedTarget, g as SyncFn, i as ProviderFile, k as SyncRoot, n as FileDelivery, o as ProviderPost, p as SyncProvider, r as ProviderDelivery, s as Receive, t as FetchedLink } from "./provider-D5yVFisj.mjs";
3
3
  import { Adapter, Author, FileUpload, Message, ReactionEvent, StateAdapter } from "chat";
4
4
  //#region src/sync/chat-provider.d.ts
5
5
  type ChatInput = {
@@ -1,2 +1,2 @@
1
- import { a as OptionName, c as globalOptions, d as options, f as usage, i as CliOption, l as groups, n as CliCommand, o as commands, r as CliExample, s as filters, t as CliArgument, u as option } from "./commands-DGID-4Z2.mjs";
1
+ import { a as OptionName, c as globalOptions, d as options, f as usage, i as CliOption, l as groups, n as CliCommand, o as commands, r as CliExample, s as filters, t as CliArgument, u as option } from "./commands-B5d-lmNN.mjs";
2
2
  export { CliArgument, CliCommand, CliExample, CliOption, OptionName, commands, filters, globalOptions, groups, option, options, usage };
@@ -1,2 +1,2 @@
1
- import { a as option, i as groups, n as filters, o as options, r as globalOptions, s as usage, t as commands } from "./commands-BLtqSwha.mjs";
1
+ import { a as option, i as groups, n as filters, o as options, r as globalOptions, s as usage, t as commands } from "./commands-BLS7erNu.mjs";
2
2
  export { commands, filters, globalOptions, groups, option, options, usage };
@@ -1,5 +1,5 @@
1
- import { d as Board } from "./backend-D21q8mdm.mjs";
2
- import "./index-LREsSZb2.mjs";
1
+ import { d as Board } from "./backend-BkQlF1LQ.mjs";
2
+ import "./index-DpVyZa9b.mjs";
3
3
  //#region src/cli/failure.d.ts
4
4
  /**
5
5
  * What kind of failure it is, which fixes the exit code: 2 for `usage` and `missing_input`, 130
@@ -51,6 +51,17 @@ export declare function failureLines(failure: Failure): string[];
51
51
  export declare function commandWord(argv: string[]): string | undefined;
52
52
  //#endregion
53
53
  //#region src/cli/embedded.d.ts
54
+ /**
55
+ * The inspector's page as this version of board's npm package has it, for an app that bundles
56
+ * board's CLI and so has no file of board's beside it: `path` in `name@version`'s tarball, and its
57
+ * SHA-256 (hex) to check what it fetched against. The build sets `sha256`; from source, it's null.
58
+ */
59
+ export declare const INSPECTOR_PAGE: {
60
+ name: '@vercel/board';
61
+ version: string;
62
+ path: 'dist/inspect/app.js';
63
+ sha256: string | null;
64
+ };
54
65
  /**
55
66
  * Board's CLI as `appName` names it in help, usage, and errors (`vercel board`). With no board
56
67
  * URL anywhere, it talks to the team's board in Vercel's API: `VERCEL_ORG_ID`'s, the nearest linked
@@ -64,6 +75,10 @@ export declare function commandWord(argv: string[]): string | undefined;
64
75
  * (`--scope` still wins): board asks for each only when a request needs it, so help, a typo, or
65
76
  * misuse never refreshes a login or looks a team up. With `fetch`, board's requests to Vercel's API
66
77
  * with that login go through the app's own, which adds its credentials (a DPoP proof, say).
78
+ *
79
+ * `inspectorPage` is the inspector's page, which `inspect` asks for when it runs: the one
80
+ * `INSPECTOR_PAGE` names, as the app fetched it and checked it against its `sha256`. Without one,
81
+ * `inspect` reads it beside board's files, which an app that bundles board's CLI has none of.
67
82
  */
68
83
  export declare function createApp(options: {
69
84
  appName: string;
@@ -74,6 +89,7 @@ export declare function createApp(options: {
74
89
  login?: () => Promise<string>;
75
90
  team?: () => Promise<string | null>;
76
91
  fetch?: typeof globalThis.fetch;
92
+ inspectorPage?: () => Promise<string>;
77
93
  }): {
78
94
  run(args: string[]): Promise<number>;
79
95
  };
@@ -1,6 +1,19 @@
1
- import { a as commandLine, c as failureLines, i as mainWith, l as formatFailure, n as commandWord, o as exitCode, r as main, s as failureDocument, t as Failed } from "./main-Jz4nbNJi.mjs";
1
+ import { g as VERSION } from "./targets-B4Uikw0J.mjs";
2
+ import { a as commandLine, c as failureLines, i as mainWith, l as formatFailure, n as commandWord, o as exitCode, r as main, s as failureDocument, t as Failed } from "./main-0nvLgajF.mjs";
3
+ import { t as PAGE_SHA256 } from "./digest-DAxy9Ula.mjs";
2
4
  //#region src/cli/embedded.ts
3
5
  /**
6
+ * The inspector's page as this version of board's npm package has it, for an app that bundles
7
+ * board's CLI and so has no file of board's beside it: `path` in `name@version`'s tarball, and its
8
+ * SHA-256 (hex) to check what it fetched against. The build sets `sha256`; from source, it's null.
9
+ */
10
+ const INSPECTOR_PAGE = {
11
+ name: "@vercel/board",
12
+ version: VERSION,
13
+ path: "dist/inspect/app.js",
14
+ sha256: PAGE_SHA256
15
+ };
16
+ /**
4
17
  * Board's CLI as `appName` names it in help, usage, and errors (`vercel board`). With no board
5
18
  * URL anywhere, it talks to the team's board in Vercel's API: `VERCEL_ORG_ID`'s, the nearest linked
6
19
  * project's team's (`.vercel`), your login's, or `--scope`'s. `run` takes what follows the name, and answers the exit code:
@@ -13,9 +26,13 @@ import { a as commandLine, c as failureLines, i as mainWith, l as formatFailure,
13
26
  * (`--scope` still wins): board asks for each only when a request needs it, so help, a typo, or
14
27
  * misuse never refreshes a login or looks a team up. With `fetch`, board's requests to Vercel's API
15
28
  * with that login go through the app's own, which adds its credentials (a DPoP proof, say).
29
+ *
30
+ * `inspectorPage` is the inspector's page, which `inspect` asks for when it runs: the one
31
+ * `INSPECTOR_PAGE` names, as the app fetched it and checked it against its `sha256`. Without one,
32
+ * `inspect` reads it beside board's files, which an app that bundles board's CLI has none of.
16
33
  */
17
34
  function createApp(options) {
18
- const { appName, onError, onWarning, login, team, fetch } = options;
35
+ const { appName, onError, onWarning, login, team, fetch, inspectorPage } = options;
19
36
  return { run: (args) => main(args, {
20
37
  name: appName,
21
38
  commands: {},
@@ -24,7 +41,8 @@ function createApp(options) {
24
41
  ...onWarning ? { onWarning } : {},
25
42
  ...login ? { login } : {},
26
43
  ...team ? { team } : {},
27
- ...fetch ? { fetch } : {}
44
+ ...fetch ? { fetch } : {},
45
+ ...inspectorPage ? { inspectorPage } : {}
28
46
  }) };
29
47
  }
30
48
  const lacking = (what, option) => async () => {
@@ -88,4 +106,4 @@ function vb(board, argv, options = {}) {
88
106
  return result;
89
107
  }
90
108
  //#endregion
91
- export { commandLine, commandWord, createApp, failureLines, vb };
109
+ export { INSPECTOR_PAGE, commandLine, commandWord, createApp, failureLines, vb };