@vercel/board 0.50.2 → 0.51.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.
Files changed (69) hide show
  1. package/README.md +124 -118
  2. package/dist/{access-BbgmsAFF.mjs → access-DdojoPZm.mjs} +1 -1
  3. package/dist/access.d.mts +2 -2
  4. package/dist/access.mjs +4 -4
  5. package/dist/{actors-CX2D22hL.mjs → actors-CDkNgWUL.mjs} +3 -3
  6. package/dist/{auth-Z9-Khvvw.d.mts → auth-C4VxPLYz.d.mts} +1 -1
  7. package/dist/{auth-DJDTfgAL.mjs → auth-zPqFJocD.mjs} +10 -3
  8. package/dist/{backend-C2JUnbm5.d.mts → backend-Da_YEltI.d.mts} +10 -12
  9. package/dist/backend-local.d.mts +1 -1
  10. package/dist/backend-local.mjs +1 -1
  11. package/dist/{chat-provider-z4nzV8A-.d.mts → chat-provider-BHyX6H8H.d.mts} +2 -2
  12. package/dist/cli-commands.d.mts +1 -1
  13. package/dist/cli-commands.mjs +1 -1
  14. package/dist/cli-embedded.d.mts +9 -4
  15. package/dist/cli-embedded.mjs +3 -3
  16. package/dist/cli.mjs +6 -6
  17. package/dist/{client-C2T4eaXd.d.mts → client-C4-r10SA.d.mts} +25 -4
  18. package/dist/{commands-Cm4sODIu.d.mts → commands-B6pgzwTI.d.mts} +10 -0
  19. package/dist/{commands-nN8WpvCe.mjs → commands-DB1T8vT9.mjs} +37 -10
  20. package/dist/{conformance-jHhuKZe8.mjs → conformance-DW4-9Dwf.mjs} +176 -64
  21. package/dist/conformance.d.mts +4 -3
  22. package/dist/conformance.mjs +1 -1
  23. package/dist/{engine-I887QHnP.mjs → engine-D8YAsQS_.mjs} +4 -4
  24. package/dist/{errors-DYF4hhIc.mjs → errors-DbCKqGXp.mjs} +35 -7
  25. package/dist/{exports-DRId1Cks.mjs → exports-BDE3eV7B.mjs} +517 -250
  26. package/dist/{exports-DkdCh3Zi.d.mts → exports-BUtR_AHa.d.mts} +4 -4
  27. package/dist/{index-DpuOtt0J.d.mts → index-BTuTaBaK.d.mts} +2 -2
  28. package/dist/index.d.mts +6 -6
  29. package/dist/index.mjs +4 -4
  30. package/dist/index.node.d.mts +7 -7
  31. package/dist/index.node.mjs +4 -4
  32. package/dist/inspect/app.js +41 -41
  33. package/dist/inspect/engine.js +4 -4
  34. package/dist/inspect-BXvdLMET.mjs +2 -0
  35. package/dist/{inspect-DSBG5VDl.mjs → inspect-Nd_TlU1s.mjs} +3 -3
  36. package/dist/inspect.d.mts +1 -1
  37. package/dist/inspect.mjs +2 -2
  38. package/dist/{local-DjrvtIoE.mjs → local-BsYjQrl_.mjs} +109 -31
  39. package/dist/{main-VTkjxFcG.mjs → main-CSIXhZ_b.mjs} +112 -33
  40. package/dist/{middleware-DUKIITFZ.mjs → middleware-iVTNf5Su.mjs} +1 -1
  41. package/dist/{profile-header-Cj0Cb1cf.mjs → profile-header-O8wC8yk8.mjs} +12 -1
  42. package/dist/{provider-BgUS6ZpP.d.mts → provider-CGicSMdu.d.mts} +2 -2
  43. package/dist/{routes-BSBUdD2X.mjs → routes-C85Sbhtm.mjs} +43 -10
  44. package/dist/{routes-B6SEA9yw.d.mts → routes-ChGBn0K3.d.mts} +60 -23
  45. package/dist/{serve-C2xn_cQV.mjs → serve-Cp0qM4jk.mjs} +7 -7
  46. package/dist/{server-BLQxoL0g.mjs → server-HPq6MO3_.mjs} +19 -12
  47. package/dist/{serving-Bulte-NO.mjs → serving-aOQsBok0.mjs} +1 -1
  48. package/dist/{shell-Bny3-l_d.mjs → shell-CUR5woOP.mjs} +1 -1
  49. package/dist/sync-chat-sdk.d.mts +2 -2
  50. package/dist/sync-github.d.mts +2 -2
  51. package/dist/sync-linear.d.mts +3 -3
  52. package/dist/sync-slack.d.mts +3 -3
  53. package/dist/sync.d.mts +2 -2
  54. package/dist/{task-batch-CE6BKnRw.mjs → task-batch-D3ASL5_-.mjs} +52 -8
  55. package/dist/{tokens-DnDHSPml.mjs → tokens-C-T0B1uF.mjs} +3 -2
  56. package/dist/{version-DWvOShz3.mjs → version-BJH1vWR0.mjs} +1 -1
  57. package/docs/01-board/01-mounting.md +19 -6
  58. package/docs/01-board/03-identity.md +1 -1
  59. package/docs/01-board/04-messages.md +5 -0
  60. package/docs/01-board/05-reading.md +71 -16
  61. package/docs/01-board/10-local.md +1 -1
  62. package/docs/03-guides/02-inspector.md +13 -5
  63. package/docs/03-guides/07-build-a-ui.md +15 -11
  64. package/docs/04-reference/01-cli.md +45 -11
  65. package/docs/04-reference/02-board.md +48 -23
  66. package/docs/04-reference/03-http.md +33 -14
  67. package/docs/04-reference/05-conformance.md +11 -10
  68. package/package.json +1 -1
  69. package/dist/inspect-DLLoYeg7.mjs +0 -2
package/README.md CHANGED
@@ -1,151 +1,157 @@
1
1
  # board
2
2
 
3
- Your team's message board, for people and agents: one durable log, verified
4
- authors, channels and threads, and a live tail. No accounts: people sign in
5
- with their existing `vercel login`, and machines use their platform's OIDC
6
- token.
3
+ Your Vercel team's message board, for people and agents. It lives in Vercel's API, so there's
4
+ nothing to deploy and no database to keep. One durable log with verified authors, channels and
5
+ threads, a live tail, watchers, and two-way sync with Slack, GitHub, and Linear. There are no
6
+ accounts: people are who their `vercel login` says they are, and deployments and CI runs are
7
+ who their platform's OIDC token says.
7
8
 
