@vercel/board 0.31.0 → 0.32.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 (63) hide show
  1. package/dist/{a2-DngWY2Eb.mjs → a2-DiDc77Uf.mjs} +6 -6
  2. package/dist/access.d.mts +1 -1
  3. package/dist/access.mjs +2 -2
  4. package/dist/{auth-CyO2aw5n.mjs → auth-8pRZnF1M.mjs} +7 -3
  5. package/dist/{auth-DLYSt_-A.d.mts → auth-K8dY1nBY.d.mts} +5 -1
  6. package/dist/{backend-Bob-5CM7.d.mts → backend-DxE9wGKm.d.mts} +1 -1
  7. package/dist/backend-a2/contract.mjs +1 -1
  8. package/dist/backend-a2/store-memory.mjs +2 -2
  9. package/dist/backend-a2/store-postgres.mjs +1 -1
  10. package/dist/backend-a2/store-redis-http.mjs +1 -1
  11. package/dist/backend-a2/store-redis.mjs +1 -1
  12. package/dist/backend-a2/store-sqlite.mjs +2 -2
  13. package/dist/backend-a2.d.mts +2 -2
  14. package/dist/backend-a2.mjs +1 -1
  15. package/dist/{backend-http-BRrRbjRx.d.mts → backend-http-CaN06CaD.d.mts} +1 -1
  16. package/dist/{backend-http-D8mUzuKQ.mjs → backend-http-CoaCghuJ.mjs} +1 -1
  17. package/dist/{backend-http-CvUKOn-m.mjs → backend-http-l5A8UmL-.mjs} +1 -1
  18. package/dist/backend-http.d.mts +1 -1
  19. package/dist/backend-http.mjs +1 -1
  20. package/dist/backend-http.node.d.mts +1 -1
  21. package/dist/backend-http.node.mjs +1 -1
  22. package/dist/{backend-vercel-Ba8JDtqW.mjs → backend-vercel-BE65okBC.mjs} +1 -1
  23. package/dist/{backend-vercel-CmY9yZ9m.mjs → backend-vercel-CVxoTNF2.mjs} +108 -20
  24. package/dist/{backend-vercel-BaSEUdwg.d.mts → backend-vercel-jg-6PAgD.d.mts} +1 -1
  25. package/dist/backend-vercel.d.mts +1 -1
  26. package/dist/backend-vercel.mjs +1 -1
  27. package/dist/backend-vercel.node.d.mts +1 -1
  28. package/dist/backend-vercel.node.mjs +1 -1
  29. package/dist/cli-commands.d.mts +1 -1
  30. package/dist/cli-commands.mjs +1 -1
  31. package/dist/cli-embedded.d.mts +2 -2
  32. package/dist/cli-embedded.mjs +2 -2
  33. package/dist/cli.mjs +3 -3
  34. package/dist/{commands-DK4W3HCJ.d.mts → commands-CpyPV_tk.d.mts} +5 -0
  35. package/dist/{commands-L1JSGz2Z.mjs → commands-DsnQKTdB.mjs} +27 -11
  36. package/dist/{conformance-DK43HiHf.mjs → conformance-3RBKxwbp.mjs} +35 -0
  37. package/dist/conformance.d.mts +1 -1
  38. package/dist/conformance.mjs +1 -1
  39. package/dist/{exports-CWIdN0Ub.mjs → exports-BnUZuRm9.mjs} +2 -2
  40. package/dist/exports-u5mApVvn.d.mts +5 -0
  41. package/dist/{folds-Cu9Q9zyQ.mjs → folds-DsWfIftc.mjs} +1 -0
  42. package/dist/{index-Ho-ayyQL.d.mts → index-UXpTPWNc.d.mts} +2 -2
  43. package/dist/index.d.mts +3 -3
  44. package/dist/{index.default-BUcwDaAe.mjs → index.default-Dp8gexln.mjs} +1 -1
  45. package/dist/index.mjs +2 -2
  46. package/dist/index.node.d.mts +3 -3
  47. package/dist/index.node.mjs +1 -1
  48. package/dist/inspect/app.js +1 -1
  49. package/dist/{main-Dz-8komG.mjs → main-CcYDo9Hb.mjs} +57 -21
  50. package/dist/{project-CQ4VUibA.mjs → project-4Vl7_uy5.mjs} +1 -1
  51. package/dist/{redis-tables-DHf85ixI.mjs → redis-tables-BFRj_SEJ.mjs} +1 -1
  52. package/dist/{reducers-DcENwtwZ.mjs → reducers-DQVSP3kk.mjs} +1 -1
  53. package/dist/{serve-CTmow-YH.mjs → serve-Bplieh0C.mjs} +3 -3
  54. package/dist/{server-DG8D6VV0.mjs → server-wIpAEjpX.mjs} +3 -3
  55. package/dist/{serving-DBFRo6U_.mjs → serving-Y7s7VDjB.mjs} +1 -1
  56. package/dist/{sql-CT5xVuGr.mjs → sql-E1K5g_ih.mjs} +1 -1
  57. package/dist/{sqlite-db-0WeSOEZN.mjs → sqlite-db-CzcD_FW8.mjs} +1 -1
  58. package/dist/{tokens-Dnyd_y1n.mjs → tokens-C7kYyrAG.mjs} +1 -1
  59. package/dist/{watchers-hash-BjwlnGD9.mjs → watchers-hash-CurCzwhe.mjs} +2 -2
  60. package/docs/01-board/04-messages.md +4 -2
  61. package/docs/04-reference/01-cli.md +14 -10
  62. package/package.json +1 -1
  63. package/dist/exports-FBOQWT7O.d.mts +0 -5
@@ -1,24 +1,24 @@
1
1
  import { r as IMPORT_BYTES_MAX, t as ATTACHMENT_BYTES_MAX } from "./files-SniSmeEr.mjs";
2
2
  import { _ as RemoteWatcherId, b as actorKind, v as SCOPE_MAX, x as platformAvatar } from "./schemas-DBmUO6pr.mjs";
3
3
  import "./external-D3p5T57R.mjs";
4
- import { a as METHODS, d as VERSION, f as SYNC, n as compileWatcher, r as hasCriteria, t as canonicalWatchers } from "./watchers-hash-BjwlnGD9.mjs";
4
+ import { a as METHODS, d as VERSION, f as SYNC, n as compileWatcher, r as hasCriteria, t as canonicalWatchers } from "./watchers-hash-CurCzwhe.mjs";
5
5
  import { a as forbidden, c as toErrorResponse, f as duration, i as duplicateId, l as unauthorized, r as badRequest, s as notFound, t as HttpError, u as BoardError } from "./errors-CJXhhzvT.mjs";
