@vercel/board 0.45.1 → 0.46.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 (75) hide show
  1. package/dist/{access-3udXjJAg.mjs → access-Crbvd2Dm.mjs} +2 -2
  2. package/dist/access.d.mts +2 -2
  3. package/dist/access.mjs +5 -5
  4. package/dist/{actors-DasGZnfb.mjs → actors-BBphaJ_G.mjs} +3 -3
  5. package/dist/{auth-aiOVE82-.mjs → auth-C-pFnJBA.mjs} +2 -2
  6. package/dist/{auth-BG_whr9_.d.mts → auth-CkNXnQno.d.mts} +1 -1
  7. package/dist/{backend-D6yTo8Un.d.mts → backend-D3p8gjba.d.mts} +126 -4
  8. package/dist/backend-local.d.mts +1 -1
  9. package/dist/backend-local.mjs +1 -1
  10. package/dist/{chat-provider-BvNqOQFL.mjs → chat-provider-1zpY6Qo_.mjs} +2 -2
  11. package/dist/{chat-provider-V2jnjVLq.d.mts → chat-provider-Bn33acHd.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 +3 -2
  16. package/dist/cli.mjs +6 -6
  17. package/dist/{commands-DewS14_P.d.mts → commands-CSZPQ38I.d.mts} +54 -0
  18. package/dist/{commands-CqdnjUkm.mjs → commands-D0lyo8O8.mjs} +319 -0
  19. package/dist/{conformance-BInS4_6b.mjs → conformance-Blzd4CXG.mjs} +972 -6
  20. package/dist/conformance.d.mts +6 -5
  21. package/dist/conformance.mjs +1 -1
  22. package/dist/{engine-XVBt02Bl.mjs → engine-C_SlBihU.mjs} +15 -7
  23. package/dist/{errors-ZazTZh-s.mjs → errors-DZ1tbwSM.mjs} +151 -3
  24. package/dist/{events-D17RndlV.mjs → events-mGuhF4i5.mjs} +2 -2
  25. package/dist/{exports-DCxecX15.mjs → exports-DQauuHrc.mjs} +1226 -42
  26. package/dist/exports-DUX_Yzo7.d.mts +44 -0
  27. package/dist/{external-DfhN7lKK.mjs → external-BVr1Sq0y.mjs} +1 -1
  28. package/dist/{index-Djmr4GzQ.d.mts → index-BHXg4Xdo.d.mts} +2 -2
  29. package/dist/index.d.mts +6 -6
  30. package/dist/index.mjs +5 -5
  31. package/dist/index.node.d.mts +7 -6
  32. package/dist/index.node.mjs +5 -4
  33. package/dist/inspect/app.js +215 -115
  34. package/dist/inspect/engine.js +5 -5
  35. package/dist/{inspect-CHsgnf_5.mjs → inspect-2OIjv2lW.mjs} +242 -20
  36. package/dist/inspect-F-b4GPXX.mjs +2 -0
  37. package/dist/{local-DE9vmanM.mjs → local-11FMUJrU.mjs} +1593 -60
  38. package/dist/{main-CF1Me3jg.mjs → main-BYmbTDgo.mjs} +1167 -24
  39. package/dist/{memory-DyEL0fvN.mjs → memory-CZBdVNn8.mjs} +2 -2
  40. package/dist/{middleware-BHHKHA9q.mjs → middleware-BKsTcMAv.mjs} +2 -2
  41. package/dist/{provider-BC9mPYVh.d.mts → provider-D3bfHRHA.d.mts} +119 -3
  42. package/dist/{routes-CkUetTO2.mjs → routes-B2HHHD_C.mjs} +246 -6
  43. package/dist/{routes-zm4TXKCC.d.mts → routes-NEc6w3QC.d.mts} +540 -6
  44. package/dist/{schemas-BhZaystC.mjs → schemas-7VFdomFB.mjs} +34 -1
  45. package/dist/{serve-CEMvl0EH.mjs → serve-DS2T2iWI.mjs} +4 -4
  46. package/dist/{server-Bmz0zqYM.mjs → server-Ch3tuK2k.mjs} +10 -10
  47. package/dist/{serving-BLVRrJ7P.mjs → serving-9riPNrHk.mjs} +1 -1
  48. package/dist/{sql-CyVcjw8x.mjs → sql-Bml29DpM.mjs} +174 -9
  49. package/dist/{sqlite-Con-8duk.mjs → sqlite-4C5u7-ag.mjs} +2 -2
  50. package/dist/{sqlite-db-BdzxtUOV.mjs → sqlite-db-eVb9v3zc.mjs} +1 -1
  51. package/dist/sync-chat-sdk.d.mts +2 -2
  52. package/dist/sync-chat-sdk.mjs +2 -2
  53. package/dist/sync-github.d.mts +2 -2
  54. package/dist/sync-github.mjs +2 -2
  55. package/dist/sync-linear.d.mts +3 -3
  56. package/dist/sync-linear.mjs +2 -2
  57. package/dist/sync-slack.d.mts +3 -3
  58. package/dist/sync-slack.mjs +4 -4
  59. package/dist/sync.d.mts +2 -2
  60. package/dist/sync.mjs +2 -2
  61. package/dist/{origin-BbwhnKrg.mjs → task-batch-BJcLiYe1.mjs} +83 -8
  62. package/dist/{tokens-BErYXuHZ.mjs → tokens-DPKF_cb5.mjs} +2 -2
  63. package/docs/01-board/01-mounting.md +1 -1
  64. package/docs/01-board/08-middleware.md +7 -0
  65. package/docs/01-board/11-tasks.md +348 -0
  66. package/docs/03-guides/02-inspector.md +66 -9
  67. package/docs/03-guides/06-sandboxed-agents.md +5 -3
  68. package/docs/03-guides/07-build-a-ui.md +210 -0
  69. package/docs/04-reference/01-cli.md +216 -8
  70. package/docs/04-reference/02-board.md +277 -2
  71. package/docs/04-reference/03-http.md +184 -10
  72. package/docs/04-reference/05-conformance.md +10 -7
  73. package/package.json +1 -1
  74. package/dist/exports-Gspe1eEq.d.mts +0 -4
  75. package/dist/inspect-C8U3A4jQ.mjs +0 -2
@@ -119,6 +119,11 @@ const options = {
119
119
  value: "path",
120
120
  description: "the text, from a file: - reads stdin"
121
121
  },
122
+ "tasks-file": {
123
+ type: "string",
124
+ value: "path",
125
+ description: "several tasks, from a JSON file: - reads stdin"
126
+ },
122
127
  unset: {
123
128
  type: "string",
124
129
  multiple: true,
@@ -406,6 +411,55 @@ const options = {
406
411
  type: "boolean",
407
412
  description: "don't start the inspector"
408
413
  },
414
+ state: {
415
+ type: "string",
416
+ value: "state",
417
+ description: "in a state: waiting, ready, claimed, blocked, completed, failed, canceled, open, or all (default: open)"
418
+ },
419
+ needs: {
420
+ type: "string",
421
+ multiple: true,
422
+ value: "id",
423
+ description: "wait for a task to complete first"
424
+ },
425
+ ready: {
426
+ type: "boolean",
427
+ description: "the oldest ready task in a channel, or under a prefix (work/)"
428
+ },
429
+ from: {
430
+ type: "string",
431
+ multiple: true,
432
+ value: "id",
433
+ description: "with --ready: take this owner's tasks too, by their ID"
434
+ },
435
+ wait: {
436
+ type: "string",
437
+ value: "duration",
438
+ description: "with --ready: how long to wait for one, e.g. 10m"
439
+ },
440
+ lease: {
441
+ type: "string",
442
+ value: "duration",
443
+ description: "how long to hold it: 30s to 1h (default: 15m, or what the board gives)"
444
+ },
445
+ result: {
446
+ type: "string",
447
+ value: "text",
448
+ description: "what it came to, when the command exits 0"
449
+ },
450
+ kind: {
451
+ type: "string",
452
+ value: "kind",
453
+ description: "what the hold is for: needs_input, awaiting_approval"
454
+ },
455
+ pool: {
456
+ type: "boolean",
457
+ description: "back to anyone who may claim it"
458
+ },
459
+ none: {
460
+ type: "boolean",
461
+ description: "wait for nothing"
462
+ },
409
463
  agent: {
410
464
  type: "string",
411
465
  value: "name",
@@ -453,6 +507,18 @@ const text = (description = "what it says: - reads it from stdin, and it may be
453
507
  required: false,
454
508
  description
455
509
  });
510
+ /** A task's ID: its thread's root's. */
511
+ const task = (description = "a task's ID, as tasks shows it (#812)") => ({
512
+ name: "id",
513
+ required: true,
514
+ description
515
+ });
516
+ /** `--claim` on a task: a flag there, where a grant's `--claim` takes a value. Its command's own definition is what the parser reads. */
517
+ const claimNow = {
518
+ name: "claim",
519
+ type: "boolean",
520
+ description: "claim it in the same write"
521
+ };
456
522
  /** What `--after` means on a reply: a precondition, where on a read it's a position. */
457
523
  const AFTER = "a reply only while this is the thread's newest message";
458
524
  /** What one of the CLI's help pages lists together, in this order. */
@@ -1111,6 +1177,259 @@ const commands = [
1111
1177
  value: "conformance"
1112
1178
  }]
1113
1179
  },
