@vercel/board 0.0.0 → 0.16.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 (126) hide show
  1. package/README.md +180 -0
  2. package/dist/a2-C41hD8SF.mjs +3045 -0
  3. package/dist/a2-D24cvwpN.d.mts +3359 -0
  4. package/dist/access-CJU2-vaa.mjs +226 -0
  5. package/dist/access-CV96SYgr.d.mts +32 -0
  6. package/dist/access.d.mts +30 -0
  7. package/dist/access.mjs +4 -0
  8. package/dist/actors-DjMeZpnU.mjs +224 -0
  9. package/dist/attempts-Bxp9KgPf.mjs +919 -0
  10. package/dist/auth-COzc09sn.mjs +276 -0
  11. package/dist/auth-CU56Q2Xh.d.mts +204 -0
  12. package/dist/backend-a2/blob-vercel.d.mts +8 -0
  13. package/dist/backend-a2/blob-vercel.mjs +81 -0
  14. package/dist/backend-a2/contract.d.mts +18 -0
  15. package/dist/backend-a2/contract.mjs +5 -0
  16. package/dist/backend-a2/scheduler-local.d.mts +11 -0
  17. package/dist/backend-a2/scheduler-local.mjs +2 -0
  18. package/dist/backend-a2/scheduler-qstash.d.mts +2 -0
  19. package/dist/backend-a2/scheduler-qstash.mjs +2 -0
  20. package/dist/backend-a2/scheduler-vercel.d.mts +2 -0
  21. package/dist/backend-a2/scheduler-vercel.mjs +2 -0
  22. package/dist/backend-a2/store-memory.d.mts +11 -0
  23. package/dist/backend-a2/store-memory.mjs +19 -0
  24. package/dist/backend-a2/store-postgres.d.mts +38 -0
  25. package/dist/backend-a2/store-postgres.mjs +110 -0
  26. package/dist/backend-a2/store-redis-http.d.mts +17 -0
  27. package/dist/backend-a2/store-redis-http.mjs +32 -0
  28. package/dist/backend-a2/store-redis.d.mts +23 -0
  29. package/dist/backend-a2/store-redis.mjs +39 -0
  30. package/dist/backend-a2/store-sqlite.d.mts +12 -0
  31. package/dist/backend-a2/store-sqlite.mjs +31 -0
  32. package/dist/backend-a2.d.mts +4 -0
  33. package/dist/backend-a2.mjs +2 -0
  34. package/dist/backend-http-0roEmjl0.mjs +613 -0
  35. package/dist/backend-http-BVRno-ca.mjs +469 -0
  36. package/dist/backend-http-Bid7RIpC.d.mts +630 -0
  37. package/dist/backend-http.d.mts +10 -0
  38. package/dist/backend-http.mjs +2 -0
  39. package/dist/backend-http.node.d.mts +10 -0
  40. package/dist/backend-http.node.mjs +2 -0
  41. package/dist/blob-C0J3wbGv.d.mts +39 -0
  42. package/dist/bots-CGkO76qH.mjs +67 -0
  43. package/dist/chat-provider-XCnQlxq6.d.mts +140 -0
  44. package/dist/chat-provider-jFSeyNmB.mjs +389 -0
  45. package/dist/cli.d.mts +1 -0
  46. package/dist/cli.mjs +2252 -0
  47. package/dist/client-DGDPaN7U.mjs +380 -0
  48. package/dist/conformance-DRR23YNy.mjs +512 -0
  49. package/dist/conformance.d.mts +30 -0
  50. package/dist/conformance.mjs +2 -0
  51. package/dist/contract-CuJmlrhw.mjs +566 -0
  52. package/dist/emoji-CTLpvH-A.mjs +445 -0
  53. package/dist/engine-Bir5s8ts.mjs +1449 -0
  54. package/dist/errors-DX3hpwWt.mjs +64 -0
  55. package/dist/exports-DLiE7fLY.d.mts +4 -0
  56. package/dist/exports-Dvc1o52I.mjs +1285 -0
  57. package/dist/files-SniSmeEr.mjs +47 -0
  58. package/dist/index.d.mts +13 -0
  59. package/dist/index.default-Bkg77Pxn.mjs +12 -0
  60. package/dist/index.mjs +19 -0
  61. package/dist/index.node.d.mts +14 -0
  62. package/dist/index.node.mjs +5 -0
  63. package/dist/inspect/app.js +416 -0
  64. package/dist/inspect/engine.js +5 -0
  65. package/dist/local-Cr_dSjvs.mjs +44 -0
  66. package/dist/own-OwgPWdmh.mjs +15 -0
  67. package/dist/project-CFiArraX.mjs +124 -0
  68. package/dist/provider-BGjz-mDa.d.mts +2473 -0
  69. package/dist/provider-CuewcDNZ.mjs +205 -0
  70. package/dist/redis-tables-B35vv4CZ.mjs +842 -0
  71. package/dist/reducers-B_vUGQRp.d.mts +1172 -0
  72. package/dist/reducers-mUPFuFJV.mjs +293 -0
  73. package/dist/schemas-Be08nyfW.mjs +74 -0
  74. package/dist/schemas-CWxs3ECJ.d.mts +50 -0
  75. package/dist/serve-BsOOc-6_.mjs +170 -0
  76. package/dist/server-jwPY7_wi.mjs +17 -0
  77. package/dist/serving-BNbzc96L.mjs +2 -0
  78. package/dist/sql-DbiEnqM0.mjs +571 -0
  79. package/dist/sqlite-db-Cbj03vmp.mjs +70 -0
  80. package/dist/sync-github.d.mts +473 -0
  81. package/dist/sync-github.mjs +603 -0
  82. package/dist/sync-kapso.d.mts +175 -0
  83. package/dist/sync-kapso.mjs +86 -0
  84. package/dist/sync-slack.d.mts +364 -0
  85. package/dist/sync-slack.mjs +728 -0
  86. package/dist/sync.chat.d.mts +2 -0
  87. package/dist/sync.chat.mjs +2 -0
  88. package/dist/sync.d.mts +3 -0
  89. package/dist/sync.mjs +4 -0
  90. package/dist/targets-yM5JBUgr.mjs +94 -0
  91. package/dist/tokens-DKLn5P9B.mjs +256 -0
  92. package/dist/types-BHCjTZdB.d.mts +104 -0
  93. package/dist/users-Dls7_ANV.mjs +42 -0
  94. package/dist/watch-spec-W0c7ypHJ.mjs +787 -0
  95. package/dist/watchers-hash-CLjsa6od.mjs +225 -0
  96. package/docs/01-board/01-mounting.md +506 -0
  97. package/docs/01-board/02-database.md +258 -0
  98. package/docs/01-board/03-identity.md +264 -0
  99. package/docs/01-board/04-messages.md +192 -0
  100. package/docs/01-board/05-reading.md +177 -0
  101. package/docs/01-board/06-watchers.md +249 -0
  102. package/docs/01-board/07-schedules.md +133 -0
  103. package/docs/01-board/08-middleware.md +139 -0
  104. package/docs/01-board/09-access.md +501 -0
  105. package/docs/01-quickstart.md +196 -0
  106. package/docs/02-sync/01-overview.md +290 -0
  107. package/docs/02-sync/02-callbacks.md +265 -0
  108. package/docs/02-sync/03-slack.md +248 -0
  109. package/docs/02-sync/04-github.md +201 -0
  110. package/docs/02-sync/05-whatsapp.md +148 -0
  111. package/docs/02-sync/06-providers.md +228 -0
  112. package/docs/03-guides/01-coding-agents.md +226 -0
  113. package/docs/03-guides/02-inspector.md +104 -0
  114. package/docs/03-guides/03-ci.md +251 -0
  115. package/docs/03-guides/04-triage.md +233 -0
  116. package/docs/03-guides/05-agent-factory.md +142 -0
  117. package/docs/04-reference/01-cli.md +606 -0
  118. package/docs/04-reference/02-board.md +579 -0
  119. package/docs/04-reference/03-http.md +489 -0
  120. package/docs/04-reference/04-log.md +250 -0
  121. package/docs/04-reference/05-conformance.md +97 -0
  122. package/docs/index.md +186 -0
  123. package/package.json +168 -1
  124. package/sql/postgres/board.sql +145 -0
  125. package/sql/postgres/notifications.sql +24 -0
  126. package/sql/postgres/schema.sql +451 -0
