@vercel/board 0.57.1 → 0.58.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 (65) 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-BiJ8G6KY.d.mts} +2 -2
  15. package/dist/cli-commands.d.mts +1 -1
  16. package/dist/cli-commands.mjs +1 -1
  17. package/dist/cli-embedded.d.mts +2 -2
  18. package/dist/cli-embedded.mjs +2 -2
  19. package/dist/cli.mjs +6 -6
  20. package/dist/{client-B0DGOt7P.d.mts → client-BUPyzzFt.d.mts} +13 -1
  21. package/dist/{commands-Dcm4_pc1.d.mts → commands-DryDbyWr.d.mts} +5 -0
  22. package/dist/{commands-DeYAQUcP.mjs → commands-totPnoCC.mjs} +73 -20
  23. package/dist/{conformance-EtEq22w1.mjs → conformance-D9XutDay.mjs} +2 -2
  24. package/dist/conformance.d.mts +1 -1
  25. package/dist/conformance.mjs +1 -1
  26. package/dist/{engine-CfVTyEeo.mjs → engine-DVWbcEIB.mjs} +2 -2
  27. package/dist/{errors-DjatfYjl.mjs → errors-Ce_-E3_C.mjs} +50 -1
  28. package/dist/{errors-DBZtbfph.d.mts → errors-CwObkpSn.d.mts} +1 -1
  29. package/dist/{exports-BvJTIorX.d.mts → exports-Bh09j6Bd.d.mts} +5 -5
  30. package/dist/{exports-B_UGnrnN.mjs → exports-WtqjdQwb.mjs} +92 -9
  31. package/dist/{index-DuibwQf9.d.mts → index-mgNwCwJ4.d.mts} +2 -2
  32. package/dist/index.d.mts +7 -7
  33. package/dist/index.mjs +4 -4
  34. package/dist/index.node.d.mts +8 -8
  35. package/dist/index.node.mjs +4 -4
  36. package/dist/inspect/app.js +33 -33
  37. package/dist/{inspect-DfJzHFiE.mjs → inspect-CtPZz0WG.mjs} +2 -2
  38. package/dist/inspect-wkA_8iyU.mjs +2 -0
  39. package/dist/inspect.d.mts +1 -1
  40. package/dist/inspect.mjs +1 -1
  41. package/dist/{local-D2i5sxuY.mjs → local-B7Yp-B2z.mjs} +18 -7
  42. package/dist/{local-BiG1WJk0.mjs → local-BPiDCkA4.mjs} +3 -3
  43. package/dist/{main-Bbqg3Unf.mjs → main-BvkLqpUX.mjs} +150 -28
  44. package/dist/{middleware-D2AGrGj7.mjs → middleware-DVBOEd8G.mjs} +1 -1
  45. package/dist/{provider-BNVyVKtH.d.mts → provider-BnK0Bif7.d.mts} +2 -2
  46. package/dist/{routes-CSnxZyyb.d.mts → routes-D5FtKOP_.d.mts} +87 -1
  47. package/dist/{serve-D06-DMej.mjs → serve-ChlJ955x.mjs} +6 -6
  48. package/dist/{server-BXbcS-n9.mjs → server-CRdVLqny.mjs} +6 -6
  49. package/dist/{serving-B2BNr4PR.mjs → serving-BVtrFzK4.mjs} +1 -1
  50. package/dist/{shell-C8EowDEz.mjs → shell-hTUuAc6A.mjs} +1 -1
  51. package/dist/sync-chat-sdk.d.mts +2 -2
  52. package/dist/sync-github.d.mts +2 -2
  53. package/dist/sync-linear.d.mts +3 -3
  54. package/dist/sync-slack.d.mts +3 -3
  55. package/dist/sync.d.mts +2 -2
  56. package/dist/{task-batch-YMVr_c5R.mjs → task-batch-CnRhVsh6.mjs} +7 -4
  57. package/dist/{tokens-CaEPmiG1.mjs → tokens-XagdeYrv.mjs} +2 -2
  58. package/dist/{version-BRR9FkLa.mjs → version-rlZkE9nc.mjs} +1 -1
  59. package/docs/01-board/11-tasks.md +6 -1
  60. package/docs/02-sync/01-overview.md +4 -0
  61. package/docs/02-sync/05-managed.md +117 -0
  62. package/docs/04-reference/01-cli.md +43 -1
  63. package/docs/04-reference/03-http.md +4 -0
  64. package/package.json +1 -1
  65. 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-BvkLqpUX.mjs";