6
6
  import { i as isKeyIdOf, r as derivedId, t as waitUntil } from "./wait-until-Dw4XrIDQ.mjs";
7
7
  import { a as scopeOf, i as parseScope, n as authorize, r as compileAccess, t as FULL_ACCESS } from "./access-CY5xVMIK.mjs";
8
8
  import { t as own } from "./own-OwgPWdmh.mjs";
9
9
  import { n as replaceMentions } from "./mentions-CB6ShY4R.mjs";
10
10
  import { a as resolveMentions, n as actorSeen } from "./actors-Bm-ojWWT.mjs";
11
- import { C as wroteAs, f as grantIssuers, n as DEFAULT_CAN, o as authenticates, s as checkGrant, t as BOARD_TOKEN_PREFIX, y as tokenHash } from "./auth-CyO2aw5n.mjs";
11
+ import { C as wroteAs, f as grantIssuers, n as DEFAULT_CAN, o as authenticates, s as checkGrant, t as BOARD_TOKEN_PREFIX, y as tokenHash } from "./auth-8pRZnF1M.mjs";
12
12
  import { n as MIDDLEWARE_ACTOR, t as DroppedError } from "./middleware-BavYSDUa.mjs";
13
13
  import { n as syncTarget, r as withEmailMentions } from "./targets-Cgjs29T0.mjs";
14
14
  import { t as A2Error } from "./session-clear-XJYpmUpg-2q8l_FJR.mjs";
15
15
  import { a as reducer } from "./reducer-Bswr11ar-P324o9vn.mjs";
16
- import { a as INBOXES_SESSION, c as accessContract, d as inboxSession, f as registryContract, g as BOARD_SESSION, h as watchSession, i as ACCESS_SESSION, l as boardContract, m as watchContract, n as channelsReducer, o as REGISTRY_SESSION, p as schedulesContract, s as SCHEDULES_SESSION, t as actorsReducer, u as inboxContract } from "./reducers-DcENwtwZ.mjs";
16
+ import { a as INBOXES_SESSION, c as accessContract, d as inboxSession, f as registryContract, g as BOARD_SESSION, h as watchSession, i as ACCESS_SESSION, l as boardContract, m as watchContract, n as channelsReducer, o as REGISTRY_SESSION, p as schedulesContract, s as SCHEDULES_SESSION, t as actorsReducer, u as inboxContract } from "./reducers-DQVSP3kk.mjs";
17
17
  import { n as createServer, t as consumer } from "./server-DX7mM6nm-D7N_7bug.mjs";
18
- import { i as iso, n as foldMessages, t as foldActors } from "./folds-Cu9Q9zyQ.mjs";
18
+ import { i as iso, n as foldMessages, t as foldActors } from "./folds-DsWfIftc.mjs";
19
19
  import { c as ownUpload, d as writeUpload, i as finishUpload, l as readUpload, n as attachmentNotFound, t as attachmentBody, u as startUpload } from "./blob-WbB2DJKn.mjs";
20
- import { t as concernedMessageId } from "./project-CQ4VUibA.mjs";
21
- import { t as TABLES_CONSUMER } from "./sql-CT5xVuGr.mjs";
20
+ import { t as concernedMessageId } from "./project-4Vl7_uy5.mjs";
21
+ import { t as TABLES_CONSUMER } from "./sql-E1K5g_ih.mjs";
22
22
  import { t as afterRetry } from "./attempts-HXcskN1w.mjs";
23
23
  import { createHash, randomBytes } from "node:crypto";
24
24
  import { AsyncLocalStorage } from "node:async_hooks";
package/dist/access.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { a as FULL_ACCESS, c as compileAccess, i as ChannelPattern, l as union, n as AccessSummary, o as Grant, r as Can, s as Permission, t as Access } from "./access-DPcrKIH_.mjs";
2
- import { a as CallerRequest, b as oidc, d as Known, f as OidcTokensOptions, g as RuleFunction, h as PrincipalKind, i as AuthenticateContext, l as HostPrincipal, m as Principal, n as AccessRule, o as Claims, r as Authenticate, s as DEFAULT_CAN, t as AccessFunction, u as IssuerConfig, v as compileRules, x as vercelProject, y as githubActions } from "./auth-DLYSt_-A.mjs";
2
+ import { a as CallerRequest, b as oidc, d as Known, f as OidcTokensOptions, g as RuleFunction, h as PrincipalKind, i as AuthenticateContext, l as HostPrincipal, m as Principal, n as AccessRule, o as Claims, r as Authenticate, s as DEFAULT_CAN, t as AccessFunction, u as IssuerConfig, v as compileRules, x as vercelProject, y as githubActions } from "./auth-K8dY1nBY.mjs";
3
3
  import { C as Author, t as Actor } from "./folds-DLUzfibJ.mjs";
4
4
  //#region src/server/tokens.d.ts
5
5
  /**
package/dist/access.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { o as union, r as compileAccess, t as FULL_ACCESS } from "./access-CY5xVMIK.mjs";
2
2
  import { i as resolveActor } from "./actors-Bm-ojWWT.mjs";
3
- import { _ as oidc, c as compileRules, d as githubActions, n as DEFAULT_CAN, x as vercelProject } from "./auth-CyO2aw5n.mjs";
4
- import { t as oidcTokens } from "./tokens-Dnyd_y1n.mjs";
3
+ import { _ as oidc, c as compileRules, d as githubActions, n as DEFAULT_CAN, x as vercelProject } from "./auth-8pRZnF1M.mjs";
4
+ import { t as oidcTokens } from "./tokens-C7kYyrAG.mjs";
5
5
  export { DEFAULT_CAN, FULL_ACCESS, compileAccess, compileRules, githubActions, oidc, oidcTokens, resolveActor, union, vercelProject };
@@ -117,13 +117,17 @@ async function tokenHash(secret) {
117
117
  const digest = new Uint8Array(await crypto.subtle.digest("SHA-256", new TextEncoder().encode(secret)));
118
118
  return Array.from(digest, (byte) => byte.toString(16).padStart(2, "0")).join("");
119
119
  }
120
- /** What a grant or a token left without `can` gives: what Vercel's API gives a project it lets use a board. */
121
- const DEFAULT_CAN = { "*": [
120
+ /**
121
+ * What a grant or a token left without `can` gives: what Vercel's API gives a project it lets use a
122
+ * board. Frozen all the way down: board reads it for every such grant, and @vercel/board/access
123
+ * exports it, so code that imports it can't widen them.
124
+ */
125
+ const DEFAULT_CAN = Object.freeze({ "*": Object.freeze([
122
126
  "read",
123
127
  "post",
124
128
  "react",
125
129
  "label"
126
- ] };
130
+ ]) });
127
131
  const GRANT_CLAIMS_MAX = 32;
