@vercel/board 0.40.0 → 0.41.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 (91) hide show
  1. package/README.md +1 -1
  2. package/dist/{access-Bl_k_Hpa.mjs → access-C5HaO42b.mjs} +2 -2
  3. package/dist/access.d.mts +6 -6
  4. package/dist/access.mjs +5 -5
  5. package/dist/{actors-yBRWTpt5.mjs → actors-nrOf7Y7z.mjs} +59 -40
  6. package/dist/{auth-DtmZzlHm.d.mts → auth-Bn8J_1F2.d.mts} +12 -30
  7. package/dist/{auth-C8URZHLx.mjs → auth-DAlYi6TN.mjs} +9 -19
  8. package/dist/{backend-BW5NbBsp.d.mts → backend-CYsTLxtP.d.mts} +116 -46
  9. package/dist/backend-local.d.mts +1 -1
  10. package/dist/backend-local.mjs +1 -1
  11. package/dist/{chat-provider-1WKsLEnM.mjs → chat-provider-CPZg2MQb.mjs} +2 -2
  12. package/dist/{chat-provider-Bbb9JguG.d.mts → chat-provider-Cgkh9xJw.d.mts} +2 -2
  13. package/dist/cli-commands.d.mts +1 -1
  14. package/dist/cli-commands.mjs +1 -1
  15. package/dist/cli-embedded.d.mts +3 -3
  16. package/dist/cli-embedded.mjs +4 -4
  17. package/dist/cli.mjs +8 -13
  18. package/dist/{commands-BJLocuXj.d.mts → commands-CrEVjASe.d.mts} +8 -30
  19. package/dist/{commands-D6VWegVY.mjs → commands-QRD0U9AQ.mjs} +30 -101
  20. package/dist/{conformance-BWhZ0k8T.mjs → conformance-ClxEEZ9C.mjs} +139 -109
  21. package/dist/conformance.d.mts +9 -8
  22. package/dist/conformance.mjs +1 -1
  23. package/dist/digest-Dna1CGa_.mjs +4 -0
  24. package/dist/{engine-Djif8XVk.mjs → engine-8BcNeckB.mjs} +11 -12
  25. package/dist/{errors-CNRJqUuL.mjs → errors-DcQf5WeM.mjs} +109 -30
  26. package/dist/{events-C6HwB046.mjs → events-BT8y_81j.mjs} +2 -2
  27. package/dist/{exports-C2OWIbLU.mjs → exports-B6udRV_E.mjs} +363 -161
  28. package/dist/exports-C8zsIL1A.d.mts +4 -0
  29. package/dist/{external-CHDxWIVf.mjs → external-DymyhUzl.mjs} +1 -1
  30. package/dist/{index-Cuxbz_E0.d.mts → index-fcpEFCTR.d.mts} +2 -2
  31. package/dist/index.d.mts +6 -6
  32. package/dist/index.mjs +6 -5
  33. package/dist/index.node.d.mts +6 -6
  34. package/dist/index.node.mjs +3 -3
  35. package/dist/inspect/app.js +31 -31
  36. package/dist/inspect/engine.js +2 -2
  37. package/dist/inspect-BsF3mYMY.mjs +2 -0
  38. package/dist/{inspect-cGcP8ZO9.mjs → inspect-DPRoC_Gg.mjs} +6 -6
  39. package/dist/{local-CsleYuyM.mjs → local-B9y4p6N7.mjs} +113 -358
  40. package/dist/{main-D97xuqWZ.mjs → main-S0A-c_kP.mjs} +392 -139
  41. package/dist/{memory-BvVoglGv.mjs → memory-DhduVbUu.mjs} +2 -2
  42. package/dist/{mentions-CT2bN5eP.mjs → mentions-DfZGp3B-.mjs} +1 -1
  43. package/dist/{middleware-BF9vnPPS.mjs → middleware-DHdrxmoc.mjs} +2 -2
  44. package/dist/{origin-DLCmrwmE.mjs → origin-B3m2lnZC.mjs} +7 -36
  45. package/dist/{page-6BTCZWGY.mjs → page-2jjHZmIW.mjs} +2 -2
  46. package/dist/page-CAUe4GmQ.mjs +2 -0
  47. package/dist/{provider-YqkF1E2k.d.mts → provider-dY54GFNz.d.mts} +1 -25
  48. package/dist/{routes-CAjd5ARa.d.mts → routes-By9lmvUD.d.mts} +1 -63
  49. package/dist/{schemas-AZkxk06N.mjs → schemas-DAzSsgWk.mjs} +8 -3
  50. package/dist/{serve-Cs-e0Jke.mjs → serve-B15I2Ibf.mjs} +5 -5
  51. package/dist/{server-CIfMdIt3.mjs → server-DgpRZ4Nu.mjs} +74 -127
  52. package/dist/{serving-B4l0nLng.mjs → serving-CALKWs9K.mjs} +1 -1
  53. package/dist/{sql-Bv-RQu8n.mjs → sql-P9g-rLIF.mjs} +3 -3
  54. package/dist/{sqlite-D4mkYihG.mjs → sqlite-B3rCcIof.mjs} +2 -2
  55. package/dist/{sqlite-db-BraLvHtf.mjs → sqlite-db-D0Fyju-4.mjs} +1 -1
  56. package/dist/sync-chat-sdk.d.mts +2 -2
  57. package/dist/sync-chat-sdk.mjs +2 -2
  58. package/dist/sync-github.d.mts +2 -2
  59. package/dist/sync-github.mjs +2 -2
  60. package/dist/sync-linear.d.mts +3 -3
  61. package/dist/sync-linear.mjs +2 -2
  62. package/dist/sync-slack.d.mts +3 -3
  63. package/dist/sync-slack.mjs +4 -4
  64. package/dist/sync.d.mts +2 -2
  65. package/dist/sync.mjs +2 -2
  66. package/dist/{tokens-CrrXAVGz.mjs → tokens-D7_ZIWpX.mjs} +4 -4
  67. package/docs/01-board/01-mounting.md +12 -17
  68. package/docs/01-board/03-identity.md +45 -39
  69. package/docs/01-board/04-messages.md +3 -1
  70. package/docs/01-board/05-reading.md +8 -2
  71. package/docs/01-board/06-watchers.md +15 -10
  72. package/docs/01-board/07-schedules.md +6 -2
  73. package/docs/01-board/09-access.md +56 -111
  74. package/docs/02-sync/01-overview.md +5 -2
  75. package/docs/02-sync/03-slack.md +12 -12
  76. package/docs/03-guides/01-coding-agents.md +18 -22
  77. package/docs/03-guides/02-inspector.md +4 -5
  78. package/docs/03-guides/03-ci.md +7 -26
  79. package/docs/03-guides/04-triage.md +2 -2
  80. package/docs/03-guides/05-agent-factory.md +7 -9
  81. package/docs/03-guides/06-sandboxed-agents.md +149 -0
  82. package/docs/04-reference/01-cli.md +52 -87
  83. package/docs/04-reference/02-board.md +35 -36
  84. package/docs/04-reference/03-http.md +32 -53
  85. package/docs/04-reference/05-conformance.md +37 -18
  86. package/docs/index.md +4 -4
  87. package/package.json +1 -1
  88. package/dist/digest-D32GV_mX.mjs +0 -4
  89. package/dist/exports-FyRBIAMs.d.mts +0 -4
  90. package/dist/inspect-CLy6FrOZ.mjs +0 -2
  91. package/dist/page-BnY8FhPn.mjs +0 -2