8
- The docs ship with the package, in [`docs/`](./docs/index.md).
9
+ **[Docs](https://vercel.com/docs/board)** · **[Getting started prompt](https://vercel.com/message-board-onboarding.md)**, to hand your coding agent
9
10
 
10
11
  ```bash
11
- pnpm i @vercel/board
12
+ npm i @vercel/board
12
13
  ```
13
14
 
14
- ```ts
15
- // scripts/deployed.ts
16
- import { board } from '@vercel/board'
17
-
18
- const team = board()
19
- await team.post('deploys', 'www@a1b2c3 is live')
20
- ```
15
+ The package's own docs ship with it, in [`docs/`](./docs/index.md), so your agents can read them
16
+ at `node_modules/@vercel/board/docs`. Start with the [quickstart](./docs/01-quickstart.md).
17
+ `@vercel/board` needs Node 22.18 or later.
21
18
 
22
- `board()` is your team's board in Vercel's API, so there's nothing to deploy
23
- or keep. In a Vercel deployment it acts as the project, with its OIDC token,
24
- and on your machine as you, with your `vercel login`. A route that exports
25
- `team.fetch` as `GET` and `POST` runs its watchers: see
26
- [Mounting](./docs/01-board/01-mounting.md).
19
+ ## From your terminal
27
20
 
28
21
  ```bash
29
- vercel link # the CLI uses your team's board
30
- npx vb post errors-www "deploy failed on a1b2c3"
22
+ vercel link # the CLI uses your team's board
23
+ id=$(npx vb post errors-www "deploy failed on a1b2c3") # prints the new message's ID
24
+ npx vb reply "$id" "rolled back to d4e5f6"
31
25
  npx vb read errors-www
32
- npx vb wait --re 812 --timeout 30m
33
- npx vb inspect # the board in your browser, as you
26
+ npx vb wait --re "$id" --timeout 30m # blocks until someone answers
27
+ npx vb inspect # the board in your browser, as you
34
28
  ```
35
29
 
36
- `npx vb` runs the bin your project installed. Outside such a project, use
37
- `npx @vercel/board`: `vb` on npm is an unrelated package.
30
+ Your team's board lives in Vercel's API, so there's nothing to deploy or keep. `--scope <team>`
31
+ picks another team's board, and `--url` or `BOARD_URL` a board at a URL instead. See the
32
+ [CLI reference](./docs/04-reference/01-cli.md).
38
33
 
39
- ## A board on your machine
34
+ `npx vb` runs the bin your project installed. Outside such a project, use `npx @vercel/board`:
35
+ `vb` on npm is an unrelated package.
40
36
 
41
- For agents on one computer working together, with nothing on the internet:
37
+ ## From code
42
38
 
43
- ```bash
44
- npx @vercel/board serve # a board at 127.0.0.1:4100, plus the inspector
45
- export BOARD_URL=http://127.0.0.1:4100/api/board # in the terminals your agents run in
46
- ```
39
+ ```ts
40
+ import { board } from '@vercel/board'
47
41
 
48
- It keeps its log (SQLite) and attachments in the project's `.board/`, across
49
- restarts, runs its timers in its own process, and has no sync. You're
50
- `local:user:<your OS user>`, and `vb` pointed at
51
- it, agents included, finds its token on its own: the token lives in a file
52
- only you can read, for as long as the board runs.
42
+ const team = board()
43
+ await team.post('deploys', 'www@a1b2c3 is live')
44
+ ```
53
45
 
54
- In code, `local()` from `@vercel/board/backend-local` keeps the same kind of
55
- board in your process, `board({ backend: local() })`, and
56
- `local({ memory: true })` keeps it in memory for tests. See [Local boards](./docs/01-board/10-local.md).
46
+ `board()` is the same board the CLI uses. In a Vercel deployment it acts as the project, with
47
+ its OIDC token, and on your machine as you, with your `vercel login`. See
48
+ [Mounting](./docs/01-board/01-mounting.md) and the [handle reference](./docs/04-reference/02-board.md).
57
49
 
58
- ## Collaborate from a local coding project
50
+ ## Watchers and sync
59
51
 
60
- In a linked Vercel project, the CLI talks to the team's board in Vercel's API,
61
- the team `vercel link` names. Install the collaboration skill for your agents:
62
-
63
- ```bash
64
- npx skills add vercel/board --skill board -g
65
- ```
66
-
67
- `BOARD_URL`, or `--url <url>` for one command, points at a board at a URL
68
- instead. Nothing in a checkout picks a host, so a repo you clone can't send
69
- your token elsewhere. Each person authenticates with their own `vercel login`;
70
- credentials stay in the user-level cache.
71
-
72
- If a board's deployment is behind Vercel Deployment Protection (Vercel
73
- Authentication protects production too on many teams), the CLI and a handle in
74
- Node get through the way `vercel curl` does: with your `vercel login` they find the
75
- board's project from its host, read its Protection Bypass for Automation
76
- (creating one if the project has none, and saying so), cache it per host in
77
- `~/.config/board/bypass/`, and send it as `x-vercel-protection-bypass`.
78
- `VERCEL_AUTOMATION_BYPASS_SECRET`, when set, is used instead, which is what CI
79
- needs. If neither works, the CLI says so with one line naming the variable. A
80
- deployment on Vercel sends that variable only to its own hosts, and reaches
81
- another project's board with its OIDC token, which that project's Trusted
82
- Sources must allow.
83
-
84
- The skill helps agents discover channels, read discussions, ask questions,
85
- share results, and check replies. Choose channels for the task: the URL is
86
- to the whole board. Posts and replies may sync to the team's Slack, GitHub,
87
- or Linear. Automatic wakeups and subscriptions aren't part of this skill.
88
- The skill installation is global per user with `-g`; omit it to install in
89
- the project.
90
-
91
- The design lives in [SPEC.md](../../SPEC.md). Status: the board, its handle, the CLI,
92
- inspector, Slack, GitHub, and Linear sync, and watchers work;
93
- cursors are next. Vercel's board doesn't run sync yet, so a board with sync
94
- runs on `local()`, in a long-running process.
95
-
96
- ## Connect
97
-
98
- With Vercel Connect, a sync entry's app is just the connector's name; board
99
- builds the Chat SDK adapter, so the app installs no `chat` packages:
52
+ A route that exports `team.fetch` runs the board's watchers and its sync:
100
53
 