4
+ import { n as relative, r as shell, t as CSP } from "./shell-hTUuAc6A.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-CtPZz0WG.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-hTUuAc6A.mjs";
4
4
  import { t as page } from "./page-7KWSGxyC.mjs";
5
5
  //#region src/inspect/handler.ts
6
6
  /**
@@ -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-rlZkE9nc.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-CnRhVsh6.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,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-CnRhVsh6.mjs";
3
+ import { i as memoryBlob, n as a2, r as fsBlob, t as localScheduler } from "./local-B7Yp-B2z.mjs";
4
4
  import { createHash } from "node:crypto";
5
5
  import { join, resolve } from "node:path";
6
6
  //#region src/server/local.ts
@@ -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-rlZkE9nc.mjs";
9
+ import { r as PERMISSIONS } from "./access-D1AHzFSP.mjs";
10
+ import { c as mentionValue, l as withMentions } from "./task-batch-CnRhVsh6.mjs";
11
+ import { a as isBoardName, l as isApiMessageId, n as createTasksInChunks, s as apiThreadRoot, t as TasksInChunksError } from "./exports-WtqjdQwb.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-totPnoCC.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-CRdVLqny.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();
@@ -2145,7 +2159,10 @@ function doing() {
2145
2159
  case "label": return `${command} ${ref(a)}`;
2146
2160
  case "react": return `react to ${ref(a)}`;
2147
2161
  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}`;
2162
+ case "sync":
2163
+ if (a === "remove") return `remove sync ${b ?? ""}`.trimEnd();
2164
+ return b === void 0 ? `list where ${ref(a)} is synced` : `sync ${message ? ref(a) : a} with ${b}`;
2165
+ case "syncs": return a === void 0 ? "list syncs" : `list ${a}'s syncs`;
2149
2166
  case "schedule": return a === "cancel" ? `cancel schedule ${b}` : `schedule a message in ${message ? ref(a) : a ?? "a channel"}`;
2150
2167
  case "channels": return a === "create" ? `create ${b ?? "the channel"}` : "list channels";
2151
2168
  case "schedules":
@@ -2190,6 +2207,8 @@ function missing() {
2190
2207
  const [a, b] = args;
2191
2208
  if (a === void 0) return void 0;
2192
2209
  if (command === "read" && /^https?:\/\//i.test(a)) return "that link's message on this board";
2210
+ if (command === "sync" && a === "remove") return b === void 0 ? void 0 : `sync ${b}`;
2211
+ if (command === "sync" && b !== void 0 && !isMessageRef(a) && !partialApiId(a)) return void 0;
2193
2212
  if (ON_MESSAGE.has(command) || [
2194
2213
  "read",
2195
2214
  "post",
@@ -3399,20 +3418,86 @@ async function run(command, args) {
3399
3418
  if (flags.json) result({ targets });
3400
3419
  return 0;
3401
3420
  }
3421
+ case "syncs": {
3422
+ const list = await client().syncs(args[0] !== void 0 ? { channel: args[0] } : {});
3423
+ if (flags.json) return result({ syncs: list }), 0;
3424
+ out(list.length ? list.map(formatManagedSync).join("\n") : "no syncs");
3425
+ return 0;
3426
+ }
3402
3427
  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;
3428
+ if (args[0] === "remove") {
3429
+ if (!args[1]) throw usage(`Missing the sync to remove: its ID, as \`${named()} syncs\` shows it.`, { reason: "missing_arguments" });
3430
+ const removed = await client().removeSync(args[1]);
3431
+ if (flags.json) return result({
3432
+ sync: removed,
3433
+ outcome: "removed"
3434
+ }), 0;
3435
+ return out(`removed ${formatManagedSync(removed)}`), 0;
3409
3436
  }
3410
- const synced = await client().sync(id, args[1]);
3411
- if (flags.json) result({
3412
- ...synced,
3413
- outcome: synced.attached ? "synced" : "unchanged"
3437
+ if (args[1] !== void 0) {
3438
+ const first = args[0];
3439
+ const mirrored = /^(slack\/[^\s/:]+):(.+)$/.exec(args[1]);
3440
+ if (isMessageRef(first) || partialApiId(first)) {
3441
+ 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" });
3442
+ const synced = await client().sync(messageId(first), args[1]);
3443
+ if (flags.json) result({
3444
+ ...synced,
3445
+ outcome: synced.attached ? "synced" : "unchanged"
3446
+ });
3447
+ else out(synced.attached ? `synced with ${synced.target}` : `already synced with ${synced.target}`);
3448
+ return 0;
3449
+ }
3450
+ const channel = first;
3451
+ 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" });
3452
+ const board = client();
3453
+ const made = await board.createSync({
3454
+ channel,
3455
+ source: "slack",
3456
+ slack: {
3457
+ app: mirrored[1],
3458
+ channel: mirrored[2],
3459
+ ...flags.workspace ? { workspace: flags.workspace } : {}
3460
+ }
3461
+ }).catch(async (error) => {
3462
+ if (!(error instanceof BoardError) || error.code !== "channel_not_found") throw error;
3463
+ const guess = closestChannel(channel, (await everyChannel(board)).map((c) => c.path));
3464
+ throw new Failed({
3465
+ class: "not_found",
3466
+ reason: "channel_not_found",
3467
+ message: `Couldn't find channel ${channel}.${guess ? ` Did you mean ${guess}?` : ""}`,
3468
+ details: ["A sync is of a channel that's there: none is made for it."],
3469
+ next: [{
3470
+ instruction: "Make the channel",
3471
+ argv: [
3472
+ ...cli(),
3473
+ "channels",
3474
+ "create",
3475
+ channel
3476
+ ]
3477
+ }]
3478
+ });
3479
+ });
3480
+ if (flags.json) return result({
3481
+ sync: made,
3482
+ outcome: made.state === "active" ? "synced" : made.state
3483
+ }), 0;
3484
+ return out(made.state === "active" ? `syncing ${formatManagedSync(made)}` : formatManagedSync(made)), 0;
3485
+ }
3486
+ 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.`, {
3487
+ reason: "invalid_arguments",
3488
+ next: [{
3489
+ instruction: "List a channel's syncs",
3490
+ argv: [
3491
+ ...cli(),
3492
+ "syncs",
3493
+ args[0]
3494
+ ]
3495
+ }]
3414
3496
  });
3415
- else out(synced.attached ? `synced with ${synced.target}` : `already synced with ${synced.target}`);
3497
+ const id = messageId(args[0]);
3498
+ const { targets } = await client().sync(id);
3499
+ if (flags.json) return result({ targets }), 0;
3500
+ out(targets.length ? formatSynced(targets) : "not synced anywhere");
3416
3501
  return 0;
3417
3502
  }
3418
3503
  case "download": {
@@ -3920,6 +4005,21 @@ async function heldBy(board, claims, id) {
3920
4005
  next: [claim]
3921
4006
  });
3922
4007
  }
4008
+ /**
4009
+ * Task `id` as it is, when the claim of `epoch` settled it: completed, failed, or blocked, with no
4010
+ * claim since. Only that claim's holder gets a task there while `tasks run` keeps the claim
4011
+ * renewed, and `tasks run`'s command holds it too. Otherwise null: the claim was lost.
4012
+ */
4013
+ async function settledBy(board, id, epoch) {
4014
+ const { message } = await board.thread(id).catch(() => ({ message: null }));
4015
+ const task = message?.task;
4016
+ if (!task || task.epoch !== epoch || ![
4017
+ "completed",
4018
+ "failed",
4019
+ "blocked"
4020
+ ].includes(task.state)) return null;
4021
+ return message;
4022
+ }
3923
4023
  /** 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
4024
  async function withClaim(claims, id, write) {
3925
4025
  try {
@@ -4077,6 +4177,9 @@ async function tasks(args) {
4077
4177
  reason: "channel_not_found",
4078
4178
  message: `Couldn't find channel ${verb}.${guess ? ` Did you mean ${guess}?` : ""}`,
4079
4179
  next: [{
4180
+ instruction: "List every channel's open tasks",
4181
+ argv: [...cli(), "tasks"]
4182
+ }, {
4080
4183
  instruction: "See its channels",
4081
4184
  argv: [...cli(), "channels"]
4082
4185
  }]
@@ -4110,13 +4213,13 @@ async function tasks(args) {
4110
4213
  };
4111
4214
  let made;
4112
4215
  if (isMessageRef(target)) {
4113
- const own = body !== void 0 ? "text" : [
4216
+ const own = [...body !== void 0 ? ["text"] : [], ...[
4114
4217
  "label",
4115
4218
  "attach",
4116
4219
  "no-sync",
4117
4220
  "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: [{
4221
+ ].filter((name) => flags[name] !== void 0 && flags[name] !== false).map((name) => `--${name}`)];
4222
+ 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
4223
  instruction: "Make it a task as it is",
4121
4224
  argv: [
4122
4225
  ...cli(),
@@ -4199,6 +4302,7 @@ async function tasks(args) {
4199
4302
  const id = claim.task.id;
4200
4303
  runTask = id;
4201
4304
  const lease = seconds("lease");
4305
+ let settled = null;
4202
4306
  const ran = await runCommand(command, {
4203
4307
  env: {
4204
4308
  ...process.env,
@@ -4207,6 +4311,7 @@ async function tasks(args) {
4207
4311
  ...flags.json ? { stdout: "stderr" } : {},
4208
4312
  every: (Date.parse(claim.until) - Date.now()) / 3,
4209
4313
  async renew() {
4314
+ if (settled) return true;
4210
4315
  try {
4211
4316
  const renewed = await claim.renew(lease);
4212
4317
  await claims.put(id, {
@@ -4216,7 +4321,9 @@ async function tasks(args) {
4216
4321
  });
4217
4322
  return true;
4218
4323
  } catch (error) {
4219
- return !(error instanceof BoardError && error.code === "claim_lost");
4324
+ if (!(error instanceof BoardError && error.code === "claim_lost")) return true;
4325
+ settled = await settledBy(board, id, claim.epoch);
4326
+ return settled !== null;
4220
4327
  }
4221
4328
  }
4222
4329
  });
@@ -4247,13 +4354,28 @@ async function tasks(args) {
4247
4354
  });
4248
4355
  }
4249
4356
  if (ran.how === "interrupted") {
4250
- await withClaim(claims, id, () => claim.release());
4357
+ if (!settled) try {
4358
+ await withClaim(claims, id, () => claim.release());
4359
+ } catch (error) {
4360
+ if (!(error instanceof BoardError && error.code === "claim_lost") || !await settledBy(board, id, claim.epoch)) throw error;
4361
+ }
4362
+ await claims.drop(id);
4363
+ return ran.code;
4364
+ }
4365
+ const more = ran.code === 0 ? {} : { code: ran.code };
4366
+ if (!settled) try {
4367
+ 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
4368
  await claims.drop(id);
4369
+ printTask(done, ran.code === 0 ? "completed" : "failed", more);
4252
4370
  return ran.code;
4371
+ } catch (error) {
4372
+ if (!(error instanceof BoardError && error.code === "claim_lost")) throw error;
4373
+ settled = await settledBy(board, id, claim.epoch);
4374
+ if (!settled) throw error;
4253
4375
  }
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}`));
4376
+ const task = await settledBy(board, id, claim.epoch) ?? settled;
4255
4377
  await claims.drop(id);
4256
- printTask(settled, ran.code === 0 ? "completed" : "failed", ran.code === 0 ? {} : { code: ran.code });
4378
+ printTask(task, task.task.state, more);
4257
4379
  return ran.code;
4258
4380
  }
4259
4381
  const id = taskId(rest[0]);
@@ -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-WtqjdQwb.mjs";
3
+ import { i as LOGINS, r as LOGIN } from "./auth-Cc5_pdi7.mjs";
4
+ import { g as localTokenFile, t as board } from "./server-CRdVLqny.mjs";
5
+ import { t as oidcTokens } from "./tokens-XagdeYrv.mjs";
6
+ import { t as local } from "./local-BPiDCkA4.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-rlZkE9nc.mjs";
5
+ import { o as compileWatcher, u as METHODS } from "./task-batch-CnRhVsh6.mjs";
6
+ import { c as createVercel, d as withoutToken, f as tailWatchers, p as deployedOnVercel, r as createBoard, u as PROTOCOL_ROUTES } from "./exports-WtqjdQwb.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-rlZkE9nc.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-BiJ8G6KY.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
- 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-BiJ8G6KY.mjs";
3
3
  import { z } from "zod";
4
4
  import { Adapter } from "chat";
5
5
  //#region src/sync/github.d.ts
@@ -1,6 +1,6 @@
1
- import { Vt as SourceRead } from "./routes-CSnxZyyb.mjs";
2
- import { _ as SyncFn, b as SyncUnit, f as ResolvedTarget, l as ReceivedEvent, o as ProviderPost, p as SyncContext, r as ProviderDelivery } from "./provider-BNVyVKtH.mjs";
3
- import { n as ChatSyncProvider, t as ChatInput } from "./chat-provider-CpYdXEpI.mjs";
1
+ import { qt as SourceRead } from "./routes-D5FtKOP_.mjs";
2
+ import { _ as SyncFn, b as SyncUnit, f as ResolvedTarget, l as ReceivedEvent, o as ProviderPost, p as SyncContext, r as ProviderDelivery } from "./provider-BnK0Bif7.mjs";
3
+ import { n as ChatSyncProvider, t as ChatInput } from "./chat-provider-BiJ8G6KY.mjs";
4
4
  import { z } from "zod";
5
5
  import { Adapter } from "chat";
6
6
  //#region src/sync/linear.d.ts
@@ -1,6 +1,6 @@
1
- import { Xn as ExternalLink } from "./routes-CSnxZyyb.mjs";
2
- import { _ as SyncFn, f as ResolvedTarget, o as ProviderPost, p as SyncContext, r as ProviderDelivery, s as ProviderSender, x as channels } from "./provider-BNVyVKtH.mjs";
3
- import { n as ChatSyncProvider, t as ChatInput } from "./chat-provider-CpYdXEpI.mjs";
1
+ import { nr as ExternalLink } from "./routes-D5FtKOP_.mjs";
2
+ import { _ as SyncFn, f as ResolvedTarget, o as ProviderPost, p as SyncContext, r as ProviderDelivery, s as ProviderSender, x as channels } from "./provider-BnK0Bif7.mjs";
3
+ import { n as ChatSyncProvider, t as ChatInput } from "./chat-provider-BiJ8G6KY.mjs";
4
4
  import { z } from "zod";
5
5
  import { Adapter } from "chat";
6
6
  //#region src/sync/slack-deployments.d.ts
package/dist/sync.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { Jn as ExternalEvent, Yn as ExternalFile, qn as ExternalAuthor } from "./routes-CSnxZyyb.mjs";
2
- import { A as SyncRoot, C as mirror, D as RootOverride, E as ProviderEvent, M as eventSchema, N as VercelDeployment, O as SyncOverrides, S as into, T as EventBase, _ as SyncFn, a as ProviderOptions, b as SyncUnit, c as Receive, d as Renderer, f as ResolvedTarget, g as Sync, h as UnreadableError, i as ProviderFile, j as envelope, k as SyncResult, l as ReceivedEvent, m as SyncProvider, n as FileDelivery, o as ProviderPost, p as SyncContext, r as ProviderDelivery, u as RenderInput, v as SyncIn, w as render, x as channels, y as SyncOut } from "./provider-BNVyVKtH.mjs";
1
+ import { $n as ExternalAuthor, er as ExternalEvent, tr as ExternalFile } from "./routes-D5FtKOP_.mjs";
2
+ import { A as SyncRoot, C as mirror, D as RootOverride, E as ProviderEvent, M as eventSchema, N as VercelDeployment, O as SyncOverrides, S as into, T as EventBase, _ as SyncFn, a as ProviderOptions, b as SyncUnit, c as Receive, d as Renderer, f as ResolvedTarget, g as Sync, h as UnreadableError, i as ProviderFile, j as envelope, k as SyncResult, l as ReceivedEvent, m as SyncProvider, n as FileDelivery, o as ProviderPost, p as SyncContext, r as ProviderDelivery, u as RenderInput, v as SyncIn, w as render, x as channels, y as SyncOut } from "./provider-BnK0Bif7.mjs";
3
3
  export { EventBase, type ExternalAuthor, ExternalEvent, type ExternalFile, type FileDelivery, type ProviderDelivery, type ProviderEvent, type ProviderFile, type ProviderOptions, type ProviderPost, type Receive, ReceivedEvent, type RenderInput, type Renderer, ResolvedTarget, type RootOverride, type Sync, type SyncContext, type SyncFn, type SyncIn, type SyncOut, SyncOverrides, SyncProvider, type SyncResult, type SyncRoot, type SyncUnit, UnreadableError, type VercelDeployment, channels, envelope, eventSchema, into, mirror, render };