128
132
  const GRANT_VALUES_MAX = 32;
129
133
  const GRANT_VALUE_MAX = 1e3;
@@ -182,7 +182,11 @@ type StoredGrant = {
182
182
  by: string;
183
183
  at: string;
184
184
  };
185
- /** What a grant or a token left without `can` gives: what Vercel's API gives a project it lets use a board. */
185
+ /**
186
+ * What a grant or a token left without `can` gives: what Vercel's API gives a project it lets use a
187
+ * board. Frozen all the way down: board reads it for every such grant, and @vercel/board/access
188
+ * exports it, so code that imports it can't widen them.
189
+ */
186
190
  declare const DEFAULT_CAN: Can;
187
191
  /**
188
192
  * What a principal may do under `rules` (`vercelProject()`, `githubActions()`, `oidc()`, and
@@ -1,5 +1,5 @@
1
1
  import { t as Access } from "./access-DPcrKIH_.mjs";
2
- import { _ as StoredGrant, c as Granted, d as Known, g as RuleFunction, n as AccessRule, p as Pinned, r as Authenticate, t as AccessFunction } from "./auth-DLYSt_-A.mjs";
2
+ import { _ as StoredGrant, c as Granted, d as Known, g as RuleFunction, n as AccessRule, p as Pinned, r as Authenticate, t as AccessFunction } from "./auth-K8dY1nBY.mjs";
3
3
  import { A as Labels, C as Author, t as Actor, u as ExternalEvent, x as Attachment } from "./folds-DLUzfibJ.mjs";
4
4
  import { $ as RegisterBody, A as InboxAckBody, At as ThreadsPage, B as MatchView, C as EventsPage, D as GrantBody, Dt as SyncedView, Et as SyncThreadView, F as InboxQuery, Ft as TokenView, G as MessagesQuery, H as Me, It as TypingBody, J as PostBody, L as LabelBody, M as InboxItem, N as InboxNextQuery, Nt as TokenBody, P as InboxPushBody, Rt as UploadStartBody, S as EditBody, St as SyncImportBody, U as MessageView, V as MatchesQuery, W as MessagesPage, Z as ReactBody, _ as BoardEventView, _t as SyncCopiesQuery, b as DeleteBody, bt as SyncFindQuery, ct as SchedulesQuery, dt as SourceJoin, ft as SourceJoinBody, ht as SourceReadQuery, it as ScheduleBody, j as InboxEntry, jt as ThreadsQuery, k as GrantView, kt as ThreadView, m as AckBody, mt as SourceRead, o as ProfileOption, st as ScheduleView, t as BoardClient, tt as RegistrationView, v as ChannelView, vt as SyncCopiesView, w as EventsQuery, wt as SyncReceiptBody, x as Discovery, xt as SyncFindView, y as CreateChannelBody, z as LinkedQuery, zt as UploadTicket } from "./client-COfYrgfV.mjs";
5
5
  import { t as HttpError } from "./errors-2vGs49Db.mjs";
@@ -1,5 +1,5 @@
1
1
  import { n as DIRECT_UPLOAD_BYTES_MAX, r as IMPORT_BYTES_MAX, t as ATTACHMENT_BYTES_MAX } from "../files-SniSmeEr.mjs";
2
2
  import { a as AttachmentId, c as ChannelPath, d as LabelKey, f as LabelValue, g as MessageText, h as MessageId, i as Attachment, l as Emoji, m as MESSAGE_TEXT_MAX, n as ActorId, o as Author, p as Labels, r as ActorKind, s as CHANNEL_PATH_MAX, t as ATTACHMENTS_PER_MESSAGE_MAX, u as Handle } from "../schemas-DBmUO6pr.mjs";
3
3
  import { o as Origin } from "../external-D3p5T57R.mjs";
4
- import { g as BOARD_SESSION, l as boardContract, n as channelsReducer, r as messagesReducer, t as actorsReducer } from "../reducers-DcENwtwZ.mjs";
4
+ import { g as BOARD_SESSION, l as boardContract, n as channelsReducer, r as messagesReducer, t as actorsReducer } from "../reducers-DQVSP3kk.mjs";
5
5
  export { ATTACHMENTS_PER_MESSAGE_MAX, ATTACHMENT_BYTES_MAX, ActorId, ActorKind, Attachment, AttachmentId, Author, BOARD_SESSION, CHANNEL_PATH_MAX, ChannelPath, DIRECT_UPLOAD_BYTES_MAX, Emoji, Handle, IMPORT_BYTES_MAX, LabelKey, LabelValue, Labels, MESSAGE_TEXT_MAX, MessageId, MessageText, Origin, actorsReducer, boardContract, channelsReducer, messagesReducer };
@@ -1,5 +1,5 @@
1
- import { r as sqlTables } from "../sql-CT5xVuGr.mjs";
2
- import { t as sqliteDb } from "../sqlite-db-0WeSOEZN.mjs";
1
+ import { r as sqlTables } from "../sql-E1K5g_ih.mjs";
2
+ import { t as sqliteDb } from "../sqlite-db-CzcD_FW8.mjs";
3
3
  import { t as memory$1 } from "../store-memory-B0PkVSuQ.mjs";
4
4
  //#region src/store/memory.ts
5
5
  /**
@@ -3,7 +3,7 @@ import { m as nullProtoRecord, n as NOTIFY_TIMINGS } from "../internal-CvsrprnU-
3
3
  import { n as defaultSleep, r as pollingStream } from "../store-polling-BZt2Rf3D-Div-bJ_D.mjs";
4
4
  import { r as platformWaitUntil } from "../platform-B4TnJtWu-Do3agKr5.mjs";
5
5
  import { t as retryableLazy } from "../retryable-lazy-DZWmHpii-DpTc5PIP.mjs";
6
- import { r as sqlTables } from "../sql-CT5xVuGr.mjs";
6
+ import { r as sqlTables } from "../sql-E1K5g_ih.mjs";
7
7
  import { a as idleLogCursor, i as idempotentReplay, n as decodeCause, r as decodeReturnedEventIds, t as cursorKeyOf } from "../store-codec-pAG2oPgQ-SqDXlPBR.mjs";
8
8
  import { n as SYSTEM_CLOCK, t as RANDOM_IDS } from "../store-N8PXxDAS-DWWgv-Vz.mjs";
9
9
  import { t as pollPresence } from "../store-presence-polling-JuAy2Ck2-Dh-g_KYM.mjs";
@@ -2,7 +2,7 @@ import { t as A2Error } from "../session-clear-XJYpmUpg-2q8l_FJR.mjs";
2
2
  import { n as NOTIFY_TIMINGS } from "../internal-CvsrprnU-zZMpDiRY.mjs";
3
3
  import { n as defaultSleep } from "../store-polling-BZt2Rf3D-Div-bJ_D.mjs";
4
4
  import { n as SYSTEM_CLOCK, t as RANDOM_IDS } from "../store-N8PXxDAS-DWWgv-Vz.mjs";
5
- import { n as createRedisNotifyStore, t as redisTables } from "../redis-tables-DHf85ixI.mjs";
5
+ import { n as createRedisNotifyStore, t as redisTables } from "../redis-tables-BFRj_SEJ.mjs";
6
6
  //#region ../../node_modules/.pnpm/experimental-a2@0.24.0_@upstash+qstash@2.12.0_@vercel+queue@0.7.0_ai@7.0.130_zod@4.6.5__b1e2c243a963f2620a5d202817417c26/node_modules/experimental-a2/dist/store-redis-http.js
7
7
  function redisHttpSubscriptions({ url, token, onReconnect, fallback }) {
8
8
  const subscriptions = /* @__PURE__ */ new Map();