@@ -1,6 +1,6 @@
1
- import { r as sqlTables } from "./sql-Bv-RQu8n.mjs";
1
+ import { r as sqlTables } from "./sql-P9g-rLIF.mjs";
2
2
  import { t as memory$1 } from "./store-memory-CKQVEzXN.mjs";
3
- import { t as sqliteDb } from "./sqlite-db-BraLvHtf.mjs";
3
+ import { t as sqliteDb } from "./sqlite-db-D0Fyju-4.mjs";
4
4
  //#region src/store/memory.ts
5
5
  /**
6
6
  * A board that lives in memory, for tests: its log in A2's memory store, its
@@ -3,7 +3,7 @@ import { r as findBlocks } from "./blocks-CVoBC7ur.mjs";
3
3
  const FENCED_CODE = /```[\s\S]*?```/g;
4
4
  const INLINE_CODE = /`[^`\n]*`/g;
5
5
  const NAME = "[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?";
6
- const MENTION = new RegExp(`(?<![\\w@.-])@(${NAME}(?:/${NAME})?)(?!:|[a-z0-9_/-]|\\.(?=[a-z0-9]))`, "gi");
6
+ const MENTION = new RegExp(`(?<![\\w@.-])@(${NAME}(?:/${NAME})?)(?!:\\S|[a-z0-9_/-]|\\.(?=[a-z0-9]))`, "gi");
7
7
  const EXACT = /(?<![\w@.-])@\[([^\]\s]+)\]/g;
8
8
  /**
9
9
  * Blanks out code so mentions inside it never count. A block's fence is code whatever it's fenced
@@ -1,5 +1,5 @@
1
- import { t as HttpError } from "./errors-CNRJqUuL.mjs";
2
- import { d as Labels, f as MESSAGE_TEXT_MAX } from "./schemas-AZkxk06N.mjs";
1
+ import { t as HttpError } from "./errors-DcQf5WeM.mjs";
2
+ import { d as Labels, f as MESSAGE_TEXT_MAX } from "./schemas-DAzSsgWk.mjs";
3
3
  import { z } from "zod";
4
4
  //#region src/client/ids.ts
5
5
  const hex = (bytes) => Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("");
@@ -1,9 +1,9 @@
1
- import { m as DIRECT_UPLOAD_BYTES_MAX, p as ATTACHMENT_BYTES_MAX, r as badRequest, t as HttpError } from "./errors-CNRJqUuL.mjs";
2
- import { d as Labels, f as MESSAGE_TEXT_MAX, l as LabelKey, m as MessageText, o as ChannelPath, r as AttachmentId, s as Emoji, u as LabelValue, v as platformAvatar, y as storable } from "./schemas-AZkxk06N.mjs";
3
- import { a as Link, i as ExternalTarget, l as isThreadTarget, n as ExternalEvent, o as Origin, t as ExternalAuthor } from "./external-CHDxWIVf.mjs";
1
+ import { g as DIRECT_UPLOAD_BYTES_MAX, h as ATTACHMENT_BYTES_MAX, r as badRequest, t as HttpError } from "./errors-DcQf5WeM.mjs";
2
+ import { b as storable, d as Labels, f as MESSAGE_TEXT_MAX, l as LabelKey, m as MessageText, o as ChannelPath, r as AttachmentId, s as Emoji, u as LabelValue, y as platformAvatar } from "./schemas-DAzSsgWk.mjs";
3
+ import { a as Link, i as ExternalTarget, l as isThreadTarget, n as ExternalEvent, o as Origin, t as ExternalAuthor } from "./external-DymyhUzl.mjs";
4
4
  import { a as SCHEMA_DESCRIPTION_MAX, o as SCHEMA_NAME, s as SCHEMA_VERSION_MAX } from "./blocks-CVoBC7ur.mjs";
5
- import { i as afterRetry } from "./middleware-BF9vnPPS.mjs";
6
- import { o as options } from "./commands-D6VWegVY.mjs";
5
+ import { i as afterRetry } from "./middleware-DHdrxmoc.mjs";
6
+ import { o as options } from "./commands-QRD0U9AQ.mjs";
7
7
  import { z } from "zod";
8
8
  //#region src/api/routes.ts
9
9
  /**
@@ -133,8 +133,6 @@ const SchedulesQuery = z.object({
133
133
  all: flag.optional()
134
134
  });
135
135
  const CanGrant = z.union([z.literal("all"), z.array(z.string().min(1).max(16)).max(8)]);
136
- /** What a grant or token lets do: `'all'`, a list for every channel, or a map from channel pattern to one. board() checks the patterns. */
137
- const Can = z.union([CanGrant, z.record(z.string().min(1).max(300), CanGrant)]);
138
136
  const ClaimValue = z.string().min(1).max(1e3);
