@vercel/board 0.50.0 → 0.50.2
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/LICENSE +201 -0
- package/README.md +6 -2
- package/dist/access.mjs +1 -1
- package/dist/{backend-CcaaS9Xl.d.mts → backend-C2JUnbm5.d.mts} +7 -2
- package/dist/backend-local.d.mts +1 -1
- package/dist/backend-local.mjs +1 -1
- package/dist/{chat-provider-HJ7y_ipp.mjs → chat-provider-Br2RXgLV.mjs} +4 -3
- package/dist/{chat-provider-DQ1GHm4o.d.mts → chat-provider-z4nzV8A-.d.mts} +1 -1
- package/dist/cli-embedded.d.mts +8 -5
- package/dist/cli-embedded.mjs +8 -5
- package/dist/cli.mjs +5 -5
- package/dist/{conformance-Cr-umDl0.mjs → conformance-jHhuKZe8.mjs} +1 -1
- package/dist/conformance.d.mts +1 -1
- package/dist/conformance.mjs +1 -1
- package/dist/{engine-DJZ8Xy_g.mjs → engine-I887QHnP.mjs} +13 -5
- package/dist/{events-BdOCmnZh.mjs → events-mWKc1uvZ.mjs} +1 -1
- package/dist/{exports-CuD-Mxkw.mjs → exports-DRId1Cks.mjs} +88 -23
- package/dist/{exports-lmr6UHHc.d.mts → exports-DkdCh3Zi.d.mts} +1 -1
- package/dist/{external-D2jq_DEQ.mjs → external-DkWafjn-.mjs} +5 -1
- package/dist/{index-_KxJu15n.d.mts → index-DpuOtt0J.d.mts} +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/index.node.d.mts +3 -3
- package/dist/index.node.mjs +2 -2
- package/dist/inspect/app.js +30 -30
- package/dist/inspect/engine.js +1 -1
- package/dist/inspect-DLLoYeg7.mjs +2 -0
- package/dist/{inspect-CZeoSm7E.mjs → inspect-DSBG5VDl.mjs} +2 -2
- package/dist/inspect.mjs +1 -1
- package/dist/{local-BVSFSSYf.mjs → local-DjrvtIoE.mjs} +7 -7
- package/dist/{main-B016auoG.mjs → main-VTkjxFcG.mjs} +11 -9
- package/dist/{memory-C2lzMV_t.mjs → memory-wmUDblhm.mjs} +2 -2
- package/dist/{provider-Dwb_9mnu.d.mts → provider-BgUS6ZpP.d.mts} +2 -0
- package/dist/{routes-BE0y6wCk.mjs → routes-BSBUdD2X.mjs} +1 -1
- package/dist/{serve-B10e7QaY.mjs → serve-C2xn_cQV.mjs} +6 -5
- package/dist/{server-ViWNvg5q.mjs → server-BLQxoL0g.mjs} +36 -26
- package/dist/{serving-SbqeWqlA.mjs → serving-Bulte-NO.mjs} +1 -1
- package/dist/{shell-DmpmgOPC.mjs → shell-Bny3-l_d.mjs} +1 -1
- package/dist/{sql-iABdyCiz.mjs → sql-D0MqINA6.mjs} +1 -1
- package/dist/{sqlite-28EMrmk7.mjs → sqlite-Dj2ZEtgy.mjs} +2 -2
- package/dist/{sqlite-db-Ckd-ceNe.mjs → sqlite-db-DjbTlUwN.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 +2 -2
- package/dist/sync-linear.mjs +3 -3
- package/dist/sync-slack.d.mts +20 -3
- package/dist/sync-slack.mjs +35 -11
- package/dist/sync.d.mts +1 -1
- package/dist/sync.mjs +2 -2
- package/dist/{tags-D0qra0Qy.mjs → tags-CxDCF_tt.mjs} +1 -1
- package/dist/{task-batch-9lVDG3d-.mjs → task-batch-CE6BKnRw.mjs} +3 -3
- package/dist/{tokens-C-iK0Cku.mjs → tokens-DnDHSPml.mjs} +28 -5
- package/dist/{version-C70RLVEK.mjs → version-DWvOShz3.mjs} +1 -1
- package/docs/01-board/01-mounting.md +1 -1
- package/docs/01-board/07-schedules.md +1 -1
- package/docs/02-sync/01-overview.md +3 -3
- package/docs/02-sync/03-slack.md +4 -3
- package/docs/03-guides/01-coding-agents.md +1 -1
- package/docs/04-reference/01-cli.md +19 -14
- package/docs/index.md +1 -1
- package/package.json +14 -2
- package/dist/inspect-UCcPViyA.mjs +0 -2
package/dist/sync-slack.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { m as MESSAGE_TEXT_MAX } from "./schemas-CUSTEFIy.mjs";
|
|
2
|
-
import "./external-
|
|
2
|
+
import "./external-DkWafjn-.mjs";
|
|
3
3
|
import { t as extractMentions } from "./mentions-CnWt9Z5b.mjs";
|
|
4
|
-
import { d as opensBlock, i as eventSchema, l as UnreadableError, p as channels, r as envelope } from "./events-
|
|
5
|
-
import { n as markdownOf, t as ChatSyncProvider } from "./chat-provider-
|
|
4
|
+
import { d as opensBlock, i as eventSchema, l as UnreadableError, p as channels, r as envelope } from "./events-mWKc1uvZ.mjs";
|
|
5
|
+
import { n as markdownOf, t as ChatSyncProvider } from "./chat-provider-Br2RXgLV.mjs";
|
|
6
6
|
import { r as formatVercelDeployments } from "./bots-CqPYxkqK.mjs";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
import { stringifyMarkdown } from "chat";
|
|
@@ -286,6 +286,15 @@ const BLOCKS = /* @__PURE__ */ new Set([
|
|
|
286
286
|
"h6"
|
|
287
287
|
]);
|
|
288
288
|
const attribute = (attrs, name) => new RegExp(`\\s${name}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s>]+))`, "i").exec(attrs)?.slice(1).find((v) => v !== void 0) ?? "";
|
|
289
|
+
/**
|
|
290
|
+
* Slack's `<!channel>`, `<!here>`, `<!everyone>`, and `<!subteam^…>` notify a whole channel or user
|
|
291
|
+
* group. Text from other platforms (a GitHub comment) isn't allowed to ping them, so a word joiner
|
|
292
|
+
* breaks the markup; the text reads the same. A message written on the board isn't touched: its
|
|
293
|
+
* author may mean to ping a group. Code isn't spared: what Slack takes for code isn't what a regex
|
|
294
|
+
* here does (an escaped backtick, runs that don't match, a fence nobody closed), and guessing wrong
|
|
295
|
+
* pings a channel, where a joiner in copied code is only in the way.
|
|
296
|
+
*/
|
|
297
|
+
const withoutBroadcasts = (markdown) => markdown.replace(/<!(?=[a-z^])/gi, "<!");
|
|
289
298
|
/** GitHub's markdown allows inline HTML, which Slack shows as raw tags: as markdown instead, outside code. */
|
|
290
299
|
function withoutHtml(markdown) {
|
|
291
300
|
if (!/<\/?[a-z!]/i.test(markdown) || /[\uE000\uE001]/.test(markdown)) return markdown;
|
|
@@ -736,20 +745,33 @@ var SlackProvider = class extends ChatSyncProvider {
|
|
|
736
745
|
inclusive: true,
|
|
737
746
|
limit: 1
|
|
738
747
|
})).messages?.find((m) => m.ts === ts);
|
|
748
|
+
const [, at, root] = linker.thread.split(":");
|
|
749
|
+
const linkingMessage = at && root ? one(at, root, linker.message).catch(() => void 0) : Promise.resolve(void 0);
|
|
750
|
+
const posterMayRead = async () => {
|
|
751
|
+
const poster = (await linkingMessage)?.user;
|
|
752
|
+
if (!poster) return await linkingMessage !== void 0;
|
|
753
|
+
const user = (await web.users?.info({ user: poster }).catch(() => void 0))?.user;
|
|
754
|
+
if (!user) return false;
|
|
755
|
+
if (user.is_bot) return true;
|
|
756
|
+
if (user.is_restricted || user.is_ultra_restricted || user.is_stranger) return false;
|
|
757
|
+
const team = (await web.auth?.test().catch(() => void 0))?.team_id;
|
|
758
|
+
return !!team && user.team_id === team;
|
|
759
|
+
};
|
|
739
760
|
let found;
|
|
740
761
|
let unavailable = "message_not_found";
|
|
741
762
|
try {
|
|
742
763
|
const info = (await web.conversations.info({ channel })).channel;
|
|
743
764
|
if (!info) unavailable = "channel_not_found";
|
|
744
765
|
else if (info.is_private || info.is_im || info.is_mpim) unavailable = "private_channel";
|
|
766
|
+
else if (info.is_ext_shared) unavailable = "shared_channel";
|
|
745
767
|
else if (!info.is_member) unavailable = "not_in_channel";
|
|
768
|
+
else if (!await posterMayRead()) unavailable = "poster_cannot_read";
|
|
746
769
|
else found = await one(channel, thread, link.message);
|
|
747
770
|
} catch (error) {
|
|
748
771
|
unavailable = slackError(error);
|
|
749
772
|
}
|
|
750
773
|
if (!found) {
|
|
751
|
-
const
|
|
752
|
-
const linking = at && root ? await one(at, root, linker.message).catch(() => void 0) : void 0;
|
|
774
|
+
const linking = await linkingMessage;
|
|
753
775
|
const unfurled = linking ? slackLinks("", linking.text ?? "", linking.attachments, mrkdwn).find((known) => known.url === link.url)?.snapshot : null;
|
|
754
776
|
return unfurled ? {
|
|
755
777
|
snapshot: unfurled,
|
|
@@ -920,16 +942,17 @@ var SlackProvider = class extends ChatSyncProvider {
|
|
|
920
942
|
literalMentions(options.adapter);
|
|
921
943
|
}
|
|
922
944
|
/**
|
|
923
|
-
* A message goes out under its author's name (`
|
|
945
|
+
* A message goes out under its author's name (`Ada Lovelace`, `clever-lemur via acme-agents`,
|
|
924
946
|
* `Malte via support (slack)`), and their picture when it has one Slack can show, instead of the
|
|
925
947
|
* app's, with the text's `**name**: ` label dropped. Without `chat:write.customize` it posts as
|
|
926
948
|
* the app, label and all.
|
|
927
949
|
*/
|
|
928
950
|
async post(target, kind, body) {
|
|
929
|
-
const { as, deployments, ...given } = body;
|
|
951
|
+
const { as, deployments, external, ...given } = body;
|
|
952
|
+
const html = withoutHtml(given.markdown);
|
|
930
953
|
const post = {
|
|
931
954
|
...given,
|
|
932
|
-
markdown:
|
|
955
|
+
markdown: external ? withoutBroadcasts(html) : html
|
|
933
956
|
};
|
|
934
957
|
if (deployments && !post.files?.length) {
|
|
935
958
|
const laidOut = await this.postDeployments(target, as, post.markdown, deployments);
|
|
@@ -995,10 +1018,11 @@ var SlackProvider = class extends ChatSyncProvider {
|
|
|
995
1018
|
}
|
|
996
1019
|
/** An edit keeps the label out only where the message went out under its author's name. */
|
|
997
1020
|
async edit(thread, message, body) {
|
|
998
|
-
const { as, deployments, ...given } = body;
|
|
1021
|
+
const { as, deployments, external, ...given } = body;
|
|
1022
|
+
const html = withoutHtml(given.markdown);
|
|
999
1023
|
const post = {
|
|
1000
1024
|
...given,
|
|
1001
|
-
markdown:
|
|
1025
|
+
markdown: external ? withoutBroadcasts(html) : html
|
|
1002
1026
|
};
|
|
1003
1027
|
const edited = (as && await this.web().then((web) => !!web && this.canCustomize(web), () => false) ? await this.sentAs(thread, message, as) : false) && as ? {
|
|
1004
1028
|
...post,
|
|
@@ -1156,4 +1180,4 @@ var SlackProvider = class extends ChatSyncProvider {
|
|
|
1156
1180
|
}
|
|
1157
1181
|
};
|
|
1158
1182
|
//#endregion
|
|
1159
|
-
export { SlackEvent, SlackProvider, channels, forwardText, slack, slackFileName, slackIcon, slackLinks, slackUsername, withoutHtml, withoutLabel };
|
|
1183
|
+
export { SlackEvent, SlackProvider, channels, forwardText, slack, slackFileName, slackIcon, slackLinks, slackUsername, withoutBroadcasts, withoutHtml, withoutLabel };
|
package/dist/sync.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { In as ExternalAuthor, Ln as ExternalEvent, Rn as ExternalFile } from "./routes-B6SEA9yw.mjs";
|
|
2
|
-
import { A as SyncRoot, C as mirror, D as RootOverride, E as ProviderEvent, M as eventSchema, N as VercelDeployment, O as SyncOverrides, S as into, T as EventBase, _ as SyncFn, a as ProviderOptions, b as SyncUnit, c as Receive, d as Renderer, f as ResolvedTarget, g as Sync, h as UnreadableError, i as ProviderFile, j as envelope, k as SyncResult, l as ReceivedEvent, m as SyncProvider, n as FileDelivery, o as ProviderPost, p as SyncContext, r as ProviderDelivery, u as RenderInput, v as SyncIn, w as render, x as channels, y as SyncOut } from "./provider-
|
|
2
|
+
import { A as SyncRoot, C as mirror, D as RootOverride, E as ProviderEvent, M as eventSchema, N as VercelDeployment, O as SyncOverrides, S as into, T as EventBase, _ as SyncFn, a as ProviderOptions, b as SyncUnit, c as Receive, d as Renderer, f as ResolvedTarget, g as Sync, h as UnreadableError, i as ProviderFile, j as envelope, k as SyncResult, l as ReceivedEvent, m as SyncProvider, n as FileDelivery, o as ProviderPost, p as SyncContext, r as ProviderDelivery, u as RenderInput, v as SyncIn, w as render, x as channels, y as SyncOut } from "./provider-BgUS6ZpP.mjs";
|
|
3
3
|
export { EventBase, type ExternalAuthor, ExternalEvent, type ExternalFile, type FileDelivery, type ProviderDelivery, type ProviderEvent, type ProviderFile, type ProviderOptions, type ProviderPost, type Receive, ReceivedEvent, type RenderInput, type Renderer, ResolvedTarget, type RootOverride, type Sync, type SyncContext, type SyncFn, type SyncIn, type SyncOut, SyncOverrides, SyncProvider, type SyncResult, type SyncRoot, type SyncUnit, UnreadableError, type VercelDeployment, channels, envelope, eventSchema, into, mirror, render };
|
package/dist/sync.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as ExternalEvent } from "./external-
|
|
2
|
-
import { c as SyncProvider, g as render, h as mirror, i as eventSchema, l as UnreadableError, m as into, n as SyncOverrides, o as ReceivedEvent, p as channels, r as envelope, s as ResolvedTarget, t as EventBase } from "./events-
|
|
1
|
+
import { n as ExternalEvent } from "./external-DkWafjn-.mjs";
|
|
2
|
+
import { c as SyncProvider, g as render, h as mirror, i as eventSchema, l as UnreadableError, m as into, n as SyncOverrides, o as ReceivedEvent, p as channels, r as envelope, s as ResolvedTarget, t as EventBase } from "./events-mWKc1uvZ.mjs";
|
|
3
3
|
export { EventBase, ExternalEvent, ReceivedEvent, ResolvedTarget, SyncOverrides, SyncProvider, UnreadableError, channels, envelope, eventSchema, into, mirror, render };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const slug = (name) => name.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[^a-z0-9_.-]+/g, "-").replace(/^[-_.]+|-+$/g, "");
|
|
4
4
|
/**
|
|
5
5
|
* A platform's label or assignee as a board label: `bug` → `tag.bug=bug`,
|
|
6
|
-
* `
|
|
6
|
+
* `grace` → `assignee.grace=grace`. The keys don't
|
|
7
7
|
* name the platform, so a filter like `--label tag.bug` holds for any of them.
|
|
8
8
|
*/
|
|
9
9
|
function tagOf(prefix, name) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { i as ATTACHMENT_BYTES_MAX } from "./profile-header-Cj0Cb1cf.mjs";
|
|
2
2
|
import "./schemas-CUSTEFIy.mjs";
|
|
3
|
-
import { l as isThreadTarget } from "./external-
|
|
4
|
-
import { Z as routes, v as Filters } from "./routes-
|
|
3
|
+
import { l as isThreadTarget } from "./external-DkWafjn-.mjs";
|
|
4
|
+
import { Z as routes, v as Filters } from "./routes-BSBUdD2X.mjs";
|
|
5
5
|
import { r as badRequest, t as HttpError } from "./errors-DYF4hhIc.mjs";
|
|
6
6
|
import { i as afterRetry } from "./middleware-DUKIITFZ.mjs";
|
|
7
|
-
import { t as VERSION } from "./version-
|
|
7
|
+
import { t as VERSION } from "./version-DWvOShz3.mjs";
|
|
8
8
|
import { o as options } from "./commands-nN8WpvCe.mjs";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
//#region src/server/backend.ts
|
|
@@ -88,23 +88,46 @@ function factsOf(issuer, iss, claims) {
|
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
90
|
const issuerMatches = (iss, accepted) => typeof accepted === "string" ? iss === accepted : accepted.test(iss);
|
|
91
|
+
/** The keys of the issuers seen most recently: an issuer a token names costs a fetch, so what stays is bounded. */
|
|
91
92
|
const remoteKeys = /* @__PURE__ */ new Map();
|
|
93
|
+
const loading = /* @__PURE__ */ new Map();
|
|
94
|
+
const REMOTE_KEYS_MAX = 100;
|
|
95
|
+
const DISCOVERY_TIMEOUT_MS = 5e3;
|
|
92
96
|
/**
|
|
93
97
|
* An issuer's keys, by OIDC Discovery 1.0: its document under the issuer, naming that issuer
|
|
94
98
|
* (§4.3), and its keys at an https `jwks_uri` (§3), which must be on the internet, as a grant's
|
|
95
|
-
* issuer must. Like jose's own fetch of the keys, it follows no redirect.
|
|
99
|
+
* issuer must. Like jose's own fetch of the keys, it follows no redirect. Callers asking for the
|
|
100
|
+
* same issuer at once share one fetch, and a fetch that stalls gives up.
|
|
96
101
|
*/
|
|
97
|
-
|
|
102
|
+
function keysFor(iss) {
|
|
98
103
|
const cached = remoteKeys.get(iss);
|
|
99
|
-
if (cached)
|
|
104
|
+
if (cached) {
|
|
105
|
+
remoteKeys.delete(iss);
|
|
106
|
+
remoteKeys.set(iss, cached);
|
|
107
|
+
return Promise.resolve(cached);
|
|
108
|
+
}
|
|
109
|
+
let pending = loading.get(iss);
|
|
110
|
+
if (!pending) {
|
|
111
|
+
pending = discover(iss).finally(() => loading.delete(iss));
|
|
112
|
+
loading.set(iss, pending);
|
|
113
|
+
}
|
|
114
|
+
return pending;
|
|
115
|
+
}
|
|
116
|
+
async function discover(iss) {
|
|
100
117
|
const unknown = (why) => unauthorized(`cannot load keys for issuer ${iss}: ${why}`);
|
|
101
|
-
const response = await fetch(`${iss.replace(/\/+$/, "")}/.well-known/openid-configuration`, {
|
|
118
|
+
const response = await fetch(`${iss.replace(/\/+$/, "")}/.well-known/openid-configuration`, {
|
|
119
|
+
redirect: "manual",
|
|
120
|
+
signal: AbortSignal.timeout(DISCOVERY_TIMEOUT_MS)
|
|
121
|
+
}).catch(() => {
|
|
122
|
+
throw unknown("its discovery did not answer");
|
|
123
|
+
});
|
|
102
124
|
if (response.status !== 200) throw unknown(`its discovery answered ${response.status}`);
|
|
103
125
|
const config = await response.json().catch(() => null);
|
|
104
126
|
if (config?.issuer !== iss) throw unknown("its discovery names another issuer");
|
|
105
127
|
const jwks = typeof config.jwks_uri === "string" ? URL.parse(config.jwks_uri) : null;
|
|
106
128
|
if (jwks?.protocol !== "https:" || privateHost(jwks.hostname)) throw unknown("its jwks_uri isn't an https URL on the internet");
|
|
107
|
-
const keys = createRemoteJWKSet(jwks);
|
|
129
|
+
const keys = createRemoteJWKSet(jwks, { timeoutDuration: DISCOVERY_TIMEOUT_MS });
|
|
130
|
+
if (remoteKeys.size >= REMOTE_KEYS_MAX) remoteKeys.delete(remoteKeys.keys().next().value);
|
|
108
131
|
remoteKeys.set(iss, keys);
|
|
109
132
|
return keys;
|
|
110
133
|
}
|
|
@@ -103,7 +103,7 @@ backend:
|
|
|
103
103
|
| `middleware` | Runs on every post and edit before it reaches the backend, whatever it came from. See [Middleware](./08-middleware.md) |
|
|
104
104
|
| `watch` | Tails the board runs for you, keyed by id: `{ triage: { tail, run } }`. See [Watchers](./06-watchers.md) |
|
|
105
105
|
| `sync` | Two-way sync, keyed by a name you choose: `{ slack: slack('slack/acme', channels({…})) }`. See [Sync](../02-sync/01-overview.md) |
|
|
106
|
-
| `url` | The board's public URL, which every token's audience must equal. Inferred from requests otherwise |
|
|
106
|
+
| `url` | The board's public URL, which every token's audience must equal. Inferred from requests otherwise only on Vercel and in development (with a warning): a request's sender chooses its Host, so a self-hosted board in production without `url` verifies no tokens and answers 500 `no_board_url` |
|
|
107
107
|
| `basePath` | The mount path, e.g. `/api/board`. Inferred from requests otherwise: a request can only make it look deeper than it is (`/api/board/x/messages/1`), so the board keeps the shallowest it's seen |
|
|
108
108
|
| `streamMaxMs` | How long an SSE stream stays open before the board closes it and the client reconnects. Default `280000` |
|
|
109
109
|
|
|
@@ -17,7 +17,7 @@ vb schedule standup "what's everyone on today?" --at 2026-10-09T09:00:00-03:00 -
|
|
|
17
17
|
|
|
18
18
|
```text
|
|
19
19
|
$ vb schedule 812 "@ada friendly ping: can you review?" --in 1d
|
|
20
|
-
s12 #812 · once · next in 1d (2026-10-09T14:00:00.000Z) · by
|
|
20
|
+
s12 #812 · once · next in 1d (2026-10-09T14:00:00.000Z) · by Grace Hopper
|
|
21
21
|
@ada friendly ping: can you review?
|
|
22
22
|
```
|
|
23
23
|
|
|
@@ -193,7 +193,7 @@ $ vb read general --source www/slack --json # trimmed to text and from
|
|
|
193
193
|
{"text": "checkout is down", "from": "www/slack"}
|
|
194
194
|
|
|
195
195
|
$ vb sync 812
|
|
196
|
-
support/slack
|
|
196
|
+
support/slack C0123ABCDEF message 1792780353.701549
|
|
197
197
|
www/slack C0D2K4R7Q1M message 1792780391.118204
|
|
198
198
|
```
|
|
199
199
|
|
|
@@ -220,9 +220,9 @@ for that link`. A handle has them as `board.sync(id)` and `board.linked(url)`.
|
|
|
220
220
|
|
|
221
221
|
```text
|
|
222
222
|
$ vb sync 812
|
|
223
|
-
slack
|
|
223
|
+
slack C0123ABCDEF https://acme.slack.com/archives/C0123ABCDEF/p1792780353701549
|
|
224
224
|
|
|
225
|
-
$ vb read https://
|
|
225
|
+
$ vb read https://acme.slack.com/archives/C0123ABCDEF/p1792780353701549
|
|
226
226
|
#812 ada · 2h
|
|
227
227
|
checkout is down
|
|
228
228
|
```
|
package/docs/02-sync/03-slack.md
CHANGED
|
@@ -99,7 +99,8 @@ most once a minute, while the other channels sync.
|
|
|
99
99
|
sent `@vercel/board` as that, and pings no one for it. A board
|
|
100
100
|
message can mention someone by email, `@[ada@acme.com]`, which Slack looks
|
|
101
101
|
up as it posts (it needs `users:read.email`), and posts as `ada@acme.com`
|
|
102
|
-
when it finds no one.
|
|
102
|
+
when it finds no one. It looks up the first 10 emails a message names, and
|
|
103
|
+
posts the rest as written. See
|
|
103
104
|
[mentions](../01-board/03-identity.md#mentions).
|
|
104
105
|
- **Other bots' messages,** from Sentry or Vercel alerts, sync like anyone's. Only
|
|
105
106
|
the board's own posts are skipped.
|
|
@@ -117,9 +118,9 @@ On a local board, it's everyone a credential named, since their handle and
|
|
|
117
118
|
name are always that credential's word: a principal a Vercel or other OIDC
|
|
118
119
|
token, or [your host's verifier](../01-board/01-mounting.md#callers-of-your-own) let in,
|
|
119
120
|
writing as itself or through an agent or import
|
|
120
|
-
(`clever-lemur via
|
|
121
|
+
(`clever-lemur via acme-agents`). The board's own code and its own sync's
|
|
121
122
|
platform users keep the label, as a file upload does. A person posting as
|
|
122
|
-
themselves is just their name (`
|
|
123
|
+
themselves is just their name (`Ada Lovelace` on Vercel's board, the handle
|
|
123
124
|
your verifier gives them, or a Vercel login's user ID). Anything written on a
|
|
124
125
|
principal's behalf is `<name> via <principal>`: an agent (`claude via julian`),
|
|
125
126
|
or a platform user another sync speaks for (`Malte via support (preview)`). A
|
|
@@ -70,7 +70,7 @@ error: https://team.example/api/board is behind Vercel Deployment Protection, an
|
|
|
70
70
|
|
|
71
71
|
```bash
|
|
72
72
|
# in a terminal:
|
|
73
|
-
npx skills add vercel
|
|
73
|
+
npx skills add vercel/board --skill board -g
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
The skill teaches your agents to work through the CLI you already have:
|
|
@@ -50,24 +50,28 @@ const code = await createApp({
|
|
|
50
50
|
onWarning: (warning) => console.error(warning.message),
|
|
51
51
|
// Your Vercel login, and the team whose board to use when --scope names none, as this CLI
|
|
52
52
|
// resolves its own: asked for only when a request needs them. Help, a typo, or misuse never asks.
|
|
53
|
-
//
|
|
54
|
-
//
|
|
53
|
+
// The login is who every command runs as, wherever this CLI runs: nothing in the environment
|
|
54
|
+
// goes ahead of it, a deployment's own token and BOARD_TOKEN included. One that throws fails the
|
|
55
|
+
// request: board never falls back to `vercel login`'s. A team that throws fails it too, with
|
|
56
|
+
// what it threw as the failure's details.
|
|
55
57
|
login: async () => process.env.VERCEL_AUTH_TOKEN!,
|
|
56
58
|
team: async () => process.env.VERCEL_ORG_ID ?? null,
|
|
57
59
|
// How requests to Vercel's API go with that login: the app's own fetch, which adds the login's
|
|
58
60
|
// credentials. Without it, the login goes as a Bearer token, which a DPoP login can't use.
|
|
59
61
|
// fetch: (input, init) => yourSignedFetch(input, init), // a DPoP proof for each request
|
|
60
62
|
// A Vercel token someone passed for this run, as `vercel board --token` takes one: the login to
|
|
61
|
-
// use in place of `login
|
|
62
|
-
// and BOARD_TOKEN included. Board sends it itself, as a Bearer token, never through `fetch`. A
|
|
63
|
+
// use in place of `login`. Board sends it itself, as a Bearer token, never through `fetch`. A
|
|
63
64
|
// board at a URL gets a token minted with it, never the token itself.
|
|
64
65
|
// token: yourFlags.token,
|
|
65
66
|
}).run(process.argv.slice(3))
|
|
66
67
|
```
|
|
67
68
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
The CLI that runs board's says who its commands run as. With a `login` (or a
|
|
70
|
+
`token`), every command runs as that login, on a deployment and with
|
|
71
|
+
`BOARD_TOKEN` set too, so `vercel board` is you, as every `vercel` command is.
|
|
72
|
+
A board at a URL gets a token minted with that login. To act as a deployment's
|
|
73
|
+
project, or with `BOARD_TOKEN`, run `vb`. [`whoami`](#whoami) names a passed
|
|
74
|
+
token as its source, `the token you passed`.
|
|
71
75
|
|
|
72
76
|
`class` fixes the exit code: `usage` and `missing_input` answer 2,
|
|
73
77
|
`canceled` 130, and the rest 1, `timeout` included. Without `onError`, board
|
|
@@ -91,9 +95,10 @@ With no board URL anywhere, it talks to your team's board in Vercel's API:
|
|
|
91
95
|
`VERCEL_ORG_ID`'s, or the team of the nearest linked project
|
|
92
96
|
(`.vercel/project.json`, searching up to the Git checkout's root), or else your
|
|
93
97
|
login's default team. `--scope <team>` picks another, by its slug or ID. It
|
|
94
|
-
reads and writes
|
|
95
|
-
|
|
96
|
-
`
|
|
98
|
+
reads and writes as the login the CLI that runs it gives it. Given none, it
|
|
99
|
+
finds its credentials as `vb` does: a deployment's own token, or else
|
|
100
|
+
`BOARD_TOKEN`, or else you, with `VERCEL_AUTH_TOKEN` or `vercel login`'s. It
|
|
101
|
+
never sends `VERCEL_TOKEN`.
|
|
97
102
|
|
|
98
103
|
### In-process, on a handle
|
|
99
104
|
|
|
@@ -387,7 +392,7 @@ react, label, and sync everywhere:
|
|
|
387
392
|
|
|
388
393
|
```text
|
|
389
394
|
$ vb whoami --scope test
|
|
390
|
-
|
|
395
|
+
Ada Lovelace (vercel:user:u_jb)
|
|
391
396
|
board https://api.vercel.com/v1/messageboard/boards/brd_test?teamId=team_test
|
|
392
397
|
source the Vercel CLI
|
|
393
398
|
can * read
|
|
@@ -799,11 +804,11 @@ vb read <link>
|
|
|
799
804
|
$ vb read prs --label state=open
|
|
800
805
|
prs · 2 threads · cursor 1290
|
|
801
806
|
|
|
802
|
-
#1271 github · 2h [pr=vercel
|
|
807
|
+
#1271 github · 2h [pr=vercel/board#158 state=open]
|
|
803
808
|
Show threads in vb read
|
|
804
809
|
no replies
|
|
805
810
|
|
|
806
|
-
#1204 github · 3d [pr=vercel
|
|
811
|
+
#1204 github · 3d [pr=vercel/board#151 state=open]
|
|
807
812
|
Retry Slack deliveries on 429
|
|
808
813
|
4 replies · last #1288 pi via julian · 12m
|
|
809
814
|
|
|
@@ -1184,7 +1189,7 @@ prints `not synced anywhere`.
|
|
|
1184
1189
|
|
|
1185
1190
|
```text
|
|
1186
1191
|
$ vb sync 812
|
|
1187
|
-
slack
|
|
1192
|
+
slack C0123ABCDEF https://acme.slack.com/archives/C0123ABCDEF/p1792780353701549
|
|
1188
1193
|
github acme/web:4021 https://github.com/acme/web/pull/4021#issuecomment-3301
|
|
1189
1194
|
```
|
|
1190
1195
|
|
package/docs/index.md
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/board",
|
|
3
|
-
"version": "0.50.
|
|
3
|
+
"version": "0.50.2",
|
|
4
4
|
"description": "A message board you mount in one route: one durable log, verified authors, live tail, and two-way sync.",
|
|
5
|
-
"license": "
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/vercel/board.git",
|
|
9
|
+
"directory": "packages/board"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/vercel/board#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/vercel/board/issues"
|
|
14
|
+
},
|
|
6
15
|
"type": "module",
|
|
7
16
|
"engines": {
|
|
8
17
|
"node": ">=22.18"
|
|
@@ -133,6 +142,9 @@
|
|
|
133
142
|
"optional": true
|
|
134
143
|
}
|
|
135
144
|
},
|
|
145
|
+
"publishConfig": {
|
|
146
|
+
"access": "public"
|
|
147
|
+
},
|
|
136
148
|
"scripts": {
|
|
137
149
|
"build": "tsdown",
|
|
138
150
|
"typecheck": "tsc --noEmit",
|