@vercel/board 0.45.1 → 0.47.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-3udXjJAg.mjs → access-C06pIr0M.mjs} +2 -2
- package/dist/access.d.mts +2 -2
- package/dist/access.mjs +5 -5
- package/dist/{actors-DasGZnfb.mjs → actors-Dkyg-oo0.mjs} +3 -3
- package/dist/{auth-aiOVE82-.mjs → auth-B9-wXQ-x.mjs} +29 -9
- package/dist/{auth-BG_whr9_.d.mts → auth-li3lKwJG.d.mts} +1 -1
- package/dist/{backend-D6yTo8Un.d.mts → backend-i_esjwUS.d.mts} +144 -5
- package/dist/backend-local.d.mts +1 -1
- package/dist/backend-local.mjs +1 -1
- package/dist/{chat-provider-V2jnjVLq.d.mts → chat-provider-BWBGZOZY.d.mts} +4 -2
- package/dist/{chat-provider-BvNqOQFL.mjs → chat-provider-CD7jskh7.mjs} +7 -4
- package/dist/cli-commands.d.mts +1 -1
- package/dist/cli-commands.mjs +1 -1
- package/dist/cli-embedded.d.mts +2 -2
- package/dist/cli-embedded.mjs +3 -2
- package/dist/cli.mjs +46 -15
- package/dist/{commands-DewS14_P.d.mts → commands-CJsOA-hf.d.mts} +60 -0
- package/dist/{commands-CqdnjUkm.mjs → commands-Dk6_cHLS.mjs} +325 -0
- package/dist/{conformance-BInS4_6b.mjs → conformance-CDP8y2Zm.mjs} +1063 -6
- package/dist/conformance.d.mts +6 -5
- package/dist/conformance.mjs +1 -1
- package/dist/{engine-XVBt02Bl.mjs → engine-j2VeNuKG.mjs} +51 -50
- package/dist/{errors-ZazTZh-s.mjs → errors-QhkdzI-o.mjs} +176 -9
- package/dist/{events-D17RndlV.mjs → events-MOcxGpOQ.mjs} +2 -2
- package/dist/{exports-DCxecX15.mjs → exports-CEqS-IPP.mjs} +1417 -84
- package/dist/exports-CF9rKCXd.d.mts +44 -0
- package/dist/{external-DfhN7lKK.mjs → external-BuVTXT1R.mjs} +7 -3
- package/dist/{index-Djmr4GzQ.d.mts → index-ttfx1TZ6.d.mts} +2 -2
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +5 -5
- package/dist/index.node.d.mts +7 -6
- package/dist/index.node.mjs +5 -4
- package/dist/inspect/app.js +215 -115
- package/dist/inspect/engine.js +5 -5
- package/dist/inspect-8YAhl_h3.mjs +2 -0
- package/dist/{inspect-CHsgnf_5.mjs → inspect-vOSrW_g6.mjs} +322 -50
- package/dist/{local-DE9vmanM.mjs → local-0ajWOVhN.mjs} +1673 -98
- package/dist/{main-CF1Me3jg.mjs → main-B8Zkd4Pm.mjs} +1282 -58
- package/dist/{memory-DyEL0fvN.mjs → memory-CMm-Fk_A.mjs} +2 -2
- package/dist/{mentions-DfZGp3B-.mjs → mentions-CnWt9Z5b.mjs} +34 -1
- package/dist/{middleware-BHHKHA9q.mjs → middleware-CT6vMNUc.mjs} +2 -2
- package/dist/{provider-BC9mPYVh.d.mts → provider-Bc3xI90K.d.mts} +199 -6
- package/dist/{routes-CkUetTO2.mjs → routes-ABXf3CKq.mjs} +261 -8
- package/dist/{routes-zm4TXKCC.d.mts → routes-CjA6Mp4D.d.mts} +610 -6
- package/dist/{schemas-BhZaystC.mjs → schemas-7VFdomFB.mjs} +34 -1
- package/dist/serve-BepKXDH3.mjs +285 -0
- package/dist/{server-Bmz0zqYM.mjs → server-4rQL3xuH.mjs} +41 -22
- package/dist/{serving-BLVRrJ7P.mjs → serving-BNdiReQT.mjs} +1 -1
- package/dist/{sql-CyVcjw8x.mjs → sql-IEbO5vXs.mjs} +174 -9
- package/dist/{sqlite-Con-8duk.mjs → sqlite-CVG8XKHm.mjs} +2 -2
- package/dist/{sqlite-db-BdzxtUOV.mjs → sqlite-db-BJjPQYx4.mjs} +1 -1
- package/dist/sync-chat-sdk.d.mts +16 -2
- package/dist/sync-chat-sdk.mjs +2 -2
- package/dist/sync-github.d.mts +16 -2
- package/dist/sync-github.mjs +3 -3
- package/dist/sync-linear.d.mts +17 -3
- package/dist/sync-linear.mjs +2 -2
- package/dist/sync-slack.d.mts +17 -3
- package/dist/sync-slack.mjs +107 -15
- package/dist/sync.d.mts +2 -2
- package/dist/sync.mjs +2 -2
- package/dist/{origin-BbwhnKrg.mjs → task-batch-BZXm6kOE.mjs} +83 -8
- package/dist/{tokens-BErYXuHZ.mjs → tokens-BCp4EWTQ.mjs} +2 -2
- package/docs/01-board/01-mounting.md +8 -5
- package/docs/01-board/03-identity.md +43 -23
- package/docs/01-board/04-messages.md +3 -2
- package/docs/01-board/06-watchers.md +3 -3
- package/docs/01-board/07-schedules.md +2 -2
- package/docs/01-board/08-middleware.md +7 -0
- package/docs/01-board/09-access.md +6 -4
- package/docs/01-board/10-local.md +4 -1
- package/docs/01-board/11-tasks.md +348 -0
- package/docs/02-sync/01-overview.md +4 -5
- package/docs/02-sync/02-functions.md +2 -2
- package/docs/02-sync/03-slack.md +8 -5
- package/docs/02-sync/06-providers.md +8 -0
- package/docs/03-guides/02-inspector.md +83 -10
- package/docs/03-guides/06-sandboxed-agents.md +7 -5
- package/docs/03-guides/07-build-a-ui.md +210 -0
- package/docs/03-guides/08-tailnet.md +123 -0
- package/docs/04-reference/01-cli.md +272 -23
- package/docs/04-reference/02-board.md +287 -7
- package/docs/04-reference/03-http.md +208 -13
- package/docs/04-reference/05-conformance.md +10 -7
- package/package.json +1 -1
- package/dist/exports-Gspe1eEq.d.mts +0 -4
- package/dist/inspect-C8U3A4jQ.mjs +0 -2
- package/dist/serve-CEMvl0EH.mjs +0 -181
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./schemas-
|
|
3
|
-
import { l as isThreadTarget } from "./external-
|
|
4
|
-
import {
|
|
5
|
-
import { i as afterRetry } from "./middleware-
|
|
6
|
-
import { o as options } from "./commands-
|
|
1
|
+
import { r as badRequest, t as HttpError, y as ATTACHMENT_BYTES_MAX } from "./errors-QhkdzI-o.mjs";
|
|
2
|
+
import "./schemas-7VFdomFB.mjs";
|
|
3
|
+
import { l as isThreadTarget } from "./external-BuVTXT1R.mjs";
|
|
4
|
+
import { Y as routes, _ as Filters } from "./routes-ABXf3CKq.mjs";
|
|
5
|
+
import { i as afterRetry } from "./middleware-CT6vMNUc.mjs";
|
|
6
|
+
import { o as options } from "./commands-Dk6_cHLS.mjs";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/version.ts
|
|
10
|
-
const VERSION = "0.
|
|
10
|
+
const VERSION = "0.47.0";
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/server/backend.ts
|
|
13
13
|
/** The subscription sync's outbound runs on, in `BoardBinding.subscriptions`. No watcher's ID starts with `@`. */
|
|
@@ -40,6 +40,22 @@ const METHODS = [
|
|
|
40
40
|
"schedule",
|
|
41
41
|
"schedules",
|
|
42
42
|
"cancelSchedule",
|
|
43
|
+
"tasks",
|
|
44
|
+
"createTask",
|
|
45
|
+
"createTasks",
|
|
46
|
+
"createdTasks",
|
|
47
|
+
"claimReadyTask",
|
|
48
|
+
"claimTask",
|
|
49
|
+
"renewTask",
|
|
50
|
+
"releaseTask",
|
|
51
|
+
"completeTask",
|
|
52
|
+
"failTask",
|
|
53
|
+
"blockTask",
|
|
54
|
+
"unblockTask",
|
|
55
|
+
"reopenTask",
|
|
56
|
+
"assignTask",
|
|
57
|
+
"setTaskNeeds",
|
|
58
|
+
"cancelTask",
|
|
43
59
|
"grants",
|
|
44
60
|
"createGrant",
|
|
45
61
|
"updateGrant",
|
|
@@ -72,6 +88,7 @@ const METHODS = [
|
|
|
72
88
|
"synced",
|
|
73
89
|
"linked"
|
|
74
90
|
];
|
|
91
|
+
METHODS.filter((name) => name === "tasks" || name.includes("Task"));
|
|
75
92
|
const escape = (literal) => literal.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
76
93
|
function compile(method, path, target, own) {
|
|
77
94
|
const parts = path.split("/").filter(Boolean);
|
|
@@ -425,4 +442,62 @@ const syncTarget = (target) => typeof target === "string" ? {
|
|
|
425
442
|
*/
|
|
426
443
|
const SYNC_ACTOR = "board:sync";
|
|
427
444
|
//#endregion
|
|
428
|
-
|
|
445
|
+
//#region src/contract/task-batch.ts
|
|
446
|
+
/**
|
|
447
|
+
* For each task of a batch, the batch's tasks it waits for, by their place in it, and an order to
|
|
448
|
+
* make them in: every task after the ones it waits for, and as the batch has them otherwise. A
|
|
449
|
+
* `problem` instead when two tasks have one `key`, a task waits for a `key` no task has or for
|
|
450
|
+
* itself, or tasks wait for each other: such a batch can't be made.
|
|
451
|
+
*/
|
|
452
|
+
function batchPlan(tasks) {
|
|
453
|
+
const named = /* @__PURE__ */ new Map();
|
|
454
|
+
for (const [at, task] of tasks.entries()) {
|
|
455
|
+
if (task.key === void 0) continue;
|
|
456
|
+
if (named.has(task.key)) return { problem: `two tasks of the batch have the key ${JSON.stringify(task.key)}` };
|
|
457
|
+
named.set(task.key, at);
|
|
458
|
+
}
|
|
459
|
+
const inside = [];
|
|
460
|
+
for (const [at, task] of tasks.entries()) {
|
|
461
|
+
const waits = /* @__PURE__ */ new Set();
|
|
462
|
+
for (const need of task.needs ?? []) {
|
|
463
|
+
if (typeof need === "string") continue;
|
|
464
|
+
const found = named.get(need.key);
|
|
465
|
+
if (found === void 0) return { problem: `no task of the batch has the key ${JSON.stringify(need.key)}` };
|
|
466
|
+
if (found === at) return { problem: `the task with the key ${JSON.stringify(need.key)} waits for itself` };
|
|
467
|
+
waits.add(found);
|
|
468
|
+
}
|
|
469
|
+
inside.push([...waits]);
|
|
470
|
+
}
|
|
471
|
+
const order = [];
|
|
472
|
+
const state = new Uint8Array(tasks.length);
|
|
473
|
+
for (let start = 0; start < tasks.length; start++) {
|
|
474
|
+
if (state[start] !== 0) continue;
|
|
475
|
+
const path = [{
|
|
476
|
+
at: start,
|
|
477
|
+
next: 0
|
|
478
|
+
}];
|
|
479
|
+
state[start] = 1;
|
|
480
|
+
while (path.length > 0) {
|
|
481
|
+
const top = path.at(-1);
|
|
482
|
+
const need = inside[top.at][top.next++];
|
|
483
|
+
if (need === void 0) {
|
|
484
|
+
state[top.at] = 2;
|
|
485
|
+
order.push(top.at);
|
|
486
|
+
path.pop();
|
|
487
|
+
} else if (state[need] === 1) return { problem: `the tasks with the keys ${path.slice(path.findIndex((step) => step.at === need)).map((step) => JSON.stringify(tasks[step.at].key)).join(", ")} wait for each other` };
|
|
488
|
+
else if (state[need] === 0) {
|
|
489
|
+
state[need] = 1;
|
|
490
|
+
path.push({
|
|
491
|
+
at: need,
|
|
492
|
+
next: 0
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
return {
|
|
498
|
+
inside,
|
|
499
|
+
order
|
|
500
|
+
};
|
|
501
|
+
}
|
|
502
|
+
//#endregion
|
|
503
|
+
export { runMatch as a, withMentions as c, openapi as d, queryObject as f, VERSION as g, SYNC as h, canonicalWatchers as i, METHODS as l, readJson as m, SYNC_ACTOR as n, compileWatcher as o, readCapped as p, syncTarget as r, hasCriteria as s, batchPlan as t, createRouter as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { d as unauthorized } from "./errors-QhkdzI-o.mjs";
|
|
2
|
+
import { _ as markVerified, a as TOKENS, h as issuerName, o as VERCEL_ISSUER, x as trustedIssuers, y as privateHost } from "./auth-B9-wXQ-x.mjs";
|
|
3
3
|
import { createRemoteJWKSet, decodeJwt, jwtVerify } from "jose";
|
|
4
4
|
//#region src/server/identity.ts
|
|
5
5
|
let fromDisk;
|
|
@@ -52,7 +52,7 @@ on any backend, and the backend stores. SSE, [the handle](#the-handle),
|
|
|
52
52
|
`board()` with no backend keeps nothing here:
|
|
53
53
|
|
|
54
54
|
- **Vercel's API keeps the board:** messages, threads, reactions, labels, a
|
|
55
|
-
channel's changes, schedules, and files, up to 100 MB each as a
|
|
55
|
+
channel's changes, schedules, tasks, and files, up to 100 MB each as a
|
|
56
56
|
[direct upload](../04-reference/03-http.md#direct-uploads).
|
|
57
57
|
- **Its watchers run here.** Vercel's API matches each event against their
|
|
58
58
|
tails and wakes this route when one matches: see
|
|
@@ -62,8 +62,10 @@ on any backend, and the backend stores. SSE, [the handle](#the-handle),
|
|
|
62
62
|
Vercel's API keeps sync's records: see [Sync](../02-sync/01-overview.md).
|
|
63
63
|
- **It acts as this deployment, or as you.** In a Vercel deployment it sends
|
|
64
64
|
the deployment's OIDC token and writes as its project,
|
|
65
|
-
`vercel:project:prj_x:production`.
|
|
66
|
-
your Vercel CLI login
|
|
65
|
+
`vercel:project:prj_x:production`. Nothing replaces that token there. Elsewhere it
|
|
66
|
+
sends `BOARD_TOKEN`, or else your Vercel CLI login (`VERCEL_AUTH_TOKEN`, or
|
|
67
|
+
`vercel login`'s), and writes as whoever that is. It never sends
|
|
68
|
+
`VERCEL_TOKEN`, which people set for other reasons. `fetch` sends other credentials.
|
|
67
69
|
- **Only a deployment's own credentials register watchers.** Anyone else's
|
|
68
70
|
(yours, an app's) answer 403 `watchers_need_project`, and
|
|
69
71
|
a board run with them runs its config's watchers in this process: see
|
|
@@ -86,7 +88,7 @@ backend:
|
|
|
86
88
|
| Option | What it does |
|
|
87
89
|
| --- | --- |
|
|
88
90
|
| `backend` | `local()`, or your own. Default: your team's board in Vercel's API, the one `name` names, or in Node with `BOARD_URL` set, the board there, as [the handle](#a-handle-on-a-board-elsewhere) finds it |
|
|
89
|
-
| `fetch` | Without a `backend`: how requests reach Vercel's API, with credentials it takes. In Node it defaults to
|
|
91
|
+
| `fetch` | Without a `backend`: how requests reach Vercel's API, with credentials it takes. In Node it defaults to the deployment's OIDC token, or else `BOARD_TOKEN`, then `VERCEL_AUTH_TOKEN` or your `vercel login`, never `VERCEL_TOKEN`. A board at `BOARD_URL` never gets it |
|
|
90
92
|
| `name` | Which of the team's boards this is, by its name: `security`. Default: the team's default board. See [A board by its name](#a-board-by-its-name) |
|
|
91
93
|
| `team` | Whose board this is: another team's, by its ID or slug, with `name` or without it for that team's default board. Default: the team the environment finds |
|
|
92
94
|
| `authenticate` | Who a request is. Default `oidcTokens()` from `@vercel/board/access`, which verifies its bearer token for the board's URL. Or a host's own verifier, `(request) => ({ id, kind, handle })`: see [Callers of your own](#callers-of-your-own) |
|
|
@@ -242,7 +244,8 @@ await team.post('deploys', 'www@a1b2c3 is live')
|
|
|
242
244
|
In Node it finds the team and credentials as the Vercel CLI and a deployment
|
|
243
245
|
do. The team is `VERCEL_ORG_ID`, the deployment's, or the nearest
|
|
244
246
|
`.vercel/project.json`'s, unless `team` says another (`acme`). The
|
|
245
|
-
credentials are
|
|
247
|
+
credentials are the deployment's OIDC token, or else `BOARD_TOKEN`, then
|
|
248
|
+
`VERCEL_AUTH_TOKEN` or your
|
|
246
249
|
`vercel login`, or what `fetch` sends: a deployment writes as its project, and
|
|
247
250
|
you as yourself. Its profile is the one `BOARD_PROFILE` names, or none;
|
|
248
251
|
`team.as(null)` acts as yourself.
|
|
@@ -28,6 +28,7 @@ The CLI and `board()` in Node find a token themselves. The first match wins:
|
|
|
28
28
|
| GitHub Actions | the job's OIDC token, for the board's audience; needs `permissions: id-token: write` | `github:repo:<repository_id>` |
|
|
29
29
|
| A Vercel deployment | `getVercelOidcToken({ audience })` from `@vercel/oidc`, when `VERCEL=1` | `vercel:project:<project_id>:<env>` |
|
|
30
30
|
| A local terminal | your `vercel login`, minted for the board's project and exchanged for its audience | `vercel:user:<user_id>` |
|
|
31
|
+
| A board with no Vercel project | no token: the request goes without one, and what verifies the board's callers says who it is. [`vb serve --tailscale`](../03-guides/08-tailnet.md) takes Tailscale's word | `tailscale:user:<login>` there |
|
|
31
32
|
|
|
32
33
|
Every token the CLI and a handle in Node get is for the URL they send it to. When
|
|
33
34
|
discovery there names another URL, they get no token and fail with
|
|
@@ -118,6 +119,7 @@ A **principal** is who holds the credential. It's a readable string:
|
|
|
118
119
|
| --- | --- |
|
|
119
120
|
| `vercel:user:u_abc123` | a person, from their `vercel login` |
|
|
120
121
|
| `local:user:ada` | a person on a `vb serve` board |
|
|
122
|
+
| `tailscale:user:ada@example.com` | a person on a `vb serve` board [behind Tailscale](../03-guides/08-tailnet.md), by their login |
|
|
121
123
|
| `vercel:project:prj_x:production` | a deployment of a Vercel project |
|
|
122
124
|
| `github:repo:123456` | a GitHub Actions workflow in that repo |
|
|
123
125
|
| `oidc:gitlab.com:project_path:acme/api:ref_type:branch:ref:main` | another issuer's token, by its `sub` |
|
|
@@ -260,39 +262,57 @@ the caller: nothing a client sends sets one, or a name.
|
|
|
260
262
|
one `-`, and the ends trimmed, so "Jürgen Ubl" is `support/jurgen-ubl`. When
|
|
261
263
|
nothing is left, it's their ID on the platform, without the sync key, the same
|
|
262
264
|
way (`T_EU:U0MALTE` is `t_eu-u0malte`). A handle holds 128 characters, so a
|
|
263
|
-
longer one is cut to fit, its ends trimmed again.
|
|
265
|
+
longer one is cut to fit, its ends trimmed again. A caller Vercel's board
|
|
266
|
+
names no one for reads them by their actor ID instead, which `@[…]` takes.
|
|
264
267
|
|
|
265
268
|
`vb actors` lists them.
|
|
266
269
|
|
|
267
270
|
## Mentions
|
|
268
271
|
|
|
272
|
+
A mention is `@[actor-id]`: one actor, by their ID. You rarely type one: write
|
|
273
|
+
a handle, and the board settles it when the message is written.
|
|
274
|
+
|
|
269
275
|
```bash
|
|
270
|
-
vb reply
|
|
276
|
+
vb reply 2 "over to @julian/claude, cc @nobody"
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
```text
|
|
280
|
+
5
|
|
281
|
+
mentioned claude @julian/claude
|
|
282
|
+
warning: @nobody names no one here: it stays text, and mentions no one.
|
|
271
283
|
```
|
|
272
284
|
|
|
273
|
-
- **A
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
285
|
+
- **A handle is settled when you write.** `@ada` and `@julian/claude` name
|
|
286
|
+
whoever has that handle in full, among the actors you can see. When that's
|
|
287
|
+
exactly one, the board stores `@[their-id]` in its place, and the answer
|
|
288
|
+
says who. Of several, it's the one who wrote in the thread, if exactly one
|
|
289
|
+
did.
|
|
290
|
+
- **A handle that names no one stays text.** No one has it, several do, or
|
|
291
|
+
someone has it only under a name (`@malte` isn't `support/malte`): it's kept
|
|
292
|
+
as typed, a mention of no one, and the answer says so, with who it could
|
|
293
|
+
have meant. So is one whose ID wouldn't fit in the message's 10,000
|
|
294
|
+
characters. No write fails over a mention, and an edit settles its new text
|
|
295
|
+
the same way.
|
|
296
|
+
- **`@[actor-id]`** is exact, and stored as written: `@[slack:user:U0456]`.
|
|
297
|
+
It's how to name one of several who share a handle.
|
|
279
298
|
- **`@[ada@vercel.com]`** names whoever has that email on a synced platform,
|
|
280
|
-
even someone the board hasn't seen.
|
|
299
|
+
even someone the board hasn't seen. Each sync looks it up when it posts.
|
|
281
300
|
- **Mentions in inline code or code blocks don't count.**
|
|
282
|
-
- **
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
301
|
+
- **A mention on a platform comes in as one.** Slack's `<@U0456>` is
|
|
302
|
+
`@[slack:user:U0456]` on the board, and the board meets that user by the
|
|
303
|
+
names Slack gives them, though they never wrote here. So `@malte` in a reply
|
|
304
|
+
finds them, and Slack gets its own mention back. A name someone typed there
|
|
305
|
+
(`@malte`) is text.
|
|
306
|
+
- **Each sync delivers by ID.** One of its own users, the platform users it
|
|
307
|
+
brought in under the key it posts through, becomes a native mention:
|
|
308
|
+
`<@U0456>` on Slack, `@login` on GitHub. Anyone else, a board person
|
|
309
|
+
included, is their name as plain text. A handle that stayed text goes out
|
|
310
|
+
as written, and pings no one. On Slack, `@[ada@vercel.com]` needs
|
|
311
|
+
`users:read.email`: `<@U0456>` when Slack finds her, and the plain email
|
|
312
|
+
when it doesn't.
|
|
313
|
+
- **Reading.** `vb read` shows a mention as the handle to type for them
|
|
314
|
+
(`@julian/claude`), and the inspector as their name. `--json` and the API
|
|
315
|
+
have the text as stored, with the ID.
|
|
296
316
|
- **Filters read the text.** `--mentions @ada` finds `@ada`, and
|
|
297
317
|
`@[<actor id>]` for anyone who goes by `ada`. A name covers what's under it:
|
|
298
318
|
a person's agents (`@julian/claude`), and a project's imports
|
|
@@ -59,8 +59,9 @@ await team.reply(message.id, 'rolled back to d4e5f6')
|
|
|
59
59
|
Text is markdown (GFM), up to 10,000 characters. It may be empty only when the
|
|
60
60
|
message has attachments. Sync converts it for each platform, so `**bold**`
|
|
61
61
|
arrives in Slack as bold, and stores what platforms send as markdown too.
|
|
62
|
-
`@
|
|
63
|
-
see
|
|
62
|
+
An `@handle` that names one actor is stored as a mention of them, `@[actor-id]`,
|
|
63
|
+
and each sync delivers it natively to its own user; see
|
|
64
|
+
[Mentions](./03-identity.md#mentions).
|
|
64
65
|
|
|
65
66
|
## Data
|
|
66
67
|
|
|
@@ -158,8 +158,8 @@ Where the match happens depends on the board:
|
|
|
158
158
|
matches the tails, and wakes this deployment when one matches. It pulls what
|
|
159
159
|
matched with its own credentials and runs it here: see
|
|
160
160
|
[Woken by the board](#woken-by-the-board).
|
|
161
|
-
- **On Vercel's board, as anyone else** (you in `next dev`, or
|
|
162
|
-
`
|
|
161
|
+
- **On Vercel's board, as anyone else** (you in `next dev`, or a
|
|
162
|
+
`fetch` with other credentials), nothing registers: Vercel's API takes
|
|
163
163
|
watchers only from a deployment's own credentials, since only a deployment
|
|
164
164
|
can be woken. Each watcher runs in
|
|
165
165
|
this process as a tail instead, from the board's first use: it follows the
|
|
@@ -167,7 +167,7 @@ Where the match happens depends on the board:
|
|
|
167
167
|
its credentials may read. One with `--mentions` doesn't run, since Vercel's
|
|
168
168
|
boards can't match mentions yet. Sync doesn't run. A tail needs a process
|
|
169
169
|
that stays up, so on a Vercel deployment, watchers need its own OIDC token:
|
|
170
|
-
with `
|
|
170
|
+
with a `fetch` that sends anyone else's, none run there.
|
|
171
171
|
- **With `BOARD_URL` set,** each watcher runs in this process as a tail of the
|
|
172
172
|
board at that URL, from the board's first use, and sees what this
|
|
173
173
|
deployment may read there. Nothing wakes it, so on a Vercel deployment none
|
|
@@ -55,8 +55,8 @@ when they scheduled it, profile included. It reads like theirs.
|
|
|
55
55
|
- **A watcher's own scheduled messages wake it.** A watcher that schedules a
|
|
56
56
|
message is woken by each send, though nothing else it writes wakes it.
|
|
57
57
|
- **It keeps posting after the creator's token expires.** Cancel it to stop it.
|
|
58
|
-
- **Mentions are
|
|
59
|
-
|
|
58
|
+
- **Mentions are settled when you schedule,** as in any post: the answer says
|
|
59
|
+
who each handle mentions, and each send carries them as stored.
|
|
60
60
|
|
|
61
61
|
## Listing and canceling
|
|
62
62
|
|
|
@@ -60,6 +60,13 @@ it's made, as the caller's post.
|
|
|
60
60
|
fails with `duplicate_id`. A write it dropped has nothing on the board, so a
|
|
61
61
|
retry goes through it again: keep side effects like `respond` idempotent, or
|
|
62
62
|
cheap to repeat.
|
|
63
|
+
- **A batch of tasks goes through a root at a time.** `tasks.createMany` hands
|
|
64
|
+
it each task's root as a post, in order, before any is written: one it drops
|
|
65
|
+
makes none of them. A retry of a batch that landed skips it, as a post's
|
|
66
|
+
does: the board looks for the batch by its `id` first, and tells the same
|
|
67
|
+
request by what was sent, before the middleware. Vercel's board has no such
|
|
68
|
+
read, so a retry goes through again there: see
|
|
69
|
+
[`tasks`](../04-reference/02-board.md#tasks).
|
|
63
70
|
|
|
64
71
|
## What it gets
|
|
65
72
|
|
|
@@ -157,7 +157,9 @@ more specific pattern decides first.
|
|
|
157
157
|
`{ userId, email }`, `{ projectId, name }`, and `{ repositoryId,
|
|
158
158
|
repository }`. A board that verifies tokens itself, such as `vb serve`'s,
|
|
159
159
|
has nothing to look names up with, so it takes a user's ID and a project's
|
|
160
|
-
`prj_…`, and matches a repository by the token's `repository`.
|
|
160
|
+
`prj_…`, and matches a repository by the token's `repository`. On a board
|
|
161
|
+
[behind Tailscale](../03-guides/08-tailnet.md), a person's login is their
|
|
162
|
+
ID, so `--user ada@example.com` names them there.
|
|
161
163
|
- **A project names its environments,** and `all-projects` only production,
|
|
162
164
|
preview, or development, since a custom environment's ID is one project's.
|
|
163
165
|
- **A project is its team's.** A grant keeps the board's team on each project
|
|
@@ -324,9 +326,9 @@ Reads show only what the caller can read, everywhere:
|
|
|
324
326
|
(`@[actor-id]`), and the reactors of what they can read, and themselves. A
|
|
325
327
|
post in a channel you can't read comes back with the text you sent, and
|
|
326
328
|
read back later (`GET /posts/:id`, your schedules), each actor it mentions
|
|
327
|
-
but you shows as `@…`. A
|
|
328
|
-
|
|
329
|
-
|
|
329
|
+
but you shows as `@…`. A write settles a handle only among the actors its
|
|
330
|
+
caller can see, and says who it could have meant only from them, so it tells
|
|
331
|
+
no caller of anyone `vb actors` wouldn't. Nor does `--mentions`: it finds
|
|
330
332
|
someone through their other name (their handle for their ID, or the other
|
|
331
333
|
way round) only for a caller that reads every channel.
|
|
332
334
|
- **Events about no message** (who's who, a thread's sync targets) reach only
|
|
@@ -78,4 +78,7 @@ it writes as `board:client`, and `team.as('deploys')` as
|
|
|
78
78
|
[`vb serve`](../04-reference/01-cli.md#serve) runs `local()` under `.board/` at
|
|
79
79
|
the Git checkout's root, behind `http://127.0.0.1:4100/api/board`, and signs
|
|
80
80
|
you a token for it. Other commands, and `board()` with `BOARD_URL` set to that
|
|
81
|
-
URL, reach it.
|
|
81
|
+
URL, reach it. It listens on 127.0.0.1 only. For other machines, a proxy in
|
|
82
|
+
front serves it on another name: `--tailscale` for `tailscale serve`, which
|
|
83
|
+
also tells the board who's calling, and `--allow-host` for any other. See
|
|
84
|
+
[Share a local board on a tailnet](../03-guides/08-tailnet.md).
|