139
137
  const Environments = z.array(z.string().min(1).max(100)).min(1).max(16);
140
138
  /**
@@ -217,16 +215,6 @@ const UpdateGrantBody = z.strictObject({
217
215
  remove: z.array(PrincipalInput).min(1).max(32).optional(),
218
216
  can: GrantCan.optional()
219
217
  }).refine((body) => body.add !== void 0 || body.remove !== void 0 || body.can !== void 0, "name principals to add or remove, or a can");
220
- /** A token acting as the caller: what it may do, and the profile and session every request with it writes as. */
221
- const TokenBody = z.object({
222
- name: z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/, "a token name is up to 64 letters, numbers, and ._-"),
223
- can: Can.optional(),
224
- profile: z.string().regex(/^[A-Za-z][A-Za-z0-9-]{0,31}$/, "a profile is up to 32 letters, numbers, and hyphens").optional(),
225
- avatar: z.string().url().max(2048).optional(),
226
- session: z.string().regex(/^[A-Za-z0-9_.:-]{1,128}$/, "a session is up to 128 letters, numbers, and _.:-").optional(),
227
- /** How long it lives: `30d` by default, at most `90d`, and on Vercel's board `1d` by default, at most `7d`. */
228
- expires: Duration.optional()
229
- });
230
218
  /**
231
219
  * A schema version to register, for good: `name` and `version` are its ID (`sandbox@1`), and
232
220
  * `schema` is a JSON Schema for an object, in structural keywords only, which the board checks.
@@ -616,20 +604,6 @@ const routes = {
616
604
  method: "POST",
617
605
  path: "/grants/:id/revoke"
618
606
  },
619
- /** Your tokens, or every one with manage in every channel. A token acts as whoever minted it. */
620
- tokens: {
621
- method: "GET",
622
- path: "/tokens"
623
- },
624
- createToken: {
625
- method: "POST",
626
- path: "/tokens",
627
- body: TokenBody
628
- },
629
- revokeToken: {
630
- method: "POST",
631
- path: "/tokens/:id/revoke"
632
- },
633
607
  /** Every schema: the built-ins, then the board's own. Anyone the board lets in reads them. */
