@vercel/board 0.50.0 → 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 (88) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +128 -118
  3. package/dist/{access-BbgmsAFF.mjs → access-DdojoPZm.mjs} +1 -1
  4. package/dist/access.d.mts +2 -2
  5. package/dist/access.mjs +4 -4
  6. package/dist/{actors-CX2D22hL.mjs → actors-CDkNgWUL.mjs} +3 -3
  7. package/dist/{auth-Z9-Khvvw.d.mts → auth-C4VxPLYz.d.mts} +1 -1
  8. package/dist/{auth-DJDTfgAL.mjs → auth-zPqFJocD.mjs} +10 -3
  9. package/dist/{backend-CcaaS9Xl.d.mts → backend-Da_YEltI.d.mts} +16 -13
  10. package/dist/backend-local.d.mts +1 -1
  11. package/dist/backend-local.mjs +1 -1
  12. package/dist/{chat-provider-DQ1GHm4o.d.mts → chat-provider-BHyX6H8H.d.mts} +2 -2
  13. package/dist/{chat-provider-HJ7y_ipp.mjs → chat-provider-Br2RXgLV.mjs} +4 -3
  14. package/dist/cli-commands.d.mts +1 -1
  15. package/dist/cli-commands.mjs +1 -1
  16. package/dist/cli-embedded.d.mts +15 -7
  17. package/dist/cli-embedded.mjs +9 -6
  18. package/dist/cli.mjs +6 -6
  19. package/dist/{client-C2T4eaXd.d.mts → client-C4-r10SA.d.mts} +25 -4
  20. package/dist/{commands-Cm4sODIu.d.mts → commands-B6pgzwTI.d.mts} +10 -0
  21. package/dist/{commands-nN8WpvCe.mjs → commands-DB1T8vT9.mjs} +37 -10
  22. package/dist/{conformance-Cr-umDl0.mjs → conformance-DW4-9Dwf.mjs} +176 -64
  23. package/dist/conformance.d.mts +4 -3
  24. package/dist/conformance.mjs +1 -1
  25. package/dist/{engine-DJZ8Xy_g.mjs → engine-D8YAsQS_.mjs} +17 -9
  26. package/dist/{errors-DYF4hhIc.mjs → errors-DbCKqGXp.mjs} +35 -7
  27. package/dist/{events-BdOCmnZh.mjs → events-mWKc1uvZ.mjs} +1 -1
  28. package/dist/{exports-CuD-Mxkw.mjs → exports-BDE3eV7B.mjs} +593 -261
  29. package/dist/{exports-lmr6UHHc.d.mts → exports-BUtR_AHa.d.mts} +4 -4
  30. package/dist/{external-D2jq_DEQ.mjs → external-DkWafjn-.mjs} +5 -1
  31. package/dist/{index-_KxJu15n.d.mts → index-BTuTaBaK.d.mts} +2 -2
  32. package/dist/index.d.mts +6 -6
  33. package/dist/index.mjs +4 -4
  34. package/dist/index.node.d.mts +7 -7
  35. package/dist/index.node.mjs +4 -4
  36. package/dist/inspect/app.js +41 -41
  37. package/dist/inspect/engine.js +4 -4
  38. package/dist/inspect-BXvdLMET.mjs +2 -0
  39. package/dist/{inspect-CZeoSm7E.mjs → inspect-Nd_TlU1s.mjs} +3 -3
  40. package/dist/inspect.d.mts +1 -1
  41. package/dist/inspect.mjs +2 -2
  42. package/dist/{local-BVSFSSYf.mjs → local-BsYjQrl_.mjs} +113 -35
  43. package/dist/{main-B016auoG.mjs → main-CSIXhZ_b.mjs} +117 -36
  44. package/dist/{memory-C2lzMV_t.mjs → memory-wmUDblhm.mjs} +2 -2
  45. package/dist/{middleware-DUKIITFZ.mjs → middleware-iVTNf5Su.mjs} +1 -1
  46. package/dist/{profile-header-Cj0Cb1cf.mjs → profile-header-O8wC8yk8.mjs} +12 -1
  47. package/dist/{provider-Dwb_9mnu.d.mts → provider-CGicSMdu.d.mts} +4 -2
  48. package/dist/{routes-BE0y6wCk.mjs → routes-C85Sbhtm.mjs} +44 -11
  49. package/dist/{routes-B6SEA9yw.d.mts → routes-ChGBn0K3.d.mts} +60 -23
  50. package/dist/{serve-B10e7QaY.mjs → serve-Cp0qM4jk.mjs} +9 -8
  51. package/dist/{server-ViWNvg5q.mjs → server-HPq6MO3_.mjs} +50 -33
  52. package/dist/{serving-SbqeWqlA.mjs → serving-aOQsBok0.mjs} +1 -1
  53. package/dist/{shell-DmpmgOPC.mjs → shell-CUR5woOP.mjs} +1 -1
  54. package/dist/{sql-iABdyCiz.mjs → sql-D0MqINA6.mjs} +1 -1
  55. package/dist/{sqlite-28EMrmk7.mjs → sqlite-Dj2ZEtgy.mjs} +2 -2
  56. package/dist/{sqlite-db-Ckd-ceNe.mjs → sqlite-db-DjbTlUwN.mjs} +1 -1
  57. package/dist/sync-chat-sdk.d.mts +2 -2
  58. package/dist/sync-chat-sdk.mjs +2 -2
  59. package/dist/sync-github.d.mts +2 -2
  60. package/dist/sync-github.mjs +3 -3
  61. package/dist/sync-linear.d.mts +3 -3
  62. package/dist/sync-linear.mjs +3 -3
  63. package/dist/sync-slack.d.mts +21 -4
  64. package/dist/sync-slack.mjs +35 -11
  65. package/dist/sync.d.mts +2 -2
  66. package/dist/sync.mjs +2 -2
  67. package/dist/{tags-D0qra0Qy.mjs → tags-CxDCF_tt.mjs} +1 -1
  68. package/dist/{task-batch-9lVDG3d-.mjs → task-batch-D3ASL5_-.mjs} +53 -9
  69. package/dist/{tokens-C-iK0Cku.mjs → tokens-C-T0B1uF.mjs} +31 -7
  70. package/dist/{version-C70RLVEK.mjs → version-BJH1vWR0.mjs} +1 -1
  71. package/docs/01-board/01-mounting.md +20 -7
  72. package/docs/01-board/03-identity.md +1 -1
  73. package/docs/01-board/04-messages.md +5 -0
  74. package/docs/01-board/05-reading.md +71 -16
  75. package/docs/01-board/07-schedules.md +1 -1
  76. package/docs/01-board/10-local.md +1 -1
  77. package/docs/02-sync/01-overview.md +3 -3
  78. package/docs/02-sync/03-slack.md +4 -3
  79. package/docs/03-guides/01-coding-agents.md +1 -1
  80. package/docs/03-guides/02-inspector.md +13 -5
  81. package/docs/03-guides/07-build-a-ui.md +15 -11
  82. package/docs/04-reference/01-cli.md +64 -25
  83. package/docs/04-reference/02-board.md +48 -23
  84. package/docs/04-reference/03-http.md +33 -14
  85. package/docs/04-reference/05-conformance.md +11 -10
  86. package/docs/index.md +1 -1
  87. package/package.json +14 -2
  88. package/dist/inspect-UCcPViyA.mjs +0 -2
