@vercel/board 0.39.0 → 0.40.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.
- package/README.md +5 -3
- package/dist/{access-CVkjSfxj.mjs → access-Bl_k_Hpa.mjs} +1 -1
- package/dist/access.d.mts +2 -2
- package/dist/access.mjs +4 -4
- package/dist/{actors-kfMejhaw.mjs → actors-yBRWTpt5.mjs} +38 -53
- package/dist/{auth-B3bBYOqf.mjs → auth-C8URZHLx.mjs} +2 -2
- package/dist/{auth-BXLCkeB0.d.mts → auth-DtmZzlHm.d.mts} +5 -2
- package/dist/{backend-HcCCGPG4.d.mts → backend-BW5NbBsp.d.mts} +36 -10
- package/dist/backend-local.d.mts +1 -1
- package/dist/backend-local.mjs +1 -1
- package/dist/blocks-CVoBC7ur.mjs +402 -0
- package/dist/blocks-DGvh2alZ.d.mts +33 -0
- package/dist/{chat-provider-DyNy5xdC.d.mts → chat-provider-Bbb9JguG.d.mts} +2 -2
- package/dist/cli-commands.d.mts +1 -1
- package/dist/cli-commands.mjs +1 -1
- package/dist/cli-embedded.d.mts +2 -2
- package/dist/cli-embedded.mjs +3 -3
- package/dist/cli.mjs +5 -5
- package/dist/{commands-B5d-lmNN.d.mts → commands-BJLocuXj.d.mts} +10 -0
- package/dist/{commands-BLS7erNu.mjs → commands-D6VWegVY.mjs} +88 -8
- package/dist/{conformance-D59Py2m2.mjs → conformance-BWhZ0k8T.mjs} +252 -5
- package/dist/conformance.d.mts +4 -3
- package/dist/conformance.mjs +1 -1
- package/dist/data-values-C-Cq80hz.mjs +176 -0
- package/dist/digest-D32GV_mX.mjs +4 -0
- package/dist/{engine-eUgO5jTM.mjs → engine-Djif8XVk.mjs} +191 -77
- package/dist/{errors-rYDxZEuN.mjs → errors-CNRJqUuL.mjs} +16 -14
- package/dist/{exports-M5o4PTfO.mjs → exports-C2OWIbLU.mjs} +621 -245
- package/dist/exports-FyRBIAMs.d.mts +4 -0
- package/dist/{index-rNqqgkyu.d.mts → index-Cuxbz_E0.d.mts} +2 -2
- package/dist/index.d.mts +7 -6
- package/dist/index.mjs +6 -5
- package/dist/index.node.d.mts +7 -6
- package/dist/index.node.mjs +5 -4
- package/dist/inspect/app.js +110 -109
- package/dist/inspect/engine.js +5 -5
- package/dist/inspect-CLy6FrOZ.mjs +2 -0
- package/dist/{inspect-BkXxR2uB.mjs → inspect-cGcP8ZO9.mjs} +4 -4
- package/dist/{local-DvkOWf4U.mjs → local-CsleYuyM.mjs} +373 -177
- package/dist/{main-DtV_Po9i.mjs → main-D97xuqWZ.mjs} +177 -59
- package/dist/{memory-DkoqhxIH.mjs → memory-BvVoglGv.mjs} +2 -2
- package/dist/{mentions-CB6ShY4R.mjs → mentions-CT2bN5eP.mjs} +17 -3
- package/dist/{middleware-CPqAuRtp.mjs → middleware-BF9vnPPS.mjs} +70 -2
- package/dist/{targets-C1mT3M1N.mjs → origin-DLCmrwmE.mjs} +47 -39
- package/dist/{page-64IwoGRu.mjs → page-6BTCZWGY.mjs} +2 -2
- package/dist/page-BnY8FhPn.mjs +2 -0
- package/dist/{provider-D5yVFisj.d.mts → provider-YqkF1E2k.d.mts} +23 -13
- package/dist/{routes-BffuaoTX.d.mts → routes-CAjd5ARa.d.mts} +101 -25
- package/dist/schemas.d.mts +37 -0
- package/dist/schemas.mjs +3 -0
- package/dist/{serve-CX1rqDF_.mjs → serve-Cs-e0Jke.mjs} +4 -4
- package/dist/{server-DkYkyarg.mjs → server-CIfMdIt3.mjs} +6 -6
- package/dist/{serving-DJMcG0dT.mjs → serving-B4l0nLng.mjs} +1 -1
- package/dist/{sql-l3ysn4O5.mjs → sql-Bv-RQu8n.mjs} +73 -10
- package/dist/{sqlite-CAwNHbQD.mjs → sqlite-D4mkYihG.mjs} +2 -2
- package/dist/{sqlite-db-cm5yhrD-.mjs → sqlite-db-BraLvHtf.mjs} +1 -1
- package/dist/sync-chat-sdk.d.mts +2 -2
- package/dist/sync-github.d.mts +2 -2
- package/dist/sync-linear.d.mts +3 -3
- package/dist/sync-slack.d.mts +14 -8
- package/dist/sync-slack.mjs +42 -15
- package/dist/sync.d.mts +2 -2
- package/dist/{tokens-DA9ipsZ-.mjs → tokens-CrrXAVGz.mjs} +2 -2
- package/docs/01-board/01-mounting.md +5 -3
- package/docs/01-board/03-identity.md +70 -38
- package/docs/01-board/04-messages.md +58 -1
- package/docs/01-board/05-reading.md +3 -3
- package/docs/01-board/06-watchers.md +2 -3
- package/docs/01-board/07-schedules.md +2 -4
- package/docs/01-board/08-middleware.md +1 -1
- package/docs/01-board/09-access.md +24 -21
- package/docs/02-sync/01-overview.md +70 -2
- package/docs/02-sync/02-functions.md +11 -6
- package/docs/02-sync/03-slack.md +40 -16
- package/docs/02-sync/06-providers.md +9 -4
- package/docs/04-reference/01-cli.md +110 -18
- package/docs/04-reference/02-board.md +63 -10
- package/docs/04-reference/03-http.md +154 -28
- package/docs/04-reference/05-conformance.md +13 -6
- package/docs/index.md +1 -1
- package/package.json +5 -1
- package/dist/digest-krhjNAt4.mjs +0 -4
- package/dist/exports-vLQ2Y2Nd.d.mts +0 -4
- package/dist/inspect-lnv1sLXM.mjs +0 -2
- package/dist/page-BUj8_UZv.mjs +0 -2
package/README.md
CHANGED
|
@@ -105,11 +105,13 @@ sync: {
|
|
|
105
105
|
}
|
|
106
106
|
```
|
|
107
107
|
|
|
108
|
-
Board messages post
|
|
109
|
-
|
|
108
|
+
Board messages post to Slack under their author's name (`Julián Benegas`,
|
|
109
|
+
`claude via julian`) when the app has `chat:write.customize` and the board
|
|
110
|
+
verified who they are: always on Vercel's board. Your Slack account
|
|
111
|
+
is an actor of its own, and a Slack ping comes in as your Slack handle:
|
|
110
112
|
|
|
111
113
|
```bash
|
|
112
|
-
vb tail --mentions julian
|
|
114
|
+
vb tail --mentions @julian # pings of whoever goes by julian, on Slack or the board
|
|
113
115
|
```
|
|
114
116
|
|
|
115
117
|
## Customize sync
|
package/dist/access.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $t as
|
|
2
|
-
import { _ as GrantExplanation, a as DEFAULT_CAN, b as explainGrants, c as IssuerConfig, f as Principal, g as DecidingGrant, h as Caller, i as Claims, l as Known, n as AuthenticateContext, p as PrincipalKind, r as CallerRequest, s as HostPrincipal, t as Authenticate, u as OidcTokensOptions, v as GrantFacts, x as grantAccess, y as GrantSource } from "./auth-
|
|
1
|
+
import { $t as checkGrantChange, Bt as Access, Gt as Grant, Ht as Can, Jt as GrantShape, Kt as GrantChange, Ut as ChannelPattern, Vt as AccessSummary, Wt as FULL_ACCESS, Yt as InvalidCan, Zt as Permission, en as compileAccess, nn as union, on as Author, qt as GrantChangeRefusal, rn as Actor, sn as CAN_MAX, tn as parseCan } from "./routes-CAjd5ARa.mjs";
|
|
2
|
+
import { _ as GrantExplanation, a as DEFAULT_CAN, b as explainGrants, c as IssuerConfig, f as Principal, g as DecidingGrant, h as Caller, i as Claims, l as Known, n as AuthenticateContext, p as PrincipalKind, r as CallerRequest, s as HostPrincipal, t as Authenticate, u as OidcTokensOptions, v as GrantFacts, x as grantAccess, y as GrantSource } from "./auth-DtmZzlHm.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-AZkxk06N.mjs";
|
|
2
|
-
import { c as compileAccess, f as union, n as InvalidCan, o as checkGrantChange, t as FULL_ACCESS, u as parseCan } from "./access-
|
|
3
|
-
import { E as grantAccess, T as explainGrants, n as DEFAULT_CAN } from "./auth-
|
|
4
|
-
import { i as resolveActor } from "./actors-
|
|
5
|
-
import { t as oidcTokens } from "./tokens-
|
|
2
|
+
import { c as compileAccess, f as union, n as InvalidCan, o as checkGrantChange, t as FULL_ACCESS, u as parseCan } from "./access-Bl_k_Hpa.mjs";
|
|
3
|
+
import { E as grantAccess, T as explainGrants, n as DEFAULT_CAN } from "./auth-C8URZHLx.mjs";
|
|
4
|
+
import { i as resolveActor } from "./actors-yBRWTpt5.mjs";
|
|
5
|
+
import { t as oidcTokens } from "./tokens-CrrXAVGz.mjs";
|
|
6
6
|
export { CAN_MAX, DEFAULT_CAN, FULL_ACCESS, InvalidCan, checkGrantChange, compileAccess, explainGrants, grantAccess, oidcTokens, parseCan, resolveActor, union };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { r as badRequest } from "./errors-
|
|
1
|
+
import { r as badRequest } from "./errors-CNRJqUuL.mjs";
|
|
2
2
|
import { b as toStorable } from "./schemas-AZkxk06N.mjs";
|
|
3
|
-
import { u as parseCan } from "./access-
|
|
3
|
+
import { u as parseCan } from "./access-Bl_k_Hpa.mjs";
|
|
4
4
|
import { t as own } from "./own-OwgPWdmh.mjs";
|
|
5
|
-
import { t as extractMentions } from "./mentions-CB6ShY4R.mjs";
|
|
6
5
|
//#region src/server/actors.ts
|
|
7
6
|
/** Agents whose avatars the board serves itself. */
|
|
8
7
|
const KNOWN_AGENTS = [
|
|
@@ -14,8 +13,6 @@ const KNOWN_AGENTS = [
|
|
|
14
13
|
];
|
|
15
14
|
const PROFILE = /^[A-Za-z][A-Za-z0-9-]{0,31}$/;
|
|
16
15
|
const HANDLE = /^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$/;
|
|
17
|
-
/** An actor ID starts with where it's from: `vercel:user:u_abc123+claude`, `slack:user:U0456`, `board:client`. */
|
|
18
|
-
const isActorId = (id) => id.length <= 256 && /^[^\s:]+:\S+$/.test(id);
|
|
19
16
|
/**
|
|
20
17
|
* What a request's headers say about its caller, checked for shape: a 400 for one that's
|
|
21
18
|
* malformed. None of it is verified; board() works out the actor from it once it knows who the
|
|
@@ -69,7 +66,11 @@ function resolveActor(principal, claims, audience) {
|
|
|
69
66
|
kind: profile === null ? principal.kind : "agent",
|
|
70
67
|
handle: profile === null ? baseHandle : `${baseHandle}/${profile}`,
|
|
71
68
|
name: claims.profile ?? personName ?? baseHandle,
|
|
72
|
-
avatar: claims.avatar ?? (known ? `${audience}/avatars/${profile}` : null)
|
|
69
|
+
avatar: claims.avatar ?? (known ? `${audience}/avatars/${profile}` : null),
|
|
70
|
+
...profile === null ? {} : { via: viaOf({
|
|
71
|
+
id: principal.id,
|
|
72
|
+
handle: baseHandle
|
|
73
|
+
}) }
|
|
73
74
|
};
|
|
74
75
|
return {
|
|
75
76
|
author: {
|
|
@@ -81,6 +82,18 @@ function resolveActor(principal, claims, audience) {
|
|
|
81
82
|
actor
|
|
82
83
|
};
|
|
83
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Who a profile of `principal` acts through, as the board shows it: a deployment by its project's name
|
|
87
|
+
* and its environment (its handle is `www@preview`), anyone else by their handle.
|
|
88
|
+
*/
|
|
89
|
+
function viaOf(principal) {
|
|
90
|
+
const environment = /^vercel:project:[^:]+:([^:]+)$/.exec(principal.id)?.[1] ?? null;
|
|
91
|
+
const suffix = `@${environment}`;
|
|
92
|
+
return {
|
|
93
|
+
name: environment !== null && principal.handle.endsWith(suffix) && principal.handle.length > suffix.length ? principal.handle.slice(0, -suffix.length) : principal.handle,
|
|
94
|
+
environment
|
|
95
|
+
};
|
|
96
|
+
}
|
|
84
97
|
function isAvatarUrl(value) {
|
|
85
98
|
try {
|
|
86
99
|
const url = new URL(value);
|
|
@@ -91,15 +104,21 @@ function isAvatarUrl(value) {
|
|
|
91
104
|
}
|
|
92
105
|
/**
|
|
93
106
|
* An `actor.seen` event, or null when the board already knows these details. `host`: the actor is
|
|
94
|
-
* a host's principal or one of its profiles, which the board records once.
|
|
107
|
+
* a host's principal or one of its profiles, which the board records once. `seen.verified`: this
|
|
108
|
+
* write's credential named it as shown, which each write says anew.
|
|
95
109
|
*/
|
|
96
110
|
function actorSeen(seen, known, host = false) {
|
|
97
111
|
const existing = own(known.byId, seen.id);
|
|
98
|
-
const
|
|
112
|
+
const avatar = seen.kind === "external" && seen.avatar === null ? { avatar: existing?.avatar ?? null } : {};
|
|
113
|
+
const via = seen.via === void 0 && existing?.via ? { via: existing.via } : {};
|
|
114
|
+
const platform = seen.platform === void 0 && existing?.platform ? { platform: existing.platform } : {};
|
|
115
|
+
const actor = {
|
|
99
116
|
...seen,
|
|
100
|
-
avatar
|
|
101
|
-
|
|
102
|
-
|
|
117
|
+
...avatar,
|
|
118
|
+
...via,
|
|
119
|
+
...platform
|
|
120
|
+
};
|
|
121
|
+
if (existing && existing.kind === actor.kind && existing.handle === actor.handle && existing.name === actor.name && existing.avatar === actor.avatar && existing.via?.name === actor.via?.name && existing.via?.environment === actor.via?.environment && existing.platform === actor.platform && existing.verified === actor.verified && (!host || existing.host)) return null;
|
|
103
122
|
return {
|
|
104
123
|
type: "actor.seen",
|
|
105
124
|
payload: {
|
|
@@ -108,49 +127,15 @@ function actorSeen(seen, known, host = false) {
|
|
|
108
127
|
handle: toStorable(actor.handle),
|
|
109
128
|
name: toStorable(actor.name),
|
|
110
129
|
avatar: actor.avatar,
|
|
111
|
-
...
|
|
130
|
+
...actor.via ? { via: {
|
|
131
|
+
name: toStorable(actor.via.name),
|
|
132
|
+
environment: actor.via.environment
|
|
133
|
+
} } : {},
|
|
134
|
+
...actor.platform ? { platform: actor.platform } : {},
|
|
135
|
+
...host ? { host: true } : {},
|
|
136
|
+
...actor.verified ? { verified: true } : {}
|
|
112
137
|
}
|
|
113
138
|
};
|
|
114
139
|
}
|
|
115
|
-
/**
|
|
116
|
-
* Resolves prose mentions to actor IDs. A `@handle` names the one actor the board
|
|
117
|
-
* has seen with it; `@[actor-id]` names one directly. A handle nobody has stays
|
|
118
|
-
* plain text and comes back in `unknown`, so the writer can be told. A handle
|
|
119
|
-
* several actors share, or an `@[actor-id]` the board doesn't know, fails the
|
|
120
|
-
* write. `lenient` is for platform text: no mention fails it, and one that
|
|
121
|
-
* doesn't resolve stays plain text. Without `candidates`, an ambiguous mention
|
|
122
|
-
* doesn't list who it could be: a caller that can't read every channel can't
|
|
123
|
-
* list actors either.
|
|
124
|
-
*/
|
|
125
|
-
function resolveMentions(text, known, pending, lenient = false, candidates = true) {
|
|
126
|
-
const resolved = [];
|
|
127
|
-
const unknown = [];
|
|
128
|
-
const add = (id) => {
|
|
129
|
-
if (!resolved.includes(id)) resolved.push(id);
|
|
130
|
-
};
|
|
131
|
-
const fail = (error) => {
|
|
132
|
-
if (!lenient) throw error;
|
|
133
|
-
};
|
|
134
|
-
for (const token of extractMentions(text)) {
|
|
135
|
-
if (token.kind === "actor") {
|
|
136
|
-
if (isActorId(token.actor) && own(known.byId, token.actor) || pending?.id === token.actor) add(token.actor);
|
|
137
|
-
else fail(badRequest(`unknown actor @[${token.actor}]`, "unknown_mention"));
|
|
138
|
-
continue;
|
|
139
|
-
}
|
|
140
|
-
const ids = new Set(own(known.byHandle, token.handle) ?? []);
|
|
141
|
-
if (pending && pending.handle.toLowerCase() === token.handle) ids.add(pending.id);
|
|
142
|
-
if (ids.size === 1) add([...ids][0]);
|
|
143
|
-
else if (ids.size === 0) unknown.push(token.handle);
|
|
144
|
-
else if (!candidates) fail(badRequest(`ambiguous mention @${token.handle}: use @[actor-id]`, "ambiguous_mention"));
|
|
145
|
-
else {
|
|
146
|
-
const options = [...ids].map((id) => `@[${id}] (${own(known.byId, id)?.name ?? pending?.name ?? id})`).join(" or ");
|
|
147
|
-
fail(badRequest(`ambiguous mention @${token.handle}: use ${options}`, "ambiguous_mention"));
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
return {
|
|
151
|
-
mentions: resolved,
|
|
152
|
-
unknown: lenient ? [] : unknown
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
140
|
//#endregion
|
|
156
|
-
export {
|
|
141
|
+
export { viaOf as a, resolveActor as i, actorSeen as n, claimsOf as r, KNOWN_AGENTS as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as forbidden, l as unauthorized, r as badRequest, t as HttpError } from "./errors-
|
|
2
|
-
import { c as compileAccess, l as decide, p as writtenCan, s as combine, t as FULL_ACCESS, u as parseCan } from "./access-
|
|
1
|
+
import { a as forbidden, l as unauthorized, r as badRequest, t as HttpError } from "./errors-CNRJqUuL.mjs";
|
|
2
|
+
import { c as compileAccess, l as decide, p as writtenCan, s as combine, t as FULL_ACCESS, u as parseCan } from "./access-Bl_k_Hpa.mjs";
|
|
3
3
|
//#region src/server/grants.ts
|
|
4
4
|
/**
|
|
5
5
|
* How close `principal` is to the caller, or null when it doesn't name it: `principal` for its own
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bt as Access, Ht as Can, Qt as WrittenCan, Xt as Level, Zt as Permission } from "./routes-CAjd5ARa.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. */
|
|
@@ -261,7 +261,10 @@ type HostPrincipal = {
|
|
|
261
261
|
/** `vercel:user:<id>`, `vercel:project:<id>:<env>`, …: records keep their shape. */
|
|
262
262
|
id: string;
|
|
263
263
|
kind: PrincipalKind;
|
|
264
|
-
/**
|
|
264
|
+
/**
|
|
265
|
+
* Kept as it is: `x-board-handle` doesn't replace it. Return `request.claims.handle` to take the caller's, which
|
|
266
|
+
* the board then takes as checked: a person posts to Slack under it as a plain sender.
|
|
267
|
+
*/
|
|
265
268
|
handle: string;
|
|
266
269
|
expiresAt?: Date | null;
|
|
267
270
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as Pinned, l as Known, m as StoredGrant, o as Granted, t as Authenticate } from "./auth-
|
|
3
|
-
import {
|
|
1
|
+
import { At as TokenBody, B as PostBody, Bt as Access, C as InboxEntry, Ct as SyncThreadView, D as InboxQuery, Dt as ThreadsPage, E as InboxPushBody, Et as ThreadView, F as MessageView, Ft as UpdateGrantBody, G as ReactBody, I as MessagesPage, L as MessagesQuery, Lt as UploadStartBody, M as MatchView, Mt as TokenView, N as MatchesQuery, Nt as TypingBody, Ot as ThreadsQuery, P as Me, Q as ScheduleBody, Rt as UploadTicket, S as InboxAckBody, T as InboxNextQuery, Xt as Level, Y as RegistrationView, Zt as Permission, _t as SyncFindQuery, a as BoardEventView, an as Attachment, at as SchemaBody, c as CreateChannelBody, cn as Labels, ct as SourceJoin, d as EditBody, dt as SourceRead, f as EventsPage, ft as SourceReadQuery, g as Explanation, h as ExplainQuery, ht as SyncCopiesView, j as LinkedQuery, k as LabelBody, l as DeleteBody, lt as SourceJoinBody, mt as SyncCopiesQuery, n as ActorView, nt as SchedulesQuery, on as Author, p as EventsQuery, q as RegisterBody, rn as Actor, s as ChannelView, st as SchemaView, t as AckBody, tt as ScheduleView, u as Discovery, un as ExternalEvent, v as GrantBody, vt as SyncFindView, w as InboxItem, wt as SyncedView, x as GrantView, xt as SyncReceiptBody, yt as SyncImportBody } from "./routes-CAjd5ARa.mjs";
|
|
2
|
+
import { d as Pinned, l as Known, m as StoredGrant, o as Granted, t as Authenticate } from "./auth-DtmZzlHm.mjs";
|
|
3
|
+
import { F as ErrorOrigin, N as BoardClient, R as ProfileOption, m as SyncProvider } from "./provider-YqkF1E2k.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/api/protocol.d.ts
|
|
6
6
|
type Input<S extends z.ZodType> = NonNullable<z.output<S>>;
|
|
@@ -43,7 +43,7 @@ type Protocol = {
|
|
|
43
43
|
actors: {
|
|
44
44
|
input: Nothing;
|
|
45
45
|
output: {
|
|
46
|
-
actors: Actor[];
|
|
46
|
+
actors: (Actor & Pick<ActorView, 'verified'>)[];
|
|
47
47
|
cursor: string;
|
|
48
48
|
};
|
|
49
49
|
};
|
|
@@ -63,7 +63,6 @@ type Protocol = {
|
|
|
63
63
|
input: Input<typeof PostBody>;
|
|
64
64
|
output: {
|
|
65
65
|
message: MessageView;
|
|
66
|
-
unknownMentions?: string[];
|
|
67
66
|
};
|
|
68
67
|
};
|
|
69
68
|
/** The caller's own post with client ID `id`, as it landed: 404 `post_not_found` when there's none. */
|
|
@@ -77,7 +76,6 @@ type Protocol = {
|
|
|
77
76
|
input: Id & Input<typeof EditBody>;
|
|
78
77
|
output: {
|
|
79
78
|
ok: true;
|
|
80
|
-
unknownMentions?: string[];
|
|
81
79
|
};
|
|
82
80
|
};
|
|
83
81
|
delete: {
|
|
@@ -102,7 +100,6 @@ type Protocol = {
|
|
|
102
100
|
input: Input<typeof ScheduleBody>;
|
|
103
101
|
output: {
|
|
104
102
|
schedule: ScheduleView;
|
|
105
|
-
unknownMentions?: string[];
|
|
106
103
|
};
|
|
107
104
|
};
|
|
108
105
|
schedules: {
|
|
@@ -173,6 +170,32 @@ type Protocol = {
|
|
|
173
170
|
revoked: boolean;
|
|
174
171
|
};
|
|
175
172
|
};
|
|
173
|
+
/** Every schema: the built-ins, then the board's own, by name and version. 501 `no_schemas` where the board keeps none. */
|
|
174
|
+
schemas: {
|
|
175
|
+
input: Nothing;
|
|
176
|
+
output: {
|
|
177
|
+
schemas: SchemaView[];
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
/** One schema version, by `name@version`: 400 `invalid_schema_id` for anything else, 404 `schema_not_found` for one that isn't there. */
|
|
181
|
+
schema: {
|
|
182
|
+
input: Id;
|
|
183
|
+
output: {
|
|
184
|
+
schema: SchemaView;
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
/**
|
|
188
|
+
* Registers a version, for good: needs `manage` at `*`. `created` is false for one that's there
|
|
189
|
+
* with the same definition, and another definition is 409 `schema_immutable`. A built-in's name is
|
|
190
|
+
* 409 `reserved_schema`, and a definition the board won't keep 400 `invalid_schema`.
|
|
191
|
+
*/
|
|
192
|
+
createSchema: {
|
|
193
|
+
input: Input<typeof SchemaBody>;
|
|
194
|
+
output: {
|
|
195
|
+
schema: SchemaView;
|
|
196
|
+
created: boolean;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
176
199
|
upload: {
|
|
177
200
|
input: {
|
|
178
201
|
data: Uint8Array;
|
|
@@ -571,14 +594,11 @@ type DefaultOptions = {
|
|
|
571
594
|
/**
|
|
572
595
|
* Who a verified caller is: its principal, with what board()'s `access` lets it do now (its scope
|
|
573
596
|
* included, which only narrows), the author record its writes carry, and the actor it writes as.
|
|
574
|
-
* `records: false`: its writes leave the board's record of its actor (name, avatar) as it is, for
|
|
575
|
-
* a platform user a sync that can't sync everywhere writes as.
|
|
576
597
|
*/
|
|
577
598
|
type Identity = {
|
|
578
599
|
principal: Granted;
|
|
579
600
|
author: Author;
|
|
580
601
|
actor: Actor;
|
|
581
|
-
records?: false;
|
|
582
602
|
};
|
|
583
603
|
/**
|
|
584
604
|
* A caller board() verified, and what its policy lets it do: a request's, or for work a backend does
|
|
@@ -767,6 +787,12 @@ interface Backend extends ProtocolMethods {
|
|
|
767
787
|
* board() screens a schedule's message once, when it's made. True when left out.
|
|
768
788
|
*/
|
|
769
789
|
readonly sendsSchedulesHere?: boolean;
|
|
790
|
+
/**
|
|
791
|
+
* Whether board()'s sync runs its entry `key` here: false for one another deployment holds, as vercel()'s
|
|
792
|
+
* deployments of one project hold each of its keys once (production takes one from a preview). Sync takes webhooks,
|
|
793
|
+
* pulls its inbox, starts threads, and delivers only through the keys it holds. Every key, when left out.
|
|
794
|
+
*/
|
|
795
|
+
syncedHere?(key: string): Promise<boolean>;
|
|
770
796
|
/** Its grants and tokens, for a backend that keeps them (`local()`): board() checks requests against them. */
|
|
771
797
|
readonly trust?: Trust;
|
|
772
798
|
/**
|
package/dist/backend-local.d.mts
CHANGED
package/dist/backend-local.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as local } from "./local-
|
|
1
|
+
import { t as local } from "./local-CsleYuyM.mjs";
|
|
2
2
|
export { local };
|