634
608
  schemas: {
635
609
  method: "GET",
@@ -783,7 +757,7 @@ const routes = {
783
757
  };
784
758
  //#endregion
785
759
  //#region src/version.ts
786
- const VERSION = "0.40.0";
760
+ const VERSION = "0.41.0";
787
761
  //#endregion
788
762
  //#region src/server/backend.ts
789
763
  /** The subscription sync's outbound runs on, in `BoardBinding.subscriptions`. No watcher's ID starts with `@`. */
@@ -821,9 +795,6 @@ const METHODS = [
821
795
  "updateGrant",
822
796
  "explain",
823
797
  "revokeGrant",
824
- "tokens",
825
- "createToken",
826
- "revokeToken",
827
798
  "schemas",
828
799
  "schema",
829
800
  "createSchema",
@@ -1204,4 +1175,4 @@ const syncTarget = (target) => typeof target === "string" ? {
1204
1175
  */
1205
1176
  const SYNC_ACTOR = "board:sync";
1206
1177
  //#endregion
1207
- export { MessagesQuery as A, SyncBody as B, InboxAckBody as C, LabelBody as D, InboxQuery as E, ScheduleBody as F, ThreadsQuery as G, SyncFindQuery as H, SchedulesQuery as I, UpdateGrantBody as J, TokenBody as K, SchemaBody as L, ReactBody as M, Ref as N, LinkedQuery as O, RegisterBody as P, SourceJoinBody as R, GrantBody as S, InboxPushBody as T, SyncImportBody as U, SyncCopiesQuery as V, SyncReceiptBody as W, routes as X, UploadStartBody as Y, CreateChannelBody as _, compileWatcher as a, EventsQuery as b, METHODS as c, queryObject as d, readCapped as f, AckBody as g, VERSION as h, runMatch as i, PostBody as j, MatchesQuery as k, createRouter as l, SYNC as m, syncTarget as n, hasCriteria as o, readJson as p, TypingBody as q, canonicalWatchers as r, withMentions as s, SYNC_ACTOR as t, openapi as u, DeleteBody as v, InboxNextQuery as w, ExplainQuery as x, EditBody as y, SourceReadQuery as z };
1178
+ export { MessagesQuery as A, SyncBody as B, InboxAckBody as C, LabelBody as D, InboxQuery as E, ScheduleBody as F, ThreadsQuery as G, SyncFindQuery as H, SchedulesQuery as I, UploadStartBody as J, TypingBody as K, SchemaBody as L, ReactBody as M, Ref as N, LinkedQuery as O, RegisterBody as P, SourceJoinBody as R, GrantBody as S, InboxPushBody as T, SyncImportBody as U, SyncCopiesQuery as V, SyncReceiptBody as W, routes as Y, CreateChannelBody as _, compileWatcher as a, EventsQuery as b, METHODS as c, queryObject as d, readCapped as f, AckBody as g, VERSION as h, runMatch as i, PostBody as j, MatchesQuery as k, createRouter as l, SYNC as m, syncTarget as n, hasCriteria as o, readJson as p, UpdateGrantBody as q, canonicalWatchers as r, withMentions as s, SYNC_ACTOR as t, openapi as u, DeleteBody as v, InboxNextQuery as w, ExplainQuery as x, EditBody as y, SourceReadQuery as z };
@@ -1,4 +1,4 @@
1
- import "./digest-D32GV_mX.mjs";
1
+ import "./digest-Dna1CGa_.mjs";
2
2
  import { createHash } from "node:crypto";
3
3
  import { readFile } from "node:fs/promises";
4
4
  //#region src/inspect/page.ts
@@ -22,7 +22,7 @@ function files() {
22
22
  async function page() {
23
23
  for (const file of files()) {
24
24
  const script = await readFile(file, "utf8").catch(() => null);
25
- if (script !== null && createHash("sha256").update(script).digest("hex") === "19a7d8abea48e87e5804d4546ba51b787a26aba0fce87dfb11acb4859822d116") return script;
25
+ if (script !== null && createHash("sha256").update(script).digest("hex") === "bffecbb88c0932a155d138369038fe92de8d4f8b6e40c651f6471358ac237c0a") return script;
26
26
  }
27
27
  return null;
28
28
  }
@@ -0,0 +1,2 @@
1
+ import { t as page } from "./page-2jjHZmIW.mjs";
2
+ export { page };
@@ -1,4 +1,4 @@
1
- import { C as InboxEntry, Ct as SyncThreadView, Dt as ThreadsPage, Et as ThreadView, F as MessageView, I as MessagesPage, It as UpdateGrantInput, J as RegisterInput, M as MatchView, Mt as TokenView, P as Me, R as MessagesQueryInput, St as SyncReceiptInput, Y as RegistrationView, _ as FiltersInput, a as BoardEventView, an as Attachment, b as GrantInput, bt as SyncImportInput, ct as SourceJoin, dn as ExternalFile, dt as SourceRead, f as EventsPage, fn as ExternalLink, g as Explanation, gt as SyncFindInput, in as ExternalCopy, jt as TokenInput, kt as ThreadsQueryInput, ln as ExternalAuthor, n as ActorView, ot as SchemaInput, pn as Link, rn as Actor, rt as SchedulesQueryInput, s as ChannelView, st as SchemaView, tt as ScheduleView, u as Discovery, un as ExternalEvent, vt as SyncFindView, w as InboxItem, wt as SyncedView, x as GrantView } from "./routes-CAjd5ARa.mjs";
1
+ import { C as InboxEntry, Ct as SyncThreadView, Dt as ThreadsPage, Et as ThreadView, F as MessageView, I as MessagesPage, J as RegisterInput, M as MatchView, Nt as UpdateGrantInput, P as Me, R as MessagesQueryInput, St as SyncReceiptInput, Y as RegistrationView, _ as FiltersInput, a as BoardEventView, b as GrantInput, bt as SyncImportInput, cn as ExternalFile, ct as SourceJoin, dt as SourceRead, en as Actor, f as EventsPage, g as Explanation, gt as SyncFindInput, kt as ThreadsQueryInput, ln as ExternalLink, n as ActorView, nn as Attachment, on as ExternalAuthor, ot as SchemaInput, rt as SchedulesQueryInput, s as ChannelView, sn as ExternalEvent, st as SchemaView, tn as ExternalCopy, tt as ScheduleView, u as Discovery, un as Link, vt as SyncFindView, w as InboxItem, wt as SyncedView, x as GrantView } from "./routes-By9lmvUD.mjs";
2
2
  import { z } from "zod";
3
3
  //#region src/client/client.d.ts
4
4
  /**
@@ -34,15 +34,6 @@ type ClientOptions = {
34
34
  /** An OIDC token whose audience is the board's URL, or a function returning one. Without one, `fetch` brings the credentials. */
35
35
  token?: Resolvable<string>;
36
36
  profile?: Resolvable<ProfileOption>;
37
- /** Runtime session, recorded on writes and used to scope read cursors. */
38
- session?: Resolvable<string | null>;
39
- /** A person's handle; the board falls back to one derived from their user ID. */
40
- handle?: Resolvable<string | null>;
41
- /** Your display name and avatar, shown when you write as yourself (not as a profile). */
42
- person?: Resolvable<{
43
- name?: string | null;
44
- avatar?: string | null;
45
- } | null>;
46
37
  /** Extra headers on every request. */
47
38
  headers?: Resolvable<Record<string, string>>;
48
39
  fetch?: typeof fetch;
@@ -213,21 +204,6 @@ declare function createBoardClient(options: ClientOptions): {
213
204
  revokeGrant: (id: string) => Promise<{
214
205
  revoked: boolean;
215
206
  }>;
216
- /**
217
- * A token that acts as you, narrowed to `can`, writing as `profile` and `session` when they're
218
- * given: for a widget, a sandbox, a script. `secret` shows only here. It lives 30 days, or
219
- * `expires`, at most 90.
220
- */
221
- createToken: (input: TokenInput) => Promise<{
222
- token: TokenView;
223
- secret: string;
224
- }>;
225
- /** Your live tokens, or everyone's with manage in every channel. Never their secrets. */
226
- tokens: () => Promise<TokenView[]>;
227
- /** It and every token minted with it stop. `revoked` is false when it was already revoked. */
228
- revokeToken: (id: string) => Promise<{
229
- revoked: boolean;
230
- }>;
231
207
  /** Every schema: the built-ins, then the board's own, by name and version. */
232
208
  schemas: () => Promise<SchemaView[]>;
233
209
  /** One schema version, by its ID: `sandbox@1`. */
@@ -207,7 +207,6 @@ declare const boardEvents: {
207
207
  actor: z.ZodString;
208
208
  principal: z.ZodString;
209
209
  profile: z.ZodNullable<z.ZodString>;
210
- session: z.ZodNullable<z.ZodString>;
211
210
  }, z.core.$strip>;
212
211
  origin: z.ZodNullable<z.ZodObject<{
213
212
  channel: z.ZodOptional<z.ZodString>;
@@ -254,7 +253,6 @@ declare const boardEvents: {
254
253
  actor: z.ZodString;
255
254
  principal: z.ZodString;
256
255
  profile: z.ZodNullable<z.ZodString>;
257
- session: z.ZodNullable<z.ZodString>;
258
256
  }, z.core.$strip>;
259
257
  }, z.core.$strip>;
260
258
  /** A message's links changed: an edit linked something new, or the platform sent what a link says. */
@@ -279,7 +277,6 @@ declare const boardEvents: {
279
277
  actor: z.ZodString;
280
278
  principal: z.ZodString;
281
279
  profile: z.ZodNullable<z.ZodString>;
282
- session: z.ZodNullable<z.ZodString>;
283
280
  }, z.core.$strip>;
284
281
  from: z.ZodNullable<z.ZodString>;
285
282
  }, z.core.$strip>;
@@ -291,7 +288,6 @@ declare const boardEvents: {
291
288
  actor: z.ZodString;
292
289
  principal: z.ZodString;
293
290
  profile: z.ZodNullable<z.ZodString>;
294
- session: z.ZodNullable<z.ZodString>;
295
291
  }, z.core.$strip>;
296
292
  from: z.ZodNullable<z.ZodString>;
297
293
  }, z.core.$strip>;
@@ -302,7 +298,6 @@ declare const boardEvents: {
302
298
  actor: z.ZodString;
303
299
  principal: z.ZodString;
304
300
  profile: z.ZodNullable<z.ZodString>;
305
- session: z.ZodNullable<z.ZodString>;
306
301
  }, z.core.$strip>;
307
302
  from: z.ZodNullable<z.ZodString>;
308
303
  }, z.core.$strip>;
@@ -314,7 +309,6 @@ declare const boardEvents: {
314
309
  actor: z.ZodString;
315
310
  principal: z.ZodString;
316
311
  profile: z.ZodNullable<z.ZodString>;
317
- session: z.ZodNullable<z.ZodString>;
318
312
  }, z.core.$strip>;
319
313
  from: z.ZodNullable<z.ZodString>;
320
314
  }, z.core.$strip>;
@@ -326,7 +320,6 @@ declare const boardEvents: {
326
320
  actor: z.ZodString;
327
321
  principal: z.ZodString;
328
322
  profile: z.ZodNullable<z.ZodString>;
329
- session: z.ZodNullable<z.ZodString>;
330
323
  }, z.core.$strip>;
331
324
  from: z.ZodNullable<z.ZodString>;
332
325
  }, z.core.$strip>;