1180
+ {
1181
+ group: "agents",
1182
+ name: "tasks",
1183
+ description: "open tasks, oldest first: threads agents are to do, each with a state the board keeps",
1184
+ arguments: [{
1185
+ name: "channel",
1186
+ required: false,
1187
+ description: "a channel, or a path prefix (work/); every channel without one"
1188
+ }],
1189
+ options: [
1190
+ option("state"),
1191
+ option("label", "with a label on its root", "k[=v|w]"),
1192
+ option("by", "whose root a handle wrote"),
1193
+ option("for", "assigned to a profile of yours", "profile"),
1194
+ option("after", "after a cursor an earlier page printed", "cursor"),
1195
+ option("limit", "tasks to list (default: 50)")
1196
+ ],
1197
+ runsWithoutSubcommand: true,
1198
+ examples: [{
1199
+ name: "list a queue's open tasks",
1200
+ value: "tasks work/"
1201
+ }, {
1202
+ name: "list what is ready to fix",
1203
+ value: "tasks work/ --state ready --label step=fix"
1204
+ }],
1205
+ subcommands: [
1206
+ {
1207
+ name: "create",
1208
+ description: "start a thread as a task, or with an ID, make that thread one: you own it. With --tasks-file, a plan of them",
1209
+ arguments: [{
1210
+ name: "channel|id",
1211
+ required: true,
1212
+ description: "a channel, or a thread's ID to make a task of it as it is"
1213
+ }, {
1214
+ name: "text",
1215
+ required: false,
1216
+ description: "what to do, for a new thread: - reads it from stdin, and it may be left out when you --text-file or --tasks-file"
1217
+ }],
1218
+ options: [
1219
+ option("label", "label it, to route it", "k=v"),
1220
+ option("needs"),
1221
+ option("for", "only this profile of yours claims it", "profile"),
1222
+ claimNow,
1223
+ option("lease", "with --claim: how long to hold it"),
1224
+ option("text-file"),
1225
+ option("tasks-file", "a JSON array of tasks, each { key?, text, labels?, needs?, for?, noSync?, attachments? }: all of them, in as many writes as it takes"),
1226
+ option("no-sync"),
1227
+ option("idempotency-key", "sending the same one again makes it once")
1228
+ ],
1229
+ examples: [
1230
+ {
1231
+ name: "hand a fix to whoever takes fixes",
1232
+ value: "tasks create work \"fix CVE-123 in acme/web\" --label step=fix"
1233
+ },
1234
+ {
1235
+ name: "a review that waits for it",
1236
+ value: "tasks create work \"review the fix for CVE-123\" --label step=review --needs 812"
1237
+ },
1238
+ {
1239
+ name: "make a task of a thread that is there",
1240
+ value: "tasks create 812"
1241
+ },
1242
+ {
1243
+ name: "a plan of tasks that wait for each other",
1244
+ value: "tasks create work --tasks-file plan.json --idempotency-key migration-7"
1245
+ }
1246
+ ]
1247
+ },
1248
+ {
1249
+ name: "claim",
1250
+ description: "hold a task for a lease, by its ID, or with --ready the oldest ready one in a channel",
1251
+ arguments: [{
1252
+ name: "id|channel",
1253
+ required: true,
1254
+ description: "a task's ID, or with --ready a channel or a path prefix (work/)"
1255
+ }],
1256
+ options: [
1257
+ option("ready"),
1258
+ option("label", "with --ready: one whose root has this label", "k=v"),
1259
+ option("from"),
1260
+ option("wait"),
1261
+ option("lease")
1262
+ ],
1263
+ examples: [{
1264
+ name: "claim a task",
1265
+ value: "tasks claim 812"
1266
+ }, {
1267
+ name: "claim the next fix, waiting for one",
1268
+ value: "tasks claim --ready work/ --label step=fix --wait 10m"
1269
+ }]
1270
+ },
1271
+ {
1272
+ name: "run",
1273
+ description: "claim a task and run a command on it: renew while it runs, complete on exit 0, fail otherwise",
1274
+ arguments: [{
1275
+ name: "id|channel",
1276
+ required: true,
1277
+ description: "a task's ID, or with --ready a channel or a path prefix"
1278
+ }, {
1279
+ name: "cmd",
1280
+ required: true,
1281
+ multiple: true,
1282
+ description: "the command, after --: it gets BOARD_TASK, the task's ID"
1283
+ }],
1284
+ options: [
1285
+ option("result"),
1286
+ option("ready"),
1287
+ option("label", "with --ready: one whose root has this label", "k=v"),
1288
+ option("from"),
1289
+ option("wait"),
1290
+ option("lease")
1291
+ ],
1292
+ examples: [{
1293
+ name: "run the tests as a task",
1294
+ value: "tasks run 812 --result \"tests pass\" -- make test"
1295
+ }, {
1296
+ name: "work the next fix",
1297
+ value: "tasks run --ready work/ --label step=fix -- ./fix.sh"
1298
+ }]
1299
+ },
1300
+ {
1301
+ name: "renew",
1302
+ description: "extend the lease of a task you hold, from now",
1303
+ arguments: [task()],
1304
+ options: [option("lease")],
1305
+ examples: [{
1306
+ name: "hold it for another 30 minutes",
1307
+ value: "tasks renew 812 --lease 30m"
1308
+ }]
1309
+ },
1310
+ {
1311
+ name: "release",
1312
+ description: "give a task you hold back: it is ready again",
1313
+ arguments: [task()],
1314
+ options: [],
1315
+ examples: [{
1316
+ name: "give a task back",
1317
+ value: "tasks release 812"
1318
+ }]
1319
+ },
1320
+ {
1321
+ name: "complete",
1322
+ description: "finish a task you hold: what waits only for it is ready",
1323
+ arguments: [task(), {
1324
+ name: "result",
1325
+ required: false,
1326
+ description: "what it came to, in a line"
1327
+ }],
1328
+ options: [],
1329
+ examples: [{
1330
+ name: "complete a task",
1331
+ value: "tasks complete 812 \"fixed in a1b2c3, tests pass\""
1332
+ }]
1333
+ },
1334
+ {
1335
+ name: "fail",
1336
+ description: "give up on a task you hold: what waits for it keeps waiting, until it's reopened",
1337
+ arguments: [task(), {
1338
+ name: "reason",
1339
+ required: true,
1340
+ description: "why, in a line"
1341
+ }],
1342
+ options: [],
1343
+ examples: [{
1344
+ name: "fail a task",
1345
+ value: "tasks fail 812 \"the tests need a database\""
1346
+ }]
1347
+ },
1348
+ {
1349
+ name: "block",
1350
+ description: "hold a task for a person: with your claim, which it ends, or as its owner",
1351
+ arguments: [task(), {
1352
+ name: "reason",
1353
+ required: true,
1354
+ description: "what you need from them"
1355
+ }],
1356
+ options: [option("kind")],
1357
+ examples: [{
1358
+ name: "ask for approval",
1359
+ value: "tasks block 813 \"approve the prod deploy?\" --kind awaiting_approval"
1360
+ }]
1361
+ },
1362
+ {
1363
+ name: "unblock",
1364
+ description: "lift a hold, as its owner: ready again, or waiting while a task it needs has not completed",
1365
+ arguments: [task()],
1366
+ options: [],
1367
+ examples: [{
1368
+ name: "lift a hold",
1369
+ value: "tasks unblock 813"
1370
+ }]
1371
+ },
1372
+ {
1373
+ name: "reopen",
1374
+ description: "make a failed task ready again, as its owner",
1375
+ arguments: [task()],
1376
+ options: [],
1377
+ examples: [{
1378
+ name: "retry a failed task",
1379
+ value: "tasks reopen 812"
1380
+ }]
1381
+ },
1382
+ {
1383
+ name: "assign",
1384
+ description: "keep a task for one of its owner's profiles, or with --pool, for anyone who may claim it",
1385
+ arguments: [task(), {
1386
+ name: "profile",
1387
+ required: false,
1388
+ description: "a profile of the task's owner, such as fixer"
1389
+ }],
1390
+ options: [option("pool")],
1391
+ examples: [{
1392
+ name: "keep it for the fixer",
1393
+ value: "tasks assign 812 fixer"
1394
+ }, {
1395
+ name: "back to the pool",
1396
+ value: "tasks assign 812 --pool"
1397
+ }]
1398
+ },
1399
+ {
1400
+ name: "needs",
1401
+ description: "set what a task waits for, as its owner: the tasks named, in place of what it waited for",
1402
+ arguments: [task(), {
1403
+ name: "needs",
1404
+ required: false,
1405
+ multiple: true,
1406
+ description: "the tasks it waits for now, by ID"
1407
+ }],
1408
+ options: [option("none")],
1409
+ examples: [{
1410
+ name: "wait for two tasks",
1411
+ value: "tasks needs 814 812 813"
1412
+ }, {
1413
+ name: "wait for nothing",
1414
+ value: "tasks needs 814 --none"
1415
+ }]
1416
+ },
1417
+ {
1418
+ name: "cancel",
1419
+ description: "cancel a task that has not completed, as its owner: any claim ends",
1420
+ arguments: [task(), {
1421
+ name: "reason",
1422
+ required: true,
1423
+ description: "why, in a line"
1424
+ }],
1425
+ options: [],
1426
+ examples: [{
1427
+ name: "cancel a task",
1428
+ value: "tasks cancel 812 \"superseded by #820\""
1429
+ }]
1430
+ }
1431
+ ]
1432
+ },
1114
1433
  {
1115
1434
  group: "agents",
1116
1435
  name: "hooks",