@vercel/board 0.57.1 → 0.58.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 (65) hide show
  1. package/dist/{access-CZ419Vho.mjs → access-D1AHzFSP.mjs} +1 -1
  2. package/dist/access.d.mts +2 -2
  3. package/dist/access.mjs +4 -4
  4. package/dist/{actors-CXMWplob.mjs → actors-CCth21rU.mjs} +2 -2
  5. package/dist/{auth-AwZJQpCO.mjs → auth-Cc5_pdi7.mjs} +2 -2
  6. package/dist/{auth-C0Mla9OU.d.mts → auth-DcWTzrHz.d.mts} +1 -1
  7. package/dist/{backend-BuqwQbb4.d.mts → backend-9H57DlQt.d.mts} +23 -5
  8. package/dist/backend-local.d.mts +1 -1
  9. package/dist/backend-local.mjs +1 -1
  10. package/dist/backend-postgres/blob-vercel.d.mts +1 -1
  11. package/dist/backend-postgres.d.mts +3 -3
  12. package/dist/backend-postgres.mjs +3 -3
  13. package/dist/{blob-DjS53D1A.d.mts → blob-CdLCZEPM.d.mts} +2 -2
  14. package/dist/{chat-provider-CpYdXEpI.d.mts → chat-provider-BiJ8G6KY.d.mts} +2 -2
  15. package/dist/cli-commands.d.mts +1 -1
  16. package/dist/cli-commands.mjs +1 -1
  17. package/dist/cli-embedded.d.mts +2 -2
  18. package/dist/cli-embedded.mjs +2 -2
  19. package/dist/cli.mjs +6 -6
  20. package/dist/{client-B0DGOt7P.d.mts → client-BUPyzzFt.d.mts} +13 -1
  21. package/dist/{commands-Dcm4_pc1.d.mts → commands-DryDbyWr.d.mts} +5 -0
  22. package/dist/{commands-DeYAQUcP.mjs → commands-totPnoCC.mjs} +73 -20
  23. package/dist/{conformance-EtEq22w1.mjs → conformance-D9XutDay.mjs} +2 -2
  24. package/dist/conformance.d.mts +1 -1
  25. package/dist/conformance.mjs +1 -1
  26. package/dist/{engine-CfVTyEeo.mjs → engine-DVWbcEIB.mjs} +2 -2
  27. package/dist/{errors-DjatfYjl.mjs → errors-Ce_-E3_C.mjs} +50 -1
  28. package/dist/{errors-DBZtbfph.d.mts → errors-CwObkpSn.d.mts} +1 -1
  29. package/dist/{exports-BvJTIorX.d.mts → exports-Bh09j6Bd.d.mts} +5 -5
  30. package/dist/{exports-B_UGnrnN.mjs → exports-WtqjdQwb.mjs} +92 -9
  31. package/dist/{index-DuibwQf9.d.mts → index-mgNwCwJ4.d.mts} +2 -2
  32. package/dist/index.d.mts +7 -7
  33. package/dist/index.mjs +4 -4
  34. package/dist/index.node.d.mts +8 -8
  35. package/dist/index.node.mjs +4 -4
  36. package/dist/inspect/app.js +33 -33
  37. package/dist/{inspect-DfJzHFiE.mjs → inspect-CtPZz0WG.mjs} +2 -2
  38. package/dist/inspect-wkA_8iyU.mjs +2 -0
  39. package/dist/inspect.d.mts +1 -1
  40. package/dist/inspect.mjs +1 -1
  41. package/dist/{local-D2i5sxuY.mjs → local-B7Yp-B2z.mjs} +18 -7
  42. package/dist/{local-BiG1WJk0.mjs → local-BPiDCkA4.mjs} +3 -3
  43. package/dist/{main-Bbqg3Unf.mjs → main-BvkLqpUX.mjs} +150 -28
  44. package/dist/{middleware-D2AGrGj7.mjs → middleware-DVBOEd8G.mjs} +1 -1
  45. package/dist/{provider-BNVyVKtH.d.mts → provider-BnK0Bif7.d.mts} +2 -2
  46. package/dist/{routes-CSnxZyyb.d.mts → routes-D5FtKOP_.d.mts} +87 -1
  47. package/dist/{serve-D06-DMej.mjs → serve-ChlJ955x.mjs} +6 -6
  48. package/dist/{server-BXbcS-n9.mjs → server-CRdVLqny.mjs} +6 -6
  49. package/dist/{serving-B2BNr4PR.mjs → serving-BVtrFzK4.mjs} +1 -1
  50. package/dist/{shell-C8EowDEz.mjs → shell-hTUuAc6A.mjs} +1 -1
  51. package/dist/sync-chat-sdk.d.mts +2 -2
  52. package/dist/sync-github.d.mts +2 -2
  53. package/dist/sync-linear.d.mts +3 -3
  54. package/dist/sync-slack.d.mts +3 -3
  55. package/dist/sync.d.mts +2 -2
  56. package/dist/{task-batch-YMVr_c5R.mjs → task-batch-CnRhVsh6.mjs} +7 -4
  57. package/dist/{tokens-CaEPmiG1.mjs → tokens-XagdeYrv.mjs} +2 -2
  58. package/dist/{version-BRR9FkLa.mjs → version-rlZkE9nc.mjs} +1 -1
  59. package/docs/01-board/11-tasks.md +6 -1
  60. package/docs/02-sync/01-overview.md +4 -0
  61. package/docs/02-sync/05-managed.md +117 -0
  62. package/docs/04-reference/01-cli.md +43 -1
  63. package/docs/04-reference/03-http.md +4 -0
  64. package/package.json +1 -1
  65. package/dist/inspect-H1MISWwN.mjs +0 -2
