@vercel/board 0.44.0 → 0.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/{access-BgBiaCyx.mjs → access-3udXjJAg.mjs} +2 -2
  2. package/dist/access.d.mts +3 -3
  3. package/dist/access.mjs +6 -6
  4. package/dist/{actors-DkZsnMgA.mjs → actors-DasGZnfb.mjs} +3 -3
  5. package/dist/{auth-C8jxty0C.d.mts → auth-BG_whr9_.d.mts} +1 -1
  6. package/dist/{auth-Ft4AJptx.mjs → auth-aiOVE82-.mjs} +2 -2
  7. package/dist/{backend-_3W_5g6y.d.mts → backend-D6yTo8Un.d.mts} +3 -3
  8. package/dist/backend-local.d.mts +1 -1
  9. package/dist/backend-local.mjs +1 -1
  10. package/dist/{chat-provider-DZ4DsAZ7.mjs → chat-provider-BvNqOQFL.mjs} +2 -2
  11. package/dist/{chat-provider-HQo68RWL.d.mts → chat-provider-V2jnjVLq.d.mts} +2 -2
  12. package/dist/cli-commands.d.mts +1 -1
  13. package/dist/cli-commands.mjs +1 -1
  14. package/dist/cli-embedded.d.mts +2 -2
  15. package/dist/cli-embedded.mjs +2 -2
  16. package/dist/cli.mjs +14 -7
  17. package/dist/{commands-B75pBXIV.mjs → commands-CqdnjUkm.mjs} +6 -0
  18. package/dist/{commands-DHGZWeSZ.d.mts → commands-DewS14_P.d.mts} +6 -0
  19. package/dist/{conformance-CHqXZoGe.mjs → conformance-BInS4_6b.mjs} +3 -3
  20. package/dist/conformance.d.mts +1 -1
  21. package/dist/conformance.mjs +1 -1
  22. package/dist/{engine-D07DTYSi.mjs → engine-XVBt02Bl.mjs} +5 -5
  23. package/dist/{errors-DUzpDSrJ.mjs → errors-ZazTZh-s.mjs} +20 -3
  24. package/dist/{events-voButVQW.mjs → events-D17RndlV.mjs} +2 -2
  25. package/dist/{exports-BNk4w-b2.mjs → exports-DCf75prP.mjs} +183 -45
  26. package/dist/exports-Gspe1eEq.d.mts +4 -0
  27. package/dist/{external-DymyhUzl.mjs → external-DfhN7lKK.mjs} +1 -1
  28. package/dist/{index-CwOOIT0e.d.mts → index-Djmr4GzQ.d.mts} +2 -2
  29. package/dist/index.d.mts +6 -6
  30. package/dist/index.mjs +4 -4
  31. package/dist/index.node.d.mts +6 -6
  32. package/dist/index.node.mjs +3 -3
  33. package/dist/inspect/app.js +88 -88
  34. package/dist/{inspect-dtQlHBcq.mjs → inspect-B0_aKQM8.mjs} +23 -7
  35. package/dist/inspect-CULoD54F.mjs +2 -0
  36. package/dist/{local-CnGNTReZ.mjs → local-Bel_oeFa.mjs} +25 -14
  37. package/dist/{main-CpsAmpEy.mjs → main-DmsdcUZ_.mjs} +19 -11
  38. package/dist/{memory-DhduVbUu.mjs → memory-DyEL0fvN.mjs} +2 -2
  39. package/dist/{middleware-0DUFrav-.mjs → middleware-BHHKHA9q.mjs} +2 -2
  40. package/dist/{origin-D4ER_Tze.mjs → origin-BHmEdok7.mjs} +7 -7
  41. package/dist/{provider-CVI-DlWl.d.mts → provider-BC9mPYVh.d.mts} +14 -6
  42. package/dist/{routes-DrByOCc1.mjs → routes-CkUetTO2.mjs} +12 -13
  43. package/dist/{routes-CErTwlSZ.d.mts → routes-zm4TXKCC.d.mts} +6 -1
  44. package/dist/{schemas-DAzSsgWk.mjs → schemas-BhZaystC.mjs} +8 -2
  45. package/dist/{serve-BQT5quKD.mjs → serve-bPSEx_8X.mjs} +4 -4
  46. package/dist/{server-FlDE6BDt.mjs → server-CcvxkXzG.mjs} +8 -8
  47. package/dist/{serving-hcxzaCCO.mjs → serving-BLVRrJ7P.mjs} +1 -1
  48. package/dist/{sql-P9g-rLIF.mjs → sql-CyVcjw8x.mjs} +2 -2
  49. package/dist/{sqlite-B3rCcIof.mjs → sqlite-Con-8duk.mjs} +2 -2
  50. package/dist/{sqlite-db-D0Fyju-4.mjs → sqlite-db-BdzxtUOV.mjs} +1 -1
  51. package/dist/sync-chat-sdk.d.mts +2 -2
  52. package/dist/sync-chat-sdk.mjs +2 -2
  53. package/dist/sync-github.d.mts +2 -2
  54. package/dist/sync-github.mjs +2 -2
  55. package/dist/sync-linear.d.mts +3 -3
  56. package/dist/sync-linear.mjs +2 -2
  57. package/dist/sync-slack.d.mts +3 -3
  58. package/dist/sync-slack.mjs +4 -4
  59. package/dist/sync.d.mts +2 -2
  60. package/dist/sync.mjs +2 -2
  61. package/dist/{tokens-BSMpTPEe.mjs → tokens-BErYXuHZ.mjs} +2 -2
  62. package/docs/01-board/04-messages.md +1 -1
  63. package/docs/01-board/09-access.md +8 -0
  64. package/docs/03-guides/02-inspector.md +16 -0
  65. package/docs/04-reference/02-board.md +23 -2
  66. package/docs/04-reference/03-http.md +2 -2
  67. package/package.json +1 -1
  68. package/dist/exports-DFwXKst5.d.mts +0 -4
  69. package/dist/inspect-DBLdh9NM.mjs +0 -2
