@vercel/board 0.44.0 → 0.45.1

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 (71) 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-DCxecX15.mjs} +205 -48
  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-C8U3A4jQ.mjs +2 -0
  35. package/dist/{inspect-dtQlHBcq.mjs → inspect-CHsgnf_5.mjs} +23 -7
  36. package/dist/{local-CnGNTReZ.mjs → local-DE9vmanM.mjs} +25 -14
  37. package/dist/{main-CpsAmpEy.mjs → main-CF1Me3jg.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-BbwhnKrg.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-CEMvl0EH.mjs} +4 -4
  46. package/dist/{server-FlDE6BDt.mjs → server-Bmz0zqYM.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/01-mounting.md +2 -2
  63. package/docs/01-board/04-messages.md +1 -1
  64. package/docs/01-board/07-schedules.md +2 -2
  65. package/docs/01-board/09-access.md +8 -0
  66. package/docs/03-guides/02-inspector.md +16 -0
  67. package/docs/04-reference/02-board.md +23 -2
  68. package/docs/04-reference/03-http.md +3 -3
  69. package/package.json +1 -1
  70. package/dist/exports-DFwXKst5.d.mts +0 -4
  71. 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-BbwhnKrg.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. */
@@ -1744,6 +1858,7 @@ function createVercel(options, environment) {
1744
1858
  const page = await api(who, "GET", path, {
1745
1859
  query: {
1746
1860
  channelId: channel.id,
1861
+ include: "message",
1747
1862
  ...from?.at ? { cursor: from.at } : {}
1748
1863
  },
1749
1864
  signal
@@ -1768,15 +1883,21 @@ function createVercel(options, environment) {
1768
1883
  page
1769
1884
  }))).sort((a, b) => a.change.createdAt - b.change.createdAt);
1770
1885
  const events = [];
1886
+ naming(who, merged.flatMap(({ change }) => [change.actor, ...change.currentMessage ? [change.currentMessage.createdBy] : []]));
1771
1887
  for (const { change, i, page } of merged) {
1772
1888
  running[page.channel.id] = {
1773
1889
  at: page.at,
1774
1890
  skip: i + 1
1775
1891
  };
1892
+ const message = change.currentMessage;
1893
+ const given = message && change.threadId ? {
1894
+ message,
1895
+ thread: filters.label?.length ? await threads(change.threadId) : { id: change.threadId }
1896
+ } : void 0;
1776
1897
  const event = await eventOf(who, change, page.channel.name, cursorOf({
1777
1898
  t: change.createdAt,
1778
1899
  feeds: { ...running }
1779
- }), filters, narrow, void 0, threads);
1900
+ }), filters, narrow, given, threads);
1780
1901
  if (event) events.push(event);
1781
1902
  }
1782
1903
  const after = { ...position.feeds };
@@ -1898,6 +2019,7 @@ function createVercel(options, environment) {
1898
2019
  });
1899
2020
  cursor = page.cursor;
1900
2021
  const events = [];
