@vercel/board 0.57.1 → 0.58.1

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 (71) hide show
  1. package/dist/{access-CZ419Vho.mjs → access-D1AHzFSP.mjs} +1 -1
  2. package/dist/access.d.mts +2 -2
  3. package/dist/access.mjs +4 -4
  4. package/dist/{actors-CXMWplob.mjs → actors-CCth21rU.mjs} +2 -2
  5. package/dist/{auth-AwZJQpCO.mjs → auth-Cc5_pdi7.mjs} +2 -2
  6. package/dist/{auth-C0Mla9OU.d.mts → auth-DcWTzrHz.d.mts} +1 -1
  7. package/dist/{backend-BuqwQbb4.d.mts → backend-9H57DlQt.d.mts} +23 -5
  8. package/dist/backend-local.d.mts +1 -1
  9. package/dist/backend-local.mjs +1 -1
  10. package/dist/backend-postgres/blob-vercel.d.mts +1 -1
  11. package/dist/backend-postgres.d.mts +3 -3
  12. package/dist/backend-postgres.mjs +3 -3
  13. package/dist/{blob-DjS53D1A.d.mts → blob-CdLCZEPM.d.mts} +2 -2
  14. package/dist/{chat-provider-CpYdXEpI.d.mts → chat-provider-CW-YpGWe.d.mts} +6 -5
  15. package/dist/{chat-provider-Br2RXgLV.mjs → chat-provider-eRYSL4XG.mjs} +4 -4
  16. package/dist/cli-commands.d.mts +1 -1
  17. package/dist/cli-commands.mjs +1 -1
  18. package/dist/cli-embedded.d.mts +2 -2
  19. package/dist/cli-embedded.mjs +2 -2
  20. package/dist/cli.mjs +6 -6
  21. package/dist/{client-B0DGOt7P.d.mts → client-BUPyzzFt.d.mts} +13 -1
  22. package/dist/{commands-DeYAQUcP.mjs → commands-CkRYuvpd.mjs} +74 -20
  23. package/dist/{commands-Dcm4_pc1.d.mts → commands-DryDbyWr.d.mts} +5 -0
  24. package/dist/{conformance-EtEq22w1.mjs → conformance-D9XutDay.mjs} +2 -2
  25. package/dist/conformance.d.mts +1 -1
  26. package/dist/conformance.mjs +1 -1
  27. package/dist/{engine-CfVTyEeo.mjs → engine-DVWbcEIB.mjs} +2 -2
  28. package/dist/{errors-DjatfYjl.mjs → errors-Ce_-E3_C.mjs} +50 -1
  29. package/dist/{errors-DBZtbfph.d.mts → errors-CwObkpSn.d.mts} +1 -1
  30. package/dist/{exports-BvJTIorX.d.mts → exports-Bh09j6Bd.d.mts} +5 -5
  31. package/dist/{exports-B_UGnrnN.mjs → exports-CREw274K.mjs} +92 -9
  32. package/dist/{index-DuibwQf9.d.mts → index-mgNwCwJ4.d.mts} +2 -2
  33. package/dist/index.d.mts +7 -7
  34. package/dist/index.mjs +4 -4
  35. package/dist/index.node.d.mts +8 -8
  36. package/dist/index.node.mjs +4 -4
  37. package/dist/inspect/app.js +33 -33
  38. package/dist/{inspect-DfJzHFiE.mjs → inspect-mdRycsHb.mjs} +2 -2
  39. package/dist/inspect-rfTRL8zp.mjs +2 -0
  40. package/dist/inspect.d.mts +1 -1
  41. package/dist/inspect.mjs +1 -1
  42. package/dist/{local-BiG1WJk0.mjs → local-B9UwaY2z.mjs} +3 -3
  43. package/dist/{local-D2i5sxuY.mjs → local-DMQ-Eh6v.mjs} +18 -7
  44. package/dist/{main-Bbqg3Unf.mjs → main-C7B22rE4.mjs} +159 -31
  45. package/dist/{middleware-D2AGrGj7.mjs → middleware-DVBOEd8G.mjs} +1 -1
  46. package/dist/{provider-BNVyVKtH.d.mts → provider-BnK0Bif7.d.mts} +2 -2
  47. package/dist/{routes-CSnxZyyb.d.mts → routes-D5FtKOP_.d.mts} +87 -1
  48. package/dist/{serve-D06-DMej.mjs → serve-C3B6EP7W.mjs} +6 -6
  49. package/dist/{server-BXbcS-n9.mjs → server-D5S70_au.mjs} +6 -6
  50. package/dist/{serving-B2BNr4PR.mjs → serving-BVtrFzK4.mjs} +1 -1
  51. package/dist/{shell-C8EowDEz.mjs → shell-U3QkDJIF.mjs} +1 -1
  52. package/dist/sync-chat-sdk.d.mts +2 -2
  53. package/dist/sync-chat-sdk.mjs +1 -1
  54. package/dist/sync-github.d.mts +2 -2
  55. package/dist/sync-github.mjs +1 -1
  56. package/dist/sync-linear.d.mts +3 -3
  57. package/dist/sync-linear.mjs +1 -1
  58. package/dist/sync-slack.d.mts +23 -6
  59. package/dist/sync-slack.mjs +33 -2
  60. package/dist/sync.d.mts +2 -2
  61. package/dist/{task-batch-YMVr_c5R.mjs → task-batch-BLUkrUqX.mjs} +7 -4
  62. package/dist/{tokens-CaEPmiG1.mjs → tokens-XagdeYrv.mjs} +2 -2
  63. package/dist/{version-BRR9FkLa.mjs → version-D3WaVccj.mjs} +1 -1
  64. package/docs/01-board/11-tasks.md +6 -1
  65. package/docs/02-sync/01-overview.md +4 -0
  66. package/docs/02-sync/03-slack.md +5 -0
  67. package/docs/02-sync/05-managed.md +117 -0
  68. package/docs/04-reference/01-cli.md +43 -1
  69. package/docs/04-reference/03-http.md +4 -0
  70. package/package.json +1 -1
  71. package/dist/inspect-H1MISWwN.mjs +0 -2
@@ -1,7 +1,7 @@
1
1
  import { i as ATTACHMENT_BYTES_MAX, r as parseProfileHeader, t as InvalidProfileHeader } from "./profile-header-O8wC8yk8.mjs";
2
2
  import "./schemas-CUSTEFIy.mjs";
3
- import { t as Failed, u as who } from "./main-Bbqg3Unf.mjs";
4
- import { n as relative, r as shell, t as CSP } from "./shell-C8EowDEz.mjs";
3
+ import { t as Failed, u as who } from "./main-C7B22rE4.mjs";
4
+ import { n as relative, r as shell, t as CSP } from "./shell-U3QkDJIF.mjs";
5
5
  import { t as page } from "./page-7KWSGxyC.mjs";
6
6
  import { randomBytes, timingSafeEqual } from "node:crypto";
7
7
  import { createServer } from "node:http";
@@ -0,0 +1,2 @@
1
+ import { n as inspect } from "./inspect-mdRycsHb.mjs";
2
+ export { inspect };
@@ -1,4 +1,4 @@
1
- import { t as BoardClient } from "./client-B0DGOt7P.mjs";
1
+ import { t as BoardClient } from "./client-BUPyzzFt.mjs";
2
2
  //#region src/inspect/handler.d.ts
