@vercel/board 0.36.0 → 0.37.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 (70) hide show
  1. package/dist/access.d.mts +2 -2
  2. package/dist/access.mjs +1 -1
  3. package/dist/{actors-DFOpTw89.mjs → actors-uoD62kiN.mjs} +1 -0
  4. package/dist/{auth-C21V0EK1.d.mts → auth-BHXgi696.d.mts} +1 -1
  5. package/dist/{backend-D21q8mdm.d.mts → backend-BIvl2z1z.d.mts} +3 -9
  6. package/dist/backend-local.d.mts +1 -1
  7. package/dist/backend-local.mjs +1 -1
  8. package/dist/{chat-provider-Bb-jeJLY.mjs → chat-provider-C0WUS3-G.mjs} +1 -1
  9. package/dist/{chat-provider-DmZCmBkb.d.mts → chat-provider-DFYEReZL.d.mts} +2 -2
  10. package/dist/cli-commands.mjs +1 -1
  11. package/dist/cli-embedded.d.mts +18 -2
  12. package/dist/cli-embedded.mjs +22 -4
  13. package/dist/cli.mjs +50 -676
  14. package/dist/{commands-BLtqSwha.mjs → commands-D2pFCMSh.mjs} +11 -0
  15. package/dist/{conformance-CKrwglzA.mjs → conformance-rCrc_mwi.mjs} +2 -3
  16. package/dist/conformance.d.mts +1 -1
  17. package/dist/conformance.mjs +1 -1
  18. package/dist/digest-CLGw7653.mjs +4 -0
  19. package/dist/{engine-B_prP0b8.mjs → engine-COa73McY.mjs} +16 -12
  20. package/dist/{events-AEKh9tJm.mjs → events-v8f7pF9f.mjs} +21 -7
  21. package/dist/exports-Bb0m03fT.d.mts +4 -0
  22. package/dist/{exports-Ck4Xu3OV.mjs → exports-DTezg4xR.mjs} +728 -171
  23. package/dist/{index-LREsSZb2.d.mts → index-B1TZrMMu.d.mts} +2 -2
  24. package/dist/index.d.mts +5 -5
  25. package/dist/index.mjs +3 -3
  26. package/dist/index.node.d.mts +5 -5
  27. package/dist/index.node.mjs +2 -2
  28. package/dist/inspect/app.js +35 -35
  29. package/dist/inspect/engine.js +5 -5
  30. package/dist/inspect-B8c0Wh5Z.mjs +2 -0
  31. package/dist/inspect-CoFk2Xj7.mjs +643 -0
  32. package/dist/{local-DJ_qI9q7.mjs → local-Cm7a7_Q0.mjs} +10 -65
  33. package/dist/{main-Jz4nbNJi.mjs → main-DoZ8IFPb.mjs} +9 -7
  34. package/dist/{middleware-BxgizazV.mjs → middleware-k_XKQ6f7.mjs} +9 -1
  35. package/dist/page-BAQpb-s-.mjs +2 -0
  36. package/dist/page-LysMGAl3.mjs +30 -0
  37. package/dist/{provider-DEOfc4Ls.d.mts → provider-7pOnK8Jw.d.mts} +5 -3
  38. package/dist/{routes-BpKdMvgX.d.mts → routes-BtsZzal-.d.mts} +0 -17
  39. package/dist/{serve-Puf3I-oI.mjs → serve-2U_JPJtS.mjs} +2 -2
  40. package/dist/{server-CS-1aeTl.mjs → server-Drul_uwj.mjs} +18 -10
  41. package/dist/sync-chat-sdk.d.mts +2 -2
  42. package/dist/sync-chat-sdk.mjs +2 -2
  43. package/dist/sync-github.d.mts +2 -2
  44. package/dist/sync-github.mjs +2 -2
  45. package/dist/sync-linear.d.mts +3 -3
  46. package/dist/sync-linear.mjs +2 -2
  47. package/dist/sync-slack.d.mts +3 -3
  48. package/dist/sync-slack.mjs +2 -2
  49. package/dist/sync.d.mts +2 -2
  50. package/dist/sync.mjs +1 -1
  51. package/dist/{targets-Dk_xgS9q.mjs → targets-B0D4tJDY.mjs} +63 -18
  52. package/docs/01-board/01-mounting.md +11 -8
  53. package/docs/01-board/03-identity.md +2 -1
  54. package/docs/01-board/06-watchers.md +71 -40
  55. package/docs/01-quickstart.md +1 -1
  56. package/docs/02-sync/01-overview.md +7 -7
  57. package/docs/02-sync/02-functions.md +5 -8
  58. package/docs/02-sync/03-slack.md +0 -8
  59. package/docs/02-sync/04-github.md +0 -8
  60. package/docs/02-sync/07-linear.md +0 -6
  61. package/docs/03-guides/01-coding-agents.md +1 -0
  62. package/docs/03-guides/02-inspector.md +3 -2
  63. package/docs/03-guides/04-triage.md +8 -13
  64. package/docs/04-reference/01-cli.md +28 -4
  65. package/docs/04-reference/03-http.md +1 -1
  66. package/docs/04-reference/05-conformance.md +1 -1
  67. package/docs/index.md +3 -10
  68. package/package.json +2 -1
  69. package/dist/attempts-HXcskN1w.mjs +0 -10
  70. package/dist/exports-BxljH73E.d.mts +0 -4