@@ -1,5 +1,5 @@
1
- import { a as forbidden } from "./errors-DUzpDSrJ.mjs";
2
- import { a as CAN_MAX, o as ChannelPath } from "./schemas-DAzSsgWk.mjs";
1
+ import { a as forbidden } from "./errors-ZazTZh-s.mjs";
2
+ import { a as CAN_MAX, s as ChannelPath } from "./schemas-BhZaystC.mjs";
3
3
  //#region src/server/access.ts
4
4
  /**
5
5
  * What a principal may do in a channel. `read` covers messages, threads,
package/dist/access.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { $t as parseCan, Bt as Can, Gt as GrantChangeRefusal, Ht as FULL_ACCESS, Kt as GrantShape, Qt as compileAccess, Rt as Access, Ut as Grant, Vt as ChannelPattern, Wt as GrantChange, Yt as Permission, Zt as checkGrantChange, an as CAN_MAX, en as union, in as Author, qt as InvalidCan, tn as Actor, zt as AccessSummary } from "./routes-CErTwlSZ.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-C8jxty0C.mjs";
1
+ import { $t as compileAccess, Bt as Can, Gt as GrantChangeRefusal, Ht as FULL_ACCESS, Kt as GrantShape, Qt as checkGrantChange, Rt as Access, Ut as Grant, Vt as ChannelPattern, Wt as GrantChange, Xt as Permission, Yt as PERMISSIONS, an as Author, en as parseCan, nn as Actor, on as CAN_MAX, qt as InvalidCan, tn as union, zt as AccessSummary } from "./routes-zm4TXKCC.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-BG_whr9_.mjs";
3
3
  //#region src/server/tokens.d.ts
4
4
  /**
5
5
  * The OIDC tokens made out to this board: a request's bearer token, from Vercel (people and
@@ -25,4 +25,4 @@ type ResolvedActor = {
25
25
  */
26
26
  export declare function resolveActor(principal: Principal, claims: Claims): ResolvedActor;
27
27
  //#endregion