@@ -1,4 +1,4 @@
1
- import { t as Backend } from "./backend-CcaaS9Xl.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-BVSFSSYf.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-Dwb_9mnu.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,5 +1,5 @@
1
- import "./external-D2jq_DEQ.mjs";
2
- import { c as SyncProvider, s as ResolvedTarget } from "./events-BdOCmnZh.mjs";
1
+ import "./external-DkWafjn-.mjs";
2
+ import { c as SyncProvider, s as ResolvedTarget } from "./events-mWKc1uvZ.mjs";
3
3
  import { createHash } from "node:crypto";
4
4
  import { AsyncLocalStorage } from "node:async_hooks";
5
5
  import { Chat, stringifyMarkdown } from "chat";
@@ -200,7 +200,8 @@ var ChatSyncProvider = class extends SyncProvider {
200
200
  const message = input.message;
201
201
  const location = `${key}:${this.toNative(message.threadId)}|${message.id}`;
202
202
  if (input.kind === "message") return `message:${location}`;
203
- return `edited:${location}|${createHash("sha256").update(message.text).digest("base64url")}`;
203
+ const at = message.metadata?.editedAt ? new Date(message.metadata.editedAt).getTime() : NaN;
204
+ return `edited:${location}|${createHash("sha256").update(message.text).digest("base64url")}${Number.isFinite(at) ? `|${at}` : ""}`;
204
205
  }
