@vercel/board 0.48.1 → 0.49.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 (82) hide show
  1. package/dist/{access-C06pIr0M.mjs → access-B8DnrnHa.mjs} +29 -17
  2. package/dist/access.d.mts +2 -2
  3. package/dist/access.mjs +5 -5
  4. package/dist/{actors-Dkyg-oo0.mjs → actors-DewJKyqy.mjs} +4 -3
  5. package/dist/{auth-B9-wXQ-x.mjs → auth-CEU06Nyp.mjs} +2 -2
  6. package/dist/{auth-li3lKwJG.d.mts → auth-Z9-Khvvw.d.mts} +1 -1
  7. package/dist/{backend-UBP6HimX.d.mts → backend-BzCXxVZ-.d.mts} +19 -5
  8. package/dist/backend-local.d.mts +1 -1
  9. package/dist/backend-local.mjs +1 -1
  10. package/dist/{chat-provider-kNWd6MQC.mjs → chat-provider-BS_fr61g.mjs} +2 -2
  11. package/dist/{chat-provider-iN0DFsSE.d.mts → chat-provider-DQ1GHm4o.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 +3 -3
  16. package/dist/cli.mjs +6 -6
  17. package/dist/client-C2T4eaXd.d.mts +544 -0
  18. package/dist/{commands-CJsOA-hf.d.mts → commands-Cm4sODIu.d.mts} +12 -8
  19. package/dist/{commands-Dk6_cHLS.mjs → commands-nN8WpvCe.mjs} +75 -58
  20. package/dist/{conformance-CDP8y2Zm.mjs → conformance-0xONNKcB.mjs} +102 -20
  21. package/dist/conformance.d.mts +1 -1
  22. package/dist/conformance.mjs +1 -1
  23. package/dist/{engine-BQ0hJw2w.mjs → engine-BH_nfJ3N.mjs} +6 -5
  24. package/dist/{errors-QhkdzI-o.mjs → errors-DwV7I0g4.mjs} +53 -174
  25. package/dist/{events-B-qyxNsJ.mjs → events-B76-4bNp.mjs} +2 -2
  26. package/dist/{exports-inhbjAWi.d.mts → exports-CKEK1fxf.d.mts} +4 -4
  27. package/dist/{exports-BzSG0_wL.mjs → exports-DLzyKwEp.mjs} +336 -82
  28. package/dist/{external-BuVTXT1R.mjs → external-BLI4W_-V.mjs} +1 -1
  29. package/dist/{index-B0Fnhvk7.d.mts → index-DxqSw8yd.d.mts} +2 -2
  30. package/dist/index.d.mts +6 -6
  31. package/dist/index.mjs +4 -4
  32. package/dist/index.node.d.mts +7 -7
  33. package/dist/index.node.mjs +4 -4
  34. package/dist/inspect/app.js +39 -39
  35. package/dist/inspect-B2ImmOvw.mjs +272 -0
  36. package/dist/inspect-DnRQUmP8.mjs +2 -0
  37. package/dist/inspect.d.mts +17 -0
  38. package/dist/inspect.mjs +196 -0
  39. package/dist/{local-BdKxz-Dn.mjs → local-DPpSEq2_.mjs} +132 -50
  40. package/dist/{main-BgiViRZ8.mjs → main-CqX7JqzE.mjs} +214 -46
  41. package/dist/{memory-CMm-Fk_A.mjs → memory-DzqkXIB-.mjs} +2 -2
  42. package/dist/{middleware-CT6vMNUc.mjs → middleware-ysFm2S4v.mjs} +2 -2
  43. package/dist/{page-D-OzDOAX.mjs → page-7KWSGxyC.mjs} +12 -2
  44. package/dist/page-CN77B014.mjs +2 -0
  45. package/dist/profile-header-Cj0Cb1cf.mjs +163 -0
  46. package/dist/{provider-DC3WHUXo.d.mts → provider-Dwb_9mnu.d.mts} +3 -529
  47. package/dist/{routes-CjA6Mp4D.d.mts → routes-B6SEA9yw.d.mts} +130 -4
  48. package/dist/{routes-ABXf3CKq.mjs → routes-qS92xz8U.mjs} +33 -7
  49. package/dist/{schemas-7VFdomFB.mjs → schemas-TeVe4Udh.mjs} +4 -2
  50. package/dist/{serve-C2Jbr7pR.mjs → serve-CYr4RwRM.mjs} +5 -5
  51. package/dist/{server-EOQC5Gtq.mjs → server-V7qyVUiJ.mjs} +11 -9
  52. package/dist/{serving-BNdiReQT.mjs → serving-BzNxlnDV.mjs} +1 -1
  53. package/dist/{inspect-n9brh-TT.mjs → shell-BLHZoP-x.mjs} +25 -274
  54. package/dist/{sql-IEbO5vXs.mjs → sql-DIKQd5Me.mjs} +2 -2
  55. package/dist/{sqlite-CVG8XKHm.mjs → sqlite-BF9kBDh1.mjs} +2 -2
  56. package/dist/{sqlite-db-BJjPQYx4.mjs → sqlite-db-CSYwiZ4E.mjs} +1 -1
  57. package/dist/sync-chat-sdk.d.mts +2 -2
  58. package/dist/sync-chat-sdk.mjs +2 -2
  59. package/dist/sync-github.d.mts +2 -2
  60. package/dist/sync-github.mjs +2 -2
  61. package/dist/sync-linear.d.mts +3 -3
  62. package/dist/sync-linear.mjs +2 -2
  63. package/dist/sync-slack.d.mts +3 -3
  64. package/dist/sync-slack.mjs +11 -7
  65. package/dist/sync.d.mts +2 -2
  66. package/dist/sync.mjs +2 -2
  67. package/dist/{task-batch-D4p9N8lN.mjs → task-batch-CujTLmTB.mjs} +10 -11
  68. package/dist/{tokens-BCp4EWTQ.mjs → tokens-BmCDAT4N.mjs} +2 -2
  69. package/dist/version-BCoWGLEW.mjs +5 -0
  70. package/docs/01-board/01-mounting.md +8 -0
  71. package/docs/01-board/04-messages.md +6 -2
  72. package/docs/01-board/05-reading.md +17 -2
  73. package/docs/01-board/09-access.md +40 -6
  74. package/docs/01-board/11-tasks.md +3 -3
  75. package/docs/03-guides/02-inspector.md +31 -0
  76. package/docs/04-reference/01-cli.md +81 -32
  77. package/docs/04-reference/02-board.md +14 -3
  78. package/docs/04-reference/03-http.md +5 -3
  79. package/docs/04-reference/05-conformance.md +7 -0
  80. package/package.json +5 -1
  81. package/dist/inspect-BB-XUPuz.mjs +0 -2
  82. package/dist/page-Dr9Aqlej.mjs +0 -2
@@ -1,5 +1,5 @@
1
- import { o as forbidden } from "./errors-QhkdzI-o.mjs";
2
- import { a as CAN_MAX, s as ChannelPath } from "./schemas-7VFdomFB.mjs";
1
+ import { a as CAN_MAX, s as ChannelPath } from "./schemas-TeVe4Udh.mjs";
2
+ import { o as forbidden } from "./errors-DwV7I0g4.mjs";
3
3
  //#region src/server/access.ts
4
4
  /**
5
5
  * What a principal may do in a channel. `read` covers messages, threads,
@@ -352,6 +352,10 @@ const isUnder = (other, pattern) => other !== pattern && (pattern === "*" || pat
352
352
  * - **Admission:** wherever `everyone` gives something, `caller` has it too, since any principal a
353
353
  * grant lets in gets what `everyone` gives. A revoke or a removal lets no one in, so it's judged
354
354
  * by reach alone, at the patterns of the grant as it was.
355
+ * - **Lockout:** a change that passes both, and takes the caller's own `manage` at a pattern it
356
+ * names, is one the caller couldn't take back: closing `security/` to everyone closes it to
357
+ * whoever closes it, unless a grant keeps them in. Judged only with `then`, what the caller may
358
+ * do once the change has landed, so a caller that says to go ahead is let through.
355
359
  *
356
360
  * It looks only at the spots where access can change: the grants' patterns, the `everyone`
357
361
  * grants', and the caller's own, from `summary()`. It does no I/O, so a board and Vercel's API run
@@ -359,18 +363,18 @@ const isUnder = (other, pattern) => other !== pattern && (pattern === "*" || pat
359
363
  */
360
364
  function checkGrantChange(change) {
361
365
  if (change.owner) return null;
362
- const { caller, own } = change;
366
+ const { caller, own, then } = change;
363
367
  const everyone = change.after.filter((grant) => grant.principals.some((principal) => principal.kind === "everyone"));
364
368
  const lifted = Object.keys(change.revoked?.can ?? {});
365
369
  const made = Object.keys(change.changed?.can ?? {});
370
+ const touched = [.../* @__PURE__ */ new Set([...lifted, ...made])];
366
371
  const spots = [.../* @__PURE__ */ new Set([
367
- ...lifted,
368
- ...made,
372
+ ...touched,
369
373
  ...everyone.flatMap((grant) => Object.keys(grant.can)),
370
374
  ...Object.keys(caller.summary()),
371
375
  ...Object.keys(own.summary())
372
376
  ])];
373
- for (const pattern of /* @__PURE__ */ new Set([...lifted, ...made])) {
377
+ for (const pattern of touched) {
374
378
  if (!caller.at("manage", pattern) || !own.at("manage", pattern)) return {
375
379
  reason: "reach",
376
380
  pattern,
@@ -382,17 +386,25 @@ function checkGrantChange(change) {
382
386
  permission: "manage"
383
387
  };
384
388
  }
385
- if (made.length === 0) return null;
386
- const gives = combine(everyone.map((grant) => ({
387
- level: "everyone",
388
- can: grant.can,
389
- source: null
390
- })));
391
- for (const spot of spots) for (const permission of PERMISSIONS) if (gives.at(permission, spot) && !caller.at(permission, spot)) return {
392
- reason: "admission",
393
- pattern: spot,
394
- permission
395
- };
389
+ if (made.length > 0) {
390
+ const gives = combine(everyone.map((grant) => ({
391
+ level: "everyone",
392
+ can: grant.can,
393
+ source: null
394
+ })));
395
+ for (const spot of spots) for (const permission of PERMISSIONS) if (gives.at(permission, spot) && !caller.at(permission, spot)) return {
396
+ reason: "admission",
397
+ pattern: spot,
398
+ permission
399
+ };
400
+ }
401
+ if (then) {
402
+ for (const pattern of touched) if (!then.caller.at("manage", pattern) || !then.own.at("manage", pattern)) return {
403
+ reason: "lockout",
404
+ pattern,
405
+ permission: "manage"
406
+ };
407
+ }
396
408
  return null;
397
409
  }
398
410
  //#endregion
package/dist/access.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { Cn as union, Dn as Author, On as CAN_MAX, Sn as parseCan, _n as PERMISSIONS, bn as checkGrantChange, cn as Can, dn as Grant, fn as GrantChange, hn as InvalidCan, ln as ChannelPattern, mn as GrantShape, on as Access, pn as GrantChangeRefusal, sn as AccessSummary, un as FULL_ACCESS, vn as Permission, wn as Actor, xn as compileAccess } from "./routes-CjA6Mp4D.mjs";
2
- import { _ as GrantFacts, a as DEFAULT_CAN, b as grantAccess, c as IssuerConfig, d as Principal, f as PrincipalKind, g as GrantExplanation, h as DecidingGrant, i as Claims, l as Known, m as Caller, n as AuthenticateContext, r as CallerRequest, s as HostPrincipal, t as Authenticate, u as OidcTokensOptions, v as GrantSource, y as explainGrants } from "./auth-li3lKwJG.mjs";
1
+ import { An as Actor, Cn as PERMISSIONS, Dn as compileAccess, En as checkGrantChange, Nn as Author, On as parseCan, Pn as CAN_MAX, _n as Grant, bn as GrantShape, fn as Access, gn as FULL_ACCESS, hn as ChannelPattern, kn as union, mn as Can, pn as AccessSummary, vn as GrantChange, wn as Permission, xn as InvalidCan, yn as GrantChangeRefusal } from "./routes-B6SEA9yw.mjs";
2
+ import { _ as GrantFacts, a as DEFAULT_CAN, b as grantAccess, c as IssuerConfig, d as Principal, f as PrincipalKind, g as GrantExplanation, h as DecidingGrant, i as Claims, l as Known, m as Caller, n as AuthenticateContext, r as CallerRequest, s as HostPrincipal, t as Authenticate, u as OidcTokensOptions, v as GrantSource, y as explainGrants } from "./auth-Z9-Khvvw.mjs";
3
3
  //#region src/server/tokens.d.ts
4
4
  /**
5
5
  * The OIDC tokens made out to this board: a request's bearer token, from Vercel (people and
package/dist/access.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { a as CAN_MAX } from "./schemas-7VFdomFB.mjs";
2
- import { c as compileAccess, f as union, n as InvalidCan, o as checkGrantChange, r as PERMISSIONS, t as FULL_ACCESS, u as parseCan } from "./access-C06pIr0M.mjs";
3
- import { D as grantAccess, E as explainGrants, t as DEFAULT_CAN } from "./auth-B9-wXQ-x.mjs";
4
- import { a as resolveActor } from "./actors-Dkyg-oo0.mjs";
5
- import { t as oidcTokens } from "./tokens-BCp4EWTQ.mjs";
1
+ import { a as CAN_MAX } from "./schemas-TeVe4Udh.mjs";
2
+ import { c as compileAccess, f as union, n as InvalidCan, o as checkGrantChange, r as PERMISSIONS, t as FULL_ACCESS, u as parseCan } from "./access-B8DnrnHa.mjs";
3
+ import { D as grantAccess, E as explainGrants, t as DEFAULT_CAN } from "./auth-CEU06Nyp.mjs";
4
+ import { a as resolveActor } from "./actors-DewJKyqy.mjs";
5
+ import { t as oidcTokens } from "./tokens-BmCDAT4N.mjs";
6
6
  export { CAN_MAX, DEFAULT_CAN, FULL_ACCESS, InvalidCan, PERMISSIONS, checkGrantChange, compileAccess, explainGrants, grantAccess, oidcTokens, parseCan, resolveActor, union };
@@ -1,6 +1,7 @@
1
- import { r as badRequest, v as parseProfileHeader } from "./errors-QhkdzI-o.mjs";
2
- import { N as toStorable } from "./schemas-7VFdomFB.mjs";
3
- import { u as parseCan } from "./access-C06pIr0M.mjs";
1
+ import { r as parseProfileHeader } from "./profile-header-Cj0Cb1cf.mjs";
2
+ import { N as toStorable } from "./schemas-TeVe4Udh.mjs";
3
+ import { r as badRequest } from "./errors-DwV7I0g4.mjs";
4
+ import { u as parseCan } from "./access-B8DnrnHa.mjs";
4
5
  import { t as own } from "./own-OwgPWdmh.mjs";
5
6
  //#region src/server/actors.ts
6
7
  /** Agents whose marks the board serves at `/avatars/<name>`, for a caller to pass as an avatar. */
@@ -1,5 +1,5 @@
1
- import { d as unauthorized, o as forbidden, r as badRequest, t as HttpError } from "./errors-QhkdzI-o.mjs";
2
- import { c as compileAccess, l as decide, p as writtenCan, s as combine, t as FULL_ACCESS, u as parseCan } from "./access-C06pIr0M.mjs";
1
+ import { d as unauthorized, o as forbidden, r as badRequest, t as HttpError } from "./errors-DwV7I0g4.mjs";
2
+ import { c as compileAccess, l as decide, p as writtenCan, s as combine, t as FULL_ACCESS, u as parseCan } from "./access-B8DnrnHa.mjs";
3
3
  //#region src/server/grants.ts
4
4
  /**
5
5
  * How close `principal` is to the caller, or null when it doesn't name it: `principal` for its own
@@ -1,4 +1,4 @@
1
- import { cn as Can, gn as Level, on as Access, vn as Permission, yn as WrittenCan } from "./routes-CjA6Mp4D.mjs";
1
+ import { Sn as Level, Tn as WrittenCan, fn as Access, mn as Can, wn as Permission } from "./routes-B6SEA9yw.mjs";
2
2
  import { JWTVerifyGetKey } from "jose";
3
3
  //#region src/server/grants.d.ts
4
4
  /** Who asks, as a verified token says, in the terms grants name them by. */
@@ -1,6 +1,7 @@
1
- import { $t as TypingBody, B as InboxPushBody, Bt as SyncThreadView, C as EditBody, D as ExplainQuery, Dn as Author, En as Attachment, Et as SourceJoinBody, Ft as SyncFindView, Gt as TasksPage, Ht as TaskClaim, I as InboxAckBody, It as SyncImportBody, J as MatchesQuery, K as LinkedQuery, Kt as TasksQuery, L as InboxEntry, Mt as SyncCopiesView, O as Explanation, Ot as SourceRead, P as GrantView, Pt as SyncFindQuery, Q as MessagesQuery, R as InboxItem, Rt as SyncReceiptBody, S as Discovery, St as SchemaBody, T as EventsQuery, Tt as SourceJoin, Ut as TaskNeedsBody, V as InboxQuery, Vt as SyncedView, W as LabelBody, X as MessageView, Xt as ThreadsPage, Y as Me, Yt as ThreadView, Z as MessagesPage, Zt as ThreadsQuery, a as BlockTaskBody, b as CreatedTasksQuery, cn as Can, ct as RegisterBody, d as ClaimReadyTaskBody, dt as ReleaseTaskBody, ft as RenewTaskBody, g as CreateTaskBody, gn as Level, h as CreateChannelBody, ht as ScheduleBody, i as AssignTaskBody, in as UploadTicket, j as GrantBody, jn as ExternalEvent, jt as SyncCopiesQuery, k as FailTaskBody, kn as Labels, kt as SourceReadQuery, l as CancelTaskBody, m as CompleteTaskBody, n as ActorView, on as Access, ot as ReactBody, p as ClaimTaskBody, q as MatchView, rn as UploadStartBody, s as BoardEventView, t as AckBody, tn as UpdateGrantBody, tt as PostBody, u as ChannelView, ut as RegistrationView, v as CreateTasksBody, vn as Permission, vt as ScheduleView, w as EventsPage, wn as Actor, wt as SchemaView, x as DeleteBody, yt as SchedulesQuery, z as InboxNextQuery } from "./routes-CjA6Mp4D.mjs";
2
- import { l as Known, o as Granted, p as StoredGrant, t as Authenticate } from "./auth-li3lKwJG.mjs";
3
- import { G as ProfileOption, L as ErrorOrigin, P as BoardClient, m as SyncProvider, tt as Mentioned } from "./provider-DC3WHUXo.mjs";
1
+ import { $ as MessageView, A as FailTaskBody, An as Actor, At as SourceJoinBody, B as InboxEntry, Bt as SyncImportBody, C as Discovery, Ct as SchedulesQuery, E as EventsQuery, Et as SchemaBody, Fn as Labels, Ft as SyncCopiesQuery, Gt as SyncedView, H as InboxNextQuery, Ht as SyncReceiptBody, I as GrantView, It as SyncCopiesView, Jt as TaskClaim, Ln as ExternalEvent, Mn as Attachment, Mt as SourceRead, N as GrantBody, Nn as Author, Nt as SourceReadQuery, O as ExplainQuery, Ot as SchemaView, Q as Me, Qt as TasksQuery, Rt as SyncFindQuery, S as DeleteBody, Sn as Level, St as ScheduleView, T as EventsPage, U as InboxPushBody, V as InboxItem, W as InboxQuery, Wt as SyncThreadView, X as MatchView, Y as LinkedQuery, Yt as TaskNeedsBody, Z as MatchesQuery, Zt as TasksPage, _ as CreateTaskBody, _t as RevokeGrantBody, a as BlockTaskBody, an as TypingBody, d as ClaimReadyTaskBody, dt as RegisterBody, et as MessagesPage, fn as Access, g as CreateGrantsBody, h as CreateChannelBody, ht as RenewTaskBody, i as AssignTaskBody, it as PostBody, k as Explanation, kt as SourceJoin, l as CancelTaskBody, ln as UploadStartBody, lt as ReactBody, m as CompleteTaskBody, mn as Can, mt as ReleaseTaskBody, n as ActorView, nn as ThreadsPage, p as ClaimTaskBody, pt as RegistrationView, q as LabelBody, rn as ThreadsQuery, s as BoardEventView, sn as UpdateGrantBody, t as AckBody, tn as ThreadView, tt as MessagesQuery, u as ChannelView, un as UploadTicket, w as EditBody, wn as Permission, x as CreatedTasksQuery, y as CreateTasksBody, yt as ScheduleBody, z as InboxAckBody, zt as SyncFindView } from "./routes-B6SEA9yw.mjs";
2
+ import { l as Known, o as Granted, p as StoredGrant, t as Authenticate } from "./auth-Z9-Khvvw.mjs";
3
+ import { S as Mentioned, f as ProfileOption, i as ErrorOrigin, t as BoardClient } from "./client-C2T4eaXd.mjs";
4
+ import { m as SyncProvider } from "./provider-Dwb_9mnu.mjs";
4
5
  import { z } from "zod";
5
6
  //#region src/server/sandbox.d.ts
6
7
  /** How a rule matches a value: a regular expression (RE2), or the value exactly. */
@@ -340,13 +341,23 @@ type Protocol = {
340
341
  grants: GrantView[];
341
342
  };
342
343
  };
343
- /** A new grant, always: the same principals again are another. Needs `manage` at each pattern its `can` names. */
344
+ /**
345
+ * A new grant, always: the same principals again are another. Needs `manage` at each pattern its
346
+ * `can` names. One its caller couldn't take back is 409 `grant_lockout`, unless it says `lockMeOut`.
347
+ */
344
348
  createGrant: {
345
349
  input: Input<typeof GrantBody>;
346
350
  output: {
347
351
  grant: GrantView;
348
352
  };
349
353
  };
354
+ /** Several grants in one write, all or none, in the order given: each needs what `createGrant` does, on the grants as they are, and a lockout is judged with all of them made. */
355
+ createGrants: {
356
+ input: Input<typeof CreateGrantsBody>;
357
+ output: {
358
+ grants: GrantView[];
359
+ };
360
+ };
350
361
  /** Adds and removes principals, or replaces its `can`: needs what `checkGrantChange` says, for the grant as it was and as it'd be. 404 `grant_not_found`. */
351
362
  updateGrant: {
352
363
  input: Id & Input<typeof UpdateGrantBody>;
@@ -361,7 +372,7 @@ type Protocol = {
361
372
  };
362
373
  /** `revoked` is false when it was already gone. */
363
374
  revokeGrant: {
364
- input: Id;
375
+ input: Id & Input<typeof RevokeGrantBody>;
365
376
  output: {
366
377
  revoked: boolean;
367
378
  };
@@ -551,9 +562,12 @@ declare class HttpError extends Error {
551
562
  readonly hint: string | undefined;
552
563
  /** `handle` for a handle's own error on its way through: everything else is the board's. */
553
564
  readonly origin: ErrorOrigin;
565
+ /** For a 429, how many seconds until it's worth sending again, when that's known: the response's `Retry-After`. */
566
+ readonly retryAfter: number | undefined;
554
567
  constructor(status: number, code: string, message: string, options?: {
555
568
  hint?: string;
556
569
  origin?: ErrorOrigin;
570
+ retryAfter?: number;
557
571
  });
558
572
  }
559
573
  //#endregion
@@ -1,4 +1,4 @@
1
- import { t as Backend } from "./backend-UBP6HimX.mjs";
1
+ import { t as Backend } from "./backend-BzCXxVZ-.mjs";
2
2
  //#region src/server/local.d.ts
3
3
  type LocalOptions = {
4
4
  /**
@@ -1,2 +1,2 @@
1
- import { t as local } from "./local-BdKxz-Dn.mjs";
1
+ import { t as local } from "./local-DPpSEq2_.mjs";
2
2
  export { local };
@@ -1,5 +1,5 @@
1
- import "./external-BuVTXT1R.mjs";
2
- import { c as SyncProvider, s as ResolvedTarget } from "./events-B-qyxNsJ.mjs";
1
+ import "./external-BLI4W_-V.mjs";
2
+ import { c as SyncProvider, s as ResolvedTarget } from "./events-B76-4bNp.mjs";
3
3
  import { createHash } from "node:crypto";
4
4
  import { AsyncLocalStorage } from "node:async_hooks";
5
5
  import { Chat, stringifyMarkdown } from "chat";
@@ -1,5 +1,5 @@
1
- import { An as ExternalAuthor, Mn as ExternalFile, Nn as ExternalLink, Ot as SourceRead, Tt as SourceJoin, wn as Actor } from "./routes-CjA6Mp4D.mjs";
2
- import { A as SyncRoot, E as ProviderEvent, _ as SyncFn, a as ProviderOptions, c as Receive, f as ResolvedTarget, i as ProviderFile, l as ReceivedEvent, m as SyncProvider, n as FileDelivery, o as ProviderPost, r as ProviderDelivery, t as FetchedLink } from "./provider-DC3WHUXo.mjs";
1
+ import { An as Actor, In as ExternalAuthor, Mt as SourceRead, Rn as ExternalFile, kt as SourceJoin, zn as ExternalLink } from "./routes-B6SEA9yw.mjs";
2
+ import { A as SyncRoot, E as ProviderEvent, _ as SyncFn, a as ProviderOptions, c as Receive, f as ResolvedTarget, i as ProviderFile, l as ReceivedEvent, m as SyncProvider, n as FileDelivery, o as ProviderPost, r as ProviderDelivery, t as FetchedLink } from "./provider-Dwb_9mnu.mjs";
3
3
  import { Adapter, Author, FileUpload, Message, ReactionEvent, StateAdapter } from "chat";
4
4
  //#region src/sync/chat-provider.d.ts
5
5
  type ChatInput = {
@@ -1,2 +1,2 @@
1
- import { a as OptionName, c as globalOptions, d as options, f as usage, i as CliOption, l as groups, n as CliCommand, o as commands, r as CliExample, s as filters, t as CliArgument, u as option } from "./commands-CJsOA-hf.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-Cm4sODIu.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-Dk6_cHLS.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-nN8WpvCe.mjs";
2
2
  export { commands, filters, globalOptions, groups, option, options, usage };
@@ -1,5 +1,5 @@
1
- import { f as Board } from "./backend-UBP6HimX.mjs";
2
- import "./index-B0Fnhvk7.mjs";
1
+ import { f as Board } from "./backend-BzCXxVZ-.mjs";
2
+ import "./index-DxqSw8yd.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,5 +1,5 @@
1
- import { a as stoppedBy } from "./exports-BzSG0_wL.mjs";
2
- import { a as commandLine, c as failureLines, i as mainWith, l as formatFailure, n as commandWord, o as exitCode, r as main, s as failureDocument, t as Failed } from "./main-BgiViRZ8.mjs";
1
+ import { a as stoppedBy } from "./exports-DLzyKwEp.mjs";
2
+ import { a as commandLine, c as failureLines, i as mainWith, l as formatFailure, n as commandWord, o as exitCode, r as main, s as failureDocument, t as Failed } from "./main-CqX7JqzE.mjs";
3
3
  //#region src/cli/embedded.ts
4
4
  /**
5
5
  * Board's CLI as `appName` names it in help, usage, and errors (`vercel board`). With no board
@@ -78,7 +78,7 @@ function vb(board, argv, options = {}) {
78
78
  claimsOf: board,
79
79
  write: (chunk) => void (stdout += typeof chunk === "string" ? chunk : decoder.decode(chunk, { stream: true })),
80
80
  error: (chunk) => void (stderr += chunk),
81
- readFile: options.readFile ? async (path) => options.readFile(path) : lacking("--attach and --text-file can't read files", "readFile"),
81
+ readFile: options.readFile ? async (path) => options.readFile(path) : lacking("--attach and --file can't read files", "readFile"),
82
82
  writeFile: options.writeFile ? async (path, data) => options.writeFile(path, data) : lacking("download can't save files", "writeFile"),
83
83
  stdin: options.stdin !== void 0 ? async () => options.stdin : lacking("- can't read stdin", "stdin"),
84
84
  ...options.signal ? { signal: options.signal } : {}
package/dist/cli.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import { a as option } from "./commands-Dk6_cHLS.mjs";
3
- import { m as projectDir } from "./server-EOQC5Gtq.mjs";
4
- import { r as main } from "./main-BgiViRZ8.mjs";
5
- import { i as createInspector, r as stopped, t as allowedHosts } from "./inspect-n9brh-TT.mjs";
2
+ import { a as option } from "./commands-nN8WpvCe.mjs";
3
+ import { m as projectDir } from "./server-V7qyVUiJ.mjs";
4
+ import { r as main } from "./main-CqX7JqzE.mjs";
5
+ import { i as createInspector, r as stopped, t as allowedHosts } from "./inspect-B2ImmOvw.mjs";
6
6
  import { appendFile, readFile } from "node:fs/promises";
7
7
  import { join } from "node:path";
8
8
  //#region src/cli/local.ts
@@ -37,7 +37,7 @@ const local = {
37
37
  },
38
38
  async run(args, context) {
39
39
  if (args.length > 0) throw context.usage("inspect takes no arguments: pass its port with --port.");
40
- return (await import("./inspect-BB-XUPuz.mjs")).inspect(context);
40
+ return (await import("./inspect-DnRQUmP8.mjs")).inspect(context);
41
41
  }
42
42
  },
43
43
  serve: {
@@ -81,7 +81,7 @@ const local = {
81
81
  }, "tailscale");
82
82
  if (tailscale.length > 0 && hosts.length > 0) throw usage("--tailscale takes Tailscale's word for who's calling, which another proxy in front could forge: it doesn't go with --allow-host.");
83
83
  const root = projectDir();
84
- const { serveLocal } = await import("./serve-C2Jbr7pR.mjs");
84
+ const { serveLocal } = await import("./serve-CYr4RwRM.mjs");
85
85
  const local = await serveLocal({
86
86
  dir: flags.dir ?? join(root, ".board"),
87
87
  hosts,