@vercel/board 0.44.0 → 0.45.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 (69) hide show
  1. package/dist/{access-BgBiaCyx.mjs → access-3udXjJAg.mjs} +2 -2
  2. package/dist/access.d.mts +3 -3
  3. package/dist/access.mjs +6 -6
  4. package/dist/{actors-DkZsnMgA.mjs → actors-DasGZnfb.mjs} +3 -3
  5. package/dist/{auth-C8jxty0C.d.mts → auth-BG_whr9_.d.mts} +1 -1
  6. package/dist/{auth-Ft4AJptx.mjs → auth-aiOVE82-.mjs} +2 -2
  7. package/dist/{backend-_3W_5g6y.d.mts → backend-D6yTo8Un.d.mts} +3 -3
  8. package/dist/backend-local.d.mts +1 -1
  9. package/dist/backend-local.mjs +1 -1
  10. package/dist/{chat-provider-DZ4DsAZ7.mjs → chat-provider-BvNqOQFL.mjs} +2 -2
  11. package/dist/{chat-provider-HQo68RWL.d.mts → chat-provider-V2jnjVLq.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 +14 -7
  17. package/dist/{commands-B75pBXIV.mjs → commands-CqdnjUkm.mjs} +6 -0
  18. package/dist/{commands-DHGZWeSZ.d.mts → commands-DewS14_P.d.mts} +6 -0
  19. package/dist/{conformance-CHqXZoGe.mjs → conformance-BInS4_6b.mjs} +3 -3
  20. package/dist/conformance.d.mts +1 -1
  21. package/dist/conformance.mjs +1 -1
  22. package/dist/{engine-D07DTYSi.mjs → engine-XVBt02Bl.mjs} +5 -5
  23. package/dist/{errors-DUzpDSrJ.mjs → errors-ZazTZh-s.mjs} +20 -3
  24. package/dist/{events-voButVQW.mjs → events-D17RndlV.mjs} +2 -2
  25. package/dist/{exports-BNk4w-b2.mjs → exports-DCf75prP.mjs} +183 -45
  26. package/dist/exports-Gspe1eEq.d.mts +4 -0
  27. package/dist/{external-DymyhUzl.mjs → external-DfhN7lKK.mjs} +1 -1
  28. package/dist/{index-CwOOIT0e.d.mts → index-Djmr4GzQ.d.mts} +2 -2
  29. package/dist/index.d.mts +6 -6
  30. package/dist/index.mjs +4 -4
  31. package/dist/index.node.d.mts +6 -6
  32. package/dist/index.node.mjs +3 -3
  33. package/dist/inspect/app.js +88 -88
  34. package/dist/{inspect-dtQlHBcq.mjs → inspect-B0_aKQM8.mjs} +23 -7
  35. package/dist/inspect-CULoD54F.mjs +2 -0
  36. package/dist/{local-CnGNTReZ.mjs → local-Bel_oeFa.mjs} +25 -14
  37. package/dist/{main-CpsAmpEy.mjs → main-DmsdcUZ_.mjs} +19 -11
  38. package/dist/{memory-DhduVbUu.mjs → memory-DyEL0fvN.mjs} +2 -2
  39. package/dist/{middleware-0DUFrav-.mjs → middleware-BHHKHA9q.mjs} +2 -2
  40. package/dist/{origin-D4ER_Tze.mjs → origin-BHmEdok7.mjs} +7 -7
  41. package/dist/{provider-CVI-DlWl.d.mts → provider-BC9mPYVh.d.mts} +14 -6
  42. package/dist/{routes-DrByOCc1.mjs → routes-CkUetTO2.mjs} +12 -13
  43. package/dist/{routes-CErTwlSZ.d.mts → routes-zm4TXKCC.d.mts} +6 -1
  44. package/dist/{schemas-DAzSsgWk.mjs → schemas-BhZaystC.mjs} +8 -2
  45. package/dist/{serve-BQT5quKD.mjs → serve-bPSEx_8X.mjs} +4 -4
  46. package/dist/{server-FlDE6BDt.mjs → server-CcvxkXzG.mjs} +8 -8
  47. package/dist/{serving-hcxzaCCO.mjs → serving-BLVRrJ7P.mjs} +1 -1
  48. package/dist/{sql-P9g-rLIF.mjs → sql-CyVcjw8x.mjs} +2 -2
  49. package/dist/{sqlite-B3rCcIof.mjs → sqlite-Con-8duk.mjs} +2 -2
  50. package/dist/{sqlite-db-D0Fyju-4.mjs → sqlite-db-BdzxtUOV.mjs} +1 -1
  51. package/dist/sync-chat-sdk.d.mts +2 -2
  52. package/dist/sync-chat-sdk.mjs +2 -2
  53. package/dist/sync-github.d.mts +2 -2
  54. package/dist/sync-github.mjs +2 -2
  55. package/dist/sync-linear.d.mts +3 -3
  56. package/dist/sync-linear.mjs +2 -2
  57. package/dist/sync-slack.d.mts +3 -3
  58. package/dist/sync-slack.mjs +4 -4
  59. package/dist/sync.d.mts +2 -2
  60. package/dist/sync.mjs +2 -2
  61. package/dist/{tokens-BSMpTPEe.mjs → tokens-BErYXuHZ.mjs} +2 -2
  62. package/docs/01-board/04-messages.md +1 -1
  63. package/docs/01-board/09-access.md +8 -0
  64. package/docs/03-guides/02-inspector.md +16 -0
  65. package/docs/04-reference/02-board.md +23 -2
  66. package/docs/04-reference/03-http.md +2 -2
  67. package/package.json +1 -1
  68. package/dist/exports-DFwXKst5.d.mts +0 -4
  69. package/dist/inspect-DBLdh9NM.mjs +0 -2
@@ -1,12 +1,12 @@
1
- import { _ as IMPORT_BYTES_MAX, a as forbidden, b as mediaType, c as toErrorResponse, d as createBoardClient, f as duration, h as ATTACHMENT_BYTES_MAX, l as unauthorized, n as RejectedError, o as json, p as formatProfileHeader, r as badRequest, s as notFound, t as HttpError, u as BoardError, v as fileName } from "./errors-DUzpDSrJ.mjs";
2
- import { h as RemoteWatcherId } from "./schemas-DAzSsgWk.mjs";
1
+ import { S as mediaType, _ as ATTACHMENT_BYTES_MAX, a as forbidden, b as fileName, d as BoardError, f as createBoardClient, h as formatProfileHeader, l as toErrorResponse, m as eventsState, n as RejectedError, o as json, p as duration, r as badRequest, s as notFound, t as HttpError, u as unauthorized, y as IMPORT_BYTES_MAX } from "./errors-ZazTZh-s.mjs";
2
+ import { g as RemoteWatcherId } from "./schemas-BhZaystC.mjs";
3
+ import { A as SyncReceiptBody, C as SchemaBody, D as SyncCopiesQuery, E as SyncBody, F as routes, M as TypingBody, N as UpdateGrantBody, O as SyncFindQuery, P as UploadStartBody, S as SchedulesQuery, T as SourceReadQuery, _ as PostBody, a as EventsQuery, b as RegisterBody, c as GrantBody, d as InboxPushBody, f as InboxQuery, g as MessagesQuery, h as MatchesQuery, i as EditBody, j as ThreadsQuery, k as SyncImportBody, l as InboxAckBody, m as LinkedQuery, n as CreateChannelBody, o as ExplainQuery, p as LabelBody, r as DeleteBody, t as AckBody, u as InboxNextQuery, v as ReactBody, w as SourceJoinBody, x as ScheduleBody, y as Ref } from "./routes-CkUetTO2.mjs";
4
+ import { _ as sha256, a as waitUntil, c as platformProfile, d as userIdOf, m as derivedId, o as actorParts, r as runMiddleware, s as importedHandle, t as DroppedError, u as underPrincipal } from "./middleware-BHHKHA9q.mjs";
3
5
  import { n as blocksIn, r as findBlocks } from "./blocks-CVoBC7ur.mjs";
4
- import { A as SyncReceiptBody, C as SchemaBody, D as SyncCopiesQuery, E as SyncBody, F as routes, M as TypingBody, N as UpdateGrantBody, O as SyncFindQuery, P as UploadStartBody, S as SchedulesQuery, T as SourceReadQuery, _ as PostBody, a as EventsQuery, b as RegisterBody, c as GrantBody, d as InboxPushBody, f as InboxQuery, g as MessagesQuery, h as MatchesQuery, i as EditBody, j as ThreadsQuery, k as SyncImportBody, l as InboxAckBody, m as LinkedQuery, n as CreateChannelBody, o as ExplainQuery, p as LabelBody, r as DeleteBody, t as AckBody, u as InboxNextQuery, v as ReactBody, w as SourceJoinBody, x as ScheduleBody, y as Ref } from "./routes-DrByOCc1.mjs";
5
- import { _ as sha256, a as waitUntil, c as platformProfile, d as userIdOf, m as derivedId, o as actorParts, r as runMiddleware, s as importedHandle, t as DroppedError, u as underPrincipal } from "./middleware-0DUFrav-.mjs";
6
- import { a as compileWatcher, c as METHODS, d as queryObject, f as readCapped, h as VERSION, i as runMatch, l as createRouter, m as SYNC, n as syncTarget, p as readJson, r as canonicalWatchers, t as SYNC_ACTOR, u as openapi } from "./origin-D4ER_Tze.mjs";
7
- import { a as canText, c as compileAccess, d as parsePattern, n as InvalidCan, r as PERMISSIONS, t as FULL_ACCESS, u as parseCan } from "./access-BgBiaCyx.mjs";
8
- import { C as explainGrants, b as verifiesTokens, d as grantIssuers, f as hostPrincipal, i as VERCEL_ISSUER, l as createAuthority, t as DEFAULT_CAN$1, u as fromTokens, y as verifiedIssuers } from "./auth-Ft4AJptx.mjs";
9
- import { a as resolveActor, o as viaOf, r as claimsOf, t as KNOWN_AGENTS } from "./actors-DkZsnMgA.mjs";
6
+ import { a as compileWatcher, c as METHODS, d as queryObject, f as readCapped, h as VERSION, i as runMatch, l as createRouter, m as SYNC, n as syncTarget, p as readJson, r as canonicalWatchers, t as SYNC_ACTOR, u as openapi } from "./origin-BHmEdok7.mjs";
7
+ import { a as canText, c as compileAccess, d as parsePattern, n as InvalidCan, r as PERMISSIONS, t as FULL_ACCESS, u as parseCan } from "./access-3udXjJAg.mjs";
8
+ import { C as explainGrants, b as verifiesTokens, d as grantIssuers, f as hostPrincipal, i as VERCEL_ISSUER, l as createAuthority, t as DEFAULT_CAN$1, u as fromTokens, y as verifiedIssuers } from "./auth-aiOVE82-.mjs";
9
+ import { a as resolveActor, o as viaOf, r as claimsOf, t as KNOWN_AGENTS } from "./actors-DasGZnfb.mjs";
10
10
  import { t as checkValue } from "./data-values-CoTP0SQG.mjs";
11
11
  //#region src/server/registrant.ts
12
12
  /** Registering again this soon after the same registration only repeats it. */
@@ -1201,22 +1201,100 @@ function createVercel(options, environment) {
1201
1201
  };
1202
1202
  /** The actor in a read of the list, or undefined when it doesn't have them or failed. */
1203
1203
  const inList = (read, id) => read.views.then((views) => views.get(id), () => void 0);
1204
+ /** Whether the API answers actors by their IDs. An older one answers 400 for a query it doesn't know, `id`, and names come from the whole list. */
1205
+ let namesById = true;
1206
+ /** Actor IDs one request names, as many as the API takes. */
1207
+ const NAMED_AT_ONCE = 100;
1208
+ /** Each actor asked for by ID, and when: one the API didn't have is asked for again after `NAMES_FRESH_MS`, as one it had is. */
1209
+ const asked = /* @__PURE__ */ new Map();
1210
+ /** The request for actors by ID that hasn't gone out yet: everyone named before this turn's promises settle shares it. */
1211
+ let asking = null;
1204
1212
  /**
1205
- * An actor as board shows them: a person by their Vercel username and name, and an agent acting
1206
- * for a person by its profile under them, as the API names them; anyone else (a project, an app,
1207
- * an agent of one), or someone the API doesn't list, by their principal. The list is read again
1208
- * every few minutes, and at once for someone who wrote since it was.
1213
+ * Once everything already running in this turn has had its say, and before any timer or request answers: the
1214
+ * views of a page each name their author as they start, a few promise steps apart, and what waits on them
1215
+ * (a watcher's run, a wake-up's answer) is no later than it was.
1209
1216
  */
1210
- async function nameOf(who, actor) {
1217
+ const settled = async () => {
1218
+ for (let step = 0; step < 16; step++) await null;
1219
+ };
1220
+ /** The actors `ids` name, in one request, or null from an API that doesn't answer them by ID. */
1221
+ const readNamed = async (who, ids) => {
1222
+ try {
1223
+ const { actors } = await api(who, "GET", await onBoard(who, "/actors"), { query: { id: ids } });
1224
+ return new Map(actors.map((view) => [view.id, view]));
1225
+ } catch (error) {
1226
+ if (!(error instanceof HttpError && error.status >= 400 && error.status < 500 && error.status !== 429)) throw error;
1227
+ if (error.status === 400 && /additional property/i.test(error.message)) namesById = false;
1228
+ return null;
1229
+ }
1230
+ };
1231
+ /** Asks for `actors` by ID together, before each is named: a page's authors, or a page of changes', in one request. */
1232
+ const naming = (who, actors) => {
1233
+ if (namesById) for (const actor of actors) byId(who, actor.id);
1234
+ };
1235
+ /**
1236
+ * An actor as the API names them, asked for by ID with everyone else named in the same turn: the
1237
+ * authors on a page cost one request however many actors the board has. Undefined for one the API
1238
+ * doesn't have or a read that failed, which isn't kept; null when the API doesn't answer by ID.
1239
+ */
1240
+ function byId(who, id) {
1241
+ const kept = asked.get(id);
1242
+ if (kept && Date.now() - kept.at <= NAMES_FRESH_MS) return kept.view;
1243
+ let batch = asking;
1244
+ if (!batch || batch.ids.length >= NAMED_AT_ONCE) {
1245
+ const ids = [];
1246
+ const next = {
1247
+ ids,
1248
+ views: settled().then(() => {
1249
+ if (asking === next) asking = null;
1250
+ return readNamed(who, ids);
1251
+ })
1252
+ };
1253
+ batch = asking = next;
1254
+ }
1255
+ batch.ids.push(id);
1256
+ const view = batch.views.then((views) => views === null ? null : views.get(id), () => {
1257
+ if (asked.get(id)?.view === view) asked.delete(id);
1258
+ });
1259
+ if (asked.size >= 1e4) asked.clear();
1260
+ asked.set(id, {
1261
+ at: Date.now(),
1262
+ view
1263
+ });
1264
+ return view;
1265
+ }
1266
+ /**
1267
+ * The name of the project `actor` is of, one of its deployments or their agents: as its own actor names it,
1268
+ * asked for by ID, or else as the actors list does. Undefined for an actor of no project, or one nothing names.
1269
+ */
1270
+ async function projectOf(who, actor, own) {
1271
+ if (actor.principal.type !== "project") return void 0;
1272
+ const { projectId } = actor.principal;
1273
+ const view = own === void 0 ? namesById ? await byId(who, actor.id) : null : own;
1274
+ return (view ? projectNamesOf([[actor.id, view]]).get(projectId) : void 0) ?? await namedProject(who, projectId);
1275
+ }
1276
+ /** An actor as the actors list names them: read again every few minutes, and at once for someone who wrote since it was. */
1277
+ async function listed(who, id) {
1211
1278
  const current = !actorNames || Date.now() - actorNames.at > NAMES_FRESH_MS ? readNames(who) : actorNames;
1212
- let found = await inList(current, actor.id);
1213
- if (!found && !unlisted.has(actor.id)) {
1279
+ let found = await inList(current, id);
1280
+ if (!found && !unlisted.has(id)) {
1214
1281
  const again = actorNames && actorNames !== current ? actorNames : readNames(who);
1215
- found = await inList(again, actor.id);
1216
- if (!found && await again.views.then(() => true, () => false)) unlisted.add(actor.id);
1282
+ found = await inList(again, id);
1283
+ if (!found && await again.views.then(() => true, () => false)) unlisted.add(id);
1217
1284
  }
1285
+ return found;
1286
+ }
1287
+ /**
1288
+ * An actor as board shows them: a person by their Vercel username and name, and an agent acting
1289
+ * for a person by its profile under them, as the API names them; anyone else (a project, an app,
1290
+ * an agent of one), or someone the API doesn't have, by their principal. The API is asked for
1291
+ * them by ID, or on an older API for its whole list.
1292
+ */
1293
+ async function nameOf(who, actor) {
1294
+ const own = namesById ? await byId(who, actor.id) : null;
1295
+ const found = own === null ? await listed(who, actor.id) : own;
1218
1296
  const kind = found && apiKind(found.kind);
1219
- const project = actor.principal.type === "project" ? await namedProject(who, actor.principal.projectId) : void 0;
1297
+ const project = await projectOf(who, actor, own);
1220
1298
  if (!found || !(kind === "person" || kind === "external" || kind === "agent" && actor.principal.type === "user")) return actorView(actor, found, project);
1221
1299
  const via = actor.profile && actor.principal.type !== "external" ? { via: viaFor(actor.principal, found, project) } : {};
1222
1300
  const platform = found.platform ?? actor.profile?.platform?.platform;
@@ -1279,10 +1357,12 @@ function createVercel(options, environment) {
1279
1357
  if (from === void 0) return null;
1280
1358
  const project = importerOf(by);
1281
1359
  if (project === null || project === await ownProject(who)) return from;
1282
- return `${await projectName(who, project)}/${from}`;
1360
+ return `${await projectOf(who, by) ?? project}/${from}`;
1283
1361
  }
1284
1362
  async function view(who, message, channel) {
1285
1363
  const root = message.sequence === 1;
1364
+ const author = nameOf(who, message.createdBy);
1365
+ author.catch(() => {});
1286
1366
  return {
1287
1367
  id: message.id,
1288
1368
  channel,
@@ -1309,7 +1389,7 @@ function createVercel(options, environment) {
1309
1389
  })),
1310
1390
  version: message.version,
1311
1391
  revision: message.revision,
1312
- author: await nameOf(who, message.createdBy),
1392
+ author: await author,
1313
1393
  ...message.schedule ? { schedule: {
1314
1394
  id: message.schedule.id,
1315
1395
  n: message.schedule.n
@@ -1479,6 +1559,31 @@ function createVercel(options, environment) {
1479
1559
  label
1480
1560
  }, signal);
1481
1561
  }
1562
+ /** Whether the API lists threads with their first and newest messages (`include=messages`): until it refuses the parameter, it's asked. */
1563
+ let threadsWithMessages = true;
1564
+ /**
1565
+ * A page of a channel's threads, each with its first and newest message where the API sends them, so
1566
+ * showing them costs no read of its own. An API from before `include=messages` takes no parameter
1567
+ * it doesn't know and answers 400: the page is read again without it, and it's never asked again.
1568
+ */
1569
+ async function threadPage(who, path, query, signal) {
1570
+ if (threadsWithMessages) try {
1571
+ return await api(who, "GET", path, {
1572
+ query: {
1573
+ ...query,
1574
+ include: "messages"
1575
+ },
1576
+ signal
1577
+ });
1578
+ } catch (error) {
1579
+ if (!(error instanceof HttpError && error.status === 400 && /additional property/i.test(error.message))) throw error;
1580
+ threadsWithMessages = false;
1581
+ }
1582
+ return api(who, "GET", path, {
1583
+ query,
1584
+ signal
1585
+ });
1586
+ }
1482
1587
  /**
1483
1588
  * A channel's threads, as far as a read needs: the API lists them most recently active first, so
1484
1589
  * it stops at the first not active since `after`, or at the `limit` newest when it's given one
@@ -1490,14 +1595,11 @@ function createVercel(options, environment) {
1490
1595
  const out = [];
1491
1596
  let cursor;
1492
1597
  do {
1493
- const found = await api(who, "GET", path, {
1494
- query: {
1495
- channelId: channel.id,
1496
- label,
1497
- cursor
1498
- },
1499
- signal
1500
- });
1598
+ const found = await threadPage(who, path, {
1599
+ channelId: channel.id,
1600
+ label,
1601
+ cursor
1602
+ }, signal);
1501
1603
  out.push(...found.threads);
1502
1604
  cursor = found.cursor ?? void 0;
1503
1605
  const last = out.at(-1);
@@ -1505,14 +1607,26 @@ function createVercel(options, environment) {
1505
1607
  } while (cursor);
1506
1608
  return out;
1507
1609
  }
1508
- /** A thread at a glance: its root, its reply count, and its latest reply, read by reference. */
1509
- async function summary(who, thread, channel, signal) {
1510
- const [root, last] = await Promise.all([messageById(who, idAt(thread.id, 1), signal), thread.lastMessage && thread.lastMessage.sequence > 1 ? messageById(who, thread.lastMessage.id, signal) : null]);
1511
- return {
1512
- message: await view(who, root.message, channel.name),
1513
- replies: thread.messageCount - 1,
1514
- last: last && await view(who, last.message, channel.name)
1515
- };
1610
+ /**
1611
+ * A page of threads as their summaries: each thread's first and newest messages as its thread list brought them,
1612
+ * or read by reference from an API that lists threads without them, then every author on the page is asked for
1613
+ * together, before any is named.
1614
+ */
1615
+ async function summaries(who, page, signal) {
1616
+ const read = await Promise.all(page.map(({ thread }) => {
1617
+ const replied = thread.lastMessage !== void 0 && thread.lastMessage.sequence > 1;
1618
+ return Promise.all([thread.rootMessage ?? messageById(who, idAt(thread.id, 1), signal).then((found) => found.message), !replied ? null : thread.latestMessage ?? messageById(who, thread.lastMessage.id, signal).then((found) => found.message)]);
1619
+ }));
1620
+ naming(who, read.flatMap(([root, last]) => [root.createdBy, ...last ? [last.createdBy] : []]));
1621
+ return Promise.all(page.map(async ({ thread, channel }, i) => {
1622
+ const [root, last] = read[i];
1623
+ const [message, newest] = await Promise.all([view(who, root, channel.name), last && view(who, last, channel.name)]);
1624
+ return {
1625
+ message,
1626
+ replies: thread.messageCount - 1,
1627
+ last: newest
1628
+ };
1629
+ }));
1516
1630
  }
1517
1631
  let me = null;
1518
1632
  /** Who these credentials are, asked once. */
@@ -1768,6 +1882,7 @@ function createVercel(options, environment) {
1768
1882
  page
1769
1883
  }))).sort((a, b) => a.change.createdAt - b.change.createdAt);
1770
1884
  const events = [];
1885
+ naming(who, merged.flatMap(({ change }) => [change.actor, ...change.currentMessage ? [change.currentMessage.createdBy] : []]));
1771
1886
  for (const { change, i, page } of merged) {
1772
1887
  running[page.channel.id] = {
1773
1888
  at: page.at,
@@ -1898,6 +2013,7 @@ function createVercel(options, environment) {
1898
2013
  });
1899
2014
  cursor = page.cursor;
1900
2015
  const events = [];
2016
+ naming(who, page.events.flatMap((change) => [change.actor, ...change.currentMessage ? [change.currentMessage.createdBy] : []]));
1901
2017
  for (const change of page.events) {
1902
2018
  const message = change.currentMessage;
1903
2019
  const found = message && change.threadId ? {
@@ -2358,10 +2474,20 @@ function createVercel(options, environment) {
2358
2474
  ...Object.fromEntries(METHODS.map((method) => [method, async () => {
2359
2475
  throw notSupported(method === "register" || method === "watchers" || method === "matches" || method === "ack" ? "watchers" : method);
2360
2476
  }])),
2361
- async discovery() {
2477
+ async discovery(caller) {
2362
2478
  const who = { profile: null };
2363
2479
  const team = await teamId();
2364
- if (options.board) await api(who, "GET", await onBoard(who));
2480
+ const path = await onBoard(who);
2481
+ const reached = options.board ? await api(who, "GET", path) : null;
2482
+ const can = "self" in caller ? caller.can : void 0;
2483
+ const reads = can === void 0 || compileAccess(parseCan(can)).anywhere("read");
2484
+ const found = reached !== null && can === void 0 ? reached : reads ? await api(can === void 0 ? who : {
2485
+ ...who,
2486
+ can
2487
+ }, "GET", path).catch((error) => {
2488
+ if (error instanceof HttpError && error.status === 403) return null;
2489
+ throw error;
2490
+ }) : null;
2365
2491
  const id = team?.startsWith("team_") ? team : (await self(who)).teamId;
2366
2492
  return {
2367
2493
  version: VERSION,
@@ -2369,6 +2495,7 @@ function createVercel(options, environment) {
2369
2495
  audience: origin,
2370
2496
  team_id: id,
2371
2497
  project_id: null,
2498
+ ...found?.board.name ? { name: found.board.name } : {},
2372
2499
  sync: (binding?.sync ?? []).map(({ key, platform }) => ({
2373
2500
  key,
2374
2501
  platform
@@ -2503,7 +2630,7 @@ function createVercel(options, environment) {
2503
2630
  at: Math.max(latest.get(thread.id)?.at ?? 0, message.createdAt)
2504
2631
  });
2505
2632
  return {
2506
- threads: await Promise.all(pick([...latest.values()]).map(({ thread, channel }) => summary(who, thread, channel, signal))),
2633
+ threads: await summaries(who, pick([...latest.values()]), signal),
2507
2634
  cursor: cursorOf({
2508
2635
  t: newest,
2509
2636
  feeds
@@ -2524,7 +2651,7 @@ function createVercel(options, environment) {
2524
2651
  const rooted = found.filter(({ thread }) => (query.label ?? []).every(([key, values]) => thread.labels !== void 0 && Object.hasOwn(thread.labels, key) && (values === null || values.includes(thread.labels[key]))));
2525
2652
  const newest = found.reduce((max, { at }) => Math.max(max, at), 0);
2526
2653
  if (!query.label?.length) return {
2527
- threads: await Promise.all(pick(rooted).map(({ thread, channel }) => summary(who, thread, channel, signal))),
2654
+ threads: await summaries(who, pick(rooted), signal),
2528
2655
  cursor: cursorOf({
2529
2656
  t: newest,
2530
2657
  feeds
@@ -2536,7 +2663,7 @@ function createVercel(options, environment) {
2536
2663
  for (let next = 0; next < candidates.length && threads.length < limit;) {
2537
2664
  const page = candidates.slice(next, next + limit - threads.length);
2538
2665
  next += page.length;
2539
- for (const shown of await Promise.all(page.map(({ thread, channel }) => summary(who, thread, channel, signal)))) if (!shown.message.deleted) threads.push(shown);
2666
+ for (const shown of await summaries(who, page, signal)) if (!shown.message.deleted) threads.push(shown);
2540
2667
  }
2541
2668
  if (after === void 0) threads.reverse();
2542
2669
  return {
@@ -2552,9 +2679,10 @@ function createVercel(options, environment) {
2552
2679
  const { thread, channel } = await messageIn(who, id, signal);
2553
2680
  const [root, ...replies] = await threadMessages(who, thread.id, signal);
2554
2681
  if (!root) throw notFound(`message not found: ${id}`, "message_not_found");
2682
+ const [message, ...shown] = await Promise.all([root, ...replies].map((each) => view(who, each, channel.name)));
2555
2683
  return {
2556
- message: await view(who, root, channel.name),
2557
- replies: await Promise.all(replies.map((reply) => view(who, reply, channel.name))),
2684
+ message,
2685
+ replies: shown,
2558
2686
  cursor: cursorOf({
2559
2687
  t: Math.max(root.createdAt, ...replies.map((reply) => reply.createdAt)),
2560
2688
  feeds: {}
@@ -4622,26 +4750,36 @@ function createBoard(options, runtime) {
4622
4750
  }
4623
4751
  /**
4624
4752
  * Live events for a handle, from the backend's long-poll: each page from the last cursor it saw,
4625
- * waiting for the next. It backs off after a failure, up to 30 seconds; a 4xx throws.
4753
+ * waiting for the next. It backs off after a failure, up to 30 seconds; a 4xx throws. `onState`
4754
+ * hears `live` when a poll is answered and `retrying` when one failed. The first poll, and the
4755
+ * first after a failure, ask without waiting, so it's `live` as soon as the board answers, not a
4756
+ * quiet board's whole wait later.
4626
4757
  */
4627
4758
  async function* events(client, query = {}, opts = {}) {
4628
4759
  let after = query.after;
4629
4760
  let failures = 0;
4761
+ /** Whether the board has answered since the feed started, or since it last failed. */
4762
+ let answered = false;
4763
+ const state = eventsState(opts.onState);
4630
4764
  while (!opts.signal?.aborted) {
4631
4765
  let page;
4632
4766
  try {
4633
4767
  page = await client.poll({
4634
4768
  ...query,
4635
4769
  ...after !== void 0 ? { after } : {},
4636
- wait: EVENTS_WAIT_S
4770
+ wait: answered ? EVENTS_WAIT_S : 0
4637
4771
  }, opts.signal);
4638
4772
  } catch (error) {
4639
4773
  if (opts.signal?.aborted) return;
4640
4774
  if (error instanceof BoardError && error.status >= 400 && error.status < 500) throw error;
4775
+ answered = false;
4776
+ state.failed();
4641
4777
  await new Promise((resolve) => setTimeout(resolve, Math.min(3e4, 500 * 2 ** failures++)));
4642
4778
  continue;
4643
4779
  }
4644
4780
  failures = 0;
4781
+ answered = true;
4782
+ state.answered();
4645
4783
  for (const event of page.events) {
4646
4784
  yield event;
4647
4785
  if (opts.signal?.aborted) return;
@@ -0,0 +1,4 @@
1
+ import "./routes-zm4TXKCC.mjs";
2
+ import "./auth-BG_whr9_.mjs";
3
+ import "./backend-D6yTo8Un.mjs";
4
+ import "./provider-BC9mPYVh.mjs";
@@ -1,4 +1,4 @@
1
- import { f as MESSAGE_TEXT_MAX, p as MessageId } from "./schemas-DAzSsgWk.mjs";
1
+ import { m as MessageId, p as MESSAGE_TEXT_MAX } from "./schemas-BhZaystC.mjs";
2
2
  import { z } from "zod";
3
3
  //#region src/contract/external.ts
4
4
  /**
@@ -1,5 +1,5 @@
1
- import { f as Board, p as BoardOptions } from "./backend-_3W_5g6y.mjs";
2
- import "./exports-DFwXKst5.mjs";
1
+ import { f as Board, p as BoardOptions } from "./backend-D6yTo8Un.mjs";
2
+ import "./exports-Gspe1eEq.mjs";
3
3
  //#region src/server/index.d.ts
4
4
  /**
5
5
  * The handle on a board. Without a `backend`, it's Vercel's board for your team, the one `name`
package/dist/index.d.mts CHANGED
@@ -1,9 +1,9 @@
1
- import { $ as ScheduleBody, A as LabelBody, At as ThreadsQueryInput, B as ParsedFilters, C as InboxAckBody, Ct as SyncReceiptInput, D as InboxPushBody, Dt as ThreadView, E as InboxNextQuery, Et as ThreadSummaryView, F as Me, Ft as UploadStartBody, G as REGISTERED_WATCHERS_MAX, H as PostInput, I as MessageView, It as UploadTicket, J as RegisterBody, K as ReactBody, L as MessagesPage, Lt as routes, M as LinkedQuery, Mt as TypingResult, N as MatchView, Nt as UpdateGrantBody, O as InboxQuery, Ot as ThreadsPage, P as MatchesQuery, Pt as UpdateGrantInput, Q as RouteName, R as MessagesQuery, S as INBOX_EVENT_ID_MAX, St as SyncReceiptBody, T as InboxItem, Tt as SyncedView, U as PrincipalInput, V as PostBody, W as PrincipalView, X as RegistrationView, Y as RegisterInput, Z as ResolvedSyncTarget, _ as FiltersInput, _t as SyncFindInput, a as BoardEventView, at as SchedulesQueryOutput, b as GrantInput, bt as SyncImportBody, c as CreateChannelBody, ct as SchemaView, d as EditBody, dt as SourceMessage, et as ScheduleBodyOutput, f as EventsPage, ft as SourceRead, g as Explanation, gt as SyncCopiesView, h as ExplainQuery, ht as SyncCopiesQuery, i as BlockView, it as SchedulesQueryInput, j as LinkView, jt as TypingBody, k as LABEL_CONDITIONS_MAX, kt as ThreadsQuery, l as DeleteBody, lt as SourceJoin, m as EventsQueryInput, mt as SyncBody, n as ActorView, nt as ScheduleView, o as CanAt, ot as SchemaBody, p as EventsQuery, pt as SourceReadQuery, q as Ref, r as ApiError, rn as Attachment, rt as SchedulesQuery, s as ChannelView, st as SchemaInput, t as AckBody, tt as ScheduleInput, u as Discovery, ut as SourceJoinBody, v as GrantBody, vt as SyncFindQuery, w as InboxEntry, wt as SyncThreadView, x as GrantView, xt as SyncImportInput, y as GrantCan, yt as SyncFindView, z as MessagesQueryInput } from "./routes-CErTwlSZ.mjs";
2
- import { i as Claims, r as CallerRequest } from "./auth-C8jxty0C.mjs";
3
- import { C as Method, D as SandboxPolicy, E as SandboxMatcher, O as SandboxPolicyOptions, S as HttpError, T as SandboxMatch, _ as Middleware, a as Identity, b as WritePatch, c as SelfCaller, d as AsOptions, f as Board, g as DroppedError, h as WatcherContext, i as Caller, k as SandboxRule, l as Subscription, m as Watcher, n as BackendRoute, o as InboxDelivery, p as BoardOptions, r as BoardBinding, s as ProtocolMethods, t as Backend, u as VerifiedCaller, v as MiddlewareContext, w as Protocol, x as WriteSource, y as Write } from "./backend-_3W_5g6y.mjs";
4
- import { B as ReplyOptions, F as BoardError, G as duration, H as ScheduleTiming, L as Filters, R as PostOptions, U as UploadInput, V as ScheduleOptions, W as WaitOptions, z as ProfileOption } from "./provider-CVI-DlWl.mjs";
1
+ import { $ as ScheduleBody, A as LabelBody, At as ThreadsQueryInput, B as ParsedFilters, C as InboxAckBody, Ct as SyncReceiptInput, D as InboxPushBody, Dt as ThreadView, E as InboxNextQuery, Et as ThreadSummaryView, F as Me, Ft as UploadStartBody, G as REGISTERED_WATCHERS_MAX, H as PostInput, I as MessageView, It as UploadTicket, J as RegisterBody, K as ReactBody, L as MessagesPage, Lt as routes, M as LinkedQuery, Mt as TypingResult, N as MatchView, Nt as UpdateGrantBody, O as InboxQuery, Ot as ThreadsPage, P as MatchesQuery, Pt as UpdateGrantInput, Q as RouteName, R as MessagesQuery, S as INBOX_EVENT_ID_MAX, St as SyncReceiptBody, T as InboxItem, Tt as SyncedView, U as PrincipalInput, V as PostBody, W as PrincipalView, X as RegistrationView, Y as RegisterInput, Z as ResolvedSyncTarget, _ as FiltersInput, _t as SyncFindInput, a as BoardEventView, at as SchedulesQueryOutput, b as GrantInput, bt as SyncImportBody, c as CreateChannelBody, ct as SchemaView, d as EditBody, dt as SourceMessage, et as ScheduleBodyOutput, f as EventsPage, ft as SourceRead, g as Explanation, gt as SyncCopiesView, h as ExplainQuery, ht as SyncCopiesQuery, i as BlockView, in as Attachment, it as SchedulesQueryInput, j as LinkView, jt as TypingBody, k as LABEL_CONDITIONS_MAX, kt as ThreadsQuery, l as DeleteBody, lt as SourceJoin, m as EventsQueryInput, mt as SyncBody, n as ActorView, nt as ScheduleView, o as CanAt, ot as SchemaBody, p as EventsQuery, pt as SourceReadQuery, q as Ref, r as ApiError, rt as SchedulesQuery, s as ChannelView, st as SchemaInput, t as AckBody, tt as ScheduleInput, u as Discovery, ut as SourceJoinBody, v as GrantBody, vt as SyncFindQuery, w as InboxEntry, wt as SyncThreadView, x as GrantView, xt as SyncImportInput, y as GrantCan, yt as SyncFindView, z as MessagesQueryInput } from "./routes-zm4TXKCC.mjs";
2
+ import { i as Claims, r as CallerRequest } from "./auth-BG_whr9_.mjs";
3
+ import { C as Method, D as SandboxPolicy, E as SandboxMatcher, O as SandboxPolicyOptions, S as HttpError, T as SandboxMatch, _ as Middleware, a as Identity, b as WritePatch, c as SelfCaller, d as AsOptions, f as Board, g as DroppedError, h as WatcherContext, i as Caller, k as SandboxRule, l as Subscription, m as Watcher, n as BackendRoute, o as InboxDelivery, p as BoardOptions, r as BoardBinding, s as ProtocolMethods, t as Backend, u as VerifiedCaller, v as MiddlewareContext, w as Protocol, x as WriteSource, y as Write } from "./backend-D6yTo8Un.mjs";
4
+ import { B as Filters, F as BoardError, G as ScheduleTiming, H as ProfileOption, J as duration, K as UploadInput, L as EventsOptions, R as EventsState, U as ReplyOptions, V as PostOptions, W as ScheduleOptions, q as WaitOptions, z as ExplainPrincipal } from "./provider-BC9mPYVh.mjs";
5
5
  import { n as block } from "./blocks-DGvh2alZ.mjs";
6
- import "./exports-DFwXKst5.mjs";
6
+ import "./exports-Gspe1eEq.mjs";
7
7
  //#region src/server/index.default.d.ts
8
8
  /**
9
9
  * The handle on a board. Without a `backend`, it's Vercel's board for the team, the one `name`
@@ -13,4 +13,4 @@ import "./exports-DFwXKst5.mjs";
13
13
  */
14
14
  export declare function board(options?: BoardOptions): Board;
15
15
  //#endregion
16
- export { type AckBody, type ActorView, type ApiError, type AsOptions, type Attachment, type Backend, type BackendRoute, type BlockView, type Board, type BoardBinding, BoardError, type BoardEventView, type BoardOptions, type Caller, type CallerRequest, type CanAt, type ChannelView, type Claims, type CreateChannelBody, type DeleteBody, type Discovery, DroppedError, type EditBody, type EventsPage, type EventsQuery, type EventsQueryInput, type ExplainQuery, type Explanation, type Filters, type FiltersInput, type GrantBody, type GrantCan, type GrantInput, type GrantView, HttpError, type INBOX_EVENT_ID_MAX, type Identity, type InboxAckBody, type InboxDelivery, type InboxEntry, type InboxItem, type InboxNextQuery, type InboxPushBody, type InboxQuery, type LABEL_CONDITIONS_MAX, type LabelBody, type LinkView, type LinkedQuery, type MatchView, type MatchesQuery, type Me, type MessageView, type MessagesPage, type MessagesQuery, type MessagesQueryInput, type Method, type Middleware, type MiddlewareContext, type ParsedFilters, type PostBody, type PostInput, type PostOptions, type PrincipalInput, type PrincipalView, type ProfileOption, type Protocol, type ProtocolMethods, type REGISTERED_WATCHERS_MAX, type ReactBody, type Ref, type RegisterBody, type RegisterInput, type RegistrationView, type ReplyOptions, type ResolvedSyncTarget, type RouteName, type SandboxMatch, type SandboxMatcher, type SandboxPolicy, type SandboxPolicyOptions, type SandboxRule, type ScheduleBody, type ScheduleBodyOutput, type ScheduleInput, type ScheduleOptions, type ScheduleTiming, type ScheduleView, type SchedulesQuery, type SchedulesQueryInput, type SchedulesQueryOutput, type SchemaBody, type SchemaInput, type SchemaView, type SelfCaller, type SourceJoin, type SourceJoinBody, type SourceMessage, type SourceRead, type SourceReadQuery, type Subscription, type SyncBody, type SyncCopiesQuery, type SyncCopiesView, type SyncFindInput, type SyncFindQuery, type SyncFindView, type SyncImportBody, type SyncImportInput, type SyncReceiptBody, type SyncReceiptInput, type SyncThreadView, type SyncedView, type ThreadSummaryView, type ThreadView, type ThreadsPage, type ThreadsQuery, type ThreadsQueryInput, type TypingBody, type TypingResult, type UpdateGrantBody, type UpdateGrantInput, type UploadInput, type UploadStartBody, type UploadTicket, type VerifiedCaller, type WaitOptions, type Watcher, type WatcherContext, type Write, type WritePatch, type WriteSource, block, duration, type routes };
16
+ export { type AckBody, type ActorView, type ApiError, type AsOptions, type Attachment, type Backend, type BackendRoute, type BlockView, type Board, type BoardBinding, BoardError, type BoardEventView, type BoardOptions, type Caller, type CallerRequest, type CanAt, type ChannelView, type Claims, type CreateChannelBody, type DeleteBody, type Discovery, DroppedError, type EditBody, type EventsOptions, type EventsPage, type EventsQuery, type EventsQueryInput, type EventsState, type ExplainPrincipal, type ExplainQuery, type Explanation, type Filters, type FiltersInput, type GrantBody, type GrantCan, type GrantInput, type GrantView, HttpError, type INBOX_EVENT_ID_MAX, type Identity, type InboxAckBody, type InboxDelivery, type InboxEntry, type InboxItem, type InboxNextQuery, type InboxPushBody, type InboxQuery, type LABEL_CONDITIONS_MAX, type LabelBody, type LinkView, type LinkedQuery, type MatchView, type MatchesQuery, type Me, type MessageView, type MessagesPage, type MessagesQuery, type MessagesQueryInput, type Method, type Middleware, type MiddlewareContext, type ParsedFilters, type PostBody, type PostInput, type PostOptions, type PrincipalInput, type PrincipalView, type ProfileOption, type Protocol, type ProtocolMethods, type REGISTERED_WATCHERS_MAX, type ReactBody, type Ref, type RegisterBody, type RegisterInput, type RegistrationView, type ReplyOptions, type ResolvedSyncTarget, type RouteName, type SandboxMatch, type SandboxMatcher, type SandboxPolicy, type SandboxPolicyOptions, type SandboxRule, type ScheduleBody, type ScheduleBodyOutput, type ScheduleInput, type ScheduleOptions, type ScheduleTiming, type ScheduleView, type SchedulesQuery, type SchedulesQueryInput, type SchedulesQueryOutput, type SchemaBody, type SchemaInput, type SchemaView, type SelfCaller, type SourceJoin, type SourceJoinBody, type SourceMessage, type SourceRead, type SourceReadQuery, type Subscription, type SyncBody, type SyncCopiesQuery, type SyncCopiesView, type SyncFindInput, type SyncFindQuery, type SyncFindView, type SyncImportBody, type SyncImportInput, type SyncReceiptBody, type SyncReceiptInput, type SyncThreadView, type SyncedView, type ThreadSummaryView, type ThreadView, type ThreadsPage, type ThreadsQuery, type ThreadsQueryInput, type TypingBody, type TypingResult, type UpdateGrantBody, type UpdateGrantInput, type UploadInput, type UploadStartBody, type UploadTicket, type VerifiedCaller, type WaitOptions, type Watcher, type WatcherContext, type Write, type WritePatch, type WriteSource, block, duration, type routes };
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { f as duration, t as HttpError, u as BoardError } from "./errors-DUzpDSrJ.mjs";
1
+ import { d as BoardError, p as duration, t as HttpError } from "./errors-ZazTZh-s.mjs";
2
+ import { t as DroppedError } from "./middleware-BHHKHA9q.mjs";
2
3
  import { t as block } from "./blocks-CVoBC7ur.mjs";
3
- import { t as DroppedError } from "./middleware-0DUFrav-.mjs";
4
- import { i as createVercel, t as createBoard } from "./exports-BNk4w-b2.mjs";
4
+ import { i as createVercel, t as createBoard } from "./exports-DCf75prP.mjs";
5
5
  //#region src/backend-vercel/index.default.ts
6
6
  /**
7
7
  * Your team's board, in Vercel's API. Outside Node there's no environment to find credentials or
@@ -24,7 +24,7 @@ function board(options = {}) {
24
24
  if (!fetch) throw new Error("board: pass a fetch that sends credentials Vercel's API takes, or a backend: outside Node there's no environment to find them in");
25
25
  return vercel({ fetch });
26
26
  },
27
- sync: () => import("./engine-D07DTYSi.mjs"),
27
+ sync: () => import("./engine-XVBt02Bl.mjs"),
28
28
  serving: null,
29
29
  sandbox: null
30
30
  });
@@ -1,7 +1,7 @@
1
- import { $ as ScheduleBody, A as LabelBody, At as ThreadsQueryInput, B as ParsedFilters, C as InboxAckBody, Ct as SyncReceiptInput, D as InboxPushBody, Dt as ThreadView, E as InboxNextQuery, Et as ThreadSummaryView, F as Me, Ft as UploadStartBody, G as REGISTERED_WATCHERS_MAX, H as PostInput, I as MessageView, It as UploadTicket, J as RegisterBody, K as ReactBody, L as MessagesPage, Lt as routes, M as LinkedQuery, Mt as TypingResult, N as MatchView, Nt as UpdateGrantBody, O as InboxQuery, Ot as ThreadsPage, P as MatchesQuery, Pt as UpdateGrantInput, Q as RouteName, R as MessagesQuery, S as INBOX_EVENT_ID_MAX, St as SyncReceiptBody, T as InboxItem, Tt as SyncedView, U as PrincipalInput, V as PostBody, W as PrincipalView, X as RegistrationView, Y as RegisterInput, Z as ResolvedSyncTarget, _ as FiltersInput, _t as SyncFindInput, a as BoardEventView, at as SchedulesQueryOutput, b as GrantInput, bt as SyncImportBody, c as CreateChannelBody, ct as SchemaView, d as EditBody, dt as SourceMessage, et as ScheduleBodyOutput, f as EventsPage, ft as SourceRead, g as Explanation, gt as SyncCopiesView, h as ExplainQuery, ht as SyncCopiesQuery, i as BlockView, it as SchedulesQueryInput, j as LinkView, jt as TypingBody, k as LABEL_CONDITIONS_MAX, kt as ThreadsQuery, l as DeleteBody, lt as SourceJoin, m as EventsQueryInput, mt as SyncBody, n as ActorView, nt as ScheduleView, o as CanAt, ot as SchemaBody, p as EventsQuery, pt as SourceReadQuery, q as Ref, r as ApiError, rn as Attachment, rt as SchedulesQuery, s as ChannelView, st as SchemaInput, t as AckBody, tt as ScheduleInput, u as Discovery, ut as SourceJoinBody, v as GrantBody, vt as SyncFindQuery, w as InboxEntry, wt as SyncThreadView, x as GrantView, xt as SyncImportInput, y as GrantCan, yt as SyncFindView, z as MessagesQueryInput } from "./routes-CErTwlSZ.mjs";
2
- import { i as Claims, r as CallerRequest } from "./auth-C8jxty0C.mjs";
3
- import { C as Method, D as SandboxPolicy, E as SandboxMatcher, O as SandboxPolicyOptions, S as HttpError, T as SandboxMatch, _ as Middleware, a as Identity, b as WritePatch, c as SelfCaller, d as AsOptions, f as Board, g as DroppedError, h as WatcherContext, i as Caller, k as SandboxRule, l as Subscription, m as Watcher, n as BackendRoute, o as InboxDelivery, p as BoardOptions, r as BoardBinding, s as ProtocolMethods, t as Backend, u as VerifiedCaller, v as MiddlewareContext, w as Protocol, x as WriteSource, y as Write } from "./backend-_3W_5g6y.mjs";
4
- import { B as ReplyOptions, F as BoardError, G as duration, H as ScheduleTiming, L as Filters, R as PostOptions, U as UploadInput, V as ScheduleOptions, W as WaitOptions, z as ProfileOption } from "./provider-CVI-DlWl.mjs";
1
+ import { $ as ScheduleBody, A as LabelBody, At as ThreadsQueryInput, B as ParsedFilters, C as InboxAckBody, Ct as SyncReceiptInput, D as InboxPushBody, Dt as ThreadView, E as InboxNextQuery, Et as ThreadSummaryView, F as Me, Ft as UploadStartBody, G as REGISTERED_WATCHERS_MAX, H as PostInput, I as MessageView, It as UploadTicket, J as RegisterBody, K as ReactBody, L as MessagesPage, Lt as routes, M as LinkedQuery, Mt as TypingResult, N as MatchView, Nt as UpdateGrantBody, O as InboxQuery, Ot as ThreadsPage, P as MatchesQuery, Pt as UpdateGrantInput, Q as RouteName, R as MessagesQuery, S as INBOX_EVENT_ID_MAX, St as SyncReceiptBody, T as InboxItem, Tt as SyncedView, U as PrincipalInput, V as PostBody, W as PrincipalView, X as RegistrationView, Y as RegisterInput, Z as ResolvedSyncTarget, _ as FiltersInput, _t as SyncFindInput, a as BoardEventView, at as SchedulesQueryOutput, b as GrantInput, bt as SyncImportBody, c as CreateChannelBody, ct as SchemaView, d as EditBody, dt as SourceMessage, et as ScheduleBodyOutput, f as EventsPage, ft as SourceRead, g as Explanation, gt as SyncCopiesView, h as ExplainQuery, ht as SyncCopiesQuery, i as BlockView, in as Attachment, it as SchedulesQueryInput, j as LinkView, jt as TypingBody, k as LABEL_CONDITIONS_MAX, kt as ThreadsQuery, l as DeleteBody, lt as SourceJoin, m as EventsQueryInput, mt as SyncBody, n as ActorView, nt as ScheduleView, o as CanAt, ot as SchemaBody, p as EventsQuery, pt as SourceReadQuery, q as Ref, r as ApiError, rt as SchedulesQuery, s as ChannelView, st as SchemaInput, t as AckBody, tt as ScheduleInput, u as Discovery, ut as SourceJoinBody, v as GrantBody, vt as SyncFindQuery, w as InboxEntry, wt as SyncThreadView, x as GrantView, xt as SyncImportInput, y as GrantCan, yt as SyncFindView, z as MessagesQueryInput } from "./routes-zm4TXKCC.mjs";
2
+ import { i as Claims, r as CallerRequest } from "./auth-BG_whr9_.mjs";
3
+ import { C as Method, D as SandboxPolicy, E as SandboxMatcher, O as SandboxPolicyOptions, S as HttpError, T as SandboxMatch, _ as Middleware, a as Identity, b as WritePatch, c as SelfCaller, d as AsOptions, f as Board, g as DroppedError, h as WatcherContext, i as Caller, k as SandboxRule, l as Subscription, m as Watcher, n as BackendRoute, o as InboxDelivery, p as BoardOptions, r as BoardBinding, s as ProtocolMethods, t as Backend, u as VerifiedCaller, v as MiddlewareContext, w as Protocol, x as WriteSource, y as Write } from "./backend-D6yTo8Un.mjs";
4
+ import { B as Filters, F as BoardError, G as ScheduleTiming, H as ProfileOption, J as duration, K as UploadInput, L as EventsOptions, R as EventsState, U as ReplyOptions, V as PostOptions, W as ScheduleOptions, q as WaitOptions, z as ExplainPrincipal } from "./provider-BC9mPYVh.mjs";
5
5
  import { n as block } from "./blocks-DGvh2alZ.mjs";
6
- import { t as board } from "./index-CwOOIT0e.mjs";
7
- export { type AckBody, type ActorView, type ApiError, type AsOptions, type Attachment, type Backend, type BackendRoute, type BlockView, type Board, type BoardBinding, BoardError, type BoardEventView, type BoardOptions, type Caller, type CallerRequest, type CanAt, type ChannelView, type Claims, type CreateChannelBody, type DeleteBody, type Discovery, DroppedError, type EditBody, type EventsPage, type EventsQuery, type EventsQueryInput, type ExplainQuery, type Explanation, type Filters, type FiltersInput, type GrantBody, type GrantCan, type GrantInput, type GrantView, HttpError, type INBOX_EVENT_ID_MAX, type Identity, type InboxAckBody, type InboxDelivery, type InboxEntry, type InboxItem, type InboxNextQuery, type InboxPushBody, type InboxQuery, type LABEL_CONDITIONS_MAX, type LabelBody, type LinkView, type LinkedQuery, type MatchView, type MatchesQuery, type Me, type MessageView, type MessagesPage, type MessagesQuery, type MessagesQueryInput, type Method, type Middleware, type MiddlewareContext, type ParsedFilters, type PostBody, type PostInput, type PostOptions, type PrincipalInput, type PrincipalView, type ProfileOption, type Protocol, type ProtocolMethods, type REGISTERED_WATCHERS_MAX, type ReactBody, type Ref, type RegisterBody, type RegisterInput, type RegistrationView, type ReplyOptions, type ResolvedSyncTarget, type RouteName, type SandboxMatch, type SandboxMatcher, type SandboxPolicy, type SandboxPolicyOptions, type SandboxRule, type ScheduleBody, type ScheduleBodyOutput, type ScheduleInput, type ScheduleOptions, type ScheduleTiming, type ScheduleView, type SchedulesQuery, type SchedulesQueryInput, type SchedulesQueryOutput, type SchemaBody, type SchemaInput, type SchemaView, type SelfCaller, type SourceJoin, type SourceJoinBody, type SourceMessage, type SourceRead, type SourceReadQuery, type Subscription, type SyncBody, type SyncCopiesQuery, type SyncCopiesView, type SyncFindInput, type SyncFindQuery, type SyncFindView, type SyncImportBody, type SyncImportInput, type SyncReceiptBody, type SyncReceiptInput, type SyncThreadView, type SyncedView, type ThreadSummaryView, type ThreadView, type ThreadsPage, type ThreadsQuery, type ThreadsQueryInput, type TypingBody, type TypingResult, type UpdateGrantBody, type UpdateGrantInput, type UploadInput, type UploadStartBody, type UploadTicket, type VerifiedCaller, type WaitOptions, type Watcher, type WatcherContext, type Write, type WritePatch, type WriteSource, block, board, duration, type routes };
6
+ import { t as board } from "./index-Djmr4GzQ.mjs";
7
+ export { type AckBody, type ActorView, type ApiError, type AsOptions, type Attachment, type Backend, type BackendRoute, type BlockView, type Board, type BoardBinding, BoardError, type BoardEventView, type BoardOptions, type Caller, type CallerRequest, type CanAt, type ChannelView, type Claims, type CreateChannelBody, type DeleteBody, type Discovery, DroppedError, type EditBody, type EventsOptions, type EventsPage, type EventsQuery, type EventsQueryInput, type EventsState, type ExplainPrincipal, type ExplainQuery, type Explanation, type Filters, type FiltersInput, type GrantBody, type GrantCan, type GrantInput, type GrantView, HttpError, type INBOX_EVENT_ID_MAX, type Identity, type InboxAckBody, type InboxDelivery, type InboxEntry, type InboxItem, type InboxNextQuery, type InboxPushBody, type InboxQuery, type LABEL_CONDITIONS_MAX, type LabelBody, type LinkView, type LinkedQuery, type MatchView, type MatchesQuery, type Me, type MessageView, type MessagesPage, type MessagesQuery, type MessagesQueryInput, type Method, type Middleware, type MiddlewareContext, type ParsedFilters, type PostBody, type PostInput, type PostOptions, type PrincipalInput, type PrincipalView, type ProfileOption, type Protocol, type ProtocolMethods, type REGISTERED_WATCHERS_MAX, type ReactBody, type Ref, type RegisterBody, type RegisterInput, type RegistrationView, type ReplyOptions, type ResolvedSyncTarget, type RouteName, type SandboxMatch, type SandboxMatcher, type SandboxPolicy, type SandboxPolicyOptions, type SandboxRule, type ScheduleBody, type ScheduleBodyOutput, type ScheduleInput, type ScheduleOptions, type ScheduleTiming, type ScheduleView, type SchedulesQuery, type SchedulesQueryInput, type SchedulesQueryOutput, type SchemaBody, type SchemaInput, type SchemaView, type SelfCaller, type SourceJoin, type SourceJoinBody, type SourceMessage, type SourceRead, type SourceReadQuery, type Subscription, type SyncBody, type SyncCopiesQuery, type SyncCopiesView, type SyncFindInput, type SyncFindQuery, type SyncFindView, type SyncImportBody, type SyncImportInput, type SyncReceiptBody, type SyncReceiptInput, type SyncThreadView, type SyncedView, type ThreadSummaryView, type ThreadView, type ThreadsPage, type ThreadsQuery, type ThreadsQueryInput, type TypingBody, type TypingResult, type UpdateGrantBody, type UpdateGrantInput, type UploadInput, type UploadStartBody, type UploadTicket, type VerifiedCaller, type WaitOptions, type Watcher, type WatcherContext, type Write, type WritePatch, type WriteSource, block, board, duration, type routes };
@@ -1,5 +1,5 @@
1
- import { f as duration, t as HttpError, u as BoardError } from "./errors-DUzpDSrJ.mjs";
1
+ import { d as BoardError, p as duration, t as HttpError } from "./errors-ZazTZh-s.mjs";
2
+ import { t as DroppedError } from "./middleware-BHHKHA9q.mjs";
2
3
  import { t as block } from "./blocks-CVoBC7ur.mjs";
3
- import { t as DroppedError } from "./middleware-0DUFrav-.mjs";
4
- import { t as board } from "./server-FlDE6BDt.mjs";
4
+ import { t as board } from "./server-CcvxkXzG.mjs";
5
5
  export { BoardError, DroppedError, HttpError, block, board, duration };