2022
+ naming(who, page.events.flatMap((change) => [change.actor, ...change.currentMessage ? [change.currentMessage.createdBy] : []]));
1901
2023
  for (const change of page.events) {
1902
2024
  const message = change.currentMessage;
1903
2025
  const found = message && change.threadId ? {
@@ -1919,7 +2041,7 @@ function createVercel(options, environment) {
1919
2041
  const channel = await oneChannel(who, query);
1920
2042
  if (channel) return channelEvents(who, channel, query, signal);
1921
2043
  if (query.after !== void 0 && API_CURSOR.test(query.after)) throw new HttpError(400, "invalid_request", `after: ${query.after} is one channel's cursor: read that channel`);
1922
- const listed = await channelsFor(who, query.channel);
2044
+ const listed = query.re === void 0 ? await channelsFor(who, query.channel) : await channelOfThread(who, query.re, query.channel, signal);
1923
2045
  let position = query.after === void 0 ? {
1924
2046
  t: Date.now(),
1925
2047
  feeds: await heads(who, listed)
@@ -1941,6 +2063,20 @@ function createVercel(options, environment) {
1941
2063
  await pause(Math.min(started + 1e3, until) - Date.now(), signal);
1942
2064
  }
1943
2065
  }
2066
+ /**
2067
+ * The channel a thread is in, which is the only one whose feed has its messages: a read or a wait
2068
+ * in one thread (`--re`) costs that channel's feed, not every channel's on the board. None when
2069
+ * there's no such message, or it isn't in the channels the read names.
2070
+ */
2071
+ async function channelOfThread(who, re, within, signal) {
2072
+ const found = await messageIn(who, re, signal).catch((error) => {
2073
+ if (error instanceof HttpError && error.status === 404) return null;
2074
+ throw error;
2075
+ });
2076
+ if (!found) return [];
2077
+ if (within !== void 0 && !(await channelsFor(who, within)).some((channel) => channel.id === found.channel.id)) return [];
2078
+ return [found.channel];
2079
+ }
1944
2080
  /** The one channel a read names, when the API can read it directly: not a subtree, and from one of its cursors or now. */
1945
2081
  async function oneChannel(who, query) {
1946
2082
  if (query.channel === void 0 || query.channel.endsWith("/") || query.re !== void 0) return null;
@@ -2358,10 +2494,20 @@ function createVercel(options, environment) {
2358
2494
  ...Object.fromEntries(METHODS.map((method) => [method, async () => {
2359
2495
  throw notSupported(method === "register" || method === "watchers" || method === "matches" || method === "ack" ? "watchers" : method);
2360
2496
  }])),
2361
- async discovery() {
2497
+ async discovery(caller) {
2362
2498
  const who = { profile: null };
2363
2499
  const team = await teamId();
2364
- if (options.board) await api(who, "GET", await onBoard(who));
2500
+ const path = await onBoard(who);
2501
+ const reached = options.board ? await api(who, "GET", path) : null;
2502
+ const can = "self" in caller ? caller.can : void 0;
2503
+ const reads = can === void 0 || compileAccess(parseCan(can)).anywhere("read");
2504
+ const found = reached !== null && can === void 0 ? reached : reads ? await api(can === void 0 ? who : {
2505
+ ...who,
2506
+ can
2507
+ }, "GET", path).catch((error) => {
2508
+ if (error instanceof HttpError && error.status === 403) return null;
2509
+ throw error;
2510
+ }) : null;
2365
2511
  const id = team?.startsWith("team_") ? team : (await self(who)).teamId;
2366
2512
  return {
2367
2513
  version: VERSION,
@@ -2369,6 +2515,7 @@ function createVercel(options, environment) {
2369
2515
  audience: origin,
2370
2516
  team_id: id,
2371
2517
  project_id: null,
2518
+ ...found?.board.name ? { name: found.board.name } : {},
2372
2519
  sync: (binding?.sync ?? []).map(({ key, platform }) => ({
2373
2520
  key,
2374
2521
  platform
@@ -2503,7 +2650,7 @@ function createVercel(options, environment) {
2503
2650
  at: Math.max(latest.get(thread.id)?.at ?? 0, message.createdAt)
2504
2651
  });
2505
2652
  return {
2506
- threads: await Promise.all(pick([...latest.values()]).map(({ thread, channel }) => summary(who, thread, channel, signal))),
2653
+ threads: await summaries(who, pick([...latest.values()]), signal),
2507
2654
  cursor: cursorOf({
2508
2655
  t: newest,
2509
2656
  feeds
@@ -2524,7 +2671,7 @@ function createVercel(options, environment) {
2524
2671
  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
2672
  const newest = found.reduce((max, { at }) => Math.max(max, at), 0);
2526
2673
  if (!query.label?.length) return {
2527
- threads: await Promise.all(pick(rooted).map(({ thread, channel }) => summary(who, thread, channel, signal))),
2674
+ threads: await summaries(who, pick(rooted), signal),
2528
2675
  cursor: cursorOf({
2529
2676
  t: newest,
2530
2677
  feeds
@@ -2536,7 +2683,7 @@ function createVercel(options, environment) {
2536
2683
  for (let next = 0; next < candidates.length && threads.length < limit;) {
2537
2684
  const page = candidates.slice(next, next + limit - threads.length);
2538
2685
  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);
2686
+ for (const shown of await summaries(who, page, signal)) if (!shown.message.deleted) threads.push(shown);
2540
2687
  }
2541
2688
  if (after === void 0) threads.reverse();
2542
2689
  return {
@@ -2552,9 +2699,10 @@ function createVercel(options, environment) {
2552
2699
  const { thread, channel } = await messageIn(who, id, signal);
2553
2700
  const [root, ...replies] = await threadMessages(who, thread.id, signal);
2554
2701
  if (!root) throw notFound(`message not found: ${id}`, "message_not_found");
2702
+ const [message, ...shown] = await Promise.all([root, ...replies].map((each) => view(who, each, channel.name)));
2555
2703
  return {
2556
- message: await view(who, root, channel.name),
2557
- replies: await Promise.all(replies.map((reply) => view(who, reply, channel.name))),
2704
+ message,
2705
+ replies: shown,
2558
2706
  cursor: cursorOf({
2559
2707
  t: Math.max(root.createdAt, ...replies.map((reply) => reply.createdAt)),
2560
2708
  feeds: {}
@@ -2824,7 +2972,6 @@ function createVercel(options, environment) {
2824
2972
  let target;
2825
2973
  if (input.channel !== void 0) target = { channelId: (await channelToPost(who, input.channel)).id };
2826
2974
  else {
2827
- if (labels) throw notSupported("labels on a scheduled reply");
2828
2975
  const { thread } = await messageIn(who, input.re, signal);
2829
2976
  target = { threadId: thread.id };
2830
2977
  }
@@ -4622,26 +4769,36 @@ function createBoard(options, runtime) {
4622
4769
  }
4623
4770
  /**
4624
4771
  * 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.
4772
+ * waiting for the next. It backs off after a failure, up to 30 seconds; a 4xx throws. `onState`
4773
+ * hears `live` when a poll is answered and `retrying` when one failed. The first poll, and the
4774
+ * first after a failure, ask without waiting, so it's `live` as soon as the board answers, not a
4775
+ * quiet board's whole wait later.
4626
4776
  */
4627
4777
  async function* events(client, query = {}, opts = {}) {
4628
4778
  let after = query.after;
4629
4779
  let failures = 0;
4780
+ /** Whether the board has answered since the feed started, or since it last failed. */
4781
+ let answered = false;
4782
+ const state = eventsState(opts.onState);
4630
4783
  while (!opts.signal?.aborted) {
4631
4784
  let page;
4632
4785
  try {
4633
4786
  page = await client.poll({
4634
4787
  ...query,
4635
4788
  ...after !== void 0 ? { after } : {},
4636
- wait: EVENTS_WAIT_S
4789
+ wait: answered ? EVENTS_WAIT_S : 0
4637
4790
  }, opts.signal);
4638
4791
  } catch (error) {
4639
4792
  if (opts.signal?.aborted) return;
4640
4793
  if (error instanceof BoardError && error.status >= 400 && error.status < 500) throw error;
4794
+ answered = false;
4795
+ state.failed();
4641
4796
  await new Promise((resolve) => setTimeout(resolve, Math.min(3e4, 500 * 2 ** failures++)));
4642
4797
  continue;
4643
4798
  }
4644
4799
  failures = 0;
4800
+ answered = true;
4801
+ state.answered();
4645
4802
  for (const event of page.events) {
4646
4803
  yield event;
4647
4804
  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-DCxecX15.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-Bmz0zqYM.mjs";
5
5
  export { BoardError, DroppedError, HttpError, block, board, duration };