@@ -339,7 +332,6 @@ declare const boardEvents: {
339
332
  actor: z.ZodString;
340
333
  principal: z.ZodString;
341
334
  profile: z.ZodNullable<z.ZodString>;
342
- session: z.ZodNullable<z.ZodString>;
343
335
  }, z.core.$strip>;
344
336
  }, z.core.$strip>;
345
337
  /** A thread is synced with an external channel (start a thread there) or thread (join it). */
@@ -358,7 +350,6 @@ declare const boardEvents: {
358
350
  actor: z.ZodString;
359
351
  principal: z.ZodString;
360
352
  profile: z.ZodNullable<z.ZodString>;
361
- session: z.ZodNullable<z.ZodString>;
362
353
  }, z.core.$strip>;
363
354
  }, z.core.$strip>;
364
355
  /** An outbound delivery receipt: board message `id` exists on the platform as `external`. */
@@ -439,7 +430,6 @@ declare const Author: z.ZodObject<{
439
430
  actor: z.ZodString;
440
431
  principal: z.ZodString;
441
432
  profile: z.ZodNullable<z.ZodString>;
442
- session: z.ZodNullable<z.ZodString>;
443
433
  }, z.core.$strip>;
444
434
  /** A file on a message. The board records `type` and `size` from what it stored, never from the request. */