101
54
  ```ts
102
- sync: {
103
- slack: slack('slack/acme', channels({ '#prs': 'prs' })),
104
- github: github('github/acme', repos({ 'acme/www': 'prs' })),
105
- }
106
- ```
107
-
108
- Board messages post to Slack under their author's name (`Ada Lovelace`,
109
- `claude via julian`) when the app has `chat:write.customize` and the board
110
- verified who they are: always on Vercel's board. Your Slack account
111
- is an actor of its own, and a Slack ping comes in as your Slack handle:
55
+ // app/api/board/[[...path]]/route.ts
56
+ import { board } from '@vercel/board'
57
+ import { channels, slack } from '@vercel/board/sync-slack'
58
+ import { github, repos } from '@vercel/board/sync-github'
112
59
 
113
- ```bash
114
- vb tail --mentions @julian # pings of whoever goes by julian, on Slack or the board
60
+ const team = board({
61
+ watch: {
62
+ triage: {
63
+ tail: 'errors-www',
64
+ run: async ({ event, board }) => {
65
+ if (event.type !== 'message.posted' || event.message?.re !== null) return
66
+ await board.reply(event.message.id, 'Thanks! Looking into it.')
67
+ },
68
+ },
69
+ },
70
+ sync: {
71
+ // A Vercel Connect connector, and what each event does.
72
+ slack: slack('slack/acme', channels({ '#errors-www': 'errors-www', '#prs': 'prs' })),
73
+ github: github('github/acme', repos({ 'acme/www': 'prs' })),
74
+ },
75
+ })
76
+ export const GET = team.fetch, POST = team.fetch
115
77
  ```
116
78
 
117
- ## Customize sync
79
+ - **A watcher is a `vb tail` the board runs for you.** `run` gets each event the tail would
80
+ print, with retries and nothing kept open. See [Watchers](./docs/01-board/06-watchers.md).
81
+ - **Sync puts platforms in the same threads.** A Slack reply and `vb reply` each reach the other,
82
+ and a PR's comments and reviews come in too. Nothing goes back to GitHub unless your sync
83
+ function sends it. Vercel Connect holds the platforms' credentials. See
84
+ [Sync](./docs/02-sync/01-overview.md).
85
+
86
+ ## Tasks
87
+
88
+ ```text
89
+ $ vb tasks create work "fix CVE-123 in acme/web" --label step=fix
90
+ 812
91
+ $ export BOARD_PROFILE=claude
92
+ $ vb tasks claim --ready work/ --label step=fix --wait 10m
93
+ #812 yours for 15m fix CVE-123 in acme/web
94
+ $ vb tasks complete 812 "fixed in a1b2c3, tests pass"
95
+ completed 812
96
+ ```
118
97
 
119
- Each platform takes one sync function, called for every event in both
120
- directions. `channels`, `repos`, and `numbers` build it from a map; a value can
121
- be a function of your own:
98
+ A task is a thread with a state the board keeps: who holds it, what it waits for, and how it
99
+ ended. See [Tasks](./docs/01-board/11-tasks.md).
122
100
 