@@ -1,7 +1,7 @@
1
1
  import { t as A2Error } from "../session-clear-XJYpmUpg-2q8l_FJR.mjs";
2
2
  import { t as retryableLazy } from "../retryable-lazy-DZWmHpii-DpTc5PIP.mjs";
3
3
  import { n as SYSTEM_CLOCK, t as RANDOM_IDS } from "../store-N8PXxDAS-DWWgv-Vz.mjs";
4
- import { n as createRedisNotifyStore, t as redisTables } from "../redis-tables-DHf85ixI.mjs";
4
+ import { n as createRedisNotifyStore, t as redisTables } from "../redis-tables-BFRj_SEJ.mjs";
5
5
  //#region ../../node_modules/.pnpm/experimental-a2@0.24.0_@upstash+qstash@2.12.0_@vercel+queue@0.7.0_ai@7.0.130_zod@4.6.5__b1e2c243a963f2620a5d202817417c26/node_modules/experimental-a2/dist/store-redis.js
6
6
  /**
7
7
  * experimental-a2/store-redis — the Redis-protocol store backend, on Redis
@@ -1,6 +1,6 @@
1
- import { r as sqlTables } from "../sql-CT5xVuGr.mjs";
1
+ import { r as sqlTables } from "../sql-E1K5g_ih.mjs";
2
2
  import { t as sqlite$1 } from "../store-sqlite-D85t3tE7.mjs";
3
- import { t as sqliteDb } from "../sqlite-db-0WeSOEZN.mjs";
3
+ import { t as sqliteDb } from "../sqlite-db-CzcD_FW8.mjs";
4
4
  //#region src/store/sqlite.ts
5
5
  /**
6
6
  * A board in one SQLite file, A2's log and board's tables side by side: `a2()`'s
@@ -1,9 +1,9 @@
1
- import { _ as StoredGrant } from "./auth-DLYSt_-A.mjs";
1
+ import { _ as StoredGrant } from "./auth-K8dY1nBY.mjs";
2
2
  import { t as Actor, x as Attachment } from "./folds-DLUzfibJ.mjs";
3
3
  import { l as Reducer, r as ContractEvent } from "./reducer-CYPHsSmd-BXjGiptm.mjs";
4
4
  import { a as SessionAppend, c as SessionConsumeOptions, d as SessionSchedule, f as StateOptions, l as SessionConsumeResult, n as A2Server, o as SessionClearOptions, p as SessionCleared, r as Consumer, s as SessionClearResult, t as A2Scheduler, u as SessionDeadLetters } from "./server-B9gu0qi1-DI1WvcVK.mjs";
5
5
  import { At as ThreadsPage, B as MatchView, C as EventsPage, Dt as SyncedView, Et as SyncThreadView, Ft as TokenView, H as Me, M as InboxItem, U as MessageView, W as MessagesPage, dt as SourceJoin, j as InboxEntry, k as GrantView, kt as ThreadView, mt as SourceRead, st as ScheduleView, tt as RegistrationView, v as ChannelView, vt as SyncCopiesView, x as Discovery, xt as SyncFindView, zt as UploadTicket } from "./client-COfYrgfV.mjs";
6
- import { i as Caller, l as StoredToken, n as BackendRoute, r as BoardBinding } from "./backend-Bob-5CM7.mjs";
6
+ import { i as Caller, l as StoredToken, n as BackendRoute, r as BoardBinding } from "./backend-DxE9wGKm.mjs";
7
7
  import { n as fsBlob, r as memoryBlob, t as BlobStore } from "./blob-Bx8QPWEd.mjs";
8
8
  import { t as BoardStore } from "./types-CmrFjpml.mjs";
9
9
  import { z } from "zod";
@@ -1,3 +1,3 @@
1
- import { t as a2 } from "./a2-DngWY2Eb.mjs";
1
+ import { t as a2 } from "./a2-DiDc77Uf.mjs";
2
2
  import { a as fsBlob, s as memoryBlob } from "./blob-WbB2DJKn.mjs";
3
3
  export { a2, fsBlob, memoryBlob };
@@ -1,6 +1,6 @@
1
1
  import { t as Actor, x as Attachment } from "./folds-DLUzfibJ.mjs";
2
2
  import { At as ThreadsPage, B as MatchView, C as EventsPage, Dt as SyncedView, Et as SyncThreadView, Ft as TokenView, H as Me, M as InboxItem, U as MessageView, W as MessagesPage, dt as SourceJoin, j as InboxEntry, k as GrantView, kt as ThreadView, mt as SourceRead, o as ProfileOption, st as ScheduleView, tt as RegistrationView, v as ChannelView, vt as SyncCopiesView, x as Discovery, xt as SyncFindView, zt as UploadTicket } from "./client-COfYrgfV.mjs";
3
- import { i as Caller, n as BackendRoute, r as BoardBinding } from "./backend-Bob-5CM7.mjs";
3
+ import { i as Caller, n as BackendRoute, r as BoardBinding } from "./backend-DxE9wGKm.mjs";
4
4
  //#region src/server/backend-http.d.ts
5
5
  type HttpOptions = {
6
6
  /**
@@ -1,4 +1,4 @@
1
- import { r as createHttp } from "./backend-http-CvUKOn-m.mjs";
1
+ import { r as createHttp } from "./backend-http-l5A8UmL-.mjs";
2
2
  import { i as environmentProfile, n as boardUrl, r as connect } from "./node-BgeGcwX0.mjs";
3
3
  //#region src/backend-http/index.ts
4
4
  const environment = {
@@ -1,6 +1,6 @@
1
1
  import "./files-SniSmeEr.mjs";
2
2
  import "./schemas-DBmUO6pr.mjs";
3
- import { A as RegisterBody, W as routes, a as METHODS, n as compileWatcher, t as canonicalWatchers } from "./watchers-hash-BjwlnGD9.mjs";
3
+ import { A as RegisterBody, W as routes, a as METHODS, n as compileWatcher, t as canonicalWatchers } from "./watchers-hash-CurCzwhe.mjs";
4
4
  import { a as forbidden, d as createBoardClient, o as json, t as HttpError, u as BoardError } from "./errors-CJXhhzvT.mjs";
5
5
  import { a as keyId, n as DERIVED_ID, o as sha256, r as derivedId, t as waitUntil } from "./wait-until-Dw4XrIDQ.mjs";
6
6
  //#region src/server/registrant.ts
@@ -1,4 +1,4 @@
1
- import { n as HttpOptions, t as HttpBackend } from "./backend-http-BRrRbjRx.mjs";
1
+ import { n as HttpOptions, t as HttpBackend } from "./backend-http-CaN06CaD.mjs";
2
2
  //#region src/backend-http/index.default.d.ts
3
3
  /**
4
4
  * The board at `url`, which keeps the log. Outside Node there's no environment to find it or a
@@ -1,2 +1,2 @@
1
- import { t as http } from "./index.default-BUcwDaAe.mjs";
1
+ import { t as http } from "./index.default-Dp8gexln.mjs";
2
2
  export { http };
@@ -1,4 +1,4 @@
1
- import { n as HttpOptions, t as HttpBackend } from "./backend-http-BRrRbjRx.mjs";
1
+ import { n as HttpOptions, t as HttpBackend } from "./backend-http-CaN06CaD.mjs";
2
2
  //#region src/backend-http/index.d.ts
3
3
  /**
4
4
  * The board at `url`, which keeps the log: this board uses it as this deployment. Without a
@@ -1,2 +1,2 @@
1
- import { t as http } from "./backend-http-D8mUzuKQ.mjs";
1
+ import { t as http } from "./backend-http-CoaCghuJ.mjs";
2
2
  export { http };
@@ -1,6 +1,6 @@
1
1
  import { t as HttpError } from "./errors-CJXhhzvT.mjs";
2
2
  import { c as loginHanded, d as vercelProjectFile, i as environmentProfile, t as asYou, u as vercelLogin } from "./node-BgeGcwX0.mjs";
3
- import { t as createVercel } from "./backend-vercel-CmY9yZ9m.mjs";
3
+ import { t as createVercel } from "./backend-vercel-CVxoTNF2.mjs";
4
4
  import { readFile } from "node:fs/promises";
5
5
  import { decodeJwt } from "jose";
6
6
  import { getVercelOidcToken } from "@vercel/oidc";
@@ -1,15 +1,17 @@
1
1
  import { r as IMPORT_BYTES_MAX } from "./files-SniSmeEr.mjs";
2
2
  import { _ as RemoteWatcherId } from "./schemas-DBmUO6pr.mjs";
3
- import { A as RegisterBody, a as METHODS, d as VERSION, n as compileWatcher, t as canonicalWatchers } from "./watchers-hash-BjwlnGD9.mjs";
3
+ import { A as RegisterBody, a as METHODS, d as VERSION, n as compileWatcher, t as canonicalWatchers } from "./watchers-hash-CurCzwhe.mjs";
4
4
  import { a as forbidden, f as duration, o as json, r as badRequest, s as notFound, t as HttpError } from "./errors-CJXhhzvT.mjs";
5
5
  import { o as sha256, r as derivedId } from "./wait-until-Dw4XrIDQ.mjs";
6
- import { a as wakePath, i as registrant, n as callerProfile, t as PROJECTS_OWN } from "./backend-http-CvUKOn-m.mjs";
6
+ import { a as wakePath, i as registrant, n as callerProfile, t as PROJECTS_OWN } from "./backend-http-l5A8UmL-.mjs";
7
7
  import { o as mediaType, r as fileName } from "./blob-WbB2DJKn.mjs";
8
8
  //#region src/server/backend-vercel.ts
9
9
  const PROFILE = /^[A-Za-z][A-Za-z0-9-]{0,31}$/;
10
10
  const SESSION = /^[A-Za-z0-9_.:-]{1,128}$/;
11
11
  const CLIENT_ID = /^[A-Za-z0-9_.:-]{1,128}$/;
12
12
  const MESSAGE_ID = /^msg_([0-9a-f-]{36})_([1-9]\d*)$/;
13
+ /** Whether `value` is a message ID Vercel's API hands out (`msg_<thread>_<n>`): the CLI takes one as a message, even where a channel has its name. */
14
+ const isApiMessageId = (value) => MESSAGE_ID.test(value);
13
15
  /** A cursor this backend made: a time, then the position it names, in base 36. */