445
435
  declare const Attachment: z.ZodObject<{
@@ -944,15 +934,6 @@ declare const UpdateGrantBody: z.ZodObject<{
944
934
  }, z.core.$strict>], "kind">>>;
945
935
  can: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>>>;
946
936
  }, z.core.$strict>;
947
- /** A token acting as the caller: what it may do, and the profile and session every request with it writes as. */
948
- declare const TokenBody: z.ZodObject<{
949
- name: z.ZodString;
950
- can: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>>]>>;
951
- profile: z.ZodOptional<z.ZodString>;
952
- avatar: z.ZodOptional<z.ZodString>;
953
- session: z.ZodOptional<z.ZodString>;
954
- expires: z.ZodOptional<z.ZodString>;
955
- }, z.core.$strip>;
956
937
  /**
957
938
  * A schema version to register, for good: `name` and `version` are its ID (`sandbox@1`), and
958
939
  * `schema` is a JSON Schema for an object, in structural keywords only, which the board checks.
@@ -1433,10 +1414,6 @@ type UpdateGrantInput = {
1433
1414
  remove?: readonly PrincipalInput[];
1434
1415
  can?: GrantCan;
1435
1416
  };
1436
- /** What `token` takes: `can` as `access` writes it, with `'none'` for a pattern it may do nothing in. */
1437
- type TokenInput = Omit<z.input<typeof TokenBody>, 'can'> & {
1438
- can?: Can | GrantCan;
1439
- };
1440
1417
  /** What `createSchema` takes: a version's name, its number, and its JSON Schema. */
1441
1418
  type SchemaInput = z.input<typeof SchemaBody>;
1442
1419
  type SchedulesQueryOutput = z.output<typeof SchedulesQuery>;
@@ -1472,7 +1449,6 @@ type ScheduleView = {
1472
1449
  actor: string;
1473
1450
  principal: string;
1474
1451
  profile: string | null;
1475
- session: string | null;
1476
1452
  };
1477
1453
  reason: 'canceled' | 'thread_deleted' | 'dropped' | 'revoked';
1478
1454
  } | null;
@@ -1480,7 +1456,6 @@ type ScheduleView = {
1480
1456
  actor: string;
1481
1457
  principal: string;
1482
1458
  profile: string | null;
1483
- session: string | null;
1484
1459
  };
1485
1460
  author: ActorView;
1486
1461
  createdAt: string;
@@ -1550,21 +1525,6 @@ type GrantView = {
1550
1525
  by: string | null;
1551
1526
  at: string | null;
1552
1527
  };
1553
- /** A token, as its minter and `manage` see it: never its secret. */
1554
- type TokenView = {
1555
- id: string;
1556
- name: string;
1557
- /** What it may do now: its minter's access, as the board's rules and grants give it, narrowed by the token's `can`. `{}` once its minter may do nothing. */
1558
- can: AccessSummary;
1559
- profile: string | null;
1560
- session: string | null;
1561
- /** The actor that minted it, and when. */
1562
- by: string;
1563
- at: string;
1564
- expiresAt: string;
1565
- /** The token it was minted with, which it stops with. */
1566
- parent: string | null;
1567
- };
1568
1528
  /** A schema version, as the board keeps it: it never changes. */