3
3
  /** Answers the inspector's requests under `basePath`: `GET`, `POST`, `PATCH`, `PUT`, and `DELETE` alike. */
4
4
  export type InspectorHandler = (request: Request) => Promise<Response>;
package/dist/inspect.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { i as ATTACHMENT_BYTES_MAX, r as parseProfileHeader, t as InvalidProfileHeader } from "./profile-header-O8wC8yk8.mjs";
2
2
  import "./schemas-CUSTEFIy.mjs";
3
- import { n as relative, r as shell, t as CSP } from "./shell-C8EowDEz.mjs";
3
+ import { n as relative, r as shell, t as CSP } from "./shell-U3QkDJIF.mjs";
4
4
  import { t as page } from "./page-7KWSGxyC.mjs";
5
5
  //#region src/inspect/handler.ts
6
6
  /**
@@ -1,6 +1,6 @@
1
- import { t as HttpError } from "./errors-DjatfYjl.mjs";
2
- import { u as METHODS } from "./task-batch-YMVr_c5R.mjs";
3
- import { i as memoryBlob, n as a2, r as fsBlob, t as localScheduler } from "./local-D2i5sxuY.mjs";
1
+ import { t as HttpError } from "./errors-Ce_-E3_C.mjs";
2
+ import { u as METHODS } from "./task-batch-BLUkrUqX.mjs";
3
+ import { i as memoryBlob, n as a2, r as fsBlob, t as localScheduler } from "./local-DMQ-Eh6v.mjs";
4
4
  import { createHash } from "node:crypto";
5
5
  import { join, resolve } from "node:path";
6
6
  //#region src/server/local.ts
@@ -1,16 +1,16 @@
1
1
  import { a as DIRECT_UPLOAD_BYTES_MAX, d as mediaType, i as ATTACHMENT_BYTES_MAX, o as IMPORT_BYTES_MAX } from "./profile-header-O8wC8yk8.mjs";
2
2
  import { A as actorKind, D as TaskHoldKind, E as TASK_NOTE_MAX, M as platformAvatar, N as storable, O as TaskNote, T as TASK_LABEL, a as CAN_MAX, b as RemoteWatcherId, c as EDITED_HOLD, d as LabelKey, g as MessageText, h as MessageId, i as Author, j as authorView, l as Emoji, n as Attachment, o as CHANNEL_PATTERN_MAX, p as Labels, s as ChannelPath, t as ActorId, u as Handle, v as OPEN_TASK_STATES, x as SeenActorKind } from "./schemas-CUSTEFIy.mjs";
3
3
  import { a as Link, i as ExternalTarget, n as ExternalEvent, o as Origin } from "./external-DkWafjn-.mjs";
4
- import { a as duplicateId, c as notFound, f as BoardError, i as batchTooLarge, l as textTooLong, m as duration, o as forbidden, r as badRequest, t as HttpError, u as toErrorResponse, v as derivedId, y as isKeyIdOf } from "./errors-DjatfYjl.mjs";
4
+ import { a as duplicateId, c as notFound, f as BoardError, i as batchTooLarge, l as textTooLong, m as duration, o as forbidden, r as badRequest, t as HttpError, u as toErrorResponse, v as derivedId, y as isKeyIdOf } from "./errors-Ce_-E3_C.mjs";
5
5
  import { a as SCHEMA_DESCRIPTION_MAX, c as canonical, d as parseSchemaId, f as schemaId, i as BUILT_IN_SCHEMAS, l as checkDefinition, n as blocksIn, o as SCHEMA_NAME, s as SCHEMA_VERSION_MAX, u as isBuiltInName } from "./blocks-CVoBC7ur.mjs";
6
6
  import { i as mentionTerm, n as isEmail, o as mentionsIn, r as meTerms, s as replaceMentions, t as extractMentions } from "./mentions-DBGmqkr2.mjs";
7
- import { a as waitUntil, c as platformProfile, d as userIdOf, l as shownName, n as MIDDLEWARE_ACTOR, o as actorParts, s as importedHandle, t as DroppedError } from "./middleware-D2AGrGj7.mjs";
8
- import { t as VERSION } from "./version-BRR9FkLa.mjs";
9
- import { c as compileAccess, i as authorize, o as checkGrantChange, t as FULL_ACCESS, u as parseCan } from "./access-CZ419Vho.mjs";
10
- import { _ as uploadName, a as runMatch, g as carried, i as canonicalWatchers, n as SYNC_ACTOR, o as compileWatcher, r as syncTarget, s as hasCriteria, t as batchPlan, u as METHODS, v as SYNC } from "./task-batch-YMVr_c5R.mjs";
7
+ import { a as waitUntil, c as platformProfile, d as userIdOf, l as shownName, n as MIDDLEWARE_ACTOR, o as actorParts, s as importedHandle, t as DroppedError } from "./middleware-DVBOEd8G.mjs";
8
+ import { t as VERSION } from "./version-D3WaVccj.mjs";
9
+ import { c as compileAccess, i as authorize, o as checkGrantChange, t as FULL_ACCESS, u as parseCan } from "./access-D1AHzFSP.mjs";
10
+ import { _ as uploadName, a as runMatch, g as carried, i as canonicalWatchers, n as SYNC_ACTOR, o as compileWatcher, r as syncTarget, s as hasCriteria, t as batchPlan, u as METHODS, v as SYNC } from "./task-batch-BLUkrUqX.mjs";
11
11
  import { n as setOwn, t as own } from "./own-OwgPWdmh.mjs";
12
- import { E as wroteAs, T as workflowPath, b as removes, c as checkCan, g as joined, h as issuerName, l as checkGrant, n as GITHUB_ISSUER, p as grantIssuers, s as authenticates, u as checkPrincipal } from "./auth-AwZJQpCO.mjs";
13
- import { i as ownedActor, n as actorSeen, o as viaOf } from "./actors-CXMWplob.mjs";
12
+ import { E as wroteAs, T as workflowPath, b as removes, c as checkCan, g as joined, h as issuerName, l as checkGrant, n as GITHUB_ISSUER, p as grantIssuers, s as authenticates, u as checkPrincipal } from "./auth-Cc5_pdi7.mjs";
13
+ import { i as ownedActor, n as actorSeen, o as viaOf } from "./actors-CCth21rU.mjs";
14
14
  import { y as A2Error } from "./internal-CvsrprnU-DhZF6sZK.mjs";
15
15
  import { c as makeReducerBuilder, i as deliverSchedulerClear, l as reducer, n as createServer, r as deliverSchedulerAppend, s as assertSyncSchema, t as consumer } from "./server-DX7mM6nm-Cq1xPyqJ.mjs";
16
16
  import { a as foldActors, i as concernedMessageId, o as foldMessages, s as iso, t as TABLES_CONSUMER } from "./sql-CvBbb5Ui.mjs";
@@ -5172,6 +5172,8 @@ function failure(found, error) {
5172
5172
  }
5173
5173
  //#endregion
5174
5174
  //#region src/server/a2.ts
5175
+ /** What a board kept here answers a managed sync's routes: it runs none, and Vercel's board does. */
5176
+ const noManagedSync = () => new HttpError(501, "no_managed_sync", "this board runs no syncs of its own: Vercel's board does, and a board kept here syncs what board({ sync }) names");
5175
5177
  /** The board's own code, through its handle: `team.post(…)`. With `as(profile)`, `board:client:<profile>`. */