package/dist/access.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { Bt as FULL_ACCESS, Gt as InvalidCan, Ht as GrantChange, It as Access, Lt as AccessSummary, Qt as Actor, Rt as Can, Ut as GrantChangeRefusal, Vt as Grant, Wt as GrantShape, Xt as compileAccess, Yt as checkGrantChange, Zt as union, qt as Permission, tn as Author, zt as ChannelPattern } from "./routes-BpKdMvgX.mjs";
2
- import { _ as GrantExplanation, a as DEFAULT_CAN, b as explainGrants, c as IssuerConfig, f as Principal, g as DecidingGrant, h as Caller, i as Claims, l as Known, n as AuthenticateContext, p as PrincipalKind, r as CallerRequest, s as HostPrincipal, t as Authenticate, u as OidcTokensOptions, v as GrantFacts, x as grantAccess, y as GrantSource } from "./auth-C21V0EK1.mjs";
1
+ import { Bt as FULL_ACCESS, Gt as InvalidCan, Ht as GrantChange, It as Access, Lt as AccessSummary, Qt as Actor, Rt as Can, Ut as GrantChangeRefusal, Vt as Grant, Wt as GrantShape, Xt as compileAccess, Yt as checkGrantChange, Zt as union, qt as Permission, tn as Author, zt as ChannelPattern } from "./routes-BtsZzal-.mjs";
2
+ import { _ as GrantExplanation, a as DEFAULT_CAN, b as explainGrants, c as IssuerConfig, f as Principal, g as DecidingGrant, h as Caller, i as Claims, l as Known, n as AuthenticateContext, p as PrincipalKind, r as CallerRequest, s as HostPrincipal, t as Authenticate, u as OidcTokensOptions, v as GrantFacts, x as grantAccess, y as GrantSource } from "./auth-BHXgi696.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,5 +1,5 @@
1
1
  import { a as checkGrantChange, f as union, n as InvalidCan, s as compileAccess, t as FULL_ACCESS } from "./access-BsP0hvcC.mjs";
2
2
  import { E as grantAccess, T as explainGrants, n as DEFAULT_CAN } from "./auth-CrjXLgOb.mjs";
3
- import { i as resolveActor } from "./actors-DFOpTw89.mjs";
3
+ import { i as resolveActor } from "./actors-uoD62kiN.mjs";
4
4
  import { t as oidcTokens } from "./tokens-Dn4cPZIr.mjs";
5
5
  export { DEFAULT_CAN, FULL_ACCESS, InvalidCan, checkGrantChange, compileAccess, explainGrants, grantAccess, oidcTokens, resolveActor, union };
@@ -6,6 +6,7 @@ import { t as extractMentions } from "./mentions-CB6ShY4R.mjs";
6
6
  //#region src/server/actors.ts
7
7
  /** Agents whose avatars the board serves itself. */
