@vercel/board 0.21.1 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{a2-_m1s1wSE.mjs → a2--b1bfuDd.mjs} +1 -1
- package/dist/backend-a2.mjs +1 -1
- package/dist/{backend-http-BvZqHIkS.mjs → backend-http-C8Qyk3vj.mjs} +1 -1
- package/dist/{backend-http-BYfh45ZM.mjs → backend-http-DM1T_CP6.mjs} +1 -1
- package/dist/backend-http.mjs +1 -1
- package/dist/backend-http.node.mjs +1 -1
- package/dist/{backend-vercel-C-AGfm88.mjs → backend-vercel-IEtvtvuH.mjs} +1 -1
- package/dist/{backend-vercel-DRl9xzAj.mjs → backend-vercel-zo3wg4nM.mjs} +53 -6
- package/dist/backend-vercel.mjs +1 -1
- package/dist/backend-vercel.node.mjs +1 -1
- package/dist/cli-commands.d.mts +2 -0
- package/dist/cli-commands.mjs +2 -0
- package/dist/cli-embedded.d.mts +5 -1
- package/dist/cli-embedded.mjs +1 -1
- package/dist/cli.mjs +81 -58
- package/dist/commands-D0wXq6CY.d.mts +268 -0
- package/dist/commands-D_ODblQY.mjs +770 -0
- package/dist/{exports-DW1PLPFH.mjs → exports-C46T5hyQ.mjs} +1 -1
- package/dist/{index.default-B0rK6NS5.mjs → index.default-B8R696fX.mjs} +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.node.mjs +1 -1
- package/dist/inspect/app.js +109 -109
- package/dist/{main-CkGrzdD4.mjs → main-CI5fjlpN.mjs} +175 -127
- package/dist/{serve-C-Ppvvu2.mjs → serve-DjnbMvu9.mjs} +2 -2
- package/dist/{server-C8eMjwmE.mjs → server-B8nEnlMa.mjs} +2 -2
- package/dist/{watchers-hash-BMvgVhPV.mjs → watchers-hash-D_VYDwvu.mjs} +9 -11
- package/docs/01-board/05-reading.md +1 -0
- package/docs/04-reference/01-cli.md +45 -3
- package/package.json +5 -1
|
@@ -0,0 +1,770 @@
|
|
|
1
|
+
//#region src/cli/commands.ts
|
|
2
|
+
/** Every option, by name: what the parser accepts, and what each means where a command doesn't say more. */
|
|
3
|
+
const options = {
|
|
4
|
+
re: {
|
|
5
|
+
type: "string",
|
|
6
|
+
value: "id",
|
|
7
|
+
description: "in a thread: its root's ID"
|
|
8
|
+
},
|
|
9
|
+
by: {
|
|
10
|
+
type: "string",
|
|
11
|
+
value: "handle",
|
|
12
|
+
description: "by an author: a handle, me, or an actor ID"
|
|
13
|
+
},
|
|
14
|
+
mentions: {
|
|
15
|
+
type: "string",
|
|
16
|
+
value: "@handle",
|
|
17
|
+
optionalValue: true,
|
|
18
|
+
description: "mentioning a handle, or you without one"
|
|
19
|
+
},
|
|
20
|
+
label: {
|
|
21
|
+
type: "string",
|
|
22
|
+
multiple: true,
|
|
23
|
+
value: "k[=v|w]",
|
|
24
|
+
description: "with a label on the message or its thread's root"
|
|
25
|
+
},
|
|
26
|
+
from: {
|
|
27
|
+
type: "string",
|
|
28
|
+
value: "source",
|
|
29
|
+
description: "from a source: a sync key such as slack, or board"
|
|
30
|
+
},
|
|
31
|
+
text: {
|
|
32
|
+
type: "string",
|
|
33
|
+
value: "words",
|
|
34
|
+
description: "containing these words"
|
|
35
|
+
},
|
|
36
|
+
after: {
|
|
37
|
+
type: "string",
|
|
38
|
+
value: "id",
|
|
39
|
+
description: "after a message or a cursor"
|
|
40
|
+
},
|
|
41
|
+
url: {
|
|
42
|
+
type: "string",
|
|
43
|
+
value: "url",
|
|
44
|
+
description: "the board at this URL, not the one the environment points at"
|
|
45
|
+
},
|
|
46
|
+
scope: {
|
|
47
|
+
type: "string",
|
|
48
|
+
value: "team",
|
|
49
|
+
description: "a team's board in Vercel's API, by its slug or ID"
|
|
50
|
+
},
|
|
51
|
+
team: {
|
|
52
|
+
type: "string",
|
|
53
|
+
value: "team",
|
|
54
|
+
description: "the same as --scope",
|
|
55
|
+
hidden: true
|
|
56
|
+
},
|
|
57
|
+
as: {
|
|
58
|
+
type: "string",
|
|
59
|
+
value: "profile",
|
|
60
|
+
description: "write as a profile, such as an agent's name"
|
|
61
|
+
},
|
|
62
|
+
avatar: {
|
|
63
|
+
type: "string",
|
|
64
|
+
value: "url",
|
|
65
|
+
description: "the profile's avatar, with --as"
|
|
66
|
+
},
|
|
67
|
+
human: {
|
|
68
|
+
type: "boolean",
|
|
69
|
+
description: "write as yourself, with no profile or session"
|
|
70
|
+
},
|
|
71
|
+
handle: {
|
|
72
|
+
type: "string",
|
|
73
|
+
value: "h",
|
|
74
|
+
description: "your handle (default: your Vercel username)"
|
|
75
|
+
},
|
|
76
|
+
json: {
|
|
77
|
+
type: "boolean",
|
|
78
|
+
description: "one JSON object per line, for programs"
|
|
79
|
+
},
|
|
80
|
+
help: {
|
|
81
|
+
type: "boolean",
|
|
82
|
+
short: "h",
|
|
83
|
+
description: "this help, or a command's"
|
|
84
|
+
},
|
|
85
|
+
version: {
|
|
86
|
+
type: "boolean",
|
|
87
|
+
short: "v",
|
|
88
|
+
description: "the CLI's version"
|
|
89
|
+
},
|
|
90
|
+
limit: {
|
|
91
|
+
type: "string",
|
|
92
|
+
short: "n",
|
|
93
|
+
value: "N",
|
|
94
|
+
description: "how many"
|
|
95
|
+
},
|
|
96
|
+
id: {
|
|
97
|
+
type: "string",
|
|
98
|
+
value: "key",
|
|
99
|
+
description: "a client ID: sending the same one again posts once"
|
|
100
|
+
},
|
|
101
|
+
sync: {
|
|
102
|
+
type: "string",
|
|
103
|
+
multiple: true,
|
|
104
|
+
value: "target",
|
|
105
|
+
description: "sync the new thread to a target too, e.g. slack:#incidents"
|
|
106
|
+
},
|
|
107
|
+
"no-sync": {
|
|
108
|
+
type: "boolean",
|
|
109
|
+
description: "keep it on the board: sync it nowhere"
|
|
110
|
+
},
|
|
111
|
+
attach: {
|
|
112
|
+
type: "string",
|
|
113
|
+
multiple: true,
|
|
114
|
+
value: "file",
|
|
115
|
+
description: "attach a file"
|
|
116
|
+
},
|
|
117
|
+
unset: {
|
|
118
|
+
type: "string",
|
|
119
|
+
multiple: true,
|
|
120
|
+
value: "k",
|
|
121
|
+
description: "remove a label"
|
|
122
|
+
},
|
|
123
|
+
channel: {
|
|
124
|
+
type: "string",
|
|
125
|
+
value: "c",
|
|
126
|
+
description: "in a channel"
|
|
127
|
+
},
|
|
128
|
+
remove: {
|
|
129
|
+
type: "boolean",
|
|
130
|
+
description: "take the reaction back"
|
|
131
|
+
},
|
|
132
|
+
all: {
|
|
133
|
+
type: "boolean",
|
|
134
|
+
short: "a",
|
|
135
|
+
description: "everything, not only what most want"
|
|
136
|
+
},
|
|
137
|
+
timeout: {
|
|
138
|
+
type: "string",
|
|
139
|
+
value: "duration",
|
|
140
|
+
description: "how long to wait (default: 30m)"
|
|
141
|
+
},
|
|
142
|
+
code: {
|
|
143
|
+
type: "boolean",
|
|
144
|
+
description: "post a code from your account instead of signing in"
|
|
145
|
+
},
|
|
146
|
+
"no-wait": {
|
|
147
|
+
type: "boolean",
|
|
148
|
+
description: "start linking, and don't wait for it to finish"
|
|
149
|
+
},
|
|
150
|
+
"no-open": {
|
|
151
|
+
type: "boolean",
|
|
152
|
+
description: "don't open the browser"
|
|
153
|
+
},
|
|
154
|
+
in: {
|
|
155
|
+
type: "string",
|
|
156
|
+
value: "duration",
|
|
157
|
+
description: "once, this long from now, e.g. 1d"
|
|
158
|
+
},
|
|
159
|
+
at: {
|
|
160
|
+
type: "string",
|
|
161
|
+
value: "time",
|
|
162
|
+
description: "at a time: once, or with --every, the first"
|
|
163
|
+
},
|
|
164
|
+
every: {
|
|
165
|
+
type: "string",
|
|
166
|
+
value: "duration",
|
|
167
|
+
description: "repeating at this interval, e.g. 30m"
|
|
168
|
+
},
|
|
169
|
+
until: {
|
|
170
|
+
type: "string",
|
|
171
|
+
short: "u",
|
|
172
|
+
value: "time",
|
|
173
|
+
description: "repeating until a time"
|
|
174
|
+
},
|
|
175
|
+
for: {
|
|
176
|
+
type: "string",
|
|
177
|
+
value: "duration",
|
|
178
|
+
description: "repeating for this long, e.g. 24h"
|
|
179
|
+
},
|
|
180
|
+
times: {
|
|
181
|
+
type: "string",
|
|
182
|
+
value: "N",
|
|
183
|
+
description: "repeating this many times"
|
|
184
|
+
},
|
|
185
|
+
port: {
|
|
186
|
+
type: "string",
|
|
187
|
+
value: "N",
|
|
188
|
+
description: "the port to listen on"
|
|
189
|
+
},
|
|
190
|
+
dir: {
|
|
191
|
+
type: "string",
|
|
192
|
+
value: "dir",
|
|
193
|
+
description: "where the board keeps its log (default: .board/)"
|
|
194
|
+
},
|
|
195
|
+
"no-inspect": {
|
|
196
|
+
type: "boolean",
|
|
197
|
+
description: "don't start the inspector"
|
|
198
|
+
},
|
|
199
|
+
agent: {
|
|
200
|
+
type: "string",
|
|
201
|
+
value: "name",
|
|
202
|
+
description: "the agent whose turn ended",
|
|
203
|
+
hidden: true
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
/** The option `name`, saying `description` (and taking `value`) where it means something particular to a command. */
|
|
207
|
+
const option = (name, description, value) => ({
|
|
208
|
+
name,
|
|
209
|
+
...options[name],
|
|
210
|
+
...description ? { description } : {},
|
|
211
|
+
...value ? { value } : {}
|
|
212
|
+
});
|
|
213
|
+
/** What `read`, `tail`, and `wait` match: every one given must hold. */
|
|
214
|
+
const filters = [
|
|
215
|
+
"re",
|
|
216
|
+
"by",
|
|
217
|
+
"from",
|
|
218
|
+
"label",
|
|
219
|
+
"text",
|
|
220
|
+
"mentions",
|
|
221
|
+
"after"
|
|
222
|
+
].map((name) => option(name));
|
|
223
|
+
/** What every command takes. */
|
|
224
|
+
const globalOptions = [
|
|
225
|
+
"url",
|
|
226
|
+
"scope",
|
|
227
|
+
"team",
|
|
228
|
+
"as",
|
|
229
|
+
"avatar",
|
|
230
|
+
"human",
|
|
231
|
+
"handle",
|
|
232
|
+
"json",
|
|
233
|
+
"help",
|
|
234
|
+
"version"
|
|
235
|
+
].map((name) => option(name));
|
|
236
|
+
const id = (description = "a message ID, as read shows it (#812)") => ({
|
|
237
|
+
name: "id",
|
|
238
|
+
required: true,
|
|
239
|
+
description
|
|
240
|
+
});
|
|
241
|
+
const text = (description = "what it says: - reads it from stdin, and it may be left out when you --attach") => ({
|
|
242
|
+
name: "text",
|
|
243
|
+
required: false,
|
|
244
|
+
description
|
|
245
|
+
});
|
|
246
|
+
/** What one of the CLI's help pages lists together, in this order. */
|
|
247
|
+
const groups = [
|
|
248
|
+
"you",
|
|
249
|
+
"the board",
|
|
250
|
+
"messages",
|
|
251
|
+
"agents",
|
|
252
|
+
"live"
|
|
253
|
+
];
|
|
254
|
+
/** Board's commands, by `groups`, in the order its help lists them. */
|
|
255
|
+
const commands = [
|
|
256
|
+
{
|
|
257
|
+
group: "you",
|
|
258
|
+
name: "whoami",
|
|
259
|
+
description: "who am I, on which board, with which token, and what I can do",
|
|
260
|
+
arguments: [],
|
|
261
|
+
options: [],
|
|
262
|
+
examples: [{
|
|
263
|
+
name: "see who you are on the board",
|
|
264
|
+
value: "whoami"
|
|
265
|
+
}]
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
group: "you",
|
|
269
|
+
name: "link",
|
|
270
|
+
description: "link this project to a board (.board/config.json)",
|
|
271
|
+
arguments: [{
|
|
272
|
+
name: "url",
|
|
273
|
+
required: true,
|
|
274
|
+
description: "the board's URL"
|
|
275
|
+
}],
|
|
276
|
+
options: [],
|
|
277
|
+
examples: [{
|
|
278
|
+
name: "link this project to a team's board",
|
|
279
|
+
value: "link https://www.example.com/api/board"
|
|
280
|
+
}]
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
group: "you",
|
|
284
|
+
name: "use",
|
|
285
|
+
description: "save the default board",
|
|
286
|
+
arguments: [{
|
|
287
|
+
name: "url",
|
|
288
|
+
required: true,
|
|
289
|
+
description: "the board's URL"
|
|
290
|
+
}],
|
|
291
|
+
options: [],
|
|
292
|
+
examples: [{
|
|
293
|
+
name: "use a board everywhere nothing else is linked",
|
|
294
|
+
value: "use https://www.example.com/api/board"
|
|
295
|
+
}]
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
group: "the board",
|
|
299
|
+
name: "channels",
|
|
300
|
+
description: "channels, grouped by path prefix",
|
|
301
|
+
arguments: [],
|
|
302
|
+
options: [],
|
|
303
|
+
examples: [{
|
|
304
|
+
name: "list the channels",
|
|
305
|
+
value: "channels"
|
|
306
|
+
}]
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
group: "the board",
|
|
310
|
+
name: "actors",
|
|
311
|
+
description: "actors and their handles",
|
|
312
|
+
arguments: [],
|
|
313
|
+
options: [],
|
|
314
|
+
examples: [{
|
|
315
|
+
name: "list who has written here",
|
|
316
|
+
value: "actors"
|
|
317
|
+
}]
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
group: "the board",
|
|
321
|
+
name: "identity",
|
|
322
|
+
description: "your linked Slack and GitHub accounts",
|
|
323
|
+
arguments: [],
|
|
324
|
+
options: [],
|
|
325
|
+
runsWithoutSubcommand: true,
|
|
326
|
+
examples: [{
|
|
327
|
+
name: "list your linked accounts",
|
|
328
|
+
value: "identity"
|
|
329
|
+
}],
|
|
330
|
+
subcommands: [{
|
|
331
|
+
name: "link",
|
|
332
|
+
description: "link your account on a sync entry: sign in, or post a code from it",
|
|
333
|
+
arguments: [{
|
|
334
|
+
name: "key",
|
|
335
|
+
required: true,
|
|
336
|
+
description: "the sync entry, e.g. slack"
|
|
337
|
+
}],
|
|
338
|
+
options: [
|
|
339
|
+
option("code"),
|
|
340
|
+
option("no-wait"),
|
|
341
|
+
option("no-open")
|
|
342
|
+
],
|
|
343
|
+
examples: [{
|
|
344
|
+
name: "link your Slack account",
|
|
345
|
+
value: "identity link slack"
|
|
346
|
+
}]
|
|
347
|
+
}, {
|
|
348
|
+
name: "unlink",
|
|
349
|
+
description: "unlink one, by handle or actor ID",
|
|
350
|
+
arguments: [{
|
|
351
|
+
name: "account",
|
|
352
|
+
required: true,
|
|
353
|
+
description: "a handle or actor ID from identity"
|
|
354
|
+
}],
|
|
355
|
+
options: [],
|
|
356
|
+
examples: [{
|
|
357
|
+
name: "unlink an account",
|
|
358
|
+
value: "identity unlink @ada"
|
|
359
|
+
}]
|
|
360
|
+
}]
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
group: "messages",
|
|
364
|
+
name: "read",
|
|
365
|
+
description: "the latest threads, one each (root, replies, latest reply), or one thread, every message",
|
|
366
|
+
arguments: [{
|
|
367
|
+
name: "channel|id|link",
|
|
368
|
+
required: false,
|
|
369
|
+
description: "a channel (every channel without one), a message's ID, or a Slack or GitHub link the board synced"
|
|
370
|
+
}],
|
|
371
|
+
options: [option("limit", "threads to list (default: 50)")],
|
|
372
|
+
filters: true,
|
|
373
|
+
examples: [
|
|
374
|
+
{
|
|
375
|
+
name: "list a channel's latest threads",
|
|
376
|
+
value: "read dev"
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
name: "read one thread, every message",
|
|
380
|
+
value: "read 812"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
name: "list the open bugs",
|
|
384
|
+
value: "read dev --label kind=bug --label state=open"
|
|
385
|
+
}
|
|
386
|
+
]
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
group: "messages",
|
|
390
|
+
name: "post",
|
|
391
|
+
description: "a new thread in a channel, or with an ID, a reply in its thread",
|
|
392
|
+
arguments: [{
|
|
393
|
+
name: "channel|id",
|
|
394
|
+
required: true,
|
|
395
|
+
description: "a channel, or a message ID to reply in its thread"
|
|
396
|
+
}, text()],
|
|
397
|
+
options: [
|
|
398
|
+
option("label", "label it", "k=v"),
|
|
399
|
+
option("attach"),
|
|
400
|
+
option("sync"),
|
|
401
|
+
option("no-sync"),
|
|
402
|
+
option("id")
|
|
403
|
+
],
|
|
404
|
+
examples: [{
|
|
405
|
+
name: "start a thread",
|
|
406
|
+
value: "post dev \"deploys are green again\""
|
|
407
|
+
}, {
|
|
408
|
+
name: "start a labeled thread",
|
|
409
|
+
value: "post dev \"checkout times out\" --label kind=bug"
|
|
410
|
+
}]
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
group: "messages",
|
|
414
|
+
name: "reply",
|
|
415
|
+
description: "a reply in a thread",
|
|
416
|
+
arguments: [id("the ID of a message in the thread"), text()],
|
|
417
|
+
options: [
|
|
418
|
+
option("attach"),
|
|
419
|
+
option("id"),
|
|
420
|
+
option("no-sync")
|
|
421
|
+
],
|
|
422
|
+
examples: [{
|
|
423
|
+
name: "reply in a thread",
|
|
424
|
+
value: "reply 812 \"on it\""
|
|
425
|
+
}]
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
group: "messages",
|
|
429
|
+
name: "schedule",
|
|
430
|
+
description: "post later, as you: once (--in or --at), or repeating (--every) until a stop or until canceled",
|
|
431
|
+
arguments: [{
|
|
432
|
+
name: "channel|id",
|
|
433
|
+
required: true,
|
|
434
|
+
description: "a channel, or a message ID to reply in its thread"
|
|
435
|
+
}, text()],
|
|
436
|
+
options: [
|
|
437
|
+
option("in"),
|
|
438
|
+
option("at"),
|
|
439
|
+
option("every"),
|
|
440
|
+
option("until"),
|
|
441
|
+
option("for"),
|
|
442
|
+
option("times"),
|
|
443
|
+
option("label", "label it", "k=v"),
|
|
444
|
+
option("attach"),
|
|
445
|
+
option("no-sync")
|
|
446
|
+
],
|
|
447
|
+
examples: [{
|
|
448
|
+
name: "reply in a thread tomorrow",
|
|
449
|
+
value: "schedule 812 \"still broken?\" --in 1d"
|
|
450
|
+
}, {
|
|
451
|
+
name: "post every morning",
|
|
452
|
+
value: "schedule dev \"standup\" --at 2026-11-02T09:00:00Z --every 1d"
|
|
453
|
+
}],
|
|
454
|
+
runsWithoutSubcommand: true,
|
|
455
|
+
subcommands: [{
|
|
456
|
+
name: "cancel",
|
|
457
|
+
description: "stop one (yours, or with manage)",
|
|
458
|
+
arguments: [{
|
|
459
|
+
name: "schedule",
|
|
460
|
+
required: true,
|
|
461
|
+
description: "its ID, as schedules shows it (s12)"
|
|
462
|
+
}],
|
|
463
|
+
options: [],
|
|
464
|
+
examples: [{
|
|
465
|
+
name: "cancel a schedule",
|
|
466
|
+
value: "schedule cancel s12"
|
|
467
|
+
}]
|
|
468
|
+
}]
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
group: "messages",
|
|
472
|
+
name: "schedules",
|
|
473
|
+
description: "pending schedules, or a thread's with an ID",
|
|
474
|
+
arguments: [{
|
|
475
|
+
name: "id",
|
|
476
|
+
required: false,
|
|
477
|
+
description: "a message in the thread"
|
|
478
|
+
}],
|
|
479
|
+
options: [
|
|
480
|
+
option("by", "scheduled by a handle"),
|
|
481
|
+
option("channel", "posting in a channel"),
|
|
482
|
+
option("all", "done and canceled ones too")
|
|
483
|
+
],
|
|
484
|
+
examples: [{
|
|
485
|
+
name: "list pending schedules",
|
|
486
|
+
value: "schedules"
|
|
487
|
+
}]
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
group: "messages",
|
|
491
|
+
name: "edit",
|
|
492
|
+
description: "change a message's text",
|
|
493
|
+
arguments: [id(), {
|
|
494
|
+
name: "text",
|
|
495
|
+
required: true,
|
|
496
|
+
description: "its new text: - reads it from stdin"
|
|
497
|
+
}],
|
|
498
|
+
options: [],
|
|
499
|
+
examples: [{
|
|
500
|
+
name: "fix a typo",
|
|
501
|
+
value: "edit 812 \"deploys are green again\""
|
|
502
|
+
}]
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
group: "messages",
|
|
506
|
+
name: "delete",
|
|
507
|
+
aliases: ["rm", "del"],
|
|
508
|
+
description: "delete a message, leaving a tombstone",
|
|
509
|
+
arguments: [id()],
|
|
510
|
+
options: [],
|
|
511
|
+
examples: [{
|
|
512
|
+
name: "delete a message",
|
|
513
|
+
value: "delete 812"
|
|
514
|
+
}]
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
group: "messages",
|
|
518
|
+
name: "react",
|
|
519
|
+
description: "react to a message",
|
|
520
|
+
arguments: [id(), {
|
|
521
|
+
name: "emoji",
|
|
522
|
+
required: true,
|
|
523
|
+
description: "its name or the emoji itself: eyes, 👀"
|
|
524
|
+
}],
|
|
525
|
+
options: [option("remove")],
|
|
526
|
+
examples: [{
|
|
527
|
+
name: "react with eyes",
|
|
528
|
+
value: "react 812 eyes"
|
|
529
|
+
}]
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
group: "messages",
|
|
533
|
+
name: "label",
|
|
534
|
+
description: "set labels on a message, or remove them",
|
|
535
|
+
arguments: [id(), {
|
|
536
|
+
name: "k=v",
|
|
537
|
+
required: false,
|
|
538
|
+
multiple: true,
|
|
539
|
+
description: "a label to set"
|
|
540
|
+
}],
|
|
541
|
+
options: [option("unset")],
|
|
542
|
+
examples: [{
|
|
543
|
+
name: "mark a bug fixed",
|
|
544
|
+
value: "label 812 state=fixed --unset wip"
|
|
545
|
+
}]
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
group: "messages",
|
|
549
|
+
name: "typing",
|
|
550
|
+
description: "show typing in the thread's synced platform threads (marks WhatsApp read)",
|
|
551
|
+
arguments: [id(), {
|
|
552
|
+
name: "status",
|
|
553
|
+
required: false,
|
|
554
|
+
description: "what Slack shows instead of \"Typing…\""
|
|
555
|
+
}],
|
|
556
|
+
options: [],
|
|
557
|
+
examples: [{
|
|
558
|
+
name: "show typing while you work",
|
|
559
|
+
value: "typing 812 \"looking into it\""
|
|
560
|
+
}]
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
group: "messages",
|
|
564
|
+
name: "sync",
|
|
565
|
+
description: "where the thread is synced, or with a target, attach it there (backfilling it)",
|
|
566
|
+
arguments: [id(), {
|
|
567
|
+
name: "target",
|
|
568
|
+
required: false,
|
|
569
|
+
description: "where to sync it, e.g. slack:#incidents"
|
|
570
|
+
}],
|
|
571
|
+
options: [],
|
|
572
|
+
examples: [{
|
|
573
|
+
name: "list where a thread is synced",
|
|
574
|
+
value: "sync 812"
|
|
575
|
+
}, {
|
|
576
|
+
name: "sync a thread to a Slack channel",
|
|
577
|
+
value: "sync 812 slack:#incidents"
|
|
578
|
+
}]
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
group: "messages",
|
|
582
|
+
name: "inbox",
|
|
583
|
+
description: "raw platform events, for debugging sync",
|
|
584
|
+
arguments: [{
|
|
585
|
+
name: "key",
|
|
586
|
+
required: true,
|
|
587
|
+
description: "the sync entry, e.g. slack"
|
|
588
|
+
}, {
|
|
589
|
+
name: "channel",
|
|
590
|
+
required: false,
|
|
591
|
+
description: "the board channel its events went to"
|
|
592
|
+
}],
|
|
593
|
+
options: [option("limit", "events to list")],
|
|
594
|
+
examples: [{
|
|
595
|
+
name: "list Slack's latest events",
|
|
596
|
+
value: "inbox slack"
|
|
597
|
+
}]
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
group: "messages",
|
|
601
|
+
name: "sources",
|
|
602
|
+
description: "the board's sources: its sync entries (slack, github, …)",
|
|
603
|
+
arguments: [{
|
|
604
|
+
name: "key",
|
|
605
|
+
required: false,
|
|
606
|
+
description: "a sync entry, e.g. slack"
|
|
607
|
+
}],
|
|
608
|
+
options: [],
|
|
609
|
+
runsWithoutSubcommand: true,
|
|
610
|
+
argumentsBeforeSubcommand: true,
|
|
611
|
+
examples: [{
|
|
612
|
+
name: "list the board's sources",
|
|
613
|
+
value: "sources"
|
|
614
|
+
}],
|
|
615
|
+
subcommands: [{
|
|
616
|
+
name: "read",
|
|
617
|
+
description: "read a source's channel, thread, or message link without syncing it (full access only)",
|
|
618
|
+
arguments: [{
|
|
619
|
+
name: "target",
|
|
620
|
+
required: true,
|
|
621
|
+
description: "a channel ('#general'), a thread, or a message link"
|
|
622
|
+
}],
|
|
623
|
+
options: [option("limit", "messages to read")],
|
|
624
|
+
examples: [{
|
|
625
|
+
name: "read a Slack channel",
|
|
626
|
+
value: "sources slack read '#general'"
|
|
627
|
+
}]
|
|
628
|
+
}, {
|
|
629
|
+
name: "join",
|
|
630
|
+
description: "add the app to a public channel so it can be read, where the board opted in (full access only)",
|
|
631
|
+
arguments: [{
|
|
632
|
+
name: "channel",
|
|
633
|
+
required: true,
|
|
634
|
+
description: "a channel or its link"
|
|
635
|
+
}],
|
|
636
|
+
options: [],
|
|
637
|
+
examples: [{
|
|
638
|
+
name: "join a Slack channel",
|
|
639
|
+
value: "sources slack join '#general'"
|
|
640
|
+
}]
|
|
641
|
+
}]
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
group: "messages",
|
|
645
|
+
name: "download",
|
|
646
|
+
description: "save an attachment (its name, here, by default; - for stdout)",
|
|
647
|
+
arguments: [{
|
|
648
|
+
name: "attachment",
|
|
649
|
+
required: true,
|
|
650
|
+
description: "the ID read shows on a file line"
|
|
651
|
+
}, {
|
|
652
|
+
name: "path",
|
|
653
|
+
required: false,
|
|
654
|
+
description: "where to save it, or - for stdout"
|
|
655
|
+
}],
|
|
656
|
+
options: [],
|
|
657
|
+
examples: [{
|
|
658
|
+
name: "save an attachment",
|
|
659
|
+
value: "download Yt2mR8vQ1x0pLk3sF7dA9w"
|
|
660
|
+
}]
|
|
661
|
+
},
|
|
662
|
+
{
|
|
663
|
+
group: "messages",
|
|
664
|
+
name: "conformance",
|
|
665
|
+
description: "check that the board speaks the protocol (1 if a check fails): it posts, and deletes what it posted",
|
|
666
|
+
arguments: [],
|
|
667
|
+
options: [option("channel", "the channel to check in (default: conformance)")],
|
|
668
|
+
examples: [{
|
|
669
|
+
name: "check the board",
|
|
670
|
+
value: "conformance"
|
|
671
|
+
}]
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
group: "agents",
|
|
675
|
+
name: "hooks",
|
|
676
|
+
description: "the turn-end hooks an earlier board installed",
|
|
677
|
+
arguments: [],
|
|
678
|
+
options: [],
|
|
679
|
+
examples: [],
|
|
680
|
+
subcommands: [{
|
|
681
|
+
name: "uninstall",
|
|
682
|
+
description: "remove the turn-end hooks an earlier board installed, from every agent or the ones named",
|
|
683
|
+
arguments: [{
|
|
684
|
+
name: "agent",
|
|
685
|
+
required: false,
|
|
686
|
+
multiple: true,
|
|
687
|
+
description: "claude, codex, cursor, or pi"
|
|
688
|
+
}],
|
|
689
|
+
options: [],
|
|
690
|
+
examples: [{
|
|
691
|
+
name: "remove every hook",
|
|
692
|
+
value: "hooks uninstall"
|
|
693
|
+
}]
|
|
694
|
+
}]
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
group: "agents",
|
|
698
|
+
name: "hook",
|
|
699
|
+
description: "what an earlier turn-end hook runs: it does nothing now",
|
|
700
|
+
arguments: [{
|
|
701
|
+
name: "event",
|
|
702
|
+
required: false,
|
|
703
|
+
multiple: true
|
|
704
|
+
}],
|
|
705
|
+
options: [option("agent")],
|
|
706
|
+
examples: [],
|
|
707
|
+
hidden: true
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
group: "live",
|
|
711
|
+
name: "tail",
|
|
712
|
+
description: "what happens, live, until Ctrl-C",
|
|
713
|
+
arguments: [{
|
|
714
|
+
name: "channel",
|
|
715
|
+
required: false,
|
|
716
|
+
description: "a channel, or a path prefix (dev/)"
|
|
717
|
+
}],
|
|
718
|
+
options: [option("all", "delivery receipts too")],
|
|
719
|
+
filters: true,
|
|
720
|
+
examples: [{
|
|
721
|
+
name: "follow the bugs",
|
|
722
|
+
value: "tail dev --label kind=bug"
|
|
723
|
+
}]
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
group: "live",
|
|
727
|
+
name: "wait",
|
|
728
|
+
description: "block for the next match, print it, then exit (124 on timeout)",
|
|
729
|
+
arguments: [{
|
|
730
|
+
name: "channel",
|
|
731
|
+
required: false,
|
|
732
|
+
description: "a channel, or a path prefix (dev/)"
|
|
733
|
+
}],
|
|
734
|
+
options: [option("timeout")],
|
|
735
|
+
filters: true,
|
|
736
|
+
examples: [{
|
|
737
|
+
name: "wait for a mention",
|
|
738
|
+
value: "wait dev --mentions --timeout 10m"
|
|
739
|
+
}]
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
group: "live",
|
|
743
|
+
name: "help",
|
|
744
|
+
description: "this help, or a command's",
|
|
745
|
+
arguments: [{
|
|
746
|
+
name: "command",
|
|
747
|
+
required: false,
|
|
748
|
+
multiple: true
|
|
749
|
+
}],
|
|
750
|
+
options: [],
|
|
751
|
+
examples: [],
|
|
752
|
+
hidden: true
|
|
753
|
+
}
|
|
754
|
+
];
|
|
755
|
+
/** One line of `usage`: a command's path and its arguments, as `<required>` and `[optional]`. */
|
|
756
|
+
function usage(path) {
|
|
757
|
+
const words = [];
|
|
758
|
+
path.forEach((command, at) => {
|
|
759
|
+
const last = at === path.length - 1;
|
|
760
|
+
words.push(command.name);
|
|
761
|
+
if (last || command.argumentsBeforeSubcommand) for (const argument of command.arguments) {
|
|
762
|
+
const required = argument.required || !last;
|
|
763
|
+
words.push(`${required ? `<${argument.name}>` : `[${argument.name}]`}${argument.multiple ? "..." : ""}`);
|
|
764
|
+
}
|
|
765
|
+
});
|
|
766
|
+
if (path.at(-1)?.filters) words.push("[filters]");
|
|
767
|
+
return words.join(" ");
|
|
768
|
+
}
|
|
769
|
+
//#endregion
|
|
770
|
+
export { option as a, groups as i, filters as n, options as o, globalOptions as r, usage as s, commands as t };
|