@@ -1,5 +1,5 @@
1
1
  import { a as CAN_MAX, s as ChannelPath } from "./schemas-CUSTEFIy.mjs";
2
- import { o as forbidden } from "./errors-DjatfYjl.mjs";
2
+ import { o as forbidden } from "./errors-Ce_-E3_C.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 { An as GrantChangeRefusal, Bn as union, Cn as Access, Dn as FULL_ACCESS, En as ChannelPattern, Fn as Permission, Gn as CAN_MAX, Ln as checkGrantChange, Mn as InvalidCan, On as Grant, Pn as PERMISSIONS, Rn as compileAccess, Tn as Can, Vn as Actor, Wn as Author, jn as GrantShape, kn as GrantChange, wn as AccessSummary, zn as parseCan } from "./routes-CSnxZyyb.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, x as subPrefix, y as explainGrants } from "./auth-C0Mla9OU.mjs";
1
+ import { An as AccessSummary, Bn as PERMISSIONS, Fn as GrantChange, Gn as parseCan, In as GrantChangeRefusal, Kn as union, Ln as GrantShape, Mn as ChannelPattern, Nn as FULL_ACCESS, Pn as Grant, Rn as InvalidCan, Un as checkGrantChange, Vn as Permission, Wn as compileAccess, Xn as Author, Zn as CAN_MAX, jn as Can, kn as Access, qn as Actor } from "./routes-D5FtKOP_.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, x as subPrefix, y as explainGrants } from "./auth-DcWTzrHz.mjs";
3
3
  //#region src/server/tokens.d.ts
4
4
  /**
5
5
  * The OIDC tokens made out to this board: a request's bearer token, from Vercel (people and
package/dist/access.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { a as CAN_MAX } from "./schemas-CUSTEFIy.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-CZ419Vho.mjs";
3
- import { D as explainGrants, O as grantAccess, k as subPrefix, t as DEFAULT_CAN } from "./auth-AwZJQpCO.mjs";
4
- import { a as resolveActor } from "./actors-CXMWplob.mjs";
5
- import { t as oidcTokens } from "./tokens-CaEPmiG1.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-D1AHzFSP.mjs";
3
+ import { D as explainGrants, O as grantAccess, k as subPrefix, t as DEFAULT_CAN } from "./auth-Cc5_pdi7.mjs";
4
+ import { a as resolveActor } from "./actors-CCth21rU.mjs";
5
+ import { t as oidcTokens } from "./tokens-XagdeYrv.mjs";
6
6
  export { CAN_MAX, DEFAULT_CAN, FULL_ACCESS, InvalidCan, PERMISSIONS, checkGrantChange, compileAccess, explainGrants, grantAccess, oidcTokens, parseCan, resolveActor, subPrefix, union };
@@ -1,7 +1,7 @@
1
1
  import { r as parseProfileHeader } from "./profile-header-O8wC8yk8.mjs";
2
2
  import { P as toStorable } from "./schemas-CUSTEFIy.mjs";
3
- import { r as badRequest } from "./errors-DjatfYjl.mjs";
4
- import { u as parseCan } from "./access-CZ419Vho.mjs";
3
+ import { r as badRequest } from "./errors-Ce_-E3_C.mjs";
4
+ import { u as parseCan } from "./access-D1AHzFSP.mjs";
5
5
  import { t as own } from "./own-OwgPWdmh.mjs";
6
6
  //#region src/server/actors.ts
7
7
  /** Agents whose marks the board serves at `/avatars/<name>`, for a caller to pass as an avatar. */
@@ -1,5 +1,5 @@
1
- import { d as unauthorized, o as forbidden, r as badRequest, t as HttpError } from "./errors-DjatfYjl.mjs";
2
- import { c as compileAccess, l as decide, p as writtenCan, s as combine, t as FULL_ACCESS, u as parseCan } from "./access-CZ419Vho.mjs";
1
+ import { d as unauthorized, o as forbidden, r as badRequest, t as HttpError } from "./errors-Ce_-E3_C.mjs";
2
+ import { c as compileAccess, l as decide, p as writtenCan, s as combine, t as FULL_ACCESS, u as parseCan } from "./access-D1AHzFSP.mjs";
3
3
  //#region src/server/grants.ts
