@vercel/board 0.30.0 → 0.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/README.md +8 -17
  2. package/dist/{a2-D_28Pdip.mjs → a2-DiDc77Uf.mjs} +573 -361
  3. package/dist/{access-CQ39gqEV.mjs → access-CY5xVMIK.mjs} +19 -3
  4. package/dist/{access-CV96SYgr.d.mts → access-DPcrKIH_.d.mts} +6 -1
  5. package/dist/access.d.mts +4 -4
  6. package/dist/access.mjs +5 -4
  7. package/dist/{actors-xPiamLWk.mjs → actors-Bm-ojWWT.mjs} +2 -2
  8. package/dist/{auth-BPinwfN0.mjs → auth-8pRZnF1M.mjs} +131 -14
  9. package/dist/{auth-CU56Q2Xh.d.mts → auth-K8dY1nBY.d.mts} +36 -4
  10. package/dist/{backend-n3hajfrD.d.mts → backend-DxE9wGKm.d.mts} +86 -41
  11. package/dist/backend-a2/blob-vercel.d.mts +1 -1
  12. package/dist/backend-a2/contract.d.mts +37 -97
  13. package/dist/backend-a2/contract.mjs +1 -1
  14. package/dist/backend-a2/store-memory.d.mts +1 -1
  15. package/dist/backend-a2/store-memory.mjs +2 -2
  16. package/dist/backend-a2/store-postgres.d.mts +1 -1
  17. package/dist/backend-a2/store-postgres.mjs +1 -1
  18. package/dist/backend-a2/store-redis-http.d.mts +1 -1
  19. package/dist/backend-a2/store-redis-http.mjs +1 -1
  20. package/dist/backend-a2/store-redis.d.mts +1 -1
  21. package/dist/backend-a2/store-redis.mjs +1 -1
  22. package/dist/backend-a2/store-sqlite.d.mts +1 -1
  23. package/dist/backend-a2/store-sqlite.mjs +2 -2
  24. package/dist/backend-a2.d.mts +131 -240
  25. package/dist/backend-a2.mjs +2 -2
  26. package/dist/{backend-http-3PoBYQoo.d.mts → backend-http-CaN06CaD.d.mts} +49 -45
  27. package/dist/{backend-http-16SbvnAK.mjs → backend-http-CoaCghuJ.mjs} +2 -2
  28. package/dist/{backend-http-BPaNYLWj.mjs → backend-http-l5A8UmL-.mjs} +11 -9
  29. package/dist/backend-http.d.mts +1 -1
  30. package/dist/backend-http.mjs +1 -1
  31. package/dist/backend-http.node.d.mts +1 -1
  32. package/dist/backend-http.node.mjs +1 -1
  33. package/dist/{backend-vercel-Kd8nvW5A.mjs → backend-vercel-BE65okBC.mjs} +3 -3
  34. package/dist/{backend-vercel-C4Kee2-K.mjs → backend-vercel-CVxoTNF2.mjs} +186 -33
  35. package/dist/{backend-vercel-qznuDxnN.d.mts → backend-vercel-jg-6PAgD.d.mts} +49 -45
  36. package/dist/backend-vercel.d.mts +1 -1
  37. package/dist/backend-vercel.mjs +1 -1
  38. package/dist/backend-vercel.node.d.mts +1 -1
  39. package/dist/backend-vercel.node.mjs +1 -1
  40. package/dist/{blob-CqILvdmr.d.mts → blob-Bx8QPWEd.d.mts} +2 -2
  41. package/dist/{blob-DQK5prXT.mjs → blob-WbB2DJKn.mjs} +30 -11
  42. package/dist/{chat-provider-D6jVT4wS.d.mts → chat-provider-BChYrrA7.d.mts} +32 -28
  43. package/dist/{chat-provider-COtsU5jB.mjs → chat-provider-DkFp2hrh.mjs} +105 -60
  44. package/dist/cli-commands.d.mts +1 -1
  45. package/dist/cli-commands.mjs +1 -1
  46. package/dist/cli-embedded.d.mts +2 -2
  47. package/dist/cli-embedded.mjs +2 -2
  48. package/dist/cli.mjs +4 -4
  49. package/dist/{client-CjAatpV4.d.mts → client-COfYrgfV.d.mts} +184 -221
  50. package/dist/{commands-BtH69yqt.d.mts → commands-CpyPV_tk.d.mts} +35 -10
  51. package/dist/{commands-B5DHjZKK.mjs → commands-DsnQKTdB.mjs} +189 -56
  52. package/dist/{conformance-C7fwIvmN.mjs → conformance-3RBKxwbp.mjs} +259 -20
  53. package/dist/conformance.d.mts +8 -2
  54. package/dist/conformance.mjs +1 -1
  55. package/dist/{engine-DkdkXQEy.mjs → engine-DurYIRt8.mjs} +29 -210
  56. package/dist/{errors-87TVtXeb.d.mts → errors-2vGs49Db.d.mts} +1 -1
  57. package/dist/{errors-C_5rB8Iz.mjs → errors-CJXhhzvT.mjs} +28 -23
  58. package/dist/{provider-BaVmi4Hi.mjs → events-lujPA3gQ.mjs} +80 -17
  59. package/dist/{exports-CG0P8Qi4.mjs → exports-BnUZuRm9.mjs} +146 -80
  60. package/dist/exports-u5mApVvn.d.mts +5 -0
  61. package/dist/{folds-8wRRXjAt.d.mts → folds-DLUzfibJ.d.mts} +13 -40
  62. package/dist/{folds-DGYkMW19.mjs → folds-DsWfIftc.mjs} +3 -22
  63. package/dist/{index-BygAXP7t.d.mts → index-UXpTPWNc.d.mts} +2 -2
  64. package/dist/index.d.mts +7 -7
  65. package/dist/{index.default-DhkgpfR2.mjs → index.default-Dp8gexln.mjs} +1 -1
  66. package/dist/index.mjs +5 -5
  67. package/dist/index.node.d.mts +7 -7
  68. package/dist/index.node.mjs +3 -3
  69. package/dist/inspect/app.js +62 -61
  70. package/dist/inspect/engine.js +3 -3
  71. package/dist/{main-D2s-QBOK.mjs → main-CcYDo9Hb.mjs} +240 -127
  72. package/dist/{middleware-DlJQYiwV.mjs → middleware-BavYSDUa.mjs} +1 -1
  73. package/dist/{node-D8Rtg1su.mjs → node-BgeGcwX0.mjs} +7 -3
  74. package/dist/{project-C_2xs57L.mjs → project-4Vl7_uy5.mjs} +1 -1
  75. package/dist/{provider-Bm46LAdp.d.mts → provider-gynDUoyW.d.mts} +13 -43
  76. package/dist/{redis-tables-BWJZHUGg.mjs → redis-tables-BFRj_SEJ.mjs} +1 -19
  77. package/dist/{reducers-8jqLewgw.mjs → reducers-DQVSP3kk.mjs} +72 -75
  78. package/dist/{serve-lPoBDEds.mjs → serve-Bplieh0C.mjs} +6 -6
  79. package/dist/{server-D82a4uMe.mjs → server-wIpAEjpX.mjs} +4 -4
  80. package/dist/{serving-DKny38LK.mjs → serving-Y7s7VDjB.mjs} +1 -1
  81. package/dist/{sql-Bj0fk6dn.mjs → sql-E1K5g_ih.mjs} +2 -8
  82. package/dist/{sqlite-db-Dc8G78XV.mjs → sqlite-db-CzcD_FW8.mjs} +1 -1
  83. package/dist/{sync-kapso.d.mts → sync-chat-sdk.d.mts} +33 -37
  84. package/dist/sync-chat-sdk.mjs +44 -0
  85. package/dist/sync-github.d.mts +5 -18
  86. package/dist/sync-github.mjs +4 -70
  87. package/dist/sync-linear.d.mts +3 -3
  88. package/dist/sync-linear.mjs +2 -3
  89. package/dist/sync-slack.d.mts +7 -7
  90. package/dist/sync-slack.mjs +33 -54
  91. package/dist/sync.d.mts +3 -3
  92. package/dist/sync.mjs +2 -4
  93. package/dist/{tokens-C5_yGRlL.mjs → tokens-C7kYyrAG.mjs} +15 -6
  94. package/dist/{types-shZmGZ-q.d.mts → types-CmrFjpml.d.mts} +1 -3
  95. package/dist/{watchers-hash-B_5b0-ZG.mjs → watchers-hash-CurCzwhe.mjs} +85 -105
  96. package/docs/01-board/01-mounting.md +2 -2
  97. package/docs/01-board/03-identity.md +5 -6
  98. package/docs/01-board/04-messages.md +7 -4
  99. package/docs/01-board/05-reading.md +2 -1
  100. package/docs/01-board/06-watchers.md +8 -6
  101. package/docs/01-board/08-middleware.md +1 -1
  102. package/docs/01-board/09-access.md +145 -14
  103. package/docs/02-sync/01-overview.md +19 -26
  104. package/docs/02-sync/02-functions.md +8 -9
  105. package/docs/02-sync/03-slack.md +5 -5
  106. package/docs/02-sync/04-github.md +2 -2
  107. package/docs/02-sync/06-providers.md +91 -62
  108. package/docs/03-guides/01-coding-agents.md +1 -1
  109. package/docs/03-guides/03-ci.md +7 -4
  110. package/docs/04-reference/01-cli.md +100 -51
  111. package/docs/04-reference/02-board.md +56 -23
  112. package/docs/04-reference/03-http.md +59 -32
  113. package/docs/04-reference/04-log.md +8 -11
  114. package/docs/04-reference/05-conformance.md +35 -6
  115. package/docs/index.md +2 -2
  116. package/package.json +6 -9
  117. package/sql/postgres/board.sql +1 -1
  118. package/sql/postgres/schema.sql +1 -1
  119. package/dist/events-qf5XG5VQ.mjs +0 -75
  120. package/dist/exports-CrGA5_yN.d.mts +0 -5
  121. package/dist/sync-kapso.mjs +0 -89
  122. package/dist/sync.chat.d.mts +0 -2
  123. package/dist/sync.chat.mjs +0 -2
  124. package/dist/users-yryHKFMo.mjs +0 -42
  125. package/docs/02-sync/05-whatsapp.md +0 -152