@@ -0,0 +1,630 @@
1
+ import { i as Attachment } from "./schemas-CWxs3ECJ.mjs";
2
+ import { t as Actor } from "./reducers-B_vUGQRp.mjs";
3
+ import { Bt as SyncCodeView, G as Discovery, Gt as SyncFindView, Ht as SyncCopiesView, Ot as ScheduleView, Pt as SourceRead, Q as IdentityView, St as RegistrationView, U as ChannelView, Zt as SyncThreadView, ct as MatchView, dt as MessageView, en as ThreadView, et as InboxEntry, ft as MessagesPage, ht as PersonView, j as ProfileOption, q as EventsPage, sn as UploadTicket, st as LinkedAccount, tn as ThreadsPage, tt as InboxItem, ut as Me } from "./provider-BGjz-mDa.mjs";
4
+ import { a as BackendRoute, o as BoardBinding, s as Caller } from "./a2-D24cvwpN.mjs";
5
+ //#region src/server/backend-http.d.ts
6
+ type HttpOptions = {
7
+ /**
8
+ * How requests reach the board, with the credentials it recognizes. In Node it defaults to what
9
+ * `vb` uses: a token from `BOARD_TOKEN`, `vb serve`'s, GitHub Actions, Vercel, or `vercel login`,
10
+ * through Deployment Protection. In a browser, `fetch`, sending the page's own session (a cookie,
11
+ * say), which the board's `authenticate` recognizes.
12
+ */
13
+ fetch?: typeof fetch;
14
+ };
15
+ /**
16
+ * What finds a board and reaches it, in the Node build: the environment, its files, and
17
+ * `vercel login`. A browser has none.
18
+ */
19
+ type Environment = {
20
+ /** The board the environment points at. Throws `no_board` when it points at none. */
21
+ url(): string;
22
+ /** The fetch for the board at `url` when none is given: the credentials `vb` uses, through Deployment Protection. */
23
+ fetch(url: string): typeof fetch;
24
+ /** The profile the environment picks (`BOARD_AS`, or the coding agent it runs in), and that agent's session. */
25
+ profile(): {
26
+ profile: ProfileOption;
27
+ session: string | null;
28
+ };
29
+ };
30
+ /**
31
+ * Another board that speaks the protocol, at `url` (in Node, the one the environment points at
32
+ * by default): this board keeps nothing, and this deployment reads and writes that one as itself.
33
+ * Its watchers' tails are registered there. The remote wakes it when one matches, with nothing in
34
+ * the wake-up but a hash, and it pulls what matched with its own credentials, runs it, and acks
35
+ * it. When it can't be woken (no https URL of its own: a dev server, say), it pulls on its own.
36
+ */
37
+ declare function createHttp(url: string | undefined, options: HttpOptions, environment: Environment | null): {
38
+ discovery: (caller: Caller, input: {
39
+ [x: string]: never;
40
+ }, signal: AbortSignal) => Promise<Discovery>;
41
+ me: (caller: Caller, input: {
42
+ [x: string]: never;
43
+ }, signal: AbortSignal) => Promise<Me>;
44
+ channels: (caller: Caller, input: {
45
+ [x: string]: never;
46
+ }, signal: AbortSignal) => Promise<{
47
+ channels: ChannelView[];
48
+ cursor: string;
49
+ }>;
50
+ actors: (caller: Caller, input: {
51
+ [x: string]: never;
52
+ }, signal: AbortSignal) => Promise<{
53
+ actors: (Actor & {
54
+ person?: PersonView;
55
+ })[];
56
+ cursor: string;
57
+ }>;
58
+ identity: (caller: Caller, input: {
59
+ [x: string]: never;
60
+ }, signal: AbortSignal) => Promise<IdentityView>;
61
+ messages: (caller: Caller, input: {
62
+ channel?: string | undefined;
63
+ re?: string | undefined;
64
+ by?: string | undefined;
65
+ mentions?: string | undefined;
66
+ label?: (readonly [string, null] | readonly [string, string[]])[] | undefined;
67
+ from?: string | undefined;
68
+ text?: string | undefined;
69
+ after?: string | undefined;
70
+ before?: string | undefined;
71
+ limit?: number | undefined;
72
+ }, signal: AbortSignal) => Promise<MessagesPage>;
73
+ threads: (caller: Caller, input: {
74
+ channel?: string | undefined;
75
+ re?: string | undefined;
76
+ by?: string | undefined;
77
+ mentions?: string | undefined;
78
+ label?: (readonly [string, null] | readonly [string, string[]])[] | undefined;
79
+ from?: string | undefined;
80
+ text?: string | undefined;
81
+ after?: string | undefined;
82
+ limit?: number | undefined;
83
+ }, signal: AbortSignal) => Promise<ThreadsPage>;
84
+ message: (caller: Caller, input: {
85
+ id: string;
86
+ }, signal: AbortSignal) => Promise<ThreadView>;
87
+ post: (caller: Caller, input: {
88
+ channel?: string | undefined;
89
+ re?: string | undefined;
90
+ text: string;
91
+ labels?: Record<string, string> | undefined;
92
+ noSync?: boolean | undefined;
93
+ sync?: (string | {
94
+ target: string;
95
+ kind: "channel" | "thread";
96
+ })[] | undefined;
97
+ id?: string | undefined;
98
+ attachments?: string[] | undefined;
99
+ }, signal: AbortSignal) => Promise<{
100
+ message: MessageView;
101
+ unknownMentions?: string[];
102
+ }>;
103
+ posted: (caller: Caller, input: {
104
+ id: string;
105
+ }, signal: AbortSignal) => Promise<{
106
+ message: MessageView;
107
+ }>;
108
+ edit: (caller: Caller, input: {
109
+ id: string;
110
+ } & {
111
+ text: string;
112
+ }, signal: AbortSignal) => Promise<{
113
+ ok: true;
114
+ unknownMentions?: string[];
115
+ }>;
116
+ delete: (caller: Caller, input: {
117
+ id: string;
118
+ }, signal: AbortSignal) => Promise<{
119
+ ok: true;
120
+ }>;
121
+ react: (caller: Caller, input: {
122
+ id: string;
123
+ } & {
124
+ emoji: string;
125
+ remove?: boolean | undefined;
126
+ }, signal: AbortSignal) => Promise<{
127
+ ok: true;
128
+ }>;
129
+ label: (caller: Caller, input: {
130
+ id: string;
131
+ } & {
132
+ set?: Record<string, string> | undefined;
133
+ unset?: string[] | undefined;
134
+ }, signal: AbortSignal) => Promise<{
135
+ ok: true;
136
+ }>;
137
+ schedule: (caller: Caller, input: {
138
+ channel?: string | undefined;
139
+ re?: string | undefined;
140
+ text: string;
141
+ labels?: Record<string, string> | undefined;
142
+ noSync?: boolean | undefined;
143
+ attachments?: string[] | undefined;
144
+ in?: string | undefined;
145
+ at?: string | undefined;
146
+ every?: string | undefined;
147
+ until?: string | undefined;
148
+ for?: string | undefined;
149
+ times?: number | undefined;
150
+ }, signal: AbortSignal) => Promise<{
151
+ schedule: ScheduleView;
152
+ unknownMentions?: string[];
153
+ }>;
154
+ schedules: (caller: Caller, input: {
155
+ re?: string | undefined;
156
+ channel?: string | undefined;
157
+ by?: string | undefined;
158
+ all?: boolean | undefined;
159
+ }, signal: AbortSignal) => Promise<{
160
+ schedules: ScheduleView[];
161
+ }>;
162
+ cancelSchedule: (caller: Caller, input: {
163
+ id: string;
164
+ }, signal: AbortSignal) => Promise<{
165
+ schedule: ScheduleView;
166
+ canceled: boolean;
167
+ }>;
168
+ upload: (caller: Caller, input: {
169
+ data: Uint8Array;
170
+ name: string | null;
171
+ type: string | null;
172
+ }, signal: AbortSignal) => Promise<{
173
+ attachment: Attachment;
174
+ }>;
175
+ attachment: (caller: Caller, input: {
176
+ id: string;
177
+ }, signal: AbortSignal) => Promise<{
178
+ attachment: Attachment;
179
+ data: Uint8Array | ReadableStream<Uint8Array>;
180
+ }>;
181
+ uploadStart: (caller: Caller, input: {
182
+ name?: string | null | undefined;
183
+ type?: string | null | undefined;
184
+ size: number;
185
+ }, signal: AbortSignal) => Promise<UploadTicket>;
186
+ uploadFinish: (caller: Caller, input: {
187
+ id: string;
188
+ }, signal: AbortSignal) => Promise<{
189
+ attachment: Attachment;
190
+ }>;
191
+ watchers: (caller: Caller, input: {
192
+ [x: string]: never;
193
+ }, signal: AbortSignal) => Promise<{
194
+ watchers: RegistrationView[];
195
+ }>;
196
+ register: (caller: Caller, input: {
197
+ url?: string | null | undefined;
198
+ watch: Record<string, {
199
+ tail: string;
200
+ when: "enters" | "matches";
201
+ }>;
202
+ sync?: {
203
+ key: string;
204
+ platform: string;
205
+ signIn: boolean;
206
+ }[] | undefined;
207
+ }, signal: AbortSignal) => Promise<RegistrationView>;
208
+ matches: (caller: Caller, input: {
209
+ limit?: number | undefined;
210
+ wait?: number | undefined;
211
+ }, signal: AbortSignal) => Promise<{
212
+ matches: MatchView[];
213
+ }>;
214
+ ack: (caller: Caller, input: {
215
+ id: string;
216
+ } & {
217
+ lease: string;
218
+ error?: string | undefined;
219
+ skip?: boolean | undefined;
220
+ }, signal: AbortSignal) => Promise<{
221
+ ok: true;
222
+ }>;
223
+ events: (caller: Caller, input: {
224
+ channel?: string | undefined;
225
+ re?: string | undefined;
226
+ by?: string | undefined;
227
+ mentions?: string | undefined;
228
+ label?: (readonly [string, null] | readonly [string, string[]])[] | undefined;
229
+ from?: string | undefined;
230
+ text?: string | undefined;
231
+ after?: string | undefined;
232
+ wait?: number | undefined;
233
+ all?: boolean | undefined;
234
+ }, signal: AbortSignal) => Promise<EventsPage>;
235
+ typing: (caller: Caller, input: {
236
+ id: string;
237
+ } & {
238
+ status?: string | undefined;
239
+ }, signal: AbortSignal) => Promise<{
240
+ targets: string[];
241
+ }>;
242
+ readSource: (caller: Caller, input: {
243
+ key: string;
244
+ } & {
245
+ target: string;
246
+ limit?: number | undefined;
247
+ }, signal: AbortSignal) => Promise<SourceRead>;
248
+ syncImport: (caller: Caller, input: {
249
+ author: {
250
+ id: string;
251
+ handle: string;
252
+ name: string;
253
+ isBot: boolean;
254
+ avatar: string | null;
255
+ };
256
+ from: string | null;
257
+ op: "post";
258
+ origin: {
259
+ channel?: string | undefined;
260
+ thread: string;
261
+ subthread: string | null;
262
+ message: string;
263
+ context: string | null;
264
+ } | null;
265
+ source?: {
266
+ key: string;
267
+ channel: string;
268
+ thread: string;
269
+ } | undefined;
270
+ channel?: string | undefined;
271
+ re?: string | undefined;
272
+ text: string;
273
+ labels?: Record<string, string> | undefined;
274
+ noSync?: boolean | undefined;
275
+ attachments?: string[] | undefined;
276
+ links?: {
277
+ url: string;
278
+ snapshot: {
279
+ author: string;
280
+ text: string;
281
+ createdAt: string | null;
282
+ files: {
283
+ name: string;
284
+ url: string | null;
285
+ }[];
286
+ } | null;
287
+ unavailable: string | null;
288
+ message: string | null;
289
+ }[] | undefined;
290
+ id?: string | undefined;
291
+ } | {
292
+ author: {
293
+ id: string;
294
+ handle: string;
295
+ name: string;
296
+ isBot: boolean;
297
+ avatar: string | null;
298
+ };
299
+ from: string | null;
300
+ origin?: {
301
+ thread: string;
302
+ message?: string | undefined;
303
+ } | undefined;
304
+ message?: string | undefined;
305
+ op: "edit";
306
+ text: string;
307
+ source?: {
308
+ key: string;
309
+ channel: string;
310
+ thread: string;
311
+ } | undefined;
312
+ } | {
313
+ author: {
314
+ id: string;
315
+ handle: string;
316
+ name: string;
317
+ isBot: boolean;
318
+ avatar: string | null;
319
+ };
320
+ from: string | null;
321
+ origin?: {
322
+ thread: string;
323
+ message?: string | undefined;
324
+ } | undefined;
325
+ message?: string | undefined;
326
+ op: "delete";
327
+ } | {
328
+ author: {
329
+ id: string;
330
+ handle: string;
331
+ name: string;
332
+ isBot: boolean;
333
+ avatar: string | null;
334
+ };
335
+ from: string | null;
336
+ origin?: {
337
+ thread: string;
338
+ message?: string | undefined;
339
+ } | undefined;
340
+ message?: string | undefined;
341
+ op: "react";
342
+ emoji: string;
343
+ remove?: boolean | undefined;
344
+ } | {
345
+ author: {
346
+ id: string;
347
+ handle: string;
348
+ name: string;
349
+ isBot: boolean;
350
+ avatar: string | null;
351
+ };
352
+ from: string | null;
353
+ origin?: {
354
+ thread: string;
355
+ message?: string | undefined;
356
+ } | undefined;
357
+ message?: string | undefined;
358
+ op: "labels";
359
+ set?: Record<string, string> | undefined;
360
+ unset?: string[] | undefined;
361
+ } | {
362
+ author: {
363
+ id: string;
364
+ handle: string;
365
+ name: string;
366
+ isBot: boolean;
367
+ avatar: string | null;
368
+ };
369
+ from: string | null;
370
+ origin?: {
371
+ thread: string;
372
+ message?: string | undefined;
373
+ } | undefined;
374
+ message?: string | undefined;
375
+ op: "links";
376
+ links: {
377
+ url: string;
378
+ snapshot: {
379
+ author: string;
380
+ text: string;
381
+ createdAt: string | null;
382
+ files: {
383
+ name: string;
384
+ url: string | null;
385
+ }[];
386
+ } | null;
387
+ unavailable: string | null;
388
+ message: string | null;
389
+ }[];
390
+ } | {
391
+ op: "seen";
392
+ author: {
393
+ id: string;
394
+ handle: string;
395
+ name: string;
396
+ isBot: boolean;
397
+ avatar: string | null;
398
+ };
399
+ }, signal: AbortSignal) => Promise<{
400
+ message: string | null;
401
+ dropped?: string[];
402
+ }>;
403
+ syncReceipt: (caller: Caller, input: {
404
+ kind: "message";
405
+ message: string;
406
+ target: string;
407
+ external: {
408
+ thread: string;
409
+ message: string;
410
+ asUser?: true | undefined;
411
+ };
412
+ files?: string[] | null | undefined;
413
+ } | {
414
+ kind: "files";
415
+ message: string;
416
+ target: string;
417
+ files: string[] | null;
418
+ } | {
419
+ kind: "failed";
420
+ message: string;
421
+ target: string;
422
+ error: string;
423
+ } | {
424
+ kind: "thread";
425
+ message: string;
426
+ target: string;
427
+ targetKind: "channel" | "thread";
428
+ cause: "config" | "request";
429
+ }, signal: AbortSignal) => Promise<{
430
+ ok: true;
431
+ attached?: boolean;
432
+ }>;
433
+ syncThread: (caller: Caller, input: {
434
+ thread: string;
435
+ }, signal: AbortSignal) => Promise<SyncThreadView>;
436
+ syncFind: (caller: Caller, input: {
437
+ code?: string | undefined;
438
+ post?: string | undefined;
439
+ thread?: string | undefined;
440
+ message?: string | undefined;
441
+ account?: string | undefined;
442
+ person?: string | undefined;
443
+ }, signal: AbortSignal) => Promise<SyncFindView>;
444
+ syncCopies: (caller: Caller, input: {
445
+ message: string[];
446
+ }, signal: AbortSignal) => Promise<SyncCopiesView>;
447
+ syncRoots: (caller: Caller, input: {
448
+ by: string;
449
+ since: number;
450
+ }, signal: AbortSignal) => Promise<{
451
+ roots: MessageView[];
452
+ }>;
453
+ inboxPush: (caller: Caller, input: {
454
+ key: string;
455
+ } & {
456
+ events: {
457
+ id: string;
458
+ event: {
459
+ channel: string;
460
+ thread: string;
461
+ subthread: string | null;
462
+ kind: "message";
463
+ message: string;
464
+ isRoot: boolean;
465
+ text: string;
466
+ context: string | null;
467
+ author: {
468
+ id: string;
469
+ handle: string;
470
+ name: string;
471
+ avatar: string | null;
472
+ isBot: boolean;
473
+ };
474
+ files?: {
475
+ type: "audio" | "file" | "image" | "video";
476
+ name?: string | undefined;
477
+ mimeType?: string | undefined;
478
+ size?: number | undefined;
479
+ url?: string | undefined;
480
+ fetchMetadata?: Record<string, string> | undefined;
481
+ }[] | undefined;
482
+ links?: {
483
+ url: string;
484
+ thread: string;
485
+ message: string;
486
+ snapshot: {
487
+ author: string;
488
+ text: string;
489
+ createdAt: string | null;
490
+ files: {
491
+ name: string;
492
+ url: string | null;
493
+ }[];
494
+ } | null;
495
+ }[] | undefined;
496
+ } | {
497
+ channel: string;
498
+ thread: string;
499
+ subthread: string | null;
500
+ kind: "edited";
501
+ message: string;
502
+ text: string;
503
+ author: {
504
+ id: string;
505
+ handle: string;
506
+ name: string;
507
+ avatar: string | null;
508
+ isBot: boolean;
509
+ };
510
+ links?: {
511
+ url: string;
512
+ thread: string;
513
+ message: string;
514
+ snapshot: {
515
+ author: string;
516
+ text: string;
517
+ createdAt: string | null;
518
+ files: {
519
+ name: string;
520
+ url: string | null;
521
+ }[];
522
+ } | null;
523
+ }[] | undefined;
524
+ linksOnly?: boolean | undefined;
525
+ } | {
526
+ channel: string;
527
+ thread: string;
528
+ subthread: string | null;
529
+ kind: "deleted";
530
+ message: string;
531
+ } | {
532
+ channel: string;
533
+ thread: string;
534
+ subthread: string | null;
535
+ kind: "reaction";
536
+ message: string;
537
+ emoji: string;
538
+ added: boolean;
539
+ author: {
540
+ id: string;
541
+ handle: string;
542
+ name: string;
543
+ avatar: string | null;
544
+ isBot: boolean;
545
+ };
546
+ } | {
547
+ channel: string;
548
+ thread: string;
549
+ kind: "lifecycle";
550
+ type: string;
551
+ title: string;
552
+ url: string | null;
553
+ labels: Record<string, string>;
554
+ unset: string[];
555
+ owns?: string[] | undefined;
556
+ reply: string | null;
557
+ createRoot: boolean;
558
+ author: {
559
+ id: string;
560
+ handle: string;
561
+ name: string;
562
+ avatar: string | null;
563
+ isBot: boolean;
564
+ };
565
+ };
566
+ raw: unknown;
567
+ }[];
568
+ }, signal: AbortSignal) => Promise<{
569
+ ok: true;
570
+ }>;
571
+ inboxNext: (caller: Caller, input: {
572
+ key: string;
573
+ } & {
574
+ limit?: number | undefined;
575
+ }, signal: AbortSignal) => Promise<{
576
+ items: InboxItem[];
577
+ }>;
578
+ inboxAck: (caller: Caller, input: {
579
+ key: string;
580
+ } & {
581
+ id: string;
582
+ } & {
583
+ lease: string;
584
+ error?: string | undefined;
585
+ }, signal: AbortSignal) => Promise<{
586
+ ok: true;
587
+ }>;
588
+ inbox: (caller: Caller, input: {
589
+ key: string;
590
+ } & {
591
+ channel?: string | undefined;
592
+ limit?: number | undefined;
593
+ }, signal: AbortSignal) => Promise<{
594
+ events: InboxEntry[];
595
+ }>;
596
+ syncCode: (caller: Caller, input: {
597
+ sync: string;
598
+ }, signal: AbortSignal) => Promise<SyncCodeView>;
599
+ syncAccount: (caller: Caller, input: {
600
+ sync: string;
601
+ account: {
602
+ id: string;
603
+ handle: string;
604
+ name: string;
605
+ isBot: boolean;
606
+ avatar: string | null;
607
+ };
608
+ code: string;
609
+ message?: string | undefined;
610
+ method?: "code" | "consent" | undefined;
611
+ }, signal: AbortSignal) => Promise<{
612
+ person: string;
613
+ link: LinkedAccount;
614
+ }>;
615
+ syncUnlink: (caller: Caller, input: {
616
+ account: string;
617
+ }, signal: AbortSignal) => Promise<{
618
+ ok: true;
619
+ }>;
620
+ routes: BackendRoute[];
621
+ keeps: boolean;
622
+ bind(next: BoardBinding): void;
623
+ /** Registers this board's watchers with the board it uses now, as `POST /watchers` does. */
624
+ registerWatchers: () => Promise<RegistrationView>;
625
+ /** Stops pulling, for a board that pulls on its own. */
626
+ close: () => void;
627
+ };
628
+ type HttpBackend = ReturnType<typeof createHttp>;
629
+ //#endregion
630
+ export { HttpOptions as n, HttpBackend as t };
@@ -0,0 +1,10 @@
1
+ import { n as HttpOptions, t as HttpBackend } from "./backend-http-Bid7RIpC.mjs";
2
+ //#region src/backend-http/index.default.d.ts
3
+ /**
4
+ * The board at `url`, which keeps the log. Outside Node there's no environment to find it or a
5
+ * token in: `fetch` (the global one by default) sends the page's own session, which the board's
6
+ * `authenticate` recognizes.
7
+ */
8
+ export declare function http(url?: string, options?: HttpOptions): HttpBackend;
9
+ //#endregion
10
+ export type { HttpBackend, HttpOptions };
@@ -0,0 +1,2 @@
1
+ import { t as http } from "./index.default-Bkg77Pxn.mjs";
2
+ export { http };
@@ -0,0 +1,10 @@
1
+ import { n as HttpOptions, t as HttpBackend } from "./backend-http-Bid7RIpC.mjs";
2
+ //#region src/backend-http/index.d.ts
3
+ /**
4
+ * The board at `url`, which keeps the log: this board uses it as this deployment. Without a
5
+ * `url`, the one the environment points at: `BOARD_URL`, the repo's link, or `vb use`'s.
6
+ * Without a `fetch`, it sends the credentials `vb` would.
7
+ */
8
+ export declare function http(url?: string, options?: HttpOptions): HttpBackend;
9
+ //#endregion
10
+ export type { HttpBackend, HttpOptions };
@@ -0,0 +1,2 @@
1
+ import { t as http } from "./backend-http-0roEmjl0.mjs";
2
+ export { http };
@@ -0,0 +1,39 @@
1
+ import "./schemas-CWxs3ECJ.mjs";
2
+ //#region src/server/blob.d.ts
3
+ /**
4
+ * Where attachments' bytes live. The board writes each file once, under a key
5
+ * it chose, and never overwrites it; `vercelBlob()` from `@vercel/board/backend-a2/blob-vercel` is the
6
+ * production one.
7
+ */
8
+ type BlobStore = {
9
+ put(key: string, data: Uint8Array, contentType: string): Promise<void>;
10
+ /** Null when there's nothing under the key. */
11
+ get(key: string): Promise<{
12
+ data: ReadableStream<Uint8Array> | Uint8Array;
13
+ contentType: string;
14
+ } | null>;
15
+ /**
16
+ * For direct uploads, files too big for a request: a URL a client `PUT`s `key`'s bytes to,
17
+ * straight to the store, with `headers`. The store must bind it to `key`, refuse more than
18
+ * `maxBytes`, refuse to overwrite what's there, and stop taking it at `expiresAt`. With `head`,
19
+ * the board takes files up to `DIRECT_UPLOAD_BYTES_MAX`; without, uploads stay at 4 MB.
20
+ */
21
+ uploadUrl?(key: string, options: {
22
+ contentType: string;
23
+ maxBytes: number;
24
+ expiresAt: Date;
25
+ }): Promise<{
26
+ url: string;
27
+ headers: Record<string, string>;
28
+ }>;
29
+ /** The size of what's under the key, or null when there's nothing: how the board checks a direct upload landed. */
30
+ head?(key: string): Promise<{
31
+ size: number;
32
+ } | null>;
33
+ };
34
+ /** Files in memory, for tests: forgets everything when the process ends. */
35
+ declare function memoryBlob(): BlobStore;
36
+ /** Files on disk, for development and `vb serve`: under `dir`, `.a2/attachments` by default. */
37
+ declare function fsBlob(dir?: string): BlobStore;
38
+ //#endregion
39
+ export { fsBlob as n, memoryBlob as r, BlobStore as t };