@vercel/board 0.52.0 → 0.53.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 (55) hide show
  1. package/dist/{access-DdojoPZm.mjs → access-Pcar1gwx.mjs} +1 -1
  2. package/dist/access.d.mts +2 -2
  3. package/dist/access.mjs +4 -4
  4. package/dist/{actors-CDkNgWUL.mjs → actors-XKUrjOfO.mjs} +2 -2
  5. package/dist/{auth-C4VxPLYz.d.mts → auth-BoYunD5t.d.mts} +1 -1
  6. package/dist/{auth-zPqFJocD.mjs → auth-C2CxMl2p.mjs} +2 -2
  7. package/dist/{backend-Da_YEltI.d.mts → backend-DJobr4nr.d.mts} +4 -4
  8. package/dist/backend-local.d.mts +1 -1
  9. package/dist/backend-local.mjs +1 -1
  10. package/dist/{chat-provider-BHyX6H8H.d.mts → chat-provider-BSHlV2lw.d.mts} +2 -2
  11. package/dist/cli-embedded.d.mts +32 -3
  12. package/dist/cli-embedded.mjs +4 -2
  13. package/dist/cli.mjs +5 -5
  14. package/dist/{client-C4-r10SA.d.mts → client-oYThy3CR.d.mts} +9 -3
  15. package/dist/{conformance-DW4-9Dwf.mjs → conformance-Cz1Elmgj.mjs} +56 -3
  16. package/dist/conformance.d.mts +1 -1
  17. package/dist/conformance.mjs +1 -1
  18. package/dist/{engine-D8YAsQS_.mjs → engine-506f7GEM.mjs} +2 -2
  19. package/dist/{errors-DbCKqGXp.mjs → errors-Cv0TGBt5.mjs} +7 -1
  20. package/dist/{exports-DI-MtN01.mjs → exports-CBukc8T3.mjs} +16 -15
  21. package/dist/{exports-BUtR_AHa.d.mts → exports-CF_nUsT5.d.mts} +4 -4
  22. package/dist/{index-BTuTaBaK.d.mts → index-CM2u0wGd.d.mts} +2 -2
  23. package/dist/index.d.mts +5 -5
  24. package/dist/index.mjs +4 -4
  25. package/dist/index.node.d.mts +6 -6
  26. package/dist/index.node.mjs +4 -4
  27. package/dist/inspect/app.js +34 -34
  28. package/dist/{inspect-BJR-BsUv.mjs → inspect-PQsEgXRQ.mjs} +2 -2
  29. package/dist/inspect-SEaGzhvh.mjs +2 -0
  30. package/dist/inspect.d.mts +1 -1
  31. package/dist/inspect.mjs +1 -1
  32. package/dist/{local-B376y9u3.mjs → local-CwcmqEoa.mjs} +37 -21
  33. package/dist/{main-DfJNxck4.mjs → main-gNAS2WbP.mjs} +79 -20
  34. package/dist/{middleware-iVTNf5Su.mjs → middleware-DXiwepsR.mjs} +1 -1
  35. package/dist/{provider-CGicSMdu.d.mts → provider-WjdBsRLR.d.mts} +2 -2
  36. package/dist/{routes-ChGBn0K3.d.mts → routes-BpvyXQwv.d.mts} +20 -2
  37. package/dist/{routes-C85Sbhtm.mjs → routes-GF5ukHYX.mjs} +24 -4
  38. package/dist/{serve-D8j7O2Tc.mjs → serve-Ci5KT11x.mjs} +6 -6
  39. package/dist/{server--BLSj6fd.mjs → server-XsbC50nY.mjs} +7 -7
  40. package/dist/{serving-aOQsBok0.mjs → serving-C6Ao7i-7.mjs} +1 -1
  41. package/dist/{shell-qrJL3Z_R.mjs → shell-BiCBL1w_.mjs} +1 -1
  42. package/dist/sync-chat-sdk.d.mts +2 -2
  43. package/dist/sync-github.d.mts +2 -2
  44. package/dist/sync-linear.d.mts +3 -3
  45. package/dist/sync-slack.d.mts +3 -3
  46. package/dist/sync.d.mts +2 -2
  47. package/dist/{task-batch-6UHphYfl.mjs → task-batch-nqYGszDJ.mjs} +4 -4
  48. package/dist/{tokens-C-T0B1uF.mjs → tokens-tulRtEWx.mjs} +2 -2
  49. package/dist/{version-NfsFHDfg.mjs → version-CBjh_ogp.mjs} +1 -1
  50. package/docs/01-board/06-watchers.md +2 -1
  51. package/docs/01-board/11-tasks.md +23 -2
  52. package/docs/04-reference/01-cli.md +54 -0
  53. package/docs/04-reference/02-board.md +11 -6
  54. package/package.json +1 -1
  55. package/dist/inspect-CYfZ0vva.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-DbCKqGXp.mjs";
2
+ import { o as forbidden } from "./errors-Cv0TGBt5.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 { Cn as ChannelPattern, Dn as GrantChangeRefusal, En as GrantChange, Fn as compileAccess, Hn as CAN_MAX, In as parseCan, Ln as union, Mn as Permission, On as GrantShape, Pn as checkGrantChange, Rn as Actor, Sn as Can, Tn as Grant, Vn as Author, bn as Access, jn as PERMISSIONS, kn as InvalidCan, wn as FULL_ACCESS, xn as AccessSummary } from "./routes-ChGBn0K3.mjs";
2
- import { _ as GrantFacts, a as DEFAULT_CAN, b as grantAccess, c as IssuerConfig, d as Principal, f as PrincipalKind, g as GrantExplanation, h as DecidingGrant, i as Claims, l as Known, m as Caller, n as AuthenticateContext, r as CallerRequest, s as HostPrincipal, t as Authenticate, u as OidcTokensOptions, v as GrantSource, y as explainGrants } from "./auth-C4VxPLYz.mjs";
1
+ import { Cn as ChannelPattern, Dn as GrantChangeRefusal, En as GrantChange, Fn as compileAccess, Hn as CAN_MAX, In as parseCan, Ln as union, Mn as Permission, On as GrantShape, Pn as checkGrantChange, Rn as Actor, Sn as Can, Tn as Grant, Vn as Author, bn as Access, jn as PERMISSIONS, kn as InvalidCan, wn as FULL_ACCESS, xn as AccessSummary } from "./routes-BpvyXQwv.mjs";
2
+ import { _ as GrantFacts, a as DEFAULT_CAN, b as grantAccess, c as IssuerConfig, d as Principal, f as PrincipalKind, g as GrantExplanation, h as DecidingGrant, i as Claims, l as Known, m as Caller, n as AuthenticateContext, r as CallerRequest, s as HostPrincipal, t as Authenticate, u as OidcTokensOptions, v as GrantSource, y as explainGrants } from "./auth-BoYunD5t.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-DdojoPZm.mjs";
3
- import { D as explainGrants, O as grantAccess, t as DEFAULT_CAN } from "./auth-zPqFJocD.mjs";
4
- import { a as resolveActor } from "./actors-CDkNgWUL.mjs";
5
- import { t as oidcTokens } from "./tokens-C-T0B1uF.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-Pcar1gwx.mjs";
3
+ import { D as explainGrants, O as grantAccess, t as DEFAULT_CAN } from "./auth-C2CxMl2p.mjs";
4
+ import { a as resolveActor } from "./actors-XKUrjOfO.mjs";
5
+ import { t as oidcTokens } from "./tokens-tulRtEWx.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 { 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-DbCKqGXp.mjs";
4
- import { u as parseCan } from "./access-DdojoPZm.mjs";
3
+ import { r as badRequest } from "./errors-Cv0TGBt5.mjs";
4
+ import { u as parseCan } from "./access-Pcar1gwx.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,4 +1,4 @@
1
- import { An as Level, Mn as Permission, Nn as WrittenCan, Sn as Can, bn as Access } from "./routes-ChGBn0K3.mjs";
1
+ import { An as Level, Mn as Permission, Nn as WrittenCan, Sn as Can, bn as Access } from "./routes-BpvyXQwv.mjs";
2
2
  import { JWTVerifyGetKey } from "jose";
3
3
  //#region src/server/grants.d.ts
4
4
  /** Who asks, as a verified token says, in the terms grants name them by. */