28
- export { type Access, type AccessSummary, type Authenticate, type AuthenticateContext, CAN_MAX, type Caller, type CallerRequest, type Can, type ChannelPattern, type Claims, DEFAULT_CAN, type DecidingGrant, FULL_ACCESS, type Grant, type GrantChange, type GrantChangeRefusal, type GrantExplanation, type GrantFacts, type GrantShape, type GrantSource, type HostPrincipal, InvalidCan, type IssuerConfig, type Known, type OidcTokensOptions, type Permission, type Principal, type PrincipalKind, checkGrantChange, compileAccess, explainGrants, grantAccess, parseCan, union };
28
+ export { type Access, type AccessSummary, type Authenticate, type AuthenticateContext, CAN_MAX, type Caller, type CallerRequest, type Can, type ChannelPattern, type Claims, DEFAULT_CAN, type DecidingGrant, FULL_ACCESS, type Grant, type GrantChange, type GrantChangeRefusal, type GrantExplanation, type GrantFacts, type GrantShape, type GrantSource, type HostPrincipal, InvalidCan, type IssuerConfig, type Known, type OidcTokensOptions, PERMISSIONS, type Permission, type Principal, type PrincipalKind, checkGrantChange, compileAccess, explainGrants, grantAccess, parseCan, union };
package/dist/access.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { a as CAN_MAX } from "./schemas-DAzSsgWk.mjs";
2
- import { c as compileAccess, f as union, n as InvalidCan, o as checkGrantChange, t as FULL_ACCESS, u as parseCan } from "./access-BgBiaCyx.mjs";
3
- import { C as explainGrants, t as DEFAULT_CAN, w as grantAccess } from "./auth-Ft4AJptx.mjs";
4
- import { a as resolveActor } from "./actors-DkZsnMgA.mjs";
5
- import { t as oidcTokens } from "./tokens-BSMpTPEe.mjs";
6
- export { CAN_MAX, DEFAULT_CAN, FULL_ACCESS, InvalidCan, checkGrantChange, compileAccess, explainGrants, grantAccess, oidcTokens, parseCan, resolveActor, union };
1
+ import { a as CAN_MAX } from "./schemas-BhZaystC.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-3udXjJAg.mjs";
3
+ import { C as explainGrants, t as DEFAULT_CAN, w as grantAccess } from "./auth-aiOVE82-.mjs";
4
+ import { a as resolveActor } from "./actors-DasGZnfb.mjs";
5
+ import { t as oidcTokens } from "./tokens-BErYXuHZ.mjs";
6
+ export { CAN_MAX, DEFAULT_CAN, FULL_ACCESS, InvalidCan, PERMISSIONS, checkGrantChange, compileAccess, explainGrants, grantAccess, oidcTokens, parseCan, resolveActor, union };
@@ -1,6 +1,6 @@
1
- import { m as parseProfileHeader, r as badRequest } from "./errors-DUzpDSrJ.mjs";
2
- import { x as toStorable } from "./schemas-DAzSsgWk.mjs";
3
- import { u as parseCan } from "./access-BgBiaCyx.mjs";
1
+ import { g as parseProfileHeader, r as badRequest } from "./errors-ZazTZh-s.mjs";
2
+ import { C as toStorable } from "./schemas-BhZaystC.mjs";
3
+ import { u as parseCan } from "./access-3udXjJAg.mjs";
4
4
  import { t as own } from "./own-OwgPWdmh.mjs";
5
5
  //#region src/server/actors.ts
6
6
  /** Agents whose marks the board serves at `/avatars/<name>`, for a caller to pass as an avatar. */
