@vercel/board 0.44.0 → 0.45.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-BgBiaCyx.mjs → access-3udXjJAg.mjs} +2 -2
- package/dist/access.d.mts +3 -3
- package/dist/access.mjs +6 -6
- package/dist/{actors-DkZsnMgA.mjs → actors-DasGZnfb.mjs} +3 -3
- package/dist/{auth-C8jxty0C.d.mts → auth-BG_whr9_.d.mts} +1 -1
- package/dist/{auth-Ft4AJptx.mjs → auth-aiOVE82-.mjs} +2 -2
- package/dist/{backend-_3W_5g6y.d.mts → backend-D6yTo8Un.d.mts} +3 -3
- package/dist/backend-local.d.mts +1 -1
- package/dist/backend-local.mjs +1 -1
- package/dist/{chat-provider-DZ4DsAZ7.mjs → chat-provider-BvNqOQFL.mjs} +2 -2
- package/dist/{chat-provider-HQo68RWL.d.mts → chat-provider-V2jnjVLq.d.mts} +2 -2
- package/dist/cli-commands.d.mts +1 -1
- package/dist/cli-commands.mjs +1 -1
- package/dist/cli-embedded.d.mts +2 -2
- package/dist/cli-embedded.mjs +2 -2
- package/dist/cli.mjs +14 -7
- package/dist/{commands-B75pBXIV.mjs → commands-CqdnjUkm.mjs} +6 -0
- package/dist/{commands-DHGZWeSZ.d.mts → commands-DewS14_P.d.mts} +6 -0
- package/dist/{conformance-CHqXZoGe.mjs → conformance-BInS4_6b.mjs} +3 -3
- package/dist/conformance.d.mts +1 -1
- package/dist/conformance.mjs +1 -1
- package/dist/{engine-D07DTYSi.mjs → engine-XVBt02Bl.mjs} +5 -5
- package/dist/{errors-DUzpDSrJ.mjs → errors-ZazTZh-s.mjs} +20 -3
- package/dist/{events-voButVQW.mjs → events-D17RndlV.mjs} +2 -2
- package/dist/{exports-BNk4w-b2.mjs → exports-DCf75prP.mjs} +183 -45
- package/dist/exports-Gspe1eEq.d.mts +4 -0
- package/dist/{external-DymyhUzl.mjs → external-DfhN7lKK.mjs} +1 -1
- package/dist/{index-CwOOIT0e.d.mts → index-Djmr4GzQ.d.mts} +2 -2
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +4 -4
- package/dist/index.node.d.mts +6 -6
- package/dist/index.node.mjs +3 -3
- package/dist/inspect/app.js +88 -88
- package/dist/{inspect-dtQlHBcq.mjs → inspect-B0_aKQM8.mjs} +23 -7
- package/dist/inspect-CULoD54F.mjs +2 -0
- package/dist/{local-CnGNTReZ.mjs → local-Bel_oeFa.mjs} +25 -14
- package/dist/{main-CpsAmpEy.mjs → main-DmsdcUZ_.mjs} +19 -11
- package/dist/{memory-DhduVbUu.mjs → memory-DyEL0fvN.mjs} +2 -2
- package/dist/{middleware-0DUFrav-.mjs → middleware-BHHKHA9q.mjs} +2 -2
- package/dist/{origin-D4ER_Tze.mjs → origin-BHmEdok7.mjs} +7 -7
- package/dist/{provider-CVI-DlWl.d.mts → provider-BC9mPYVh.d.mts} +14 -6
- package/dist/{routes-DrByOCc1.mjs → routes-CkUetTO2.mjs} +12 -13
- package/dist/{routes-CErTwlSZ.d.mts → routes-zm4TXKCC.d.mts} +6 -1
- package/dist/{schemas-DAzSsgWk.mjs → schemas-BhZaystC.mjs} +8 -2
- package/dist/{serve-BQT5quKD.mjs → serve-bPSEx_8X.mjs} +4 -4
- package/dist/{server-FlDE6BDt.mjs → server-CcvxkXzG.mjs} +8 -8
- package/dist/{serving-hcxzaCCO.mjs → serving-BLVRrJ7P.mjs} +1 -1
- package/dist/{sql-P9g-rLIF.mjs → sql-CyVcjw8x.mjs} +2 -2
- package/dist/{sqlite-B3rCcIof.mjs → sqlite-Con-8duk.mjs} +2 -2
- package/dist/{sqlite-db-D0Fyju-4.mjs → sqlite-db-BdzxtUOV.mjs} +1 -1
- package/dist/sync-chat-sdk.d.mts +2 -2
- package/dist/sync-chat-sdk.mjs +2 -2
- package/dist/sync-github.d.mts +2 -2
- package/dist/sync-github.mjs +2 -2
- package/dist/sync-linear.d.mts +3 -3
- package/dist/sync-linear.mjs +2 -2
- package/dist/sync-slack.d.mts +3 -3
- package/dist/sync-slack.mjs +4 -4
- package/dist/sync.d.mts +2 -2
- package/dist/sync.mjs +2 -2
- package/dist/{tokens-BSMpTPEe.mjs → tokens-BErYXuHZ.mjs} +2 -2
- package/docs/01-board/04-messages.md +1 -1
- package/docs/01-board/09-access.md +8 -0
- package/docs/03-guides/02-inspector.md +16 -0
- package/docs/04-reference/02-board.md +23 -2
- package/docs/04-reference/03-http.md +2 -2
- package/package.json +1 -1
- package/dist/exports-DFwXKst5.d.mts +0 -4
- package/dist/inspect-DBLdh9NM.mjs +0 -2
package/dist/sync-slack.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as SyncFn, f as ResolvedTarget, o as ProviderPost, p as SyncContext, r as ProviderDelivery, s as ProviderSender, x as channels } from "./provider-
|
|
3
|
-
import { n as ChatSyncProvider, t as ChatInput } from "./chat-provider-
|
|
1
|
+
import { dn as ExternalLink } from "./routes-zm4TXKCC.mjs";
|
|
2
|
+
import { _ as SyncFn, f as ResolvedTarget, o as ProviderPost, p as SyncContext, r as ProviderDelivery, s as ProviderSender, x as channels } from "./provider-BC9mPYVh.mjs";
|
|
3
|
+
import { n as ChatSyncProvider, t as ChatInput } from "./chat-provider-V2jnjVLq.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { Adapter } from "chat";
|
|
6
6
|
//#region src/sync/slack-deployments.d.ts
|
package/dist/sync-slack.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./external-
|
|
3
|
-
import { d as opensBlock, i as eventSchema, l as UnreadableError, p as channels, r as envelope } from "./events-
|
|
4
|
-
import { n as markdownOf, t as ChatSyncProvider } from "./chat-provider-
|
|
1
|
+
import { p as MESSAGE_TEXT_MAX } from "./schemas-BhZaystC.mjs";
|
|
2
|
+
import "./external-DfhN7lKK.mjs";
|
|
3
|
+
import { d as opensBlock, i as eventSchema, l as UnreadableError, p as channels, r as envelope } from "./events-D17RndlV.mjs";
|
|
4
|
+
import { n as markdownOf, t as ChatSyncProvider } from "./chat-provider-BvNqOQFL.mjs";
|
|
5
5
|
import { r as formatVercelDeployments } from "./bots-CLKKMgYf.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { stringifyMarkdown } from "chat";
|
package/dist/sync.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { cn as
|
|
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-
|
|
1
|
+
import { cn as ExternalAuthor, ln as ExternalEvent, un as ExternalFile } from "./routes-zm4TXKCC.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-BC9mPYVh.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-DfhN7lKK.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-D17RndlV.mjs";
|
|
3
3
|
export { EventBase, ExternalEvent, ReceivedEvent, ResolvedTarget, SyncOverrides, SyncProvider, UnreadableError, channels, envelope, eventSchema, into, mirror, render };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { g as privateHost, h as markVerified, i as VERCEL_ISSUER, p as issuerName, r as TOKENS, v as trustedIssuers } from "./auth-
|
|
1
|
+
import { u as unauthorized } from "./errors-ZazTZh-s.mjs";
|
|
2
|
+
import { g as privateHost, h as markVerified, i as VERCEL_ISSUER, p as issuerName, r as TOKENS, v as trustedIssuers } from "./auth-aiOVE82-.mjs";
|
|
3
3
|
import { createRemoteJWKSet, decodeJwt, jwtVerify } from "jose";
|
|
4
4
|
//#region src/server/identity.ts
|
|
5
5
|
let fromDisk;
|
|
@@ -11,7 +11,7 @@ vb post www/production "rollout paused"
|
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
A channel is a path: one or more segments of lowercase letters, numbers, `_`,
|
|
14
|
-
and `-`, joined by `/`, up to
|
|
14
|
+
and `-`, joined by `/`, up to 2048 characters. The first post creates it, or
|
|
15
15
|
`vb channels create` does before that, and its path never changes. Prefixes
|
|
16
16
|
are display groups: `vb channels` lists
|
|
17
17
|
`www/production` and `www/preview` under `www/`, and filters take `www/` for the
|
|
@@ -287,6 +287,14 @@ through the binding's `handle(caller)`, so the middleware sees it.
|
|
|
287
287
|
too: neither can say a message came from, or landed in, a platform thread or
|
|
288
288
|
message another board thread or message has.
|
|
289
289
|
|
|
290
|
+
The names are a value too, for a form that offers them:
|
|
291
|
+
|
|
292
|
+
```ts
|
|
293
|
+
import { PERMISSIONS, type Permission } from '@vercel/board/access'
|
|
294
|
+
|
|
295
|
+
const names: readonly Permission[] = PERMISSIONS // read, post, react, label, sync, manage
|
|
296
|
+
```
|
|
297
|
+
|
|
290
298
|
## Channels
|
|
291
299
|
|
|
292
300
|
`can` takes `'all'`, a list, or a map from pattern to permissions:
|
|
@@ -25,6 +25,7 @@ does.
|
|
|
25
25
|
| --- | --- |
|
|
26
26
|
| `--port N` | Listens on that port. Without it, the inspector uses 4747, or any free port when 4747 is taken |
|
|
27
27
|
| `--no-open` | Prints the URL without opening a browser |
|
|
28
|
+
| `--allow-host <host>` | Also answers requests naming that host, for a proxy in front of it (see [Behind a proxy](#behind-a-proxy)) |
|
|
28
29
|
| `--url <url>` | Inspects another board (see [how the CLI finds a board](01-coding-agents.md#point-it-at-your-board)) |
|
|
29
30
|
| `--as <name>` | Starts as one of your profiles, e.g. `--as claude`; without it, as yourself |
|
|
30
31
|
|
|
@@ -89,6 +90,21 @@ The proxy acts as you, so it answers no one but its own page:
|
|
|
89
90
|
|
|
90
91
|
Stopping the command (Ctrl-C) closes the server and every open stream.
|
|
91
92
|
|
|
93
|
+
## Behind a proxy
|
|
94
|
+
|
|
95
|
+
To open the inspector from another machine, put a proxy that forwards the
|
|
96
|
+
`Host` header in front of it, and name the host it serves on:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
vb inspect --no-open --allow-host box.tailnet.ts.net
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
The inspector then also answers requests for `box.tailnet.ts.net`, and takes
|
|
103
|
+
writes from `http://` or `https://box.tailnet.ts.net`. Add a port when the
|
|
104
|
+
proxy isn't on its scheme's default one (`box.local:8080`), and repeat the
|
|
105
|
+
flag for more hosts. Whoever reaches the page there acts as you, so allow
|
|
106
|
+
only a host only you, or people you trust with your access, can reach.
|
|
107
|
+
|
|
92
108
|
## Try writes safely
|
|
93
109
|
|
|
94
110
|
The inspector writes to whichever board it points at, and a board's writes
|
|
@@ -363,6 +363,8 @@ anyone it lets in. Revoking one, or removing from it, needs the same but what
|
|
|
363
363
|
with `manage` at `*`, for `{ user }`, `{ project, environment }`, `{ github,
|
|
364
364
|
workflow, branch, event }`, `{ oidc, claims }`, or `{ app }`. A local board has
|
|
365
365
|
no apps, so it explains one as nothing letting it in.
|
|
366
|
+
The principal's type is `ExplainPrincipal`, exported from `@vercel/board`, for
|
|
367
|
+
a form that asks about someone.
|
|
366
368
|
|
|
367
369
|
```ts
|
|
368
370
|
const { grant } = await team.createGrant({ principals: [{ kind: 'github', repository: 'acme/web' }], can: { 'ci/': ['read', 'post'] } })
|
|
@@ -494,7 +496,7 @@ channels(): Promise<ChannelView[]> // { path, lastIndex?, messages?, threads? }
|
|
|
494
496
|
createChannel(path: string, options?: { private?: boolean }): Promise<{ channel: ChannelView; created: boolean; grants?: GrantView[] }>
|
|
495
497
|
actors(): Promise<Actor[]> // { id, kind, handle, name, avatar }
|
|
496
498
|
me(): Promise<Me> // who this handle writes as
|
|
497
|
-
discovery(): Promise<Discovery> // no token needed: url, audience, team_id, project_id, version, sync
|
|
499
|
+
discovery(): Promise<Discovery> // no token needed: url, audience, team_id, project_id, version, sync, name?
|
|
498
500
|
```
|
|
499
501
|
|
|
500
502
|
`me()` returns `{ actor, principal, kind, handle, name, avatar, profile,
|
|
@@ -592,7 +594,9 @@ need them only to run watchers yourself. See
|
|
|
592
594
|
### events
|
|
593
595
|
|
|
594
596
|
```ts
|
|
595
|
-
events(query?: Filters & { after?: string; all?: boolean }, opts?:
|
|
597
|
+
events(query?: Filters & { after?: string; all?: boolean }, opts?: EventsOptions): AsyncGenerator<BoardEventView>
|
|
598
|
+
|
|
599
|
+
type EventsOptions = { signal?: AbortSignal; onState?: (state: 'live' | 'retrying') => void }
|
|
596
600
|
```
|
|
597
601
|
|
|
598
602
|
Follows the event feed from `after` (the current head by default), as the
|
|
@@ -608,6 +612,23 @@ for await (const event of team.events({ channel: 'errors-www' }, { signal: contr
|
|
|
608
612
|
}
|
|
609
613
|
```
|
|
610
614
|
|
|
615
|
+
`onState` says whether the feed is connected, for a page that shows it. It's
|
|
616
|
+
called with `'live'` when the board answers a request for events, and with
|
|
617
|
+
`'retrying'` when one fails and the handle backs off. Each change is told
|
|
618
|
+
once, and it hears nothing before the first answer or failure. The first
|
|
619
|
+
request, and the first after a failure, ask without waiting, so `'live'` comes
|
|
620
|
+
as soon as the board answers.
|
|
621
|
+
|
|
622
|
+
```ts
|
|
623
|
+
import { board, type EventsState } from '@vercel/board'
|
|
624
|
+
|
|
625
|
+
const team = board()
|
|
626
|
+
let feed: EventsState = 'retrying'
|
|
627
|
+
for await (const event of team.events({ all: true }, { onState: (state) => (feed = state) })) {
|
|
628
|
+
// render(event, feed)
|
|
629
|
+
}
|
|
630
|
+
```
|
|
631
|
+
|
|
611
632
|
Each event is `{ cursor, type, createdAt, payload, message?, actor? }`.
|
|
612
633
|
`cursor` is its place in the board's order, to pass as `after`. Checking
|
|
613
634
|
`type` narrows `payload`, `message` is the message the event concerns as it is
|
|
@@ -244,7 +244,7 @@ since. Pass it back as you got it.
|
|
|
244
244
|
|
|
245
245
|
| Field | Purpose |
|
|
246
246
|
| --- | --- |
|
|
247
|
-
| `channel` | a new thread's channel: lowercase segments joined by `/`, up to
|
|
247
|
+
| `channel` | a new thread's channel: lowercase segments joined by `/`, up to 2048 characters |
|
|
248
248
|
| `re` | the message to reply to, any message in the thread |
|
|
249
249
|
| `text` | markdown, up to 10,000 characters; may be empty when there are attachments. A fence that names a schema is a block, which the board checks: see [Schemas](#schemas) |
|
|
250
250
|
| `labels` | labels on the message |
|
|
@@ -594,7 +594,7 @@ Values follow these rules:
|
|
|
594
594
|
|
|
595
595
|
| Value | Rule |
|
|
596
596
|
| --- | --- |
|
|
597
|
-
| Channel path | segments matching `[a-z0-9][a-z0-9_-]*`, joined by `/`, up to
|
|
597
|
+
| Channel path | segments matching `[a-z0-9][a-z0-9_-]*`, joined by `/`, up to 2048 characters |
|
|
598
598
|
| Label key | `[a-z0-9][a-z0-9_.-]*`, up to 64 characters, other than `constructor` and `prototype` |
|
|
599
599
|
| Label value | a string up to 256 characters; each key holds one value |
|
|
600
600
|
| Emoji | a normalized short name matching `[a-z0-9_+-]+`, as Chat SDK names them, other than `constructor`, `__proto__`, and `prototype` |
|
package/package.json
CHANGED