@@ -1,5 +1,5 @@
1
- import { d as unauthorized, o as forbidden, r as badRequest, t as HttpError } from "./errors-DbCKqGXp.mjs";
2
- import { c as compileAccess, l as decide, p as writtenCan, s as combine, t as FULL_ACCESS, u as parseCan } from "./access-DdojoPZm.mjs";
1
+ import { d as unauthorized, o as forbidden, r as badRequest, t as HttpError } from "./errors-Cv0TGBt5.mjs";
2
+ import { c as compileAccess, l as decide, p as writtenCan, s as combine, t as FULL_ACCESS, u as parseCan } from "./access-Pcar1gwx.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,7 +1,7 @@
1
- import { A as Discovery, An as Level, Bn as Attachment, C as CreateGrantsBody, Ct as RevokeGrantBody, E as CreateTasksBody, Ft as SourceJoin, Gn as ExternalEvent, Gt as SyncFindView, Ht as SyncCopiesView, I as ExplainQuery, It as SourceJoinBody, J as InboxEntry, Jt as SyncReceiptBody, Kt as SyncImportBody, L as Explanation, M as EditBody, Mn as Permission, Mt as SchemaBody, N as EventsPage, O as CreatedTasksQuery, Ot as ScheduleView, P as EventsQuery, Pt as SchemaView, Q as InboxQuery, R as FailTaskBody, Rn as Actor, Rt as SourceRead, S as CreateChannelBody, Sn as Can, Tt as ScheduleBody, Un as Labels, V as GrantBody, Vn as Author, Vt as SyncCopiesQuery, W as GrantView, Wt as SyncFindQuery, X as InboxNextQuery, Xt as SyncThreadView, Y as InboxItem, Z as InboxPushBody, Zt as SyncedView, _n as UploadStartBody, _t as RegisterBody, a as BlockTaskBody, at as MatchesQuery, b as ClaimTaskBody, bn as Access, bt as ReleaseTaskBody, ct as MessagesPage, d as CancelTaskBody, dn as ThreadsQuery, en as TaskClaim, f as ChannelMessagesQuery, g as ChannelsQuery, h as ChannelsPage, hn as UpdateGrantBody, ht as ReactBody, i as AssignTaskBody, in as TasksQuery, it as MatchView, k as DeleteBody, kt as SchedulesQuery, ln as ThreadView, m as ChannelView, n as ActorView, on as ThreadQuery, ot as Me, pn as TypingBody, q as InboxAckBody, rn as TasksPage, rt as LinkedQuery, s as BoardEventView, st as MessageView, t as AckBody, tn as TaskNeedsBody, tt as LabelBody, un as ThreadsPage, ut as PostBody, v as ClaimReadyTaskBody, vn as UploadTicket, w as CreateTaskBody, x as CompleteTaskBody, xt as RenewTaskBody, yt as RegistrationView, zt as SourceReadQuery } from "./routes-ChGBn0K3.mjs";
2
- import { l as Known, o as Granted, p as StoredGrant, t as Authenticate } from "./auth-C4VxPLYz.mjs";
3
- import { S as Mentioned, f as ProfileOption, i as ErrorOrigin, t as BoardClient } from "./client-C4-r10SA.mjs";
4
- import { m as SyncProvider } from "./provider-CGicSMdu.mjs";
1
+ import { A as Discovery, An as Level, Bn as Attachment, C as CreateGrantsBody, Ct as RevokeGrantBody, E as CreateTasksBody, Ft as SourceJoin, Gn as ExternalEvent, Gt as SyncFindView, Ht as SyncCopiesView, I as ExplainQuery, It as SourceJoinBody, J as InboxEntry, Jt as SyncReceiptBody, Kt as SyncImportBody, L as Explanation, M as EditBody, Mn as Permission, Mt as SchemaBody, N as EventsPage, O as CreatedTasksQuery, Ot as ScheduleView, P as EventsQuery, Pt as SchemaView, Q as InboxQuery, R as FailTaskBody, Rn as Actor, Rt as SourceRead, S as CreateChannelBody, Sn as Can, Tt as ScheduleBody, Un as Labels, V as GrantBody, Vn as Author, Vt as SyncCopiesQuery, W as GrantView, Wt as SyncFindQuery, X as InboxNextQuery, Xt as SyncThreadView, Y as InboxItem, Z as InboxPushBody, Zt as SyncedView, _n as UploadStartBody, _t as RegisterBody, a as BlockTaskBody, at as MatchesQuery, b as ClaimTaskBody, bn as Access, bt as ReleaseTaskBody, ct as MessagesPage, d as CancelTaskBody, dn as ThreadsQuery, en as TaskClaim, f as ChannelMessagesQuery, g as ChannelsQuery, h as ChannelsPage, hn as UpdateGrantBody, ht as ReactBody, i as AssignTaskBody, in as TasksQuery, it as MatchView, k as DeleteBody, kt as SchedulesQuery, ln as ThreadView, m as ChannelView, n as ActorView, on as ThreadQuery, ot as Me, pn as TypingBody, q as InboxAckBody, rn as TasksPage, rt as LinkedQuery, s as BoardEventView, st as MessageView, t as AckBody, tn as TaskNeedsBody, tt as LabelBody, un as ThreadsPage, ut as PostBody, v as ClaimReadyTaskBody, vn as UploadTicket, w as CreateTaskBody, x as CompleteTaskBody, xt as RenewTaskBody, yt as RegistrationView, zt as SourceReadQuery } from "./routes-BpvyXQwv.mjs";
2
+ import { l as Known, o as Granted, p as StoredGrant, t as Authenticate } from "./auth-BoYunD5t.mjs";
3
+ import { S as Mentioned, f as ProfileOption, i as ErrorOrigin, t as BoardClient } from "./client-oYThy3CR.mjs";
4
+ import { m as SyncProvider } from "./provider-WjdBsRLR.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. */
@@ -1,4 +1,4 @@
1
- import { t as Backend } from "./backend-Da_YEltI.mjs";
1
+ import { t as Backend } from "./backend-DJobr4nr.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-B376y9u3.mjs";
1
+ import { t as local } from "./local-CwcmqEoa.mjs";
2
2
  export { local };
@@ -1,5 +1,5 @@
1
- import { Ft as SourceJoin, Kn as ExternalFile, Rn as Actor, Rt as SourceRead, Wn as ExternalAuthor, qn as ExternalLink } from "./routes-ChGBn0K3.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-CGicSMdu.mjs";
1
+ import { Ft as SourceJoin, Kn as ExternalFile, Rn as Actor, Rt as SourceRead, Wn as ExternalAuthor, qn as ExternalLink } from "./routes-BpvyXQwv.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-WjdBsRLR.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,19 @@
1
- import { f as Board } from "./backend-Da_YEltI.mjs";
2
- import "./index-BTuTaBaK.mjs";
1
+ import { f as Board } from "./backend-DJobr4nr.mjs";
2
+ import "./index-CM2u0wGd.mjs";
3
+ //#region src/cli/claims.d.ts
4
+ /** A claim as the CLI keeps it: what its writes carry, and when its lease ends. */
5
+ type HeldClaim = {
6
+ epoch: number;
7
+ token: string;
8
+ until: string;
9
+ };
10
+ /** The claims one run holds on one board, as whoever it writes as, by task. */
11
+ type Claims = {
12
+ get(task: string): Promise<HeldClaim | null>;
13
+ put(task: string, claim: HeldClaim): Promise<void>;
14
+ drop(task: string): Promise<void>;
15
+ };
16
+ //#endregion
3
17
  //#region src/cli/failure.d.ts
4
18
  /**
5
19
  * What kind of failure it is, which fixes the exit code: 2 for `usage` and `missing_input`, 130
@@ -107,6 +121,21 @@ export type VbOptions = {
107
121
  signal?: AbortSignal;
108
122
  /** Commands this caller doesn't run, which answer 2: `['tail', 'wait']` for an agent's tool. */
109
123
  refuse?: string[];
124
+ /**
125
+ * Where the task claims this call takes and settles are kept, for the profile it writes as (null
126
+ * as the handle's own), in place of the handle's memory: a store in KV or a file, so a claim one
127
+ * call takes is settled by a call on another handle, process, or instance. It holds tokens, so
128
+ * only you read it, and it's one board's: key it by the board too when it holds several.
129
+ */
130
+ claims?: (profile: string | null) => Claims;
131
+ /**
132
+ * The token the task claims this call takes carry, in place of one the board makes: a secret you
133
+ * can derive again on any instance, as an HMAC of your run's ID, so a call that has it settles
134
+ * the claim with no store, and claiming a task you hold again answers the claim you hold. It
135
+ * never reaches stdout. Anyone who can label in the task's channel and has it writes through
136
+ * the claim, so keep it as secret as a token.
137
+ */
138
+ claimToken?: string;
110
139
  };
111
140
  /** What a `vb()` command printed, and its exit code: 0, 1 for an error (a `wait` that timed out included), 2 for misuse. */
