@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.
- package/README.md +1 -1
- package/dist/{access-Bl_k_Hpa.mjs → access-C5HaO42b.mjs} +2 -2
- package/dist/access.d.mts +6 -6
- package/dist/access.mjs +5 -5
- package/dist/{actors-yBRWTpt5.mjs → actors-nrOf7Y7z.mjs} +59 -40
- package/dist/{auth-DtmZzlHm.d.mts → auth-Bn8J_1F2.d.mts} +12 -30
- package/dist/{auth-C8URZHLx.mjs → auth-DAlYi6TN.mjs} +9 -19
- package/dist/{backend-BW5NbBsp.d.mts → backend-CYsTLxtP.d.mts} +116 -46
- package/dist/backend-local.d.mts +1 -1
- package/dist/backend-local.mjs +1 -1
- package/dist/{chat-provider-1WKsLEnM.mjs → chat-provider-CPZg2MQb.mjs} +2 -2
- package/dist/{chat-provider-Bbb9JguG.d.mts → chat-provider-Cgkh9xJw.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 +3 -3
- package/dist/cli-embedded.mjs +4 -4
- package/dist/cli.mjs +8 -13
- package/dist/{commands-BJLocuXj.d.mts → commands-CrEVjASe.d.mts} +8 -30
- package/dist/{commands-D6VWegVY.mjs → commands-QRD0U9AQ.mjs} +30 -101
- package/dist/{conformance-BWhZ0k8T.mjs → conformance-ClxEEZ9C.mjs} +139 -109
- package/dist/conformance.d.mts +9 -8
- package/dist/conformance.mjs +1 -1
- package/dist/digest-Dna1CGa_.mjs +4 -0
- package/dist/{engine-Djif8XVk.mjs → engine-8BcNeckB.mjs} +11 -12
- package/dist/{errors-CNRJqUuL.mjs → errors-DcQf5WeM.mjs} +109 -30
- package/dist/{events-C6HwB046.mjs → events-BT8y_81j.mjs} +2 -2
- package/dist/{exports-C2OWIbLU.mjs → exports-B6udRV_E.mjs} +363 -161
- package/dist/exports-C8zsIL1A.d.mts +4 -0
- package/dist/{external-CHDxWIVf.mjs → external-DymyhUzl.mjs} +1 -1
- package/dist/{index-Cuxbz_E0.d.mts → index-fcpEFCTR.d.mts} +2 -2
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +6 -5
- package/dist/index.node.d.mts +6 -6
- package/dist/index.node.mjs +3 -3
- package/dist/inspect/app.js +31 -31
- package/dist/inspect/engine.js +2 -2
- package/dist/inspect-BsF3mYMY.mjs +2 -0
- package/dist/{inspect-cGcP8ZO9.mjs → inspect-DPRoC_Gg.mjs} +6 -6
- package/dist/{local-CsleYuyM.mjs → local-B9y4p6N7.mjs} +113 -358
- package/dist/{main-D97xuqWZ.mjs → main-S0A-c_kP.mjs} +392 -139
- package/dist/{memory-BvVoglGv.mjs → memory-DhduVbUu.mjs} +2 -2
- package/dist/{mentions-CT2bN5eP.mjs → mentions-DfZGp3B-.mjs} +1 -1
- package/dist/{middleware-BF9vnPPS.mjs → middleware-DHdrxmoc.mjs} +2 -2
- package/dist/{origin-DLCmrwmE.mjs → origin-B3m2lnZC.mjs} +7 -36
- package/dist/{page-6BTCZWGY.mjs → page-2jjHZmIW.mjs} +2 -2
- package/dist/page-CAUe4GmQ.mjs +2 -0
- package/dist/{provider-YqkF1E2k.d.mts → provider-dY54GFNz.d.mts} +1 -25
- package/dist/{routes-CAjd5ARa.d.mts → routes-By9lmvUD.d.mts} +1 -63
- package/dist/{schemas-AZkxk06N.mjs → schemas-DAzSsgWk.mjs} +8 -3
- package/dist/{serve-Cs-e0Jke.mjs → serve-B15I2Ibf.mjs} +5 -5
- package/dist/{server-CIfMdIt3.mjs → server-DgpRZ4Nu.mjs} +74 -127
- package/dist/{serving-B4l0nLng.mjs → serving-CALKWs9K.mjs} +1 -1
- package/dist/{sql-Bv-RQu8n.mjs → sql-P9g-rLIF.mjs} +3 -3
- package/dist/{sqlite-D4mkYihG.mjs → sqlite-B3rCcIof.mjs} +2 -2
- package/dist/{sqlite-db-BraLvHtf.mjs → sqlite-db-D0Fyju-4.mjs} +1 -1
- package/dist/sync-chat-sdk.d.mts +2 -2
- package/dist/sync-chat-sdk.mjs +2 -2
- package/dist/sync-github.d.mts +2 -2
- package/dist/sync-github.mjs +2 -2
- package/dist/sync-linear.d.mts +3 -3
- package/dist/sync-linear.mjs +2 -2
- package/dist/sync-slack.d.mts +3 -3
- package/dist/sync-slack.mjs +4 -4
- package/dist/sync.d.mts +2 -2
- package/dist/sync.mjs +2 -2
- package/dist/{tokens-CrrXAVGz.mjs → tokens-D7_ZIWpX.mjs} +4 -4
- package/docs/01-board/01-mounting.md +12 -17
- package/docs/01-board/03-identity.md +45 -39
- package/docs/01-board/04-messages.md +3 -1
- package/docs/01-board/05-reading.md +8 -2
- package/docs/01-board/06-watchers.md +15 -10
- package/docs/01-board/07-schedules.md +6 -2
- package/docs/01-board/09-access.md +56 -111
- package/docs/02-sync/01-overview.md +5 -2
- package/docs/02-sync/03-slack.md +12 -12
- package/docs/03-guides/01-coding-agents.md +18 -22
- package/docs/03-guides/02-inspector.md +4 -5
- package/docs/03-guides/03-ci.md +7 -26
- package/docs/03-guides/04-triage.md +2 -2
- package/docs/03-guides/05-agent-factory.md +7 -9
- package/docs/03-guides/06-sandboxed-agents.md +149 -0
- package/docs/04-reference/01-cli.md +52 -87
- package/docs/04-reference/02-board.md +35 -36
- package/docs/04-reference/03-http.md +32 -53
- package/docs/04-reference/05-conformance.md +37 -18
- package/docs/index.md +4 -4
- package/package.json +1 -1
- package/dist/digest-D32GV_mX.mjs +0 -4
- package/dist/exports-FyRBIAMs.d.mts +0 -4
- package/dist/inspect-CLy6FrOZ.mjs +0 -2
- package/dist/page-BnY8FhPn.mjs +0 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { u as BoardError } from "./errors-
|
|
1
|
+
import { u as BoardError } from "./errors-DcQf5WeM.mjs";
|
|
2
2
|
import { c as canonical, t as block } from "./blocks-CVoBC7ur.mjs";
|
|
3
|
-
import { c as compileAccess } from "./access-
|
|
3
|
+
import { a as canText, c as compileAccess } from "./access-C5HaO42b.mjs";
|
|
4
4
|
//#region src/conformance/index.ts
|
|
5
5
|
var Mismatch = class extends Error {};
|
|
6
6
|
const show = (value) => JSON.stringify(value) ?? String(value);
|
|
@@ -30,6 +30,26 @@ async function refused(attempt, status, what) {
|
|
|
30
30
|
throw new Mismatch(`${what}: expected ${status}, and it succeeded`);
|
|
31
31
|
}
|
|
32
32
|
const NO_CAN = "this run can't call the board with an x-board-can header";
|
|
33
|
+
const NO_HEADERS = "this run can't call the board with headers of its own";
|
|
34
|
+
/** The avatar the checks of who writes give their profile. */
|
|
35
|
+
const AVATAR = "https://example.com/conformance.png";
|
|
36
|
+
/** A post by `poster`, which sends `header`, read back as the run sees it: it lands, and is deleted when the run ends. */
|
|
37
|
+
async function postedWith(ctx, poster, header) {
|
|
38
|
+
const posted = await poster.post(ctx.channel, {
|
|
39
|
+
text: `conformance: with ${header}`,
|
|
40
|
+
labels: ctx.labels,
|
|
41
|
+
noSync: true
|
|
42
|
+
}).catch((error) => {
|
|
43
|
+
throw new Mismatch(`a post with ${header}, which released clients still send: expected it to land, got ${error instanceof BoardError ? `${error.status} ${error.code}` : String(error)}`);
|
|
44
|
+
});
|
|
45
|
+
ctx.posted.push(posted.id);
|
|
46
|
+
return (await ctx.board.thread(posted.id)).message;
|
|
47
|
+
}
|
|
48
|
+
/** That a view's `by` names who wrote it as the protocol has it: an actor, a principal, and a profile, and no session. */
|
|
49
|
+
function noSession(by, what) {
|
|
50
|
+
check(typeof by === "object" && by !== null, `${what} should have a by, got ${show(by)}`);
|
|
51
|
+
check(!("session" in by), `${what} should carry no session, got ${show(by)}`);
|
|
52
|
+
}
|
|
33
53
|
/**
|
|
34
54
|
* That `attempt`, by a caller narrowed with `x-board-can`, is refused as one: 403 `forbidden`.
|
|
35
55
|
* Vercel's API's refusal of a person's watchers goes on as it is, for the run to skip.
|
|
@@ -65,7 +85,6 @@ function isRef(value, what) {
|
|
|
65
85
|
const OPTIONAL = /* @__PURE__ */ new Set([
|
|
66
86
|
"schedules",
|
|
67
87
|
"grants",
|
|
68
|
-
"tokens",
|
|
69
88
|
"schemas",
|
|
70
89
|
"attachments"
|
|
71
90
|
]);
|
|
@@ -113,13 +132,12 @@ function unnamed(error) {
|
|
|
113
132
|
}
|
|
114
133
|
const messageOf = (error) => error instanceof Error ? error.message : String(error);
|
|
115
134
|
/**
|
|
116
|
-
* Runs `check` with what it makes grants
|
|
135
|
+
* Runs `check` with what it makes grants with, and revokes them all afterwards, the
|
|
117
136
|
* newest grant first, so one that closes a pattern goes while the one keeping this run in is there.
|
|
118
137
|
* A revoke that fails fails the check: what it made would stay on the board.
|
|
119
138
|
*/
|
|
120
139
|
async function withGrants(ctx, check) {
|
|
121
140
|
const made = [];
|
|
122
|
-
const tokens = [];
|
|
123
141
|
const grants = {
|
|
124
142
|
async make(input, by) {
|
|
125
143
|
try {
|
|
@@ -142,24 +160,9 @@ async function withGrants(ctx, check) {
|
|
|
142
160
|
}
|
|
143
161
|
throw new Mismatch(`${what}: expected 403, and it made the grant`);
|
|
144
162
|
},
|
|
145
|
-
|
|
146
|
-
if (!ctx.
|
|
147
|
-
|
|
148
|
-
const { token, secret } = await ctx.board.createToken({
|
|
149
|
-
name: `conformance-${ctx.labels.conformance}-grants`,
|
|
150
|
-
can,
|
|
151
|
-
expires: "1h"
|
|
152
|
-
});
|
|
153
|
-
tokens.push(token.id);
|
|
154
|
-
return ctx.withToken(secret);
|
|
155
|
-
} catch (error) {
|
|
156
|
-
if (error instanceof BoardError && [
|
|
157
|
-
403,
|
|
158
|
-
404,
|
|
159
|
-
501
|
|
160
|
-
].includes(error.status)) throw new Skip(`this board mints no tokens to check with: ${error.message}`);
|
|
161
|
-
throw error;
|
|
162
|
-
}
|
|
163
|
+
narrow(can) {
|
|
164
|
+
if (!ctx.withCan) throw new Skip(NO_CAN);
|
|
165
|
+
return ctx.withCan(canText(compileAccess(can)));
|
|
163
166
|
},
|
|
164
167
|
async keep(pattern) {
|
|
165
168
|
const [source, kind, id, environment] = ctx.me.principal.split(":");
|
|
@@ -194,9 +197,6 @@ async function withGrants(ctx, check) {
|
|
|
194
197
|
for (const id of made.reverse()) await ctx.board.revokeGrant(id).catch((error) => {
|
|
195
198
|
left.push(`${id} (${messageOf(error)})`);
|
|
196
199
|
});
|
|
197
|
-
for (const id of tokens) await ctx.board.revokeToken(id).catch((error) => {
|
|
198
|
-
left.push(`token ${id} (${messageOf(error)})`);
|
|
199
|
-
});
|
|
200
200
|
if (left.length > 0) throw new Mismatch(`${failure ? `${messageOf(failure)}; and it ` : ""}couldn't revoke what it made: ${left.join(", ")}`);
|
|
201
201
|
if (failure) throw failure;
|
|
202
202
|
return result;
|
|
@@ -692,6 +692,105 @@ const CHECKS = [
|
|
|
692
692
|
}), 403, "a post by a caller narrowed to read");
|
|
693
693
|
}
|
|
694
694
|
},
|
|
695
|
+
{
|
|
696
|
+
group: "core",
|
|
697
|
+
name: "takes a profile and its avatar as one x-board-profile header, and shows both on what it writes",
|
|
698
|
+
run: async (ctx) => {
|
|
699
|
+
if (!ctx.withHeaders) return NO_HEADERS;
|
|
700
|
+
const name = `conformance-${ctx.labels.conformance}`;
|
|
701
|
+
const posted = await ctx.withHeaders({ "x-board-profile": `${name}; avatar="${AVATAR}"` }).post(ctx.channel, {
|
|
702
|
+
text: "conformance: as a profile, with its avatar",
|
|
703
|
+
labels: ctx.labels,
|
|
704
|
+
noSync: true
|
|
705
|
+
});
|
|
706
|
+
ctx.posted.push(posted.id);
|
|
707
|
+
const { message } = await ctx.board.thread(posted.id);
|
|
708
|
+
same(message.by.principal, ctx.me.principal, "the profile's principal, this run's");
|
|
709
|
+
same(message.by.profile?.toLowerCase(), name, "the profile its header names");
|
|
710
|
+
same(message.author?.kind, "agent", "the profile's kind");
|
|
711
|
+
same(message.author?.name, name, "the profile's name");
|
|
712
|
+
same(message.author?.avatar, AVATAR, "the profile's avatar, from its header's parameter");
|
|
713
|
+
}
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
group: "core",
|
|
717
|
+
name: "lets a profile change only its own messages, and its principal all of them",
|
|
718
|
+
run: async (ctx) => {
|
|
719
|
+
if (!ctx.withHeaders) return NO_HEADERS;
|
|
720
|
+
if (ctx.me.actor !== ctx.me.principal) return "this run writes as a profile, so it can't change messages as its principal";
|
|
721
|
+
const as = (name) => ctx.withHeaders({ "x-board-profile": `conformance-${name}-${ctx.labels.conformance}` });
|
|
722
|
+
const by = async (poster, text) => {
|
|
723
|
+
const message = await poster.post(ctx.channel, {
|
|
724
|
+
text,
|
|
725
|
+
labels: ctx.labels,
|
|
726
|
+
noSync: true
|
|
727
|
+
});
|
|
728
|
+
ctx.posted.push(message.id);
|
|
729
|
+
return message;
|
|
730
|
+
};
|
|
731
|
+
const profile = as("own");
|
|
732
|
+
const own = await by(profile, "conformance: a profile's own");
|
|
733
|
+
const other = await by(as("other"), "conformance: another profile's");
|
|
734
|
+
const principal = await by(ctx.board, "conformance: its principal's");
|
|
735
|
+
await profile.edit(own.id, "conformance: a profile's own, edited by it");
|
|
736
|
+
same((await ctx.board.thread(own.id)).message.text, "conformance: a profile's own, edited by it", "a profile's own message, once it edits it");
|
|
737
|
+
for (const [message, whose] of [[other, "another profile's"], [principal, "its principal's"]]) {
|
|
738
|
+
await refused(profile.edit(message.id, "conformance: not its own"), 403, `an edit, by a profile, of ${whose} message`);
|
|
739
|
+
await refused(profile.delete(message.id), 403, `a delete, by a profile, of ${whose} message`);
|
|
740
|
+
}
|
|
741
|
+
await ctx.board.edit(other.id, "conformance: another profile's, edited by its principal");
|
|
742
|
+
const edited = (await ctx.board.thread(other.id)).message;
|
|
743
|
+
same(edited.text, "conformance: another profile's, edited by its principal", "a profile's message, once its principal edits it");
|
|
744
|
+
same(edited.by.actor, other.by.actor, "who a profile's message is by, once its principal edits it");
|
|
745
|
+
for (const message of [own, other]) {
|
|
746
|
+
await ctx.board.delete(message.id);
|
|
747
|
+
check((await ctx.board.thread(message.id)).message.deleted, "a profile's message, once its principal deletes it, should be deleted");
|
|
748
|
+
}
|
|
749
|
+
await profile.delete((await by(profile, "conformance: a profile's own, to delete")).id);
|
|
750
|
+
}
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
group: "core",
|
|
754
|
+
name: "ignores x-board-avatar, which x-board-profile's avatar parameter replaced",
|
|
755
|
+
run: async (ctx) => {
|
|
756
|
+
if (!ctx.withHeaders) return NO_HEADERS;
|
|
757
|
+
const name = `conformance-bare-${ctx.labels.conformance}`;
|
|
758
|
+
const message = await postedWith(ctx, ctx.withHeaders({
|
|
759
|
+
"x-board-profile": name,
|
|
760
|
+
"x-board-avatar": AVATAR
|
|
761
|
+
}), "x-board-avatar");
|
|
762
|
+
same(message.by.profile?.toLowerCase(), name, "the profile its header names");
|
|
763
|
+
same(message.author?.avatar ?? null, null, "the avatar of a profile whose header names none, whatever x-board-avatar says");
|
|
764
|
+
}
|
|
765
|
+
},
|
|
766
|
+
{
|
|
767
|
+
group: "core",
|
|
768
|
+
name: "ignores x-board-session: who writes is the principal and its profile",
|
|
769
|
+
run: async (ctx) => {
|
|
770
|
+
if (!ctx.withHeaders) return NO_HEADERS;
|
|
771
|
+
const message = await postedWith(ctx, ctx.withHeaders({ "x-board-session": `conformance-${ctx.labels.conformance}` }), "x-board-session");
|
|
772
|
+
same(message.by.actor, ctx.me.actor, "who a post with x-board-session is by: this run, as itself");
|
|
773
|
+
noSession(message.by, "a post with x-board-session");
|
|
774
|
+
}
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
group: "core",
|
|
778
|
+
name: "shows no session on a message, its event, or you",
|
|
779
|
+
run: async (ctx) => {
|
|
780
|
+
const { root } = needRoot(ctx);
|
|
781
|
+
noSession((await ctx.board.thread(root.id)).message.by, "a message");
|
|
782
|
+
const { events } = await ctx.board.poll({
|
|
783
|
+
channel: ctx.channel,
|
|
784
|
+
after: ctx.start,
|
|
785
|
+
label: ctx.labels,
|
|
786
|
+
wait: 0
|
|
787
|
+
});
|
|
788
|
+
const posted = events.find((event) => event.type === "message.posted");
|
|
789
|
+
check(posted !== void 0, `events after the run's start should hold its post, got ${show(events.map((event) => event.type))}`);
|
|
790
|
+
noSession(posted.payload.by, "a message.posted event's payload");
|
|
791
|
+
check(!("session" in ctx.me), `you should carry no session, got ${show(ctx.me)}`);
|
|
792
|
+
}
|
|
793
|
+
},
|
|
695
794
|
{
|
|
696
795
|
group: "schedules",
|
|
697
796
|
name: "schedules a reply, lists it, and cancels it",
|
|
@@ -940,10 +1039,10 @@ const CHECKS = [
|
|
|
940
1039
|
{
|
|
941
1040
|
group: "grants",
|
|
942
1041
|
name: "takes manage at each pattern a grant names to change it, and at * to list them",
|
|
943
|
-
run: (ctx) => withGrants(ctx, async ({ make, deny,
|
|
1042
|
+
run: (ctx) => withGrants(ctx, async ({ make, deny, narrow }) => {
|
|
944
1043
|
const subtree = subtreeOf(ctx);
|
|
945
1044
|
const inner = `${subtree}inner/`;
|
|
946
|
-
const poster =
|
|
1045
|
+
const poster = narrow({ "*": ["read", "post"] });
|
|
947
1046
|
const probe = await make(grantFor(ctx));
|
|
948
1047
|
await deny(poster, grantFor(ctx), "a grant made without manage");
|
|
949
1048
|
await refused(poster.updateGrant(probe.id, { can: { [`${subtree}ci/`]: ["read"] } }), 403, "an update without manage");
|
|
@@ -951,7 +1050,7 @@ const CHECKS = [
|
|
|
951
1050
|
await refused(poster.grants(), 403, "listing grants without manage at *");
|
|
952
1051
|
await refused(poster.explain(`${subtree}thread`, { project: ctx.principals.project }), 403, "explaining a principal's access without manage at *");
|
|
953
1052
|
alike((await poster.explain(`${subtree}thread`)).grants, [], "which grants decide, for a caller that may not list them");
|
|
954
|
-
const manager =
|
|
1053
|
+
const manager = narrow({
|
|
955
1054
|
"*": [
|
|
956
1055
|
"read",
|
|
957
1056
|
"post",
|
|
@@ -976,19 +1075,19 @@ const CHECKS = [
|
|
|
976
1075
|
},
|
|
977
1076
|
{
|
|
978
1077
|
group: "grants",
|
|
979
|
-
name: "lets no
|
|
980
|
-
run: (ctx) => withGrants(ctx, async ({ make, deny,
|
|
1078
|
+
name: "lets no caller narrowed with x-board-can grant past its can, even where everyone's grant closes it",
|
|
1079
|
+
run: (ctx) => withGrants(ctx, async ({ make, deny, narrow, keep }) => {
|
|
981
1080
|
const subtree = subtreeOf(ctx);
|
|
982
1081
|
const secret = `${subtree}secret/`;
|
|
983
1082
|
const run = granteeOf(ctx);
|
|
984
|
-
const narrowed =
|
|
1083
|
+
const narrowed = narrow({
|
|
985
1084
|
"*": "all",
|
|
986
1085
|
[secret]: []
|
|
987
1086
|
});
|
|
988
1087
|
await deny(narrowed, {
|
|
989
1088
|
principals: [run],
|
|
990
1089
|
can: { [subtree]: ["read"] }
|
|
991
|
-
}, `a grant on ${subtree} from a
|
|
1090
|
+
}, `a grant on ${subtree} from a caller narrowed out of ${secret}`);
|
|
992
1091
|
await keep(secret);
|
|
993
1092
|
await make({
|
|
994
1093
|
principals: [{ kind: "everyone" }],
|
|
@@ -997,7 +1096,7 @@ const CHECKS = [
|
|
|
997
1096
|
await deny(narrowed, {
|
|
998
1097
|
principals: [run],
|
|
999
1098
|
can: { [subtree]: ["read"] }
|
|
1000
|
-
}, `a grant on ${subtree} from a
|
|
1099
|
+
}, `a grant on ${subtree} from a caller narrowed out of ${secret}, once everyone is too`);
|
|
1001
1100
|
await make({
|
|
1002
1101
|
principals: [run],
|
|
1003
1102
|
can: { [`${subtree}ci/`]: ["post"] }
|
|
@@ -1006,11 +1105,11 @@ const CHECKS = [
|
|
|
1006
1105
|
},
|
|
1007
1106
|
{
|
|
1008
1107
|
group: "grants",
|
|
1009
|
-
name: "lets no
|
|
1010
|
-
run: (ctx) => withGrants(ctx, async ({ make, deny,
|
|
1108
|
+
name: "lets no caller narrowed with x-board-can let anyone in where everyone gets more than it has",
|
|
1109
|
+
run: (ctx) => withGrants(ctx, async ({ make, deny, narrow, keep }) => {
|
|
1011
1110
|
const subtree = subtreeOf(ctx);
|
|
1012
1111
|
const open = `${subtree}open/`;
|
|
1013
|
-
const narrowed =
|
|
1112
|
+
const narrowed = narrow({
|
|
1014
1113
|
"*": "all",
|
|
1015
1114
|
[open]: []
|
|
1016
1115
|
});
|
|
@@ -1022,7 +1121,7 @@ const CHECKS = [
|
|
|
1022
1121
|
await deny(narrowed, {
|
|
1023
1122
|
principals: [granteeOf(ctx)],
|
|
1024
1123
|
can: { [`${subtree}ci/`]: ["post"] }
|
|
1025
|
-
}, `a grant from a
|
|
1124
|
+
}, `a grant from a caller narrowed out of ${open}, which everyone reads`);
|
|
1026
1125
|
})
|
|
1027
1126
|
},
|
|
1028
1127
|
{
|
|
@@ -1035,69 +1134,6 @@ const CHECKS = [
|
|
|
1035
1134
|
name: "lets a project on another team in, in its environments",
|
|
1036
1135
|
run: async () => "grants across teams aren't specified yet: what a project on another team needs, and what all-projects means for one, comes later"
|
|
1037
1136
|
},
|
|
1038
|
-
{
|
|
1039
|
-
group: "tokens",
|
|
1040
|
-
name: "mints a token, shows its secret only then, lists it, and revokes it",
|
|
1041
|
-
run: async (ctx) => {
|
|
1042
|
-
const name = `conformance-${ctx.labels.conformance}`;
|
|
1043
|
-
const { token, secret } = await ctx.board.createToken({
|
|
1044
|
-
name,
|
|
1045
|
-
can: { [ctx.channel]: ["read"] },
|
|
1046
|
-
expires: "1h"
|
|
1047
|
-
});
|
|
1048
|
-
try {
|
|
1049
|
-
isRef(token.id, "a token's id");
|
|
1050
|
-
check(typeof secret === "string" && secret.length >= 32, `a token's secret should be a string of at least 32 characters, got ${typeof secret}`);
|
|
1051
|
-
same(token.name, name, "the token's name");
|
|
1052
|
-
same(show(token.can), show({ [ctx.channel]: ["read"] }), "the token's can");
|
|
1053
|
-
const left = Date.parse(token.expiresAt) - Date.now();
|
|
1054
|
-
check(left > 33e5 && left <= 3605e3, `a token minted for 1h should expire in an hour, got ${token.expiresAt}`);
|
|
1055
|
-
const listed = await ctx.board.tokens();
|
|
1056
|
-
check(listed.some((found) => found.id === token.id), `tokens should list ${token.id}`);
|
|
1057
|
-
check(!JSON.stringify(listed).includes(secret), "tokens shouldn't show a token's secret");
|
|
1058
|
-
} catch (error) {
|
|
1059
|
-
await ctx.board.revokeToken(token.id).catch(() => {});
|
|
1060
|
-
throw error;
|
|
1061
|
-
}
|
|
1062
|
-
same((await ctx.board.revokeToken(token.id)).revoked, true, "revoking it");
|
|
1063
|
-
same((await ctx.board.revokeToken(token.id)).revoked, false, "revoking it again");
|
|
1064
|
-
check(!(await ctx.board.tokens()).some((found) => found.id === token.id), "tokens shouldn't list it once it's revoked");
|
|
1065
|
-
}
|
|
1066
|
-
},
|
|
1067
|
-
{
|
|
1068
|
-
group: "tokens",
|
|
1069
|
-
name: "lets a token do what its can says, as whoever minted it, and nothing once it's revoked",
|
|
1070
|
-
run: async (ctx) => {
|
|
1071
|
-
if (!ctx.withToken) return "this run can't call the board with a token's secret";
|
|
1072
|
-
const { root } = needRoot(ctx);
|
|
1073
|
-
const { token, secret } = await ctx.board.createToken({
|
|
1074
|
-
name: `conformance-${ctx.labels.conformance}-reads`,
|
|
1075
|
-
can: { [ctx.channel]: ["read"] },
|
|
1076
|
-
expires: "1h"
|
|
1077
|
-
});
|
|
1078
|
-
const holder = ctx.withToken(secret);
|
|
1079
|
-
try {
|
|
1080
|
-
const me = await holder.me();
|
|
1081
|
-
same(me.principal, ctx.me.principal, "a token's principal, its minter's");
|
|
1082
|
-
const want = { [ctx.channel]: ["read"] };
|
|
1083
|
-
check(show(me.can) === show(want), `what a token that may only read says it may do: expected ${show(want)}, got ${show(me.can)}`);
|
|
1084
|
-
same((await holder.thread(root.id)).message.id, root.id, "a thread read with a token that may read it");
|
|
1085
|
-
await refused(holder.post(ctx.channel, {
|
|
1086
|
-
text: "conformance: a token that may only read",
|
|
1087
|
-
labels: ctx.labels,
|
|
1088
|
-
noSync: true
|
|
1089
|
-
}).then((message) => {
|
|
1090
|
-
ctx.posted.push(message.id);
|
|
1091
|
-
return message;
|
|
1092
|
-
}), 403, "a post with a token that may only read");
|
|
1093
|
-
} catch (error) {
|
|
1094
|
-
await ctx.board.revokeToken(token.id).catch(() => {});
|
|
1095
|
-
throw error;
|
|
1096
|
-
}
|
|
1097
|
-
same((await ctx.board.revokeToken(token.id)).revoked, true, "revoking it");
|
|
1098
|
-
await refused(holder.me(), 401, "a request with a revoked token");
|
|
1099
|
-
}
|
|
1100
|
-
},
|
|
1101
1137
|
{
|
|
1102
1138
|
group: "schemas",
|
|
1103
1139
|
name: "lists the built-in schemas first, and reads a schema by its ID",
|
|
@@ -1737,8 +1773,8 @@ async function conformance(board, options = {}) {
|
|
|
1737
1773
|
})).cursor,
|
|
1738
1774
|
me,
|
|
1739
1775
|
posted: [],
|
|
1740
|
-
...options.
|
|
1741
|
-
...options.
|
|
1776
|
+
...options.withCan ? { withCan: options.withCan } : options.withHeaders ? { withCan: (can) => options.withHeaders({ "x-board-can": can }) } : {},
|
|
1777
|
+
...options.withHeaders ? { withHeaders: options.withHeaders } : {},
|
|
1742
1778
|
principals: {
|
|
1743
1779
|
project: options.principals?.project ?? `prj_conformance${label}`,
|
|
1744
1780
|
repository: options.principals?.repository ?? `acme/conformance-${label}`,
|
|
@@ -1779,12 +1815,6 @@ async function conformance(board, options = {}) {
|
|
|
1779
1815
|
status: "skipped",
|
|
1780
1816
|
detail: "this board takes no GitHub or OIDC principals in a grant"
|
|
1781
1817
|
});
|
|
1782
|
-
else if (group === "tokens" && error instanceof BoardError && error.code === "unsupported_principal") checks.push({
|
|
1783
|
-
group,
|
|
1784
|
-
name,
|
|
1785
|
-
status: "skipped",
|
|
1786
|
-
detail: "this board mints tokens only for a deployment: run as one to check them"
|
|
1787
|
-
});
|
|
1788
1818
|
else checks.push({
|
|
1789
1819
|
group,
|
|
1790
1820
|
name,
|
package/dist/conformance.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as Board } from "./backend-
|
|
1
|
+
import { d as Board } from "./backend-CYsTLxtP.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
|
|
@@ -8,7 +8,7 @@ import { d as Board } from "./backend-BW5NbBsp.mjs";
|
|
|
8
8
|
* schema it registers, `conformance@1`, stays: a schema version is never removed.
|
|
9
9
|
*/
|
|
10
10
|
/** What a check is about, for the report's headings. */
|
|
11
|
-
export type CheckGroup = 'core' | 'schedules' | 'grants' | '
|
|
11
|
+
export type CheckGroup = 'core' | 'schedules' | 'grants' | 'schemas' | 'attachments' | 'watchers' | 'sync';
|
|
12
12
|
export type CheckResult = {
|
|
13
13
|
group: CheckGroup;
|
|
14
14
|
name: string;
|
|
@@ -25,18 +25,19 @@ export type ConformanceReport = {
|
|
|
25
25
|
export type ConformanceOptions = {
|
|
26
26
|
/** Where it posts. Default `conformance`. */
|
|
27
27
|
channel?: string;
|
|
28
|
-
/**
|
|
29
|
-
* The same board, with a board token's secret as the credential (as `BOARD_TOKEN` sends it):
|
|
30
|
-
* the tokens check calls it so to see that a token does only what its `can` says. Without it,
|
|
31
|
-
* that check is skipped.
|
|
32
|
-
*/
|
|
33
|
-
withToken?: (secret: string) => Board;
|
|
34
28
|
/**
|
|
35
29
|
* The same board, with this run's credential and an `x-board-can` header that narrows it to
|
|
36
30
|
* `can` (`conformance=read`), as a proxy holding the credential sends it: the checks of a
|
|
37
31
|
* narrowed caller call it so. Without it, they're skipped.
|
|
38
32
|
*/
|
|
39
33
|
withCan?: (can: string) => Board;
|
|
34
|
+
/**
|
|
35
|
+
* The same board, with this run's credential and `headers` on every request, as a client or a proxy
|
|
36
|
+
* holding the credential sends them: the checks of who writes call it so, with an
|
|
37
|
+
* `x-board-profile` that carries an avatar and the headers that one replaced. Without it, they're
|
|
38
|
+
* skipped, and it stands in for `withCan` when that's left out.
|
|
39
|
+
*/
|
|
40
|
+
withHeaders?: (headers: Record<string, string>) => Board;
|
|
40
41
|
/**
|
|
41
42
|
* Whom the grants checks name. A board that verifies tokens itself (`vb serve`) takes the made-up
|
|
42
43
|
* IDs they use without it; one that looks names up, as Vercel's API does, needs real ones on its
|
package/dist/conformance.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as conformance } from "./conformance-
|
|
1
|
+
import { t as conformance } from "./conformance-ClxEEZ9C.mjs";
|
|
2
2
|
export { conformance };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import {
|
|
3
|
-
import { l as isThreadTarget, s as channelOf } from "./external-
|
|
1
|
+
import { _ as IMPORT_BYTES_MAX, h as ATTACHMENT_BYTES_MAX, r as badRequest, s as notFound, t as HttpError, x as typeOf, y as fileSize } from "./errors-DcQf5WeM.mjs";
|
|
2
|
+
import { f as MESSAGE_TEXT_MAX, o as ChannelPath, x as toStorable } from "./schemas-DAzSsgWk.mjs";
|
|
3
|
+
import { l as isThreadTarget, s as channelOf } from "./external-DymyhUzl.mjs";
|
|
4
4
|
import { t as canonicalEmoji } from "./emoji-CTLpvH-A.mjs";
|
|
5
|
-
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-
|
|
6
|
-
import { a as replaceMentions, n as isEmail, t as extractMentions } from "./mentions-
|
|
7
|
-
import { a as immutable, d as routesFor, l as UnreadableError, n as SyncOverrides, o as ReceivedEvent, s as ResolvedTarget, u as channelMissing } from "./events-
|
|
5
|
+
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-DHdrxmoc.mjs";
|
|
6
|
+
import { a as replaceMentions, n as isEmail, t as extractMentions } from "./mentions-DfZGp3B-.mjs";
|
|
7
|
+
import { a as immutable, d as routesFor, l as UnreadableError, n as SyncOverrides, o as ReceivedEvent, s as ResolvedTarget, u as channelMissing } from "./events-BT8y_81j.mjs";
|
|
8
8
|
import { t as displayText } from "./bots-CGkO76qH.mjs";
|
|
9
9
|
//#region src/sync/engine.ts
|
|
10
10
|
/** `files`: a message with files may have no text. */
|
|
@@ -1002,20 +1002,19 @@ function createSyncEngine(entries) {
|
|
|
1002
1002
|
markdown,
|
|
1003
1003
|
as: {
|
|
1004
1004
|
name,
|
|
1005
|
-
avatar: senderAvatar(message, actor
|
|
1005
|
+
avatar: senderAvatar(message, actor),
|
|
1006
1006
|
attribution
|
|
1007
1007
|
}
|
|
1008
1008
|
} : { markdown };
|
|
1009
1009
|
}
|
|
1010
|
-
/** An author's own picture, or for
|
|
1011
|
-
function senderAvatar(message, actor
|
|
1010
|
+
/** An author's own picture, or for one with none or the board's built-in one, its person's Vercel avatar: `claude via julian` shows Julian. */
|
|
1011
|
+
function senderAvatar(message, actor) {
|
|
1012
1012
|
const builtIn = (avatar) => !avatar || /\/avatars\/[a-z0-9-]+$/.test(avatar);
|
|
1013
1013
|
const own = actor?.avatar ?? null;
|
|
1014
1014
|
if (!builtIn(own)) return own;
|
|
1015
|
-
const person = actors.byId[message.by.principal]?.avatar;
|
|
1016
|
-
if (!builtIn(person)) return person;
|
|
1017
1015
|
const username = actor?.handle.split("/")[0] ?? "";
|
|
1018
|
-
|
|
1016
|
+
const id = message.by.principal.slice(12);
|
|
1017
|
+
if (!message.by.principal.startsWith("vercel:user:") || !username || /^user-/.test(username) || username.toLowerCase() === id.toLowerCase()) return own;
|
|
1019
1018
|
return `https://vercel.com/api/www/avatar?u=${encodeURIComponent(username)}&s=64&format=png`;
|
|
1020
1019
|
}
|
|
1021
1020
|
/** What a platform shows for files it didn't get: one line each, so a reader knows they're on the board. */
|
|
@@ -93,6 +93,113 @@ async function* parseSse(body, signal) {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
//#endregion
|
|
96
|
+
//#region src/contract/profile-header.ts
|
|
97
|
+
/** Why a header isn't one: the board's 400 says it. */
|
|
98
|
+
var InvalidProfileHeader = class extends Error {};
|
|
99
|
+
const TOKEN_START = /[A-Za-z*]/;
|
|
100
|
+
const TCHAR = /[!#$%&'*+\-.^_`|~0-9A-Za-z:/]/;
|
|
101
|
+
const KEY_START = /[a-z*]/;
|
|
102
|
+
const KEY_CHAR = /[a-z0-9_\-.*]/;
|
|
103
|
+
/** RFC 8941's other bare items: an integer, a decimal, a boolean, or a byte sequence. */
|
|
104
|
+
const OTHER_ITEM = /^(?:-?\d{1,15}|-?\d{1,12}\.\d{1,3}|\?[01]|:[A-Za-z0-9+/=]*:)$/;
|
|
105
|
+
/** An sf-string: printable ASCII in quotes, with `"` and `\` escaped. */
|
|
106
|
+
function sfString(value) {
|
|
107
|
+
if (!/^[\x20-\x7e]*$/.test(value)) throw new InvalidProfileHeader("an avatar URL is printable ASCII: percent-encode the rest");
|
|
108
|
+
return `"${value.replace(/[\\"]/g, (char) => `\\${char}`)}"`;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* The header's value for a profile: `fixer`, or `fixer;avatar="https://example.com/fixer.png"`,
|
|
112
|
+
* serialized as RFC 8941 says. An avatar outside printable ASCII goes as its URL percent-encodes it.
|
|
113
|
+
*/
|
|
114
|
+
function formatProfileHeader(profile) {
|
|
115
|
+
if (!profile.avatar) return profile.name;
|
|
116
|
+
const avatar = /^[\x20-\x7e]*$/.test(profile.avatar) ? profile.avatar : URL.parse(profile.avatar)?.href ?? profile.avatar;
|
|
117
|
+
return `${profile.name};avatar=${sfString(avatar)}`;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Reads the header as RFC 8941 parses an Item. Its bare item is the profile's name, a token or a
|
|
121
|
+
* string; `avatar` is a string. A parameter it doesn't know is ignored, as structured fields' are,
|
|
122
|
+
* and the last of a repeated one wins. Anything else throws `InvalidProfileHeader`.
|
|
123
|
+
*/
|
|
124
|
+
function parseProfileHeader(value) {
|
|
125
|
+
let at = 0;
|
|
126
|
+
const fail = (why) => {
|
|
127
|
+
throw new InvalidProfileHeader(`x-board-profile is a structured header, like fixer;avatar="https://example.com/fixer.png": ${why}`);
|
|
128
|
+
};
|
|
129
|
+
const spaces = () => {
|
|
130
|
+
while (value[at] === " ") at++;
|
|
131
|
+
};
|
|
132
|
+
const string = () => {
|
|
133
|
+
at++;
|
|
134
|
+
let out = "";
|
|
135
|
+
while (at < value.length) {
|
|
136
|
+
const char = value[at++];
|
|
137
|
+
if (char === "\\") {
|
|
138
|
+
const next = value[at++];
|
|
139
|
+
if (next !== "\"" && next !== "\\") fail("a string escapes only \" and \\");
|
|
140
|
+
out += next;
|
|
141
|
+
} else if (char === "\"") return out;
|
|
142
|
+
else if (char < " " || char > "~") fail("a string is printable ASCII");
|
|
143
|
+
else out += char;
|
|
144
|
+
}
|
|
145
|
+
return fail("a string is missing its closing \"");
|
|
146
|
+
};
|
|
147
|
+
const token = () => {
|
|
148
|
+
const start = at;
|
|
149
|
+
while (at < value.length && TCHAR.test(value[at])) at++;
|
|
150
|
+
return value.slice(start, at);
|
|
151
|
+
};
|
|
152
|
+
/** A bare item: a string, a token, or another of RFC 8941's (a number, a boolean, bytes), which the header names nothing with. */
|
|
153
|
+
const bare = () => {
|
|
154
|
+
const char = value[at];
|
|
155
|
+
if (char === "\"") return {
|
|
156
|
+
kind: "string",
|
|
157
|
+
value: string()
|
|
158
|
+
};
|
|
159
|
+
if (char !== void 0 && TOKEN_START.test(char)) return {
|
|
160
|
+
kind: "token",
|
|
161
|
+
value: token()
|
|
162
|
+
};
|
|
163
|
+
const start = at;
|
|
164
|
+
while (at < value.length && value[at] !== ";" && value[at] !== " ") at++;
|
|
165
|
+
const item = value.slice(start, at);
|
|
166
|
+
if (!OTHER_ITEM.test(item)) fail(item === "" ? "a parameter has no value after its =" : `${item} isn't a value`);
|
|
167
|
+
return {
|
|
168
|
+
kind: "other",
|
|
169
|
+
value: item
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
spaces();
|
|
173
|
+
const name = bare();
|
|
174
|
+
if (name.kind === "other") fail(name.value === "" ? "it names no profile" : `${name.value} isn't a profile's name`);
|
|
175
|
+
let avatar = null;
|
|
176
|
+
while (value[at] === ";") {
|
|
177
|
+
at++;
|
|
178
|
+
spaces();
|
|
179
|
+
if (!KEY_START.test(value[at] ?? "")) fail("a parameter starts with a lowercase letter");
|
|
180
|
+
const start = at;
|
|
181
|
+
while (at < value.length && KEY_CHAR.test(value[at])) at++;
|
|
182
|
+
const key = value.slice(start, at);
|
|
183
|
+
let param = {
|
|
184
|
+
kind: "boolean",
|
|
185
|
+
value: "?1"
|
|
186
|
+
};
|
|
187
|
+
if (value[at] === "=") {
|
|
188
|
+
at++;
|
|
189
|
+
param = bare();
|
|
190
|
+
}
|
|
191
|
+
if (key !== "avatar") continue;
|
|
192
|
+
if (param.kind !== "string") fail("avatar is a string, in quotes");
|
|
193
|
+
avatar = param.value;
|
|
194
|
+
}
|
|
195
|
+
spaces();
|
|
196
|
+
if (at < value.length) fail(`${JSON.stringify(value.slice(at, at + 20))} follows the profile`);
|
|
197
|
+
return {
|
|
198
|
+
name: name.value,
|
|
199
|
+
avatar
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
//#endregion
|
|
96
203
|
//#region src/client/client.ts
|
|
97
204
|
/**
|
|
98
205
|
* What went wrong: `message` says what and why, `code` is what to branch on, `hint`, when there's
|
|
@@ -200,22 +307,7 @@ function createBoardClient(options) {
|
|
|
200
307
|
if (!auth) return out;
|
|
201
308
|
if (options.token !== void 0) out.authorization = `Bearer ${await resolve(options.token)}`;
|
|
202
309
|
const profile = as !== void 0 ? as : options.profile === void 0 ? null : await resolve(options.profile);
|
|
203
|
-
if (profile !== null) {
|
|
204
|
-
const { name, avatar } = typeof profile === "string" ? {
|
|
205
|
-
name: profile,
|
|
206
|
-
avatar: void 0
|
|
207
|
-
} : profile;
|
|
208
|
-
out["x-board-profile"] = name;
|
|
209
|
-
if (avatar) out["x-board-avatar"] = avatar;
|
|
210
|
-
} else {
|
|
211
|
-
const person = options.person === void 0 ? null : await resolve(options.person);
|
|
212
|
-
if (person?.name) out["x-board-name"] = encodeURIComponent(person.name);
|
|
213
|
-
if (person?.avatar) out["x-board-avatar"] = person.avatar;
|
|
214
|
-
}
|
|
215
|
-
const session = as !== void 0 ? null : options.session === void 0 ? null : await resolve(options.session);
|
|
216
|
-
if (session) out["x-board-session"] = session;
|
|
217
|
-
const handle = options.handle === void 0 ? null : await resolve(options.handle);
|
|
218
|
-
if (handle) out["x-board-handle"] = handle;
|
|
310
|
+
if (profile !== null) out["x-board-profile"] = formatProfileHeader(typeof profile === "string" ? { name: profile } : profile);
|
|
219
311
|
return out;
|
|
220
312
|
}
|
|
221
313
|
async function raw(method, path, init = {}) {
|
|
@@ -384,19 +476,6 @@ function createBoardClient(options) {
|
|
|
384
476
|
grants: async () => (await call("GET", "/grants")).grants,
|
|
385
477
|
/** `revoked` is false when it was already gone. Its principals' next requests are refused. */
|
|
386
478
|
revokeGrant: (id) => call("POST", `/grants/${path(id)}/revoke`, { body: {} }),
|
|
387
|
-
/**
|
|
388
|
-
* A token that acts as you, narrowed to `can`, writing as `profile` and `session` when they're
|
|
389
|
-
* given: for a widget, a sandbox, a script. `secret` shows only here. It lives 30 days, or
|
|
390
|
-
* `expires`, at most 90.
|
|
391
|
-
*/
|
|
392
|
-
createToken: (input) => call("POST", "/tokens", { body: input.can === void 0 ? input : {
|
|
393
|
-
...input,
|
|
394
|
-
can: wireCan(input.can)
|
|
395
|
-
} }),
|
|
396
|
-
/** Your live tokens, or everyone's with manage in every channel. Never their secrets. */
|
|
397
|
-
tokens: async () => (await call("GET", "/tokens")).tokens,
|
|
398
|
-
/** It and every token minted with it stop. `revoked` is false when it was already revoked. */
|
|
399
|
-
revokeToken: (id) => call("POST", `/tokens/${path(id)}/revoke`, { body: {} }),
|
|
400
479
|
/** Every schema: the built-ins, then the board's own, by name and version. */
|
|
401
480
|
schemas: async () => (await call("GET", "/schemas")).schemas,
|
|
402
481
|
/** One schema version, by its ID: `sandbox@1`. */
|
|
@@ -675,4 +754,4 @@ function toErrorResponse(error) {
|
|
|
675
754
|
} }, 500);
|
|
676
755
|
}
|
|
677
756
|
//#endregion
|
|
678
|
-
export {
|
|
757
|
+
export { IMPORT_BYTES_MAX as _, forbidden as a, mediaType as b, toErrorResponse as c, createBoardClient as d, duration as f, DIRECT_UPLOAD_BYTES_MAX as g, ATTACHMENT_BYTES_MAX as h, duplicateId as i, unauthorized as l, parseProfileHeader as m, RejectedError as n, json as o, formatProfileHeader as p, badRequest as r, notFound as s, HttpError as t, BoardError as u, fileName as v, typeOf as x, fileSize as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as Labels, l as LabelKey } from "./schemas-
|
|
2
|
-
import { n as ExternalEvent, r as ExternalLocation } from "./external-
|
|
1
|
+
import { d as Labels, l as LabelKey } from "./schemas-DAzSsgWk.mjs";
|
|
2
|
+
import { n as ExternalEvent, r as ExternalLocation } from "./external-DymyhUzl.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/sync/fn.ts
|
|
5
5
|
const ROUTES = Symbol.for("board.syncRoutes");
|