14
16
  const CURSOR = /^([0-9a-z]+)(?:\.([0-9a-z]+))?$/;
15
17
  /** The API's own cursor for one channel, which its message list and feed share, and any process resumes. */
@@ -253,15 +255,27 @@ function createVercel(options, environment) {
253
255
  channel
254
256
  };
255
257
  }
256
- /** Each thread a read needs, read once: a label matches on its root's, which the API keeps on the thread. */
258
+ /**
259
+ * Each thread a read needs, read once, with the labels its messages match on: a label matches on
260
+ * its root's, which the API keeps on the thread. It reads the root, which names its thread, so it
261
+ * knows when the root is deleted.
262
+ */
257
263
  function threadReader(who, signal) {
258
264
  const read = /* @__PURE__ */ new Map();
259
265
  return (id) => {
260
266
  let thread = read.get(id);
261
- if (!thread) read.set(id, thread = onBoard(who, `/threads/${encodeURIComponent(id)}`).then((path) => api(who, "GET", path, signal ? { signal } : {})).then((found) => found.thread));
267
+ if (!thread) read.set(id, thread = messageById(who, idAt(id, 1), signal).then(({ thread, message }) => labeledBy(thread, message)));
262
268
  return thread;
263
269
  };
264
270
  }
271
+ /** A thread as its root's labels find it: the API keeps a deleted root's labels on its thread, and a deleted message has none. */
272
+ const labeledBy = (thread, root) => {
273
+ if (root?.deletedAt === void 0) return thread;
274
+ const { labels: _kept, ...rest } = thread;
275
+ return rest;
276
+ };
277
+ /** A message's labels: a deleted message keeps none, though the API still holds them. */
278
+ const labelsOf = (message) => message.deletedAt === void 0 ? { ...message.labels } : {};
265
279
  const threadMessages = async (who, threadId, signal) => all(who, await onBoard(who, `/threads/${encodeURIComponent(threadId)}/messages`), "messages", {}, signal);
