@vercel/board 0.40.0 → 0.42.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-BgBiaCyx.mjs} +2 -2
- package/dist/access.d.mts +6 -6
- package/dist/access.mjs +5 -5
- package/dist/{actors-yBRWTpt5.mjs → actors-DkZsnMgA.mjs} +59 -40
- package/dist/{auth-DtmZzlHm.d.mts → auth-Bn8J_1F2.d.mts} +12 -30
- package/dist/{auth-C8URZHLx.mjs → auth-Ft4AJptx.mjs} +9 -19
- package/dist/{backend-BW5NbBsp.d.mts → backend-DMrK55mU.d.mts} +137 -48
- 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 +10 -5
- package/dist/cli-embedded.mjs +8 -6
- 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-BORt5nky.mjs} +139 -109
- package/dist/conformance.d.mts +9 -8
- package/dist/conformance.mjs +1 -1
- package/dist/digest-CKC0Rmy1.mjs +4 -0
- package/dist/{engine-Djif8XVk.mjs → engine-BVHSH2Kn.mjs} +11 -12
- package/dist/{errors-CNRJqUuL.mjs → errors-DUzpDSrJ.mjs} +112 -30
- package/dist/{events-C6HwB046.mjs → events-BT8y_81j.mjs} +2 -2
- package/dist/{exports-C2OWIbLU.mjs → exports-BfNXPHN_.mjs} +473 -174
- package/dist/exports-Bw_OYNRl.d.mts +4 -0
- package/dist/{external-CHDxWIVf.mjs → external-DymyhUzl.mjs} +1 -1
- package/dist/{index-Cuxbz_E0.d.mts → index-CydxnBND.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 +41 -41
- package/dist/inspect/engine.js +2 -2
- package/dist/{inspect-cGcP8ZO9.mjs → inspect-CniRRiJ2.mjs} +6 -6
- package/dist/inspect-HlHh7OXa.mjs +2 -0
- package/dist/{local-CsleYuyM.mjs → local-CWLPYoiY.mjs} +130 -359
- package/dist/{main-D97xuqWZ.mjs → main-aVEEoc60.mjs} +429 -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-0DUFrav-.mjs} +2 -2
- package/dist/{origin-DLCmrwmE.mjs → origin-DAyYeDuW.mjs} +7 -36
- package/dist/{page-6BTCZWGY.mjs → page-BD6ygU49.mjs} +2 -2
- package/dist/page-BiJVe-7R.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-BnBqi0sw.mjs} +5 -5
- package/dist/{server-CIfMdIt3.mjs → server-Bcpkt6TS.mjs} +79 -131
- package/dist/{serving-B4l0nLng.mjs → serving-hcxzaCCO.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-BSMpTPEe.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 +59 -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 +59 -90
- package/docs/04-reference/02-board.md +53 -37
- 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
package/README.md
CHANGED
|
@@ -47,7 +47,7 @@ export BOARD_URL=http://127.0.0.1:4100/api/board # in the terminals your agent
|
|
|
47
47
|
|
|
48
48
|
It keeps its log (SQLite) and attachments in the project's `.board/`, across
|
|
49
49
|
restarts, runs its timers in its own process, and has no sync. You're
|
|
50
|
-
`local:user:<your OS user
|
|
50
|
+
`local:user:<your OS user>`, and `vb` pointed at
|
|
51
51
|
it, agents included, finds its token on its own: the token lives in a file
|
|
52
52
|
only you can read, for as long as the board runs.
|
|
53
53
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as forbidden } from "./errors-
|
|
2
|
-
import { a as CAN_MAX, o as ChannelPath } from "./schemas-
|
|
1
|
+
import { a as forbidden } from "./errors-DUzpDSrJ.mjs";
|
|
2
|
+
import { a as CAN_MAX, o as ChannelPath } from "./schemas-DAzSsgWk.mjs";
|
|
3
3
|
//#region src/server/access.ts
|
|
4
4
|
/**
|
|
5
5
|
* What a principal may do in a channel. `read` covers messages, threads,
|
package/dist/access.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $t as
|
|
2
|
-
import { _ as
|
|
1
|
+
import { $t as union, Bt as ChannelPattern, Gt as GrantShape, Ht as Grant, Jt as Permission, Kt as InvalidCan, Lt as Access, Qt as parseCan, Rt as AccessSummary, Ut as GrantChange, Vt as FULL_ACCESS, Wt as GrantChangeRefusal, Xt as checkGrantChange, Zt as compileAccess, en as Actor, in as CAN_MAX, rn as Author, zt as Can } from "./routes-By9lmvUD.mjs";
|
|
2
|
+
import { _ as GrantFacts, a as DEFAULT_CAN, b as grantAccess, c as IssuerConfig, d as Principal, f as PrincipalKind, g as GrantExplanation, h as DecidingGrant, i as Claims, l as Known, m as Caller, n as AuthenticateContext, r as CallerRequest, s as HostPrincipal, t as Authenticate, u as OidcTokensOptions, v as GrantSource, y as explainGrants } from "./auth-Bn8J_1F2.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
|
|
@@ -19,10 +19,10 @@ type ResolvedActor = {
|
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
21
|
* The actor a caller writes as: its principal, plus the profile it claims (`vercel:user:u_123+claude`).
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
22
|
+
* Its handle and name are what verified its principal said: a host's verifier's handle, a Vercel
|
|
23
|
+
* login's user ID, a deployment's project (named with its environment outside production,
|
|
24
|
+
* `support (preview)`). A profile's name and avatar are the ones it sends, under that handle.
|
|
25
25
|
*/
|
|
26
|
-
export declare function resolveActor(principal: Principal, claims: Claims
|
|
26
|
+
export declare function resolveActor(principal: Principal, claims: Claims): ResolvedActor;
|
|
27
27
|
//#endregion
|
|
28
28
|
export { type Access, type AccessSummary, type Authenticate, type AuthenticateContext, CAN_MAX, type Caller, type CallerRequest, type Can, type ChannelPattern, type Claims, DEFAULT_CAN, type DecidingGrant, FULL_ACCESS, type Grant, type GrantChange, type GrantChangeRefusal, type GrantExplanation, type GrantFacts, type GrantShape, type GrantSource, type HostPrincipal, InvalidCan, type IssuerConfig, type Known, type OidcTokensOptions, type Permission, type Principal, type PrincipalKind, checkGrantChange, compileAccess, explainGrants, grantAccess, parseCan, union };
|
package/dist/access.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as CAN_MAX } from "./schemas-
|
|
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 {
|
|
4
|
-
import {
|
|
5
|
-
import { t as oidcTokens } from "./tokens-
|
|
1
|
+
import { a as CAN_MAX } from "./schemas-DAzSsgWk.mjs";
|
|
2
|
+
import { c as compileAccess, f as union, n as InvalidCan, o as checkGrantChange, t as FULL_ACCESS, u as parseCan } from "./access-BgBiaCyx.mjs";
|
|
3
|
+
import { C as explainGrants, t as DEFAULT_CAN, w as grantAccess } from "./auth-Ft4AJptx.mjs";
|
|
4
|
+
import { a as resolveActor } from "./actors-DkZsnMgA.mjs";
|
|
5
|
+
import { t as oidcTokens } from "./tokens-BSMpTPEe.mjs";
|
|
6
6
|
export { CAN_MAX, DEFAULT_CAN, FULL_ACCESS, InvalidCan, checkGrantChange, compileAccess, explainGrants, grantAccess, oidcTokens, parseCan, resolveActor, union };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { r as badRequest } from "./errors-
|
|
2
|
-
import {
|
|
3
|
-
import { u as parseCan } from "./access-
|
|
1
|
+
import { m as parseProfileHeader, r as badRequest } from "./errors-DUzpDSrJ.mjs";
|
|
2
|
+
import { x as toStorable } from "./schemas-DAzSsgWk.mjs";
|
|
3
|
+
import { u as parseCan } from "./access-BgBiaCyx.mjs";
|
|
4
4
|
import { t as own } from "./own-OwgPWdmh.mjs";
|
|
5
5
|
//#region src/server/actors.ts
|
|
6
|
-
/** Agents whose
|
|
6
|
+
/** Agents whose marks the board serves at `/avatars/<name>`, for a caller to pass as an avatar. */
|
|
7
7
|
const KNOWN_AGENTS = [
|
|
8
8
|
"fx",
|
|
9
9
|
"claude",
|
|
@@ -12,27 +12,13 @@ const KNOWN_AGENTS = [
|
|
|
12
12
|
"pi"
|
|
13
13
|
];
|
|
14
14
|
const PROFILE = /^[A-Za-z][A-Za-z0-9-]{0,31}$/;
|
|
15
|
-
const HANDLE = /^[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?$/;
|
|
16
15
|
/**
|
|
17
16
|
* What a request's headers say about its caller, checked for shape: a 400 for one that's
|
|
18
17
|
* malformed. None of it is verified; board() works out the actor from it once it knows who the
|
|
19
18
|
* credential is.
|
|
20
19
|
*/
|
|
21
20
|
function claimsOf(headers) {
|
|
22
|
-
const profile = headers.get("x-board-profile")
|
|
23
|
-
if (profile !== null && !PROFILE.test(profile)) throw badRequest("profile names start with a letter and use up to 32 letters, numbers, and hyphens");
|
|
24
|
-
const avatar = headers.get("x-board-avatar")?.trim() || null;
|
|
25
|
-
if (avatar !== null && !isAvatarUrl(avatar)) throw badRequest("avatars must be https URLs (http only on localhost)");
|
|
26
|
-
const session = headers.get("x-board-session")?.trim().slice(0, 200) || null;
|
|
27
|
-
const handle = headers.get("x-board-handle")?.trim().toLowerCase() || null;
|
|
28
|
-
if (handle !== null && !HANDLE.test(handle)) throw badRequest(`invalid handle: ${handle}`);
|
|
29
|
-
const encoded = headers.get("x-board-name");
|
|
30
|
-
let name = null;
|
|
31
|
-
if (encoded) try {
|
|
32
|
-
name = decodeURIComponent(encoded).replace(/[\u0000-\u001f\u007f]/g, "").trim().slice(0, 128) || null;
|
|
33
|
-
} catch {
|
|
34
|
-
throw badRequest("x-board-name must be URI-encoded");
|
|
35
|
-
}
|
|
21
|
+
const { profile, avatar } = profileOf(headers.get("x-board-profile"));
|
|
36
22
|
if (headers.get("x-board-scope") !== null) throw badRequest("x-board-scope is x-board-can now: send the same value as x-board-can", "invalid_scope");
|
|
37
23
|
const scope = headers.get("x-board-can");
|
|
38
24
|
if (scope !== null) try {
|
|
@@ -43,48 +29,81 @@ function claimsOf(headers) {
|
|
|
43
29
|
return {
|
|
44
30
|
profile,
|
|
45
31
|
avatar,
|
|
46
|
-
session,
|
|
47
|
-
handle,
|
|
48
|
-
name,
|
|
49
32
|
scope
|
|
50
33
|
};
|
|
51
34
|
}
|
|
35
|
+
/** `x-board-profile`'s profile and avatar, checked: a 400 for a header that isn't one. */
|
|
36
|
+
function profileOf(header) {
|
|
37
|
+
if (header === null || header.trim() === "") return {
|
|
38
|
+
profile: null,
|
|
39
|
+
avatar: null
|
|
40
|
+
};
|
|
41
|
+
let parsed;
|
|
42
|
+
try {
|
|
43
|
+
parsed = parseProfileHeader(header);
|
|
44
|
+
} catch (error) {
|
|
45
|
+
throw badRequest(error.message, "invalid_profile");
|
|
46
|
+
}
|
|
47
|
+
if (!PROFILE.test(parsed.name)) throw badRequest("profile names start with a letter and use up to 32 letters, numbers, and hyphens", "invalid_profile");
|
|
48
|
+
if (parsed.avatar !== null && !isAvatarUrl(parsed.avatar)) throw badRequest("avatars must be https URLs (http only on localhost)", "invalid_profile");
|
|
49
|
+
return {
|
|
50
|
+
profile: parsed.name,
|
|
51
|
+
avatar: parsed.avatar
|
|
52
|
+
};
|
|
53
|
+
}
|
|
52
54
|
/**
|
|
53
55
|
* The actor a caller writes as: its principal, plus the profile it claims (`vercel:user:u_123+claude`).
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
56
|
+
* Its handle and name are what verified its principal said: a host's verifier's handle, a Vercel
|
|
57
|
+
* login's user ID, a deployment's project (named with its environment outside production,
|
|
58
|
+
* `support (preview)`). A profile's name and avatar are the ones it sends, under that handle.
|
|
57
59
|
*/
|
|
58
|
-
function resolveActor(principal, claims
|
|
59
|
-
const baseHandle = principal.kind === "person" && principal.facts?.issuer !== "host" && claims.handle ? claims.handle : principal.handle;
|
|
60
|
-
const personName = principal.kind === "person" ? claims.name : null;
|
|
60
|
+
function resolveActor(principal, claims) {
|
|
61
61
|
const profile = claims.profile?.toLowerCase() ?? null;
|
|
62
62
|
const id = profile === null ? principal.id : `${principal.id}+${profile}`;
|
|
63
|
-
const
|
|
63
|
+
const via = viaOf(principal);
|
|
64
64
|
const actor = {
|
|
65
65
|
id,
|
|
66
66
|
kind: profile === null ? principal.kind : "agent",
|
|
67
|
-
handle: profile === null ?
|
|
68
|
-
name: claims.profile ??
|
|
69
|
-
avatar: claims.avatar
|
|
70
|
-
...profile === null ? {} : { via
|
|
71
|
-
id: principal.id,
|
|
72
|
-
handle: baseHandle
|
|
73
|
-
}) }
|
|
67
|
+
handle: profile === null ? principal.handle : `${principal.handle}/${profile}`,
|
|
68
|
+
name: claims.profile ?? (via.environment !== null && via.environment !== "production" ? `${via.name} (${via.environment})` : principal.handle),
|
|
69
|
+
avatar: claims.avatar,
|
|
70
|
+
...profile === null ? {} : { via }
|
|
74
71
|
};
|
|
75
72
|
return {
|
|
76
73
|
author: {
|
|
77
74
|
actor: id,
|
|
78
75
|
principal: principal.id,
|
|
79
|
-
profile
|
|
80
|
-
session: claims.session
|
|
76
|
+
profile
|
|
81
77
|
},
|
|
82
78
|
actor
|
|
83
79
|
};
|
|
84
80
|
}
|
|
85
81
|
/**
|
|
82
|
+
* The actor `author` writes as, shown as its principal names it now: a stored one (a schedule's
|
|
83
|
+
* creator) whose handle, name, or picture a client sent, before they were checked, shows as its
|
|
84
|
+
* principal does instead. A profile keeps its spelling and its avatar, which are its own to choose; a
|
|
85
|
+
* platform user, whom its sync names, stays as it is.
|
|
86
|
+
*/
|
|
87
|
+
function ownedActor(principal, author, actor) {
|
|
88
|
+
if (principal.kind === "external" || principal.id.startsWith("board:")) return actor;
|
|
89
|
+
const profile = author.profile === null ? null : actor.name.toLowerCase() === author.profile ? actor.name : author.profile;
|
|
90
|
+
const { actor: named } = resolveActor(principal, {
|
|
91
|
+
profile,
|
|
92
|
+
avatar: profile === null ? null : actor.avatar,
|
|
93
|
+
scope: null
|
|
94
|
+
});
|
|
95
|
+
return {
|
|
96
|
+
...actor,
|
|
97
|
+
handle: named.handle,
|
|
98
|
+
name: named.name,
|
|
99
|
+
avatar: named.avatar,
|
|
100
|
+
...named.via ? { via: named.via } : {}
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
86
104
|
* Who a profile of `principal` acts through, as the board shows it: a deployment by its project's name
|
|
87
|
-
* and its environment
|
|
105
|
+
* and its environment, anyone else by their handle. A deployment's handle is its project's name in
|
|
106
|
+
* every environment; one a board stored with its environment after it (`www@preview`) still shows as `www`.
|
|
88
107
|
*/
|
|
89
108
|
function viaOf(principal) {
|
|
90
109
|
const environment = /^vercel:project:[^:]+:([^:]+)$/.exec(principal.id)?.[1] ?? null;
|
|
@@ -138,4 +157,4 @@ function actorSeen(seen, known, host = false) {
|
|
|
138
157
|
};
|
|
139
158
|
}
|
|
140
159
|
//#endregion
|
|
141
|
-
export {
|
|
160
|
+
export { resolveActor as a, ownedActor as i, actorSeen as n, viaOf as o, claimsOf as r, KNOWN_AGENTS as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Jt as Permission, Lt as Access, Yt as WrittenCan, qt as Level, zt as Can } from "./routes-By9lmvUD.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. */
|
|
@@ -92,13 +92,8 @@ declare function explainGrants<G extends DecidingGrant>(facts: GrantFacts<G>, ch
|
|
|
92
92
|
type Claims = {
|
|
93
93
|
/** `x-board-profile`: the agent or tool it writes as, `claude`, say. */
|
|
94
94
|
profile: string | null;
|
|
95
|
-
/** `x-board-
|
|
95
|
+
/** The `avatar` parameter of `x-board-profile`: an https URL for its picture. */
|
|
96
96
|
avatar: string | null;
|
|
97
|
-
/** `x-board-session`: the agent session it writes from. */
|
|
98
|
-
session: string | null;
|
|
99
|
-
/** `x-board-handle` and `x-board-name`: a person's handle and display name. */
|
|
100
|
-
handle: string | null;
|
|
101
|
-
name: string | null;
|
|
102
97
|
/** `x-board-can`: what it narrows itself to, `dev/=read,post`. It only narrows. */
|
|
103
98
|
scope: string | null;
|
|
104
99
|
};
|
|
@@ -122,29 +117,13 @@ type Principal = {
|
|
|
122
117
|
/** `vercel:user:<id>`, `vercel:project:<id>:<env>`, `github:repo:<id>`, `oidc:<issuer>:<sub>`. */
|
|
123
118
|
id: string;
|
|
124
119
|
kind: PrincipalKind;
|
|
125
|
-
/**
|
|
120
|
+
/** Its handle, as what verified it says: a host's verifier's, a Vercel login's user ID, a deployment's project. */
|
|
126
121
|
handle: string;
|
|
127
122
|
expiresAt: Date | null;
|
|
128
123
|
/** The verified token's claims, so its access can be worked out again later, as a schedule's sends do. Absent for people and the board's own code. */
|
|
129
124
|
facts?: TokenFacts;
|
|
130
125
|
/** The `x-board-can` a proxy sent, which narrows whatever it may do. */
|
|
131
126
|
scope?: string;
|
|
132
|
-
/**
|
|
133
|
-
* The board token it came with (its ID), kept with what it stores: a schedule or a registration
|
|
134
|
-
* made with one stops when the token does.
|
|
135
|
-
*/
|
|
136
|
-
token?: string;
|
|
137
|
-
/** What a board token pins for every request with it: the profile, avatar, and session it writes as, and a person's handle and name. */
|
|
138
|
-
pinned?: Pinned;
|
|
139
|
-
};
|
|
140
|
-
/** What a board token says about who writes, beside its principal: labels, but the board's, so a request can't change them. */
|
|
141
|
-
type Pinned = {
|
|
142
|
-
profile: string | null;
|
|
143
|
-
avatar: string | null;
|
|
144
|
-
session: string | null;
|
|
145
|
-
/** A person's handle and display name as they were when they minted it: whoever holds the token sends none. */
|
|
146
|
-
handle: string | null;
|
|
147
|
-
name: string | null;
|
|
148
127
|
};
|
|
149
128
|
/** A principal and what it may do in each channel, as board()'s `access` worked it out. */
|
|
150
129
|
type Granted = Principal & {
|
|
@@ -179,8 +158,11 @@ type OidcTokensOptions = {
|
|
|
179
158
|
jwks: JWTVerifyGetKey;
|
|
180
159
|
};
|
|
181
160
|
};
|
|
182
|
-
/** A principal as the board keeps it to work its access out again: who it is, its token's facts, its scope
|
|
183
|
-
type Known = Pick<Principal, 'id' | 'kind' | 'handle' | 'facts' | 'scope'
|
|
161
|
+
/** A principal as the board keeps it to work its access out again: who it is, its token's facts, and its scope. */
|
|
162
|
+
type Known = Pick<Principal, 'id' | 'kind' | 'handle' | 'facts' | 'scope'> & {
|
|
163
|
+
/** The board token a schedule was made with, from when boards issued them: it stopped with them. */
|
|
164
|
+
token?: string;
|
|
165
|
+
};
|
|
184
166
|
/**
|
|
185
167
|
* Who a grant names, as the board keeps it: IDs, with the names it knows beside them. A board
|
|
186
168
|
* that verifies tokens itself knows none, so it keeps what was written: a user's ID, a project's
|
|
@@ -228,7 +210,7 @@ type StoredGrant = {
|
|
|
228
210
|
can: WrittenCan;
|
|
229
211
|
};
|
|
230
212
|
/**
|
|
231
|
-
* What a grant
|
|
213
|
+
* What a grant left without `can` gives: what Vercel's API gives a project it lets use a
|
|
232
214
|
* board. Frozen all the way down: board reads it for every such grant, and @vercel/board/access
|
|
233
215
|
* exports it, so code that imports it can't widen them.
|
|
234
216
|
*/
|
|
@@ -262,11 +244,11 @@ type HostPrincipal = {
|
|
|
262
244
|
id: string;
|
|
263
245
|
kind: PrincipalKind;
|
|
264
246
|
/**
|
|
265
|
-
*
|
|
266
|
-
*
|
|
247
|
+
* Who it is to people, its handle and its name: the board takes it as checked, so a person posts to Slack under
|
|
248
|
+
* it as a plain sender. A verifier that knows only an ID gives that.
|
|
267
249
|
*/
|
|
268
250
|
handle: string;
|
|
269
251
|
expiresAt?: Date | null;
|
|
270
252
|
};
|
|
271
253
|
//#endregion
|
|
272
|
-
export {
|
|
254
|
+
export { GrantFacts as _, DEFAULT_CAN as a, grantAccess as b, IssuerConfig as c, Principal as d, PrincipalKind as f, GrantExplanation as g, DecidingGrant as h, Claims as i, Known as l, Caller as m, AuthenticateContext as n, Granted as o, StoredGrant as p, CallerRequest as r, HostPrincipal as s, Authenticate as t, OidcTokensOptions as u, GrantSource as v, explainGrants as y };
|
|
@@ -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-DUzpDSrJ.mjs";
|
|
2
|
+
import { c as compileAccess, l as decide, p as writtenCan, s as combine, t as FULL_ACCESS, u as parseCan } from "./access-BgBiaCyx.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
|
|
@@ -108,12 +108,12 @@ function explainGrants(facts, channel) {
|
|
|
108
108
|
//#region src/server/auth.ts
|
|
109
109
|
/**
|
|
110
110
|
* Whether a caller wrote what `by` says, as far as changing it goes (editing, deleting, canceling a
|
|
111
|
-
* schedule): its principal did, and when
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
111
|
+
* schedule): its principal did, and when it writes as a profile, as that profile. A principal's
|
|
112
|
+
* profiles share its credential (a sandbox's agent writes as one through its deployment's), so the
|
|
113
|
+
* principal alone would let one profile change what another wrote. The principal itself, as no
|
|
114
|
+
* profile, changes what any of them wrote.
|
|
115
115
|
*/
|
|
116
|
-
const wroteAs = (caller, by) => by.principal === caller.principal.id && (
|
|
116
|
+
const wroteAs = (caller, by) => by.principal === caller.principal.id && (caller.actor.id === caller.principal.id || by.actor === caller.actor.id);
|
|
117
117
|
/**
|
|
118
118
|
* Principal IDs a board authenticates: its people, deployments, workflows, and its own code. No
|
|
119
119
|
* platform actor sync writes as may have one, or an import could pass for someone signed in.
|
|
@@ -143,18 +143,8 @@ function trustedIssuers(issuers) {
|
|
|
143
143
|
}
|
|
144
144
|
return new Set(issuers);
|
|
145
145
|
}
|
|
146
|
-
/** What a board token starts with, so board() knows its own before it tries any other verifier. */
|
|
147
|
-
const BOARD_TOKEN_PREFIX = "board_";
|
|
148
146
|
/**
|
|
149
|
-
*
|
|
150
|
-
* and when a request carries one. A token is 32 random bytes, so no salt or key is needed.
|
|
151
|
-
*/
|
|
152
|
-
async function tokenHash(secret) {
|
|
153
|
-
const digest = new Uint8Array(await crypto.subtle.digest("SHA-256", new TextEncoder().encode(secret)));
|
|
154
|
-
return Array.from(digest, (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* What a grant or a token left without `can` gives: what Vercel's API gives a project it lets use a
|
|
147
|
+
* What a grant left without `can` gives: what Vercel's API gives a project it lets use a
|
|
158
148
|
* board. Frozen all the way down: board reads it for every such grant, and @vercel/board/access
|
|
159
149
|
* exports it, so code that imports it can't widen them.
|
|
160
150
|
*/
|
|
@@ -596,4 +586,4 @@ function hostPrincipal(value) {
|
|
|
596
586
|
};
|
|
597
587
|
}
|
|
598
588
|
//#endregion
|
|
599
|
-
export {
|
|
589
|
+
export { explainGrants as C, wroteAs as S, removes as _, authenticates as a, verifiesTokens as b, checkPrincipal as c, grantIssuers as d, hostPrincipal as f, privateHost as g, markVerified as h, VERCEL_ISSUER as i, createAuthority as l, joined as m, GITHUB_ISSUER as n, checkCan as o, issuerName as p, TOKENS as r, checkGrant as s, DEFAULT_CAN as t, fromTokens as u, trustedIssuers as v, grantAccess as w, workflowPath as x, verifiedIssuers as y };
|
|
@@ -1,7 +1,97 @@
|
|
|
1
|
-
import { At as
|
|
2
|
-
import {
|
|
3
|
-
import { F as ErrorOrigin, N as BoardClient, R as ProfileOption, m as SyncProvider } from "./provider-
|
|
1
|
+
import { At as TypingBody, B as PostBody, C as InboxEntry, Ct as SyncThreadView, D as InboxQuery, Dt as ThreadsPage, E as InboxPushBody, Et as ThreadView, F as MessageView, Ft as UploadTicket, G as ReactBody, I as MessagesPage, Jt as Permission, L as MessagesQuery, Lt as Access, M as MatchView, Mt as UpdateGrantBody, N as MatchesQuery, Ot as ThreadsQuery, P as Me, Pt as UploadStartBody, Q as ScheduleBody, S as InboxAckBody, T as InboxNextQuery, Y as RegistrationView, _t as SyncFindQuery, a as BoardEventView, an as Labels, at as SchemaBody, c as CreateChannelBody, ct as SourceJoin, d as EditBody, dt as SourceRead, en as Actor, 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, nn as Attachment, nt as SchedulesQuery, p as EventsQuery, q as RegisterBody, qt as Level, rn as Author, s as ChannelView, sn as ExternalEvent, st as SchemaView, t as AckBody, tt as ScheduleView, u as Discovery, v as GrantBody, vt as SyncFindView, w as InboxItem, wt as SyncedView, x as GrantView, xt as SyncReceiptBody, yt as SyncImportBody, zt as Can } from "./routes-By9lmvUD.mjs";
|
|
2
|
+
import { l as Known, o as Granted, p as StoredGrant, t as Authenticate } from "./auth-Bn8J_1F2.mjs";
|
|
3
|
+
import { F as ErrorOrigin, N as BoardClient, R as ProfileOption, m as SyncProvider } from "./provider-dY54GFNz.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
+
//#region src/server/sandbox.d.ts
|
|
6
|
+
/** How a rule matches a value: a regular expression (RE2), or the value exactly. */
|
|
7
|
+
type SandboxMatcher = {
|
|
8
|
+
regex: string;
|
|
9
|
+
} | {
|
|
10
|
+
exact: string;
|
|
11
|
+
};
|
|
12
|
+
/** The requests a rule handles: every dimension it names must match. */
|
|
13
|
+
type SandboxMatch = {
|
|
14
|
+
path?: SandboxMatcher;
|
|
15
|
+
method?: string[];
|
|
16
|
+
queryString?: {
|
|
17
|
+
key: SandboxMatcher;
|
|
18
|
+
value?: SandboxMatcher;
|
|
19
|
+
}[];
|
|
20
|
+
headers?: {
|
|
21
|
+
key: SandboxMatcher;
|
|
22
|
+
value?: SandboxMatcher;
|
|
23
|
+
}[];
|
|
24
|
+
};
|
|
25
|
+
/** A rule for one host's requests, as Vercel Sandbox runs them: in order, and the first that matches handles a request. */
|
|
26
|
+
type SandboxRule = {
|
|
27
|
+
match?: SandboxMatch;
|
|
28
|
+
transform: {
|
|
29
|
+
headers: Record<string, string>;
|
|
30
|
+
}[];
|
|
31
|
+
} | {
|
|
32
|
+
match?: SandboxMatch;
|
|
33
|
+
response: {
|
|
34
|
+
statusCode: number;
|
|
35
|
+
body?: string;
|
|
36
|
+
contentType?: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* A network policy, as `@vercel/sandbox`'s `NetworkPolicy` has it: the hosts it allows, each with its
|
|
41
|
+
* rules. A host it doesn't name is blocked, so a caller adds its own beside the board's:
|
|
42
|
+
* `{ allow: { ...board.allow, 'registry.npmjs.org': [] } }`.
|
|
43
|
+
*/
|
|
44
|
+
type SandboxPolicy = {
|
|
45
|
+
allow: Record<string, SandboxRule[]>;
|
|
46
|
+
};
|
|
47
|
+
/** What `sandboxPolicy()` takes: who the agent writes as, what it may do, and the credential, all left in the policy. */
|
|
48
|
+
type SandboxPolicyOptions = {
|
|
49
|
+
/**
|
|
50
|
+
* The profile its writes are by, with its avatar: `{ name: 'fixer', avatar: 'https://…' }`. Without one,
|
|
51
|
+
* the handle's own, from `as()`. It needs one: a policy that set none would let the sandbox send its
|
|
52
|
+
* own, and write as any profile of this deployment, its watchers' included.
|
|
53
|
+
*/
|
|
54
|
+
profile?: {
|
|
55
|
+
name: string;
|
|
56
|
+
avatar?: string;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* What it may do at most, as `x-board-can` narrows it: a `can` (`{ 'dev/': ['read', 'post'] }`) or its
|
|
60
|
+
* header form (`dev/=read,post`). Without one, read, post, react, and label everywhere.
|
|
61
|
+
*/
|
|
62
|
+
can?: Can | string;
|
|
63
|
+
/**
|
|
64
|
+
* The credential its requests carry. Without one, this deployment's own Vercel OIDC token, for the
|
|
65
|
+
* board's URL, which dies with the function's own: hand the sandbox a new policy before it does.
|
|
66
|
+
*/
|
|
67
|
+
token?: string;
|
|
68
|
+
};
|
|
69
|
+
/** A route a sandbox reaches: its method, and its path after the board's URL's, `:name` standing for a segment (`/messages/:id`). */
|
|
70
|
+
type SandboxRoute = {
|
|
71
|
+
method: string;
|
|
72
|
+
path: string;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* How a sandbox reaches a board, from a backend: its URL, the headers its requests carry, the routes
|
|
76
|
+
* under the board's path that carry them, every one by method and shape (the protocol's, or another
|
|
77
|
+
* API's), and what else they ask (`GET`s outside the board's path).
|
|
78
|
+
*/
|
|
79
|
+
type SandboxReach = {
|
|
80
|
+
url: string;
|
|
81
|
+
headers: Record<string, string>;
|
|
82
|
+
routes: readonly SandboxRoute[];
|
|
83
|
+
reads?: readonly string[];
|
|
84
|
+
};
|
|
85
|
+
/** What a backend gets to say how a sandbox reaches its board. */
|
|
86
|
+
type SandboxInput = {
|
|
87
|
+
profile: {
|
|
88
|
+
name: string;
|
|
89
|
+
avatar?: string;
|
|
90
|
+
};
|
|
91
|
+
can: string;
|
|
92
|
+
token: string | undefined;
|
|
93
|
+
};
|
|
94
|
+
//#endregion
|
|
5
95
|
//#region src/api/protocol.d.ts
|
|
6
96
|
type Input<S extends z.ZodType> = NonNullable<z.output<S>>;
|
|
7
97
|
type Id = {
|
|
@@ -148,28 +238,6 @@ type Protocol = {
|
|
|
148
238
|
revoked: boolean;
|
|
149
239
|
};
|
|
150
240
|
};
|
|
151
|
-
/** The caller's tokens, or every one with `manage` in every channel. 501 `no_tokens` where the board issues none. */
|
|
152
|
-
tokens: {
|
|
153
|
-
input: Nothing;
|
|
154
|
-
output: {
|
|
155
|
-
tokens: TokenView[];
|
|
156
|
-
};
|
|
157
|
-
};
|
|
158
|
-
/** A token acting as the caller, narrowed: the only time its secret shows. */
|
|
159
|
-
createToken: {
|
|
160
|
-
input: Input<typeof TokenBody>;
|
|
161
|
-
output: {
|
|
162
|
-
token: TokenView;
|
|
163
|
-
secret: string;
|
|
164
|
-
};
|
|
165
|
-
};
|
|
166
|
-
/** It and every token minted with it stop. `revoked` is false when it was already gone. */
|
|
167
|
-
revokeToken: {
|
|
168
|
-
input: Id;
|
|
169
|
-
output: {
|
|
170
|
-
revoked: boolean;
|
|
171
|
-
};
|
|
172
|
-
};
|
|
173
241
|
/** Every schema: the built-ins, then the board's own, by name and version. 501 `no_schemas` where the board keeps none. */
|
|
174
242
|
schemas: {
|
|
175
243
|
input: Nothing;
|
|
@@ -554,7 +622,7 @@ type BoardOptions = PolicyOptions & (BackendOptions | DefaultOptions) & {
|
|
|
554
622
|
/**
|
|
555
623
|
* The handle on a board: its methods act as the board's caller, through board(), which calls the
|
|
556
624
|
* backend's methods, and `fetch` serves it. Over `http()` the caller is whoever its `fetch`'s
|
|
557
|
-
* credentials say, with the profile `
|
|
625
|
+
* credentials say, with the profile `BOARD_PROFILE` names; on a board it keeps
|
|
558
626
|
* (`local()`), its own code, as `board:client`.
|
|
559
627
|
*/
|
|
560
628
|
type Board = BoardClient & {
|
|
@@ -565,9 +633,32 @@ type Board = BoardClient & {
|
|
|
565
633
|
fetch(request: Request): Promise<Response>;
|
|
566
634
|
/**
|
|
567
635
|
* The handle, acting with `profile`: `<principal>+<profile>` over HTTP, `board:client:<profile>`
|
|
568
|
-
* on `local()`. `null` acts as yourself, outside any agent session.
|
|
636
|
+
* on `local()`. `null` acts as yourself, outside any agent session. With `can`, the board holds
|
|
637
|
+
* every call it makes to that, as it holds a sandbox to its policy's `x-board-can`: an agent's tool
|
|
638
|
+
* that runs `vb()` on `team.as('fixer', { can: ['read', 'post'] })` can't read sync's inbox or
|
|
639
|
+
* change grants. A narrowed handle's own `as()` and `sandboxPolicy()` stay inside its `can`.
|
|
640
|
+
*/
|
|
641
|
+
as(profile: ProfileOption, options?: AsOptions): Board;
|
|
642
|
+
/**
|
|
643
|
+
* A Vercel Sandbox network policy that hands this board, and nothing else, to a sandboxed agent:
|
|
644
|
+
* `Sandbox.create({ networkPolicy })` takes it. The sandbox's proxy adds the credential (this
|
|
645
|
+
* deployment's own OIDC token, or `token`), the profile (`profile`, or this handle's from `as()`),
|
|
646
|
+
* and `x-board-can` (`can`, or read, post, react, and label everywhere) to its requests for the
|
|
647
|
+
* board's own routes, so none of them enters the sandbox; every other host is blocked. Spread
|
|
648
|
+
* `allow` beside your own hosts' rules to merge them. An OIDC token dies with the function that got
|
|
649
|
+
* it: hand the sandbox a new policy (`sandbox.update({ networkPolicy })`) before it expires.
|
|
650
|
+
*/
|
|
651
|
+
sandboxPolicy(options?: SandboxPolicyOptions): Promise<SandboxPolicy>;
|
|
652
|
+
};
|
|
653
|
+
/** What `as()` takes beside the profile. */
|
|
654
|
+
type AsOptions = {
|
|
655
|
+
/**
|
|
656
|
+
* What the handle may do at most, as `x-board-can` narrows a request: a `can` (`{ 'dev/': ['read',
|
|
657
|
+
* 'post'] }`, `['read']`) or its header form (`dev/=read,post`). It only narrows what this
|
|
658
|
+
* deployment may do, and what the handle it's called on may: never sync's records, watchers'
|
|
659
|
+
* registrations, or what `manage` does unless it says so. Without one, the handle's own.
|
|
569
660
|
*/
|
|
570
|
-
|
|
661
|
+
can?: Can | string;
|
|
571
662
|
};
|
|
572
663
|
/** A board on a backend you pass, which says how it reaches the board itself. */
|
|
573
664
|
type BackendOptions = {
|
|
@@ -621,9 +712,15 @@ type SelfCaller = {
|
|
|
621
712
|
/**
|
|
622
713
|
* What `as(profile)` asked for, its avatar included, or null for yourself. Absent on the
|
|
623
714
|
* handle itself, whose caller is whoever the environment picks: a backend elsewhere sends
|
|
624
|
-
* the profile `
|
|
715
|
+
* the profile `BOARD_PROFILE` names.
|
|
625
716
|
*/
|
|
626
717
|
profile?: ProfileOption;
|
|
718
|
+
/**
|
|
719
|
+
* What `as(profile, { can })` narrowed the handle to, as `x-board-can` writes it
|
|
720
|
+
* (`dev/=read,post`): each backend holds the call to it as a request narrowed with that header
|
|
721
|
+
* is, so it never widens. Absent on a handle nothing narrowed, and on the board's own code.
|
|
722
|
+
*/
|
|
723
|
+
can?: string;
|
|
627
724
|
origin: WriteOrigin;
|
|
628
725
|
};
|
|
629
726
|
/** Who's calling a backend's method: one board() verified, or this deployment's own code. Every method honors what it may do. */
|
|
@@ -746,26 +843,12 @@ type BoardBinding = {
|
|
|
746
843
|
/** The board's own URL, where a board elsewhere can wake it, once it's known. */
|
|
747
844
|
url(): string | null;
|
|
748
845
|
};
|
|
749
|
-
/** A token a backend issued, as board() checks a request that carries it. */
|
|
750
|
-
type StoredToken = {
|
|
751
|
-
id: string;
|
|
752
|
-
name: string;
|
|
753
|
-
/** Who minted it, as a schedule keeps its creator: what it may do is worked out again on every request, narrowed by its scope. */
|
|
754
|
-
minter: Known;
|
|
755
|
-
pinned: Pinned;
|
|
756
|
-
expiresAt: Date;
|
|
757
|
-
};
|
|
758
846
|
/**
|
|
759
|
-
* What a backend that keeps the board keeps of who it trusts: its grants
|
|
760
|
-
*
|
|
761
|
-
* effect on the next request.
|
|
847
|
+
* What a backend that keeps the board keeps of who it trusts: its grants. board() reads them on
|
|
848
|
+
* the requests they decide, as they are then, so a revoke takes effect on the next request.
|
|
762
849
|
*/
|
|
763
850
|
type Trust = {
|
|
764
851
|
grants(): Promise<readonly StoredGrant[]>;
|
|
765
|
-
/** The token whose secret hashes to `hash`, while it and every token it was minted with are live: null otherwise. */
|
|
766
|
-
token(hash: string): Promise<StoredToken | null>;
|
|
767
|
-
/** Whether token `id` and every token it was minted with are live: a schedule made with one stops when it doesn't. */
|
|
768
|
-
live(id: string): Promise<boolean>;
|
|
769
852
|
};
|
|
770
853
|
/**
|
|
771
854
|
* Where a board lives. board() serves the protocol over HTTP: it routes, validates, verifies each
|
|
@@ -777,7 +860,7 @@ interface Backend extends ProtocolMethods {
|
|
|
777
860
|
readonly routes: readonly BackendRoute[];
|
|
778
861
|
/**
|
|
779
862
|
* Whether the board lives here. One that keeps it (`local()`) serves requests: its people, the
|
|
780
|
-
* board's own deployments, and whoever its grants
|
|
863
|
+
* board's own deployments, and whoever its grants let in. One that uses another board
|
|
781
864
|
* answers no requests: on Vercel's, only wake-ups and webhooks, and at `BOARD_URL`, nothing.
|
|
782
865
|
*/
|
|
783
866
|
readonly keeps: boolean;
|
|
@@ -793,8 +876,14 @@ interface Backend extends ProtocolMethods {
|
|
|
793
876
|
* pulls its inbox, starts threads, and delivers only through the keys it holds. Every key, when left out.
|
|
794
877
|
*/
|
|
795
878
|
syncedHere?(key: string): Promise<boolean>;
|
|
796
|
-
/** Its grants
|
|
879
|
+
/** Its grants, for a backend that keeps them (`local()`): board() checks requests against them. */
|
|
797
880
|
readonly trust?: Trust;
|
|
881
|
+
/**
|
|
882
|
+
* How a sandbox reaches the board this backend uses, for `sandboxPolicy()`: its URL, and the
|
|
883
|
+
* headers every request of the sandbox's carries. One that keeps the board leaves it out: the
|
|
884
|
+
* board's own URL says, and board() adds its deployment's credential.
|
|
885
|
+
*/
|
|
886
|
+
sandbox?(input: SandboxInput): Promise<SandboxReach>;
|
|
798
887
|
/**
|
|
799
888
|
* board() calls it once, when it's created, before any request: what background work needs
|
|
800
889
|
* from the board (its subscriptions, its sync, its policy, a handle through it). It does no I/O.
|
|
@@ -802,4 +891,4 @@ interface Backend extends ProtocolMethods {
|
|
|
802
891
|
bind(board: BoardBinding): void;
|
|
803
892
|
}
|
|
804
893
|
//#endregion
|
|
805
|
-
export {
|
|
894
|
+
export { Method as C, SandboxPolicy as D, SandboxMatcher as E, SandboxPolicyOptions as O, HttpError as S, SandboxMatch as T, Middleware as _, Identity as a, WritePatch as b, SelfCaller as c, AsOptions as d, Board as f, DroppedError as g, WatcherContext as h, Caller as i, SandboxRule as k, Subscription as l, Watcher as m, BackendRoute as n, InboxDelivery as o, BoardOptions as p, BoardBinding as r, ProtocolMethods as s, Backend as t, VerifiedCaller as u, MiddlewareContext as v, Protocol as w, WriteSource as x, Write as y };
|
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-CWLPYoiY.mjs";
|
|
2
2
|
export { local };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./external-
|
|
2
|
-
import { c as SyncProvider, s as ResolvedTarget } from "./events-
|
|
1
|
+
import "./external-DymyhUzl.mjs";
|
|
2
|
+
import { c as SyncProvider, s as ResolvedTarget } from "./events-BT8y_81j.mjs";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import { Chat, stringifyMarkdown } from "chat";
|
|
5
5
|
//#region src/sync/chat.ts
|