5176
5178
  const CLIENT_ACTOR = "board:client";
5177
5179
  /** A cursor or message ref in a request, as this board's log index: decimals, from 0. */
@@ -5801,6 +5803,15 @@ function build(options, binding) {
5801
5803
  schedule: blindSchedule(answer.schedule, identity.principal.access, identity.actor.id)
5802
5804
  };
5803
5805
  },
5806
+ async createSync() {
5807
+ throw noManagedSync();
5808
+ },
5809
+ async syncs() {
5810
+ throw noManagedSync();
5811
+ },
5812
+ async removeSync() {
5813
+ throw noManagedSync();
5814
+ },
5804
5815
  tasks: async (caller, query) => tasks.list(await identityOf(caller), query),
5805
5816
  async createTask(caller, body) {
5806
5817
  if (body.re === void 0) withinLimits({
@@ -1,17 +1,17 @@
1
1
  import { a as DIRECT_UPLOAD_BYTES_MAX, f as typeOf, l as fileSize } from "./profile-header-O8wC8yk8.mjs";
2
2
  import { m as MESSAGE_TEXT_MAX, r as AttachmentId } from "./schemas-CUSTEFIy.mjs";
3
- import { f as BoardError } from "./errors-DjatfYjl.mjs";
3
+ import { f as BoardError } from "./errors-Ce_-E3_C.mjs";
4
4
  import { n as displayEmoji, r as normalizeEmoji } from "./emoji-CTLpvH-A.mjs";
5
5
  import { d as parseSchemaId, r as findBlocks, t as block } from "./blocks-CVoBC7ur.mjs";
6
6
  import { n as isEmail, s as replaceMentions, t as extractMentions } from "./mentions-DBGmqkr2.mjs";
7
- import { l as shownName } from "./middleware-D2AGrGj7.mjs";
8
- import { t as VERSION } from "./version-BRR9FkLa.mjs";
9
- import { r as PERMISSIONS } from "./access-CZ419Vho.mjs";
10
- import { c as mentionValue, l as withMentions } from "./task-batch-YMVr_c5R.mjs";
11
- import { a as isBoardName, l as isApiMessageId, n as createTasksInChunks, s as apiThreadRoot, t as TasksInChunksError } from "./exports-B_UGnrnN.mjs";
12
- import { i as groups, n as filters$1, o as options, r as globalOptions, s as usage$1, t as commands } from "./commands-DeYAQUcP.mjs";
13
- import { a as handTeam, d as connect, f as environmentProfile, h as handToken, i as handProgram, l as boardUrl, m as handLogin, n as credentialSource, o as vercel, p as handFetch, r as credentialed, s as http, t as board, u as configDir, v as vercelProjectFile } from "./server-BXbcS-n9.mjs";
14
- import { n as everyChannel, t as conformance } from "./conformance-EtEq22w1.mjs";
7
+ import { l as shownName } from "./middleware-DVBOEd8G.mjs";
8
+ import { t as VERSION } from "./version-D3WaVccj.mjs";
9
+ import { r as PERMISSIONS } from "./access-D1AHzFSP.mjs";
10
+ import { c as mentionValue, l as withMentions } from "./task-batch-BLUkrUqX.mjs";
11
+ import { a as isBoardName, l as isApiMessageId, n as createTasksInChunks, s as apiThreadRoot, t as TasksInChunksError } from "./exports-CREw274K.mjs";
12
+ import { i as groups, n as filters$1, o as options, r as globalOptions, s as usage$1, t as commands } from "./commands-CkRYuvpd.mjs";
13
+ import { a as handTeam, d as connect, f as environmentProfile, h as handToken, i as handProgram, l as boardUrl, m as handLogin, n as credentialSource, o as vercel, p as handFetch, r as credentialed, s as http, t as board, u as configDir, v as vercelProjectFile } from "./server-D5S70_au.mjs";
14
+ import { n as everyChannel, t as conformance } from "./conformance-D9XutDay.mjs";
15
15
  import { n as displayText, t as byVercelBot } from "./bots-CqPYxkqK.mjs";
16
16
  import { spawn } from "node:child_process";
17
17
  import { createHash, randomUUID } from "node:crypto";
@@ -587,6 +587,20 @@ const until = (iso, now) => {
587
587
  if (ms <= 0) return "due";
588
588
  return `in ${span(ms < 6e4 ? Math.ceil(ms / 1e3) * 1e3 : Math.ceil(ms / 6e4) * 6e4)}`;
589
589
  };
590
+ /**
591
+ * A sync the board runs itself: its ID, its channel, and what it syncs with, as the command that
592
+ * made it says it. One that isn't running says so last, and why.
593
+ */
594
+ function formatManagedSync(sync) {
595
+ const what = sync.slack ? `${sync.slack.app}:${sync.slack.name ? `#${sync.slack.name}` : sync.slack.channel}` : sync.source;
596
+ const held = sync.state === "active" ? [] : [sync.reason ? `${sync.state}: ${sync.reason}` : sync.state];
597
+ return [
598
+ sync.id,
599
+ sync.channel,
600
+ what,
601
+ ...held
602
+ ].join(" ");
603
+ }
590
604
  /** One schedule: what it sends, when, where, and how it stops. */
591
605
  function formatSchedule(schedule, options = {}) {
592
606
  const now = options.now ?? Date.now();
@@ -1125,7 +1139,11 @@ function commandHelp(name, path) {
1125
1139
  "",
1126
1140
  ...wrap(command.description, COLUMNS)
1127
1141
  ];
1128
- if (command.aliases?.length) lines.push("", `also: ${command.aliases.map((alias) => `${name} ${alias}`).join(", ")}`);
1142
+ if (command.aliases?.length) lines.push("", `also: ${command.aliases.map((alias) => [
1143
+ name,
1144
+ ...path.slice(0, -1).map((above) => above.name),
1145
+ alias
1146
+ ].join(" ")).join(", ")}`);
1129
1147
  const section = (title, entries) => {
1130
1148
  if (entries.length) lines.push("", `${title}:`, ...rows(entries));
1131
1149
  };
@@ -1160,7 +1178,7 @@ function commandPath(words, all) {
1160
1178
  const command = all.find((candidate) => candidate.name === words[0] || candidate.aliases?.includes(words[0]));
1161
1179
  if (!command) return null;
1162
1180
  const at = command.argumentsBeforeSubcommand ? command.arguments.length + 1 : 1;
1163
- const sub = command.subcommands?.find((candidate) => candidate.name === words[at]);
1181
+ const sub = command.subcommands?.find((candidate) => candidate.name === words[at] || candidate.aliases?.includes(words[at]));
1164
1182
  return sub ? [command, sub] : [command];
1165
1183
  }
1166
1184
  //#endregion
@@ -2145,7 +2163,10 @@ function doing() {
2145
2163
  case "label": return `${command} ${ref(a)}`;
2146
2164
  case "react": return `react to ${ref(a)}`;
2147
2165
  case "typing": return `show typing in ${ref(a)}`;
2148
- case "sync": return b === void 0 ? `list where ${ref(a)} is synced` : `sync ${ref(a)} with ${b}`;
2166
+ case "sync":
2167
+ if (a === "remove") return `remove sync ${b ?? ""}`.trimEnd();
2168
+ return b === void 0 ? `list where ${ref(a)} is synced` : `sync ${message ? ref(a) : a} with ${b}`;
2169
+ case "syncs": return a === void 0 ? "list syncs" : `list ${a}'s syncs`;
2149
2170
  case "schedule": return a === "cancel" ? `cancel schedule ${b}` : `schedule a message in ${message ? ref(a) : a ?? "a channel"}`;
2150
2171
  case "channels": return a === "create" ? `create ${b ?? "the channel"}` : "list channels";
2151
2172
  case "schedules":
@@ -2190,6 +2211,8 @@ function missing() {
2190
2211
  const [a, b] = args;
2191
2212
  if (a === void 0) return void 0;
2192
2213
  if (command === "read" && /^https?:\/\//i.test(a)) return "that link's message on this board";
2214
+ if (command === "sync" && a === "remove") return b === void 0 ? void 0 : `sync ${b}`;
2215
+ if (command === "sync" && b !== void 0 && !isMessageRef(a) && !partialApiId(a)) return void 0;
2193
2216
  if (ON_MESSAGE.has(command) || [
2194
2217
  "read",
2195
2218
  "post",
@@ -3399,20 +3422,86 @@ async function run(command, args) {
3399
3422
  if (flags.json) result({ targets });
3400
3423
  return 0;
3401
3424
  }
3425
+ case "syncs": {
3426
+ const list = await client().syncs(args[0] !== void 0 ? { channel: args[0] } : {});
3427
+ if (flags.json) return result({ syncs: list }), 0;
3428
+ out(list.length ? list.map(formatManagedSync).join("\n") : "no syncs");
3429
+ return 0;
3430
+ }
3402
3431
  case "sync": {
3403
- const id = messageId(args[0]);
3404
- if (!args[1]) {
3405
- const { targets } = await client().sync(id);
3406
- if (flags.json) return result({ targets }), 0;
3407
- out(targets.length ? formatSynced(targets) : "not synced anywhere");
3408
- return 0;
3432
+ if (args[0] === "remove") {
3433
+ if (!args[1]) throw usage(`Missing the sync to remove: its ID, as \`${named()} syncs\` shows it.`, { reason: "missing_arguments" });
3434
+ const removed = await client().removeSync(args[1]);
3435
+ if (flags.json) return result({
3436
+ sync: removed,
3437
+ outcome: "removed"
3438
+ }), 0;
3439
+ return out(`removed ${formatManagedSync(removed)}`), 0;
3409
3440
  }
3410
- const synced = await client().sync(id, args[1]);
3411
- if (flags.json) result({
3412
- ...synced,
3413
- outcome: synced.attached ? "synced" : "unchanged"
3441
+ if (args[1] !== void 0) {
3442
+ const first = args[0];
3443
+ const mirrored = /^(slack\/[^\s/:]+):(.+)$/.exec(args[1]);
3444
+ if (isMessageRef(first) || partialApiId(first)) {
3445
+ if (mirrored) throw usage(`${args[1]} is what a board syncs a channel with, and ${ref(first)} is a message. A thread syncs to a target, such as slack:#incidents.`, { reason: "invalid_arguments" });
3446
+ const synced = await client().sync(messageId(first), args[1]);
3447
+ if (flags.json) result({
3448
+ ...synced,
3449
+ outcome: synced.attached ? "synced" : "unchanged"
3450
+ });
3451
+ else out(synced.attached ? `synced with ${synced.target}` : `already synced with ${synced.target}`);
3452
+ return 0;
3453
+ }
3454
+ const channel = first;
3455
+ if (!mirrored) throw usage(`${args[1]} isn't something a board syncs a channel with: slack/vercel:#channel. To sync a thread, name a message in it.`, { reason: "invalid_arguments" });
3456
+ const board = client();
3457
+ const made = await board.createSync({
3458
+ channel,
3459
+ source: "slack",
3460
+ slack: {
3461
+ app: mirrored[1],
3462
+ channel: mirrored[2],
3463
+ ...flags.workspace ? { workspace: flags.workspace } : {}
3464
+ }
3465
+ }).catch(async (error) => {
3466
+ if (!(error instanceof BoardError) || error.code !== "channel_not_found") throw error;
3467
+ const guess = closestChannel(channel, (await everyChannel(board)).map((c) => c.path));
3468
+ throw new Failed({
3469
+ class: "not_found",
3470
+ reason: "channel_not_found",
3471
+ message: `Couldn't find channel ${channel}.${guess ? ` Did you mean ${guess}?` : ""}`,
3472
+ details: ["A sync is of a channel that's there: none is made for it."],
3473
+ next: [{
3474
+ instruction: "Make the channel",
3475
+ argv: [
3476
+ ...cli(),
3477
+ "channels",
3478
+ "create",
3479
+ channel
3480
+ ]
3481
+ }]
3482
+ });
3483
+ });
3484
+ if (flags.json) return result({
3485
+ sync: made,
3486
+ outcome: made.state === "active" ? "synced" : made.state
3487
+ }), 0;
3488
+ return out(made.state === "active" ? `syncing ${formatManagedSync(made)}` : formatManagedSync(made)), 0;
3489
+ }
3490
+ if (args[0] !== void 0 && !isMessageRef(args[0]) && !partialApiId(args[0])) throw usage(`${args[0]} isn't a message: ${named()} sync <message> says where its thread is synced.`, {
3491
+ reason: "invalid_arguments",
3492
+ next: [{
3493
+ instruction: "List a channel's syncs",
3494
+ argv: [
3495
+ ...cli(),
3496
+ "syncs",
3497
+ args[0]
3498
+ ]
3499
+ }]
3414
3500
  });
3415
- else out(synced.attached ? `synced with ${synced.target}` : `already synced with ${synced.target}`);
3501
+ const id = messageId(args[0]);
3502
+ const { targets } = await client().sync(id);
3503
+ if (flags.json) return result({ targets }), 0;
3504
+ out(targets.length ? formatSynced(targets) : "not synced anywhere");
3416
3505
  return 0;
3417
3506
  }
3418
3507
  case "download": {
@@ -3920,6 +4009,21 @@ async function heldBy(board, claims, id) {
3920
4009
  next: [claim]
3921
4010
  });
3922
4011
  }
4012
+ /**
4013
+ * Task `id` as it is, when the claim of `epoch` settled it: completed, failed, or blocked, with no
4014
+ * claim since. Only that claim's holder gets a task there while `tasks run` keeps the claim
4015
+ * renewed, and `tasks run`'s command holds it too. Otherwise null: the claim was lost.
4016
+ */
4017
+ async function settledBy(board, id, epoch) {
4018
+ const { message } = await board.thread(id).catch(() => ({ message: null }));
4019
+ const task = message?.task;
4020
+ if (!task || task.epoch !== epoch || ![
4021
+ "completed",
4022
+ "failed",
4023
+ "blocked"
4024
+ ].includes(task.state)) return null;
4025
+ return message;
4026
+ }
3923
4027
  /** A write a claim makes. One the board answers `claim_lost` is over: the CLI forgets it, and the failure says how to claim again. */
3924
4028
  async function withClaim(claims, id, write) {
3925
4029
  try {
@@ -4077,6 +4181,9 @@ async function tasks(args) {
4077
4181
  reason: "channel_not_found",
4078
4182
  message: `Couldn't find channel ${verb}.${guess ? ` Did you mean ${guess}?` : ""}`,
4079
4183
  next: [{
4184
+ instruction: "List every channel's open tasks",
4185
+ argv: [...cli(), "tasks"]
4186
+ }, {
4080
4187
  instruction: "See its channels",
4081
4188
  argv: [...cli(), "channels"]
4082
4189
  }]
@@ -4110,13 +4217,13 @@ async function tasks(args) {
4110
4217
  };
4111
4218
  let made;
4112
4219
  if (isMessageRef(target)) {
4113
- const own = body !== void 0 ? "text" : [
4220
+ const own = [...body !== void 0 ? ["text"] : [], ...[
4114
4221
  "label",
4115
4222
  "attach",
4116
4223
  "no-sync",
4117
4224
  "idempotency-key"
4118
- ].find((name) => flags[name] !== void 0 && flags[name] !== false);
4119
- if (own !== void 0) throw usage(`${ref(target)} becomes a task as it is: ${own === "text" ? "text" : `--${own}`} is for a new thread.`, { next: [{
4225
+ ].filter((name) => flags[name] !== void 0 && flags[name] !== false).map((name) => `--${name}`)];
4226
+ if (own.length > 0) throw usage(`${ref(target)} becomes a task as it is: ${own.length === 1 ? own[0] : `${own.slice(0, -1).join(", ")} and ${own.at(-1)}`} ${own.length === 1 ? "is" : "are"} for a new thread.`, { next: [{
4120
4227
  instruction: "Make it a task as it is",
4121
4228
  argv: [
4122
4229
  ...cli(),
@@ -4199,6 +4306,7 @@ async function tasks(args) {
4199
4306
  const id = claim.task.id;
4200
4307
  runTask = id;
4201
4308
  const lease = seconds("lease");
4309
+ let settled = null;
4202
4310
  const ran = await runCommand(command, {
4203
4311
  env: {
4204
4312
  ...process.env,
@@ -4207,6 +4315,7 @@ async function tasks(args) {
4207
4315
  ...flags.json ? { stdout: "stderr" } : {},
4208
4316
  every: (Date.parse(claim.until) - Date.now()) / 3,
4209
4317
  async renew() {
4318
+ if (settled) return true;
4210
4319
  try {
4211
4320
  const renewed = await claim.renew(lease);
4212
4321
  await claims.put(id, {
@@ -4216,7 +4325,9 @@ async function tasks(args) {
4216
4325
  });
4217
4326
  return true;
4218
4327
  } catch (error) {
4219
- return !(error instanceof BoardError && error.code === "claim_lost");
4328
+ if (!(error instanceof BoardError && error.code === "claim_lost")) return true;
4329
+ settled = await settledBy(board, id, claim.epoch);
4330
+ return settled !== null;
4220
4331
  }
4221
4332
  }
4222
4333
  });
@@ -4247,13 +4358,28 @@ async function tasks(args) {
4247
4358
  });
4248
4359
  }
4249
4360
  if (ran.how === "interrupted") {
4250
- await withClaim(claims, id, () => claim.release());
4361
+ if (!settled) try {
4362
+ await withClaim(claims, id, () => claim.release());
4363
+ } catch (error) {
4364
+ if (!(error instanceof BoardError && error.code === "claim_lost") || !await settledBy(board, id, claim.epoch)) throw error;
4365
+ }
4366
+ await claims.drop(id);
4367
+ return ran.code;
4368
+ }
4369
+ const more = ran.code === 0 ? {} : { code: ran.code };
4370
+ if (!settled) try {
4371
+ const done = ran.code === 0 ? await withClaim(claims, id, () => claim.complete(flags.result)) : await withClaim(claims, id, () => claim.fail(ran.signal ? `killed by ${ran.signal}` : `exited ${ran.code}`));
4251
4372
  await claims.drop(id);
4373
+ printTask(done, ran.code === 0 ? "completed" : "failed", more);
4252
4374
  return ran.code;
4375
+ } catch (error) {
4376
+ if (!(error instanceof BoardError && error.code === "claim_lost")) throw error;
4377
+ settled = await settledBy(board, id, claim.epoch);
4378
+ if (!settled) throw error;
4253
4379
  }
4254
- const settled = ran.code === 0 ? await withClaim(claims, id, () => claim.complete(flags.result)) : await withClaim(claims, id, () => claim.fail(ran.signal ? `killed by ${ran.signal}` : `exited ${ran.code}`));
4380
+ const task = await settledBy(board, id, claim.epoch) ?? settled;
4255
4381
  await claims.drop(id);
4256
- printTask(settled, ran.code === 0 ? "completed" : "failed", ran.code === 0 ? {} : { code: ran.code });
4382
+ printTask(task, task.task.state, more);
4257
4383
  return ran.code;
4258
4384
  }
4259
4385
  const id = taskId(rest[0]);
@@ -4911,8 +5037,10 @@ async function runOnce(argv, options) {
4911
5037
  out(help(positionals));
4912
5038
  return 0;
4913
5039
  }
4914
- const [word, ...args] = positionals;
5040
+ const [word, ...words] = positionals;
4915
5041
  const command = canonical(word);
5042
+ const sub = subcommandOf(command);
5043
+ const args = sub && words[0] !== sub.name ? [sub.name, ...words.slice(1)] : words;
4916
5044
  current = {
4917
5045
  command,
4918
5046
  args
@@ -1,5 +1,5 @@
1
1
  import { _ as NewLabels, m as MESSAGE_TEXT_MAX } from "./schemas-CUSTEFIy.mjs";
2
- import { t as HttpError } from "./errors-DjatfYjl.mjs";
2
+ import { t as HttpError } from "./errors-Ce_-E3_C.mjs";
3
3
  import { z } from "zod";
4
4
  //#region src/contract/profiles.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { Jn as ExternalEvent, Rt as SourceJoin, Vn as Actor, Vt as SourceRead, Xn as ExternalLink, Yn as ExternalFile, Zn as Link, qn as ExternalAuthor, u as BoardEventView, ut as MessageView } from "./routes-CSnxZyyb.mjs";
2
- import { t as BoardClient } from "./client-B0DGOt7P.mjs";
1
+ import { $n as ExternalAuthor, Wt as SourceJoin, er as ExternalEvent, gt as MessageView, nr as ExternalLink, qn as Actor, qt as SourceRead, rr as Link, tr as ExternalFile, u as BoardEventView } from "./routes-D5FtKOP_.mjs";
2
+ import { t as BoardClient } from "./client-BUPyzzFt.mjs";
3
3
  import { z } from "zod";
4
4
  //#region src/contract/bots.d.ts
5
5
  /**
@@ -1040,6 +1040,33 @@ declare const SchedulesQuery: z.ZodObject<{
1040
1040
  true: "true";
1041
1041
  }>, z.ZodTransform<boolean, "0" | "1" | "false" | "true">>>;
1042
1042
  }, z.core.$strip>;
1043
+ /**
1044
+ * The sources a board that runs syncs itself brings in: `slack`, a Slack channel mirrored both
1045
+ * ways through Vercel's Slack app.
1046
+ */
1047
+ declare const MANAGED_SYNC_SOURCES: readonly ['slack'];
1048
+ /**
1049
+ * A sync the board runs itself: one source into one channel, with no deployment of yours.
1050
+ *
1051
+ * A `slack` sync names the Slack app it mirrors through and the Slack channel it mirrors: `slack`,
1052
+ * with the `app` as a connector is named (`slack/vercel` is Vercel's Slack app, the one the board
1053
+ * takes so far), the `channel`'s name or ID, and the `workspace`'s domain or ID for a team with
1054
+ * more than one. It is `pending` until someone in that channel agrees.
1055
+ */
1056
+ declare const ManagedSyncBody: z.ZodObject<{
1057
+ channel: z.ZodString;
1058
+ source: z.ZodEnum<{
1059
+ slack: "slack";
1060
+ }>;
1061
+ slack: z.ZodOptional<z.ZodObject<{
1062
+ app: z.ZodString;
1063
+ channel: z.ZodString;
1064
+ workspace: z.ZodOptional<z.ZodString>;
1065
+ }, z.core.$strict>>;
1066
+ }, z.core.$strict>;
1067
+ declare const ManagedSyncsQuery: z.ZodObject<{
1068
+ channel: z.ZodOptional<z.ZodString>;
1069
+ }, z.core.$strip>;
1043
1070
  /** What a claim gets when it asks for no lease, in seconds. */
1044
1071
  declare const LEASE_DEFAULT_S = 900;
1045
1072
  /**
@@ -1880,6 +1907,8 @@ type PostInput = z.input<typeof PostBody>;
1880
1907
  type ScheduleInput = z.input<typeof ScheduleBody>;
1881
1908
  type ScheduleBodyOutput = z.output<typeof ScheduleBody>;
1882
1909
  type SchedulesQueryInput = z.input<typeof SchedulesQuery>;
1910
+ type ManagedSyncInput = z.input<typeof ManagedSyncBody>;
1911
+ type ManagedSyncsQueryInput = z.input<typeof ManagedSyncsQuery>;
1883
1912
  /** A principal as `createGrant` and `updateGrant` take it. */
1884
1913
  /**
1885
1914
  * A principal as a handle takes it. A project's environments, and every project's, are production
@@ -1912,6 +1941,34 @@ type UpdateGrantInput = {
1912
1941
  /** What `createSchema` takes: a version's name, its number, and its JSON Schema. */
1913
1942
  type SchemaInput = z.input<typeof SchemaBody>;
1914
1943
  type SchedulesQueryOutput = z.output<typeof SchedulesQuery>;
1944
+ /** A sync the board runs itself, as its board's people read it. */
1945
+ type ManagedSyncView = {
1946
+ id: string;
1947
+ channel: string;
1948
+ source: string;
1949
+ /**
1950
+ * The Slack app a `slack` sync mirrors through, as a connector is named (`slack/vercel` is
1951
+ * Vercel's Slack app), the Slack channel it mirrors, by ID, and that channel's name when the
1952
+ * sync was made: a rename in Slack leaves it behind.
1953
+ */
1954
+ slack?: {
1955
+ app: string;
1956
+ workspace: string;
1957
+ channel: string;
1958
+ name?: string;
1959
+ };
1960
+ /**
1961
+ * `active` while it runs. `pending` until its source agrees to it, as a Slack channel must, and
1962
+ * `paused` once its source is gone, as a Slack channel Vercel's Slack app can no longer reach
1963
+ * is: nothing syncs in either.
1964
+ */
1965
+ state: 'pending' | 'active' | 'paused';
1966
+ /** Why one that isn't `active` isn't, in the board's words. */
1967
+ reason?: string;
1968
+ /** The actor that made it. */
1969
+ by: string;
1970
+ createdAt: string;
1971
+ };
1915
1972
  /** A scheduled message. It posts as `by`, its creator; each message it posts carries `schedule: { id, n }`. */
1916
1973
  type ScheduleView = {
1917
1974
  id: string;
@@ -2561,6 +2618,35 @@ declare const routes: {
2561
2618
  readonly method: 'POST';
2562
2619
  readonly path: '/schedules/:id/cancel';
2563
2620
  };
2621
+ /** Brings a source's events into a channel, run by the board itself: `sync` where they land. Only a board that runs syncs takes one. */
2622
+ readonly createSync: {
2623
+ readonly method: 'POST';
2624
+ readonly path: '/syncs';
2625
+ readonly body: z.ZodObject<{
2626
+ channel: z.ZodString;
2627
+ source: z.ZodEnum<{
2628
+ slack: "slack";
2629
+ }>;
2630
+ slack: z.ZodOptional<z.ZodObject<{
2631
+ app: z.ZodString;
2632
+ channel: z.ZodString;
2633
+ workspace: z.ZodOptional<z.ZodString>;
2634
+ }, z.core.$strict>>;
2635
+ }, z.core.$strict>;
2636
+ };
2637
+ /** The syncs the board runs itself, oldest first. */
2638
+ readonly syncs: {
2639
+ readonly method: 'GET';
2640
+ readonly path: '/syncs';
2641
+ readonly query: z.ZodObject<{
2642
+ channel: z.ZodOptional<z.ZodString>;
2643
+ }, z.core.$strip>;
2644
+ };
2645
+ /** Removes one, and what its source keeps for it: `sync` where its events land. What it brought in stays. */
2646
+ readonly removeSync: {
2647
+ readonly method: 'POST';
2648
+ readonly path: '/syncs/:id/remove';
2649
+ };
2564
2650
  /** Tasks, oldest first: open ones unless `state` says otherwise. */
2565
2651
  readonly tasks: {
2566
2652
  readonly method: 'GET';
@@ -3477,4 +3563,4 @@ declare const routes: {
3477
3563
  };
3478
3564
  type RouteName = keyof typeof routes;
3479
3565
  //#endregion
3480
- export { InboxNextQuery as $, SyncThreadView as $t, CreateTasksInput as A, GrantChangeRefusal as An, ScheduleInput as At, Explanation as B, union as Bn, SourceMessage as Bt, ClaimTaskBody as C, Access as Cn, ReleaseTaskBody as Ct, CreateTaskBody as D, FULL_ACCESS as Dn, RouteName as Dt, CreateGrantsBody as E, ChannelPattern as En, RevokeGrantBody as Et, EditBody as F, Permission as Fn, SchemaBody as Ft, GrantCan as G, CAN_MAX as Gn, SyncCopiesView as Gt, FiltersInput as H, ExternalCopy as Hn, SourceReadQuery as Ht, EventsPage as I, WrittenCan as In, SchemaInput as It, GrantWriteOptions as J, ExternalEvent as Jn, SyncFindView as Jt, GrantInput as K, Labels as Kn, SyncFindInput as Kt, EventsQuery as L, checkGrantChange as Ln, SchemaView as Lt, DeleteBody as M, InvalidCan as Mn, SchedulesQuery as Mt, Discovery as N, Level as Nn, SchedulesQueryInput as Nt, CreateTaskInput as O, Grant as On, ScheduleBody as Ot, EVENTS_LAST_MAX as P, PERMISSIONS as Pn, SchedulesQueryOutput as Pt, InboxItem as Q, SyncReceiptInput as Qt, EventsQueryInput as R, compileAccess as Rn, SourceJoin as Rt, ClaimReadyTaskInput as S, routes as Sn, RegistrationView as St, CreateChannelBody as T, Can as Tn, ResolvedSyncTarget as Tt, GRANT_BATCH_MAX as U, Attachment as Un, SyncBody as Ut, FailTaskBody as V, Actor as Vn, SourceRead as Vt, GrantBody as W, Author as Wn, SyncCopiesQuery as Wt, InboxAckBody as X, ExternalLink as Xn, SyncImportInput as Xt, INBOX_EVENT_ID_MAX as Y, ExternalFile as Yn, SyncImportBody as Yt, InboxEntry as Z, Link as Zn, SyncReceiptBody as Zt, ChannelView as _, TypingResult as _n, REGISTERED_WATCHERS_MAX as _t, ActorsQueryInput as a, TaskView as an, LinkView as at, ChannelsQueryInput as b, UploadStartBody as bn, RegisterBody as bt, BlockTaskBody as c, TasksQueryInput as cn, MatchesQuery as ct, CHANNELS_LIMIT_DEFAULT as d, ThreadSummaryView as dn, MessagesPage as dt, SyncedView as en, InboxPushBody as et, CHANNELS_LIMIT_MAX as f, ThreadView as fn, ParsedFilters as ft, ChannelMessagesQueryInput as g, TypingBody as gn, PrincipalView as gt, ChannelMessagesQuery as h, ThreadsQueryInput as hn, PrincipalInput as ht, ActorsQuery as i, TaskNeedsBody as in, LabelBody as it, CreatedTasksQuery as j, GrantShape as jn, ScheduleView as jt, CreateTasksBody as k, GrantChange as kn, ScheduleBodyOutput as kt, BlockView as l, ThreadQuery as ln, Me as lt, CancelTaskBody as m, ThreadsQuery as mn, PostInput as mt, AckBody as n, THREADS_LIMIT_MAX as nn, LABEL_CONDITIONS_MAX as nt, ApiError as o, TasksPage as on, LinkedQuery as ot, CanAt as p, ThreadsPage as pn, PostBody as pt, GrantView as q, ExternalAuthor as qn, SyncFindQuery as qt, ActorView as r, TaskClaim as rn, LEASE_DEFAULT_S as rt, AssignTaskBody as s, TasksQuery as sn, MatchView as st, ACTORS_BY_ID_MAX as t, THREADS_LIMIT_DEFAULT as tn, InboxQuery as tt, BoardEventView as u, ThreadQueryInput as un, MessageView as ut, ChannelsPage as v, UpdateGrantBody as vn, ReactBody as vt, CompleteTaskBody as w, AccessSummary as wn, RenewTaskBody as wt, ClaimReadyTaskBody as x, UploadTicket as xn, RegisterInput as xt, ChannelsQuery as y, UpdateGrantInput as yn, Ref as yt, ExplainQuery as z, parseCan as zn, SourceJoinBody as zt };
3566
+ export { InboxNextQuery as $, ExternalAuthor as $n, SyncFindQuery as $t, CreateTasksInput as A, AccessSummary as An, RenewTaskBody as At, Explanation as B, PERMISSIONS as Bn, SchedulesQueryOutput as Bt, ClaimTaskBody as C, TypingResult as Cn, REGISTERED_WATCHERS_MAX as Ct, CreateTaskBody as D, UploadTicket as Dn, RegisterInput as Dt, CreateGrantsBody as E, UploadStartBody as En, RegisterBody as Et, EditBody as F, GrantChange as Fn, ScheduleBodyOutput as Ft, GrantCan as G, parseCan as Gn, SourceJoinBody as Gt, FiltersInput as H, WrittenCan as Hn, SchemaInput as Ht, EventsPage as I, GrantChangeRefusal as In, ScheduleInput as It, GrantWriteOptions as J, ExternalCopy as Jn, SourceReadQuery as Jt, GrantInput as K, union as Kn, SourceMessage as Kt, EventsQuery as L, GrantShape as Ln, ScheduleView as Lt, DeleteBody as M, ChannelPattern as Mn, RevokeGrantBody as Mt, Discovery as N, FULL_ACCESS as Nn, RouteName as Nt, CreateTaskInput as O, routes as On, RegistrationView as Ot, EVENTS_LAST_MAX as P, Grant as Pn, ScheduleBody as Pt, InboxItem as Q, Labels as Qn, SyncFindInput as Qt, EventsQueryInput as R, InvalidCan as Rn, SchedulesQuery as Rt, ClaimReadyTaskInput as S, TypingBody as Sn, PrincipalView as St, CreateChannelBody as T, UpdateGrantInput as Tn, Ref as Tt, GRANT_BATCH_MAX as U, checkGrantChange as Un, SchemaView as Ut, FailTaskBody as V, Permission as Vn, SchemaBody as Vt, GrantBody as W, compileAccess as Wn, SourceJoin as Wt, InboxAckBody as X, Author as Xn, SyncCopiesQuery as Xt, INBOX_EVENT_ID_MAX as Y, Attachment as Yn, SyncBody as Yt, InboxEntry as Z, CAN_MAX as Zn, SyncCopiesView as Zt, ChannelView as _, ThreadSummaryView as _n, MessagesPage as _t, ActorsQueryInput as a, SyncThreadView as an, LinkView as at, ChannelsQueryInput as b, ThreadsQuery as bn, PostInput as bt, BlockTaskBody as c, THREADS_LIMIT_MAX as cn, ManagedSyncBody as ct, CHANNELS_LIMIT_DEFAULT as d, TaskView as dn, ManagedSyncsQuery as dt, SyncFindView as en, ExternalEvent as er, InboxPushBody as et, CHANNELS_LIMIT_MAX as f, TasksPage as fn, ManagedSyncsQueryInput as ft, ChannelMessagesQueryInput as g, ThreadQueryInput as gn, MessageView as gt, ChannelMessagesQuery as h, ThreadQuery as hn, Me as ht, ActorsQuery as i, SyncReceiptInput as in, LabelBody as it, CreatedTasksQuery as j, Can as jn, ResolvedSyncTarget as jt, CreateTasksBody as k, Access as kn, ReleaseTaskBody as kt, BlockView as l, TaskClaim as ln, ManagedSyncInput as lt, CancelTaskBody as m, TasksQueryInput as mn, MatchesQuery as mt, AckBody as n, SyncImportInput as nn, ExternalLink as nr, LABEL_CONDITIONS_MAX as nt, ApiError as o, SyncedView as on, LinkedQuery as ot, CanAt as p, TasksQuery as pn, MatchView as pt, GrantView as q, Actor as qn, SourceRead as qt, ActorView as r, SyncReceiptBody as rn, Link as rr, LEASE_DEFAULT_S as rt, AssignTaskBody as s, THREADS_LIMIT_DEFAULT as sn, MANAGED_SYNC_SOURCES as st, ACTORS_BY_ID_MAX as t, SyncImportBody as tn, ExternalFile as tr, InboxQuery as tt, BoardEventView as u, TaskNeedsBody as un, ManagedSyncView as ut, ChannelsPage as v, ThreadView as vn, ParsedFilters as vt, CompleteTaskBody as w, UpdateGrantBody as wn, ReactBody as wt, ClaimReadyTaskBody as x, ThreadsQueryInput as xn, PrincipalInput as xt, ChannelsQuery as y, ThreadsPage as yn, PostBody as yt, ExplainQuery as z, Level as zn, SchedulesQueryInput as zt };
@@ -1,9 +1,9 @@
1
- import { f as BoardError, p as createBoardClient, t as HttpError } from "./errors-DjatfYjl.mjs";
2
- import { i as hostCheckedBy } from "./exports-B_UGnrnN.mjs";
3
- import { i as LOGINS, r as LOGIN } from "./auth-AwZJQpCO.mjs";
4
- import { g as localTokenFile, t as board } from "./server-BXbcS-n9.mjs";
5
- import { t as oidcTokens } from "./tokens-CaEPmiG1.mjs";
6
- import { t as local } from "./local-BiG1WJk0.mjs";
1
+ import { f as BoardError, p as createBoardClient, t as HttpError } from "./errors-Ce_-E3_C.mjs";
2
+ import { i as hostCheckedBy } from "./exports-CREw274K.mjs";
3
+ import { i as LOGINS, r as LOGIN } from "./auth-Cc5_pdi7.mjs";
4
+ import { g as localTokenFile, t as board } from "./server-D5S70_au.mjs";
5
+ import { t as oidcTokens } from "./tokens-XagdeYrv.mjs";
6
+ import { t as local } from "./local-B9UwaY2z.mjs";
7
7
  import { mkdir, rename, rm, stat, writeFile } from "node:fs/promises";
8
8
  import { userInfo } from "node:os";
9
9
  import { dirname, join, resolve } from "node:path";
@@ -1,9 +1,9 @@
1
1
  import { n as formatProfileHeader } from "./profile-header-O8wC8yk8.mjs";
2
2
  import "./schemas-CUSTEFIy.mjs";
3
- import { _ as DERIVED_ID, b as keyId, f as BoardError, g as refusalCode, p as createBoardClient, t as HttpError, xt as routes } from "./errors-DjatfYjl.mjs";
4
- import { t as VERSION } from "./version-BRR9FkLa.mjs";
5
- import { o as compileWatcher, u as METHODS } from "./task-batch-YMVr_c5R.mjs";
6
- import { c as createVercel, d as withoutToken, f as tailWatchers, p as deployedOnVercel, r as createBoard, u as PROTOCOL_ROUTES } from "./exports-B_UGnrnN.mjs";
3
+ import { Ct as routes, _ as DERIVED_ID, b as keyId, f as BoardError, g as refusalCode, p as createBoardClient, t as HttpError } from "./errors-Ce_-E3_C.mjs";
4
+ import { t as VERSION } from "./version-D3WaVccj.mjs";
5
+ import { o as compileWatcher, u as METHODS } from "./task-batch-BLUkrUqX.mjs";
6
+ import { c as createVercel, d as withoutToken, f as tailWatchers, p as deployedOnVercel, r as createBoard, u as PROTOCOL_ROUTES } from "./exports-CREw274K.mjs";
7
7
  import { execFile } from "node:child_process";
8
8
  import { createHash } from "node:crypto";
9
9
  import { mkdir, readFile, readdir, stat, unlink, writeFile } from "node:fs/promises";
@@ -1129,8 +1129,8 @@ function vercel(options = {}) {
1129
1129
  function board(options = {}) {
1130
1130
  return createBoard(options, {
1131
1131
  backend: (fetch) => process.env.BOARD_URL?.trim() ? http() : vercel(fetch ? { fetch } : {}),
1132
- sync: () => import("./engine-CfVTyEeo.mjs"),
1133
- serving: () => import("./serving-B2BNr4PR.mjs"),
1132
+ sync: () => import("./engine-DVWbcEIB.mjs"),
1133
+ serving: () => import("./serving-BVtrFzK4.mjs"),
1134
1134
  sandbox: (url, token) => sandboxHeaders(url, url, token)
1135
1135
  });
1136
1136
  }
@@ -1,2 +1,2 @@
1
- import { i as ownTeamId, n as discoveryIdentity, r as ownProjectId, t as oidcTokens } from "./tokens-CaEPmiG1.mjs";
1
+ import { i as ownTeamId, n as discoveryIdentity, r as ownProjectId, t as oidcTokens } from "./tokens-XagdeYrv.mjs";
2
2
  export { discoveryIdentity, oidcTokens, ownProjectId, ownTeamId };
@@ -1,4 +1,4 @@
1
- import { t as VERSION } from "./version-BRR9FkLa.mjs";
1
+ import { t as VERSION } from "./version-D3WaVccj.mjs";
2
2
  //#region src/inspect/style.ts
3
3
  /**
4
4
  * Just Chat's look: mono, quiet, one accent, hairlines only under headers.
@@ -1,5 +1,5 @@
1
- import { _ as SyncFn, m as SyncProvider, x as channels } from "./provider-BNVyVKtH.mjs";
2
- import { r as ChatTransport, t as ChatInput } from "./chat-provider-CpYdXEpI.mjs";
1
+ import { _ as SyncFn, m as SyncProvider, x as channels } from "./provider-BnK0Bif7.mjs";
2
+ import { r as ChatTransport, t as ChatInput } from "./chat-provider-CW-YpGWe.mjs";
3
3
  import { z } from "zod";
4
4
  import { ReactionEvent } from "chat";
5
5
  //#region src/sync/chat-sdk.d.ts
@@ -1,5 +1,5 @@
1
1
  import { i as eventSchema, p as channels, r as envelope } from "./events-mWKc1uvZ.mjs";
2
- import { t as ChatSyncProvider } from "./chat-provider-Br2RXgLV.mjs";
2
+ import { t as ChatSyncProvider } from "./chat-provider-eRYSL4XG.mjs";
3
3
  import { createHash } from "node:crypto";
4
4
  //#region src/sync/chat-sdk.ts
5
5
  const schemaOf = (platform) => eventSchema(platform, "message");
@@ -1,5 +1,5 @@
1
- import { _ as SyncFn, b as SyncUnit, p as SyncContext } from "./provider-BNVyVKtH.mjs";
2
- import { n as ChatSyncProvider } from "./chat-provider-CpYdXEpI.mjs";
1
+ import { _ as SyncFn, b as SyncUnit, p as SyncContext } from "./provider-BnK0Bif7.mjs";
2
+ import { n as ChatSyncProvider } from "./chat-provider-CW-YpGWe.mjs";
3
3
  import { z } from "zod";
4
4
  import { Adapter } from "chat";
5
5
  //#region src/sync/github.d.ts