4
4
  /**
5
5
  * How close `principal` is to the caller, or null when it doesn't name it: `principal` for its own
@@ -1,4 +1,4 @@
1
- import { Cn as Access, Fn as Permission, In as WrittenCan, Nn as Level, Tn as Can } from "./routes-CSnxZyyb.mjs";
1
+ import { Hn as WrittenCan, Vn as Permission, jn as Can, kn as Access, zn as Level } from "./routes-D5FtKOP_.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,8 +1,8 @@
1
- import { $ as InboxNextQuery, $t as SyncThreadView, B as Explanation, C as ClaimTaskBody, Cn as Access, Ct as ReleaseTaskBody, D as CreateTaskBody, E as CreateGrantsBody, Et as RevokeGrantBody, F as EditBody, Fn as Permission, Ft as SchemaBody, Gt as SyncCopiesView, Ht as SourceReadQuery, I as EventsPage, Jn as ExternalEvent, Jt as SyncFindView, Kn as Labels, L as EventsQuery, Lt as SchemaView, M as DeleteBody, Mt as SchedulesQuery, N as Discovery, Nn as Level, Ot as ScheduleBody, Q as InboxItem, Rt as SourceJoin, St as RegistrationView, T as CreateChannelBody, Tn as Can, Un as Attachment, V as FailTaskBody, Vn as Actor, Vt as SourceRead, W as GrantBody, Wn as Author, Wt as SyncCopiesQuery, X as InboxAckBody, Yt as SyncImportBody, Z as InboxEntry, Zt as SyncReceiptBody, _ as ChannelView, bn as UploadStartBody, bt as RegisterBody, c as BlockTaskBody, ct as MatchesQuery, dt as MessagesPage, en as SyncedView, et as InboxPushBody, fn as ThreadView, gn as TypingBody, h as ChannelMessagesQuery, i as ActorsQuery, in as TaskNeedsBody, it as LabelBody, j as CreatedTasksQuery, jt as ScheduleView, k as CreateTasksBody, ln as ThreadQuery, lt as Me, m as CancelTaskBody, mn as ThreadsQuery, n as AckBody, on as TasksPage, ot as LinkedQuery, pn as ThreadsPage, pt as PostBody, q as GrantView, qt as SyncFindQuery, r as ActorView, rn as TaskClaim, s as AssignTaskBody, sn as TasksQuery, st as MatchView, tt as InboxQuery, u as BoardEventView, ut as MessageView, v as ChannelsPage, vn as UpdateGrantBody, vt as ReactBody, w as CompleteTaskBody, wt as RenewTaskBody, x as ClaimReadyTaskBody, xn as UploadTicket, y as ChannelsQuery, z as ExplainQuery, zt as SourceJoinBody } from "./routes-CSnxZyyb.mjs";
2
- import { l as Known, o as Granted, p as StoredGrant, t as Authenticate } from "./auth-C0Mla9OU.mjs";
3
- import { S as Mentioned, f as ProfileOption, t as BoardClient } from "./client-B0DGOt7P.mjs";
4
- import { t as HttpError } from "./errors-DBZtbfph.mjs";
5
- import { m as SyncProvider } from "./provider-BNVyVKtH.mjs";
1
+ import { $ as InboxNextQuery, $t as SyncFindQuery, At as RenewTaskBody, B as Explanation, C as ClaimTaskBody, D as CreateTaskBody, Dn as UploadTicket, E as CreateGrantsBody, En as UploadStartBody, Et as RegisterBody, F as EditBody, Gt as SourceJoinBody, I as EventsPage, Jt as SourceReadQuery, L as EventsQuery, Lt as ScheduleView, M as DeleteBody, Mt as RevokeGrantBody, N as Discovery, Ot as RegistrationView, Pt as ScheduleBody, Q as InboxItem, Qn as Labels, Rt as SchedulesQuery, Sn as TypingBody, T as CreateChannelBody, Ut as SchemaView, V as FailTaskBody, Vn as Permission, Vt as SchemaBody, W as GrantBody, Wt as SourceJoin, X as InboxAckBody, Xn as Author, Xt as SyncCopiesQuery, Yn as Attachment, Z as InboxEntry, Zt as SyncCopiesView, _ as ChannelView, _t as MessagesPage, an as SyncThreadView, bn as ThreadsQuery, c as BlockTaskBody, ct as ManagedSyncBody, dt as ManagedSyncsQuery, en as SyncFindView, er as ExternalEvent, et as InboxPushBody, fn as TasksPage, gt as MessageView, h as ChannelMessagesQuery, hn as ThreadQuery, ht as Me, i as ActorsQuery, it as LabelBody, j as CreatedTasksQuery, jn as Can, k as CreateTasksBody, kn as Access, kt as ReleaseTaskBody, ln as TaskClaim, m as CancelTaskBody, mt as MatchesQuery, n as AckBody, on as SyncedView, ot as LinkedQuery, pn as TasksQuery, pt as MatchView, q as GrantView, qn as Actor, qt as SourceRead, r as ActorView, rn as SyncReceiptBody, s as AssignTaskBody, tn as SyncImportBody, tt as InboxQuery, u as BoardEventView, un as TaskNeedsBody, ut as ManagedSyncView, v as ChannelsPage, vn as ThreadView, w as CompleteTaskBody, wn as UpdateGrantBody, wt as ReactBody, x as ClaimReadyTaskBody, y as ChannelsQuery, yn as ThreadsPage, yt as PostBody, z as ExplainQuery, zn as Level } from "./routes-D5FtKOP_.mjs";
2
+ import { l as Known, o as Granted, p as StoredGrant, t as Authenticate } from "./auth-DcWTzrHz.mjs";
3
+ import { S as Mentioned, f as ProfileOption, t as BoardClient } from "./client-BUPyzzFt.mjs";
4
+ import { t as HttpError } from "./errors-CwObkpSn.mjs";
5
+ import { m as SyncProvider } from "./provider-BnK0Bif7.mjs";
6
6
  import { z } from "zod";
7
7
  //#region src/server/sandbox.d.ts
8
8
  /** How a rule matches a value: a regular expression (RE2), or the value exactly. */
@@ -224,6 +224,24 @@ type Protocol = {
224
224
  canceled: boolean;
225
225
  };
226
226
  };
227
+ createSync: {
228
+ input: Input<typeof ManagedSyncBody>;
229
+ output: {
230
+ sync: ManagedSyncView;
231
+ };
232
+ };
233
+ syncs: {
234
+ input: Input<typeof ManagedSyncsQuery>;
235
+ output: {
236
+ syncs: ManagedSyncView[];
237
+ };
238
+ };
239
+ removeSync: {
240
+ input: Id;
241
+ output: {
242
+ sync: ManagedSyncView;
243
+ };
244
+ };
227
245
  /** Tasks, oldest first, each as its thread's summary. 501 `no_tasks` where the board keeps none, as every task method answers there. */
