@vercel/board 0.34.0 → 0.36.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 (67) hide show
  1. package/dist/{access-CdBcYPQH.mjs → access-BsP0hvcC.mjs} +1 -1
  2. package/dist/access.d.mts +2 -2
  3. package/dist/access.mjs +4 -4
  4. package/dist/{actors-MrIEr9LI.mjs → actors-DFOpTw89.mjs} +2 -2
  5. package/dist/{auth-aaoKt5DK.d.mts → auth-C21V0EK1.d.mts} +1 -1
  6. package/dist/{auth-DjoJygbG.mjs → auth-CrjXLgOb.mjs} +2 -2
  7. package/dist/{backend-u1sVvybh.d.mts → backend-D21q8mdm.d.mts} +3 -3
  8. package/dist/backend-local.d.mts +1 -1
  9. package/dist/backend-local.mjs +1 -1
  10. package/dist/{chat-provider-9hCT654s.mjs → chat-provider-Bb-jeJLY.mjs} +2 -2
  11. package/dist/{chat-provider-De0iDnUB.d.mts → chat-provider-DmZCmBkb.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 +2 -2
  15. package/dist/cli-embedded.mjs +1 -1
  16. package/dist/cli.mjs +5 -5
  17. package/dist/{commands-B8oZEByR.mjs → commands-BLtqSwha.mjs} +324 -26
  18. package/dist/{commands-BkVMdXP1.d.mts → commands-DGID-4Z2.d.mts} +175 -0
  19. package/dist/{conformance-gqYBkXFS.mjs → conformance-CKrwglzA.mjs} +480 -87
  20. package/dist/conformance.d.mts +20 -2
  21. package/dist/conformance.mjs +1 -1
  22. package/dist/{engine-rtOVWsiF.mjs → engine-B_prP0b8.mjs} +4 -4
  23. package/dist/{errors-D8ifv16L.mjs → errors-rYDxZEuN.mjs} +98 -4
  24. package/dist/{events-IQg0k281.mjs → events-AEKh9tJm.mjs} +1 -1
  25. package/dist/exports-BxljH73E.d.mts +4 -0
  26. package/dist/{exports-Bx2dGpzr.mjs → exports-Ck4Xu3OV.mjs} +135 -24
  27. package/dist/{external-CYe424fO.mjs → external-BA2aCC_3.mjs} +1 -1
  28. package/dist/{index-D6mK0Ial.d.mts → index-LREsSZb2.d.mts} +2 -2
  29. package/dist/index.d.mts +6 -6
  30. package/dist/index.mjs +4 -4
  31. package/dist/index.node.d.mts +6 -6
  32. package/dist/index.node.mjs +3 -3
  33. package/dist/inspect/app.js +32 -32
  34. package/dist/{local-CPz22MQ8.mjs → local-DJ_qI9q7.mjs} +10 -10
  35. package/dist/{main-DScDKwQN.mjs → main-Jz4nbNJi.mjs} +409 -24
  36. package/dist/{memory-7RRnLa4X.mjs → memory-DqwXlyK4.mjs} +2 -2
  37. package/dist/{middleware-BjYpk4yq.mjs → middleware-BxgizazV.mjs} +1 -1
  38. package/dist/{provider-hB8QNrwm.d.mts → provider-DEOfc4Ls.d.mts} +21 -3
  39. package/dist/{routes-De4W6lEs.d.mts → routes-BpKdMvgX.d.mts} +19 -8
  40. package/dist/{serve-B1noQRkn.mjs → serve-Puf3I-oI.mjs} +4 -4
  41. package/dist/{server-Ov6GBJ8j.mjs → server-CS-1aeTl.mjs} +6 -6
  42. package/dist/{serving-2s7lqSBS.mjs → serving-6_bhBNAW.mjs} +1 -1
  43. package/dist/{sql-BQzKUqQt.mjs → sql-aetuEBZC.mjs} +1 -1
  44. package/dist/{sqlite-DCtZFEVm.mjs → sqlite-DvsB8ENQ.mjs} +2 -2
  45. package/dist/{sqlite-db-qLTs52Ny.mjs → sqlite-db-BPwRoDI7.mjs} +1 -1
  46. package/dist/sync-chat-sdk.d.mts +2 -2
  47. package/dist/sync-chat-sdk.mjs +2 -2
  48. package/dist/sync-github.d.mts +2 -2
  49. package/dist/sync-github.mjs +2 -2
  50. package/dist/sync-linear.d.mts +3 -3
  51. package/dist/sync-linear.mjs +2 -2
  52. package/dist/sync-slack.d.mts +3 -3
  53. package/dist/sync-slack.mjs +3 -3
  54. package/dist/sync.d.mts +2 -2
  55. package/dist/sync.mjs +2 -2
  56. package/dist/{targets-aMdbp84G.mjs → targets-Dk_xgS9q.mjs} +10 -6
  57. package/dist/{tokens-LHLrnV_P.mjs → tokens-Dn4cPZIr.mjs} +2 -2
  58. package/docs/01-board/01-mounting.md +7 -2
  59. package/docs/01-board/03-identity.md +1 -1
  60. package/docs/01-board/09-access.md +31 -0
  61. package/docs/03-guides/03-ci.md +5 -3
  62. package/docs/04-reference/01-cli.md +98 -14
  63. package/docs/04-reference/02-board.md +28 -3
  64. package/docs/04-reference/03-http.md +1 -1
  65. package/docs/04-reference/05-conformance.md +31 -5
  66. package/package.json +1 -1
  67. package/dist/exports-uwRl5qIj.d.mts +0 -4
@@ -1,4 +1,4 @@
1
- import { a as forbidden } from "./errors-D8ifv16L.mjs";
1
+ import { a as forbidden } from "./errors-rYDxZEuN.mjs";
2
2
  import { a as ChannelPath, h as SCOPE_MAX } from "./schemas-BG205xds.mjs";
3
3
  //#region src/server/access.ts
4
4
  /**
package/dist/access.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { Bt as Grant, Ft as Access, Ht as GrantChangeRefusal, It as AccessSummary, Jt as checkGrantChange, Kt as Permission, Lt as Can, Rt as ChannelPattern, Ut as GrantShape, Vt as GrantChange, Wt as InvalidCan, Xt as union, Yt as compileAccess, Zt as Actor, en as Author, zt as FULL_ACCESS } from "./routes-De4W6lEs.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-aaoKt5DK.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-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";
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
- import { a as checkGrantChange, f as union, n as InvalidCan, s as compileAccess, t as FULL_ACCESS } from "./access-CdBcYPQH.mjs";
2
- import { E as grantAccess, T as explainGrants, n as DEFAULT_CAN } from "./auth-DjoJygbG.mjs";
3
- import { i as resolveActor } from "./actors-MrIEr9LI.mjs";
4
- import { t as oidcTokens } from "./tokens-LHLrnV_P.mjs";
1
+ import { a as checkGrantChange, f as union, n as InvalidCan, s as compileAccess, t as FULL_ACCESS } from "./access-BsP0hvcC.mjs";
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";
4
+ import { t as oidcTokens } from "./tokens-Dn4cPZIr.mjs";
5
5
  export { DEFAULT_CAN, FULL_ACCESS, InvalidCan, checkGrantChange, compileAccess, explainGrants, grantAccess, oidcTokens, resolveActor, union };
@@ -1,6 +1,6 @@
1
- import { r as badRequest } from "./errors-D8ifv16L.mjs";
1
+ import { r as badRequest } from "./errors-rYDxZEuN.mjs";
2
2
  import { b as toStorable } from "./schemas-BG205xds.mjs";
3
- import { u as parseScope } from "./access-CdBcYPQH.mjs";
3
+ import { u as parseScope } from "./access-BsP0hvcC.mjs";
4
4
  import { t as own } from "./own-OwgPWdmh.mjs";
5
5
  import { t as extractMentions } from "./mentions-CB6ShY4R.mjs";
6
6
  //#region src/server/actors.ts
@@ -1,4 +1,4 @@
1
- import { Ft as Access, Gt as Level, Kt as Permission, Lt as Can, qt as WrittenCan } from "./routes-De4W6lEs.mjs";
1
+ import { It as Access, Jt as WrittenCan, Kt as Level, Rt as Can, qt as Permission } from "./routes-BpKdMvgX.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 { a as forbidden, l as unauthorized, r as badRequest, t as HttpError } from "./errors-D8ifv16L.mjs";
2
- import { c as decide, o as combine, p as writtenCan, s as compileAccess, t as FULL_ACCESS, u as parseScope } from "./access-CdBcYPQH.mjs";
1
+ import { a as forbidden, l as unauthorized, r as badRequest, t as HttpError } from "./errors-rYDxZEuN.mjs";
2
+ import { c as decide, o as combine, p as writtenCan, s as compileAccess, t as FULL_ACCESS, u as parseScope } from "./access-BsP0hvcC.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
@@ -1,6 +1,6 @@
1
- import { $ as ScheduleView, $t as Attachment, A as MatchView, At as UpdateGrantBody, C as InboxNextQuery, Ct as ThreadsQuery, D as LabelBody, Dt as TokenView, F as MessagesQuery, Ft as Access, G as RegisterBody, Gt as Level, Kt as Permission, M as Me, Mt as UploadStartBody, N as MessageView, Nt as UploadTicket, Ot as TypingBody, P as MessagesPage, R as PostBody, S as InboxItem, St as ThreadsPage, T as InboxQuery, Tt as TokenBody, U as ReactBody, X as ScheduleBody, Zt as Actor, a as ChannelView, b as InboxAckBody, c as Discovery, d as EventsQuery, en as Author, et as SchedulesQuery, ft as SyncFindQuery, g as GrantBody, gt as SyncReceiptBody, i as BoardEventView, it as SourceJoinBody, j as MatchesQuery, k as LinkedQuery, l as EditBody, lt as SyncCopiesQuery, m as Explanation, mt as SyncImportBody, o as CreateChannelBody, ot as SourceRead, p as ExplainQuery, pt as SyncFindView, q as RegistrationView, rn as ExternalEvent, rt as SourceJoin, s as DeleteBody, st as SourceReadQuery, t as AckBody, tn as Labels, u as EventsPage, ut as SyncCopiesView, vt as SyncThreadView, w as InboxPushBody, x as InboxEntry, xt as ThreadView, y as GrantView, yt as SyncedView } from "./routes-De4W6lEs.mjs";
2
- import { d as Pinned, l as Known, m as StoredGrant, o as Granted, t as Authenticate } from "./auth-aaoKt5DK.mjs";
3
- import { L as ProfileOption, M as BoardClient, P as ErrorOrigin, p as SyncProvider } from "./provider-hB8QNrwm.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-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";
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>>;
@@ -1,4 +1,4 @@
1
- import { t as Backend } from "./backend-u1sVvybh.mjs";
1
+ import { t as Backend } from "./backend-D21q8mdm.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-CPz22MQ8.mjs";
1
+ import { t as local } from "./local-DJ_qI9q7.mjs";
2
2
  export { local };
@@ -1,5 +1,5 @@
1
- import "./external-CYe424fO.mjs";
2
- import { c as SyncProvider, s as ResolvedTarget } from "./events-IQg0k281.mjs";
1
+ import "./external-BA2aCC_3.mjs";
2
+ import { c as SyncProvider, s as ResolvedTarget } from "./events-AEKh9tJm.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 { Zt as Actor, an as ExternalLink, in as ExternalFile, nn as ExternalAuthor, ot as SourceRead, rt as SourceJoin } from "./routes-De4W6lEs.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-hB8QNrwm.mjs";
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";
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-BkVMdXP1.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-DGID-4Z2.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-B8oZEByR.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-BLtqSwha.mjs";
2
2
  export { commands, filters, globalOptions, groups, option, options, usage };
@@ -1,5 +1,5 @@
1
- import { d as Board } from "./backend-u1sVvybh.mjs";
2
- import "./index-D6mK0Ial.mjs";
1
+ import { d as Board } from "./backend-D21q8mdm.mjs";
2
+ import "./index-LREsSZb2.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
@@ -1,4 +1,4 @@
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-DScDKwQN.mjs";
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";
2
2
  //#region src/cli/embedded.ts
3
3
  /**
4
4
  * Board's CLI as `appName` names it in help, usage, and errors (`vercel board`). With no board
package/dist/cli.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import { p as ATTACHMENT_BYTES_MAX } from "./errors-D8ifv16L.mjs";
2
+ import { p as ATTACHMENT_BYTES_MAX } from "./errors-rYDxZEuN.mjs";
3
3
  import "./schemas-BG205xds.mjs";
4
- import { a as option } from "./commands-B8oZEByR.mjs";
5
- import { d as projectDir } from "./server-Ov6GBJ8j.mjs";
6
- import { r as main, u as who } from "./main-DScDKwQN.mjs";
4
+ import { a as option } from "./commands-BLtqSwha.mjs";
5
+ import { d as projectDir } from "./server-CS-1aeTl.mjs";
6
+ import { r as main, u as who } from "./main-Jz4nbNJi.mjs";
7
7
  import { randomBytes, timingSafeEqual } from "node:crypto";
8
8
  import { appendFile, readFile } from "node:fs/promises";
9
9
  import { join } from "node:path";
@@ -661,7 +661,7 @@ const local = {
661
661
  if (args.length > 0) throw usage("serve takes no arguments: pass its port with --port, and its directory with --dir.");
662
662
  const port = portFlag();
663
663
  const root = projectDir();
664
- const { localHandle, serveLocal } = await import("./serve-B1noQRkn.mjs");
664
+ const { localHandle, serveLocal } = await import("./serve-Puf3I-oI.mjs");
665
665
  const handle = flags.handle ?? process.env.BOARD_HANDLE;
666
666
  const local = await serveLocal({
667
667
  dir: flags.dir ?? join(root, ".board"),
@@ -207,9 +207,184 @@ const options = {
207
207
  },
208
208
  can: {
209
209
  type: "string",
210
+ multiple: true,
210
211
  value: "scope",
211
212
  description: "what it may do (default: *=read,post,react,label)"
212
213
  },
214
+ user: {
215
+ type: "string",
216
+ multiple: true,
217
+ value: "email",
218
+ description: "a person on the team"
219
+ },
220
+ project: {
221
+ type: "string",
222
+ multiple: true,
223
+ short: "p",
224
+ value: "name|id",
225
+ description: "a project's deployments"
226
+ },
227
+ github: {
228
+ type: "string",
229
+ multiple: true,
230
+ value: "owner/repo",
231
+ description: "GitHub Actions' runs in a repository"
232
+ },
233
+ oidc: {
234
+ type: "string",
235
+ multiple: true,
236
+ value: "issuer",
237
+ description: "an issuer's tokens, by its URL"
238
+ },
239
+ "all-users": {
240
+ type: "boolean",
241
+ description: "every person on the team"
242
+ },
243
+ "all-projects": {
244
+ type: "boolean",
245
+ description: "every project's deployments on the team"
246
+ },
247
+ app: {
248
+ type: "string",
249
+ multiple: true,
250
+ value: "slug|id",
251
+ description: "an app installed on the team"
252
+ },
253
+ "all-apps": {
254
+ type: "boolean",
255
+ description: "every app installed on the team"
256
+ },
257
+ everyone: {
258
+ type: "boolean",
259
+ description: "everyone let in some other way, and no one new"
260
+ },
261
+ environment: {
262
+ type: "string",
263
+ multiple: true,
264
+ short: "e",
265
+ value: "environment",
266
+ description: "where its --project runs"
267
+ },
268
+ workflow: {
269
+ type: "string",
270
+ multiple: true,
271
+ value: "file",
272
+ description: "its --github's workflow, e.g. ci.yml"
273
+ },
274
+ "git-branch": {
275
+ type: "string",
276
+ multiple: true,
277
+ value: "branch",
278
+ description: "its --github's branch"
279
+ },
280
+ event: {
281
+ type: "string",
282
+ multiple: true,
283
+ value: "event",
284
+ description: "its --github's event, e.g. push"
285
+ },
286
+ claim: {
287
+ type: "string",
288
+ multiple: true,
289
+ value: "k=v",
290
+ description: "a claim its --oidc's tokens carry"
291
+ },
292
+ "add-user": {
293
+ type: "string",
294
+ multiple: true,
295
+ value: "email",
296
+ description: "add a person"
297
+ },
298
+ "add-project": {
299
+ type: "string",
300
+ multiple: true,
301
+ value: "name|id",
302
+ description: "add a project's deployments"
303
+ },
304
+ "add-github": {
305
+ type: "string",
306
+ multiple: true,
307
+ value: "owner/repo",
308
+ description: "add a repository's runs"
309
+ },
310
+ "add-oidc": {
311
+ type: "string",
312
+ multiple: true,
313
+ value: "issuer",
314
+ description: "add an issuer's tokens"
315
+ },
316
+ "add-all-users": {
317
+ type: "boolean",
318
+ description: "add every person on the team"
319
+ },
320
+ "add-all-projects": {
321
+ type: "boolean",
322
+ description: "add every project on the team"
323
+ },
324
+ "add-app": {
325
+ type: "string",
326
+ multiple: true,
327
+ value: "slug|id",
328
+ description: "add an app"
329
+ },
330
+ "add-all-apps": {
331
+ type: "boolean",
332
+ description: "add every app on the team"
333
+ },
334
+ "add-everyone": {
335
+ type: "boolean",
336
+ description: "add everyone something else lets in"
337
+ },
338
+ "remove-user": {
339
+ type: "string",
340
+ multiple: true,
341
+ value: "email",
342
+ description: "remove a person"
343
+ },
344
+ "remove-project": {
345
+ type: "string",
346
+ multiple: true,
347
+ value: "name|id",
348
+ description: "remove a project, whatever its environments"
349
+ },
350
+ "remove-github": {
351
+ type: "string",
352
+ multiple: true,
353
+ value: "owner/repo",
354
+ description: "remove a repository's runs"
355
+ },
356
+ "remove-oidc": {
357
+ type: "string",
358
+ multiple: true,
359
+ value: "issuer",
360
+ description: "remove an issuer's tokens"
361
+ },
362
+ "remove-all-users": {
363
+ type: "boolean",
364
+ description: "remove every person on the team"
365
+ },
366
+ "remove-all-projects": {
367
+ type: "boolean",
368
+ description: "remove every project on the team"
369
+ },
370
+ "remove-app": {
371
+ type: "string",
372
+ multiple: true,
373
+ value: "slug|id",
374
+ description: "remove an app"
375
+ },
376
+ "remove-all-apps": {
377
+ type: "boolean",
378
+ description: "remove every app on the team"
379
+ },
380
+ "remove-everyone": {
381
+ type: "boolean",
382
+ description: "remove everyone"
383
+ },
384
+ private: {
385
+ type: "boolean",
386
+ description: "closed to everyone but you, in the same write"
387
+ },
213
388
  profile: {
214
389
  type: "string",
215
390
  value: "name",
@@ -375,7 +550,7 @@ const commands = [
375
550
  {
376
551
  group: "the board",
377
552
  name: "grants",
378
- description: "who may do what where: people, projects, and workflows, and what each grant lets them do",
553
+ description: "who may do what where, grant by grant",
379
554
  arguments: [],
380
555
  options: [],
381
556
  runsWithoutSubcommand: true,
@@ -383,30 +558,150 @@ const commands = [
383
558
  name: "list the grants",
384
559
  value: "grants"
385
560
  }],
386
- subcommands: [{
387
- name: "list",
388
- default: true,
389
- description: "the board's grants",
390
- arguments: [],
391
- options: [],
392
- examples: [{
393
- name: "list the grants",
394
- value: "grants list"
395
- }]
396
- }, {
397
- name: "revoke",
398
- description: "stop letting them in",
399
- arguments: [{
400
- name: "grant",
401
- required: true,
402
- description: "its ID, as grants shows it (g3)"
403
- }],
404
- options: [],
405
- examples: [{
406
- name: "revoke a grant",
407
- value: "grants revoke g3"
408
- }]
409
- }]
561
+ subcommands: [
562
+ {
563
+ name: "list",
564
+ default: true,
565
+ description: "the board's grants",
566
+ arguments: [],
567
+ options: [],
568
+ examples: [{
569
+ name: "list the grants",
570
+ value: "grants list"
571
+ }]
572
+ },
573
+ {
574
+ name: "create",
575
+ description: "let principals do what --can says, where it says",
576
+ arguments: [],
577
+ options: [
578
+ ...[
579
+ "user",
580
+ "project",
581
+ "github",
582
+ "oidc",
583
+ "app",
584
+ "all-users",
585
+ "all-projects",
586
+ "all-apps",
587
+ "everyone"
588
+ ].map((name) => option(name)),
589
+ option("environment", "where its --project runs (default: production)"),
590
+ ...[
591
+ "workflow",
592
+ "git-branch",
593
+ "event",
594
+ "claim"
595
+ ].map((name) => option(name)),
596
+ option("can", "what they may do, repeated: perms, all, or none", "pattern=perms")
597
+ ],
598
+ examples: [
599
+ {
600
+ name: "close security/ to everyone",
601
+ value: "grants create --everyone --can 'security/=none'"
602
+ },
603
+ {
604
+ name: "and let two people in",
605
+ value: "grants create --user alice@acme.com --user bob@acme.com --can 'security/=all'"
606
+ },
607
+ {
608
+ name: "a project's production and previews",
609
+ value: "grants create --project sec --environment production,preview --can 'security/=read,post'"
610
+ },
611
+ {
612
+ name: "two repositories' workflows",
613
+ value: "grants create --github acme/web --workflow ci.yml --git-branch main --github acme/api --workflow deploy.yml --can 'ci/=post'"
614
+ },
615
+ {
616
+ name: "another issuer's tokens",
617
+ value: "grants create --oidc https://gitlab.com --claim project_id=42 --can 'ci/=post'"
618
+ }
619
+ ]
620
+ },
621
+ {
622
+ name: "update",
623
+ description: "add or remove principals, or replace its --can",
624
+ arguments: [{
625
+ name: "grant",
626
+ required: true,
627
+ description: "its ID, as grants shows it (g3)"
628
+ }],
629
+ options: [...[
630
+ "add-user",
631
+ "add-project",
632
+ "add-github",
633
+ "add-oidc",
634
+ "add-app",
635
+ "add-all-users",
636
+ "add-all-projects",
637
+ "add-all-apps",
638
+ "add-everyone",
639
+ "remove-user",
640
+ "remove-project",
641
+ "remove-github",
642
+ "remove-oidc",
643
+ "remove-app",
644
+ "remove-all-users",
645
+ "remove-all-projects",
646
+ "remove-all-apps",
647
+ "remove-everyone",
648
+ "environment",
649
+ "workflow",
650
+ "git-branch",
651
+ "event",
652
+ "claim"
653
+ ].map((name) => option(name)), option("can", "replaces what it lets them do", "pattern=perms")],
654
+ examples: [{
655
+ name: "let another person in",
656
+ value: "grants update g4 --add-user carol@acme.com"
657
+ }, {
658
+ name: "drop a project, and narrow it",
659
+ value: "grants update g5 --remove-project sec --can 'security/=read'"
660
+ }]
661
+ },
662
+ {
663
+ name: "explain",
664
+ description: "which grant decides a channel, for you or anyone",
665
+ arguments: [{
666
+ name: "channel",
667
+ required: true,
668
+ description: "a channel, such as security/incidents"
669
+ }],
670
+ options: [...[
671
+ "user",
672
+ "project",
673
+ "github",
674
+ "oidc",
675
+ "app",
676
+ "environment",
677
+ "workflow",
678
+ "git-branch",
679
+ "event",
680
+ "claim"
681
+ ].map((name) => option(name))],
682
+ examples: [{
683
+ name: "what you may do in a channel",
684
+ value: "grants explain security/incidents"
685
+ }, {
686
+ name: "what someone else may",
687
+ value: "grants explain --user bob@acme.com security/incidents"
688
+ }]
689
+ },
690
+ {
691
+ name: "revoke",
692
+ description: "stop letting them in",
693
+ arguments: [{
694
+ name: "grant",
695
+ required: true,
696
+ description: "its ID, as grants shows it (g3)"
697
+ }],
698
+ options: [],
699
+ examples: [{
700
+ name: "revoke a grant",
701
+ value: "grants revoke g3"
702
+ }]
703
+ }
704
+ ]
410
705
  },
411
706
  {
412
707
  group: "the board",
@@ -437,10 +732,13 @@ const commands = [
437
732
  required: true,
438
733
  description: "its path, such as dev/alerts"
439
734
  }],
440
- options: [],
735
+ options: [option("private")],
441
736
  examples: [{
442
737
  name: "make a channel for alerts",
443
738
  value: "channels create dev/alerts"
739
+ }, {
740
+ name: "one only you can see, until you grant others",
741
+ value: "channels create security --private"
444
742
  }]
445
743
  }]
446
744
  },