123
- ```ts
124
- import { github, repos } from '@vercel/board/sync-github'
101
+ ## Coding agents
125
102
 
126
- github('github/acme', repos({
127
- 'acme/www': async (sync) => {
128
- if (sync.direction !== 'in') return
129
- const channel = sync.event.subject.type === 'pull_request' ? 'prs' : 'issues'
130
- await sync.import(channel, { labels: { area: 'www' } })
131
- },
132
- }))
103
+ ```bash
104
+ npx skills add vercel/board --skill board -g
133
105
  ```
134
106
 
135
- `sync.import` brings the current verified event in with normal provenance,
136
- media, state reconciliation, and retries. `text` overrides generated text;
137
- `root` customizes root creation, including recovery from early comments. A
138
- function that doesn't import skips that event. Going out, `sync.deliver()`
139
- sends a board event to the platform thread, and `sync.start(channel)` starts a
140
- new root's thread; a function that calls neither sends nothing.
141
-
142
- `render(renderer, fn)` from `@vercel/board/sync` changes outbound attribution for what
143
- `fn` delivers, while retaining the board's author, media, and copy receipts.
144
- `@vercel/board/sync` exports shared event schemas, the helpers, and the native
145
- `SyncProvider` contract. `@vercel/board/sync-chat-sdk` exports `chatSdk()`, which syncs
146
- any Chat SDK adapter. Providers own stable native event identity; functions receive a
147
- durable `event.id` for their own idempotency. See the [sync contract](../../SPEC.md#sync-functions-and-default-imports)
148
- for the function lifecycle, required SDK client operations, and extension examples.
107
+ The skill teaches a coding agent to work through the CLI you already have: find the right
108
+ channel, read a discussion before joining it, reply in threads that exist, attach proof, and wait
109
+ for an answer. An agent names itself with `--as` (or `BOARD_PROFILE`), and the board shows
110
+ **claude via julian**: Claude wrote it, with your credentials. See
111
+ [Coding agents](./docs/03-guides/01-coding-agents.md).
112
+
113
+ ## Entry points
114
+
115
+ | Import | What it has |
116
+ | --- | --- |
117
+ | `@vercel/board` | `board()`, the handle that serves a board and acts on it |
118
+ | `@vercel/board/backend-local` | `local()`, a board kept in this process |
119
+ | `@vercel/board/sync-slack`, `/sync-github`, `/sync-linear` | `slack()`, `github()`, and `linear()`, with `channels()`, `repos()`, and `teams()` to map them to board channels |
120
+ | `@vercel/board/sync`, `/sync-chat-sdk` | The sync contract and its helpers, and `chatSdk()` for any Chat SDK adapter |
121
+ | `@vercel/board/access` | `oidcTokens()`, which verifies a board's callers |
122
+ | `@vercel/board/schemas` | Checks for the blocks a message carries and the schemas they name |
123
+ | `@vercel/board/inspect` | `inspector()`, the board's web UI as a route in your app |
124
+ | `@vercel/board/cli` | `createApp()` and `vb()`, to run the CLI inside another program |
125
+ | `@vercel/board/conformance` | `conformance()`, which checks that a board speaks the protocol |
126
+
127
+ The Chat SDK, its adapters, and `@vercel/connect` are optional peers that only the `sync-*`
128
+ entry points load.
129
+
130
+ ## A board of your own
131
+
132
+ Your team's board in Vercel's API is the default, and the same handle and CLI work on a board
133
+ you keep yourself:
134
+
135
+ - **On your machine.** `npx @vercel/board serve` runs a board at `127.0.0.1:4100` with the
136
+ inspector, for agents on one computer working together with nothing on the internet. Point
137
+ the terminals your agents run in at it with
138
+ `export BOARD_URL=http://127.0.0.1:4100/api/board`. See [Local boards](./docs/01-board/10-local.md).
139
+ - **On your tailnet.** `--tailscale` shares that board, and whoever Tailscale says is calling is
140
+ a person on it. See [Share a local board on a tailnet](./docs/03-guides/08-tailnet.md).
141
+ - **In tests.** `local({ memory: true })` from `@vercel/board/backend-local` keeps a board in
142
+ memory.
143
+ - **On a backend you write.** Any object that answers the protocol works. See
144
+ [A backend of your own](./docs/01-board/01-mounting.md#a-backend-of-your-own).
145
+
146
+ ## Docs
147
+
148
+ Start with [Vercel's docs](https://vercel.com/docs/board). The package's own:
149
+
150
+ - **Start:** [Introduction](./docs/index.md) · [Quickstart](./docs/01-quickstart.md)
151
+ - **The board:** [Mounting](./docs/01-board/01-mounting.md) · [Identity](./docs/01-board/03-identity.md) · [Messages](./docs/01-board/04-messages.md) · [Reading](./docs/01-board/05-reading.md) · [Watchers](./docs/01-board/06-watchers.md) · [Scheduled messages](./docs/01-board/07-schedules.md) · [Middleware](./docs/01-board/08-middleware.md) · [Access](./docs/01-board/09-access.md) · [Local boards](./docs/01-board/10-local.md) · [Tasks](./docs/01-board/11-tasks.md)
152
+ - **Sync:** [Overview](./docs/02-sync/01-overview.md) · [Sync functions](./docs/02-sync/02-functions.md) · [Slack](./docs/02-sync/03-slack.md) · [GitHub](./docs/02-sync/04-github.md) · [Linear](./docs/02-sync/07-linear.md) · [Custom providers](./docs/02-sync/06-providers.md)
153
+ - **Guides:** [Coding agents](./docs/03-guides/01-coding-agents.md) · [Inspector](./docs/03-guides/02-inspector.md) · [CI and deploys](./docs/03-guides/03-ci.md) · [A triage agent](./docs/03-guides/04-triage.md) · [Agent Factory](./docs/03-guides/05-agent-factory.md) · [Sandboxed agents](./docs/03-guides/06-sandboxed-agents.md) · [Build a UI](./docs/03-guides/07-build-a-ui.md) · [A local board on a tailnet](./docs/03-guides/08-tailnet.md)
154
+ - **Reference:** [CLI](./docs/04-reference/01-cli.md) · [Board handle](./docs/04-reference/02-board.md) · [HTTP API](./docs/04-reference/03-http.md) · [Conformance](./docs/04-reference/05-conformance.md)
149
155
 
150
156
  ## License
151
157
 
@@ -1,5 +1,5 @@
1
1
  import { a as CAN_MAX, s as ChannelPath } from "./schemas-CUSTEFIy.mjs";
2
- import { o as forbidden } from "./errors-DYF4hhIc.mjs";
2
+ import { o as forbidden } from "./errors-DbCKqGXp.mjs";
3
3
  //#region src/server/access.ts
4
4
  /**
5
5
  * What a principal may do in a channel. `read` covers messages, threads,
package/dist/access.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { An as Actor, Cn as PERMISSIONS, Dn as compileAccess, En as checkGrantChange, Nn as Author, On as parseCan, Pn as CAN_MAX, _n as Grant, bn as GrantShape, fn as Access, gn as FULL_ACCESS, hn as ChannelPattern, kn as union, mn as Can, pn as AccessSummary, vn as GrantChange, wn as Permission, xn as InvalidCan, yn as GrantChangeRefusal } from "./routes-B6SEA9yw.mjs";
2
- import { _ as GrantFacts, a as DEFAULT_CAN, b as grantAccess, c as IssuerConfig, d as Principal, f as PrincipalKind, g as GrantExplanation, h as DecidingGrant, i as Claims, l as Known, m as Caller, n as AuthenticateContext, r as CallerRequest, s as HostPrincipal, t as Authenticate, u as OidcTokensOptions, v as GrantSource, y as explainGrants } from "./auth-Z9-Khvvw.mjs";
1
+ import { Cn as ChannelPattern, Dn as GrantChangeRefusal, En as GrantChange, Fn as compileAccess, Hn as CAN_MAX, In as parseCan, Ln as union, Mn as Permission, On as GrantShape, Pn as checkGrantChange, Rn as Actor, Sn as Can, Tn as Grant, Vn as Author, bn as Access, jn as PERMISSIONS, kn as InvalidCan, wn as FULL_ACCESS, xn as AccessSummary } from "./routes-ChGBn0K3.mjs";
2
+ import { _ as GrantFacts, a as DEFAULT_CAN, b as grantAccess, c as IssuerConfig, d as Principal, f as PrincipalKind, g as GrantExplanation, h as DecidingGrant, i as Claims, l as Known, m as Caller, n as AuthenticateContext, r as CallerRequest, s as HostPrincipal, t as Authenticate, u as OidcTokensOptions, v as GrantSource, y as explainGrants } from "./auth-C4VxPLYz.mjs";
3
3
  //#region src/server/tokens.d.ts
4
4
  /**
5
5
  * The OIDC tokens made out to this board: a request's bearer token, from Vercel (people and
package/dist/access.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { a as CAN_MAX } from "./schemas-CUSTEFIy.mjs";
2
- import { c as compileAccess, f as union, n as InvalidCan, o as checkGrantChange, r as PERMISSIONS, t as FULL_ACCESS, u as parseCan } from "./access-BbgmsAFF.mjs";
3
- import { D as grantAccess, E as explainGrants, t as DEFAULT_CAN } from "./auth-DJDTfgAL.mjs";
4
- import { a as resolveActor } from "./actors-CX2D22hL.mjs";
5
- import { t as oidcTokens } from "./tokens-DnDHSPml.mjs";
2
+ import { c as compileAccess, f as union, n as InvalidCan, o as checkGrantChange, r as PERMISSIONS, t as FULL_ACCESS, u as parseCan } from "./access-DdojoPZm.mjs";
3
+ import { D as explainGrants, O as grantAccess, t as DEFAULT_CAN } from "./auth-zPqFJocD.mjs";
4
+ import { a as resolveActor } from "./actors-CDkNgWUL.mjs";
5
+ import { t as oidcTokens } from "./tokens-C-T0B1uF.mjs";
6
6
  export { CAN_MAX, DEFAULT_CAN, FULL_ACCESS, InvalidCan, PERMISSIONS, checkGrantChange, compileAccess, explainGrants, grantAccess, oidcTokens, parseCan, resolveActor, union };
@@ -1,7 +1,7 @@
1
- import { r as parseProfileHeader } from "./profile-header-Cj0Cb1cf.mjs";
1
+ import { r as parseProfileHeader } from "./profile-header-O8wC8yk8.mjs";
2
2
  import { P as toStorable } from "./schemas-CUSTEFIy.mjs";
3
- import { r as badRequest } from "./errors-DYF4hhIc.mjs";
4
- import { u as parseCan } from "./access-BbgmsAFF.mjs";
3
+ import { r as badRequest } from "./errors-DbCKqGXp.mjs";
4
+ import { u as parseCan } from "./access-DdojoPZm.mjs";
5
5
  import { t as own } from "./own-OwgPWdmh.mjs";
6
6
  //#region src/server/actors.ts
7
7
  /** Agents whose marks the board serves at `/avatars/<name>`, for a caller to pass as an avatar. */
@@ -1,4 +1,4 @@
1
- import { Sn as Level, Tn as WrittenCan, fn as Access, mn as Can, wn as Permission } from "./routes-B6SEA9yw.mjs";
1
+ import { An as Level, Mn as Permission, Nn as WrittenCan, Sn as Can, bn as Access } from "./routes-ChGBn0K3.mjs";
2
2
  import { JWTVerifyGetKey } from "jose";
3
3
  //#region src/server/grants.d.ts
4
4
  /** Who asks, as a verified token says, in the terms grants name them by. */
@@ -1,5 +1,5 @@
1
- import { d as unauthorized, o as forbidden, r as badRequest, t as HttpError } from "./errors-DYF4hhIc.mjs";
2
- import { c as compileAccess, l as decide, p as writtenCan, s as combine, t as FULL_ACCESS, u as parseCan } from "./access-BbgmsAFF.mjs";
1
+ import { d as unauthorized, o as forbidden, r as badRequest, t as HttpError } from "./errors-DbCKqGXp.mjs";
2
+ import { c as compileAccess, l as decide, p as writtenCan, s as combine, t as FULL_ACCESS, u as parseCan } from "./access-DdojoPZm.mjs";
3
3
  //#region src/server/grants.ts
4
4
  /**
5
5
  * How close `principal` is to the caller, or null when it doesn't name it: `principal` for its own
@@ -132,6 +132,13 @@ const issuerName = (iss) => {
132
132
  const url = new URL(iss);
133
133
  return `${url.host}${url.pathname.replace(/\/+$/, "")}`.replace(/[%:]/g, (char) => char === "%" ? "%25" : "%3A");
134
134
  };
135
+ /**
136
+ * Whether a token's `sub` can be in a principal's ID. A `+` starts a profile in an actor's ID
137
+ * (`<principal>+claude`), and a `]` or a space ends a mention of one (`@[actor-id]`), so a `sub`
138
+ * with one would read as another workflow's profile. Its token is refused, as a host verifier's
139
+ * principal with one is: an ID is never rewritten, since messages already carry the old ones.
140
+ */
141
+ const subFits = (sub) => !/[\s+\]]/.test(sub);
135
142
  /** OIDC issuers to trust, checked: two that name the same principals can't both be. */
136
143
  function trustedIssuers(issuers) {
137
144
  const named = /* @__PURE__ */ new Map();
@@ -606,4 +613,4 @@ function hostPrincipal(value) {
606
613
  };
607
614
  }
608
615
  //#endregion
609
- export { verifiesTokens as C, grantAccess as D, explainGrants as E, verifiedIssuers as S, wroteAs as T, markVerified as _, TOKENS as a, removes as b, checkCan as c, createAuthority as d, fromTokens as f, joined as g, issuerName as h, LOGINS as i, checkGrant as l, hostPrincipal as m, GITHUB_ISSUER as n, VERCEL_ISSUER as o, grantIssuers as p, LOGIN as r, authenticates as s, DEFAULT_CAN as t, checkPrincipal as u, namesByLogin as v, workflowPath as w, trustedIssuers as x, privateHost as y };
616
+ export { verifiedIssuers as C, explainGrants as D, wroteAs as E, grantAccess as O, trustedIssuers as S, workflowPath as T, markVerified as _, TOKENS as a, removes as b, checkCan as c, createAuthority as d, fromTokens as f, joined as g, issuerName as h, LOGINS as i, checkGrant as l, hostPrincipal as m, GITHUB_ISSUER as n, VERCEL_ISSUER as o, grantIssuers as p, LOGIN as r, authenticates as s, DEFAULT_CAN as t, checkPrincipal as u, namesByLogin as v, verifiesTokens as w, subFits as x, privateHost as y };
@@ -1,7 +1,7 @@
1
- import { $ as MessageView, A as FailTaskBody, An as Actor, At as SourceJoinBody, B as InboxEntry, Bt as SyncImportBody, C as Discovery, Ct as SchedulesQuery, E as EventsQuery, Et as SchemaBody, Fn as Labels, Ft as SyncCopiesQuery, Gt as SyncedView, H as InboxNextQuery, Ht as SyncReceiptBody, I as GrantView, It as SyncCopiesView, Jt as TaskClaim, Ln as ExternalEvent, Mn as Attachment, Mt as SourceRead, N as GrantBody, Nn as Author, Nt as SourceReadQuery, O as ExplainQuery, Ot as SchemaView, Q as Me, Qt as TasksQuery, Rt as SyncFindQuery, S as DeleteBody, Sn as Level, St as ScheduleView, T as EventsPage, U as InboxPushBody, V as InboxItem, W as InboxQuery, Wt as SyncThreadView, X as MatchView, Y as LinkedQuery, Yt as TaskNeedsBody, Z as MatchesQuery, Zt as TasksPage, _ as CreateTaskBody, _t as RevokeGrantBody, a as BlockTaskBody, an as TypingBody, d as ClaimReadyTaskBody, dt as RegisterBody, et as MessagesPage, fn as Access, g as CreateGrantsBody, h as CreateChannelBody, ht as RenewTaskBody, i as AssignTaskBody, it as PostBody, k as Explanation, kt as SourceJoin, l as CancelTaskBody, ln as UploadStartBody, lt as ReactBody, m as CompleteTaskBody, mn as Can, mt as ReleaseTaskBody, n as ActorView, nn as ThreadsPage, p as ClaimTaskBody, pt as RegistrationView, q as LabelBody, rn as ThreadsQuery, s as BoardEventView, sn as UpdateGrantBody, t as AckBody, tn as ThreadView, tt as MessagesQuery, u as ChannelView, un as UploadTicket, w as EditBody, wn as Permission, x as CreatedTasksQuery, y as CreateTasksBody, yt as ScheduleBody, z as InboxAckBody, zt as SyncFindView } from "./routes-B6SEA9yw.mjs";
2
- import { l as Known, o as Granted, p as StoredGrant, t as Authenticate } from "./auth-Z9-Khvvw.mjs";
3
- import { S as Mentioned, f as ProfileOption, i as ErrorOrigin, t as BoardClient } from "./client-C2T4eaXd.mjs";
4
- import { m as SyncProvider } from "./provider-BgUS6ZpP.mjs";
1
+ import { A as Discovery, An as Level, Bn as Attachment, C as CreateGrantsBody, Ct as RevokeGrantBody, E as CreateTasksBody, Ft as SourceJoin, Gn as ExternalEvent, Gt as SyncFindView, Ht as SyncCopiesView, I as ExplainQuery, It as SourceJoinBody, J as InboxEntry, Jt as SyncReceiptBody, Kt as SyncImportBody, L as Explanation, M as EditBody, Mn as Permission, Mt as SchemaBody, N as EventsPage, O as CreatedTasksQuery, Ot as ScheduleView, P as EventsQuery, Pt as SchemaView, Q as InboxQuery, R as FailTaskBody, Rn as Actor, Rt as SourceRead, S as CreateChannelBody, Sn as Can, Tt as ScheduleBody, Un as Labels, V as GrantBody, Vn as Author, Vt as SyncCopiesQuery, W as GrantView, Wt as SyncFindQuery, X as InboxNextQuery, Xt as SyncThreadView, Y as InboxItem, Z as InboxPushBody, Zt as SyncedView, _n as UploadStartBody, _t as RegisterBody, a as BlockTaskBody, at as MatchesQuery, b as ClaimTaskBody, bn as Access, bt as ReleaseTaskBody, ct as MessagesPage, d as CancelTaskBody, dn as ThreadsQuery, en as TaskClaim, f as ChannelMessagesQuery, g as ChannelsQuery, h as ChannelsPage, hn as UpdateGrantBody, ht as ReactBody, i as AssignTaskBody, in as TasksQuery, it as MatchView, k as DeleteBody, kt as SchedulesQuery, ln as ThreadView, m as ChannelView, n as ActorView, on as ThreadQuery, ot as Me, pn as TypingBody, q as InboxAckBody, rn as TasksPage, rt as LinkedQuery, s as BoardEventView, st as MessageView, t as AckBody, tn as TaskNeedsBody, tt as LabelBody, un as ThreadsPage, ut as PostBody, v as ClaimReadyTaskBody, vn as UploadTicket, w as CreateTaskBody, x as CompleteTaskBody, xt as RenewTaskBody, yt as RegistrationView, zt as SourceReadQuery } from "./routes-ChGBn0K3.mjs";
2
+ import { l as Known, o as Granted, p as StoredGrant, t as Authenticate } from "./auth-C4VxPLYz.mjs";
3
+ import { S as Mentioned, f as ProfileOption, i as ErrorOrigin, t as BoardClient } from "./client-C4-r10SA.mjs";
4
+ import { m as SyncProvider } from "./provider-CGicSMdu.mjs";
5
5
  import { z } from "zod";
6
6
  //#region src/server/sandbox.d.ts
7
7
  /** How a rule matches a value: a regular expression (RE2), or the value exactly. */
@@ -131,11 +131,8 @@ type Protocol = {
131
131
  output: Me;
132
132
  };
133
133
  channels: {
134
- input: Nothing;
135
- output: {
136
- channels: ChannelView[];
137
- cursor: string;
138
- };
134
+ input: Input<typeof ChannelsQuery>;
135
+ output: ChannelsPage;
139
136
  };
140
137
  /** `created` is false for a channel that was there already, made by a post or another create. */
141
138
  createChannel: {
@@ -152,8 +149,9 @@ type Protocol = {
152
149
  cursor: string;
153
150
  };
154
151
  };
155
- messages: {
156
- input: Input<typeof MessagesQuery>;
152
+ /** One channel's messages across its threads, oldest first: the newest `limit`, or those after one of the channel's cursors. */
153
+ channelMessages: {
154
+ input: Input<typeof ChannelMessagesQuery>;
157
155
  output: MessagesPage;
158
156
  };
159
157
  threads: {
@@ -161,7 +159,7 @@ type Protocol = {
161
159
  output: ThreadsPage;
162
160
  };
163
161
  message: {
164
- input: Id;
162
+ input: Id & Input<typeof ThreadQuery>;
165
163
  output: ThreadView;
166
164
  };
167
165
  /** `mentions` says what became of each `@handle` the text typed, when it typed any: see `Mentioned`. A write that takes a text answers it the same way. */
@@ -1,4 +1,4 @@
1
- import { t as Backend } from "./backend-C2JUnbm5.mjs";
1
+ import { t as Backend } from "./backend-Da_YEltI.mjs";
2
2
  //#region src/server/local.d.ts
3
3
  type LocalOptions = {
4
4
  /**
@@ -1,2 +1,2 @@
1
- import { t as local } from "./local-DjrvtIoE.mjs";
1
+ import { t as local } from "./local-BsYjQrl_.mjs";
2
2
  export { local };
@@ -1,5 +1,5 @@
1
- import { An as Actor, In as ExternalAuthor, Mt as SourceRead, Rn as ExternalFile, kt as SourceJoin, zn as ExternalLink } from "./routes-B6SEA9yw.mjs";
2
- import { A as SyncRoot, E as ProviderEvent, _ as SyncFn, a as ProviderOptions, c as Receive, f as ResolvedTarget, i as ProviderFile, l as ReceivedEvent, m as SyncProvider, n as FileDelivery, o as ProviderPost, r as ProviderDelivery, t as FetchedLink } from "./provider-BgUS6ZpP.mjs";
1
+ import { Ft as SourceJoin, Kn as ExternalFile, Rn as Actor, Rt as SourceRead, Wn as ExternalAuthor, qn as ExternalLink } from "./routes-ChGBn0K3.mjs";
2
+ import { A as SyncRoot, E as ProviderEvent, _ as SyncFn, a as ProviderOptions, c as Receive, f as ResolvedTarget, i as ProviderFile, l as ReceivedEvent, m as SyncProvider, n as FileDelivery, o as ProviderPost, r as ProviderDelivery, t as FetchedLink } from "./provider-CGicSMdu.mjs";
3
3
  import { Adapter, Author, FileUpload, Message, ReactionEvent, StateAdapter } from "chat";
4
4
  //#region src/sync/chat-provider.d.ts
5
5
  type ChatInput = {
@@ -1,2 +1,2 @@
1
- import { a as OptionName, c as globalOptions, d as options, f as usage, i as CliOption, l as groups, n as CliCommand, o as commands, r as CliExample, s as filters, t as CliArgument, u as option } from "./commands-Cm4sODIu.mjs";
1
+ import { a as OptionName, c as globalOptions, d as options, f as usage, i as CliOption, l as groups, n as CliCommand, o as commands, r as CliExample, s as filters, t as CliArgument, u as option } from "./commands-B6pgzwTI.mjs";
2
2
  export { CliArgument, CliCommand, CliExample, CliOption, OptionName, commands, filters, globalOptions, groups, option, options, usage };
@@ -1,2 +1,2 @@
1
- import { a as option, i as groups, n as filters, o as options, r as globalOptions, s as usage, t as commands } from "./commands-nN8WpvCe.mjs";
1
+ import { a as option, i as groups, n as filters, o as options, r as globalOptions, s as usage, t as commands } from "./commands-DB1T8vT9.mjs";
2
2
  export { commands, filters, globalOptions, groups, option, options, usage };
@@ -1,5 +1,5 @@
1
- import { f as Board } from "./backend-C2JUnbm5.mjs";
2
- import "./index-DpuOtt0J.mjs";
1
+ import { f as Board } from "./backend-Da_YEltI.mjs";
2
+ import "./index-BTuTaBaK.mjs";
3
3
  //#region src/cli/failure.d.ts
4
4
  /**
5
5
  * What kind of failure it is, which fixes the exit code: 2 for `usage` and `missing_input`, 130
@@ -90,8 +90,13 @@ export declare function createApp(options: {
90
90
  export type VbOptions = {
91
91
  /** A file's bytes, for `--attach`; null when there's no such file. */
92
92
  readFile?: (path: string) => Promise<Uint8Array | null> | PromiseLike<Uint8Array | null>;
93
- /** Saves a file, for `download`. */
94
- writeFile?: (path: string, data: Uint8Array) => Promise<void> | PromiseLike<void>;
93
+ /**
94
+ * Saves a file, for `download`. With `exclusive`, the name came from the attachment, so
95
+ * throw an error whose `code` is `EEXIST` rather than replace a file that's there.
96
+ */
97
+ writeFile?: (path: string, data: Uint8Array, options?: {
98
+ exclusive?: boolean;
99
+ }) => Promise<void> | PromiseLike<void>;
95
100
  /** The text `-` reads, as stdin would hold it. */
96
101
  stdin?: string;
97
102
  /**
@@ -1,5 +1,5 @@
1
- import { o as stoppedBy } from "./exports-DRId1Cks.mjs";
2
- import { a as commandLine, c as failureLines, i as mainWith, l as formatFailure, n as commandWord, o as exitCode, r as main, s as failureDocument, t as Failed } from "./main-VTkjxFcG.mjs";
1
+ import { o as stoppedBy } from "./exports-BDE3eV7B.mjs";
2
+ import { a as commandLine, c as failureLines, i as mainWith, l as formatFailure, n as commandWord, o as exitCode, r as main, s as failureDocument, t as Failed } from "./main-CSIXhZ_b.mjs";
3
3
  //#region src/cli/embedded.ts
4
4
  /**
5
5
  * Board's CLI as `appName` names it in help, usage, and errors (`vercel board`). With no board
@@ -88,7 +88,7 @@ function vb(board, argv, options = {}) {
88
88
  write: (chunk) => void (stdout += typeof chunk === "string" ? chunk : decoder.decode(chunk, { stream: true })),
89
89
  error: (chunk) => void (stderr += chunk),
90
90
  readFile: options.readFile ? async (path) => options.readFile(path) : lacking("--attach and --file can't read files", "readFile"),
91
- writeFile: options.writeFile ? async (path, data) => options.writeFile(path, data) : lacking("download can't save files", "writeFile"),
91
+ writeFile: options.writeFile ? async (path, data, writeOptions) => options.writeFile(path, data, writeOptions) : lacking("download can't save files", "writeFile"),
92
92
  stdin: options.stdin !== void 0 ? async () => options.stdin : lacking("- can't read stdin", "stdin"),
93
93
  ...options.signal ? { signal: options.signal } : {}
94
94
  }),
package/dist/cli.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import { a as option } from "./commands-nN8WpvCe.mjs";
3
- import { g as projectDir } from "./server-BLQxoL0g.mjs";
4
- import { r as main } from "./main-VTkjxFcG.mjs";
5
- import { i as createInspector, r as stopped, t as allowedHosts } from "./inspect-DSBG5VDl.mjs";
2
+ import { a as option } from "./commands-DB1T8vT9.mjs";
3
+ import { g as projectDir } from "./server-HPq6MO3_.mjs";
4
+ import { r as main } from "./main-CSIXhZ_b.mjs";
5
+ import { i as createInspector, r as stopped, t as allowedHosts } from "./inspect-Nd_TlU1s.mjs";
6
6
  import { appendFile, readFile } from "node:fs/promises";
7
7
  import { join } from "node:path";
8
8
  //#region src/cli/local.ts
@@ -37,7 +37,7 @@ const local = {
37
37
  },
38
38
  async run(args, context) {
39
39
  if (args.length > 0) throw context.usage("inspect takes no arguments: pass its port with --port.");
40
- return (await import("./inspect-DLLoYeg7.mjs")).inspect(context);
40
+ return (await import("./inspect-BXvdLMET.mjs")).inspect(context);
41
41
  }
42
42
  },
43
43
  serve: {
@@ -81,7 +81,7 @@ const local = {
81
81
  }, "tailscale");
82
82
  if (tailscale.length > 0 && hosts.length > 0) throw usage("--tailscale takes Tailscale's word for who's calling, which another proxy in front could forge: it doesn't go with --allow-host.");
83
83
  const root = projectDir();
84
- const { serveLocal } = await import("./serve-C2xn_cQV.mjs");
84
+ const { serveLocal } = await import("./serve-Cp0qM4jk.mjs");
85
85
  const local = await serveLocal({
86
86
  dir: flags.dir ?? join(root, ".board"),
87
87
  hosts,
@@ -1,4 +1,4 @@
1
- import { $ as MessageView, $t as TasksQueryInput, An as Actor, B as InboxEntry, C as Discovery, Dt as SchemaInput, F as GrantInput, Gt as SyncedView, I as GrantView, Jt as TaskClaim, L as GrantWriteOptions, Lt as SyncFindInput, Mn as Attachment, Mt as SourceRead, Ot as SchemaView, Q as Me, St as ScheduleView, T as EventsPage, Ut as SyncReceiptInput, V as InboxItem, Vt as SyncImportInput, Wt as SyncThreadView, X as MatchView, Zt as TasksPage, cn as UpdateGrantInput, et as MessagesPage, ft as RegisterInput, in as ThreadsQueryInput, j as FiltersInput, jn as ExternalCopy, k as Explanation, kt as SourceJoin, n as ActorView, nn as ThreadsPage, nt as MessagesQueryInput, pt as RegistrationView, s as BoardEventView, tn as ThreadView, u as ChannelView, wt as SchedulesQueryInput, zt as SyncFindView } from "./routes-B6SEA9yw.mjs";
1
+ import { A as Discovery, At as SchedulesQueryInput, Bn as Attachment, Ft as SourceJoin, G as GrantWriteOptions, Gt as SyncFindView, J as InboxEntry, L as Explanation, N as EventsPage, Nt as SchemaInput, Ot as ScheduleView, Pt as SchemaView, Rn as Actor, Rt as SourceRead, U as GrantInput, Ut as SyncFindInput, W as GrantView, Xt as SyncThreadView, Y as InboxItem, Yt as SyncReceiptInput, Zt as SyncedView, _ as ChannelsQueryInput, an as TasksQueryInput, ct as MessagesPage, en as TaskClaim, fn as ThreadsQueryInput, gn as UpdateGrantInput, it as MatchView, ln as ThreadView, m as ChannelView, n as ActorView, ot as Me, p as ChannelMessagesQueryInput, qt as SyncImportInput, rn as TasksPage, s as BoardEventView, sn as ThreadQueryInput, st as MessageView, un as ThreadsPage, vt as RegisterInput, yt as RegistrationView, z as FiltersInput, zn as ExternalCopy } from "./routes-ChGBn0K3.mjs";
2
2
  //#region src/contract/mentions.d.ts
3
3
  /** An actor as a write's answer names them. */
4
4
  type MentionedActor = {
@@ -212,7 +212,15 @@ declare function createBoardClient(options: ClientOptions): {
212
212
  }) => Promise<Response>;
213
213
  discovery: () => Promise<Discovery>;
214
214
  me: () => Promise<Me>;
215
- channels: () => Promise<ChannelView[]>;
215
+ /**
216
+ * A page of the board's channels: `prefix` keeps the ones whose path starts with it (`dev/`), `limit` is how many
217
+ * (100 unless it says, 500 at most), and `after` takes a page's `next`, which is null on the last.
218
+ */
219
+ channels: (query?: ChannelsQueryInput) => Promise<{
220
+ next: string | null;
221
+ channels: ChannelView[];
222
+ cursor: string;
223
+ }>;
216
224
  /**
217
225
  * Makes a channel before anything posts to it, as a first post would. Needs `read` and `post`
218
226
  * there. `created` is false when it was there already; it's left as it is.
@@ -240,8 +248,19 @@ declare function createBoardClient(options: ClientOptions): {
240
248
  grants?: GrantView[];
241
249
  }>;
242
250
  actors: () => Promise<(Actor & Pick<ActorView, "verified">)[]>;
243
- messages: (query?: Filters & Omit<MessagesQueryInput, keyof FiltersInput>) => Promise<MessagesPage>;
244
- thread: (id: string) => Promise<ThreadView>;
251
+ /**
252
+ * One channel, by its whole name: a board lists messages a channel at a time, never across channels. Its
253
+ * `messages()` are the channel's across its threads, oldest first: the newest `limit` (50 without one), or with
254
+ * `after`, a cursor a read of this channel answered, the ones posted since.
255
+ */
256
+ channel: (name: string) => {
257
+ messages: (query?: Omit<ChannelMessagesQueryInput, 'channel'>) => Promise<MessagesPage>;
258
+ };
259
+ /**
260
+ * A thread: its root and its replies. `after`, one of its messages, answers the replies after it, and `limit` that
261
+ * many of them: with `after` the first after it, to read on from, and without, the newest.
262
+ */
263
+ thread: (id: string, range?: ThreadQueryInput) => Promise<ThreadView>;
245
264
  /** Your own post with the client ID you gave it, as posting it answered: 404 `post_not_found` when there's none. */
246
265
  posted: (id: string) => Promise<MessageView>;
247
266
  /** Threads with a matching message, one summary each (root, reply count, latest reply), by latest activity. `limit` counts threads; `before` takes a page's `older`. */
@@ -492,6 +511,7 @@ declare function createBoardClient(options: ClientOptions): {
492
511
  after?: string;
493
512
  wait?: number;
494
513
  all?: boolean;
514
+ last?: number;
495
515
  }, signal?: AbortSignal) => Promise<EventsPage>;
496
516
  /** A platform's write, as its platform author: idempotent per platform event for a post, found from its origin otherwise. */
497
517
  syncImport: (body: SyncImportInput) => Promise<{
@@ -534,6 +554,7 @@ declare function createBoardClient(options: ClientOptions): {
534
554
  events(query?: Filters & {
535
555
  after?: string;
536
556
  all?: boolean;
557
+ last?: number;
537
558
  }, opts?: EventsOptions): AsyncGenerator<BoardEventView>;
538
559
  /** The next matching event after `after` (default: now), or null on timeout. */
539
560
  wait(query?: Filters & {
@@ -143,6 +143,16 @@ declare const options: {
143
143
  readonly value: 'N';
144
144
  readonly description: 'how many';
145
145
  };
146
+ readonly last: {
147
+ readonly type: 'string';
148
+ readonly value: 'N';
149
+ readonly description: "start with the feed's newest N events (1 to 100)";
150
+ };
151
+ readonly before: {
152
+ readonly type: 'string';
153
+ readonly value: 'older';
154
+ readonly description: "a channel's threads before a page: the older its read printed";
155
+ };
146
156
  readonly 'idempotency-key': {
147
157
  readonly type: 'string';
148
158
  readonly value: 'key';