228
246
  tasks: {
229
247
  input: Input<typeof TasksQuery>;
@@ -1,4 +1,4 @@
1
- import { t as Backend } from "./backend-BuqwQbb4.mjs";
1
+ import { t as Backend } from "./backend-9H57DlQt.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-BiG1WJk0.mjs";
1
+ import { t as local } from "./local-BPiDCkA4.mjs";
2
2
  export { local };
@@ -1,4 +1,4 @@
1
- import { t as BlobStore } from "../blob-DjS53D1A.mjs";
1
+ import { t as BlobStore } from "../blob-CdLCZEPM.mjs";
2
2
  //#region src/blob/vercel.d.ts
3
3
  export declare function vercelBlob(options?: {
4
4
  token?: string;
@@ -1,6 +1,6 @@
1
- import "./routes-CSnxZyyb.mjs";
2
- import { t as Backend } from "./backend-BuqwQbb4.mjs";
3
- import { t as BlobStore } from "./blob-DjS53D1A.mjs";
1
+ import "./routes-D5FtKOP_.mjs";
2
+ import { t as Backend } from "./backend-9H57DlQt.mjs";
3
+ import { t as BlobStore } from "./blob-CdLCZEPM.mjs";
4
4
  import { t as Scheduler } from "./vercel-B5FM4uS8.mjs";
5
5
  //#region src/store/postgres-db.d.ts
6
6
  /** What the tables need of a `pg` Pool, or of anything shaped like one. */
@@ -1,8 +1,8 @@
1
- import { t as HttpError } from "./errors-DjatfYjl.mjs";
2
- import { u as METHODS } from "./task-batch-YMVr_c5R.mjs";
1
+ import { t as HttpError } from "./errors-Ce_-E3_C.mjs";
2
+ import { u as METHODS } from "./task-batch-CnRhVsh6.mjs";
3
3
  import { C as duplicateBatchError, D as supersededAttemptError, E as sessionClearedError, T as lastIndexMismatchError, b as CLEAR_EVENT_TYPE, m as nullProtoRecord, n as NOTIFY_TIMINGS, r as POLL_TIMINGS, y as A2Error } from "./internal-CvsrprnU-DhZF6sZK.mjs";
4
4
  import { a as retryableLazy, o as platformWaitUntil } from "./server-DX7mM6nm-Cq1xPyqJ.mjs";
5
- import { n as a2, t as localScheduler } from "./local-D2i5sxuY.mjs";
5
+ import { n as a2, t as localScheduler } from "./local-B7Yp-B2z.mjs";
6
6
  import { n as defaultSleep, r as pollingStream } from "./store-polling-BZt2Rf3D-nlZUQLz2.mjs";
7
7
  import { r as sqlTables } from "./sql-CvBbb5Ui.mjs";
8
8
  import { n as SYSTEM_CLOCK, t as RANDOM_IDS } from "./store-N8PXxDAS-DWWgv-Vz.mjs";
@@ -1,5 +1,5 @@
1
- import "./routes-CSnxZyyb.mjs";
2
- import "./errors-DBZtbfph.mjs";
1
+ import "./routes-D5FtKOP_.mjs";
2
+ import "./errors-CwObkpSn.mjs";
3
3
  //#region src/server/blob.d.ts
4
4
  /**
5
5
  * Where a local board's attachments' bytes live. The board writes each file
@@ -1,5 +1,5 @@
1
- import { Rt as SourceJoin, Vn as Actor, Vt as SourceRead, Xn as ExternalLink, Yn as ExternalFile, qn as ExternalAuthor } from "./routes-CSnxZyyb.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-BNVyVKtH.mjs";
1
+ import { $n as ExternalAuthor, Wt as SourceJoin, nr as ExternalLink, qn as Actor, qt as SourceRead, tr as ExternalFile } from "./routes-D5FtKOP_.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-BnK0Bif7.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-Dcm4_pc1.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-DryDbyWr.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-DeYAQUcP.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-totPnoCC.mjs";
2
2
  export { commands, filters, globalOptions, groups, option, options, usage };
@@ -1,5 +1,5 @@
1
- import { f as Board } from "./backend-BuqwQbb4.mjs";
2
- import "./index-DuibwQf9.mjs";
1
+ import { f as Board } from "./backend-9H57DlQt.mjs";
2
+ import "./index-mgNwCwJ4.mjs";
3
3
  //#region src/cli/claims.d.ts
4
4
  /** A claim as the CLI keeps it: what its writes carry, and when its lease ends. */
5
5
  type HeldClaim = {
@@ -1,5 +1,5 @@
1
- import { o as stoppedBy } from "./exports-B_UGnrnN.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-Bbqg3Unf.mjs";
1
+ import { o as stoppedBy } from "./exports-WtqjdQwb.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-BvkLqpUX.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-DeYAQUcP.mjs";
3
- import { _ as projectDir } from "./server-BXbcS-n9.mjs";
4
- import { r as main } from "./main-Bbqg3Unf.mjs";
5
- import { i as createInspector, r as stopped, t as allowedHosts } from "./inspect-DfJzHFiE.mjs";
2
+ import { a as option } from "./commands-totPnoCC.mjs";
3
+ import { _ as projectDir } from "./server-CRdVLqny.mjs";
4
+ import { r as main } from "./main-BvkLqpUX.mjs";
5
+ import { i as createInspector, r as stopped, t as allowedHosts } from "./inspect-CtPZz0WG.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-H1MISWwN.mjs")).inspect(context);
40
+ return (await import("./inspect-wkA_8iyU.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-D06-DMej.mjs");
84
+ const { serveLocal } = await import("./serve-ChlJ955x.mjs");
85
85
  const local = await serveLocal({
86
86
  dir: flags.dir ?? join(root, ".board"),
87
87
  hosts,
@@ -1,4 +1,4 @@
1
- import { $t as SyncThreadView, B as Explanation, H as FiltersInput, Hn as ExternalCopy, I as EventsPage, It as SchemaInput, J as GrantWriteOptions, Jt as SyncFindView, K as GrantInput, Kt as SyncFindInput, Lt as SchemaView, N as Discovery, Nt as SchedulesQueryInput, Q as InboxItem, Qt as SyncReceiptInput, Rt as SourceJoin, St as RegistrationView, Un as Attachment, Vn as Actor, Vt as SourceRead, Xt as SyncImportInput, Z as InboxEntry, _ as ChannelView, b as ChannelsQueryInput, cn as TasksQueryInput, dt as MessagesPage, en as SyncedView, fn as ThreadView, g as ChannelMessagesQueryInput, hn as ThreadsQueryInput, jt as ScheduleView, lt as Me, on as TasksPage, pn as ThreadsPage, q as GrantView, r as ActorView, rn as TaskClaim, st as MatchView, u as BoardEventView, un as ThreadQueryInput, ut as MessageView, xt as RegisterInput, yn as UpdateGrantInput } from "./routes-CSnxZyyb.mjs";
1
+ import { B as Explanation, Dt as RegisterInput, H as FiltersInput, Ht as SchemaInput, I as EventsPage, J as GrantWriteOptions, Jn as ExternalCopy, K as GrantInput, Lt as ScheduleView, N as Discovery, Ot as RegistrationView, Q as InboxItem, Qt as SyncFindInput, Tn as UpdateGrantInput, Ut as SchemaView, Wt as SourceJoin, Yn as Attachment, Z as InboxEntry, _ as ChannelView, _t as MessagesPage, an as SyncThreadView, b as ChannelsQueryInput, en as SyncFindView, fn as TasksPage, ft as ManagedSyncsQueryInput, g as ChannelMessagesQueryInput, gn as ThreadQueryInput, gt as MessageView, ht as Me, in as SyncReceiptInput, ln as TaskClaim, lt as ManagedSyncInput, mn as TasksQueryInput, nn as SyncImportInput, on as SyncedView, pt as MatchView, q as GrantView, qn as Actor, qt as SourceRead, r as ActorView, u as BoardEventView, ut as ManagedSyncView, vn as ThreadView, xn as ThreadsQueryInput, yn as ThreadsPage, zt as SchedulesQueryInput } from "./routes-D5FtKOP_.mjs";
2
2
  //#region src/contract/mentions.d.ts
3
3
  /** An actor as a write's answer names them. */
4
4
  type MentionedActor = {
@@ -297,6 +297,18 @@ declare function createBoardClient(options: ClientOptions): {
297
297
  schedule: ScheduleView;
298
298
  canceled: boolean;
299
299
  }>;
300
+ /**
301
+ * Has the board itself sync a channel with a source, with no deployment of yours. A Slack
302
+ * channel, both ways, through Vercel's Slack app: `{ channel: 'alerts', source: 'slack', slack:
303
+ * { app: 'slack/vercel', channel: '#alerts' } }`, whose `state` is `pending` until someone in
304
+ * that channel agrees.
305
+ * Only Vercel's board runs one.
306
+ */
307
+ createSync: (input: ManagedSyncInput) => Promise<ManagedSyncView>;
308
+ /** The syncs the board runs itself, oldest first: every channel's, or one's. Each says its `state`, and one that isn't `active` its `reason`. */
309
+ syncs: (query?: ManagedSyncsQueryInput) => Promise<ManagedSyncView[]>;
310
+ /** Removes a sync the board runs, and what its source kept for it. What it brought in stays. */
311
+ removeSync: (id: string) => Promise<ManagedSyncView>;
300
312
  /**
301
313
  * Tasks: threads someone's agents are to do, with a state the board keeps. A task's ID is its
302
314
  * root's, and its root's `task` says its state, whose it is, what it waits for, and who holds
@@ -254,6 +254,11 @@ declare const options: {
254
254
  readonly value: 'time';
255
255
  readonly description: 'at a time: once, or with --every, the first';
256
256
  };
257
+ readonly workspace: {
258
+ readonly type: 'string';
259
+ readonly value: 'domain|id';
260
+ readonly description: 'a Slack workspace, for a team with more than one';
261
+ };
257
262
  readonly every: {
258
263
  readonly type: 'string';
259
264
  readonly value: 'duration';
@@ -202,6 +202,11 @@ const options = {
202
202
  value: "time",
203
203
  description: "at a time: once, or with --every, the first"
204
204
  },
205
+ workspace: {
206
+ type: "string",
207
+ value: "domain|id",
208
+ description: "a Slack workspace, for a team with more than one"
209
+ },
205
210
  every: {
206
211
  type: "string",
207
212
  value: "duration",
@@ -1134,19 +1139,60 @@ const commands = [
1134
1139
  {
1135
1140
  group: "messages",
1136
1141
  name: "sync",
1137
- description: "where the thread is synced, or with a target, attach it there (backfilling it)",
1138
- arguments: [id(), {
1139
- name: "target",
1142
+ description: "where a thread is synced, or with a target, attach it there (backfilling it); with a channel and a source, have the board sync the channel with it",
1143
+ arguments: [{
1144
+ name: "id|channel",
1145
+ required: true,
1146
+ description: "a message in the thread; or with a source, a channel"
1147
+ }, {
1148
+ name: "target|source",
1149
+ required: false,
1150
+ description: "where to sync the thread (slack:#incidents), or what the board syncs the channel with: slack/vercel:#channel, a Slack channel through Vercel's Slack app (on Vercel's board)"
1151
+ }],
1152
+ options: [option("workspace")],
1153
+ examples: [
1154
+ {
1155
+ name: "list where a thread is synced",
1156
+ value: "sync 812"
1157
+ },
1158
+ {
1159
+ name: "sync a thread to a Slack channel",
1160
+ value: "sync 812 slack:#incidents"
1161
+ },
1162
+ {
1163
+ name: "mirror a Slack channel both ways, once someone there agrees",
1164
+ value: "sync alerts slack/vercel:#alerts"
1165
+ }
1166
+ ],
1167
+ runsWithoutSubcommand: true,
1168
+ subcommands: [{
1169
+ name: "remove",
1170
+ description: "stop a sync the board runs (with sync where its events land): what it brought in stays",
1171
+ arguments: [{
1172
+ name: "sync",
1173
+ required: true,
1174
+ description: "its ID, as syncs shows it"
1175
+ }],
1176
+ options: [],
1177
+ examples: [{
1178
+ name: "remove a sync",
1179
+ value: "sync remove syn_4f9a2c"
1180
+ }]
1181
+ }]
1182
+ },
1183
+ {
1184
+ group: "messages",
1185
+ name: "syncs",
1186
+ description: "the syncs the board runs itself, with no deployment: every channel's, or one's, and why one isn't running",
1187
+ arguments: [{
1188
+ name: "channel",
1140
1189
  required: false,
1141
- description: "where to sync it, e.g. slack:#incidents"
1190
+ description: "a channel"
1142
1191
  }],
1143
1192
  options: [],
1144
1193
  examples: [{
1145
- name: "list where a thread is synced",
1146
- value: "sync 812"
1147
- }, {
1148
- name: "sync a thread to a Slack channel",
1149
- value: "sync 812 slack:#incidents"
1194
+ name: "list the board's syncs",
1195
+ value: "syncs"
1150
1196
  }]
1151
1197
  },
1152
1198
  {
@@ -1263,13 +1309,20 @@ const commands = [
1263
1309
  option("limit", "tasks to list (default: 50)")
1264
1310
  ],
1265
1311
  runsWithoutSubcommand: true,
1266
- examples: [{
1267
- name: "list a queue's open tasks",
1268
- value: "tasks work/"
1269
- }, {
1270
- name: "list what is ready to fix",
1271
- value: "tasks work/ --state ready --label step=fix"
1272
- }],
1312
+ examples: [
1313
+ {
1314
+ name: "list every channel's open tasks",
1315
+ value: "tasks"
1316
+ },
1317
+ {
1318
+ name: "list a queue's open tasks",
1319
+ value: "tasks work/"
1320
+ },
1321
+ {
1322
+ name: "list what is ready to fix",
1323
+ value: "tasks work/ --state ready --label step=fix"
1324
+ }
1325
+ ],
1273
1326
  subcommands: [
1274
1327
  {
1275
1328
  name: "create",
@@ -1284,15 +1337,15 @@ const commands = [
1284
1337
  description: "what to do, for a new thread: - reads it from stdin, and --file takes its place"
1285
1338
  }],
1286
1339
  options: [
1287
- option("label", "label it, to route it", "k=v"),
1340
+ option("label", "for a new thread: label it, to route it", "k=v"),
1288
1341
  option("needs"),
1289
1342
  option("for", "only this profile of yours claims it", "profile"),
1290
1343
  claimNow,
1291
1344
  option("lease", "with --claim: how long to hold it"),
1292
- option("attach"),
1345
+ option("attach", "for a new thread: attach a file, up to 10, each up to 100 MB (4 MB on some boards)"),
1293
1346
  option("file", "a plan, from a JSON file (- reads stdin): an array of tasks, each { key?, text, labels?, needs?, for?, noSync?, attachments? }, all made, in as many writes as it takes. needs takes a key of the plan (\"fix\" or {\"key\": \"fix\"}) or a task that's there by its ID (\"812\" or {\"id\": \"812\"})"),
1294
- option("no-sync", "keep it on the board: sync it nowhere. With --file, each task that sets no noSync of its own"),
1295
- option("idempotency-key", "sending the same one again makes it once")
1347
+ option("no-sync", "for a new thread, not one that is there: keep it on the board, sync it nowhere. With --file, each task that sets no noSync of its own"),
1348
+ option("idempotency-key", "for a new thread or a plan, not a thread that is there: sending the same one again makes it once")
1296
1349
  ],
1297
1350
  examples: [
1298
1351
  {
@@ -1,6 +1,6 @@
1
- import { f as BoardError } from "./errors-DjatfYjl.mjs";
1
+ import { f as BoardError } from "./errors-Ce_-E3_C.mjs";
2
2
  import { c as canonical, t as block } from "./blocks-CVoBC7ur.mjs";
3
- import { a as canText, c as compileAccess } from "./access-CZ419Vho.mjs";
3
+ import { a as canText, c as compileAccess } from "./access-D1AHzFSP.mjs";
4
4
  //#region src/client/channels.ts
5
5
  /** Every channel of a board, or every one whose path starts with `prefix`, a page at a time: for what needs them all. */
6
6
  async function everyChannel(board, prefix) {
@@ -1,4 +1,4 @@
1
- import { f as Board } from "./backend-BuqwQbb4.mjs";
1
+ import { f as Board } from "./backend-9H57DlQt.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-EtEq22w1.mjs";
1
+ import { t as conformance } from "./conformance-D9XutDay.mjs";
2
2
  export { conformance };
@@ -1,10 +1,10 @@
1
1
  import { f as typeOf, i as ATTACHMENT_BYTES_MAX, l as fileSize, o as IMPORT_BYTES_MAX, u as importedFileName } from "./profile-header-O8wC8yk8.mjs";
2
2
  import { P as toStorable, m as MESSAGE_TEXT_MAX, s as ChannelPath } from "./schemas-CUSTEFIy.mjs";
3
3
  import { l as isThreadTarget, s as channelOf } from "./external-DkWafjn-.mjs";
4
- import { c as notFound, r as badRequest, t as HttpError, v as derivedId } from "./errors-DjatfYjl.mjs";
4
+ import { c as notFound, r as badRequest, t as HttpError, v as derivedId } from "./errors-Ce_-E3_C.mjs";
5
5
  import { t as canonicalEmoji } from "./emoji-CTLpvH-A.mjs";
6
6
  import { n as isEmail, s as replaceMentions, t as extractMentions } from "./mentions-DBGmqkr2.mjs";
7
- import { a as waitUntil, c as platformProfile, f as viaText, i as afterRetry, l as shownName, o as actorParts, t as DroppedError } from "./middleware-D2AGrGj7.mjs";
7
+ import { a as waitUntil, c as platformProfile, f as viaText, i as afterRetry, l as shownName, o as actorParts, t as DroppedError } from "./middleware-DVBOEd8G.mjs";
8
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
@@ -169,6 +169,26 @@ const SchedulesQuery = z.object({
169
169
  /** Include done and canceled schedules. */
170
170
  all: flag.optional()
171
171
  });
172
+ /**
173
+ * A sync the board runs itself: one source into one channel, with no deployment of yours.
174
+ *
175
+ * A `slack` sync names the Slack app it mirrors through and the Slack channel it mirrors: `slack`,
176
+ * with the `app` as a connector is named (`slack/vercel` is Vercel's Slack app, the one the board
177
+ * takes so far), the `channel`'s name or ID, and the `workspace`'s domain or ID for a team with
178
+ * more than one. It is `pending` until someone in that channel agrees.
179
+ */
180
+ const ManagedSyncBody = z.object({
181
+ channel: ChannelPath,
182
+ source: z.enum(["slack"]),
183
+ slack: z.object({
184
+ app: z.string().max(100).regex(/^slack\/[^\s/:]+$/, "name the Slack app as a connector is named: slack/vercel"),
185
+ channel: z.string().min(1).max(100),
186
+ workspace: z.string().min(1).max(100).optional()
187
+ }).strict().optional()
188
+ }).strict();
189
+ const ManagedSyncsQuery = z.object({
190
+ /** One channel's syncs. */
191
+ channel: z.string().optional() });
172
192
  /** A channel, or with a trailing `/` it and every channel under it: `work`, `work/`. As long as a grant's pattern for either. */
173
193
  const ChannelOrSubtree = z.string().max(CHANNEL_PATTERN_MAX).regex(/^[a-z0-9][a-z0-9_-]*(?:\/[a-z0-9][a-z0-9_-]*)*\/?$/, "name a channel, or a channel and its subtree (work/)");
174
194
  /**
@@ -816,6 +836,23 @@ const routes = {
816
836
  method: "POST",
817
837
  path: "/schedules/:id/cancel"
818
838
  },
839
+ /** Brings a source's events into a channel, run by the board itself: `sync` where they land. Only a board that runs syncs takes one. */
840
+ createSync: {
841
+ method: "POST",
842
+ path: "/syncs",
843
+ body: ManagedSyncBody
844
+ },
845
+ /** The syncs the board runs itself, oldest first. */
846
+ syncs: {
847
+ method: "GET",
848
+ path: "/syncs",
849
+ query: ManagedSyncsQuery
850
+ },
851
+ /** Removes one, and what its source keeps for it: `sync` where its events land. What it brought in stays. */
852
+ removeSync: {
853
+ method: "POST",
854
+ path: "/syncs/:id/remove"
855
+ },
819
856
  /** Tasks, oldest first: open ones unless `state` says otherwise. */
820
857
  tasks: {
821
858
  method: "GET",
@@ -1743,6 +1780,18 @@ function createBoardClient(options) {
1743
1780
  /** Stops a schedule: yours, or any with manage in its channel. `canceled` is false when it was already done or canceled. */
1744
1781
  cancelSchedule: (id) => call("POST", `/schedules/${path(id)}/cancel`, { body: {} }),
1745
1782
  /**
1783
+ * Has the board itself sync a channel with a source, with no deployment of yours. A Slack
1784
+ * channel, both ways, through Vercel's Slack app: `{ channel: 'alerts', source: 'slack', slack:
1785
+ * { app: 'slack/vercel', channel: '#alerts' } }`, whose `state` is `pending` until someone in
1786
+ * that channel agrees.
1787
+ * Only Vercel's board runs one.
1788
+ */
1789
+ createSync: async (input) => (await call("POST", "/syncs", { body: input })).sync,
1790
+ /** The syncs the board runs itself, oldest first: every channel's, or one's. Each says its `state`, and one that isn't `active` its `reason`. */
1791
+ syncs: async (query = {}) => (await call("GET", `/syncs${queryString(query)}`)).syncs,
1792
+ /** Removes a sync the board runs, and what its source kept for it. What it brought in stays. */
1793
+ removeSync: async (id) => (await call("POST", `/syncs/${path(id)}/remove`, { body: {} })).sync,
1794
+ /**
1746
1795
  * Tasks: threads someone's agents are to do, with a state the board keeps. A task's ID is its
1747
1796
  * root's, and its root's `task` says its state, whose it is, what it waits for, and who holds
1748
1797
  * it. A board that keeps no tasks fails each of these with 501 `no_tasks`.
@@ -2157,4 +2206,4 @@ function toErrorResponse(error) {
2157
2206
  } }, 500);
2158
2207
  }
2159
2208
  //#endregion
2160
- export { Ref as $, ClaimTaskBody as A, ExplainQuery as B, ActorsQuery as C, ChannelMessagesQuery as D, CancelTaskBody as E, CreateTasksBody as F, InboxNextQuery as G, Filters as H, CreatedTasksQuery as I, LabelBody as J, InboxPushBody as K, DeleteBody as L, CreateChannelBody as M, CreateGrantsBody as N, ChannelsQuery as O, CreateTaskBody as P, ReactBody as Q, EditBody as R, AckBody as S, BlockTaskBody as T, GrantBody as U, FailTaskBody as V, InboxAckBody as W, MatchesQuery as X, LinkedQuery as Y, PostBody as Z, DERIVED_ID as _, ThreadsQuery as _t, duplicateId as a, SchedulesQuery as at, keyId as b, UploadStartBody as bt, notFound as c, SourceReadQuery as ct, unauthorized as d, SyncFindQuery as dt, RegisterBody as et, BoardError as f, SyncImportBody as ft, refusalCode as g, ThreadQuery as gt, eventsState as h, TasksQuery as ht, batchTooLarge as i, ScheduleBody as it, CompleteTaskBody as j, ClaimReadyTaskBody as k, textTooLong as l, SyncBody as lt, duration as m, TaskNeedsBody as mt, RejectedError as n, RenewTaskBody as nt, forbidden as o, SchemaBody as ot, createBoardClient as p, SyncReceiptBody as pt, InboxQuery as q, badRequest as r, RevokeGrantBody as rt, json as s, SourceJoinBody as st, HttpError as t, ReleaseTaskBody as tt, toErrorResponse as u, SyncCopiesQuery as ut, derivedId as v, TypingBody as vt, AssignTaskBody as w, sha256 as x, routes as xt, isKeyIdOf as y, UpdateGrantBody as yt, EventsQuery as z };
2209
+ export { PostBody as $, ClaimTaskBody as A, ExplainQuery as B, ActorsQuery as C, routes as Ct, ChannelMessagesQuery as D, CancelTaskBody as E, CreateTasksBody as F, InboxNextQuery as G, Filters as H, CreatedTasksQuery as I, LabelBody as J, InboxPushBody as K, DeleteBody as L, CreateChannelBody as M, CreateGrantsBody as N, ChannelsQuery as O, CreateTaskBody as P, MatchesQuery as Q, EditBody as R, AckBody as S, UploadStartBody as St, BlockTaskBody as T, GrantBody as U, FailTaskBody as V, InboxAckBody as W, ManagedSyncBody as X, LinkedQuery as Y, ManagedSyncsQuery as Z, DERIVED_ID as _, TasksQuery as _t, duplicateId as a, RevokeGrantBody as at, keyId as b, TypingBody as bt, notFound as c, SchemaBody as ct, unauthorized as d, SyncBody as dt, ReactBody as et, BoardError as f, SyncCopiesQuery as ft, refusalCode as g, TaskNeedsBody as gt, eventsState as h, SyncReceiptBody as ht, batchTooLarge as i, RenewTaskBody as it, CompleteTaskBody as j, ClaimReadyTaskBody as k, textTooLong as l, SourceJoinBody as lt, duration as m, SyncImportBody as mt, RejectedError as n, RegisterBody as nt, forbidden as o, ScheduleBody as ot, createBoardClient as p, SyncFindQuery as pt, InboxQuery as q, badRequest as r, ReleaseTaskBody as rt, json as s, SchedulesQuery as st, HttpError as t, Ref as tt, toErrorResponse as u, SourceReadQuery as ut, derivedId as v, ThreadQuery as vt, AssignTaskBody as w, sha256 as x, UpdateGrantBody as xt, isKeyIdOf as y, ThreadsQuery as yt, EventsQuery as z };
@@ -1,4 +1,4 @@
1
- import { i as ErrorOrigin } from "./client-B0DGOt7P.mjs";
1
+ import { i as ErrorOrigin } from "./client-BUPyzzFt.mjs";
2
2
  //#region src/server/errors.d.ts
3
3
  declare class HttpError extends Error {
4
4
  readonly status: number;
@@ -1,8 +1,8 @@
1
- import { ut as MessageView } from "./routes-CSnxZyyb.mjs";
2
- import "./auth-C0Mla9OU.mjs";
3
- import "./backend-BuqwQbb4.mjs";
4
- import { g as TaskInBatch, n as BoardError } from "./client-B0DGOt7P.mjs";
5
- import "./errors-DBZtbfph.mjs";
1
+ import { gt as MessageView } from "./routes-D5FtKOP_.mjs";
2
+ import "./auth-DcWTzrHz.mjs";
3
+ import "./backend-9H57DlQt.mjs";
4
+ import { g as TaskInBatch, n as BoardError } from "./client-BUPyzzFt.mjs";
5
+ import "./errors-CwObkpSn.mjs";
6
6
  //#region src/client/chunks.d.ts
7
7
  /** What `createTasksInChunks` makes tasks with: a handle, or anything with its `tasks.createMany`. */
8
8
  type TaskBatches = {