@@ -40,8 +40,10 @@ type CliCommand = {
40
40
  readonly subcommands?: readonly CliCommand[];
41
41
  /** Its arguments come before its subcommand, as in `sources <key> read <target>`. */
42
42
  readonly argumentsBeforeSubcommand?: true;
43
- /** It does something without a subcommand too, as `identity` lists your links. */
43
+ /** It does something without a subcommand too, as `sources` lists the sync entries. */
44
44
  readonly runsWithoutSubcommand?: true;
45
+ /** The subcommand its command runs when given none, as `channels` runs `channels list`. */
46
+ readonly default?: true;
45
47
  /** Out of help: it still runs, for what calls it. */
46
48
  readonly hidden?: true;
47
49
  };
@@ -61,7 +63,7 @@ declare const options: {
61
63
  readonly type: 'string';
62
64
  readonly value: '@handle';
63
65
  readonly optionalValue: true;
64
- readonly description: 'mentioning a handle, or you without one';
66
+ readonly description: 'mentioning a handle or email, or you without one';
65
67
  };
66
68
  readonly label: {
67
69
  readonly type: 'string';
@@ -160,6 +162,11 @@ declare const options: {
160
162
  readonly value: 'file';
161
163
  readonly description: 'attach a file';
162
164
  };
165
+ readonly 'text-file': {
166
+ readonly type: 'string';
167
+ readonly value: 'path';
168
+ readonly description: 'the text, from a file: - reads stdin';
169
+ };
163
170
  readonly unset: {
164
171
  readonly type: 'string';
165
172
  readonly multiple: true;
@@ -202,14 +209,6 @@ declare const options: {
202
209
  readonly value: 'duration';
203
210
  readonly description: 'how long to wait (default: 30m)';
204
211
  };
205
- readonly code: {
206
- readonly type: 'boolean';
207
- readonly description: 'post a code from your account instead of signing in';
208
- };
209
- readonly 'no-wait': {
210
- readonly type: 'boolean';
211
- readonly description: "start linking, and don't wait for it to finish";
212
- };
213
212
  readonly 'no-open': {
214
213
  readonly type: 'boolean';
215
214
  readonly description: "don't open the browser";
@@ -245,6 +244,32 @@ declare const options: {
245
244
  readonly value: 'N';
246
245
  readonly description: 'repeating this many times';
247
246
  };
247
+ readonly can: {
248
+ readonly type: 'string';
249
+ readonly value: 'scope';
250
+ readonly description: 'what it may do (default: *=read,post,react,label)';
251
+ };
252
+ readonly claim: {
253
+ readonly type: 'string';
254
+ readonly multiple: true;
255
+ readonly value: 'k=v';
256
+ readonly description: 'a claim its tokens carry; the same name again is any of them';
257
+ };
258
+ readonly profile: {
259
+ readonly type: 'string';
260
+ readonly value: 'name';
261
+ readonly description: 'the profile every request with it writes as';
262
+ };
263
+ readonly session: {
264
+ readonly type: 'string';
265
+ readonly value: 'id';
266
+ readonly description: 'the session every request with it writes from';
267
+ };
268
+ readonly expires: {
269
+ readonly type: 'string';
270
+ readonly value: 'duration';
271
+ readonly description: 'how long it lives (default: 30d, at most 90d)';
272
+ };
248
273
  readonly port: {
249
274
  readonly type: 'string';
250
275
  readonly value: 'N';
@@ -15,7 +15,7 @@ const options = {
15
15
  type: "string",
16
16
  value: "@handle",
17
17
  optionalValue: true,
18
- description: "mentioning a handle, or you without one"
18
+ description: "mentioning a handle or email, or you without one"
19
19
  },
20
20
  label: {
21
21
  type: "string",
@@ -114,6 +114,11 @@ const options = {
114
114
  value: "file",
115
115
  description: "attach a file"
116
116
  },
117
+ "text-file": {
118
+ type: "string",
119
+ value: "path",
120
+ description: "the text, from a file: - reads stdin"
121
+ },
117
122
  unset: {
118
123
  type: "string",
119
124
  multiple: true,
@@ -156,14 +161,6 @@ const options = {
156
161
  value: "duration",
157
162
  description: "how long to wait (default: 30m)"
158
163
  },
159
- code: {
160
- type: "boolean",
161
- description: "post a code from your account instead of signing in"
162
- },
163
- "no-wait": {
164
- type: "boolean",
165
- description: "start linking, and don't wait for it to finish"
166
- },
167
164
  "no-open": {
168
165
  type: "boolean",
169
166
  description: "don't open the browser"
@@ -199,6 +196,32 @@ const options = {
199
196
  value: "N",
200
197
  description: "repeating this many times"
201
198
  },
199
+ can: {
200
+ type: "string",
201
+ value: "scope",
202
+ description: "what it may do (default: *=read,post,react,label)"
203
+ },
204
+ claim: {
205
+ type: "string",
206
+ multiple: true,
207
+ value: "k=v",
208
+ description: "a claim its tokens carry; the same name again is any of them"
209
+ },
210
+ profile: {
211
+ type: "string",
212
+ value: "name",
213
+ description: "the profile every request with it writes as"
214
+ },
215
+ session: {
216
+ type: "string",
217
+ value: "id",
218
+ description: "the session every request with it writes from"
219
+ },
220
+ expires: {
221
+ type: "string",
222
+ value: "duration",
223
+ description: "how long it lives (default: 30d, at most 90d)"
224
+ },
202
225
  port: {
203
226
  type: "string",
204
227
  value: "N",
@@ -255,7 +278,7 @@ const id = (description = "a message ID, as read shows it (#812)") => ({
255
278
  required: true,
256
279
  description
257
280
  });
258
- const text = (description = "what it says: - reads it from stdin, and it may be left out when you --attach") => ({
281
+ const text = (description = "what it says: - reads it from stdin, and it may be left out when you --attach or --text-file") => ({
259
282
  name: "text",
260
283
  required: false,
261
284
  description
@@ -284,70 +307,169 @@ const commands = [
284
307
  }]
285
308
  },
286
309
  {
287
- group: "the board",
288
- name: "channels",
289
- description: "channels, grouped by path prefix",
310
+ group: "you",
311
+ name: "tokens",
312
+ description: "tokens that act as you, narrowed, for a widget, a sandbox, or a script",
290
313
  arguments: [],
291
314
  options: [],
315
+ runsWithoutSubcommand: true,
292
316
  examples: [{
293
- name: "list the channels",
294
- value: "channels"
295
- }]
317
+ name: "list your tokens",
318
+ value: "tokens"
319
+ }],
320
+ subcommands: [
321
+ {
322
+ name: "list",
323
+ default: true,
324
+ description: "your live tokens, or with manage, everyone's",
325
+ arguments: [],
326
+ options: [],
327
+ examples: [{
328
+ name: "list your tokens",
329
+ value: "tokens list"
330
+ }]
331
+ },
332
+ {
333
+ name: "create",
334
+ description: "mint one, and print its secret once",
335
+ arguments: [{
336
+ name: "name",
337
+ required: true,
338
+ description: "what it is for, e.g. feedback-widget"
339
+ }],
340
+ options: [
341
+ option("can"),
342
+ option("profile"),
343
+ option("session"),
344
+ option("expires")
345
+ ],
346
+ examples: [{
347
+ name: "a token that only posts feedback",
348
+ value: "tokens create feedback-widget --can feedback/=post"
349
+ }, {
350
+ name: "a week's token for a sandbox agent",
351
+ value: "tokens create sandbox-7 --can dev/=read,post,react --profile lemur --expires 7d"
352
+ }]
353
+ },
354
+ {
355
+ name: "revoke",
356
+ description: "stop one, and every token minted with it",
357
+ arguments: [{
358
+ name: "token",
359
+ required: true,
360
+ description: "its ID, as tokens shows it (t12)"
361
+ }],
362
+ options: [],
363
+ examples: [{
364
+ name: "revoke a token",
365
+ value: "tokens revoke t12"
366
+ }]
367
+ }
368
+ ]
296
369
  },
297
370
  {
298
371
  group: "the board",
299
- name: "actors",
300
- description: "actors and their handles",
372
+ name: "grants",
373
+ description: "who the board lets in beside its code's rules: tokens from an OIDC issuer with these claims",
301
374
  arguments: [],
302
375
  options: [],
376
+ runsWithoutSubcommand: true,
303
377
  examples: [{
304
- name: "list who has written here",
305
- value: "actors"
306
- }]
378
+ name: "list the grants",
379
+ value: "grants"
380
+ }],
381
+ subcommands: [
382
+ {
383
+ name: "list",
384
+ default: true,
385
+ description: "the board's grants",
386
+ arguments: [],
387
+ options: [],
388
+ examples: [{
389
+ name: "list the grants",
390
+ value: "grants list"
391
+ }]
392
+ },
393
+ {
394
+ name: "create",
395
+ description: "let them in, or change what they may do",
396
+ arguments: [{
397
+ name: "issuer",
398
+ required: true,
399
+ description: "vercel, github, or an https URL"
400
+ }],
401
+ options: [option("claim"), option("can")],
402
+ examples: [{
403
+ name: "let a workflow post in ci/",
404
+ value: "grants create github --claim repository=acme/web --can ci/=read,post"
405
+ }, {
406
+ name: "let a project's production post feedback",
407
+ value: "grants create vercel --claim project_id=prj_123 --claim environment=production --can feedback/=post"
408
+ }]
409
+ },
410
+ {
411
+ name: "revoke",
412
+ description: "stop letting them in",
413
+ arguments: [{
414
+ name: "grant",
415
+ required: true,
416
+ description: "its ID, as grants shows it (g3)"
417
+ }],
418
+ options: [],
419
+ examples: [{
420
+ name: "revoke a grant",
421
+ value: "grants revoke g3"
422
+ }]
423
+ }
424
+ ]
307
425
  },
308
426
  {
309
427
  group: "the board",
310
- name: "identity",
311
- description: "your linked Slack and GitHub accounts",
428
+ name: "channels",
429
+ description: "channels, grouped by path prefix: a first post makes one, and so does create",
312
430
  arguments: [],
313
431
  options: [],
314
432
  runsWithoutSubcommand: true,
315
433
  examples: [{
316
- name: "list your linked accounts",
317
- value: "identity"
434
+ name: "list the channels",
435
+ value: "channels"
318
436
  }],
319
437
  subcommands: [{
320
- name: "link",
321
- description: "link your account on a sync entry: sign in, or post a code from it",
322
- arguments: [{
323
- name: "key",
324
- required: true,
325
- description: "the sync entry, e.g. slack"
326
- }],
327
- options: [
328
- option("code"),
329
- option("no-wait"),
330
- option("no-open")
331
- ],
438
+ name: "list",
439
+ default: true,
440
+ description: "channels, grouped by path prefix",
441
+ arguments: [],
442
+ options: [],
332
443
  examples: [{
333
- name: "link your Slack account",
334
- value: "identity link slack"
444
+ name: "list the channels",
445
+ value: "channels list"
335
446
  }]
336
447
  }, {
337
- name: "unlink",
338
- description: "unlink one, by handle or actor ID",
448
+ name: "create",
449
+ description: "a channel, before anything posts to it (one that exists stays as it is)",
339
450
  arguments: [{
340
- name: "account",
451
+ name: "channel",
341
452
  required: true,
342
- description: "a handle or actor ID from identity"
453
+ description: "its path, such as dev/alerts"
343
454
  }],
344
455
  options: [],
345
456
  examples: [{
346
- name: "unlink an account",
347
- value: "identity unlink @ada"
457
+ name: "make a channel for alerts",
458
+ value: "channels create dev/alerts"
348
459
  }]
349
460
  }]
350
461
  },
462
+ {
463
+ group: "the board",
464
+ name: "actors",
465
+ description: "actors and their handles",
466
+ arguments: [],
467
+ options: [],
468
+ examples: [{
469
+ name: "list who has written here",
470
+ value: "actors"
471
+ }]
472
+ },
351
473
  {
352
474
  group: "messages",
353
475
  name: "read",
@@ -385,6 +507,7 @@ const commands = [
385
507
  }, text()],
386
508
  options: [
387
509
  option("label", "label it", "k=v"),
510
+ option("text-file"),
388
511
  option("attach"),
389
512
  option("sync"),
390
513
  option("no-sync"),
@@ -405,18 +528,27 @@ const commands = [
405
528
  description: "a reply in a thread",
406
529
  arguments: [id("the ID of a message in the thread"), text()],
407
530
  options: [
531
+ option("label", "label it", "k=v"),
532
+ option("text-file"),
408
533
  option("attach"),
409
534
  option("idempotency-key"),
410
535
  option("no-sync"),
411
536
  option("after", AFTER)
412
537
  ],
413
- examples: [{
414
- name: "reply in a thread",
415
- value: "reply 812 \"on it\""
416
- }, {
417
- name: "reply only if #815 is still the thread's newest",
418
- value: "reply 812 \"on it\" --after 815"
419
- }]
538
+ examples: [
539
+ {
540
+ name: "reply in a thread",
541
+ value: "reply 812 \"on it\""
542
+ },
543
+ {
544
+ name: "reply with a label",
545
+ value: "reply 812 \"fixed in a1b2c3\" --label step=fix"
546
+ },
547
+ {
548
+ name: "reply only if #815 is still the thread's newest",
549
+ value: "reply 812 \"on it\" --after 815"
550
+ }
551
+ ]
420
552
  },
421
553
  {
422
554
  group: "messages",
@@ -435,6 +567,7 @@ const commands = [
435
567
  option("for"),
436
568
  option("times"),
437
569
  option("label", "label it", "k=v"),
570
+ option("text-file"),
438
571
  option("attach"),
439
572
  option("no-sync")
440
573
  ],
@@ -486,10 +619,10 @@ const commands = [
486
619
  description: "change a message's text",
487
620
  arguments: [id(), {
488
621
  name: "text",
489
- required: true,
490
- description: "its new text: - reads it from stdin"
622
+ required: false,
623
+ description: "its new text: - reads it from stdin, and it may be left out when you --text-file"
491
624
  }],
492
- options: [option("if-revision")],
625
+ options: [option("text-file"), option("if-revision")],
493
626
  examples: [{
494
627
  name: "fix a typo",
495
628
  value: "edit 812 \"deploys are green again\""
@@ -558,7 +691,7 @@ const commands = [
558
691
  {
559
692
  group: "messages",
560
693
  name: "typing",
561
- description: "show typing in the thread's synced platform threads (marks WhatsApp read)",
694
+ description: "show typing in the thread's synced platform threads",
562
695
  arguments: [id(), {
563
696
  name: "status",
564
697
  required: false,