8
8
  const KNOWN_AGENTS = [
9
+ "fx",
9
10
  "claude",
10
11
  "codex",
11
12
  "grok",
@@ -1,4 +1,4 @@
1
- import { It as Access, Jt as WrittenCan, Kt as Level, Rt as Can, qt as Permission } from "./routes-BpKdMvgX.mjs";
1
+ import { It as Access, Jt as WrittenCan, Kt as Level, Rt as Can, qt as Permission } from "./routes-BtsZzal-.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,6 +1,6 @@
1
- import { A as LinkedQuery, C as InboxItem, Ct as ThreadsPage, E as InboxQuery, Et as TokenBody, F as MessagesPage, I as MessagesQuery, It as Access, J as RegistrationView, K as RegisterBody, Kt as Level, M as MatchesQuery, N as Me, Nt as UploadStartBody, O as LabelBody, Ot as TokenView, P as MessageView, Pt as UploadTicket, Qt as Actor, S as InboxEntry, St as ThreadView, T as InboxPushBody, W as ReactBody, Z as ScheduleBody, _ as GrantBody, _t as SyncReceiptBody, at as SourceJoinBody, b as GrantView, bt as SyncedView, c as DeleteBody, ct as SourceReadQuery, d as EventsPage, dt as SyncCopiesView, en as Attachment, et as ScheduleView, f as EventsQuery, h as Explanation, ht as SyncImportBody, i as BoardEventView, in as ExternalEvent, it as SourceJoin, j as MatchView, jt as UpdateGrantBody, kt as TypingBody, l as Discovery, m as ExplainQuery, mt as SyncFindView, nn as Labels, o as ChannelView, pt as SyncFindQuery, qt as Permission, s as CreateChannelBody, st as SourceRead, t as AckBody, tn as Author, tt as SchedulesQuery, u as EditBody, ut as SyncCopiesQuery, w as InboxNextQuery, wt as ThreadsQuery, x as InboxAckBody, yt as SyncThreadView, z as PostBody } from "./routes-BpKdMvgX.mjs";
2
- import { d as Pinned, l as Known, m as StoredGrant, o as Granted, t as Authenticate } from "./auth-C21V0EK1.mjs";
3
- import { L as ProfileOption, M as BoardClient, P as ErrorOrigin, p as SyncProvider } from "./provider-DEOfc4Ls.mjs";
1
+ import { A as LinkedQuery, C as InboxItem, Ct as ThreadsPage, E as InboxQuery, Et as TokenBody, F as MessagesPage, I as MessagesQuery, It as Access, J as RegistrationView, K as RegisterBody, Kt as Level, M as MatchesQuery, N as Me, Nt as UploadStartBody, O as LabelBody, Ot as TokenView, P as MessageView, Pt as UploadTicket, Qt as Actor, S as InboxEntry, St as ThreadView, T as InboxPushBody, W as ReactBody, Z as ScheduleBody, _ as GrantBody, _t as SyncReceiptBody, at as SourceJoinBody, b as GrantView, bt as SyncedView, c as DeleteBody, ct as SourceReadQuery, d as EventsPage, dt as SyncCopiesView, en as Attachment, et as ScheduleView, f as EventsQuery, h as Explanation, ht as SyncImportBody, i as BoardEventView, in as ExternalEvent, it as SourceJoin, j as MatchView, jt as UpdateGrantBody, kt as TypingBody, l as Discovery, m as ExplainQuery, mt as SyncFindView, nn as Labels, o as ChannelView, pt as SyncFindQuery, qt as Permission, s as CreateChannelBody, st as SourceRead, t as AckBody, tn as Author, tt as SchedulesQuery, u as EditBody, ut as SyncCopiesQuery, w as InboxNextQuery, wt as ThreadsQuery, x as InboxAckBody, yt as SyncThreadView, z as PostBody } from "./routes-BtsZzal-.mjs";
2
+ import { d as Pinned, l as Known, m as StoredGrant, o as Granted, t as Authenticate } from "./auth-BHXgi696.mjs";
3
+ import { L as ProfileOption, M as BoardClient, P as ErrorOrigin, p as SyncProvider } from "./provider-7pOnK8Jw.mjs";
4
4
  import { z } from "zod";
5
5
  //#region src/api/protocol.d.ts
6
6
  type Input<S extends z.ZodType> = NonNullable<z.output<S>>;
@@ -477,11 +477,6 @@ type Watcher = {
477
477
  * delivery receipts, as in `vb tail`: `message.synced` says where a message landed on a platform.
478
478
  */
479
479
  tail: string;
480
- /**
481
- * `matches` (the default) runs on every event the tail prints. `enters` runs only when a
482
- * message enters the view: it didn't match before the event and does after it.
483
- */
484
- when?: 'matches' | 'enters';
485
480
  run: (context: WatcherContext) => unknown;
486
481
  };
487
482
  //#endregion
@@ -632,7 +627,6 @@ type Subscription =
632
627
  {
633
628
  kind: 'tail';
634
629
  tail: string;
635
- when: 'matches' | 'enters';
636
630
  } |
637
631
  /** Sync's outbound: every post, change, and thread sync in every channel, as its own code sees them. */
638
632
  {
@@ -1,4 +1,4 @@
1
- import { t as Backend } from "./backend-D21q8mdm.mjs";
1
+ import { t as Backend } from "./backend-BIvl2z1z.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-DJ_qI9q7.mjs";
1
+ import { t as local } from "./local-Cm7a7_Q0.mjs";
2
2
  export { local };
@@ -1,5 +1,5 @@
1
1
  import "./external-BA2aCC_3.mjs";
2
- import { c as SyncProvider, s as ResolvedTarget } from "./events-AEKh9tJm.mjs";
2
+ import { c as SyncProvider, s as ResolvedTarget } from "./events-v8f7pF9f.mjs";
3
3
  import { AsyncLocalStorage } from "node:async_hooks";
4
4
  import { Chat, stringifyMarkdown } from "chat";
5
5
  //#region src/sync/chat.ts
@@ -1,5 +1,5 @@
1
- import { Qt as Actor, an as ExternalFile, it as SourceJoin, on as ExternalLink, rn as ExternalAuthor, st as SourceRead } from "./routes-BpKdMvgX.mjs";
2
- import { T as ProviderEvent, a as ProviderOptions, c as ReceivedEvent, d as ResolvedTarget, g as SyncFn, i as ProviderFile, k as SyncRoot, n as FileDelivery, o as ProviderPost, p as SyncProvider, r as ProviderDelivery, s as Receive, t as FetchedLink } from "./provider-DEOfc4Ls.mjs";
1
+ import { Qt as Actor, an as ExternalFile, it as SourceJoin, on as ExternalLink, rn as ExternalAuthor, st as SourceRead } from "./routes-BtsZzal-.mjs";
2
+ import { T as ProviderEvent, a as ProviderOptions, c as ReceivedEvent, d as ResolvedTarget, g as SyncFn, i as ProviderFile, k as SyncRoot, n as FileDelivery, o as ProviderPost, p as SyncProvider, r as ProviderDelivery, s as Receive, t as FetchedLink } from "./provider-7pOnK8Jw.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 option, i as groups, n as filters, o as options, r as globalOptions, s as usage, t as commands } from "./commands-BLtqSwha.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-D2pFCMSh.mjs";
2
2
  export { commands, filters, globalOptions, groups, option, options, usage };
@@ -1,5 +1,5 @@
1
- import { d as Board } from "./backend-D21q8mdm.mjs";
2
- import "./index-LREsSZb2.mjs";
1
+ import { d as Board } from "./backend-BIvl2z1z.mjs";
2
+ import "./index-B1TZrMMu.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
@@ -51,6 +51,17 @@ export declare function failureLines(failure: Failure): string[];
51
51
  export declare function commandWord(argv: string[]): string | undefined;
52
52
  //#endregion
53
53
  //#region src/cli/embedded.d.ts
54
+ /**
55
+ * The inspector's page as this version of board's npm package has it, for an app that bundles
56
+ * board's CLI and so has no file of board's beside it: `path` in `name@version`'s tarball, and its
57
+ * SHA-256 (hex) to check what it fetched against. The build sets `sha256`; from source, it's null.
58
+ */
59
+ export declare const INSPECTOR_PAGE: {
60
+ name: '@vercel/board';
61
+ version: string;
62
+ path: 'dist/inspect/app.js';
63
+ sha256: string | null;
64
+ };
54
65
  /**
55
66
  * Board's CLI as `appName` names it in help, usage, and errors (`vercel board`). With no board
56
67
  * URL anywhere, it talks to the team's board in Vercel's API: `VERCEL_ORG_ID`'s, the nearest linked
@@ -64,6 +75,10 @@ export declare function commandWord(argv: string[]): string | undefined;
64
75
  * (`--scope` still wins): board asks for each only when a request needs it, so help, a typo, or
65
76
  * misuse never refreshes a login or looks a team up. With `fetch`, board's requests to Vercel's API
66
77
  * with that login go through the app's own, which adds its credentials (a DPoP proof, say).
78
+ *
79
+ * `inspectorPage` is the inspector's page, which `inspect` asks for when it runs: the one
80
+ * `INSPECTOR_PAGE` names, as the app fetched it and checked it against its `sha256`. Without one,
81
+ * `inspect` reads it beside board's files, which an app that bundles board's CLI has none of.
67
82
  */
68
83
  export declare function createApp(options: {
69
84
  appName: string;
@@ -74,6 +89,7 @@ export declare function createApp(options: {
74
89
  login?: () => Promise<string>;
75
90
  team?: () => Promise<string | null>;
76
91
  fetch?: typeof globalThis.fetch;
92
+ inspectorPage?: () => Promise<string>;
77
93
  }): {
78
94
  run(args: string[]): Promise<number>;
79
95
  };
@@ -1,6 +1,19 @@
1
- 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-Jz4nbNJi.mjs";
1
+ import { g as VERSION } from "./targets-B0D4tJDY.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-DoZ8IFPb.mjs";
3
+ import { t as PAGE_SHA256 } from "./digest-CLGw7653.mjs";
2
4
  //#region src/cli/embedded.ts
3
5
  /**
6
+ * The inspector's page as this version of board's npm package has it, for an app that bundles
7
+ * board's CLI and so has no file of board's beside it: `path` in `name@version`'s tarball, and its
8
+ * SHA-256 (hex) to check what it fetched against. The build sets `sha256`; from source, it's null.
9
+ */
10
+ const INSPECTOR_PAGE = {
11
+ name: "@vercel/board",
12
+ version: VERSION,
13
+ path: "dist/inspect/app.js",
14
+ sha256: PAGE_SHA256
15
+ };
16
+ /**
4
17
  * Board's CLI as `appName` names it in help, usage, and errors (`vercel board`). With no board
5
18
  * URL anywhere, it talks to the team's board in Vercel's API: `VERCEL_ORG_ID`'s, the nearest linked
6
19
  * project's team's (`.vercel`), your login's, or `--scope`'s. `run` takes what follows the name, and answers the exit code:
@@ -13,9 +26,13 @@ import { a as commandLine, c as failureLines, i as mainWith, l as formatFailure,
13
26
  * (`--scope` still wins): board asks for each only when a request needs it, so help, a typo, or
14
27
  * misuse never refreshes a login or looks a team up. With `fetch`, board's requests to Vercel's API
15
28
  * with that login go through the app's own, which adds its credentials (a DPoP proof, say).
29
+ *
30
+ * `inspectorPage` is the inspector's page, which `inspect` asks for when it runs: the one
31
+ * `INSPECTOR_PAGE` names, as the app fetched it and checked it against its `sha256`. Without one,
32
+ * `inspect` reads it beside board's files, which an app that bundles board's CLI has none of.
16
33
  */
17
34
  function createApp(options) {
18
- const { appName, onError, onWarning, login, team, fetch } = options;
35
+ const { appName, onError, onWarning, login, team, fetch, inspectorPage } = options;
19
36
  return { run: (args) => main(args, {
20
37
  name: appName,
21
38
  commands: {},
@@ -24,7 +41,8 @@ function createApp(options) {
24
41
  ...onWarning ? { onWarning } : {},
25
42
  ...login ? { login } : {},
26
43
  ...team ? { team } : {},
27
- ...fetch ? { fetch } : {}
44
+ ...fetch ? { fetch } : {},
45
+ ...inspectorPage ? { inspectorPage } : {}
28
46
  }) };
29
47
  }
30
48
  const lacking = (what, option) => async () => {
@@ -88,4 +106,4 @@ function vb(board, argv, options = {}) {
88
106
  return result;
89
107
  }
90
108
  //#endregion
91
- export { commandLine, commandWord, createApp, failureLines, vb };
109
+ export { INSPECTOR_PAGE, commandLine, commandWord, createApp, failureLines, vb };