@@ -1,4 +1,4 @@
1
- import { Bt as Can, Jt as Level, Rt as Access, Xt as WrittenCan, Yt as Permission } from "./routes-CErTwlSZ.mjs";
1
+ import { Bt as Can, Jt as Level, Rt as Access, Xt as Permission, Zt as WrittenCan } from "./routes-zm4TXKCC.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,5 +1,5 @@
1
- import { a as forbidden, l as unauthorized, r as badRequest, t as HttpError } from "./errors-DUzpDSrJ.mjs";
2
- import { c as compileAccess, l as decide, p as writtenCan, s as combine, t as FULL_ACCESS, u as parseCan } from "./access-BgBiaCyx.mjs";
1
+ import { a as forbidden, r as badRequest, t as HttpError, u as unauthorized } from "./errors-ZazTZh-s.mjs";
2
+ import { c as compileAccess, l as decide, p as writtenCan, s as combine, t as FULL_ACCESS, u as parseCan } from "./access-3udXjJAg.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,6 +1,6 @@
1
- import { $ as ScheduleBody, A as LabelBody, Bt as Can, C as InboxAckBody, D as InboxPushBody, Dt as ThreadView, E as InboxNextQuery, F as Me, Ft as UploadStartBody, I as MessageView, It as UploadTicket, J as RegisterBody, Jt as Level, K as ReactBody, L as MessagesPage, M as LinkedQuery, N as MatchView, Nt as UpdateGrantBody, O as InboxQuery, Ot as ThreadsPage, P as MatchesQuery, R as MessagesQuery, Rt as Access, St as SyncReceiptBody, T as InboxItem, Tt as SyncedView, V as PostBody, X as RegistrationView, Yt as Permission, a as BoardEventView, bt as SyncImportBody, c as CreateChannelBody, cn as ExternalEvent, ct as SchemaView, d as EditBody, f as EventsPage, ft as SourceRead, g as Explanation, gt as SyncCopiesView, h as ExplainQuery, ht as SyncCopiesQuery, in as Author, jt as TypingBody, kt as ThreadsQuery, l as DeleteBody, lt as SourceJoin, n as ActorView, nt as ScheduleView, on as Labels, ot as SchemaBody, p as EventsQuery, pt as SourceReadQuery, rn as Attachment, rt as SchedulesQuery, s as ChannelView, t as AckBody, tn as Actor, u as Discovery, ut as SourceJoinBody, v as GrantBody, vt as SyncFindQuery, w as InboxEntry, wt as SyncThreadView, x as GrantView, yt as SyncFindView } from "./routes-CErTwlSZ.mjs";
2
- import { l as Known, o as Granted, p as StoredGrant, t as Authenticate } from "./auth-C8jxty0C.mjs";
3
- import { I as ErrorOrigin, P as BoardClient, m as SyncProvider, z as ProfileOption } from "./provider-CVI-DlWl.mjs";
1
+ import { $ as ScheduleBody, A as LabelBody, Bt as Can, C as InboxAckBody, D as InboxPushBody, Dt as ThreadView, E as InboxNextQuery, F as Me, Ft as UploadStartBody, I as MessageView, It as UploadTicket, J as RegisterBody, Jt as Level, K as ReactBody, L as MessagesPage, M as LinkedQuery, N as MatchView, Nt as UpdateGrantBody, O as InboxQuery, Ot as ThreadsPage, P as MatchesQuery, R as MessagesQuery, Rt as Access, St as SyncReceiptBody, T as InboxItem, Tt as SyncedView, V as PostBody, X as RegistrationView, Xt as Permission, a as BoardEventView, an as Author, bt as SyncImportBody, c as CreateChannelBody, ct as SchemaView, d as EditBody, f as EventsPage, ft as SourceRead, g as Explanation, gt as SyncCopiesView, h as ExplainQuery, ht as SyncCopiesQuery, in as Attachment, jt as TypingBody, kt as ThreadsQuery, l as DeleteBody, ln as ExternalEvent, lt as SourceJoin, n as ActorView, nn as Actor, nt as ScheduleView, ot as SchemaBody, p as EventsQuery, pt as SourceReadQuery, rt as SchedulesQuery, s as ChannelView, sn as Labels, t as AckBody, u as Discovery, ut as SourceJoinBody, v as GrantBody, vt as SyncFindQuery, w as InboxEntry, wt as SyncThreadView, x as GrantView, yt as SyncFindView } from "./routes-zm4TXKCC.mjs";
2
+ import { l as Known, o as Granted, p as StoredGrant, t as Authenticate } from "./auth-BG_whr9_.mjs";
3
+ import { H as ProfileOption, I as ErrorOrigin, P as BoardClient, m as SyncProvider } from "./provider-BC9mPYVh.mjs";
4
4
  import { z } from "zod";
5
5
  //#region src/server/sandbox.d.ts
6
6
  /** How a rule matches a value: a regular expression (RE2), or the value exactly. */
@@ -1,4 +1,4 @@
1
- import { t as Backend } from "./backend-_3W_5g6y.mjs";
1
+ import { t as Backend } from "./backend-D6yTo8Un.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-CnGNTReZ.mjs";
1
+ import { t as local } from "./local-Bel_oeFa.mjs";
2
2
  export { local };
@@ -1,5 +1,5 @@
1
- import "./external-DymyhUzl.mjs";
2
- import { c as SyncProvider, s as ResolvedTarget } from "./events-voButVQW.mjs";
1
+ import "./external-DfhN7lKK.mjs";
2
+ import { c as SyncProvider, s as ResolvedTarget } from "./events-D17RndlV.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 { ft as SourceRead, ln as ExternalFile, lt as SourceJoin, sn as ExternalAuthor, tn as Actor, un as ExternalLink } from "./routes-CErTwlSZ.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-CVI-DlWl.mjs";
1
+ import { cn as ExternalAuthor, dn as ExternalLink, ft as SourceRead, lt as SourceJoin, nn as Actor, un as ExternalFile } from "./routes-zm4TXKCC.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-BC9mPYVh.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-DHGZWeSZ.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-DewS14_P.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-B75pBXIV.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-CqdnjUkm.mjs";
2
2
  export { commands, filters, globalOptions, groups, option, options, usage };