112
141
  export type VbResult = {
@@ -124,4 +153,4 @@ export type VbResult = {
124
153
  */
125
154
  export declare function vb(board: Board, argv: string[], options?: VbOptions): Promise<VbResult>;
126
155
  //#endregion
127
- export type { Failure, FailureClass, Recovery, Warning };
156
+ export type { Claims, Failure, FailureClass, HeldClaim, Recovery, Warning };
@@ -1,5 +1,5 @@
1
- import { o as stoppedBy } from "./exports-DI-MtN01.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-DfJNxck4.mjs";
1
+ import { o as stoppedBy } from "./exports-CBukc8T3.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-gNAS2WbP.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
@@ -85,6 +85,8 @@ function vb(board, argv, options = {}) {
85
85
  }, {
86
86
  board: options.signal && stoppedBy(board, options.signal) || board,
87
87
  claimsOf: board,
88
+ ...options.claims ? { claims: options.claims } : {},
89
+ ...options.claimToken !== void 0 ? { claimToken: options.claimToken } : {},
88
90
  write: (chunk) => void (stdout += typeof chunk === "string" ? chunk : decoder.decode(chunk, { stream: true })),
89
91
  error: (chunk) => void (stderr += chunk),
90
92
  readFile: options.readFile ? async (path) => options.readFile(path) : lacking("--attach and --file can't read files", "readFile"),
package/dist/cli.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { a as option } from "./commands-B_gbi2sU.mjs";
3
- import { g as projectDir } from "./server--BLSj6fd.mjs";
4
- import { r as main } from "./main-DfJNxck4.mjs";
5
- import { i as createInspector, r as stopped, t as allowedHosts } from "./inspect-BJR-BsUv.mjs";
3
+ import { g as projectDir } from "./server-XsbC50nY.mjs";
4
+ import { r as main } from "./main-gNAS2WbP.mjs";
5
+ import { i as createInspector, r as stopped, t as allowedHosts } from "./inspect-PQsEgXRQ.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-CYfZ0vva.mjs")).inspect(context);
40
+ return (await import("./inspect-SEaGzhvh.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-D8j7O2Tc.mjs");
84
+ const { serveLocal } = await import("./serve-Ci5KT11x.mjs");
85
85
  const local = await serveLocal({
86
86
  dir: flags.dir ?? join(root, ".board"),
87
87
  hosts,
@@ -1,4 +1,4 @@
1
- import { A as Discovery, At as SchedulesQueryInput, Bn as Attachment, Ft as SourceJoin, G as GrantWriteOptions, Gt as SyncFindView, J as InboxEntry, L as Explanation, N as EventsPage, Nt as SchemaInput, Ot as ScheduleView, Pt as SchemaView, Rn as Actor, Rt as SourceRead, U as GrantInput, Ut as SyncFindInput, W as GrantView, Xt as SyncThreadView, Y as InboxItem, Yt as SyncReceiptInput, Zt as SyncedView, _ as ChannelsQueryInput, an as TasksQueryInput, ct as MessagesPage, en as TaskClaim, fn as ThreadsQueryInput, gn as UpdateGrantInput, it as MatchView, ln as ThreadView, m as ChannelView, n as ActorView, ot as Me, p as ChannelMessagesQueryInput, qt as SyncImportInput, rn as TasksPage, s as BoardEventView, sn as ThreadQueryInput, st as MessageView, un as ThreadsPage, vt as RegisterInput, yt as RegistrationView, z as FiltersInput, zn as ExternalCopy } from "./routes-ChGBn0K3.mjs";
1
+ import { A as Discovery, At as SchedulesQueryInput, Bn as Attachment, Ft as SourceJoin, G as GrantWriteOptions, Gt as SyncFindView, J as InboxEntry, L as Explanation, N as EventsPage, Nt as SchemaInput, Ot as ScheduleView, Pt as SchemaView, Rn as Actor, Rt as SourceRead, U as GrantInput, Ut as SyncFindInput, W as GrantView, Xt as SyncThreadView, Y as InboxItem, Yt as SyncReceiptInput, Zt as SyncedView, _ as ChannelsQueryInput, an as TasksQueryInput, ct as MessagesPage, en as TaskClaim, fn as ThreadsQueryInput, gn as UpdateGrantInput, it as MatchView, ln as ThreadView, m as ChannelView, n as ActorView, ot as Me, p as ChannelMessagesQueryInput, qt as SyncImportInput, rn as TasksPage, s as BoardEventView, sn as ThreadQueryInput, st as MessageView, un as ThreadsPage, vt as RegisterInput, yt as RegistrationView, z as FiltersInput, zn as ExternalCopy } from "./routes-BpvyXQwv.mjs";
2
2
  //#region src/contract/mentions.d.ts
3
3
  /** An actor as a write's answer names them. */
4
4
  type MentionedActor = {
@@ -108,13 +108,14 @@ type ScheduleOptions = Omit<PostOptions, 'sync' | 'id'> & ScheduleTiming;
108
108
  /**
109
109
  * What makes a thread a task: the tasks it waits for (`needs`, by their IDs), the one actor of
110
110
  * yours that claims it (`for`, `<your principal>+<profile>`), and `claim`, which claims it in the
111
- * same write, for `lease` seconds.
111
+ * same write, for `lease` seconds, with `token` as its token when you bring one.
112
112
  */
113
113
  type TaskOptions = {
114
114
  needs?: string[];
115
115
  for?: string | null;
116
116
  claim?: boolean;
117
117
  lease?: number;
118
+ token?: string;
118
119
  };
119
120
  /** A new thread that's a task: its root's text, labels, `noSync`, `attachments`, and `id`, as a post takes them, and what makes it a task. */
120
121
  type NewTaskOptions = TaskOptions & Pick<PostOptions, 'text' | 'labels' | 'noSync' | 'attachments' | 'id'>;
@@ -300,9 +301,12 @@ declare function createBoardClient(options: ClientOptions): {
300
301
  * Tasks, oldest first, each as its thread's summary: open ones (`waiting`, `ready`, `claimed`,
301
302
  * `blocked`) unless `state` says `all` or names one. `owner` and `for` take a handle or an ID,
302
303
  * `needs` a task's ID, for the tasks that wait for it. `cursor`, as `after`, reads the next page.
304
+ * `latest` answers the `limit` last active instead, the latest active last: the board reads every
305
+ * task to find them, and builds only those.
303
306
  */
304
- list: (query?: Omit<TasksQueryInput, 'label'> & {
307
+ list: (query?: Omit<TasksQueryInput, 'label' | 'latest'> & {
305
308
  label?: Record<string, string> | string[];
309
+ latest?: boolean;
306
310
  }) => Promise<TasksPage>;
307
311
  create: {
308
312
  (target: string, input: string | NewTaskOptions): Promise<{
@@ -324,6 +328,7 @@ declare function createBoardClient(options: ClientOptions): {
324
328
  claim: {
325
329
  (target: string, opts?: {
326
330
  lease?: number;
331
+ token?: string;
327
332
  signal?: AbortSignal;
328
333
  }): Promise<ClaimedTask>;
329
334
  (target: {
@@ -332,6 +337,7 @@ declare function createBoardClient(options: ClientOptions): {
332
337
  from?: string[];
333
338
  wait?: number;
334
339
  lease?: number;
340
+ token?: string;
335
341
  }, opts?: {
336
342
  signal?: AbortSignal;
337
343
  }): Promise<ClaimedTask | null>;
@@ -1,7 +1,7 @@
1
- import "./routes-C85Sbhtm.mjs";
2
- import { f as BoardError } from "./errors-DbCKqGXp.mjs";
1
+ import "./routes-GF5ukHYX.mjs";
2
+ import { f as BoardError } from "./errors-Cv0TGBt5.mjs";
3
3
  import { c as canonical, t as block } from "./blocks-CVoBC7ur.mjs";
4
- import { a as canText, c as compileAccess } from "./access-DdojoPZm.mjs";
4
+ import { a as canText, c as compileAccess } from "./access-Pcar1gwx.mjs";
5
5
  //#region src/client/channels.ts
6
6
  /** Every channel of a board, or every one whose path starts with `prefix`, a page at a time: for what needs them all. */
7
7
  async function everyChannel(board, prefix) {
@@ -1291,6 +1291,59 @@ const CHECKS = [
1291
1291
  alike(await waiting(`${ctx.channel}/`), [here.id, there.id], `the tasks that wait for one, under ${ctx.channel}/`);
1292
1292
  }
1293
1293
  },
1294
+ {
1295
+ group: "tasks",
1296
+ name: "lists the last active tasks with latest, wherever they come in the order they were made",
1297
+ run: async (ctx) => {
1298
+ const labels = {
1299
+ ...ctx.labels,
1300
+ "conformance-latest": ctx.labels.conformance
1301
+ };
1302
+ const { task: first } = await task(ctx, "conformance: made first, active last", { labels });
1303
+ const { task: second } = await task(ctx, "conformance: made second, active first", { labels });
1304
+ const { task: third } = await task(ctx, "conformance: made third, active second", { labels });
1305
+ for (const root of [
1306
+ second,
1307
+ third,
1308
+ first
1309
+ ]) {
1310
+ await new Promise((resolve) => setTimeout(resolve, 20));
1311
+ await reply(ctx, root.id, "conformance: progress");
1312
+ }
1313
+ const listed = async (query) => (await ctx.board.tasks.list({
1314
+ channel: ctx.channel,
1315
+ label: labels,
1316
+ state: "all",
1317
+ ...query
1318
+ })).tasks.map((t) => t.message.id);
1319
+ await soon(async () => show(await listed({
1320
+ latest: true,
1321
+ limit: 3
1322
+ })) === show([
1323
+ second.id,
1324
+ third.id,
1325
+ first.id
1326
+ ]), "with latest, the tasks should list the latest active last");
1327
+ alike(await listed({
1328
+ latest: true,
1329
+ limit: 2
1330
+ }), [third.id, first.id], "the 2 last active, with latest");
1331
+ alike(await listed({ limit: 2 }), [first.id, second.id], "the 2 first made, without it");
1332
+ const last = (await ctx.board.tasks.list({
1333
+ channel: ctx.channel,
1334
+ label: labels,
1335
+ state: "all",
1336
+ latest: true,
1337
+ limit: 1
1338
+ })).tasks[0];
1339
+ same(last.last?.text, "conformance: progress", "a last active task's latest reply");
1340
+ await rejects(ctx.board.tasks.list({
1341
+ channel: ctx.channel,
1342
+ latest: true,
1343
+ after: first.id
1344
+ }), 400, "invalid_request", "latest with an after");
1345
+ }
1346
+ },
1294
1347
  {
1295
1348
  group: "tasks",
1296
1349
  name: "says task.ready each time a task that needs others becomes ready: right after it is made or unblocked, once they have completed",
@@ -1,4 +1,4 @@
1
- import { f as Board } from "./backend-Da_YEltI.mjs";
1
+ import { f as Board } from "./backend-DJobr4nr.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-DW4-9Dwf.mjs";
1
+ import { t as conformance } from "./conformance-Cz1Elmgj.mjs";
2
2
  export { conformance };
@@ -2,8 +2,8 @@ import { f as typeOf, i as ATTACHMENT_BYTES_MAX, l as fileSize, o as IMPORT_BYTE
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
4
  import { t as canonicalEmoji } from "./emoji-CTLpvH-A.mjs";
5
- import { c as notFound, r as badRequest, t as HttpError } from "./errors-DbCKqGXp.mjs";
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-iVTNf5Su.mjs";
5
+ import { c as notFound, r as badRequest, t as HttpError } from "./errors-Cv0TGBt5.mjs";
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-DXiwepsR.mjs";
7
7
  import { a as replaceMentions, n as isEmail, t as extractMentions } from "./mentions-CnWt9Z5b.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";
@@ -280,8 +280,12 @@ function createBoardClient(options) {
280
280
  async function claimTask(target, opts = {}) {
281
281
  const signal = opts.signal ? { signal: opts.signal } : {};
282
282
  if (typeof target === "string") {
283
+ const body = {
284
+ ...opts.lease !== void 0 ? { lease: opts.lease } : {},
285
+ ...opts.token !== void 0 ? { token: opts.token } : {}
286
+ };
283
287
  const { task, claim } = await call("POST", `/tasks/${path(target)}/claim`, {
284
- body: opts.lease !== void 0 ? { lease: opts.lease } : {},
288
+ body,
285
289
  ...signal
286
290
  });
287
291
  return claimed(task, claim);
@@ -478,6 +482,8 @@ function createBoardClient(options) {
478
482
  * Tasks, oldest first, each as its thread's summary: open ones (`waiting`, `ready`, `claimed`,
479
483
  * `blocked`) unless `state` says `all` or names one. `owner` and `for` take a handle or an ID,
480
484
  * `needs` a task's ID, for the tasks that wait for it. `cursor`, as `after`, reads the next page.
485
+ * `latest` answers the `limit` last active instead, the latest active last: the board reads every
486
+ * task to find them, and builds only those.
481
487
  */
482
488
  list: (query = {}) => call("GET", `/tasks${queryString(query)}`),
483
489
  create: createTask,
@@ -1,15 +1,15 @@
1
1
  import { d as mediaType, i as ATTACHMENT_BYTES_MAX, n as formatProfileHeader, o as IMPORT_BYTES_MAX } from "./profile-header-O8wC8yk8.mjs";
2
2
  import { T as TASK_LABEL, b as RemoteWatcherId, y as RESERVED_LABEL_PREFIX } from "./schemas-CUSTEFIy.mjs";
3
- import { $ as routes, A as ReactBody, B as SourceReadQuery, C as InboxNextQuery, D as LinkedQuery, E as LabelBody, F as RevokeGrantBody, G as SyncReceiptBody, H as SyncCopiesQuery, I as ScheduleBody, J as ThreadQuery, K as TaskNeedsBody, L as SchedulesQuery, M as RegisterBody, N as ReleaseTaskBody, O as MatchesQuery, P as RenewTaskBody, Q as UploadStartBody, R as SchemaBody, S as InboxAckBody, T as InboxQuery, U as SyncFindQuery, V as SyncBody, W as SyncImportBody, X as TypingBody, Y as ThreadsQuery, Z as UpdateGrantBody, _ as EventsQuery, a as ChannelMessagesQuery, c as ClaimTaskBody, d as CreateGrantsBody, f as CreateTaskBody, g as EditBody, h as DeleteBody, i as CancelTaskBody, j as Ref, k as PostBody, l as CompleteTaskBody, m as CreatedTasksQuery, n as AssignTaskBody, o as ChannelsQuery, p as CreateTasksBody, q as TasksQuery, r as BlockTaskBody, s as ClaimReadyTaskBody, t as AckBody, u as CreateChannelBody, v as ExplainQuery, w as InboxPushBody, x as GrantBody, y as FailTaskBody, z as SourceJoinBody } from "./routes-C85Sbhtm.mjs";
4
- import { a as duplicateId, c as notFound, d as unauthorized, f as BoardError, h as eventsState, i as batchTooLarge, m as duration, n as RejectedError, o as forbidden, p as createBoardClient, r as badRequest, s as json, t as HttpError, u as toErrorResponse } from "./errors-DbCKqGXp.mjs";
5
- import { _ as sha256, a as waitUntil, c as platformProfile, d as userIdOf, m as derivedId, o as actorParts, r as runMiddleware, s as importedHandle, t as DroppedError, u as underPrincipal } from "./middleware-iVTNf5Su.mjs";
3
+ import { $ as routes, A as ReactBody, B as SourceReadQuery, C as InboxNextQuery, D as LinkedQuery, E as LabelBody, F as RevokeGrantBody, G as SyncReceiptBody, H as SyncCopiesQuery, I as ScheduleBody, J as ThreadQuery, K as TaskNeedsBody, L as SchedulesQuery, M as RegisterBody, N as ReleaseTaskBody, O as MatchesQuery, P as RenewTaskBody, Q as UploadStartBody, R as SchemaBody, S as InboxAckBody, T as InboxQuery, U as SyncFindQuery, V as SyncBody, W as SyncImportBody, X as TypingBody, Y as ThreadsQuery, Z as UpdateGrantBody, _ as EventsQuery, a as ChannelMessagesQuery, c as ClaimTaskBody, d as CreateGrantsBody, f as CreateTaskBody, g as EditBody, h as DeleteBody, i as CancelTaskBody, j as Ref, k as PostBody, l as CompleteTaskBody, m as CreatedTasksQuery, n as AssignTaskBody, o as ChannelsQuery, p as CreateTasksBody, q as TasksQuery, r as BlockTaskBody, s as ClaimReadyTaskBody, t as AckBody, u as CreateChannelBody, v as ExplainQuery, w as InboxPushBody, x as GrantBody, y as FailTaskBody, z as SourceJoinBody } from "./routes-GF5ukHYX.mjs";
4
+ import { a as duplicateId, c as notFound, d as unauthorized, f as BoardError, h as eventsState, i as batchTooLarge, m as duration, n as RejectedError, o as forbidden, p as createBoardClient, r as badRequest, s as json, t as HttpError, u as toErrorResponse } from "./errors-Cv0TGBt5.mjs";
5
+ import { _ as sha256, a as waitUntil, c as platformProfile, d as userIdOf, m as derivedId, o as actorParts, r as runMiddleware, s as importedHandle, t as DroppedError, u as underPrincipal } from "./middleware-DXiwepsR.mjs";
6
6
  import { n as blocksIn, r as findBlocks } from "./blocks-CVoBC7ur.mjs";
7
7
  import { a as replaceMentions, i as mentionTerms, o as settleMentions, r as mentionTerm, t as extractMentions } from "./mentions-CnWt9Z5b.mjs";
8
- import { t as VERSION } from "./version-NfsFHDfg.mjs";
9
- import { a as canText, c as compileAccess, d as parsePattern, n as InvalidCan, r as PERMISSIONS, t as FULL_ACCESS, u as parseCan } from "./access-DdojoPZm.mjs";
10
- import { _ as SYNC, a as runMatch, d as openapi, f as queryObject, g as uploadName, h as carried, i as canonicalWatchers, l as METHODS, m as readJson, n as SYNC_ACTOR, o as compileWatcher, p as readCapped, r as syncTarget, t as batchPlan, u as createRouter } from "./task-batch-6UHphYfl.mjs";
11
- import { C as verifiedIssuers, D as explainGrants, d as createAuthority, f as fromTokens, m as hostPrincipal, o as VERCEL_ISSUER, p as grantIssuers, t as DEFAULT_CAN$1, v as namesByLogin, w as verifiesTokens } from "./auth-zPqFJocD.mjs";
12
- import { a as resolveActor, o as viaOf, r as claimsOf, t as KNOWN_AGENTS } from "./actors-CDkNgWUL.mjs";
8
+ import { t as VERSION } from "./version-CBjh_ogp.mjs";
9
+ import { a as canText, c as compileAccess, d as parsePattern, n as InvalidCan, r as PERMISSIONS, t as FULL_ACCESS, u as parseCan } from "./access-Pcar1gwx.mjs";
10
+ import { _ as SYNC, a as runMatch, d as openapi, f as queryObject, g as uploadName, h as carried, i as canonicalWatchers, l as METHODS, m as readJson, n as SYNC_ACTOR, o as compileWatcher, p as readCapped, r as syncTarget, t as batchPlan, u as createRouter } from "./task-batch-nqYGszDJ.mjs";
11
+ import { C as verifiedIssuers, D as explainGrants, d as createAuthority, f as fromTokens, m as hostPrincipal, o as VERCEL_ISSUER, p as grantIssuers, t as DEFAULT_CAN$1, v as namesByLogin, w as verifiesTokens } from "./auth-C2CxMl2p.mjs";
12
+ import { a as resolveActor, o as viaOf, r as claimsOf, t as KNOWN_AGENTS } from "./actors-XKUrjOfO.mjs";
13
13
  import { t as checkValue } from "./data-values-CoTP0SQG.mjs";
14
14
  //#region src/server/registrant.ts
15
15
  /** Registering again this soon after the same registration only repeats it. */
@@ -4202,7 +4202,7 @@ function createVercel(options, environment) {
4202
4202
  const path = await onBoard(who, "/tasks");
4203
4203
  const found = [];
4204
4204
  let from = after !== void 0 ? { after } : {};
4205
- while (found.length < limit) {
4205
+ while (query.latest || found.length < limit) {
4206
4206
  const page = await api(who, "GET", path, {
4207
4207
  version: 2,
4208
4208
  query: {
@@ -4213,11 +4213,12 @@ function createVercel(options, environment) {
4213
4213
  }).catch((error) => {
4214
4214
  throw taskRefusal(error);
4215
4215
  });
4216
- for (const task of page.tasks) if (found.length < limit && matching(task)) found.push(task);
4216
+ for (const task of page.tasks) if ((query.latest || found.length < limit) && matching(task)) found.push(task);
4217
4217
  if (!page.cursor) break;
4218
4218
  from = { cursor: page.cursor };
4219
4219
  }
4220
- const tasks = await summaries(who, await Promise.all(found.map(async (task) => ({
4220
+ const kept = query.latest ? [...found].sort((a, b) => a.lastActivityAt - b.lastActivityAt).slice(-limit) : found;
4221
+ const tasks = await summaries(who, await Promise.all(kept.map(async (task) => ({
4221
4222
  thread: listedOf(task),
4222
4223
  channel: await channelById(who, task.channelId)
4223
4224
  }))), signal);
@@ -4229,7 +4230,7 @@ function createVercel(options, environment) {
4229
4230
  },
4230
4231
  async createTask(caller, input, signal) {
4231
4232
  const who = whoOf(caller);
4232
- const token = input.claim ? newClaimToken() : null;
4233
+ const token = input.claim ? input.token ?? newClaimToken() : null;
4233
4234
  const spec = taskSpec(input, token);
4234
4235
  let made;
4235
4236
  let root;
@@ -4377,9 +4378,9 @@ function createVercel(options, environment) {
4377
4378
  async createdTasks(_caller, { id }) {
4378
4379
  throw notFound(`no batch of yours has id ${id}`, "batch_not_found");
4379
4380
  },
4380
- async claimTask(caller, { id, lease }, signal) {
4381
+ async claimTask(caller, { id, lease, token: sent }, signal) {
4381
4382
  const who = whoOf(caller);
4382
- const token = newClaimToken();
4383
+ const token = sent ?? newClaimToken();
4383
4384
  const made = await taskWrite(who, `${await taskPath(who, id, signal)}/claim`, {
4384
4385
  claimToken: token,
4385
4386
  leaseSeconds: lease ?? 900
@@ -4398,7 +4399,7 @@ function createVercel(options, environment) {
4398
4399
  if (signal.aborted) return { task: null };
4399
4400
  const path = await onBoard(who, "/tasks/claim");
4400
4401
  const wait = Math.min(WAIT_MAX_S, Math.ceil(input.wait ?? 0));
4401
- const token = newClaimToken();
4402
+ const token = input.token ?? newClaimToken();
4402
4403
  const body = {
4403
4404
  operationId: operationId(),
4404
4405
  claimToken: token,
@@ -1,7 +1,7 @@
1
- import { st as MessageView } from "./routes-ChGBn0K3.mjs";
2
- import "./auth-C4VxPLYz.mjs";
3
- import "./backend-Da_YEltI.mjs";
4
- import { g as TaskInBatch, n as BoardError } from "./client-C4-r10SA.mjs";
1
+ import { st as MessageView } from "./routes-BpvyXQwv.mjs";
2
+ import "./auth-BoYunD5t.mjs";
3
+ import "./backend-DJobr4nr.mjs";
4
+ import { g as TaskInBatch, n as BoardError } from "./client-oYThy3CR.mjs";
5
5
  //#region src/client/chunks.d.ts
6
6
  /** What `createTasksInChunks` makes tasks with: a handle, or anything with its `tasks.createMany`. */
7
7
  type TaskBatches = {
@@ -1,5 +1,5 @@
1
- import { f as Board, p as BoardOptions } from "./backend-Da_YEltI.mjs";
2
- import "./exports-BUtR_AHa.mjs";
1
+ import { f as Board, p as BoardOptions } from "./backend-DJobr4nr.mjs";
2
+ import "./exports-CF_nUsT5.mjs";
3
3
  //#region src/server/index.d.ts
4
4
  /**
5
5
  * The handle on a board. Without a `backend`, it's Vercel's board for your team, the one `name`
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
- import { $ as LABEL_CONDITIONS_MAX, $t as THREADS_LIMIT_MAX, A as Discovery, At as SchedulesQueryInput, B as GRANT_BATCH_MAX, Bn as Attachment, Bt as SyncBody, C as CreateGrantsBody, Ct as RevokeGrantBody, D as CreateTasksInput, Dt as ScheduleInput, E as CreateTasksBody, Et as ScheduleBodyOutput, F as EventsQueryInput, Ft as SourceJoin, G as GrantWriteOptions, Gt as SyncFindView, H as GrantCan, Ht as SyncCopiesView, I as ExplainQuery, It as SourceJoinBody, J as InboxEntry, Jt as SyncReceiptBody, K as INBOX_EVENT_ID_MAX, Kt as SyncImportBody, L as Explanation, Lt as SourceMessage, M as EditBody, Mt as SchemaBody, N as EventsPage, Nt as SchemaInput, O as CreatedTasksQuery, Ot as ScheduleView, P as EventsQuery, Pt as SchemaView, Q as InboxQuery, Qt as THREADS_LIMIT_DEFAULT, R as FailTaskBody, Rt as SourceRead, S as CreateChannelBody, St as ResolvedSyncTarget, T as CreateTaskInput, Tt as ScheduleBody, U as GrantInput, Ut as SyncFindInput, V as GrantBody, Vt as SyncCopiesQuery, W as GrantView, Wt as SyncFindQuery, X as InboxNextQuery, Xt as SyncThreadView, Y as InboxItem, Yt as SyncReceiptInput, Z as InboxPushBody, Zt as SyncedView, _ as ChannelsQueryInput, _n as UploadStartBody, _t as RegisterBody, a as BlockTaskBody, an as TasksQueryInput, at as MatchesQuery, b as ClaimTaskBody, bt as ReleaseTaskBody, c as CHANNELS_LIMIT_DEFAULT, cn as ThreadSummaryView, ct as MessagesPage, d as CancelTaskBody, dn as ThreadsQuery, dt as PostInput, en as TaskClaim, et as LEASE_DEFAULT_S, f as ChannelMessagesQuery, fn as ThreadsQueryInput, ft as PrincipalInput, g as ChannelsQuery, gn as UpdateGrantInput, gt as Ref, h as ChannelsPage, hn as UpdateGrantBody, ht as ReactBody, i as AssignTaskBody, in as TasksQuery, it as MatchView, j as EVENTS_LAST_MAX, jt as SchedulesQueryOutput, k as DeleteBody, kt as SchedulesQuery, l as CHANNELS_LIMIT_MAX, ln as ThreadView, lt as ParsedFilters, m as ChannelView, mn as TypingResult, mt as REGISTERED_WATCHERS_MAX, n as ActorView, nn as TaskView, nt as LinkView, o as BlockView, on as ThreadQuery, ot as Me, p as ChannelMessagesQueryInput, pn as TypingBody, pt as PrincipalView, q as InboxAckBody, qt as SyncImportInput, r as ApiError, rn as TasksPage, rt as LinkedQuery, s as BoardEventView, sn as ThreadQueryInput, st as MessageView, t as AckBody, tn as TaskNeedsBody, tt as LabelBody, u as CanAt, un as ThreadsPage, ut as PostBody, v as ClaimReadyTaskBody, vn as UploadTicket, vt as RegisterInput, w as CreateTaskBody, wt as RouteName, x as CompleteTaskBody, xt as RenewTaskBody, y as ClaimReadyTaskInput, yn as routes, yt as RegistrationView, z as FiltersInput, zt as SourceReadQuery } from "./routes-ChGBn0K3.mjs";
2
- import { i as Claims, r as CallerRequest } from "./auth-C4VxPLYz.mjs";
3
- import { C as Method, D as SandboxPolicy, E as SandboxMatcher, O as SandboxPolicyOptions, S as HttpError, T as SandboxMatch, _ as Middleware, a as Identity, b as WritePatch, c as SelfCaller, d as AsOptions, f as Board, g as DroppedError, h as WatcherContext, i as Caller, k as SandboxRule, l as Subscription, m as Watcher, n as BackendRoute, o as InboxDelivery, p as BoardOptions, r as BoardBinding, s as ProtocolMethods, t as Backend, u as VerifiedCaller, v as MiddlewareContext, w as Protocol, x as WriteSource, y as Write } from "./backend-Da_YEltI.mjs";
4
- import { C as MentionedActor, S as Mentioned, _ as TaskOptions, a as EventsOptions, b as Written, c as Filters, d as PostOptions, f as ProfileOption, g as TaskInBatch, h as ScheduleTiming, l as HeldTask, m as ScheduleOptions, n as BoardError, o as EventsState, p as ReplyOptions, r as ClaimedTask, s as ExplainPrincipal, u as NewTaskOptions, v as UploadInput, x as duration, y as WaitOptions } from "./client-C4-r10SA.mjs";
5
- import { n as TasksInChunksError, r as createTasksInChunks, t as TaskBatches } from "./exports-BUtR_AHa.mjs";
1
+ import { $ as LABEL_CONDITIONS_MAX, $t as THREADS_LIMIT_MAX, A as Discovery, At as SchedulesQueryInput, B as GRANT_BATCH_MAX, Bn as Attachment, Bt as SyncBody, C as CreateGrantsBody, Ct as RevokeGrantBody, D as CreateTasksInput, Dt as ScheduleInput, E as CreateTasksBody, Et as ScheduleBodyOutput, F as EventsQueryInput, Ft as SourceJoin, G as GrantWriteOptions, Gt as SyncFindView, H as GrantCan, Ht as SyncCopiesView, I as ExplainQuery, It as SourceJoinBody, J as InboxEntry, Jt as SyncReceiptBody, K as INBOX_EVENT_ID_MAX, Kt as SyncImportBody, L as Explanation, Lt as SourceMessage, M as EditBody, Mt as SchemaBody, N as EventsPage, Nt as SchemaInput, O as CreatedTasksQuery, Ot as ScheduleView, P as EventsQuery, Pt as SchemaView, Q as InboxQuery, Qt as THREADS_LIMIT_DEFAULT, R as FailTaskBody, Rt as SourceRead, S as CreateChannelBody, St as ResolvedSyncTarget, T as CreateTaskInput, Tt as ScheduleBody, U as GrantInput, Ut as SyncFindInput, V as GrantBody, Vt as SyncCopiesQuery, W as GrantView, Wt as SyncFindQuery, X as InboxNextQuery, Xt as SyncThreadView, Y as InboxItem, Yt as SyncReceiptInput, Z as InboxPushBody, Zt as SyncedView, _ as ChannelsQueryInput, _n as UploadStartBody, _t as RegisterBody, a as BlockTaskBody, an as TasksQueryInput, at as MatchesQuery, b as ClaimTaskBody, bt as ReleaseTaskBody, c as CHANNELS_LIMIT_DEFAULT, cn as ThreadSummaryView, ct as MessagesPage, d as CancelTaskBody, dn as ThreadsQuery, dt as PostInput, en as TaskClaim, et as LEASE_DEFAULT_S, f as ChannelMessagesQuery, fn as ThreadsQueryInput, ft as PrincipalInput, g as ChannelsQuery, gn as UpdateGrantInput, gt as Ref, h as ChannelsPage, hn as UpdateGrantBody, ht as ReactBody, i as AssignTaskBody, in as TasksQuery, it as MatchView, j as EVENTS_LAST_MAX, jt as SchedulesQueryOutput, k as DeleteBody, kt as SchedulesQuery, l as CHANNELS_LIMIT_MAX, ln as ThreadView, lt as ParsedFilters, m as ChannelView, mn as TypingResult, mt as REGISTERED_WATCHERS_MAX, n as ActorView, nn as TaskView, nt as LinkView, o as BlockView, on as ThreadQuery, ot as Me, p as ChannelMessagesQueryInput, pn as TypingBody, pt as PrincipalView, q as InboxAckBody, qt as SyncImportInput, r as ApiError, rn as TasksPage, rt as LinkedQuery, s as BoardEventView, sn as ThreadQueryInput, st as MessageView, t as AckBody, tn as TaskNeedsBody, tt as LabelBody, u as CanAt, un as ThreadsPage, ut as PostBody, v as ClaimReadyTaskBody, vn as UploadTicket, vt as RegisterInput, w as CreateTaskBody, wt as RouteName, x as CompleteTaskBody, xt as RenewTaskBody, y as ClaimReadyTaskInput, yn as routes, yt as RegistrationView, z as FiltersInput, zt as SourceReadQuery } from "./routes-BpvyXQwv.mjs";
2
+ import { i as Claims, r as CallerRequest } from "./auth-BoYunD5t.mjs";
3
+ import { C as Method, D as SandboxPolicy, E as SandboxMatcher, O as SandboxPolicyOptions, S as HttpError, T as SandboxMatch, _ as Middleware, a as Identity, b as WritePatch, c as SelfCaller, d as AsOptions, f as Board, g as DroppedError, h as WatcherContext, i as Caller, k as SandboxRule, l as Subscription, m as Watcher, n as BackendRoute, o as InboxDelivery, p as BoardOptions, r as BoardBinding, s as ProtocolMethods, t as Backend, u as VerifiedCaller, v as MiddlewareContext, w as Protocol, x as WriteSource, y as Write } from "./backend-DJobr4nr.mjs";
4
+ import { C as MentionedActor, S as Mentioned, _ as TaskOptions, a as EventsOptions, b as Written, c as Filters, d as PostOptions, f as ProfileOption, g as TaskInBatch, h as ScheduleTiming, l as HeldTask, m as ScheduleOptions, n as BoardError, o as EventsState, p as ReplyOptions, r as ClaimedTask, s as ExplainPrincipal, u as NewTaskOptions, v as UploadInput, x as duration, y as WaitOptions } from "./client-oYThy3CR.mjs";
5
+ import { n as TasksInChunksError, r as createTasksInChunks, t as TaskBatches } from "./exports-CF_nUsT5.mjs";
6
6
  import { n as block } from "./blocks-DGvh2alZ.mjs";
7
7
  //#region src/server/index.default.d.ts
8
8
  /**
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { f as BoardError, m as duration, t as HttpError } from "./errors-DbCKqGXp.mjs";
2
- import { t as DroppedError } from "./middleware-iVTNf5Su.mjs";
1
+ import { f as BoardError, m as duration, t as HttpError } from "./errors-Cv0TGBt5.mjs";
2
+ import { t as DroppedError } from "./middleware-DXiwepsR.mjs";
3
3
  import { t as block } from "./blocks-CVoBC7ur.mjs";
4
- import { n as createTasksInChunks, r as createBoard, s as createVercel, t as TasksInChunksError } from "./exports-DI-MtN01.mjs";
4
+ import { n as createTasksInChunks, r as createBoard, s as createVercel, t as TasksInChunksError } from "./exports-CBukc8T3.mjs";
5
5
  //#region src/backend-vercel/index.default.ts
6
6
  /**
7
7
  * Your team's board, in Vercel's API. Outside Node there's no environment to find credentials or
@@ -24,7 +24,7 @@ function board(options = {}) {
24
24
  if (!fetch) throw new Error("board: pass a fetch that sends credentials Vercel's API takes, or a backend: outside Node there's no environment to find them in");
25
25
  return vercel({ fetch });
26
26
  },
27
- sync: () => import("./engine-D8YAsQS_.mjs"),
27
+ sync: () => import("./engine-506f7GEM.mjs"),
28
28
  serving: null,
29
29
  sandbox: null
30
30
  });
@@ -1,8 +1,8 @@
1
- import { $ as LABEL_CONDITIONS_MAX, $t as THREADS_LIMIT_MAX, A as Discovery, At as SchedulesQueryInput, B as GRANT_BATCH_MAX, Bn as Attachment, Bt as SyncBody, C as CreateGrantsBody, Ct as RevokeGrantBody, D as CreateTasksInput, Dt as ScheduleInput, E as CreateTasksBody, Et as ScheduleBodyOutput, F as EventsQueryInput, Ft as SourceJoin, G as GrantWriteOptions, Gt as SyncFindView, H as GrantCan, Ht as SyncCopiesView, I as ExplainQuery, It as SourceJoinBody, J as InboxEntry, Jt as SyncReceiptBody, K as INBOX_EVENT_ID_MAX, Kt as SyncImportBody, L as Explanation, Lt as SourceMessage, M as EditBody, Mt as SchemaBody, N as EventsPage, Nt as SchemaInput, O as CreatedTasksQuery, Ot as ScheduleView, P as EventsQuery, Pt as SchemaView, Q as InboxQuery, Qt as THREADS_LIMIT_DEFAULT, R as FailTaskBody, Rt as SourceRead, S as CreateChannelBody, St as ResolvedSyncTarget, T as CreateTaskInput, Tt as ScheduleBody, U as GrantInput, Ut as SyncFindInput, V as GrantBody, Vt as SyncCopiesQuery, W as GrantView, Wt as SyncFindQuery, X as InboxNextQuery, Xt as SyncThreadView, Y as InboxItem, Yt as SyncReceiptInput, Z as InboxPushBody, Zt as SyncedView, _ as ChannelsQueryInput, _n as UploadStartBody, _t as RegisterBody, a as BlockTaskBody, an as TasksQueryInput, at as MatchesQuery, b as ClaimTaskBody, bt as ReleaseTaskBody, c as CHANNELS_LIMIT_DEFAULT, cn as ThreadSummaryView, ct as MessagesPage, d as CancelTaskBody, dn as ThreadsQuery, dt as PostInput, en as TaskClaim, et as LEASE_DEFAULT_S, f as ChannelMessagesQuery, fn as ThreadsQueryInput, ft as PrincipalInput, g as ChannelsQuery, gn as UpdateGrantInput, gt as Ref, h as ChannelsPage, hn as UpdateGrantBody, ht as ReactBody, i as AssignTaskBody, in as TasksQuery, it as MatchView, j as EVENTS_LAST_MAX, jt as SchedulesQueryOutput, k as DeleteBody, kt as SchedulesQuery, l as CHANNELS_LIMIT_MAX, ln as ThreadView, lt as ParsedFilters, m as ChannelView, mn as TypingResult, mt as REGISTERED_WATCHERS_MAX, n as ActorView, nn as TaskView, nt as LinkView, o as BlockView, on as ThreadQuery, ot as Me, p as ChannelMessagesQueryInput, pn as TypingBody, pt as PrincipalView, q as InboxAckBody, qt as SyncImportInput, r as ApiError, rn as TasksPage, rt as LinkedQuery, s as BoardEventView, sn as ThreadQueryInput, st as MessageView, t as AckBody, tn as TaskNeedsBody, tt as LabelBody, u as CanAt, un as ThreadsPage, ut as PostBody, v as ClaimReadyTaskBody, vn as UploadTicket, vt as RegisterInput, w as CreateTaskBody, wt as RouteName, x as CompleteTaskBody, xt as RenewTaskBody, y as ClaimReadyTaskInput, yn as routes, yt as RegistrationView, z as FiltersInput, zt as SourceReadQuery } from "./routes-ChGBn0K3.mjs";
2
- import { i as Claims, r as CallerRequest } from "./auth-C4VxPLYz.mjs";
3
- import { C as Method, D as SandboxPolicy, E as SandboxMatcher, O as SandboxPolicyOptions, S as HttpError, T as SandboxMatch, _ as Middleware, a as Identity, b as WritePatch, c as SelfCaller, d as AsOptions, f as Board, g as DroppedError, h as WatcherContext, i as Caller, k as SandboxRule, l as Subscription, m as Watcher, n as BackendRoute, o as InboxDelivery, p as BoardOptions, r as BoardBinding, s as ProtocolMethods, t as Backend, u as VerifiedCaller, v as MiddlewareContext, w as Protocol, x as WriteSource, y as Write } from "./backend-Da_YEltI.mjs";
4
- import { C as MentionedActor, S as Mentioned, _ as TaskOptions, a as EventsOptions, b as Written, c as Filters, d as PostOptions, f as ProfileOption, g as TaskInBatch, h as ScheduleTiming, l as HeldTask, m as ScheduleOptions, n as BoardError, o as EventsState, p as ReplyOptions, r as ClaimedTask, s as ExplainPrincipal, u as NewTaskOptions, v as UploadInput, x as duration, y as WaitOptions } from "./client-C4-r10SA.mjs";
5
- import { n as TasksInChunksError, r as createTasksInChunks, t as TaskBatches } from "./exports-BUtR_AHa.mjs";
1
+ import { $ as LABEL_CONDITIONS_MAX, $t as THREADS_LIMIT_MAX, A as Discovery, At as SchedulesQueryInput, B as GRANT_BATCH_MAX, Bn as Attachment, Bt as SyncBody, C as CreateGrantsBody, Ct as RevokeGrantBody, D as CreateTasksInput, Dt as ScheduleInput, E as CreateTasksBody, Et as ScheduleBodyOutput, F as EventsQueryInput, Ft as SourceJoin, G as GrantWriteOptions, Gt as SyncFindView, H as GrantCan, Ht as SyncCopiesView, I as ExplainQuery, It as SourceJoinBody, J as InboxEntry, Jt as SyncReceiptBody, K as INBOX_EVENT_ID_MAX, Kt as SyncImportBody, L as Explanation, Lt as SourceMessage, M as EditBody, Mt as SchemaBody, N as EventsPage, Nt as SchemaInput, O as CreatedTasksQuery, Ot as ScheduleView, P as EventsQuery, Pt as SchemaView, Q as InboxQuery, Qt as THREADS_LIMIT_DEFAULT, R as FailTaskBody, Rt as SourceRead, S as CreateChannelBody, St as ResolvedSyncTarget, T as CreateTaskInput, Tt as ScheduleBody, U as GrantInput, Ut as SyncFindInput, V as GrantBody, Vt as SyncCopiesQuery, W as GrantView, Wt as SyncFindQuery, X as InboxNextQuery, Xt as SyncThreadView, Y as InboxItem, Yt as SyncReceiptInput, Z as InboxPushBody, Zt as SyncedView, _ as ChannelsQueryInput, _n as UploadStartBody, _t as RegisterBody, a as BlockTaskBody, an as TasksQueryInput, at as MatchesQuery, b as ClaimTaskBody, bt as ReleaseTaskBody, c as CHANNELS_LIMIT_DEFAULT, cn as ThreadSummaryView, ct as MessagesPage, d as CancelTaskBody, dn as ThreadsQuery, dt as PostInput, en as TaskClaim, et as LEASE_DEFAULT_S, f as ChannelMessagesQuery, fn as ThreadsQueryInput, ft as PrincipalInput, g as ChannelsQuery, gn as UpdateGrantInput, gt as Ref, h as ChannelsPage, hn as UpdateGrantBody, ht as ReactBody, i as AssignTaskBody, in as TasksQuery, it as MatchView, j as EVENTS_LAST_MAX, jt as SchedulesQueryOutput, k as DeleteBody, kt as SchedulesQuery, l as CHANNELS_LIMIT_MAX, ln as ThreadView, lt as ParsedFilters, m as ChannelView, mn as TypingResult, mt as REGISTERED_WATCHERS_MAX, n as ActorView, nn as TaskView, nt as LinkView, o as BlockView, on as ThreadQuery, ot as Me, p as ChannelMessagesQueryInput, pn as TypingBody, pt as PrincipalView, q as InboxAckBody, qt as SyncImportInput, r as ApiError, rn as TasksPage, rt as LinkedQuery, s as BoardEventView, sn as ThreadQueryInput, st as MessageView, t as AckBody, tn as TaskNeedsBody, tt as LabelBody, u as CanAt, un as ThreadsPage, ut as PostBody, v as ClaimReadyTaskBody, vn as UploadTicket, vt as RegisterInput, w as CreateTaskBody, wt as RouteName, x as CompleteTaskBody, xt as RenewTaskBody, y as ClaimReadyTaskInput, yn as routes, yt as RegistrationView, z as FiltersInput, zt as SourceReadQuery } from "./routes-BpvyXQwv.mjs";
2
+ import { i as Claims, r as CallerRequest } from "./auth-BoYunD5t.mjs";
3
+ import { C as Method, D as SandboxPolicy, E as SandboxMatcher, O as SandboxPolicyOptions, S as HttpError, T as SandboxMatch, _ as Middleware, a as Identity, b as WritePatch, c as SelfCaller, d as AsOptions, f as Board, g as DroppedError, h as WatcherContext, i as Caller, k as SandboxRule, l as Subscription, m as Watcher, n as BackendRoute, o as InboxDelivery, p as BoardOptions, r as BoardBinding, s as ProtocolMethods, t as Backend, u as VerifiedCaller, v as MiddlewareContext, w as Protocol, x as WriteSource, y as Write } from "./backend-DJobr4nr.mjs";
4
+ import { C as MentionedActor, S as Mentioned, _ as TaskOptions, a as EventsOptions, b as Written, c as Filters, d as PostOptions, f as ProfileOption, g as TaskInBatch, h as ScheduleTiming, l as HeldTask, m as ScheduleOptions, n as BoardError, o as EventsState, p as ReplyOptions, r as ClaimedTask, s as ExplainPrincipal, u as NewTaskOptions, v as UploadInput, x as duration, y as WaitOptions } from "./client-oYThy3CR.mjs";
5
+ import { n as TasksInChunksError, r as createTasksInChunks, t as TaskBatches } from "./exports-CF_nUsT5.mjs";
6
6
  import { n as block } from "./blocks-DGvh2alZ.mjs";
7
- import { t as board } from "./index-BTuTaBaK.mjs";
7
+ import { t as board } from "./index-CM2u0wGd.mjs";
8
8
  export { type AckBody, type ActorView, type ApiError, type AsOptions, type AssignTaskBody, type Attachment, type Backend, type BackendRoute, type BlockTaskBody, type BlockView, type Board, type BoardBinding, BoardError, type BoardEventView, type BoardOptions, type CHANNELS_LIMIT_DEFAULT, type CHANNELS_LIMIT_MAX, type Caller, type CallerRequest, type CanAt, type CancelTaskBody, type ChannelMessagesQuery, type ChannelMessagesQueryInput, type ChannelView, type ChannelsPage, type ChannelsQuery, type ChannelsQueryInput, type ClaimReadyTaskBody, type ClaimReadyTaskInput, type ClaimTaskBody, type ClaimedTask, type Claims, type CompleteTaskBody, type CreateChannelBody, type CreateGrantsBody, type CreateTaskBody, type CreateTaskInput, type CreateTasksBody, type CreateTasksInput, type CreatedTasksQuery, type DeleteBody, type Discovery, DroppedError, type EVENTS_LAST_MAX, type EditBody, type EventsOptions, type EventsPage, type EventsQuery, type EventsQueryInput, type EventsState, type ExplainPrincipal, type ExplainQuery, type Explanation, type FailTaskBody, type Filters, type FiltersInput, type GRANT_BATCH_MAX, type GrantBody, type GrantCan, type GrantInput, type GrantView, type GrantWriteOptions, type HeldTask, HttpError, type INBOX_EVENT_ID_MAX, type Identity, type InboxAckBody, type InboxDelivery, type InboxEntry, type InboxItem, type InboxNextQuery, type InboxPushBody, type InboxQuery, type LABEL_CONDITIONS_MAX, type LEASE_DEFAULT_S, type LabelBody, type LinkView, type LinkedQuery, type MatchView, type MatchesQuery, type Me, type Mentioned, type MentionedActor, type MessageView, type MessagesPage, type Method, type Middleware, type MiddlewareContext, type NewTaskOptions, type ParsedFilters, type PostBody, type PostInput, type PostOptions, type PrincipalInput, type PrincipalView, type ProfileOption, type Protocol, type ProtocolMethods, type REGISTERED_WATCHERS_MAX, type ReactBody, type Ref, type RegisterBody, type RegisterInput, type RegistrationView, type ReleaseTaskBody, type RenewTaskBody, type ReplyOptions, type ResolvedSyncTarget, type RevokeGrantBody, type RouteName, type SandboxMatch, type SandboxMatcher, type SandboxPolicy, type SandboxPolicyOptions, type SandboxRule, type ScheduleBody, type ScheduleBodyOutput, type ScheduleInput, type ScheduleOptions, type ScheduleTiming, type ScheduleView, type SchedulesQuery, type SchedulesQueryInput, type SchedulesQueryOutput, type SchemaBody, type SchemaInput, type SchemaView, type SelfCaller, type SourceJoin, type SourceJoinBody, type SourceMessage, type SourceRead, type SourceReadQuery, type Subscription, type SyncBody, type SyncCopiesQuery, type SyncCopiesView, type SyncFindInput, type SyncFindQuery, type SyncFindView, type SyncImportBody, type SyncImportInput, type SyncReceiptBody, type SyncReceiptInput, type SyncThreadView, type SyncedView, type THREADS_LIMIT_DEFAULT, type THREADS_LIMIT_MAX, type TaskBatches, type TaskClaim, type TaskInBatch, type TaskNeedsBody, type TaskOptions, type TaskView, TasksInChunksError, type TasksPage, type TasksQuery, type TasksQueryInput, type ThreadQuery, type ThreadQueryInput, type ThreadSummaryView, type ThreadView, type ThreadsPage, type ThreadsQuery, type ThreadsQueryInput, type TypingBody, type TypingResult, type UpdateGrantBody, type UpdateGrantInput, type UploadInput, type UploadStartBody, type UploadTicket, type VerifiedCaller, type WaitOptions, type Watcher, type WatcherContext, type Write, type WritePatch, type WriteSource, type Written, block, board, createTasksInChunks, duration, type routes };
@@ -1,6 +1,6 @@
1
- import { f as BoardError, m as duration, t as HttpError } from "./errors-DbCKqGXp.mjs";
2
- import { t as DroppedError } from "./middleware-iVTNf5Su.mjs";
1
+ import { f as BoardError, m as duration, t as HttpError } from "./errors-Cv0TGBt5.mjs";
2
+ import { t as DroppedError } from "./middleware-DXiwepsR.mjs";
3
3
  import { t as block } from "./blocks-CVoBC7ur.mjs";
4
- import { n as createTasksInChunks, t as TasksInChunksError } from "./exports-DI-MtN01.mjs";
5
- import { t as board } from "./server--BLSj6fd.mjs";
4
+ import { n as createTasksInChunks, t as TasksInChunksError } from "./exports-CBukc8T3.mjs";
5
+ import { t as board } from "./server-XsbC50nY.mjs";
6
6
  export { BoardError, DroppedError, HttpError, TasksInChunksError, block, board, createTasksInChunks, duration };