205
206
  author(author, raw) {
206
207
  return this.transport.author?.(author, raw) ?? externalAuthor(this.platform, author);
@@ -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-CcaaS9Xl.mjs";
2
- import "./index-_KxJu15n.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
@@ -65,10 +65,13 @@ export declare function commandWord(argv: string[]): string | undefined;
65
65
  * misuse never refreshes a login or looks a team up. With `fetch`, board's requests to Vercel's API
66
66
  * with that login go through the app's own, which adds its credentials (a DPoP proof, say).
67
67
  *
68
+ * The app says who its commands run as: its `login` is the one that goes, wherever the app runs,
69
+ * and nothing the environment holds goes ahead of it, a deployment's own token and `BOARD_TOKEN`
70
+ * included. Those are `vb`'s to send, and this CLI's only when the app gives it no login.
71
+ *
68
72
  * `token` is a Vercel token someone passed the app for this run, as `vercel board --token` takes
69
- * one: the login to use, in place of `login` and ahead of everything the environment holds, a
70
- * deployment's own token and `BOARD_TOKEN` included. A variable never goes ahead of those. Board
71
- * sends it itself, as a Bearer token, never through `fetch`, which would add the app's own login's.
73
+ * one: the login to use in place of `login`. Board sends it itself, as a Bearer token, never
74
+ * through `fetch`, which would add the app's own login's.
72
75
  */
73
76
  export declare function createApp(options: {
74
77
  appName: string;
@@ -87,8 +90,13 @@ export declare function createApp(options: {
87
90
  export type VbOptions = {
88
91
  /** A file's bytes, for `--attach`; null when there's no such file. */
89
92
  readFile?: (path: string) => Promise<Uint8Array | null> | PromiseLike<Uint8Array | null>;
90
- /** Saves a file, for `download`. */
91
- 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>;
92
100
  /** The text `-` reads, as stdin would hold it. */
93
101
  stdin?: string;
94
102
  /**
@@ -1,5 +1,5 @@
1
- import { a as stoppedBy } from "./exports-CuD-Mxkw.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-B016auoG.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
@@ -15,10 +15,13 @@ import { a as commandLine, c as failureLines, i as mainWith, l as formatFailure,
15
15
  * misuse never refreshes a login or looks a team up. With `fetch`, board's requests to Vercel's API
16
16
  * with that login go through the app's own, which adds its credentials (a DPoP proof, say).
17
17
  *
18
+ * The app says who its commands run as: its `login` is the one that goes, wherever the app runs,
19
+ * and nothing the environment holds goes ahead of it, a deployment's own token and `BOARD_TOKEN`
20
+ * included. Those are `vb`'s to send, and this CLI's only when the app gives it no login.
21
+ *
18
22
  * `token` is a Vercel token someone passed the app for this run, as `vercel board --token` takes
19
- * one: the login to use, in place of `login` and ahead of everything the environment holds, a
20
- * deployment's own token and `BOARD_TOKEN` included. A variable never goes ahead of those. Board
21
- * sends it itself, as a Bearer token, never through `fetch`, which would add the app's own login's.
23
+ * one: the login to use in place of `login`. Board sends it itself, as a Bearer token, never
24
+ * through `fetch`, which would add the app's own login's.
22
25
  */
23
26
  function createApp(options) {
24
27
  const { appName, onError, onWarning, login, token, team, fetch } = options;
@@ -85,7 +88,7 @@ function vb(board, argv, options = {}) {
85
88
  write: (chunk) => void (stdout += typeof chunk === "string" ? chunk : decoder.decode(chunk, { stream: true })),
86
89
  error: (chunk) => void (stderr += chunk),
87
90
  readFile: options.readFile ? async (path) => options.readFile(path) : lacking("--attach and --file can't read files", "readFile"),
88
- 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"),
89
92
  stdin: options.stdin !== void 0 ? async () => options.stdin : lacking("- can't read stdin", "stdin"),
90
93
  ...options.signal ? { signal: options.signal } : {}
91
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-ViWNvg5q.mjs";
4
- import { r as main } from "./main-B016auoG.mjs";
5
- import { i as createInspector, r as stopped, t as allowedHosts } from "./inspect-CZeoSm7E.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-UCcPViyA.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-B10e7QaY.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';
@@ -93,6 +93,16 @@ const options = {
93
93
  value: "N",
94
94
  description: "how many"
95
95
  },
96
+ last: {
97
+ type: "string",
98
+ value: "N",
99
+ description: "start with the feed's newest N events (1 to 100)"
100
+ },
101
+ before: {
102
+ type: "string",
103
+ value: "older",
104
+ description: "a channel's threads before a page: the older its read printed"
105
+ },
96
106
  "idempotency-key": {
97
107
  type: "string",
98
108
  value: "key",
@@ -721,23 +731,37 @@ const commands = [
721
731
  {
722
732
  group: "the board",
723
733
  name: "channels",
724
- description: "channels, grouped by path prefix: a first post makes one, and so does create",
725
- arguments: [],
726
- options: [],
734
+ description: "channels, a page at a time, grouped by path prefix: a first post makes one, and so does create",
735
+ arguments: [{
736
+ name: "prefix",
737
+ required: false,
738
+ description: "only the channels whose path starts with it: dev/"
739
+ }],
740
+ options: [option("limit"), option("after")],
727
741
  runsWithoutSubcommand: true,
728
742
  examples: [{
729
743
  name: "list the channels",
730
744
  value: "channels"
745
+ }, {
746
+ name: "the ones under dev",
747
+ value: "channels dev/"
731
748
  }],
732
749
  subcommands: [{
733
750
  name: "list",
734
751
  default: true,
735
- description: "channels, grouped by path prefix",
736
- arguments: [],
737
- options: [],
752
+ description: "channels, a page at a time, grouped by path prefix",
753
+ arguments: [{
754
+ name: "prefix",
755
+ required: false,
756
+ description: "only the channels whose path starts with it: dev/"
757
+ }],
758
+ options: [option("limit"), option("after")],
738
759
  examples: [{
739
760
  name: "list the channels",
740
761
  value: "channels list"
762
+ }, {
763
+ name: "the next page",
764
+ value: "channels list dev/ --after <next>"
741
765
  }]
742
766
  }, {
743
767
  name: "create",
@@ -837,7 +861,7 @@ const commands = [
837
861
  required: false,
838
862
  description: "a channel (every channel without one), a message's ID, or a Slack or GitHub link the board synced"
839
863
  }],
840
- options: [option("limit", "threads to list (default: 50, at most 500)")],
864
+ options: [option("limit", "threads to list (default: 50, at most 500)"), option("before")],
841
865
  filters: true,
842
866
  examples: [
843
867
  {
@@ -857,8 +881,8 @@ const commands = [
857
881
  value: "read dev --after 1042"
858
882
  },
859
883
  {
860
- name: "search every channel for a phrase",
861
- value: "read --text \"times out\""
884
+ name: "the page before one, by the older it printed",
885
+ value: "read dev --before 1031.1024"
862
886
  }
863
887
  ]
864
888
  },
@@ -1498,11 +1522,14 @@ const commands = [
1498
1522
  required: false,
1499
1523
  description: "a channel, or a path prefix (dev/)"
1500
1524
  }],
1501
- options: [option("all", "delivery receipts too")],
1525
+ options: [option("all", "delivery receipts too"), option("last")],
1502
1526
  filters: true,
1503
1527
  examples: [{
1504
1528
  name: "follow the bugs",
1505
1529
  value: "tail dev --label kind=bug"
1530
+ }, {
1531
+ name: "start with a channel's newest 20 events, then follow",
1532
+ value: "tail dev --last 20"
1506
1533
  }]
1507
1534
  },
1508
1535
  {