1569
1529
  type SchemaView = {
1570
1530
  /** `name@version`: what names it everywhere. */
@@ -1721,7 +1681,6 @@ type Me = {
1721
1681
  profile: string | null;
1722
1682
  /** Who you act through, writing with a profile: `claude via julian`. */
1723
1683
  via?: Via;
1724
- session: string | null;
1725
1684
  expiresAt: string | null;
1726
1685
  /** What you may do in each channel pattern, implications included: `{ '*': [...every permission] }` is full access. */
1727
1686
  can: AccessSummary;
@@ -2186,27 +2145,6 @@ declare const routes: {
2186
2145
  readonly method: 'POST';
2187
2146
  readonly path: '/grants/:id/revoke';
2188
2147
  };
2189
- /** Your tokens, or every one with manage in every channel. A token acts as whoever minted it. */
2190
- readonly tokens: {
2191
- readonly method: 'GET';
2192
- readonly path: '/tokens';
2193
- };
2194
- readonly createToken: {
2195
- readonly method: 'POST';
2196
- readonly path: '/tokens';
2197
- readonly body: z.ZodObject<{
2198
- name: z.ZodString;
2199
- can: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>>]>>;
2200
- profile: z.ZodOptional<z.ZodString>;
2201
- avatar: z.ZodOptional<z.ZodString>;
2202
- session: z.ZodOptional<z.ZodString>;
2203
- expires: z.ZodOptional<z.ZodString>;
2204
- }, z.core.$strip>;
2205
- };
2206
- readonly revokeToken: {
2207
- readonly method: 'POST';
2208
- readonly path: '/tokens/:id/revoke';
2209
- };
2210
2148
  /** Every schema: the built-ins, then the board's own. Anyone the board lets in reads them. */
2211
2149
  readonly schemas: {
2212
2150
  readonly method: 'GET';
@@ -2732,4 +2670,4 @@ declare const routes: {
2732
2670
  };
2733
2671
  type RouteName = keyof typeof routes;
2734
2672
  //#endregion
2735
- export { ScheduleBodyOutput as $, checkGrantChange as $t, LinkView as A, TokenBody as At, PostBody as B, Access as Bt, InboxEntry as C, SyncThreadView as Ct, InboxQuery as D, ThreadsPage as Dt, InboxPushBody as E, ThreadView as Et, MessageView as F, UpdateGrantBody as Ft, ReactBody as G, Grant as Gt, PrincipalInput as H, Can as Ht, MessagesPage as I, UpdateGrantInput as It, RegisterInput as J, GrantShape as Jt, Ref as K, GrantChange as Kt, MessagesQuery as L, UploadStartBody as Lt, MatchView as M, TokenView as Mt, MatchesQuery as N, TypingBody as Nt, LABEL_CONDITIONS_MAX as O, ThreadsQuery as Ot, Me as P, TypingResult as Pt, ScheduleBody as Q, WrittenCan as Qt, MessagesQueryInput as R, UploadTicket as Rt, InboxAckBody as S, SyncReceiptInput as St, InboxNextQuery as T, ThreadSummaryView as Tt, PrincipalView as U, ChannelPattern as Ut, PostInput as V, AccessSummary as Vt, REGISTERED_WATCHERS_MAX as W, FULL_ACCESS as Wt, ResolvedSyncTarget as X, Level as Xt, RegistrationView as Y, InvalidCan as Yt, RouteName as Z, Permission as Zt, FiltersInput as _, SyncFindQuery as _t, BoardEventView as a, Attachment as an, SchemaBody as at, GrantInput as b, SyncImportInput as bt, CreateChannelBody as c, Labels as cn, SourceJoin as ct, EditBody as d, ExternalFile as dn, SourceRead as dt, compileAccess as en, ScheduleInput as et, EventsPage as f, ExternalLink as fn, SourceReadQuery as ft, Explanation as g, SyncFindInput as gt, ExplainQuery as h, SyncCopiesView as ht, BlockView as i, ExternalCopy as in, SchedulesQueryOutput as it, LinkedQuery as j, TokenInput as jt, LabelBody as k, ThreadsQueryInput as kt, DeleteBody as l, ExternalAuthor as ln, SourceJoinBody as lt, EventsQueryInput as m, SyncCopiesQuery as mt, ActorView as n, union as nn, SchedulesQuery as nt, CanAt as o, Author as on, SchemaInput as ot, EventsQuery as p, Link as pn, SyncBody as pt, RegisterBody as q, GrantChangeRefusal as qt, ApiError as r, Actor as rn, SchedulesQueryInput as rt, ChannelView as s, CAN_MAX as sn, SchemaView as st, AckBody as t, parseCan as tn, ScheduleView as tt, Discovery as u, ExternalEvent as un, SourceMessage as ut, GrantBody as v, SyncFindView as vt, InboxItem as w, SyncedView as wt, GrantView as x, SyncReceiptBody as xt, GrantCan as y, SyncImportBody as yt, ParsedFilters as z, routes as zt };
2673
+ export { ScheduleBodyOutput as $, union as $t, LinkView as A, TypingBody as At, PostBody as B, ChannelPattern as Bt, InboxEntry as C, SyncThreadView as Ct, InboxQuery as D, ThreadsPage as Dt, InboxPushBody as E, ThreadView as Et, MessageView as F, UploadTicket as Ft, ReactBody as G, GrantShape as Gt, PrincipalInput as H, Grant as Ht, MessagesPage as I, routes as It, RegisterInput as J, Permission as Jt, Ref as K, InvalidCan as Kt, MessagesQuery as L, Access as Lt, MatchView as M, UpdateGrantBody as Mt, MatchesQuery as N, UpdateGrantInput as Nt, LABEL_CONDITIONS_MAX as O, ThreadsQuery as Ot, Me as P, UploadStartBody as Pt, ScheduleBody as Q, parseCan as Qt, MessagesQueryInput as R, AccessSummary as Rt, InboxAckBody as S, SyncReceiptInput as St, InboxNextQuery as T, ThreadSummaryView as Tt, PrincipalView as U, GrantChange as Ut, PostInput as V, FULL_ACCESS as Vt, REGISTERED_WATCHERS_MAX as W, GrantChangeRefusal as Wt, ResolvedSyncTarget as X, checkGrantChange as Xt, RegistrationView as Y, WrittenCan as Yt, RouteName as Z, compileAccess as Zt, FiltersInput as _, SyncFindQuery as _t, BoardEventView as a, Labels as an, SchemaBody as at, GrantInput as b, SyncImportInput as bt, CreateChannelBody as c, ExternalFile as cn, SourceJoin as ct, EditBody as d, SourceRead as dt, Actor as en, ScheduleInput as et, EventsPage as f, SourceReadQuery as ft, Explanation as g, SyncFindInput as gt, ExplainQuery as h, SyncCopiesView as ht, BlockView as i, CAN_MAX as in, SchedulesQueryOutput as it, LinkedQuery as j, TypingResult as jt, LabelBody as k, ThreadsQueryInput as kt, DeleteBody as l, ExternalLink as ln, SourceJoinBody as lt, EventsQueryInput as m, SyncCopiesQuery as mt, ActorView as n, Attachment as nn, SchedulesQuery as nt, CanAt as o, ExternalAuthor as on, SchemaInput as ot, EventsQuery as p, SyncBody as pt, RegisterBody as q, Level as qt, ApiError as r, Author as rn, SchedulesQueryInput as rt, ChannelView as s, ExternalEvent as sn, SchemaView as st, AckBody as t, ExternalCopy as tn, ScheduleView as tt, Discovery as u, Link as un, SourceMessage as ut, GrantBody as v, SyncFindView as vt, InboxItem as w, SyncedView as wt, GrantView as x, SyncReceiptBody as xt, GrantCan as y, SyncImportBody as yt, ParsedFilters as z, Can as zt };
@@ -53,8 +53,13 @@ function platformAvatar(avatar) {
53
53
  const Author = z.object({
54
54
  actor: ActorId,
55
55
  principal: z.string().min(1),
56
- profile: z.string().nullable(),
57
- session: z.string().nullable()
56
+ profile: z.string().nullable()
57
+ });
58
+ /** Who wrote something, as views show it: a log from before sessions were gone keeps one on each, which no view shows. */
59
+ const authorView = ({ actor, principal, profile }) => ({
60
+ actor,
61
+ principal,
62
+ profile
58
63
  });
59
64
  /** 128 random bits, base64url: an attachment is named by an ID nobody can guess. */
60
65
  /** 128 random bits, base64url, as a board on this machine makes them; or `att_` and a UUID, as Vercel's board does. */
@@ -69,4 +74,4 @@ const Attachment = z.object({
69
74
  /** A registered watcher's ID: a profile name, since its writes are by that profile. */
70
75
  const RemoteWatcherId = z.string().regex(/^[A-Za-z][A-Za-z0-9-]{0,31}$/, "ids start with a letter and use up to 32 letters, numbers, and hyphens");
71
76
  //#endregion
72
- export { actorKind as _, CAN_MAX as a, toStorable as b, Handle as c, Labels as d, MESSAGE_TEXT_MAX as f, SeenActorKind as g, RemoteWatcherId as h, Author as i, LabelKey as l, MessageText as m, Attachment as n, ChannelPath as o, MessageId as p, AttachmentId as r, Emoji as s, ActorId as t, LabelValue as u, platformAvatar as v, storable as y };
77
+ export { actorKind as _, CAN_MAX as a, storable as b, Handle as c, Labels as d, MESSAGE_TEXT_MAX as f, SeenActorKind as g, RemoteWatcherId as h, Author as i, LabelKey as l, MessageText as m, Attachment as n, ChannelPath as o, MessageId as p, AttachmentId as r, Emoji as s, ActorId as t, LabelValue as u, authorView as v, toStorable as x, platformAvatar as y };
@@ -1,7 +1,7 @@
1
- import { u as BoardError } from "./errors-CNRJqUuL.mjs";
2
- import { d as localTokenFile, t as board } from "./server-CIfMdIt3.mjs";
3
- import { t as oidcTokens } from "./tokens-CrrXAVGz.mjs";
4
- import { t as local } from "./local-CsleYuyM.mjs";
1
+ import { u as BoardError } from "./errors-DcQf5WeM.mjs";
2
+ import { d as localTokenFile, t as board } from "./server-DgpRZ4Nu.mjs";
3
+ import { t as oidcTokens } from "./tokens-D7_ZIWpX.mjs";
4
+ import { t as local } from "./local-B9y4p6N7.mjs";
5
5
  import { mkdir, rename, rm, stat, writeFile } from "node:fs/promises";
6
6
  import { userInfo } from "node:os";
7
7
  import { dirname, join, resolve } from "node:path";
@@ -178,4 +178,4 @@ async function forward(handler, req, res) {
178
178
  }
179
179
  }
180
180
  //#endregion
181
- export { localHandle, serveLocal };
181
+ export { serveLocal };