@@ -1,5 +1,5 @@
1
- import { f as Board } from "./backend-_3W_5g6y.mjs";
2
- import "./index-CwOOIT0e.mjs";
1
+ import { f as Board } from "./backend-D6yTo8Un.mjs";
2
+ import "./index-Djmr4GzQ.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 { r as stoppedBy } from "./exports-BNk4w-b2.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-CpsAmpEy.mjs";
1
+ import { r as stoppedBy } from "./exports-DCf75prP.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-DmsdcUZ_.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
package/dist/cli.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import { a as option } from "./commands-B75pBXIV.mjs";
3
- import { f as projectDir } from "./server-FlDE6BDt.mjs";
4
- import { r as main } from "./main-CpsAmpEy.mjs";
5
- import { n as stopped, r as startInspector } from "./inspect-dtQlHBcq.mjs";
2
+ import { a as option } from "./commands-CqdnjUkm.mjs";
3
+ import { f as projectDir } from "./server-CcvxkXzG.mjs";
4
+ import { r as main } from "./main-DmsdcUZ_.mjs";
5
+ import { n as stopped, r as startInspector } from "./inspect-B0_aKQM8.mjs";
6
6
  import { appendFile, readFile } from "node:fs/promises";
7
7
  import { join } from "node:path";
8
8
  //#region src/cli/local.ts
@@ -22,15 +22,22 @@ const local = {
22
22
  name: "inspect",
23
23
  description: "the board in your browser, as you: read, post, react (local only)",
24
24
  arguments: [],
25
- options: [option("port", "the port to listen on (default: a free one)"), option("no-open")],
25
+ options: [
26
+ option("port", "the port to listen on (default: a free one)"),
27
+ option("no-open"),
28
+ option("allow-host")
29
+ ],
26
30
  examples: [{
27
31
  name: "open the board in your browser",
28
32
  value: "inspect"
33
+ }, {
34
+ name: "serve it behind a proxy on another name",
35
+ value: "inspect --allow-host box.tailnet.ts.net"
29
36
  }]
30
37
  },
31
38
  async run(args, context) {
32
39
  if (args.length > 0) throw context.usage("inspect takes no arguments: pass its port with --port.");
33
- return (await import("./inspect-DBLdh9NM.mjs")).inspect(context);
40
+ return (await import("./inspect-CULoD54F.mjs")).inspect(context);
34
41
  }
35
42
  },
