@vercel/board 0.48.1 → 0.50.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-C06pIr0M.mjs → access-BbgmsAFF.mjs} +29 -17
- package/dist/access.d.mts +2 -2
- package/dist/access.mjs +5 -5
- package/dist/{actors-Dkyg-oo0.mjs → actors-CX2D22hL.mjs} +4 -3
- package/dist/{auth-B9-wXQ-x.mjs → auth-DJDTfgAL.mjs} +2 -2
- package/dist/{auth-li3lKwJG.d.mts → auth-Z9-Khvvw.d.mts} +1 -1
- package/dist/{backend-UBP6HimX.d.mts → backend-CcaaS9Xl.d.mts} +31 -8
- package/dist/backend-local.d.mts +1 -1
- package/dist/backend-local.mjs +1 -1
- package/dist/{chat-provider-iN0DFsSE.d.mts → chat-provider-DQ1GHm4o.d.mts} +2 -2
- package/dist/{chat-provider-kNWd6MQC.mjs → chat-provider-HJ7y_ipp.mjs} +2 -2
- package/dist/cli-commands.d.mts +1 -1
- package/dist/cli-commands.mjs +1 -1
- package/dist/cli-embedded.d.mts +8 -2
- package/dist/cli-embedded.mjs +10 -4
- package/dist/cli.mjs +6 -6
- package/dist/client-C2T4eaXd.d.mts +544 -0
- package/dist/{commands-CJsOA-hf.d.mts → commands-Cm4sODIu.d.mts} +12 -8
- package/dist/{commands-Dk6_cHLS.mjs → commands-nN8WpvCe.mjs} +75 -58
- package/dist/{conformance-CDP8y2Zm.mjs → conformance-Cr-umDl0.mjs} +102 -20
- package/dist/conformance.d.mts +1 -1
- package/dist/conformance.mjs +1 -1
- package/dist/{engine-BQ0hJw2w.mjs → engine-DJZ8Xy_g.mjs} +10 -7
- package/dist/{errors-QhkdzI-o.mjs → errors-DYF4hhIc.mjs} +53 -174
- package/dist/{events-B-qyxNsJ.mjs → events-BdOCmnZh.mjs} +3 -3
- package/dist/{exports-BzSG0_wL.mjs → exports-CuD-Mxkw.mjs} +389 -118
- package/dist/{exports-inhbjAWi.d.mts → exports-lmr6UHHc.d.mts} +4 -4
- package/dist/{external-BuVTXT1R.mjs → external-D2jq_DEQ.mjs} +1 -1
- package/dist/{index-B0Fnhvk7.d.mts → index-_KxJu15n.d.mts} +2 -2
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +4 -4
- package/dist/index.node.d.mts +7 -7
- package/dist/index.node.mjs +4 -4
- package/dist/inspect/app.js +39 -39
- package/dist/inspect/engine.js +3 -3
- package/dist/inspect-CZeoSm7E.mjs +272 -0
- package/dist/inspect-UCcPViyA.mjs +2 -0
- package/dist/inspect.d.mts +17 -0
- package/dist/inspect.mjs +196 -0
- package/dist/{local-BdKxz-Dn.mjs → local-BVSFSSYf.mjs} +165 -61
- package/dist/{main-BgiViRZ8.mjs → main-B016auoG.mjs} +227 -49
- package/dist/{memory-CMm-Fk_A.mjs → memory-C2lzMV_t.mjs} +2 -2
- package/dist/{middleware-CT6vMNUc.mjs → middleware-DUKIITFZ.mjs} +3 -3
- package/dist/{page-D-OzDOAX.mjs → page-7KWSGxyC.mjs} +12 -2
- package/dist/page-CN77B014.mjs +2 -0
- package/dist/profile-header-Cj0Cb1cf.mjs +163 -0
- package/dist/{provider-DC3WHUXo.d.mts → provider-Dwb_9mnu.d.mts} +3 -529
- package/dist/{routes-CjA6Mp4D.d.mts → routes-B6SEA9yw.d.mts} +130 -4
- package/dist/{routes-ABXf3CKq.mjs → routes-BE0y6wCk.mjs} +40 -14
- package/dist/{schemas-7VFdomFB.mjs → schemas-CUSTEFIy.mjs} +11 -3
- package/dist/{serve-C2Jbr7pR.mjs → serve-B10e7QaY.mjs} +5 -5
- package/dist/{server-EOQC5Gtq.mjs → server-ViWNvg5q.mjs} +61 -29
- package/dist/{serving-BNdiReQT.mjs → serving-SbqeWqlA.mjs} +1 -1
- package/dist/{inspect-n9brh-TT.mjs → shell-DmpmgOPC.mjs} +25 -274
- package/dist/{sql-IEbO5vXs.mjs → sql-iABdyCiz.mjs} +18 -5
- package/dist/{sqlite-CVG8XKHm.mjs → sqlite-28EMrmk7.mjs} +2 -2
- package/dist/{sqlite-db-BJjPQYx4.mjs → sqlite-db-Ckd-ceNe.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 +3 -3
- package/dist/sync-linear.d.mts +3 -3
- package/dist/sync-linear.mjs +3 -3
- package/dist/sync-slack.d.mts +3 -3
- package/dist/sync-slack.mjs +11 -7
- package/dist/sync.d.mts +2 -2
- package/dist/sync.mjs +2 -2
- package/dist/{tags-BpFo6q0_.mjs → tags-D0qra0Qy.mjs} +1 -1
- package/dist/{task-batch-D4p9N8lN.mjs → task-batch-9lVDG3d-.mjs} +10 -11
- package/dist/{tokens-BCp4EWTQ.mjs → tokens-C-iK0Cku.mjs} +2 -2
- package/dist/version-C70RLVEK.mjs +5 -0
- package/docs/01-board/01-mounting.md +8 -0
- package/docs/01-board/03-identity.md +3 -2
- package/docs/01-board/04-messages.md +6 -2
- package/docs/01-board/05-reading.md +17 -2
- package/docs/01-board/09-access.md +40 -6
- package/docs/01-board/11-tasks.md +3 -3
- package/docs/02-sync/01-overview.md +2 -1
- package/docs/03-guides/02-inspector.md +31 -0
- package/docs/03-guides/06-sandboxed-agents.md +22 -21
- package/docs/04-reference/01-cli.md +91 -33
- package/docs/04-reference/02-board.md +20 -7
- package/docs/04-reference/03-http.md +9 -6
- package/docs/04-reference/05-conformance.md +7 -0
- package/package.json +5 -1
- package/dist/inspect-BB-XUPuz.mjs +0 -2
- package/dist/page-Dr9Aqlej.mjs +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { a as CAN_MAX, s as ChannelPath } from "./schemas-CUSTEFIy.mjs";
|
|
2
|
+
import { o as forbidden } from "./errors-DYF4hhIc.mjs";
|
|
3
3
|
//#region src/server/access.ts
|
|
4
4
|
/**
|
|
5
5
|
* What a principal may do in a channel. `read` covers messages, threads,
|
|
@@ -352,6 +352,10 @@ const isUnder = (other, pattern) => other !== pattern && (pattern === "*" || pat
|
|
|
352
352
|
* - **Admission:** wherever `everyone` gives something, `caller` has it too, since any principal a
|
|
353
353
|
* grant lets in gets what `everyone` gives. A revoke or a removal lets no one in, so it's judged
|
|
354
354
|
* by reach alone, at the patterns of the grant as it was.
|
|
355
|
+
* - **Lockout:** a change that passes both, and takes the caller's own `manage` at a pattern it
|
|
356
|
+
* names, is one the caller couldn't take back: closing `security/` to everyone closes it to
|
|
357
|
+
* whoever closes it, unless a grant keeps them in. Judged only with `then`, what the caller may
|
|
358
|
+
* do once the change has landed, so a caller that says to go ahead is let through.
|
|
355
359
|
*
|
|
356
360
|
* It looks only at the spots where access can change: the grants' patterns, the `everyone`
|
|
357
361
|
* grants', and the caller's own, from `summary()`. It does no I/O, so a board and Vercel's API run
|
|
@@ -359,18 +363,18 @@ const isUnder = (other, pattern) => other !== pattern && (pattern === "*" || pat
|
|
|
359
363
|
*/
|
|
360
364
|
function checkGrantChange(change) {
|
|
361
365
|
if (change.owner) return null;
|
|
362
|
-
const { caller, own } = change;
|
|
366
|
+
const { caller, own, then } = change;
|
|
363
367
|
const everyone = change.after.filter((grant) => grant.principals.some((principal) => principal.kind === "everyone"));
|
|
364
368
|
const lifted = Object.keys(change.revoked?.can ?? {});
|
|
365
369
|
const made = Object.keys(change.changed?.can ?? {});
|
|
370
|
+
const touched = [.../* @__PURE__ */ new Set([...lifted, ...made])];
|
|
366
371
|
const spots = [.../* @__PURE__ */ new Set([
|
|
367
|
-
...
|
|
368
|
-
...made,
|
|
372
|
+
...touched,
|
|
369
373
|
...everyone.flatMap((grant) => Object.keys(grant.can)),
|
|
370
374
|
...Object.keys(caller.summary()),
|
|
371
375
|
...Object.keys(own.summary())
|
|
372
376
|
])];
|
|
373
|
-
for (const pattern of
|
|
377
|
+
for (const pattern of touched) {
|
|
374
378
|
if (!caller.at("manage", pattern) || !own.at("manage", pattern)) return {
|
|
375
379
|
reason: "reach",
|
|
376
380
|
pattern,
|
|
@@ -382,17 +386,25 @@ function checkGrantChange(change) {
|
|
|
382
386
|
permission: "manage"
|
|
383
387
|
};
|
|
384
388
|
}
|
|
385
|
-
if (made.length
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
389
|
+
if (made.length > 0) {
|
|
390
|
+
const gives = combine(everyone.map((grant) => ({
|
|
391
|
+
level: "everyone",
|
|
392
|
+
can: grant.can,
|
|
393
|
+
source: null
|
|
394
|
+
})));
|
|
395
|
+
for (const spot of spots) for (const permission of PERMISSIONS) if (gives.at(permission, spot) && !caller.at(permission, spot)) return {
|
|
396
|
+
reason: "admission",
|
|
397
|
+
pattern: spot,
|
|
398
|
+
permission
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
if (then) {
|
|
402
|
+
for (const pattern of touched) if (!then.caller.at("manage", pattern) || !then.own.at("manage", pattern)) return {
|
|
403
|
+
reason: "lockout",
|
|
404
|
+
pattern,
|
|
405
|
+
permission: "manage"
|
|
406
|
+
};
|
|
407
|
+
}
|
|
396
408
|
return null;
|
|
397
409
|
}
|
|
398
410
|
//#endregion
|
package/dist/access.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
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-
|
|
1
|
+
import { An as Actor, Cn as PERMISSIONS, Dn as compileAccess, En as checkGrantChange, Nn as Author, On as parseCan, Pn as CAN_MAX, _n as Grant, bn as GrantShape, fn as Access, gn as FULL_ACCESS, hn as ChannelPattern, kn as union, mn as Can, pn as AccessSummary, vn as GrantChange, wn as Permission, xn as InvalidCan, yn as GrantChangeRefusal } from "./routes-B6SEA9yw.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-Z9-Khvvw.mjs";
|
|
3
3
|
//#region src/server/tokens.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* The OIDC tokens made out to this board: a request's bearer token, from Vercel (people and
|
package/dist/access.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as CAN_MAX } from "./schemas-
|
|
2
|
-
import { c as compileAccess, f as union, n as InvalidCan, o as checkGrantChange, r as PERMISSIONS, t as FULL_ACCESS, u as parseCan } from "./access-
|
|
3
|
-
import { D as grantAccess, E as explainGrants, t as DEFAULT_CAN } from "./auth-
|
|
4
|
-
import { a as resolveActor } from "./actors-
|
|
5
|
-
import { t as oidcTokens } from "./tokens-
|
|
1
|
+
import { a as CAN_MAX } from "./schemas-CUSTEFIy.mjs";
|
|
2
|
+
import { c as compileAccess, f as union, n as InvalidCan, o as checkGrantChange, r as PERMISSIONS, t as FULL_ACCESS, u as parseCan } from "./access-BbgmsAFF.mjs";
|
|
3
|
+
import { D as grantAccess, E as explainGrants, t as DEFAULT_CAN } from "./auth-DJDTfgAL.mjs";
|
|
4
|
+
import { a as resolveActor } from "./actors-CX2D22hL.mjs";
|
|
5
|
+
import { t as oidcTokens } from "./tokens-C-iK0Cku.mjs";
|
|
6
6
|
export { CAN_MAX, DEFAULT_CAN, FULL_ACCESS, InvalidCan, PERMISSIONS, checkGrantChange, compileAccess, explainGrants, grantAccess, oidcTokens, parseCan, resolveActor, union };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { r as parseProfileHeader } from "./profile-header-Cj0Cb1cf.mjs";
|
|
2
|
+
import { P as toStorable } from "./schemas-CUSTEFIy.mjs";
|
|
3
|
+
import { r as badRequest } from "./errors-DYF4hhIc.mjs";
|
|
4
|
+
import { u as parseCan } from "./access-BbgmsAFF.mjs";
|
|
4
5
|
import { t as own } from "./own-OwgPWdmh.mjs";
|
|
5
6
|
//#region src/server/actors.ts
|
|
6
7
|
/** Agents whose marks the board serves at `/avatars/<name>`, for a caller to pass as an avatar. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as unauthorized, o as forbidden, 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 { d as unauthorized, o as forbidden, r as badRequest, t as HttpError } from "./errors-DYF4hhIc.mjs";
|
|
2
|
+
import { c as compileAccess, l as decide, p as writtenCan, s as combine, t as FULL_ACCESS, u as parseCan } from "./access-BbgmsAFF.mjs";
|
|
3
3
|
//#region src/server/grants.ts
|
|
4
4
|
/**
|
|
5
5
|
* How close `principal` is to the caller, or null when it doesn't name it: `principal` for its own
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Sn as Level, Tn as WrittenCan, fn as Access, mn as Can, wn as Permission } from "./routes-B6SEA9yw.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. */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { $
|
|
2
|
-
import { l as Known, o as Granted, p as StoredGrant, t as Authenticate } from "./auth-
|
|
3
|
-
import {
|
|
1
|
+
import { $ as MessageView, A as FailTaskBody, An as Actor, At as SourceJoinBody, B as InboxEntry, Bt as SyncImportBody, C as Discovery, Ct as SchedulesQuery, E as EventsQuery, Et as SchemaBody, Fn as Labels, Ft as SyncCopiesQuery, Gt as SyncedView, H as InboxNextQuery, Ht as SyncReceiptBody, I as GrantView, It as SyncCopiesView, Jt as TaskClaim, Ln as ExternalEvent, Mn as Attachment, Mt as SourceRead, N as GrantBody, Nn as Author, Nt as SourceReadQuery, O as ExplainQuery, Ot as SchemaView, Q as Me, Qt as TasksQuery, Rt as SyncFindQuery, S as DeleteBody, Sn as Level, St as ScheduleView, T as EventsPage, U as InboxPushBody, V as InboxItem, W as InboxQuery, Wt as SyncThreadView, X as MatchView, Y as LinkedQuery, Yt as TaskNeedsBody, Z as MatchesQuery, Zt as TasksPage, _ as CreateTaskBody, _t as RevokeGrantBody, a as BlockTaskBody, an as TypingBody, d as ClaimReadyTaskBody, dt as RegisterBody, et as MessagesPage, fn as Access, g as CreateGrantsBody, h as CreateChannelBody, ht as RenewTaskBody, i as AssignTaskBody, it as PostBody, k as Explanation, kt as SourceJoin, l as CancelTaskBody, ln as UploadStartBody, lt as ReactBody, m as CompleteTaskBody, mn as Can, mt as ReleaseTaskBody, n as ActorView, nn as ThreadsPage, p as ClaimTaskBody, pt as RegistrationView, q as LabelBody, rn as ThreadsQuery, s as BoardEventView, sn as UpdateGrantBody, t as AckBody, tn as ThreadView, tt as MessagesQuery, u as ChannelView, un as UploadTicket, w as EditBody, wn as Permission, x as CreatedTasksQuery, y as CreateTasksBody, yt as ScheduleBody, z as InboxAckBody, zt as SyncFindView } from "./routes-B6SEA9yw.mjs";
|
|
2
|
+
import { l as Known, o as Granted, p as StoredGrant, t as Authenticate } from "./auth-Z9-Khvvw.mjs";
|
|
3
|
+
import { S as Mentioned, f as ProfileOption, i as ErrorOrigin, t as BoardClient } from "./client-C2T4eaXd.mjs";
|
|
4
|
+
import { m as SyncProvider } from "./provider-Dwb_9mnu.mjs";
|
|
4
5
|
import { z } from "zod";
|
|
5
6
|
//#region src/server/sandbox.d.ts
|
|
6
7
|
/** How a rule matches a value: a regular expression (RE2), or the value exactly. */
|
|
@@ -37,12 +38,21 @@ type SandboxRule = {
|
|
|
37
38
|
};
|
|
38
39
|
};
|
|
39
40
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* `
|
|
41
|
+
* What a sandbox needs to reach the board: `allow`, its network policy's hosts as `@vercel/sandbox`'s
|
|
42
|
+
* `NetworkPolicy` has them, each with its rules, and `env`, the environment `vb` in it runs with. A
|
|
43
|
+
* host `allow` doesn't name is blocked, so a caller adds its own beside the board's:
|
|
44
|
+
* `Sandbox.create({ networkPolicy: { allow: { ...allow, 'registry.npmjs.org': [] } }, env })`.
|
|
43
45
|
*/
|
|
44
46
|
type SandboxPolicy = {
|
|
45
47
|
allow: Record<string, SandboxRule[]>;
|
|
48
|
+
/**
|
|
49
|
+
* `BOARD_URL`, the board's URL, and `BOARD_TOKEN`, a placeholder: `vb` sends a credential, and the
|
|
50
|
+
* policy replaces it with the real one on the way out, so none enters the sandbox.
|
|
51
|
+
*/
|
|
52
|
+
env: {
|
|
53
|
+
BOARD_URL: string;
|
|
54
|
+
BOARD_TOKEN: string;
|
|
55
|
+
};
|
|
46
56
|
};
|
|
47
57
|
/** What `sandboxPolicy()` takes: who the agent writes as, what it may do, and the credential, all left in the policy. */
|
|
48
58
|
type SandboxPolicyOptions = {
|
|
@@ -340,13 +350,23 @@ type Protocol = {
|
|
|
340
350
|
grants: GrantView[];
|
|
341
351
|
};
|
|
342
352
|
};
|
|
343
|
-
/**
|
|
353
|
+
/**
|
|
354
|
+
* A new grant, always: the same principals again are another. Needs `manage` at each pattern its
|
|
355
|
+
* `can` names. One its caller couldn't take back is 409 `grant_lockout`, unless it says `lockMeOut`.
|
|
356
|
+
*/
|
|
344
357
|
createGrant: {
|
|
345
358
|
input: Input<typeof GrantBody>;
|
|
346
359
|
output: {
|
|
347
360
|
grant: GrantView;
|
|
348
361
|
};
|
|
349
362
|
};
|
|
363
|
+
/** Several grants in one write, all or none, in the order given: each needs what `createGrant` does, on the grants as they are, and a lockout is judged with all of them made. */
|
|
364
|
+
createGrants: {
|
|
365
|
+
input: Input<typeof CreateGrantsBody>;
|
|
366
|
+
output: {
|
|
367
|
+
grants: GrantView[];
|
|
368
|
+
};
|
|
369
|
+
};
|
|
350
370
|
/** Adds and removes principals, or replaces its `can`: needs what `checkGrantChange` says, for the grant as it was and as it'd be. 404 `grant_not_found`. */
|
|
351
371
|
updateGrant: {
|
|
352
372
|
input: Id & Input<typeof UpdateGrantBody>;
|
|
@@ -361,7 +381,7 @@ type Protocol = {
|
|
|
361
381
|
};
|
|
362
382
|
/** `revoked` is false when it was already gone. */
|
|
363
383
|
revokeGrant: {
|
|
364
|
-
input: Id
|
|
384
|
+
input: Id & Input<typeof RevokeGrantBody>;
|
|
365
385
|
output: {
|
|
366
386
|
revoked: boolean;
|
|
367
387
|
};
|
|
@@ -551,9 +571,12 @@ declare class HttpError extends Error {
|
|
|
551
571
|
readonly hint: string | undefined;
|
|
552
572
|
/** `handle` for a handle's own error on its way through: everything else is the board's. */
|
|
553
573
|
readonly origin: ErrorOrigin;
|
|
574
|
+
/** For a 429, how many seconds until it's worth sending again, when that's known: the response's `Retry-After`. */
|
|
575
|
+
readonly retryAfter: number | undefined;
|
|
554
576
|
constructor(status: number, code: string, message: string, options?: {
|
|
555
577
|
hint?: string;
|
|
556
578
|
origin?: ErrorOrigin;
|
|
579
|
+
retryAfter?: number;
|
|
557
580
|
});
|
|
558
581
|
}
|
|
559
582
|
//#endregion
|
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-BVSFSSYf.mjs";
|
|
2
2
|
export { local };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { An as
|
|
2
|
-
import { A as SyncRoot, E as ProviderEvent, _ as SyncFn, a as ProviderOptions, c as Receive, f as ResolvedTarget, i as ProviderFile, l as ReceivedEvent, m as SyncProvider, n as FileDelivery, o as ProviderPost, r as ProviderDelivery, t as FetchedLink } from "./provider-
|
|
1
|
+
import { An as Actor, In as ExternalAuthor, Mt as SourceRead, Rn as ExternalFile, kt as SourceJoin, zn as ExternalLink } from "./routes-B6SEA9yw.mjs";
|
|
2
|
+
import { A as SyncRoot, E as ProviderEvent, _ as SyncFn, a as ProviderOptions, c as Receive, f as ResolvedTarget, i as ProviderFile, l as ReceivedEvent, m as SyncProvider, n as FileDelivery, o as ProviderPost, r as ProviderDelivery, t as FetchedLink } from "./provider-Dwb_9mnu.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 = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./external-
|
|
2
|
-
import { c as SyncProvider, s as ResolvedTarget } from "./events-
|
|
1
|
+
import "./external-D2jq_DEQ.mjs";
|
|
2
|
+
import { c as SyncProvider, s as ResolvedTarget } from "./events-BdOCmnZh.mjs";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
5
5
|
import { Chat, stringifyMarkdown } from "chat";
|
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-Cm4sODIu.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-nN8WpvCe.mjs";
|
|
2
2
|
export { commands, filters, globalOptions, groups, option, options, usage };
|
package/dist/cli-embedded.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as Board } from "./backend-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { f as Board } from "./backend-CcaaS9Xl.mjs";
|
|
2
|
+
import "./index-_KxJu15n.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
|
|
@@ -64,6 +64,11 @@ export declare function commandWord(argv: string[]): string | undefined;
|
|
|
64
64
|
* (`--scope` still wins): board asks for each only when a request needs it, so help, a typo, or
|
|
65
65
|
* misuse never refreshes a login or looks a team up. With `fetch`, board's requests to Vercel's API
|
|
66
66
|
* with that login go through the app's own, which adds its credentials (a DPoP proof, say).
|
|
67
|
+
*
|
|
68
|
+
* `token` is a Vercel token someone passed the app for this run, as `vercel board --token` takes
|
|
69
|
+
* one: the login to use, in place of `login` and ahead of everything the environment holds, a
|
|
70
|
+
* deployment's own token and `BOARD_TOKEN` included. A variable never goes ahead of those. Board
|
|
71
|
+
* sends it itself, as a Bearer token, never through `fetch`, which would add the app's own login's.
|
|
67
72
|
*/
|
|
68
73
|
export declare function createApp(options: {
|
|
69
74
|
appName: string;
|
|
@@ -72,6 +77,7 @@ export declare function createApp(options: {
|
|
|
72
77
|
}) => void;
|
|
73
78
|
onWarning?: (warning: Warning) => void;
|
|
74
79
|
login?: () => Promise<string>;
|
|
80
|
+
token?: string;
|
|
75
81
|
team?: () => Promise<string | null>;
|
|
76
82
|
fetch?: typeof globalThis.fetch;
|
|
77
83
|
}): {
|
package/dist/cli-embedded.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as stoppedBy } from "./exports-
|
|
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-
|
|
1
|
+
import { a as stoppedBy } from "./exports-CuD-Mxkw.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-B016auoG.mjs";
|
|
3
3
|
//#region src/cli/embedded.ts
|
|
4
4
|
/**
|
|
5
5
|
* Board's CLI as `appName` names it in help, usage, and errors (`vercel board`). With no board
|
|
@@ -14,9 +14,14 @@ import { a as commandLine, c as failureLines, i as mainWith, l as formatFailure,
|
|
|
14
14
|
* (`--scope` still wins): board asks for each only when a request needs it, so help, a typo, or
|
|
15
15
|
* misuse never refreshes a login or looks a team up. With `fetch`, board's requests to Vercel's API
|
|
16
16
|
* with that login go through the app's own, which adds its credentials (a DPoP proof, say).
|
|
17
|
+
*
|
|
18
|
+
* `token` is a Vercel token someone passed the app for this run, as `vercel board --token` takes
|
|
19
|
+
* one: the login to use, in place of `login` and ahead of everything the environment holds, a
|
|
20
|
+
* deployment's own token and `BOARD_TOKEN` included. A variable never goes ahead of those. Board
|
|
21
|
+
* sends it itself, as a Bearer token, never through `fetch`, which would add the app's own login's.
|
|
17
22
|
*/
|
|
18
23
|
function createApp(options) {
|
|
19
|
-
const { appName, onError, onWarning, login, team, fetch } = options;
|
|
24
|
+
const { appName, onError, onWarning, login, token, team, fetch } = options;
|
|
20
25
|
return { run: (args) => main(args, {
|
|
21
26
|
name: appName,
|
|
22
27
|
commands: {},
|
|
@@ -24,6 +29,7 @@ function createApp(options) {
|
|
|
24
29
|
...onError ? { onError } : {},
|
|
25
30
|
...onWarning ? { onWarning } : {},
|
|
26
31
|
...login ? { login } : {},
|
|
32
|
+
...token ? { token } : {},
|
|
27
33
|
...team ? { team } : {},
|
|
28
34
|
...fetch ? { fetch } : {}
|
|
29
35
|
}) };
|
|
@@ -78,7 +84,7 @@ function vb(board, argv, options = {}) {
|
|
|
78
84
|
claimsOf: board,
|
|
79
85
|
write: (chunk) => void (stdout += typeof chunk === "string" ? chunk : decoder.decode(chunk, { stream: true })),
|
|
80
86
|
error: (chunk) => void (stderr += chunk),
|
|
81
|
-
readFile: options.readFile ? async (path) => options.readFile(path) : lacking("--attach and --
|
|
87
|
+
readFile: options.readFile ? async (path) => options.readFile(path) : lacking("--attach and --file can't read files", "readFile"),
|
|
82
88
|
writeFile: options.writeFile ? async (path, data) => options.writeFile(path, data) : lacking("download can't save files", "writeFile"),
|
|
83
89
|
stdin: options.stdin !== void 0 ? async () => options.stdin : lacking("- can't read stdin", "stdin"),
|
|
84
90
|
...options.signal ? { signal: options.signal } : {}
|
package/dist/cli.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as option } from "./commands-
|
|
3
|
-
import {
|
|
4
|
-
import { r as main } from "./main-
|
|
5
|
-
import { i as createInspector, r as stopped, t as allowedHosts } from "./inspect-
|
|
2
|
+
import { a as option } from "./commands-nN8WpvCe.mjs";
|
|
3
|
+
import { g as projectDir } from "./server-ViWNvg5q.mjs";
|
|
4
|
+
import { r as main } from "./main-B016auoG.mjs";
|
|
5
|
+
import { i as createInspector, r as stopped, t as allowedHosts } from "./inspect-CZeoSm7E.mjs";
|
|
6
6
|
import { appendFile, readFile } from "node:fs/promises";
|
|
7
7
|
import { join } from "node:path";
|
|
8
8
|
//#region src/cli/local.ts
|
|
@@ -37,7 +37,7 @@ const local = {
|
|
|
37
37
|
},
|
|
38
38
|
async run(args, context) {
|
|
39
39
|
if (args.length > 0) throw context.usage("inspect takes no arguments: pass its port with --port.");
|
|
40
|
-
return (await import("./inspect-
|
|
40
|
+
return (await import("./inspect-UCcPViyA.mjs")).inspect(context);
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
serve: {
|
|
@@ -81,7 +81,7 @@ const local = {
|
|
|
81
81
|
}, "tailscale");
|
|
82
82
|
if (tailscale.length > 0 && hosts.length > 0) throw usage("--tailscale takes Tailscale's word for who's calling, which another proxy in front could forge: it doesn't go with --allow-host.");
|
|
83
83
|
const root = projectDir();
|
|
84
|
-
const { serveLocal } = await import("./serve-
|
|
84
|
+
const { serveLocal } = await import("./serve-B10e7QaY.mjs");
|
|
85
85
|
const local = await serveLocal({
|
|
86
86
|
dir: flags.dir ?? join(root, ".board"),
|
|
87
87
|
hosts,
|