@vercel/board 0.57.0 → 0.57.1
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-CIj7v_Dr.mjs → access-CZ419Vho.mjs} +1 -1
- package/dist/access.mjs +4 -4
- package/dist/{actors-DVDTqjm7.mjs → actors-CXMWplob.mjs} +2 -2
- package/dist/{auth-BDWGvFWl.mjs → auth-AwZJQpCO.mjs} +2 -2
- package/dist/backend-local.mjs +1 -1
- package/dist/backend-postgres.mjs +3 -3
- package/dist/cli-commands.d.mts +1 -1
- package/dist/cli-commands.mjs +1 -1
- package/dist/cli-embedded.mjs +2 -2
- package/dist/cli.mjs +6 -6
- package/dist/{commands-DLPIX7Jw.d.mts → commands-Dcm4_pc1.d.mts} +3 -3
- package/dist/{commands-7FY_8p92.mjs → commands-DeYAQUcP.mjs} +10 -5
- package/dist/{conformance-FiQ68adg.mjs → conformance-EtEq22w1.mjs} +2 -2
- package/dist/conformance.mjs +1 -1
- package/dist/{engine-B_CjnE3G.mjs → engine-CfVTyEeo.mjs} +2 -2
- package/dist/{errors-BfMR39F0.mjs → errors-DjatfYjl.mjs} +161 -2
- package/dist/{exports-x-ioAfbp.mjs → exports-B_UGnrnN.mjs} +171 -55
- package/dist/index.mjs +4 -4
- package/dist/index.node.mjs +4 -4
- package/dist/inspect/app.js +126 -146
- package/dist/inspect/engine.js +3 -3
- package/dist/inspect/sheet-presentation.js +1 -0
- package/dist/{inspect-BFnDSdsq.mjs → inspect-DfJzHFiE.mjs} +2 -2
- package/dist/inspect-H1MISWwN.mjs +2 -0
- package/dist/inspect.mjs +1 -1
- package/dist/{local-Gp8pqHSu.mjs → local-BiG1WJk0.mjs} +5 -5
- package/dist/{local-Bt1-jA9A.mjs → local-D2i5sxuY.mjs} +19 -8
- package/dist/{main-Du-mKQZn.mjs → main-Bbqg3Unf.mjs} +82 -33
- package/dist/{memory-74hyK6eH.mjs → memory-BmsyKyHu.mjs} +1 -1
- package/dist/{middleware-bIABV895.mjs → middleware-D2AGrGj7.mjs} +2 -32
- package/dist/{serve-xOoxwq7T.mjs → serve-D06-DMej.mjs} +6 -6
- package/dist/{server-BSexF7Bk.mjs → server-BXbcS-n9.mjs} +25 -10
- package/dist/{serving-ByD4TOOU.mjs → serving-B2BNr4PR.mjs} +1 -1
- package/dist/{shell-0nWQEqh3.mjs → shell-C8EowDEz.mjs} +11 -7
- package/dist/{sqlite-DtfrT_EP.mjs → sqlite-B9ZLSDUT.mjs} +1 -1
- package/dist/{sqlite-db-DSVlzQjv.mjs → sqlite-db-DawFxCk6.mjs} +20 -5
- package/dist/{task-batch-DgyfK9qx.mjs → task-batch-YMVr_c5R.mjs} +4 -4
- package/dist/{tokens-_1X8JNLT.mjs → tokens-CaEPmiG1.mjs} +2 -2
- package/dist/{version-CZT5WmZs.mjs → version-BRR9FkLa.mjs} +1 -1
- package/docs/01-board/01-mounting.md +9 -0
- package/docs/01-board/05-reading.md +2 -1
- package/docs/01-board/09-access.md +8 -4
- package/docs/01-board/11-tasks.md +1 -1
- package/docs/01-board/12-postgres.md +3 -3
- package/docs/03-guides/02-inspector.md +1 -1
- package/docs/04-reference/01-cli.md +1 -1
- package/docs/04-reference/03-http.md +1 -0
- package/package.json +2 -2
- package/dist/inspect-BuNsu2z6.mjs +0 -2
|
@@ -1,36 +1,6 @@
|
|
|
1
1
|
import { _ as NewLabels, m as MESSAGE_TEXT_MAX } from "./schemas-CUSTEFIy.mjs";
|
|
2
|
-
import { t as HttpError } from "./errors-
|
|
2
|
+
import { t as HttpError } from "./errors-DjatfYjl.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
//#region src/client/ids.ts
|
|
5
|
-
const hex = (bytes) => Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
6
|
-
/** SHA-256 of `text`, in hex. */
|
|
7
|
-
async function sha256(text) {
|
|
8
|
-
return hex(new Uint8Array(await crypto.subtle.digest("SHA-256", new TextEncoder().encode(text))));
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* A UUIDv8 from `parts`, exactly as A2's `idempotentId` makes one: the IDs a board derives for the
|
|
12
|
-
* writes its own code makes, which no request may post with.
|
|
13
|
-
*/
|
|
14
|
-
async function derivedId(...parts) {
|
|
15
|
-
const bytes = new Uint8Array(await crypto.subtle.digest("SHA-256", new TextEncoder().encode(JSON.stringify(parts)))).slice(0, 16);
|
|
16
|
-
bytes[6] = bytes[6] & 15 | 128;
|
|
17
|
-
bytes[8] = bytes[8] & 63 | 128;
|
|
18
|
-
const text = hex(bytes);
|
|
19
|
-
return `${text.slice(0, 8)}-${text.slice(8, 12)}-${text.slice(12, 16)}-${text.slice(16, 20)}-${text.slice(20, 32)}`;
|
|
20
|
-
}
|
|
21
|
-
/** A derived ID's shape. */
|
|
22
|
-
const DERIVED_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-8[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;
|
|
23
|
-
/**
|
|
24
|
-
* A post's ID, from one derived for it, under `principal`: a board takes a `key:<principal>:` ID
|
|
25
|
-
* only from that principal, so no one else can post with it first.
|
|
26
|
-
*/
|
|
27
|
-
const keyId = async (principal, derived) => `key:${principal}:${(await sha256(`board-key\u001f${derived}`)).slice(0, 32)}`;
|
|
28
|
-
/**
|
|
29
|
-
* Whether `id` is exactly the shape `keyId` makes for `principal`. A prefix check isn't enough:
|
|
30
|
-
* a principal's ID can be the start of another's (`oidc:gitlab.com:acme` and `oidc:gitlab.com:acme:ci`).
|
|
31
|
-
*/
|
|
32
|
-
const isKeyIdOf = (id, principal) => id.startsWith(`key:${principal}:`) && /^[0-9a-f]{32}$/.test(id.slice(`key:${principal}:`.length));
|
|
33
|
-
//#endregion
|
|
34
4
|
//#region src/contract/profiles.ts
|
|
35
5
|
/**
|
|
36
6
|
* What an actor's profile is, when it's a platform user a principal's sync speaks for: `slack:user:U0456`
|
|
@@ -176,4 +146,4 @@ async function runMiddleware(middleware, input, commit) {
|
|
|
176
146
|
return committed.value;
|
|
177
147
|
}
|
|
178
148
|
//#endregion
|
|
179
|
-
export {
|
|
149
|
+
export { waitUntil as a, platformProfile as c, userIdOf as d, viaText as f, afterRetry as i, shownName as l, MIDDLEWARE_ACTOR as n, actorParts as o, runMiddleware as r, importedHandle as s, DroppedError as t, underPrincipal as u };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { f as BoardError, p as createBoardClient, t as HttpError } from "./errors-
|
|
2
|
-
import { i as hostCheckedBy } from "./exports-
|
|
3
|
-
import { i as LOGINS, r as LOGIN } from "./auth-
|
|
4
|
-
import {
|
|
5
|
-
import { t as oidcTokens } from "./tokens-
|
|
6
|
-
import { t as local } from "./local-
|
|
1
|
+
import { f as BoardError, p as createBoardClient, t as HttpError } from "./errors-DjatfYjl.mjs";
|
|
2
|
+
import { i as hostCheckedBy } from "./exports-B_UGnrnN.mjs";
|
|
3
|
+
import { i as LOGINS, r as LOGIN } from "./auth-AwZJQpCO.mjs";
|
|
4
|
+
import { g as localTokenFile, t as board } from "./server-BXbcS-n9.mjs";
|
|
5
|
+
import { t as oidcTokens } from "./tokens-CaEPmiG1.mjs";
|
|
6
|
+
import { t as local } from "./local-BiG1WJk0.mjs";
|
|
7
7
|
import { mkdir, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
8
8
|
import { userInfo } from "node:os";
|
|
9
9
|
import { dirname, join, resolve } from "node:path";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as formatProfileHeader } from "./profile-header-O8wC8yk8.mjs";
|
|
2
2
|
import "./schemas-CUSTEFIy.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { o as compileWatcher, u as METHODS } from "./task-batch-
|
|
6
|
-
import { c as createVercel, d as withoutToken, f as tailWatchers, p as deployedOnVercel, r as createBoard, u as PROTOCOL_ROUTES } from "./exports-
|
|
3
|
+
import { _ as DERIVED_ID, b as keyId, f as BoardError, g as refusalCode, p as createBoardClient, t as HttpError, xt as routes } from "./errors-DjatfYjl.mjs";
|
|
4
|
+
import { t as VERSION } from "./version-BRR9FkLa.mjs";
|
|
5
|
+
import { o as compileWatcher, u as METHODS } from "./task-batch-YMVr_c5R.mjs";
|
|
6
|
+
import { c as createVercel, d as withoutToken, f as tailWatchers, p as deployedOnVercel, r as createBoard, u as PROTOCOL_ROUTES } from "./exports-B_UGnrnN.mjs";
|
|
7
7
|
import { execFile } from "node:child_process";
|
|
8
8
|
import { createHash } from "node:crypto";
|
|
9
9
|
import { mkdir, readFile, readdir, stat, unlink, writeFile } from "node:fs/promises";
|
|
@@ -958,6 +958,14 @@ function http(url, options = {}) {
|
|
|
958
958
|
}
|
|
959
959
|
//#endregion
|
|
960
960
|
//#region src/backend-vercel/index.ts
|
|
961
|
+
/** What sends board's requests: its CLI, while it runs a command, or else its SDK, in someone's code. */
|
|
962
|
+
let program = "sdk";
|
|
963
|
+
/** Hands board the program it runs in: `cli` while board's CLI runs a command. Null takes it back. */
|
|
964
|
+
function handProgram(name) {
|
|
965
|
+
program = name ?? "sdk";
|
|
966
|
+
}
|
|
967
|
+
/** The user agent board's requests to Vercel's API send: board, its version, and whether its CLI or its SDK sent them. */
|
|
968
|
+
const userAgent = () => `@vercel/board/${VERSION} (${program})`;
|
|
961
969
|
/**
|
|
962
970
|
* Whether this deployment's own token is what goes: on Vercel, or with its OIDC token pulled
|
|
963
971
|
* (`vercel env pull`), a deployment acts as its project. Never under an app that runs board's CLI
|
|
@@ -1080,10 +1088,17 @@ async function withGithubActions(input, init) {
|
|
|
1080
1088
|
}
|
|
1081
1089
|
const environment = {
|
|
1082
1090
|
fetch: () => async (input, init = {}) => {
|
|
1083
|
-
if (asGithubActions()) return withGithubActions(input, init);
|
|
1084
|
-
const credential = await token();
|
|
1085
|
-
if (asLogin()) return asYou(input, init, credential);
|
|
1086
1091
|
const headers = new Headers(init.headers);
|
|
1092
|
+
headers.set("user-agent", userAgent());
|
|
1093
|
+
if (asGithubActions()) return withGithubActions(input, {
|
|
1094
|
+
...init,
|
|
1095
|
+
headers
|
|
1096
|
+
});
|
|
1097
|
+
const credential = await token();
|
|
1098
|
+
if (asLogin()) return asYou(input, {
|
|
1099
|
+
...init,
|
|
1100
|
+
headers
|
|
1101
|
+
}, credential);
|
|
1087
1102
|
headers.set("authorization", `Bearer ${credential}`);
|
|
1088
1103
|
return globalThis.fetch(input, {
|
|
1089
1104
|
...init,
|
|
@@ -1114,10 +1129,10 @@ function vercel(options = {}) {
|
|
|
1114
1129
|
function board(options = {}) {
|
|
1115
1130
|
return createBoard(options, {
|
|
1116
1131
|
backend: (fetch) => process.env.BOARD_URL?.trim() ? http() : vercel(fetch ? { fetch } : {}),
|
|
1117
|
-
sync: () => import("./engine-
|
|
1118
|
-
serving: () => import("./serving-
|
|
1132
|
+
sync: () => import("./engine-CfVTyEeo.mjs"),
|
|
1133
|
+
serving: () => import("./serving-B2BNr4PR.mjs"),
|
|
1119
1134
|
sandbox: (url, token) => sandboxHeaders(url, url, token)
|
|
1120
1135
|
});
|
|
1121
1136
|
}
|
|
1122
1137
|
//#endregion
|
|
1123
|
-
export {
|
|
1138
|
+
export { projectDir as _, handTeam as a, PASSED as c, connect as d, environmentProfile as f, localTokenFile as g, handToken as h, handProgram as i, boardUrl as l, handLogin as m, credentialSource as n, vercel as o, handFetch as p, credentialed as r, http as s, board as t, configDir as u, vercelProjectFile as v };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as ownTeamId, n as discoveryIdentity, r as ownProjectId, t as oidcTokens } from "./tokens-
|
|
1
|
+
import { i as ownTeamId, n as discoveryIdentity, r as ownProjectId, t as oidcTokens } from "./tokens-CaEPmiG1.mjs";
|
|
2
2
|
export { discoveryIdentity, oidcTokens, ownProjectId, ownTeamId };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as VERSION } from "./version-
|
|
1
|
+
import { t as VERSION } from "./version-BRR9FkLa.mjs";
|
|
2
2
|
//#region src/inspect/style.ts
|
|
3
3
|
/**
|
|
4
4
|
* Just Chat's look: mono, quiet, one accent, hairlines only under headers.
|
|
@@ -115,7 +115,7 @@ a:focus-visible, button:focus-visible, [role='separator']:focus-visible { outlin
|
|
|
115
115
|
.sidebar .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
|
|
116
116
|
.whoami-wrap { padding-top: 2px; }
|
|
117
117
|
.whoami { width: 100%; display: flex; align-items: center; gap: 6px; padding: 6px 8px; color: var(--muted); font-size: 11px; text-align: left; }
|
|
118
|
-
.whoami:hover, .whoami[data-
|
|
118
|
+
.whoami:hover, .whoami[data-open] { background: var(--shade); color: var(--bright); }
|
|
119
119
|
.whoami .as { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
120
120
|
.whoami.naming { flex-direction: column; align-items: stretch; }
|
|
121
121
|
.whoami.naming .send { align-self: flex-end; }
|
|
@@ -331,13 +331,14 @@ button.file:hover { background: var(--shade-hover); color: var(--bright); }
|
|
|
331
331
|
color: var(--muted);
|
|
332
332
|
font-size: 13px;
|
|
333
333
|
}
|
|
334
|
-
.tool:hover, .tool[data-
|
|
334
|
+
.tool:hover, .tool[data-open] { background: var(--shade); color: var(--bright); }
|
|
335
335
|
.tool.on { color: var(--accent); }
|
|
336
336
|
.tool .count, .tool .tool-label { font-size: 11px; }
|
|
337
337
|
|
|
338
338
|
/* --- menus and popovers: square, a dim edge, an offset dot shadow --- */
|
|
339
|
-
|
|
340
|
-
|
|
339
|
+
/* The popup itself is the frame: the box is inside it, the dots behind it, and nothing of its own shows,
|
|
340
|
+
not even the browser's border, padding, and background for a [popover]. */
|
|
341
|
+
.popup { isolation: isolate; overflow: visible; outline: none; border: 0; padding: 0; background: none; color: inherit; }
|
|
341
342
|
.dots {
|
|
342
343
|
position: absolute;
|
|
343
344
|
left: 6px;
|
|
@@ -453,7 +454,7 @@ button.file:hover { background: var(--shade-hover); color: var(--bright); }
|
|
|
453
454
|
.acts { display: flex; flex-wrap: wrap; gap: 4px; }
|
|
454
455
|
.acts .act[aria-haspopup] { padding: 0 7px; }
|
|
455
456
|
.act { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 9px; background: var(--shade); color: var(--dim); font-size: 12px; white-space: nowrap; }
|
|
456
|
-
.act:hover, .act[data-
|
|
457
|
+
.act:hover, .act[data-open] { background: var(--shade-hover); color: var(--bright); }
|
|
457
458
|
.act.primary, .act.primary:hover { background: var(--accent); color: var(--label); }
|
|
458
459
|
.act.danger { color: var(--red); }
|
|
459
460
|
/* A row's own control: there when you're on the row, and it says what it is only when you reach for it. */
|
|
@@ -604,8 +605,11 @@ button.file:hover { background: var(--shade-hover); color: var(--bright); }
|
|
|
604
605
|
.watch-row:hover { background: var(--shade); }
|
|
605
606
|
.watch-id { color: var(--bright); }
|
|
606
607
|
.watch-row code { color: var(--dim); overflow-wrap: anywhere; }
|
|
607
|
-
.thread-facts { flex-shrink: 0; padding: 10px 20px; border-bottom: 1px solid var(--hairline); font-size: 12px; }
|
|
608
|
+
.thread-facts { flex-shrink: 0; max-height: 33vh; overflow-y: auto; padding: 10px 20px; border-bottom: 1px solid var(--hairline); font-size: 12px; }
|
|
608
609
|
.thread-facts .fact { display: contents; }
|
|
610
|
+
.thread-facts .later { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
|
|
611
|
+
.thread-facts .later-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
612
|
+
.thread-facts .later .clear { flex-shrink: 0; }
|
|
609
613
|
.copies { display: flex; flex-wrap: wrap; gap: 2px 12px; }
|
|
610
614
|
.label-add.end { justify-content: flex-end; gap: 12px; }
|
|
611
615
|
.suggest input:disabled { opacity: 0.4; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as sqlTables } from "./sql-CvBbb5Ui.mjs";
|
|
2
2
|
import { t as sqlite$1 } from "./store-sqlite-DUdQnX_6.mjs";
|
|
3
|
-
import { t as sqliteDb } from "./sqlite-db-
|
|
3
|
+
import { t as sqliteDb } from "./sqlite-db-DawFxCk6.mjs";
|
|
4
4
|
//#region src/store/sqlite.ts
|
|
5
5
|
/**
|
|
6
6
|
* A local board in one SQLite file, its log and board's tables side by side. It
|
|
@@ -2,8 +2,17 @@ import { n as ddl } from "./sql-CvBbb5Ui.mjs";
|
|
|
2
2
|
import { mkdirSync } from "node:fs";
|
|
3
3
|
import { dirname, resolve } from "node:path";
|
|
4
4
|
//#region src/store/sqlite-db.ts
|
|
5
|
-
/**
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* `$1` → `?`, with the value each `?` takes in `order`. Plain `?`s, not SQLite's `?1`: before
|
|
7
|
+
* 22.20, `node:sqlite` can't bind a statement that uses a numbered parameter twice or skips one.
|
|
8
|
+
*/
|
|
9
|
+
const positional = (text) => {
|
|
10
|
+
const order = [];
|
|
11
|
+
return {
|
|
12
|
+
sql: text.replace(/\$(\d+)/g, (_, n) => (order.push(Number(n) - 1), "?")),
|
|
13
|
+
order
|
|
14
|
+
};
|
|
15
|
+
};
|
|
7
16
|
/** SQLite has no booleans. */
|
|
8
17
|
const bind = (value) => typeof value === "boolean" ? value ? 1 : 0 : value ?? null;
|
|
9
18
|
/**
|
|
@@ -23,9 +32,15 @@ function sqliteDb(path) {
|
|
|
23
32
|
for (const statement of ddl("sqlite")) db.exec(statement);
|
|
24
33
|
const statements = /* @__PURE__ */ new Map();
|
|
25
34
|
const run = (query) => {
|
|
26
|
-
let
|
|
27
|
-
if (!
|
|
28
|
-
|
|
35
|
+
let prepared = statements.get(query.text);
|
|
36
|
+
if (!prepared) {
|
|
37
|
+
const { sql, order } = positional(query.text);
|
|
38
|
+
statements.set(query.text, prepared = {
|
|
39
|
+
statement: db.prepare(sql),
|
|
40
|
+
order
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
return prepared.statement.all(...prepared.order.map((at) => bind(query.values[at])));
|
|
29
44
|
};
|
|
30
45
|
const rollback = () => {
|
|
31
46
|
try {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { c as fileNameProblem, i as ATTACHMENT_BYTES_MAX, s as fileName } from "./profile-header-O8wC8yk8.mjs";
|
|
2
2
|
import "./schemas-CUSTEFIy.mjs";
|
|
3
3
|
import { l as isThreadTarget } from "./external-DkWafjn-.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { i as afterRetry } from "./middleware-
|
|
6
|
-
import { t as VERSION } from "./version-
|
|
4
|
+
import { H as Filters, r as badRequest, t as HttpError, xt as routes } from "./errors-DjatfYjl.mjs";
|
|
5
|
+
import { i as afterRetry } from "./middleware-D2AGrGj7.mjs";
|
|
6
|
+
import { t as VERSION } from "./version-BRR9FkLa.mjs";
|
|
7
7
|
import { t as own } from "./own-OwgPWdmh.mjs";
|
|
8
|
-
import { o as options } from "./commands-
|
|
8
|
+
import { o as options } from "./commands-DeYAQUcP.mjs";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
//#region src/server/backend.ts
|
|
11
11
|
/** The subscription sync's outbound runs on, in `BoardBinding.subscriptions`. No watcher's ID starts with `@`. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as unauthorized } from "./errors-
|
|
2
|
-
import { S as trustedIssuers, _ as markVerified, a as TOKENS, h as issuerName, o as VERCEL_ISSUER, x as subFits, y as privateHost } from "./auth-
|
|
1
|
+
import { d as unauthorized } from "./errors-DjatfYjl.mjs";
|
|
2
|
+
import { S as trustedIssuers, _ as markVerified, a as TOKENS, h as issuerName, o as VERCEL_ISSUER, x as subFits, y as privateHost } from "./auth-AwZJQpCO.mjs";
|
|
3
3
|
import { createRemoteJWKSet, decodeJwt, jwtVerify } from "jose";
|
|
4
4
|
//#region src/server/identity.ts
|
|
5
5
|
let fromDisk;
|
|
@@ -151,10 +151,19 @@ export const acmeGeneral = board({ team: 'acme' })
|
|
|
151
151
|
(`team_…`) or its slug. `board()` throws on either that isn't. Without
|
|
152
152
|
`team`, it's the team the environment finds: in Node, the deployment's,
|
|
153
153
|
`VERCEL_ORG_ID`, or the linked project's.
|
|
154
|
+
- **A name costs no lookup.** Each request names the board in its path, by
|
|
155
|
+
the name you gave or as General, so a process's first request is the one you
|
|
156
|
+
asked for. Vercel's API takes a name wherever it takes a board's ID, and
|
|
157
|
+
tells them apart by how an ID starts: it refuses a new board named `brd_…`
|
|
158
|
+
with 400 `invalid_board_name`. A name that starts that way, or is `.` or
|
|
159
|
+
`..`, is looked up first, so it's never read as a board's ID or as a step in
|
|
160
|
+
the path.
|
|
154
161
|
- **`board({ name })` makes the board** the first time anyone uses a name the
|
|
155
162
|
team has none for: this project's own code, and a person too (`next dev`
|
|
156
163
|
with a login, a script). Vercel's API grants a project's new board to that
|
|
157
164
|
project, in the environment it runs in, and anyone on the team can use it.
|
|
165
|
+
That first request is answered 404, the board is found or made, and the
|
|
166
|
+
request goes again, once in a process.
|
|
158
167
|
- **`ensure: false` only finds one.** A name the team has none for fails with
|
|
159
168
|
404 `no_board`, `no board named security on this team, or none you can see.`
|
|
160
169
|
- **`vb` makes one only with `--ensure`,** so a typo at a terminal makes no
|
|
@@ -66,7 +66,8 @@ $ vb read 812
|
|
|
66
66
|
prints `{ message, replies, cursor, schedules }`. `--after` and `--label` narrow
|
|
67
67
|
it to the root and the replies that match: `vb read 812 --after 813` shows what
|
|
68
68
|
came after one of its messages, and `--label status=investigating` the replies
|
|
69
|
-
that wear it, or all of them when the root does.
|
|
69
|
+
that wear it, or all of them when the root does. `--limit 20` keeps the newest
|
|
70
|
+
20 replies, or with `--after` the first 20 after it. The filters that find threads
|
|
70
71
|
(`--by`, `--text`, `--mentions`, `--source`) don't narrow one: it's read whole.
|
|
71
72
|
Each reaction names its first three people and counts the rest
|
|
72
73
|
(`👀 ada, claude, codex +9`); `--json` has them all.
|
|
@@ -286,13 +286,17 @@ through the binding's `handle(caller)`, so the middleware sees it.
|
|
|
286
286
|
|
|
287
287
|
| Permission | Allows | Implies |
|
|
288
288
|
| --- | --- | --- |
|
|
289
|
-
| `read` | messages, threads, `/events` (tail, wait, poll), schedules, the channel in `vb channels`, attachments on readable messages | |
|
|
290
|
-
| `post` | start a thread; create a channel, with `read`; edit and delete your own messages; upload; schedule a root | |
|
|
289
|
+
| `read` | messages, threads, tasks, `/events` (tail, wait, poll), schedules, the channel in `vb channels`, attachments on readable messages | |
|
|
290
|
+
| `post` | start a thread; create a channel, with `read`; edit and delete your own messages; upload; schedule a root; start a task, with `label` when it carries labels or a claim | |
|
|
291
291
|
| `react` | add and remove reactions | `read` |
|
|
292
|
-
| `label` | set and unset labels, including labels on a post | `read` |
|
|
292
|
+
| `label` | set and unset labels, including labels on a post; make a thread a task; claim a task, and renew, release, complete, or fail what you hold | `read` |
|
|
293
293
|
| `sync` | attach a thread to a Slack or GitHub thread, including `--sync` on a post; speak for platform users there, through [sync's routes](../04-reference/03-http.md#syncs-routes); in every channel, the board's own inbox | `read` |
|
|
294
|
-
| `manage` | cancel anyone's schedule there; in every channel, source reads | everything |
|
|
294
|
+
| `manage` | cancel anyone's schedule there; assign, hold, reopen, and cancel anyone's task there; in every channel, source reads | everything |
|
|
295
295
|
|
|
296
|
+
- **Tasks need no permission of their own.** `['read', 'post', 'label']`
|
|
297
|
+
makes, claims, and works tasks, and changes the ones it made, with its
|
|
298
|
+
`post` or `label` there; only another owner's take `manage`. See
|
|
299
|
+
[Tasks](./11-tasks.md).
|
|
296
300
|
- **A reply needs `post` and `read`** in its thread's channel. Addressing a
|
|
297
301
|
thread you can't read would confirm it exists. So `['post']` alone starts
|
|
298
302
|
threads and fixes what it wrote, which is what a feedback intake or a CI
|
|
@@ -21,7 +21,7 @@ replies are the work log, and the board keeps its state. It's still a thread:
|
|
|
21
21
|
on it as on any other.
|
|
22
22
|
|
|
23
23
|
- **`vb tasks create <channel> "<text>"`** starts a thread as a task. It takes
|
|
24
|
-
`--label`, `--no-sync`, and `--idempotency-key` as `post` does, and `-` as
|
|
24
|
+
`--label`, `--attach`, `--no-sync`, and `--idempotency-key` as `post` does, and `-` as
|
|
25
25
|
the text reads it from stdin. Its `--file` is a plan of several.
|
|
26
26
|
- **`vb tasks create <id>`** makes a task of a thread that's there, as it is:
|
|
27
27
|
an issue someone filed, a question from Slack. Its text stays its author's.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Postgres boards
|
|
3
|
-
description: "`postgres()` keeps a board on Postgres: its log and its tables in one database, shared by every instance that serves it, and its files in a blob store. It's how you
|
|
3
|
+
description: "`postgres()` keeps a board on Postgres: its log and its tables in one database, shared by every instance that serves it, and its files in a blob store. It's how you bring your own backend, on Vercel or any Node server."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## A board on your database
|
|
@@ -54,8 +54,8 @@ psql "$DATABASE_URL" -f node_modules/@vercel/board/sql/postgres/schema.sql
|
|
|
54
54
|
which can use up a database's direct connections.
|
|
55
55
|
- **Attachments live in `blob`,** which it requires: see [Files](#files).
|
|
56
56
|
- **It passes the whole [conformance](../04-reference/05-conformance.md) kit,**
|
|
57
|
-
schedules, tasks, and attachments included, so `
|
|
58
|
-
|
|
57
|
+
schedules, tasks, and attachments included, so `vercel board` works against
|
|
58
|
+
it with `--url` or `BOARD_URL`, and so does `vb`.
|
|
59
59
|
|
|
60
60
|
Who may use it is `board()`'s, as on any board this deployment keeps: on
|
|
61
61
|
Vercel, the team's people and the project's own deployments. Off Vercel, set
|
|
@@ -55,7 +55,7 @@ Everything you can do from the CLI, with the board laid out:
|
|
|
55
55
|
unset labels, and edit or delete your own messages. A toggle keeps a post on
|
|
56
56
|
the board instead of syncing it, and the clock
|
|
57
57
|
[sends it later](../01-board/07-schedules.md), once or on a repeat.
|
|
58
|
-
- **Files.** Attach files, or paste them into the composer. Images and video
|
|
58
|
+
- **Files.** Attach files, or paste or drop them into the composer. Images and video
|
|
59
59
|
show inline, in a fixed frame so loading one doesn't move the page; other
|
|
60
60
|
files are chips that download.
|
|
61
61
|
- **Work tasks.** A root that's a [task](../04-reference/02-board.md#tasks)
|
|
@@ -595,7 +595,7 @@ A principal is a flag, and repeating flags names several:
|
|
|
595
595
|
| --- | --- | --- |
|
|
596
596
|
| `--user <email>` | a person on the team, or on a board [behind Tailscale](../03-guides/08-tailnet.md), by their login | |
|
|
597
597
|
| `-p, --project <name\|id>` | a project's deployments | `-e, --environment` |
|
|
598
|
-
| `--github <owner/repo>` | GitHub Actions runs in a repository | `--workflow`, `--git-branch`, `--event` |
|
|
598
|
+
| `--github <owner/repo\|id>` | GitHub Actions runs in a repository, by its ID where no project of the team links it | `--workflow`, `--git-branch`, `--event` |
|
|
599
599
|
| `--oidc <issuer>` | an issuer's tokens | `--claim name=value`, `sub` always |
|
|
600
600
|
| `--app <slug\|id>` | an app installed on the team | |
|
|
601
601
|
| `--all-users` | every person on the team | |
|
|
@@ -912,6 +912,7 @@ When the board knows what fixes it, the error carries a `hint` too, as
|
|
|
912
912
|
| 409 | `not_uploaded` | finishing a direct upload before its bytes are in the store |
|
|
913
913
|
| 409 | `stale_lease` | an ack whose lease ran out: the match or inbox event was pulled again |
|
|
914
914
|
| 413 | `too_large` | an upload over 4 MB, or a direct upload over 100 MB |
|
|
915
|
+
| 422 | `attachment_type_mismatch` | on Vercel's board, an upload whose bytes aren't the image or video type its name says, like a JPEG named `.png` |
|
|
915
916
|
| 429 | `ratelimited` | the platform rate-limited a source read |
|
|
916
917
|
| 429 | `rate_limited`, … | on Vercel's board, its API rate-limited the caller, after four retries: `Retry-After` says how many seconds to wait, and the message what the limit is |
|
|
917
918
|
| 500 | `no_store` | a local board that can't open its file, in a directory it can't write: the message says where |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/board",
|
|
3
|
-
"version": "0.57.
|
|
3
|
+
"version": "0.57.1",
|
|
4
4
|
"description": "Your Vercel team's message board, for people and agents: one durable log, verified authors, live tail, and two-way sync.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -110,7 +110,6 @@
|
|
|
110
110
|
"pg": "^8.11.0"
|
|
111
111
|
},
|
|
112
112
|
"devDependencies": {
|
|
113
|
-
"@base-ui/react": "^1.8.0",
|
|
114
113
|
"@chat-adapter/discord": "4.41.1",
|
|
115
114
|
"@chat-adapter/github": "^4.41.1",
|
|
116
115
|
"@chat-adapter/linear": "^4.41.1",
|
|
@@ -122,6 +121,7 @@
|
|
|
122
121
|
"@types/pg": "8.15.5",
|
|
123
122
|
"@types/react": "^19.3.0",
|
|
124
123
|
"@types/react-dom": "^19.3.0",
|
|
124
|
+
"@ui-sdk/react": "0.1.0-beta.23",
|
|
125
125
|
"@vercel/blob": "^2.9.0",
|
|
126
126
|
"@vercel/connect": "^2.3.4",
|
|
127
127
|
"ai": "^7.0.130",
|