36
43
  serve: {
@@ -53,7 +60,7 @@ const local = {
53
60
  if (args.length > 0) throw usage("serve takes no arguments: pass its port with --port, and its directory with --dir.");
54
61
  const port = portFlag();
55
62
  const root = projectDir();
56
- const { serveLocal } = await import("./serve-BQT5quKD.mjs");
63
+ const { serveLocal } = await import("./serve-bPSEx_8X.mjs");
57
64
  const local = await serveLocal({
58
65
  dir: flags.dir ?? join(root, ".board"),
59
66
  ...port !== void 0 ? { port } : {}
@@ -165,6 +165,12 @@ const options = {
165
165
  type: "boolean",
166
166
  description: "don't open the browser"
167
167
  },
168
+ "allow-host": {
169
+ type: "string",
170
+ multiple: true,
171
+ value: "host",
172
+ description: "also answer requests for this host, from a proxy in front: whoever reaches it there acts as you"
173
+ },
168
174
  in: {
169
175
  type: "string",
170
176
  value: "duration",
@@ -215,6 +215,12 @@ declare const options: {
215
215
  readonly type: 'boolean';
216
216
  readonly description: "don't open the browser";
217
217
  };
218
+ readonly 'allow-host': {
219
+ readonly type: 'string';
220
+ readonly multiple: true;
221
+ readonly value: 'host';
222
+ readonly description: 'also answer requests for this host, from a proxy in front: whoever reaches it there acts as you';
223
+ };
218
224
  readonly in: {
219
225
  readonly type: 'string';
220
226
  readonly value: 'duration';
@@ -1,7 +1,7 @@
1
- import { u as BoardError } from "./errors-DUzpDSrJ.mjs";
1
+ import { d as BoardError } from "./errors-ZazTZh-s.mjs";
2
+ import "./routes-CkUetTO2.mjs";
2
3
  import { c as canonical, t as block } from "./blocks-CVoBC7ur.mjs";
3
- import "./routes-DrByOCc1.mjs";
4
- import { a as canText, c as compileAccess } from "./access-BgBiaCyx.mjs";
4
+ import { a as canText, c as compileAccess } from "./access-3udXjJAg.mjs";
5
5
  //#region src/conformance/index.ts
6
6
  var Mismatch = class extends Error {};
7
7
  const show = (value) => JSON.stringify(value) ?? String(value);
@@ -1,4 +1,4 @@
1
- import { f as Board } from "./backend-_3W_5g6y.mjs";
1
+ import { f as Board } from "./backend-D6yTo8Un.mjs";
2
2
  //#region src/conformance/index.d.ts
3
3
  /**
4
4
  * Checks that a board speaks the protocol, through a handle on it (`conformance(board())`), as
@@ -1,2 +1,2 @@
1
- import { t as conformance } from "./conformance-CHqXZoGe.mjs";
1
+ import { t as conformance } from "./conformance-BInS4_6b.mjs";
2
2
  export { conformance };
@@ -1,10 +1,10 @@
1
- import { _ as IMPORT_BYTES_MAX, h as ATTACHMENT_BYTES_MAX, r as badRequest, s as notFound, t as HttpError, x as typeOf, y as fileSize } from "./errors-DUzpDSrJ.mjs";
2
- import { f as MESSAGE_TEXT_MAX, o as ChannelPath, x as toStorable } from "./schemas-DAzSsgWk.mjs";
3
- import { l as isThreadTarget, s as channelOf } from "./external-DymyhUzl.mjs";
1
+ import { C as typeOf, _ as ATTACHMENT_BYTES_MAX, r as badRequest, s as notFound, t as HttpError, x as fileSize, y as IMPORT_BYTES_MAX } from "./errors-ZazTZh-s.mjs";
2
+ import { C as toStorable, p as MESSAGE_TEXT_MAX, s as ChannelPath } from "./schemas-BhZaystC.mjs";
3
+ import { l as isThreadTarget, s as channelOf } from "./external-DfhN7lKK.mjs";
4
4
  import { t as canonicalEmoji } from "./emoji-CTLpvH-A.mjs";
5
- import { a as waitUntil, c as platformProfile, f as viaText, i as afterRetry, l as shownName, m as derivedId, o as actorParts, t as DroppedError } from "./middleware-0DUFrav-.mjs";
5
+ import { a as waitUntil, c as platformProfile, f as viaText, i as afterRetry, l as shownName, m as derivedId, o as actorParts, t as DroppedError } from "./middleware-BHHKHA9q.mjs";
6
6
  import { a as replaceMentions, n as isEmail, t as extractMentions } from "./mentions-DfZGp3B-.mjs";
7
- import { a as immutable, d as opensBlock, f as routesFor, l as UnreadableError, n as SyncOverrides, o as ReceivedEvent, s as ResolvedTarget, u as channelMissing } from "./events-voButVQW.mjs";
7
+ import { a as immutable, d as opensBlock, f as routesFor, l as UnreadableError, n as SyncOverrides, o as ReceivedEvent, s as ResolvedTarget, u as channelMissing } from "./events-D17RndlV.mjs";
8
8
  import { i as vercelDeployments, n as displayText } from "./bots-CLKKMgYf.mjs";
9
9
  //#region src/sync/engine.ts
10
10
  /** `files`: a message with files may have no text. */
@@ -1,4 +1,4 @@
1
- import { f as MESSAGE_TEXT_MAX } from "./schemas-DAzSsgWk.mjs";
1
+ import { p as MESSAGE_TEXT_MAX } from "./schemas-BhZaystC.mjs";
2
2
  import { r as normalizeEmoji } from "./emoji-CTLpvH-A.mjs";
3
3
  import { ZodError } from "zod";
4
4
  //#region src/contract/files.ts
@@ -244,6 +244,19 @@ const messageBody = (input) => {
244
244
  attachments: attachments.map((a) => typeof a === "string" ? a : a.id)
245
245
  } : rest;
246
246
  };
247
+ /** Tells `onState` each change, once: `live` when the board answers, `retrying` when a request fails. It never guesses. */
248
+ function eventsState(onState) {
249
+ let current = null;
250
+ const tell = (next) => {
251
+ if (next === current) return;
252
+ current = next;
253
+ onState?.(next);
254
+ };
255
+ return {
256
+ answered: () => tell("live"),
257
+ failed: () => tell("retrying")
258
+ };
259
+ }
247
260
  const UNITS = {
248
261
  ms: 1,
249
262
  s: 1e3,
@@ -605,10 +618,11 @@ function createBoardClient(options) {
605
618
  inboxNext: async (key, opts = {}) => (await call("GET", `/inbox/${path(key)}/next${queryString(opts)}`)).items,
606
619
  /** How an inbox event went: done, or an error to try it again. */
607
620
  inboxAck: (key, id, body) => call("POST", `/inbox/${path(key)}/${path(id)}/ack`, { body }),
608
- /** Live events. Reconnects from the last seen index whenever the stream closes. */
621
+ /** Live events. Reconnects from the last seen index whenever the stream closes, and tells `onState` whether it's live or retrying. */
609
622
  async *events(query = {}, opts = {}) {
610
623
  let after = query.after;
611
624
  let failures = 0;
625
+ const state = eventsState(opts.onState);
612
626
  while (!opts.signal?.aborted) {
613
627
  let response;
614
628
  try {
@@ -622,10 +636,12 @@ function createBoardClient(options) {
622
636
  } catch (error) {
623
637
  if (opts.signal?.aborted) return;
624
638
  if (error instanceof BoardError && error.status >= 400 && error.status < 500) throw error;
639
+ state.failed();
625
640
  await new Promise((r) => setTimeout(r, Math.min(3e4, 500 * 2 ** failures++)));
626
641
  continue;
627
642
  }
628
643
  failures = 0;
644
+ state.answered();
629
645
  try {
630
646
  for await (const message of parseSse(response.body, opts.signal)) {
631
647
  if (message.id !== void 0) after = message.id;
@@ -633,6 +649,7 @@ function createBoardClient(options) {
633
649
  }
634
650
  } catch (error) {
635
651
  if (opts.signal?.aborted) return;
652
+ state.failed();
636
653
  await new Promise((r) => setTimeout(r, Math.min(3e4, 500 * 2 ** failures++)));
637
654
  }
638
655
  }
@@ -757,4 +774,4 @@ function toErrorResponse(error) {
757
774
  } }, 500);
758
775
  }
759
776
  //#endregion
760
- export { IMPORT_BYTES_MAX as _, forbidden as a, mediaType as b, toErrorResponse as c, createBoardClient as d, duration as f, DIRECT_UPLOAD_BYTES_MAX as g, ATTACHMENT_BYTES_MAX as h, duplicateId as i, unauthorized as l, parseProfileHeader as m, RejectedError as n, json as o, formatProfileHeader as p, badRequest as r, notFound as s, HttpError as t, BoardError as u, fileName as v, typeOf as x, fileSize as y };
777
+ export { typeOf as C, mediaType as S, ATTACHMENT_BYTES_MAX as _, forbidden as a, fileName as b, textTooLong as c, BoardError as d, createBoardClient as f, parseProfileHeader as g, formatProfileHeader as h, duplicateId as i, toErrorResponse as l, eventsState as m, RejectedError as n, json as o, duration as p, badRequest as r, notFound as s, HttpError as t, unauthorized as u, DIRECT_UPLOAD_BYTES_MAX as v, fileSize as x, IMPORT_BYTES_MAX as y };
@@ -1,5 +1,5 @@
1
- import { d as Labels, l as LabelKey } from "./schemas-DAzSsgWk.mjs";
2
- import { n as ExternalEvent, r as ExternalLocation } from "./external-DymyhUzl.mjs";
1
+ import { f as Labels, u as LabelKey } from "./schemas-BhZaystC.mjs";
2
+ import { n as ExternalEvent, r as ExternalLocation } from "./external-DfhN7lKK.mjs";
3
3
  import { z } from "zod";
4
4
  //#region src/sync/fn.ts
5
5
  const ROUTES = Symbol.for("board.syncRoutes");