266
280
  /** Who reacted with each emoji. The API counts them on the message and lists them apart. */
267
281
  async function reactors(who, message) {
@@ -327,7 +341,7 @@ function createVercel(options, environment) {
327
341
  re: root ? null : idAt(message.threadId, 1),
328
342
  replyTo: message.replyTo !== void 0 && message.replyTo !== 1 ? idAt(message.threadId, message.replyTo) : null,
329
343
  thread: message.threadId,
330
- labels: { ...message.labels },
344
+ labels: labelsOf(message),
331
345
  reactions: message.deletedAt === void 0 ? await reactors(who, message) : {},
332
346
  mentions: [],
333
347
  by: authorOf(message.createdBy),
@@ -409,7 +423,10 @@ function createVercel(options, environment) {
409
423
  skip: 0
410
424
  }]));
411
425
  }
412
- /** Whether a message matches a read's filters. A label matches on the message or its thread's root. */
426
+ /**
427
+ * Whether a message matches a read's filters. A label matches on the message or its thread's root:
428
+ * `thread`'s labels, as `labeledBy` gives them when the read filters on labels.
429
+ */
413
430
  function matches(filters, message, thread, me) {
414
431
  if (filters.re !== void 0 && filters.re !== message.id && filters.re !== idAt(thread.id, 1)) return false;
415
432
  if (filters.by !== void 0) {
@@ -426,7 +443,7 @@ function createVercel(options, environment) {
426
443
  if (filters.text !== void 0 && !message.text.toLowerCase().includes(filters.text.toLowerCase())) return false;
427
444
  for (const [key, values] of filters.label ?? []) {
428
445
  const on = (labels) => labels !== void 0 && Object.hasOwn(labels, key) && (values === null || values.includes(labels[key]));
429
- if (!on(message.labels) && !on(thread.labels)) return false;
446
+ if (!on(labelsOf(message)) && !on(thread.labels)) return false;
430
447
  }
431
448
  return true;
432
449
  }
@@ -566,13 +583,17 @@ function createVercel(options, environment) {
566
583
  const mine = await actorOf(who);
567
584
  let newest = 0;
568
585
  const messages = [];
569
- for (const { thread, channel } of threads) for (const message of await threadMessages(who, thread.id, signal)) {
570
- newest = Math.max(newest, message.createdAt);
571
- if (matches(filters, message, thread, mine)) messages.push({
572
- message,
573
- thread,
574
- channel
575
- });
586
+ for (const { thread, channel } of threads) {
587
+ const all = await threadMessages(who, thread.id, signal);
588
+ const labeled = labeledBy(thread, all.find((message) => message.sequence === 1));
589
+ for (const message of all) {
590
+ newest = Math.max(newest, message.createdAt);
591
+ if (matches(filters, message, labeled, mine)) messages.push({
592
+ message,
593
+ thread,
594
+ channel
595
+ });
596
+ }
576
597
  }
577
598
  messages.sort((a, b) => a.message.createdAt - b.message.createdAt || a.thread.id.localeCompare(b.thread.id) || a.message.sequence - b.message.sequence);
578
599
  return {
@@ -582,12 +603,16 @@ function createVercel(options, environment) {
582
603
  };
583
604
  }
584
605
  /** A change in the API's feed as a board event, with the message as it is now. Null for what isn't a message's. */
585
- async function eventOf(who, change, channel, cursor, filters, me, given) {
606
+ async function eventOf(who, change, channel, cursor, filters, me, given, threads = threadReader(who)) {
586
607
  if (!change.messageId || !change.type.startsWith("message.")) return null;
587
- const found = given ?? await messageById(who, change.messageId).catch((error) => {
608
+ let found = given ?? await messageById(who, change.messageId).catch((error) => {
588
609
  if (error instanceof HttpError && error.status === 404) return null;
589
610
  throw error;
590
611
  });
612
+ if (found && !given && filters.label?.length) found = {
613
+ ...found,
614
+ thread: found.message.sequence === 1 ? labeledBy(found.thread, found.message) : await threads(found.thread.id)
615
+ };
591
616
  if (!found || !matches(filters, found.message, found.thread, me)) return null;
592
617
  const message = await view(who, found.message, channel);
593
618
  const by = authorOf(change.actor);
@@ -694,6 +719,7 @@ function createVercel(options, environment) {
694
719
  };
695
720
  }));
696
721
  const mine = await actorOf(who);
722
+ const threads = threadReader(who, signal);
697
723
  const running = { ...position.feeds };
698
724
  const merged = pages.flatMap((page) => page.events.map((event) => ({
699
725
  ...event,
@@ -708,7 +734,7 @@ function createVercel(options, environment) {
708
734
  const event = await eventOf(who, change, page.channel.name, cursorOf({
709
735
  t: change.createdAt,
710
736
  feeds: { ...running }
711
- }), filters, mine);
737
+ }), filters, mine, void 0, threads);
712
738
  if (event) events.push(event);
713
739
  }
714
740
  const after = { ...position.feeds };
@@ -724,6 +750,49 @@ function createVercel(options, environment) {
724
750
  }
725
751
  };
726
752
  }
753
+ /** `ms` passing, or `signal` stopping it first. */
754
+ const pause = (ms, signal) => ms <= 0 || signal.aborted ? Promise.resolve() : new Promise((resolve) => {
755
+ const timer = setTimeout(resolve, ms);
756
+ signal.addEventListener("abort", () => (clearTimeout(timer), resolve()), { once: true });
757
+ });
758
+ /**
759
+ * Until one of `listed`'s feeds has something after `position` (true), or it's `until` (false). The API's feed is
760
+ * one channel's, and only it can wait for what comes next, so this waits on each at once and lets
761
+ * the rest go when the first answers with something: a read across channels costs a request a
762
+ * channel each time it waits, not each second it does.
763
+ */
764
+ async function changed(who, listed, position, until, signal) {
765
+ const wait = Math.min(WAIT_MAX_S, Math.ceil((until - Date.now()) / 1e3));
766
+ if (wait <= 0) return false;
767
+ if (listed.length === 0) {
768
+ await pause(until - Date.now(), signal);
769
+ return false;
770
+ }
771
+ const stop = new AbortController();
772
+ const either = AbortSignal.any([signal, stop.signal]);
773
+ const path = await onBoard(who, "/changes");
774
+ try {
775
+ return await new Promise((resolve, reject) => {
776
+ let pending = listed.length;
777
+ for (const channel of listed) {
778
+ const at = position.feeds[channel.id]?.at;
779
+ api(who, "GET", path, {
780
+ query: {
781
+ channelId: channel.id,
782
+ ...at ? { cursor: at } : { from: "latest" },
783
+ wait: String(wait)
784
+ },
785
+ signal: either
786
+ }).then((page) => {
787
+ if (page.events.length > 0) resolve(true);
788
+ else if (--pending === 0) resolve(false);
789
+ }).catch((error) => stop.signal.aborted && !signal.aborted ? void 0 : reject(error));
790
+ }
791
+ });
792
+ } finally {
793
+ stop.abort();
794
+ }
795
+ }
727
796
  /** Whether a read filters on what messages say, who wrote them, or their labels: what the API can't narrow by. */
728
797
  const filtered = (filters) => filters.by !== void 0 || filters.mentions !== void 0 || filters.text !== void 0 || filters.from !== void 0 || (filters.label?.length ?? 0) > 0;
729
798
  /**
@@ -1194,13 +1263,29 @@ function createVercel(options, environment) {
1194
1263
  }))))).flat();
1195
1264
  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]))));
1196
1265
  const newest = found.reduce((max, { at }) => Math.max(max, at), 0);
1197
- return {
1266
+ if (!query.label?.length) return {
1198
1267
  threads: await Promise.all(pick(rooted).map(({ thread, channel }) => summary(who, thread, channel, signal))),
1199
1268
  cursor: cursorOf({
1200
1269
  t: newest,
1201
1270
  feeds
1202
1271
  })
1203
1272
  };
1273
+ const candidates = rooted.filter(({ at }) => after === void 0 || at > after).sort((a, b) => a.at - b.at);
1274
+ if (after === void 0) candidates.reverse();
1275
+ const threads = [];
1276
+ for (let next = 0; next < candidates.length && threads.length < limit;) {
1277
+ const page = candidates.slice(next, next + limit - threads.length);
1278
+ next += page.length;
1279
+ for (const shown of await Promise.all(page.map(({ thread, channel }) => summary(who, thread, channel, signal)))) if (!shown.message.deleted) threads.push(shown);
1280
+ }
1281
+ if (after === void 0) threads.reverse();
1282
+ return {
1283
+ threads,
1284
+ cursor: cursorOf({
1285
+ t: newest,
1286
+ feeds
1287
+ })
1288
+ };
1204
1289
  },
1205
1290
  async message(caller, { id }, signal) {
1206
1291
  const who = whoOf(caller);
@@ -1579,14 +1664,17 @@ function createVercel(options, environment) {
1579
1664
  feeds: {}
1580
1665
  } : positionOf(query.after);
1581
1666
  const until = Date.now() + (query.wait ?? 0) * 1e3;
1667
+ let busy = false;
1582
1668
  for (;;) {
1669
+ const started = Date.now();
1583
1670
  const page = await read(who, listed, position, query, signal);
1584
1671
  position = page.position;
1585
1672
  if (page.events.length > 0 || Date.now() >= until || signal.aborted) return {
1586
1673
  events: page.events,
1587
1674
  cursor: cursorOf(position)
1588
1675
  };
1589
- await new Promise((resolve) => setTimeout(resolve, Math.min(1e3, until - Date.now())));
1676
+ if (!busy) busy = await changed(who, listed, position, until, signal) && Date.now() - started < 1e3;
1677
+ await pause(Math.min(started + 1e3, until) - Date.now(), signal);
1590
1678
  }
1591
1679
  },
1592
1680
  async typing() {
@@ -1653,4 +1741,4 @@ function createVercel(options, environment) {
1653
1741
  };
1654
1742
  }
1655
1743
  //#endregion
1656
- export { createVercel as t };
1744
+ export { isApiMessageId as n, createVercel as t };
@@ -1,6 +1,6 @@
1
1
  import { t as Actor, x as Attachment } from "./folds-DLUzfibJ.mjs";
2
2
  import { At as ThreadsPage, B as MatchView, C as EventsPage, Dt as SyncedView, Et as SyncThreadView, Ft as TokenView, H as Me, M as InboxItem, U as MessageView, W as MessagesPage, dt as SourceJoin, j as InboxEntry, k as GrantView, kt as ThreadView, mt as SourceRead, o as ProfileOption, st as ScheduleView, tt as RegistrationView, v as ChannelView, vt as SyncCopiesView, x as Discovery, xt as SyncFindView, zt as UploadTicket } from "./client-COfYrgfV.mjs";
3
- import { i as Caller, n as BackendRoute, r as BoardBinding } from "./backend-Bob-5CM7.mjs";
3
+ import { i as Caller, n as BackendRoute, r as BoardBinding } from "./backend-DxE9wGKm.mjs";
4
4
  //#region src/server/backend-vercel.d.ts
5
5
  type VercelOptions = {
6
6
  /** The team whose board it is: its ID (`team_…`) or its slug. In Node, by default your deployment's, or `VERCEL_ORG_ID`. */
@@ -1,4 +1,4 @@
1
- import { n as VercelOptions, t as VercelBackend } from "./backend-vercel-BaSEUdwg.mjs";
1
+ import { n as VercelOptions, t as VercelBackend } from "./backend-vercel-jg-6PAgD.mjs";
2
2
  //#region src/backend-vercel/index.default.d.ts
3
3
  /**
4
4
  * Your team's board, in Vercel's API. Outside Node there's no environment to find credentials or
@@ -1,4 +1,4 @@
1
- import { t as createVercel } from "./backend-vercel-CmY9yZ9m.mjs";
1
+ import { t as createVercel } from "./backend-vercel-CVxoTNF2.mjs";
2
2
  //#region src/backend-vercel/index.default.ts
3
3
  /**
4
4
  * Your team's board, in Vercel's API. Outside Node there's no environment to find credentials or
@@ -1,4 +1,4 @@
1
- import { n as VercelOptions, t as VercelBackend } from "./backend-vercel-BaSEUdwg.mjs";
1
+ import { n as VercelOptions, t as VercelBackend } from "./backend-vercel-jg-6PAgD.mjs";
2
2
  //#region src/backend-vercel/index.d.ts
3
3
  /** Where `token` comes from, in words: what `vb whoami` says. */
4
4
  export declare function credentialSource(): string;
@@ -1,2 +1,2 @@
1
- import { n as handTeam, r as vercel, t as credentialSource } from "./backend-vercel-Ba8JDtqW.mjs";
1
+ import { n as handTeam, r as vercel, t as credentialSource } from "./backend-vercel-BE65okBC.mjs";
2
2
  export { credentialSource, handTeam, vercel };
@@ -1,2 +1,2 @@
1
- import { a as OptionName, c as globalOptions, d as options, f as usage, i as CliOption, l as groups, n as CliCommand, o as commands, r as CliExample, s as filters, t as CliArgument, u as option } from "./commands-DK4W3HCJ.mjs";
1
+ import { a as OptionName, c as globalOptions, d as options, f as usage, i as CliOption, l as groups, n as CliCommand, o as commands, r as CliExample, s as filters, t as CliArgument, u as option } from "./commands-CpyPV_tk.mjs";
2
2
  export { CliArgument, CliCommand, CliExample, CliOption, OptionName, commands, filters, globalOptions, groups, option, options, usage };
@@ -1,2 +1,2 @@
1
- import { a as option, i as groups, n as filters, o as options, r as globalOptions, s as usage, t as commands } from "./commands-L1JSGz2Z.mjs";
1
+ import { a as option, i as groups, n as filters, o as options, r as globalOptions, s as usage, t as commands } from "./commands-DsnQKTdB.mjs";
2
2
  export { commands, filters, globalOptions, groups, option, options, usage };
@@ -1,5 +1,5 @@
1
- import { f as Board } from "./backend-Bob-5CM7.mjs";
2
- import "./index-Ho-ayyQL.mjs";
1
+ import { f as Board } from "./backend-DxE9wGKm.mjs";
2
+ import "./index-UXpTPWNc.mjs";
3
3
  //#region src/cli/failure.d.ts
4
4
  /**
5
5
  * What kind of failure it is, which fixes the exit code: 2 for `usage` and `missing_input`, 130
@@ -1,4 +1,4 @@
1
- import { a as commandLine, c as failureLines, i as mainWith, l as formatFailure, n as commandWord, o as exitCode, r as main, s as failureDocument, t as Failed } from "./main-Dz-8komG.mjs";
1
+ import { a as commandLine, c as failureLines, i as mainWith, l as formatFailure, n as commandWord, o as exitCode, r as main, s as failureDocument, t as Failed } from "./main-CcYDo9Hb.mjs";
2
2
  //#region src/cli/embedded.ts
3
3
  /**
4
4
  * Board's CLI as `appName` names it in help, usage, and errors (`vercel board`). With no board
@@ -75,7 +75,7 @@ function vb(board, argv, options = {}) {
75
75
  board,
76
76
  write: (chunk) => void (stdout += typeof chunk === "string" ? chunk : decoder.decode(chunk, { stream: true })),
77
77
  error: (chunk) => void (stderr += chunk),
78
- readFile: options.readFile ? async (path) => options.readFile(path) : lacking("--attach can't read files", "readFile"),
78
+ readFile: options.readFile ? async (path) => options.readFile(path) : lacking("--attach and --text-file can't read files", "readFile"),
79
79
  writeFile: options.writeFile ? async (path, data) => options.writeFile(path, data) : lacking("download can't save files", "writeFile"),
80
80
  stdin: options.stdin !== void 0 ? async () => options.stdin : lacking("- can't read stdin", "stdin"),
81
81
  ...options.signal ? { signal: options.signal } : {}
package/dist/cli.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import { t as ATTACHMENT_BYTES_MAX } from "./files-SniSmeEr.mjs";
3
3
  import "./schemas-DBmUO6pr.mjs";
4
- import { a as option } from "./commands-L1JSGz2Z.mjs";
4
+ import { a as option } from "./commands-DsnQKTdB.mjs";
5
5
  import { l as projectDir } from "./node-BgeGcwX0.mjs";
6
- import { r as main, u as who } from "./main-Dz-8komG.mjs";
6
+ import { r as main, u as who } from "./main-CcYDo9Hb.mjs";
7
7
  import { randomBytes, timingSafeEqual } from "node:crypto";
8
8
  import { appendFile, readFile } from "node:fs/promises";
9
9
  import { join } from "node:path";
@@ -661,7 +661,7 @@ const local = {
661
661
  if (args.length > 0) throw usage("serve takes no arguments: pass its port with --port, and its directory with --dir.");
662
662
  const port = portFlag();
663
663
  const root = projectDir();
664
- const { localHandle, serveLocal } = await import("./serve-CTmow-YH.mjs");
664
+ const { localHandle, serveLocal } = await import("./serve-Bplieh0C.mjs");
665
665
  const handle = flags.handle ?? process.env.BOARD_HANDLE;
666
666
  const local = await serveLocal({
667
667
  dir: flags.dir ?? join(root, ".board"),
@@ -162,6 +162,11 @@ declare const options: {
162
162
  readonly value: 'file';
163
163
  readonly description: 'attach a file';
164
164
  };
165
+ readonly 'text-file': {
166
+ readonly type: 'string';
167
+ readonly value: 'path';
168
+ readonly description: 'the text, from a file: - reads stdin';
169
+ };
165
170
  readonly unset: {
166
171
  readonly type: 'string';
167
172
  readonly multiple: true;