@vercel/board 0.50.0 → 0.50.2

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 (64) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +6 -2
  3. package/dist/access.mjs +1 -1
  4. package/dist/{backend-CcaaS9Xl.d.mts → backend-C2JUnbm5.d.mts} +7 -2
  5. package/dist/backend-local.d.mts +1 -1
  6. package/dist/backend-local.mjs +1 -1
  7. package/dist/{chat-provider-HJ7y_ipp.mjs → chat-provider-Br2RXgLV.mjs} +4 -3
  8. package/dist/{chat-provider-DQ1GHm4o.d.mts → chat-provider-z4nzV8A-.d.mts} +1 -1
  9. package/dist/cli-embedded.d.mts +8 -5
  10. package/dist/cli-embedded.mjs +8 -5
  11. package/dist/cli.mjs +5 -5
  12. package/dist/{conformance-Cr-umDl0.mjs → conformance-jHhuKZe8.mjs} +1 -1
  13. package/dist/conformance.d.mts +1 -1
  14. package/dist/conformance.mjs +1 -1
  15. package/dist/{engine-DJZ8Xy_g.mjs → engine-I887QHnP.mjs} +13 -5
  16. package/dist/{events-BdOCmnZh.mjs → events-mWKc1uvZ.mjs} +1 -1
  17. package/dist/{exports-CuD-Mxkw.mjs → exports-DRId1Cks.mjs} +88 -23
  18. package/dist/{exports-lmr6UHHc.d.mts → exports-DkdCh3Zi.d.mts} +1 -1
  19. package/dist/{external-D2jq_DEQ.mjs → external-DkWafjn-.mjs} +5 -1
  20. package/dist/{index-_KxJu15n.d.mts → index-DpuOtt0J.d.mts} +2 -2
  21. package/dist/index.d.mts +2 -2
  22. package/dist/index.mjs +2 -2
  23. package/dist/index.node.d.mts +3 -3
  24. package/dist/index.node.mjs +2 -2
  25. package/dist/inspect/app.js +30 -30
  26. package/dist/inspect/engine.js +1 -1
  27. package/dist/inspect-DLLoYeg7.mjs +2 -0
  28. package/dist/{inspect-CZeoSm7E.mjs → inspect-DSBG5VDl.mjs} +2 -2
  29. package/dist/inspect.mjs +1 -1
  30. package/dist/{local-BVSFSSYf.mjs → local-DjrvtIoE.mjs} +7 -7
  31. package/dist/{main-B016auoG.mjs → main-VTkjxFcG.mjs} +11 -9
  32. package/dist/{memory-C2lzMV_t.mjs → memory-wmUDblhm.mjs} +2 -2
  33. package/dist/{provider-Dwb_9mnu.d.mts → provider-BgUS6ZpP.d.mts} +2 -0
  34. package/dist/{routes-BE0y6wCk.mjs → routes-BSBUdD2X.mjs} +1 -1
  35. package/dist/{serve-B10e7QaY.mjs → serve-C2xn_cQV.mjs} +6 -5
  36. package/dist/{server-ViWNvg5q.mjs → server-BLQxoL0g.mjs} +36 -26
  37. package/dist/{serving-SbqeWqlA.mjs → serving-Bulte-NO.mjs} +1 -1
  38. package/dist/{shell-DmpmgOPC.mjs → shell-Bny3-l_d.mjs} +1 -1
  39. package/dist/{sql-iABdyCiz.mjs → sql-D0MqINA6.mjs} +1 -1
  40. package/dist/{sqlite-28EMrmk7.mjs → sqlite-Dj2ZEtgy.mjs} +2 -2
  41. package/dist/{sqlite-db-Ckd-ceNe.mjs → sqlite-db-DjbTlUwN.mjs} +1 -1
  42. package/dist/sync-chat-sdk.d.mts +2 -2
  43. package/dist/sync-chat-sdk.mjs +2 -2
  44. package/dist/sync-github.d.mts +2 -2
  45. package/dist/sync-github.mjs +3 -3
  46. package/dist/sync-linear.d.mts +2 -2
  47. package/dist/sync-linear.mjs +3 -3
  48. package/dist/sync-slack.d.mts +20 -3
  49. package/dist/sync-slack.mjs +35 -11
  50. package/dist/sync.d.mts +1 -1
  51. package/dist/sync.mjs +2 -2
  52. package/dist/{tags-D0qra0Qy.mjs → tags-CxDCF_tt.mjs} +1 -1
  53. package/dist/{task-batch-9lVDG3d-.mjs → task-batch-CE6BKnRw.mjs} +3 -3
  54. package/dist/{tokens-C-iK0Cku.mjs → tokens-DnDHSPml.mjs} +28 -5
  55. package/dist/{version-C70RLVEK.mjs → version-DWvOShz3.mjs} +1 -1
  56. package/docs/01-board/01-mounting.md +1 -1
  57. package/docs/01-board/07-schedules.md +1 -1
  58. package/docs/02-sync/01-overview.md +3 -3
  59. package/docs/02-sync/03-slack.md +4 -3
  60. package/docs/03-guides/01-coding-agents.md +1 -1
  61. package/docs/04-reference/01-cli.md +19 -14
  62. package/docs/index.md +1 -1
  63. package/package.json +14 -2
  64. package/dist/inspect-UCcPViyA.mjs +0 -2
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ <http://www.apache.org/licenses/>
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Vercel Inc.
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -61,7 +61,7 @@ In a linked Vercel project, the CLI talks to the team's board in Vercel's API,
61
61
  the team `vercel link` names. Install the collaboration skill for your agents:
62
62
 
63
63
  ```bash
64
- npx skills add vercel-labs/board --skill board -g
64
+ npx skills add vercel/board --skill board -g
65
65
  ```
66
66
 
67
67
  `BOARD_URL`, or `--url <url>` for one command, points at a board at a URL
@@ -105,7 +105,7 @@ sync: {
105
105
  }
106
106
  ```
107
107
 
108
- Board messages post to Slack under their author's name (`Julián Benegas`,
108
+ Board messages post to Slack under their author's name (`Ada Lovelace`,
109
109
  `claude via julian`) when the app has `chat:write.customize` and the board
110
110
  verified who they are: always on Vercel's board. Your Slack account
111
111
  is an actor of its own, and a Slack ping comes in as your Slack handle:
@@ -146,3 +146,7 @@ new root's thread; a function that calls neither sends nothing.
146
146
  any Chat SDK adapter. Providers own stable native event identity; functions receive a
147
147
  durable `event.id` for their own idempotency. See the [sync contract](../../SPEC.md#sync-functions-and-default-imports)
148
148
  for the function lifecycle, required SDK client operations, and extension examples.
149
+
150
+ ## License
151
+
152
+ [Apache-2.0](./LICENSE)
package/dist/access.mjs CHANGED
@@ -2,5 +2,5 @@ import { a as CAN_MAX } from "./schemas-CUSTEFIy.mjs";
2
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-BbgmsAFF.mjs";
3
3
  import { D as grantAccess, E as explainGrants, t as DEFAULT_CAN } from "./auth-DJDTfgAL.mjs";
4
4
  import { a as resolveActor } from "./actors-CX2D22hL.mjs";
5
- import { t as oidcTokens } from "./tokens-C-iK0Cku.mjs";
5
+ import { t as oidcTokens } from "./tokens-DnDHSPml.mjs";
6
6
  export { CAN_MAX, DEFAULT_CAN, FULL_ACCESS, InvalidCan, PERMISSIONS, checkGrantChange, compileAccess, explainGrants, grantAccess, oidcTokens, parseCan, resolveActor, union };
@@ -1,7 +1,7 @@
1
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
2
  import { l as Known, o as Granted, p as StoredGrant, t as Authenticate } from "./auth-Z9-Khvvw.mjs";
3
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
+ import { m as SyncProvider } from "./provider-BgUS6ZpP.mjs";
5
5
  import { z } from "zod";
6
6
  //#region src/server/sandbox.d.ts
7
7
  /** How a rule matches a value: a regular expression (RE2), or the value exactly. */
@@ -763,7 +763,12 @@ type BoardOptions = PolicyOptions & (BackendOptions | DefaultOptions) & {
763
763
  * deployment `sync` in those channels.
764
764
  */
765
765
  sync?: Record<string, SyncProvider>;
766
- /** The board's public URL, which every token's audience must equal. Inferred from requests otherwise. */
766
+ /**
767
+ * The board's public URL, which every token's audience must equal. Inferred from requests
768
+ * otherwise only on Vercel, which routes a request to a deployment only for its own domains, and
769
+ * in development: elsewhere a request's sender chooses its Host, so a production board without
770
+ * one verifies no tokens.
771
+ */
767
772
  url?: string;
768
773
  /** The mount path, e.g. `/api/board`. Inferred from requests otherwise: the shallowest one they show. */
769
774
  basePath?: string;
@@ -1,4 +1,4 @@
1
- import { t as Backend } from "./backend-CcaaS9Xl.mjs";
1
+ import { t as Backend } from "./backend-C2JUnbm5.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-BVSFSSYf.mjs";
1
+ import { t as local } from "./local-DjrvtIoE.mjs";
2
2
  export { local };
@@ -1,5 +1,5 @@
1
- import "./external-D2jq_DEQ.mjs";
2
- import { c as SyncProvider, s as ResolvedTarget } from "./events-BdOCmnZh.mjs";
1
+ import "./external-DkWafjn-.mjs";
2
+ import { c as SyncProvider, s as ResolvedTarget } from "./events-mWKc1uvZ.mjs";
3
3
  import { createHash } from "node:crypto";
4
4
  import { AsyncLocalStorage } from "node:async_hooks";
5
5
  import { Chat, stringifyMarkdown } from "chat";
@@ -200,7 +200,8 @@ var ChatSyncProvider = class extends SyncProvider {
200
200
  const message = input.message;
201
201
  const location = `${key}:${this.toNative(message.threadId)}|${message.id}`;
202
202
  if (input.kind === "message") return `message:${location}`;
203
- return `edited:${location}|${createHash("sha256").update(message.text).digest("base64url")}`;
203
+ const at = message.metadata?.editedAt ? new Date(message.metadata.editedAt).getTime() : NaN;
204
+ return `edited:${location}|${createHash("sha256").update(message.text).digest("base64url")}${Number.isFinite(at) ? `|${at}` : ""}`;
204
205
  }
205
206
  author(author, raw) {
206
207
  return this.transport.author?.(author, raw) ?? externalAuthor(this.platform, author);
@@ -1,5 +1,5 @@
1
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";
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-BgUS6ZpP.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,5 +1,5 @@
1
- import { f as Board } from "./backend-CcaaS9Xl.mjs";
2
- import "./index-_KxJu15n.mjs";
1
+ import { f as Board } from "./backend-C2JUnbm5.mjs";
2
+ import "./index-DpuOtt0J.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
@@ -65,10 +65,13 @@ export declare function commandWord(argv: string[]): string | undefined;
65
65
  * misuse never refreshes a login or looks a team up. With `fetch`, board's requests to Vercel's API
66
66
  * with that login go through the app's own, which adds its credentials (a DPoP proof, say).
67
67
  *
68
+ * The app says who its commands run as: its `login` is the one that goes, wherever the app runs,
69
+ * and nothing the environment holds goes ahead of it, a deployment's own token and `BOARD_TOKEN`
70
+ * included. Those are `vb`'s to send, and this CLI's only when the app gives it no login.
71
+ *
68
72
  * `token` is a Vercel token someone passed the app for this run, as `vercel board --token` takes
69
- * one: the login to use, in place of `login` and ahead of everything the environment holds, a
70
- * deployment's own token and `BOARD_TOKEN` included. A variable never goes ahead of those. Board
71
- * sends it itself, as a Bearer token, never through `fetch`, which would add the app's own login's.
73
+ * one: the login to use in place of `login`. Board sends it itself, as a Bearer token, never
74
+ * through `fetch`, which would add the app's own login's.
72
75
  */
73
76
  export declare function createApp(options: {
74
77
  appName: string;
@@ -1,5 +1,5 @@
1
- import { a as stoppedBy } from "./exports-CuD-Mxkw.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-B016auoG.mjs";
1
+ import { o as stoppedBy } from "./exports-DRId1Cks.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-VTkjxFcG.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
@@ -15,10 +15,13 @@ import { a as commandLine, c as failureLines, i as mainWith, l as formatFailure,
15
15
  * misuse never refreshes a login or looks a team up. With `fetch`, board's requests to Vercel's API
16
16
  * with that login go through the app's own, which adds its credentials (a DPoP proof, say).
17
17
  *
18
+ * The app says who its commands run as: its `login` is the one that goes, wherever the app runs,
19
+ * and nothing the environment holds goes ahead of it, a deployment's own token and `BOARD_TOKEN`
20
+ * included. Those are `vb`'s to send, and this CLI's only when the app gives it no login.
21
+ *
18
22
  * `token` is a Vercel token someone passed the app for this run, as `vercel board --token` takes
19
- * one: the login to use, in place of `login` and ahead of everything the environment holds, a
20
- * deployment's own token and `BOARD_TOKEN` included. A variable never goes ahead of those. Board
21
- * sends it itself, as a Bearer token, never through `fetch`, which would add the app's own login's.
23
+ * one: the login to use in place of `login`. Board sends it itself, as a Bearer token, never
24
+ * through `fetch`, which would add the app's own login's.
22
25
  */
23
26
  function createApp(options) {
24
27
  const { appName, onError, onWarning, login, token, team, fetch } = options;
package/dist/cli.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { a as option } from "./commands-nN8WpvCe.mjs";
3
- import { g as projectDir } from "./server-ViWNvg5q.mjs";
4
- import { r as main } from "./main-B016auoG.mjs";
5
- import { i as createInspector, r as stopped, t as allowedHosts } from "./inspect-CZeoSm7E.mjs";
3
+ import { g as projectDir } from "./server-BLQxoL0g.mjs";
4
+ import { r as main } from "./main-VTkjxFcG.mjs";
5
+ import { i as createInspector, r as stopped, t as allowedHosts } from "./inspect-DSBG5VDl.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-UCcPViyA.mjs")).inspect(context);
40
+ return (await import("./inspect-DLLoYeg7.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-B10e7QaY.mjs");
84
+ const { serveLocal } = await import("./serve-C2xn_cQV.mjs");
85
85
  const local = await serveLocal({
86
86
  dir: flags.dir ?? join(root, ".board"),
87
87
  hosts,
@@ -1,4 +1,4 @@
1
- import "./routes-BE0y6wCk.mjs";
1
+ import "./routes-BSBUdD2X.mjs";
2
2
  import { f as BoardError } from "./errors-DYF4hhIc.mjs";
3
3
  import { c as canonical, t as block } from "./blocks-CVoBC7ur.mjs";
4
4
  import { a as canText, c as compileAccess } from "./access-BbgmsAFF.mjs";
@@ -1,4 +1,4 @@
1
- import { f as Board } from "./backend-CcaaS9Xl.mjs";
1
+ import { f as Board } from "./backend-C2JUnbm5.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-Cr-umDl0.mjs";
1
+ import { t as conformance } from "./conformance-jHhuKZe8.mjs";
2
2
  export { conformance };
@@ -1,11 +1,11 @@
1
1
  import { c as fileSize, i as ATTACHMENT_BYTES_MAX, o as IMPORT_BYTES_MAX, u as typeOf } from "./profile-header-Cj0Cb1cf.mjs";
2
2
  import { P as toStorable, m as MESSAGE_TEXT_MAX, s as ChannelPath } from "./schemas-CUSTEFIy.mjs";
3
- import { l as isThreadTarget, s as channelOf } from "./external-D2jq_DEQ.mjs";
3
+ import { l as isThreadTarget, s as channelOf } from "./external-DkWafjn-.mjs";
4
4
  import { t as canonicalEmoji } from "./emoji-CTLpvH-A.mjs";
5
5
  import { c as notFound, r as badRequest, t as HttpError } from "./errors-DYF4hhIc.mjs";
6
6
  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-DUKIITFZ.mjs";
7
7
  import { a as replaceMentions, n as isEmail, t as extractMentions } from "./mentions-CnWt9Z5b.mjs";
8
- 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-BdOCmnZh.mjs";
8
+ 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-mWKc1uvZ.mjs";
9
9
  import { i as vercelDeployments, n as displayText, t as byVercelBot } from "./bots-CqPYxkqK.mjs";
10
10
  //#region src/sync/engine.ts
11
11
  /** `files`: a message with files may have no text. */
@@ -45,6 +45,8 @@ const sameLinks = (a, b) => a.length === b.length && a.every((link, i) => linkKe
45
45
  const FILE_ATTEMPTS = 3;
46
46
  /** How long a platform's answer to who has an email holds, for `@[ada@vercel.com]`: a busy thread asks once. */
47
47
  const EMAIL_TTL_MS = 3e5;
48
+ /** How many `@[email]`s one message has looked up on a platform: each is a call to it, and a message holds thousands. */
49
+ const EMAIL_LOOKUPS_PER_MESSAGE_MAX = 10;
48
50
  /** How long a webhook waits for the board's tables before it lets an event into the inbox anyway: platforms resend after about 3 seconds. */
49
51
  const GATE_WAIT_MS = 2e3;
50
52
  /**
@@ -946,14 +948,19 @@ function createSyncEngine(entries) {
946
948
  * A message's text for a platform, through entry `key`. A mention is `@[actor-id]`, settled when
947
949
  * the message was written: it reads natively when the actor is one of this entry's own users
948
950
  * (`@[slack:user:U0456]` also naming this sync's own profile of them), and as the actor's name
949
- * otherwise. An `@[email]` is whoever the platform finds with it, or the email. Everything else
951
+ * otherwise. An `@[email]` is whoever the platform finds with it, or the email, for the first 10
952
+ * a message names. Everything else
950
953
  * is text and goes as written, an `@handle` included: no sync reads one as a mention.
951
954
  */
952
955
  async function textFor(key, actors, text) {
953
956
  const exact = extractMentions(text).flatMap((token) => token.kind === "actor" ? [token.actor] : []);
954
957
  if (exact.length === 0) return text;
955
958
  const found = /* @__PURE__ */ new Map();
956
- for (const named of exact) if (!actors.byId[named] && isEmail(named)) found.set(named, await emailMention(key, named));
959
+ let asked = 0;
960
+ for (const named of exact) {
961
+ if (actors.byId[named] || !isEmail(named) || found.has(named)) continue;
962
+ found.set(named, asked++ < EMAIL_LOOKUPS_PER_MESSAGE_MAX ? await emailMention(key, named) : null);
963
+ }
957
964
  return replaceMentions(text, (token) => {
958
965
  if (token.kind === "handle") return null;
959
966
  if (found.has(token.actor)) return found.get(token.actor) ?? token.actor;
@@ -1057,7 +1064,8 @@ function createSyncEngine(entries) {
1057
1064
  const { markdown, ...rest } = await render(key, target, message, actors, renderer);
1058
1065
  return {
1059
1066
  markdown: message.attachments.length > 0 && (noted || !platformOf(key).uploadsFiles) ? `${markdown}\n${attachmentNotes(message)}` : markdown,
1060
- ...rest
1067
+ ...rest,
1068
+ external: message.from !== null && message.from !== "board"
1061
1069
  };
1062
1070
  };
1063
1071
  async function postReply(message, target, externalThread, actors, renderer) {
@@ -1,5 +1,5 @@
1
1
  import { _ as NewLabels, d as LabelKey } from "./schemas-CUSTEFIy.mjs";
2
- import { n as ExternalEvent, r as ExternalLocation } from "./external-D2jq_DEQ.mjs";
2
+ import { n as ExternalEvent, r as ExternalLocation } from "./external-DkWafjn-.mjs";
3
3
  import { z } from "zod";
4
4
  //#region src/sync/fn.ts
5
5
  const ROUTES = Symbol.for("board.syncRoutes");