@vercel/board 0.36.0 → 0.38.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/dist/{access-BsP0hvcC.mjs → access-CVkjSfxj.mjs} +12 -12
- package/dist/access.d.mts +3 -3
- package/dist/access.mjs +6 -5
- package/dist/{actors-DFOpTw89.mjs → actors-kfMejhaw.mjs} +6 -4
- package/dist/{auth-CrjXLgOb.mjs → auth-B3bBYOqf.mjs} +2 -2
- package/dist/{auth-C21V0EK1.d.mts → auth-BXLCkeB0.d.mts} +3 -3
- package/dist/{backend-D21q8mdm.d.mts → backend-BkQlF1LQ.d.mts} +3 -9
- package/dist/backend-local.d.mts +1 -1
- package/dist/backend-local.mjs +1 -1
- package/dist/{chat-provider-Bb-jeJLY.mjs → chat-provider-1WKsLEnM.mjs} +2 -2
- package/dist/{chat-provider-DmZCmBkb.d.mts → chat-provider-DyNy5xdC.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 +18 -2
- package/dist/cli-embedded.mjs +22 -4
- package/dist/cli.mjs +50 -676
- package/dist/{commands-DGID-4Z2.d.mts → commands-B5d-lmNN.d.mts} +1 -1
- package/dist/{commands-BLtqSwha.mjs → commands-BLS7erNu.mjs} +12 -1
- package/dist/{conformance-CKrwglzA.mjs → conformance-qJF96jZI.mjs} +164 -23
- package/dist/conformance.d.mts +10 -2
- package/dist/conformance.mjs +1 -1
- package/dist/digest-DAxy9Ula.mjs +4 -0
- package/dist/{engine-B_prP0b8.mjs → engine-eUgO5jTM.mjs} +18 -14
- package/dist/{events-AEKh9tJm.mjs → events-C6HwB046.mjs} +23 -9
- package/dist/exports-BJ3wmEMY.d.mts +4 -0
- package/dist/{exports-Ck4Xu3OV.mjs → exports-BsfcChdp.mjs} +805 -193
- package/dist/{external-BA2aCC_3.mjs → external-CHDxWIVf.mjs} +1 -1
- package/dist/{index-LREsSZb2.d.mts → index-DpVyZa9b.d.mts} +2 -2
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +3 -3
- package/dist/index.node.d.mts +5 -5
- package/dist/index.node.mjs +2 -2
- package/dist/inspect/app.js +44 -44
- package/dist/inspect/engine.js +5 -5
- package/dist/inspect-5mkjJYMS.mjs +2 -0
- package/dist/inspect-DtCbBtOW.mjs +643 -0
- package/dist/{local-DJ_qI9q7.mjs → local-Bo3XzEKB.mjs} +29 -84
- package/dist/{main-Jz4nbNJi.mjs → main-0nvLgajF.mjs} +45 -37
- package/dist/{memory-DqwXlyK4.mjs → memory-DkoqhxIH.mjs} +2 -2
- package/dist/{middleware-BxgizazV.mjs → middleware-CPqAuRtp.mjs} +10 -2
- package/dist/page-R0RoE_gM.mjs +2 -0
- package/dist/page-UsfvSIWc.mjs +30 -0
- package/dist/{provider-DEOfc4Ls.d.mts → provider-D5yVFisj.d.mts} +5 -3
- package/dist/{routes-BpKdMvgX.d.mts → routes-BffuaoTX.d.mts} +11 -18
- package/dist/{schemas-BG205xds.mjs → schemas-AZkxk06N.mjs} +3 -3
- package/dist/{serve-Puf3I-oI.mjs → serve-D7I3KisQ.mjs} +3 -3
- package/dist/{server-CS-1aeTl.mjs → server-Cc3nYq3H.mjs} +23 -13
- package/dist/{serving-6_bhBNAW.mjs → serving-DJMcG0dT.mjs} +1 -1
- package/dist/{sql-aetuEBZC.mjs → sql-l3ysn4O5.mjs} +2 -2
- package/dist/{sqlite-DvsB8ENQ.mjs → sqlite-CAwNHbQD.mjs} +2 -2
- package/dist/{sqlite-db-BPwRoDI7.mjs → sqlite-db-cm5yhrD-.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/{targets-Dk_xgS9q.mjs → targets-B4Uikw0J.mjs} +66 -21
- package/dist/{tokens-Dn4cPZIr.mjs → tokens-DA9ipsZ-.mjs} +1 -1
- package/docs/01-board/01-mounting.md +12 -9
- package/docs/01-board/03-identity.md +2 -1
- package/docs/01-board/06-watchers.md +71 -40
- package/docs/01-board/09-access.md +10 -5
- package/docs/01-quickstart.md +1 -1
- package/docs/02-sync/01-overview.md +7 -7
- package/docs/02-sync/02-functions.md +5 -8
- package/docs/02-sync/03-slack.md +0 -8
- package/docs/02-sync/04-github.md +0 -8
- package/docs/02-sync/07-linear.md +0 -6
- package/docs/03-guides/01-coding-agents.md +1 -0
- package/docs/03-guides/02-inspector.md +3 -2
- package/docs/03-guides/03-ci.md +10 -4
- package/docs/03-guides/04-triage.md +8 -13
- package/docs/04-reference/01-cli.md +51 -13
- package/docs/04-reference/02-board.md +2 -1
- package/docs/04-reference/03-http.md +4 -4
- package/docs/04-reference/05-conformance.md +10 -3
- package/docs/index.md +3 -10
- package/package.json +2 -1
- package/dist/attempts-HXcskN1w.mjs +0 -10
- package/dist/exports-BxljH73E.d.mts +0 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as forbidden } from "./errors-rYDxZEuN.mjs";
|
|
2
|
-
import { a as
|
|
2
|
+
import { a as CAN_MAX, o as ChannelPath } from "./schemas-AZkxk06N.mjs";
|
|
3
3
|
//#region src/server/access.ts
|
|
4
4
|
/**
|
|
5
5
|
* What a principal may do in a channel. `read` covers messages, threads,
|
|
@@ -278,37 +278,37 @@ function decide(matched, channel) {
|
|
|
278
278
|
permissions: [...winner.permissions].sort((a, b) => ORDER.get(a) - ORDER.get(b))
|
|
279
279
|
};
|
|
280
280
|
}
|
|
281
|
-
/** An access as `x-board-
|
|
282
|
-
function
|
|
281
|
+
/** An access as `x-board-can` writes it, `dev/=read,post;ci/=read`, or `*=` for nothing: what a stored principal keeps. */
|
|
282
|
+
function canText(access) {
|
|
283
283
|
const entries = Object.entries(access.summary()).map(([pattern, permissions]) => `${pattern}=${permissions.join(",")}`);
|
|
284
284
|
return entries.length > 0 ? entries.join(";") : "*=";
|
|
285
285
|
}
|
|
286
286
|
/**
|
|
287
|
-
* `x-board-
|
|
287
|
+
* `x-board-can`: `dev/=read,post,react,label;ci/=read`. Each entry is a
|
|
288
288
|
* pattern and its permissions (or `all`). It's meant for a proxy that holds the
|
|
289
289
|
* credential, like Pi's sandbox: the board intersects it with the principal's
|
|
290
290
|
* access, so it can only narrow, and a caller holding its own token gains
|
|
291
|
-
* nothing by sending it.
|
|
291
|
+
* nothing by sending it. `name` is what its errors call it: the CLI's `--can` writes the same.
|
|
292
292
|
*/
|
|
293
|
-
function
|
|
294
|
-
if (header.length > 4e3) throw new InvalidCan(
|
|
293
|
+
function parseCan(header, name = "x-board-can") {
|
|
294
|
+
if (header.length > 4e3) throw new InvalidCan(`${name} is longer than ${CAN_MAX} characters`);
|
|
295
295
|
const out = {};
|
|
296
296
|
const entries = header.split(";").map((entry) => entry.trim());
|
|
297
|
-
if (entries.every((entry) => entry === "")) throw new InvalidCan(
|
|
297
|
+
if (entries.every((entry) => entry === "")) throw new InvalidCan(`${name} is empty: write pattern=permissions, like dev/=read,post`);
|
|
298
298
|
for (const entry of entries) {
|
|
299
299
|
if (entry === "") continue;
|
|
300
300
|
const split = entry.indexOf("=");
|
|
301
|
-
if (split < 0) throw new InvalidCan(
|
|
301
|
+
if (split < 0) throw new InvalidCan(`${name} entry ${entry} needs =: write pattern=permissions, like dev/=read,post`);
|
|
302
302
|
const pattern = entry.slice(0, split).trim();
|
|
303
303
|
const list = entry.slice(split + 1).trim();
|
|
304
|
-
if (Object.hasOwn(out, pattern)) throw new InvalidCan(
|
|
304
|
+
if (Object.hasOwn(out, pattern)) throw new InvalidCan(`${name} lists ${pattern} twice`);
|
|
305
305
|
parsePattern(pattern);
|
|
306
306
|
const permissions = list === "" ? [] : list.split(",").map((permission) => permission.trim());
|
|
307
307
|
if (permissions.length === 1 && permissions[0] === "all") {
|
|
308
308
|
out[pattern] = "all";
|
|
309
309
|
continue;
|
|
310
310
|
}
|
|
311
|
-
for (const permission of permissions) if (!ORDER.has(permission)) throw new InvalidCan(
|
|
311
|
+
for (const permission of permissions) if (!ORDER.has(permission)) throw new InvalidCan(`${name}: unknown permission ${permission || "(empty)"}: use ${PERMISSIONS.join(", ")}, or all`);
|
|
312
312
|
out[pattern] = permissions;
|
|
313
313
|
}
|
|
314
314
|
return out;
|
|
@@ -396,4 +396,4 @@ function checkGrantChange(change) {
|
|
|
396
396
|
return null;
|
|
397
397
|
}
|
|
398
398
|
//#endregion
|
|
399
|
-
export {
|
|
399
|
+
export { canText as a, compileAccess as c, parsePattern as d, union as f, authorize as i, decide as l, InvalidCan as n, checkGrantChange as o, writtenCan as p, PERMISSIONS as r, combine as s, FULL_ACCESS as t, parseCan as u };
|
package/dist/access.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Bt as FULL_ACCESS, Gt as InvalidCan, Ht as GrantChange, It as Access, Lt as AccessSummary, Qt 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 Actor, Bt as FULL_ACCESS, Gt as InvalidCan, Ht as GrantChange, It as Access, Lt as AccessSummary, Qt as union, Rt as Can, Ut as GrantChangeRefusal, Vt as Grant, Wt as GrantShape, Xt as compileAccess, Yt as checkGrantChange, Zt as parseCan, nn as Author, qt as Permission, rn as CAN_MAX, zt as ChannelPattern } from "./routes-BffuaoTX.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-BXLCkeB0.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
|
|
@@ -25,4 +25,4 @@ type ResolvedActor = {
|
|
|
25
25
|
*/
|
|
26
26
|
export declare function resolveActor(principal: Principal, claims: Claims, audience: string): ResolvedActor;
|
|
27
27
|
//#endregion
|
|
28
|
-
export { type Access, type AccessSummary, type Authenticate, type AuthenticateContext, 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, union };
|
|
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,5 +1,6 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
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-CVkjSfxj.mjs";
|
|
3
|
+
import { E as grantAccess, T as explainGrants, n as DEFAULT_CAN } from "./auth-B3bBYOqf.mjs";
|
|
4
|
+
import { i as resolveActor } from "./actors-kfMejhaw.mjs";
|
|
5
|
+
import { t as oidcTokens } from "./tokens-DA9ipsZ-.mjs";
|
|
6
|
+
export { CAN_MAX, DEFAULT_CAN, FULL_ACCESS, InvalidCan, checkGrantChange, compileAccess, explainGrants, grantAccess, oidcTokens, parseCan, resolveActor, union };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { r as badRequest } from "./errors-rYDxZEuN.mjs";
|
|
2
|
-
import { b as toStorable } from "./schemas-
|
|
3
|
-
import { u as
|
|
2
|
+
import { b as toStorable } from "./schemas-AZkxk06N.mjs";
|
|
3
|
+
import { u as parseCan } from "./access-CVkjSfxj.mjs";
|
|
4
4
|
import { t as own } from "./own-OwgPWdmh.mjs";
|
|
5
5
|
import { t as extractMentions } from "./mentions-CB6ShY4R.mjs";
|
|
6
6
|
//#region src/server/actors.ts
|
|
7
7
|
/** Agents whose avatars the board serves itself. */
|
|
8
8
|
const KNOWN_AGENTS = [
|
|
9
|
+
"fx",
|
|
9
10
|
"claude",
|
|
10
11
|
"codex",
|
|
11
12
|
"grok",
|
|
@@ -35,9 +36,10 @@ function claimsOf(headers) {
|
|
|
35
36
|
} catch {
|
|
36
37
|
throw badRequest("x-board-name must be URI-encoded");
|
|
37
38
|
}
|
|
38
|
-
|
|
39
|
+
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");
|
|
40
|
+
const scope = headers.get("x-board-can");
|
|
39
41
|
if (scope !== null) try {
|
|
40
|
-
|
|
42
|
+
parseCan(scope);
|
|
41
43
|
} catch (error) {
|
|
42
44
|
throw badRequest(error.message, "invalid_scope");
|
|
43
45
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as forbidden, l as unauthorized, r as badRequest, t as HttpError } from "./errors-rYDxZEuN.mjs";
|
|
2
|
-
import { c as
|
|
2
|
+
import { c as compileAccess, l as decide, p as writtenCan, s as combine, t as FULL_ACCESS, u as parseCan } from "./access-CVkjSfxj.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
|
|
@@ -498,7 +498,7 @@ function createAuthority(options) {
|
|
|
498
498
|
*/
|
|
499
499
|
async function grant(principal, snapshot) {
|
|
500
500
|
const resolved = await resolve(principal, snapshot);
|
|
501
|
-
const scope = principal.scope === void 0 ? void 0 :
|
|
501
|
+
const scope = principal.scope === void 0 ? void 0 : parseCan(principal.scope);
|
|
502
502
|
if ("fixed" in resolved) return scope === void 0 ? resolved.fixed : resolved.fixed.narrow(scope);
|
|
503
503
|
const decided = grantAccess({
|
|
504
504
|
...resolved.facts,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { It as Access, Jt as WrittenCan, Kt as Level, Rt as Can, qt as Permission } from "./routes-
|
|
1
|
+
import { It as Access, Jt as WrittenCan, Kt as Level, Rt as Can, qt as Permission } from "./routes-BffuaoTX.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. */
|
|
@@ -99,7 +99,7 @@ type Claims = {
|
|
|
99
99
|
/** `x-board-handle` and `x-board-name`: a person's handle and display name. */
|
|
100
100
|
handle: string | null;
|
|
101
101
|
name: string | null;
|
|
102
|
-
/** `x-board-
|
|
102
|
+
/** `x-board-can`: what it narrows itself to, `dev/=read,post`. It only narrows. */
|
|
103
103
|
scope: string | null;
|
|
104
104
|
};
|
|
105
105
|
/** A request, as board() hands it to `authenticate`: what it said, none of it verified yet. */
|
|
@@ -127,7 +127,7 @@ type Principal = {
|
|
|
127
127
|
expiresAt: Date | null;
|
|
128
128
|
/** 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
129
|
facts?: TokenFacts;
|
|
130
|
-
/** The `x-board-
|
|
130
|
+
/** The `x-board-can` a proxy sent, which narrows whatever it may do. */
|
|
131
131
|
scope?: string;
|
|
132
132
|
/**
|
|
133
133
|
* The board token it came with (its ID), kept with what it stores: a schedule or a registration
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as LinkedQuery, C as InboxItem, Ct as ThreadsPage, E as InboxQuery, Et as TokenBody, F as MessagesPage, I as MessagesQuery, It as Access, J as RegistrationView, K as RegisterBody, Kt as Level, M as MatchesQuery, N as Me, Nt as UploadStartBody, O as LabelBody, Ot as TokenView, P as MessageView, Pt as UploadTicket,
|
|
2
|
-
import { d as Pinned, l as Known, m as StoredGrant, o as Granted, t as Authenticate } from "./auth-
|
|
3
|
-
import { L as ProfileOption, M as BoardClient, P as ErrorOrigin, p as SyncProvider } from "./provider-
|
|
1
|
+
import { $t as Actor, A as LinkedQuery, C as InboxItem, Ct as ThreadsPage, E as InboxQuery, Et as TokenBody, F as MessagesPage, I as MessagesQuery, It as Access, J as RegistrationView, K as RegisterBody, Kt as Level, M as MatchesQuery, N as Me, Nt as UploadStartBody, O as LabelBody, Ot as TokenView, P as MessageView, Pt as UploadTicket, S as InboxEntry, St as ThreadView, T as InboxPushBody, W as ReactBody, Z as ScheduleBody, _ as GrantBody, _t as SyncReceiptBody, at as SourceJoinBody, b as GrantView, bt as SyncedView, c as DeleteBody, ct as SourceReadQuery, d as EventsPage, dt as SyncCopiesView, et as ScheduleView, f as EventsQuery, h as Explanation, ht as SyncImportBody, i as BoardEventView, in as Labels, it as SourceJoin, j as MatchView, jt as UpdateGrantBody, kt as TypingBody, l as Discovery, m as ExplainQuery, mt as SyncFindView, nn as Author, o as ChannelView, on as ExternalEvent, pt as SyncFindQuery, qt as Permission, s as CreateChannelBody, st as SourceRead, t as AckBody, tn as Attachment, tt as SchedulesQuery, u as EditBody, ut as SyncCopiesQuery, w as InboxNextQuery, wt as ThreadsQuery, x as InboxAckBody, yt as SyncThreadView, z as PostBody } from "./routes-BffuaoTX.mjs";
|
|
2
|
+
import { d as Pinned, l as Known, m as StoredGrant, o as Granted, t as Authenticate } from "./auth-BXLCkeB0.mjs";
|
|
3
|
+
import { L as ProfileOption, M as BoardClient, P as ErrorOrigin, p as SyncProvider } from "./provider-D5yVFisj.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>>;
|
|
@@ -477,11 +477,6 @@ type Watcher = {
|
|
|
477
477
|
* delivery receipts, as in `vb tail`: `message.synced` says where a message landed on a platform.
|
|
478
478
|
*/
|
|
479
479
|
tail: string;
|
|
480
|
-
/**
|
|
481
|
-
* `matches` (the default) runs on every event the tail prints. `enters` runs only when a
|
|
482
|
-
* message enters the view: it didn't match before the event and does after it.
|
|
483
|
-
*/
|
|
484
|
-
when?: 'matches' | 'enters';
|
|
485
480
|
run: (context: WatcherContext) => unknown;
|
|
486
481
|
};
|
|
487
482
|
//#endregion
|
|
@@ -632,7 +627,6 @@ type Subscription =
|
|
|
632
627
|
{
|
|
633
628
|
kind: 'tail';
|
|
634
629
|
tail: string;
|
|
635
|
-
when: 'matches' | 'enters';
|
|
636
630
|
} |
|
|
637
631
|
/** Sync's outbound: every post, change, and thread sync in every channel, as its own code sees them. */
|
|
638
632
|
{
|
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-Bo3XzEKB.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-CHDxWIVf.mjs";
|
|
2
|
+
import { c as SyncProvider, s as ResolvedTarget } from "./events-C6HwB046.mjs";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import { Chat, stringifyMarkdown } from "chat";
|
|
5
5
|
//#region src/sync/chat.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { T as ProviderEvent, a as ProviderOptions, c as ReceivedEvent, d as ResolvedTarget, g as SyncFn, i as ProviderFile, k as SyncRoot, n as FileDelivery, o as ProviderPost, p as SyncProvider, r as ProviderDelivery, s as Receive, t as FetchedLink } from "./provider-
|
|
1
|
+
import { $t as Actor, an as ExternalAuthor, cn as ExternalLink, it as SourceJoin, sn as ExternalFile, st as SourceRead } from "./routes-BffuaoTX.mjs";
|
|
2
|
+
import { T as ProviderEvent, a as ProviderOptions, c as ReceivedEvent, d as ResolvedTarget, g as SyncFn, i as ProviderFile, k as SyncRoot, n as FileDelivery, o as ProviderPost, p as SyncProvider, r as ProviderDelivery, s as Receive, t as FetchedLink } from "./provider-D5yVFisj.mjs";
|
|
3
3
|
import { Adapter, Author, FileUpload, Message, ReactionEvent, StateAdapter } from "chat";
|
|
4
4
|
//#region src/sync/chat-provider.d.ts
|
|
5
5
|
type ChatInput = {
|
package/dist/cli-commands.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as OptionName, c as globalOptions, d as options, f as usage, i as CliOption, l as groups, n as CliCommand, o as commands, r as CliExample, s as filters, t as CliArgument, u as option } from "./commands-
|
|
1
|
+
import { a as OptionName, c as globalOptions, d as options, f as usage, i as CliOption, l as groups, n as CliCommand, o as commands, r as CliExample, s as filters, t as CliArgument, u as option } from "./commands-B5d-lmNN.mjs";
|
|
2
2
|
export { CliArgument, CliCommand, CliExample, CliOption, OptionName, commands, filters, globalOptions, groups, option, options, usage };
|
package/dist/cli-commands.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as option, i as groups, n as filters, o as options, r as globalOptions, s as usage, t as commands } from "./commands-
|
|
1
|
+
import { a as option, i as groups, n as filters, o as options, r as globalOptions, s as usage, t as commands } from "./commands-BLS7erNu.mjs";
|
|
2
2
|
export { commands, filters, globalOptions, groups, option, options, usage };
|
package/dist/cli-embedded.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as Board } from "./backend-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { d as Board } from "./backend-BkQlF1LQ.mjs";
|
|
2
|
+
import "./index-DpVyZa9b.mjs";
|
|
3
3
|
//#region src/cli/failure.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* What kind of failure it is, which fixes the exit code: 2 for `usage` and `missing_input`, 130
|
|
@@ -51,6 +51,17 @@ export declare function failureLines(failure: Failure): string[];
|
|
|
51
51
|
export declare function commandWord(argv: string[]): string | undefined;
|
|
52
52
|
//#endregion
|
|
53
53
|
//#region src/cli/embedded.d.ts
|
|
54
|
+
/**
|
|
55
|
+
* The inspector's page as this version of board's npm package has it, for an app that bundles
|
|
56
|
+
* board's CLI and so has no file of board's beside it: `path` in `name@version`'s tarball, and its
|
|
57
|
+
* SHA-256 (hex) to check what it fetched against. The build sets `sha256`; from source, it's null.
|
|
58
|
+
*/
|
|
59
|
+
export declare const INSPECTOR_PAGE: {
|
|
60
|
+
name: '@vercel/board';
|
|
61
|
+
version: string;
|
|
62
|
+
path: 'dist/inspect/app.js';
|
|
63
|
+
sha256: string | null;
|
|
64
|
+
};
|
|
54
65
|
/**
|
|
55
66
|
* Board's CLI as `appName` names it in help, usage, and errors (`vercel board`). With no board
|
|
56
67
|
* URL anywhere, it talks to the team's board in Vercel's API: `VERCEL_ORG_ID`'s, the nearest linked
|
|
@@ -64,6 +75,10 @@ export declare function commandWord(argv: string[]): string | undefined;
|
|
|
64
75
|
* (`--scope` still wins): board asks for each only when a request needs it, so help, a typo, or
|
|
65
76
|
* misuse never refreshes a login or looks a team up. With `fetch`, board's requests to Vercel's API
|
|
66
77
|
* with that login go through the app's own, which adds its credentials (a DPoP proof, say).
|
|
78
|
+
*
|
|
79
|
+
* `inspectorPage` is the inspector's page, which `inspect` asks for when it runs: the one
|
|
80
|
+
* `INSPECTOR_PAGE` names, as the app fetched it and checked it against its `sha256`. Without one,
|
|
81
|
+
* `inspect` reads it beside board's files, which an app that bundles board's CLI has none of.
|
|
67
82
|
*/
|
|
68
83
|
export declare function createApp(options: {
|
|
69
84
|
appName: string;
|
|
@@ -74,6 +89,7 @@ export declare function createApp(options: {
|
|
|
74
89
|
login?: () => Promise<string>;
|
|
75
90
|
team?: () => Promise<string | null>;
|
|
76
91
|
fetch?: typeof globalThis.fetch;
|
|
92
|
+
inspectorPage?: () => Promise<string>;
|
|
77
93
|
}): {
|
|
78
94
|
run(args: string[]): Promise<number>;
|
|
79
95
|
};
|
package/dist/cli-embedded.mjs
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { g as VERSION } from "./targets-B4Uikw0J.mjs";
|
|
2
|
+
import { a as commandLine, c as failureLines, i as mainWith, l as formatFailure, n as commandWord, o as exitCode, r as main, s as failureDocument, t as Failed } from "./main-0nvLgajF.mjs";
|
|
3
|
+
import { t as PAGE_SHA256 } from "./digest-DAxy9Ula.mjs";
|
|
2
4
|
//#region src/cli/embedded.ts
|
|
3
5
|
/**
|
|
6
|
+
* The inspector's page as this version of board's npm package has it, for an app that bundles
|
|
7
|
+
* board's CLI and so has no file of board's beside it: `path` in `name@version`'s tarball, and its
|
|
8
|
+
* SHA-256 (hex) to check what it fetched against. The build sets `sha256`; from source, it's null.
|
|
9
|
+
*/
|
|
10
|
+
const INSPECTOR_PAGE = {
|
|
11
|
+
name: "@vercel/board",
|
|
12
|
+
version: VERSION,
|
|
13
|
+
path: "dist/inspect/app.js",
|
|
14
|
+
sha256: PAGE_SHA256
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
4
17
|
* Board's CLI as `appName` names it in help, usage, and errors (`vercel board`). With no board
|
|
5
18
|
* URL anywhere, it talks to the team's board in Vercel's API: `VERCEL_ORG_ID`'s, the nearest linked
|
|
6
19
|
* project's team's (`.vercel`), your login's, or `--scope`'s. `run` takes what follows the name, and answers the exit code:
|
|
@@ -13,9 +26,13 @@ import { a as commandLine, c as failureLines, i as mainWith, l as formatFailure,
|
|
|
13
26
|
* (`--scope` still wins): board asks for each only when a request needs it, so help, a typo, or
|
|
14
27
|
* misuse never refreshes a login or looks a team up. With `fetch`, board's requests to Vercel's API
|
|
15
28
|
* with that login go through the app's own, which adds its credentials (a DPoP proof, say).
|
|
29
|
+
*
|
|
30
|
+
* `inspectorPage` is the inspector's page, which `inspect` asks for when it runs: the one
|
|
31
|
+
* `INSPECTOR_PAGE` names, as the app fetched it and checked it against its `sha256`. Without one,
|
|
32
|
+
* `inspect` reads it beside board's files, which an app that bundles board's CLI has none of.
|
|
16
33
|
*/
|
|
17
34
|
function createApp(options) {
|
|
18
|
-
const { appName, onError, onWarning, login, team, fetch } = options;
|
|
35
|
+
const { appName, onError, onWarning, login, team, fetch, inspectorPage } = options;
|
|
19
36
|
return { run: (args) => main(args, {
|
|
20
37
|
name: appName,
|
|
21
38
|
commands: {},
|
|
@@ -24,7 +41,8 @@ function createApp(options) {
|
|
|
24
41
|
...onWarning ? { onWarning } : {},
|
|
25
42
|
...login ? { login } : {},
|
|
26
43
|
...team ? { team } : {},
|
|
27
|
-
...fetch ? { fetch } : {}
|
|
44
|
+
...fetch ? { fetch } : {},
|
|
45
|
+
...inspectorPage ? { inspectorPage } : {}
|
|
28
46
|
}) };
|
|
29
47
|
}
|
|
30
48
|
const lacking = (what, option) => async () => {
|
|
@@ -88,4 +106,4 @@ function vb(board, argv, options = {}) {
|
|
|
88
106
|
return result;
|
|
89
107
|
}
|
|
90
108
|
//#endregion
|
|
91
|
-
export { commandLine, commandWord, createApp, failureLines, vb };
|
|
109
|
+
export { INSPECTOR_PAGE, commandLine, commandWord, createApp, failureLines, vb };
|