@dev.fast/whiteboard 0.5.0 → 0.5.2-preview.20261104.146

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 (117) hide show
  1. package/dist/{account-alias-Bw3PT3Qo.js → account-alias-BlYamXAG.js} +5 -5
  2. package/dist/{agent-cli-kHRrwO4n.js → agent-cli-D7fF5xmm.js} +9 -9
  3. package/dist/agent-cli-DLibAL4u.js +2 -0
  4. package/dist/{agent-client-CMacGbMp.js → agent-client-BCEbSPWU.js} +4 -4
  5. package/dist/{authoring-tools-CiLy46kh.js → authoring-tools-CkfxTVJm.js} +12 -8
  6. package/dist/{background-server-eZWXoVcI.js → background-server-BraP8pJ9.js} +4 -4
  7. package/dist/{background-server-BLNHbksB.js → background-server-CwToVN1g.js} +1 -1
  8. package/dist/build-info.json +1 -1
  9. package/dist/{cli-Bxmiqutp.js → cli-BpadBaGU.js} +1 -1
  10. package/dist/{cli-runner-DQPuu7kJ.js → cli-runner-BebYF50a.js} +22 -22
  11. package/dist/cli.js +2 -2
  12. package/dist/{fuzzy-match-DZjeOaPY.js → fuzzy-match-CxcsLQGx.js} +3 -3
  13. package/dist/{headless-host-Dl2KZ9IT.js → headless-host-FAlbekFD.js} +561 -415
  14. package/dist/{headless-host-B4r0s1ks.js → headless-host-cLipIufH.js} +1 -1
  15. package/dist/{import-YAIU6rB0.js → import-CZ1958L4.js} +234 -62
  16. package/dist/{local-data-C58vzLZR.js → local-data-DdFkxFK_.js} +41 -16
  17. package/dist/{mcp-COYWiGVn.js → mcp-Claiy9xE.js} +9 -6
  18. package/dist/{package-paths-Cg6fnaGp.js → package-paths-Dk7MOXxN.js} +1 -1
  19. package/dist/{profile--BYIjPkc.js → profile-Bsgzi9PA.js} +2 -2
  20. package/dist/profile-BxdzBxHW.js +2 -0
  21. package/dist/{remote-attach-C1prLjmj.js → remote-attach-LGTpwpUv.js} +4 -4
  22. package/dist/{remote-extensions-Bw029iIS.js → remote-extensions-BvV29_gk.js} +1 -1
  23. package/dist/{remote-extensions-MUUgbLJn.js → remote-extensions-L95HNwIH.js} +2 -2
  24. package/dist/{remote-language-server-z3rdHcLL.js → remote-language-server-BAznkpeu.js} +4 -4
  25. package/dist/{remote-uninstall-B3Slwor1.js → remote-uninstall-CLP79Cuk.js} +5 -5
  26. package/dist/{request-origin-B3_XI2VA.js → request-origin-D6B-zrL8.js} +27 -5
  27. package/dist/{review-app-launcher-BZEbDKuK.js → review-app-launcher-tTe8bTwg.js} +2 -2
  28. package/dist/{review-home-paths-LdGS4SpR.js → review-home-paths-BmZX2qiz.js} +1 -1
  29. package/dist/{review-telemetry-x8u-9EZb.js → review-telemetry-DACDMfqq.js} +4 -4
  30. package/dist/server/desktop-host.js +26 -38
  31. package/dist/{server-discovery-WmuFl2S3.js → server-discovery-CV5qf1J8.js} +2 -2
  32. package/dist/sharing/index.d.ts +137 -14
  33. package/dist/sharing/index.js +1 -1
  34. package/dist/{src-B2b8cCoI.js → src-BQDlJXkG.js} +44 -5
  35. package/dist/{src-DLWol7GZ.js → src-CrrW7lcY.js} +16 -1
  36. package/dist/{stored-document-migration-iwIQ4l5G.js → stored-document-migration-D1wK4yID.js} +3 -3
  37. package/dist/{thread-state-B7L1mpN_.js → thread-state-WTqSborE.js} +1 -1
  38. package/dist/{tool-failure-RLR8m9hq.js → tool-failure-YOFGHJCZ.js} +319 -55
  39. package/instructions/animation.md +69 -5
  40. package/instructions/animations/before-after-structure/README.md +27 -0
  41. package/instructions/animations/before-after-structure/animation.html +89 -0
  42. package/instructions/animations/before-after-structure/block.json +10 -0
  43. package/instructions/animations/before-after-structure/frames.json +313 -0
  44. package/instructions/animations/cache-fill-evict/README.md +24 -0
  45. package/instructions/animations/cache-fill-evict/animation.html +81 -0
  46. package/instructions/animations/cache-fill-evict/block.json +13 -0
  47. package/instructions/animations/cache-fill-evict/frames.json +79 -0
  48. package/instructions/animations/cache-fill-evict/scenarios.json +17 -0
  49. package/instructions/animations/log-replay/README.md +25 -0
  50. package/instructions/animations/log-replay/animation.html +86 -0
  51. package/instructions/animations/log-replay/block.json +10 -0
  52. package/instructions/animations/log-replay/frames.json +143 -0
  53. package/instructions/animations/log-replay/scenarios.json +18 -0
  54. package/instructions/animations/queue-workers/README.md +23 -0
  55. package/instructions/animations/queue-workers/animation.html +107 -0
  56. package/instructions/animations/queue-workers/block.json +13 -0
  57. package/instructions/animations/queue-workers/frames.json +119 -0
  58. package/instructions/animations/queue-workers/scenarios.json +18 -0
  59. package/instructions/animations/race-two-lanes/README.md +22 -0
  60. package/instructions/animations/race-two-lanes/animation.html +97 -0
  61. package/instructions/animations/race-two-lanes/block.json +1 -0
  62. package/instructions/animations/race-two-lanes/frames.json +234 -0
  63. package/instructions/animations/race-two-lanes/scenarios.json +19 -0
  64. package/instructions/animations/request-across-layers/README.md +24 -0
  65. package/instructions/animations/request-across-layers/animation.html +85 -0
  66. package/instructions/animations/request-across-layers/block.json +17 -0
  67. package/instructions/animations/request-across-layers/frames.json +58 -0
  68. package/instructions/animations/request-across-layers/scenarios.json +12 -0
  69. package/instructions/animations/request-timing/README.md +22 -0
  70. package/instructions/animations/request-timing/animation.html +120 -0
  71. package/instructions/animations/request-timing/block.json +21 -0
  72. package/instructions/animations/request-timing/markers.json +32 -0
  73. package/instructions/animations/request-timing/scenarios.json +4 -0
  74. package/instructions/animations/retry-backoff/README.md +22 -0
  75. package/instructions/animations/retry-backoff/animation.html +122 -0
  76. package/instructions/animations/retry-backoff/block.json +10 -0
  77. package/instructions/animations/retry-backoff/frames.json +65 -0
  78. package/instructions/animations/retry-backoff/scenarios.json +12 -0
  79. package/instructions/animations/state-machine/README.md +24 -0
  80. package/instructions/animations/state-machine/animation.html +95 -0
  81. package/instructions/animations/state-machine/block.json +9 -0
  82. package/instructions/animations/state-machine/frames.json +79 -0
  83. package/instructions/animations/state-machine/scenarios.json +12 -0
  84. package/instructions/animations/video-platform-architecture/README.md +24 -0
  85. package/instructions/animations/video-platform-architecture/animation.html +76 -0
  86. package/instructions/animations/video-platform-architecture/block.json +17 -0
  87. package/instructions/animations/video-platform-architecture/frames.json +97 -0
  88. package/instructions/animations/video-platform-architecture/scenarios.json +28 -0
  89. package/instructions/whiteboard.d.ts +168 -14
  90. package/package.json +6 -6
  91. package/src/animation-stage-kit.ts +150 -10
  92. package/src/cli-runner.ts +4 -1
  93. package/src/fixtures/blocks/clip.json +19 -0
  94. package/src/review-api/README.md +1 -0
  95. package/src/review-api/agent-cli.ts +3 -2
  96. package/src/review-api/animation-drafts.ts +151 -47
  97. package/src/review-api/animation-references.ts +92 -0
  98. package/src/review-api/animation-render.ts +106 -0
  99. package/src/review-api/authoring-tools.ts +10 -3
  100. package/src/review-api/document-text.ts +27 -12
  101. package/src/review-api/http.ts +52 -6
  102. package/src/review-api/instructions.ts +1 -1
  103. package/src/review-api/mcp.ts +10 -5
  104. package/src/review-api/public-tools.ts +71 -2
  105. package/src/review-api/store.ts +89 -12
  106. package/src/server/desktop-server.ts +17 -5
  107. package/src/server/headless-host.ts +4 -0
  108. package/src/server/review-gateway.ts +1 -0
  109. package/src/server/review-server-core.ts +71 -12
  110. package/src/sharing/client.ts +129 -32
  111. package/src/sharing/export.ts +42 -5
  112. package/src/sharing/file.ts +8 -0
  113. package/src/sharing/host.ts +202 -73
  114. package/src/sharing/import.ts +125 -33
  115. package/src/ui-telemetry-events.ts +25 -1
  116. package/dist/agent-cli-B8KBHuh_.js +0 -2
  117. package/dist/profile-BjcXi-oH.js +0 -2
@@ -1,5 +1,5 @@
1
1
  import { c as jsonString, o as jsonObject, u as parseJsonText } from "./src-X9phtB2j.js";
2
- import "./review-home-paths-LdGS4SpR.js";
2
+ import "./review-home-paths-BmZX2qiz.js";
3
3
  import { readFileSync } from "node:fs";
4
4
  import path from "node:path";
5
5
  import { fileURLToPath } from "node:url";
@@ -1,5 +1,5 @@
1
- import { a as projectOfCheckout, f as CheckoutGroups, o as groupCheckoutsAhead, s as initializeReviewStoreSchema, t as openLocalReviewStore } from "./local-data-C58vzLZR.js";
2
- import "./review-home-paths-LdGS4SpR.js";
1
+ import { a as projectOfCheckout, f as CheckoutGroups, o as groupCheckoutsAhead, s as initializeReviewStoreSchema, t as openLocalReviewStore } from "./local-data-DdFkxFK_.js";
2
+ import "./review-home-paths-BmZX2qiz.js";
3
3
  import { j as withFileLock } from "./s3-config-CjcLyFV5.js";
4
4
  import { access, mkdir } from "node:fs/promises";
5
5
  import path from "node:path";
@@ -0,0 +1,2 @@
1
+ import { t as openReviewProfile } from "./profile-Bsgzi9PA.js";
2
+ export { openReviewProfile };
@@ -1,7 +1,7 @@
1
- import { i as readReviewPackageVersion } from "./package-paths-Cg6fnaGp.js";
2
- import { a as readReviewServerHealth, l as serverNotReady } from "./server-discovery-WmuFl2S3.js";
3
- import { c as stopBackgroundServer, o as recordedBackgroundServer, r as ensureBackgroundServer } from "./background-server-eZWXoVcI.js";
4
- import { t as ensureRemoteLanguageServer } from "./remote-language-server-z3rdHcLL.js";
1
+ import { i as readReviewPackageVersion } from "./package-paths-Dk7MOXxN.js";
2
+ import { a as readReviewServerHealth, l as serverNotReady } from "./server-discovery-CV5qf1J8.js";
3
+ import { c as stopBackgroundServer, o as recordedBackgroundServer, r as ensureBackgroundServer } from "./background-server-BraP8pJ9.js";
4
+ import { t as ensureRemoteLanguageServer } from "./remote-language-server-BAznkpeu.js";
5
5
  import path from "node:path";
6
6
  import { spawn } from "node:child_process";
7
7
  import { gt, valid } from "semver";
@@ -1,2 +1,2 @@
1
- import { t as ensureRemoteExtensions } from "./remote-extensions-MUUgbLJn.js";
1
+ import { t as ensureRemoteExtensions } from "./remote-extensions-L95HNwIH.js";
2
2
  export { ensureRemoteExtensions };
@@ -1,7 +1,7 @@
1
1
  import { u as parseJsonText } from "./src-X9phtB2j.js";
2
- import "./review-home-paths-LdGS4SpR.js";
2
+ import "./review-home-paths-BmZX2qiz.js";
3
3
  import { N as devReviewHome } from "./s3-config-CjcLyFV5.js";
4
- import { t as findReviewPackageRoot } from "./package-paths-Cg6fnaGp.js";
4
+ import { t as findReviewPackageRoot } from "./package-paths-Dk7MOXxN.js";
5
5
  import { createHash } from "node:crypto";
6
6
  import { z } from "zod";
7
7
  import { createReadStream, createWriteStream } from "node:fs";
@@ -1,8 +1,8 @@
1
- import "./review-home-paths-LdGS4SpR.js";
1
+ import "./review-home-paths-BmZX2qiz.js";
2
2
  import { A as processStartIdentity, j as withFileLock } from "./s3-config-CjcLyFV5.js";
3
- import { t as findReviewPackageRoot } from "./package-paths-Cg6fnaGp.js";
4
- import { n as cliSpawn, s as spawnDetached } from "./background-server-eZWXoVcI.js";
5
- import { r as remoteServerPaths, t as ensureRemoteExtensions } from "./remote-extensions-MUUgbLJn.js";
3
+ import { t as findReviewPackageRoot } from "./package-paths-Dk7MOXxN.js";
4
+ import { n as cliSpawn, s as spawnDetached } from "./background-server-BraP8pJ9.js";
5
+ import { r as remoteServerPaths, t as ensureRemoteExtensions } from "./remote-extensions-L95HNwIH.js";
6
6
  import { randomBytes } from "node:crypto";
7
7
  import { z } from "zod";
8
8
  import { mkdir, readFile, rename, stat, writeFile } from "node:fs/promises";
@@ -1,9 +1,9 @@
1
- import { C as REVIEW_REMOTE_INSTALL_LOCK, w as REVIEW_REMOTE_WRAPPER_MARK } from "./src-DLWol7GZ.js";
2
- import "./review-home-paths-LdGS4SpR.js";
1
+ import { T as REVIEW_REMOTE_WRAPPER_MARK, w as REVIEW_REMOTE_INSTALL_LOCK } from "./src-CrrW7lcY.js";
2
+ import "./review-home-paths-BmZX2qiz.js";
3
3
  import { M as DEV_REVIEW_HOME_ENV } from "./s3-config-CjcLyFV5.js";
4
- import { c as stopBackgroundServer, o as recordedBackgroundServer } from "./background-server-eZWXoVcI.js";
5
- import { i as whiteboardRemoteHome } from "./remote-extensions-MUUgbLJn.js";
6
- import { n as remoteLanguageServerGroups, r as stopProcessGroup } from "./remote-language-server-z3rdHcLL.js";
4
+ import { c as stopBackgroundServer, o as recordedBackgroundServer } from "./background-server-BraP8pJ9.js";
5
+ import { i as whiteboardRemoteHome } from "./remote-extensions-L95HNwIH.js";
6
+ import { n as remoteLanguageServerGroups, r as stopProcessGroup } from "./remote-language-server-BAznkpeu.js";
7
7
  import { existsSync } from "node:fs";
8
8
  import { lstat, mkdir, readFile, readdir, rm, stat } from "node:fs/promises";
9
9
  import path from "node:path";
@@ -1,7 +1,7 @@
1
1
  import { a as jsonNumber, c as jsonString, i as jsonBoolean, n as isJsonObject } from "./src-X9phtB2j.js";
2
- import { X as SELECTION_UNAVAILABLE_REASONS } from "./src-B2b8cCoI.js";
3
- import { _ as REVIEW_DIFF_LAYOUTS, g as REVIEW_COLOR_THEME_KINDS, v as REVIEW_DIFF_LAYOUT_SCOPES } from "./src-DLWol7GZ.js";
4
- import { n as askAgentIds } from "./thread-state-B7L1mpN_.js";
2
+ import { X as SELECTION_UNAVAILABLE_REASONS } from "./src-BQDlJXkG.js";
3
+ import { _ as REVIEW_DIFF_LAYOUTS, b as REVIEW_OPEN_FILES_IN_CHOICES, g as REVIEW_COLOR_THEME_KINDS, v as REVIEW_DIFF_LAYOUT_SCOPES } from "./src-CrrW7lcY.js";
4
+ import { n as askAgentIds } from "./thread-state-WTqSborE.js";
5
5
  import { z } from "zod";
6
6
  //#region src/telemetry-clean-text.ts
7
7
  const USER_DATA_REGEXES = [
@@ -178,7 +178,8 @@ const LSP_VIA = ["command", "mouse"];
178
178
  const LSP_EDITOR_KIND = [
179
179
  "files_tab",
180
180
  "inline_peek",
181
- "diff"
181
+ "diff",
182
+ "definition_peek"
182
183
  ];
183
184
  const LSP_LANGUAGE = [
184
185
  "typescript",
@@ -297,6 +298,19 @@ const MAP_LEVEL = [
297
298
  "code"
298
299
  ];
299
300
  const SOURCE_TREE_OPENED_VIA = ["topbar", "home"];
301
+ const SOURCE_OPENED_DESTINATION = [
302
+ "source_window",
303
+ "vscode",
304
+ "cursor",
305
+ "zed",
306
+ "application"
307
+ ];
308
+ const SOURCE_OPENED_KIND = [
309
+ "file",
310
+ "diff",
311
+ "references",
312
+ "tree"
313
+ ];
300
314
  /** Tab names the dwell beacon reports. Shared with its request parser. */
301
315
  const REVIEW_TELEMETRY_TABS = [
302
316
  "review",
@@ -500,6 +514,13 @@ const UI_TELEMETRY_EVENTS = {
500
514
  event: "review_source_tree_opened",
501
515
  properties: { via: SOURCE_TREE_OPENED_VIA }
502
516
  },
517
+ source_opened: {
518
+ event: "review_source_opened",
519
+ properties: {
520
+ destination: SOURCE_OPENED_DESTINATION,
521
+ kind: SOURCE_OPENED_KIND
522
+ }
523
+ },
503
524
  whiteboard_file_exported: {
504
525
  event: "review_whiteboard_file_exported",
505
526
  properties: {}
@@ -644,7 +665,8 @@ const UI_TELEMETRY_EVENTS = {
644
665
  properties: {
645
666
  setting: SETTING_NAME,
646
667
  enabled: "boolean",
647
- value: REVIEW_COLOR_THEME_KINDS
668
+ value: REVIEW_COLOR_THEME_KINDS,
669
+ choice: REVIEW_OPEN_FILES_IN_CHOICES
648
670
  }
649
671
  },
650
672
  review_opened: {
@@ -1,5 +1,5 @@
1
- import { o as parseReviewVerbResponse } from "./src-DLWol7GZ.js";
2
- import { b as selectReviewInstance, m as healthyReviewInstance, v as reviewInstanceStartHint, y as reviewInstanceUnavailable } from "./server-discovery-WmuFl2S3.js";
1
+ import { o as parseReviewVerbResponse } from "./src-CrrW7lcY.js";
2
+ import { b as selectReviewInstance, m as healthyReviewInstance, v as reviewInstanceStartHint, y as reviewInstanceUnavailable } from "./server-discovery-CV5qf1J8.js";
3
3
  import { closeSync, existsSync, fstatSync, mkdtempSync, openSync, readSync } from "node:fs";
4
4
  import path from "node:path";
5
5
  import { homedir, tmpdir } from "node:os";
@@ -379,7 +379,7 @@ async function runStoreLogin(input) {
379
379
  };
380
380
  let origin;
381
381
  try {
382
- origin = normalizeStoreOrigin(input.origin ?? DEFAULT_STORE_ORIGIN);
382
+ origin = normalizeStoreOrigin(input.origin || (input.env ?? process.env).DEV_REVIEW_SERVICE_ORIGIN || DEFAULT_STORE_ORIGIN);
383
383
  } catch (error) {
384
384
  return failWithJsonError(output, "login", errorMessage(error));
385
385
  }
@@ -1,9 +1,9 @@
1
1
  import { c as jsonString, l as jsonValueSchema, o as jsonObject, u as parseJsonText } from "./src-X9phtB2j.js";
2
- import "./src-DLWol7GZ.js";
3
- import "./review-home-paths-LdGS4SpR.js";
2
+ import "./src-CrrW7lcY.js";
3
+ import "./review-home-paths-BmZX2qiz.js";
4
4
  import { F as writeFileAtomic, N as devReviewHome, j as withFileLock, k as processIsAlive } from "./s3-config-CjcLyFV5.js";
5
- import { i as readReviewPackageVersion, t as findReviewPackageRoot } from "./package-paths-Cg6fnaGp.js";
6
- import "./request-origin-B3_XI2VA.js";
5
+ import { i as readReviewPackageVersion, t as findReviewPackageRoot } from "./package-paths-Dk7MOXxN.js";
6
+ import "./request-origin-D6B-zrL8.js";
7
7
  import { createHmac, randomUUID } from "node:crypto";
8
8
  import { z } from "zod";
9
9
  import { existsSync, readFileSync, rmSync } from "node:fs";
@@ -1,21 +1,21 @@
1
1
  #!/usr/bin/env node
2
2
  import { S as splitGitPatchFiles, a as diff, o as diffFileSummaries } from "../src-Y30gweiK.js";
3
3
  import { c as jsonString, i as jsonBoolean, n as isJsonObject, p as isObjectValue, s as jsonProperty, u as parseJsonText } from "../src-X9phtB2j.js";
4
- import { _ as readBoundedStream, d as legacyModeSchema, g as StreamLimitError } from "../import-YAIU6rB0.js";
5
- import { ot as ReviewInputError, y as resourceReferences } from "../src-B2b8cCoI.js";
6
- import { A as ReviewGatewayHostSchema, D as ReviewConnectRequestSchema, P as reviewDiffrSummarizerInputSchema, d as ReviewBugReportRequestSchema, f as parseReviewBugReportResponse, m as REVIEW_CLIENT_REMOTE, p as REVIEW_CLIENT_HEADER, r as parseReviewDesktopVerbFrame, s as parseZod, t as parseReviewCliInstallApplyRequest, u as ReviewBugReportMetaV2Schema, y as REVIEW_HOST_HEADER } from "../src-DLWol7GZ.js";
7
- import { i as reviewInstanceDiscoveryPath, o as reviewLegacyDiscoveryPath } from "../review-home-paths-LdGS4SpR.js";
8
- import { p as pullRequestProvider } from "../stored-document-migration-iwIQ4l5G.js";
4
+ import { C as StreamLimitError, v as legacyModeSchema, w as readBoundedStream } from "../import-CZ1958L4.js";
5
+ import { ot as ReviewInputError, y as resourceReferences } from "../src-BQDlJXkG.js";
6
+ import { F as reviewDiffrSummarizerInputSchema, O as ReviewConnectRequestSchema, d as ReviewBugReportRequestSchema, f as parseReviewBugReportResponse, j as ReviewGatewayHostSchema, m as REVIEW_CLIENT_REMOTE, p as REVIEW_CLIENT_HEADER, r as parseReviewDesktopVerbFrame, s as parseZod, t as parseReviewCliInstallApplyRequest, u as ReviewBugReportMetaV2Schema, y as REVIEW_HOST_HEADER } from "../src-CrrW7lcY.js";
7
+ import { i as reviewInstanceDiscoveryPath, o as reviewLegacyDiscoveryPath } from "../review-home-paths-BmZX2qiz.js";
8
+ import { p as pullRequestProvider } from "../stored-document-migration-D1wK4yID.js";
9
9
  import { L as writePrivateJsonAtomic, N as devReviewHome } from "../s3-config-CjcLyFV5.js";
10
10
  import { t as errorMessage } from "../error-message-OtiDonty.js";
11
- import { i as readReviewPackageVersion, t as findReviewPackageRoot } from "../package-paths-Cg6fnaGp.js";
12
- import { _ as reviewInstanceIdentity, u as REVIEW_INSTANCE_ENV } from "../server-discovery-WmuFl2S3.js";
13
- import { t as openReviewProfile } from "../profile--BYIjPkc.js";
14
- import { r as reviewTelemetryChannel, t as ReviewTelemetry } from "../review-telemetry-x8u-9EZb.js";
15
- import { l as REVIEW_TELEMETRY_TABS } from "../request-origin-B3_XI2VA.js";
16
- import { c as removeLegacyReviewSkills, d as skipCliInstall, h as detectConnectAgents, i as finishCliInstallUpdate, l as resetCliInstall, m as connectAgent, n as applyCliInstall, o as pathShimPath, r as declineCliInstall, s as removeCliInstall, t as aliasInstallationToAccount, u as resolveCliInstallStatus } from "../account-alias-Bw3PT3Qo.js";
17
- import { C as setDiffrConfigValue, S as saveDiffrSummarizer, T as cliAskTools, _ as HttpJsonError, a as drainServerCrashReport, b as migrateDiffrConfig, c as answerErrorsAsJson, d as captureSanitizedUiTelemetry, f as clientErrorsForSession, g as DEFAULT_MAX_REQUEST_BYTES, h as readBoundedRequestJson, l as createWhiteboardCore, m as createNodeRequestListener, o as installProcessErrorTelemetry, p as recordClientError, r as takeOverServerHome, s as serverCrashReportPath, u as serverJson, v as ReviewServerError, w as testDiffrSummarizer, x as readDiffrConfig, y as GlobalReviewDesktopVerbRelay } from "../headless-host-Dl2KZ9IT.js";
18
- import { s as readQuerySchemas } from "../authoring-tools-CiLy46kh.js";
11
+ import { i as readReviewPackageVersion, t as findReviewPackageRoot } from "../package-paths-Dk7MOXxN.js";
12
+ import { _ as reviewInstanceIdentity, u as REVIEW_INSTANCE_ENV } from "../server-discovery-CV5qf1J8.js";
13
+ import { t as openReviewProfile } from "../profile-Bsgzi9PA.js";
14
+ import { r as reviewTelemetryChannel, t as ReviewTelemetry } from "../review-telemetry-DACDMfqq.js";
15
+ import { l as REVIEW_TELEMETRY_TABS } from "../request-origin-D6B-zrL8.js";
16
+ import { c as removeLegacyReviewSkills, d as skipCliInstall, h as detectConnectAgents, i as finishCliInstallUpdate, l as resetCliInstall, m as connectAgent, n as applyCliInstall, o as pathShimPath, r as declineCliInstall, s as removeCliInstall, t as aliasInstallationToAccount, u as resolveCliInstallStatus } from "../account-alias-BlYamXAG.js";
17
+ import { C as DEFAULT_MAX_REQUEST_BYTES, D as writeAnimationsEnabled, E as readAnimationsEnabled, O as cliAskTools, S as readBoundedRequestJson, T as ReviewServerError, _ as saveDiffrSummarizer, a as drainServerCrashReport, b as remoteShare, c as answerErrorsAsJson, d as captureSanitizedUiTelemetry, f as clientErrorsForSession, g as readDiffrConfig, h as migrateDiffrConfig, l as createWhiteboardCore, m as GlobalReviewDesktopVerbRelay, o as installProcessErrorTelemetry, p as recordClientError, r as takeOverServerHome, s as serverCrashReportPath, u as serverJson, v as setDiffrConfigValue, w as HttpJsonError, x as createNodeRequestListener, y as testDiffrSummarizer } from "../headless-host-FAlbekFD.js";
18
+ import { s as readQuerySchemas } from "../authoring-tools-CkfxTVJm.js";
19
19
  import crypto, { createHash, randomBytes } from "node:crypto";
20
20
  import { z } from "zod";
21
21
  import { Agent, request } from "undici";
@@ -264,30 +264,6 @@ function listenForDesktopHostShutdown(hostProcess, onShutdown, onTelemetrySettin
264
264
  return () => hostProcess.off("message", handleMessage);
265
265
  }
266
266
  //#endregion
267
- //#region src/review-preferences.ts
268
- /**
269
- * Machine-wide Review preferences the server itself needs. Workbench settings
270
- * do not work here: the review server never reads the workbench
271
- * configuration.
272
- */
273
- function reviewPreferencesPath(devHome = devReviewHome()) {
274
- return path.join(devHome, "preferences.json");
275
- }
276
- /** Whether agents are offered animation authoring; existing animations
277
- * always render. A missing or unreadable file means off; it never throws. */
278
- async function readAnimationsEnabled(devHome) {
279
- try {
280
- const raw = parseJsonText(await readFile(reviewPreferencesPath(devHome), "utf8"));
281
- return isJsonObject(raw) && raw.animationsEnabled === true;
282
- } catch {
283
- return false;
284
- }
285
- }
286
- async function writeAnimationsEnabled(enabled, devHome) {
287
- await writePrivateJsonAtomic(reviewPreferencesPath(devHome), { animationsEnabled: enabled });
288
- return enabled;
289
- }
290
- //#endregion
291
267
  //#region src/server/crash-report.ts
292
268
  const CRASH_REPORT_URL = "https://bug.dev.fast/api/v2/crashes";
293
269
  const gzipAsync = promisify(gzip);
@@ -1730,6 +1706,11 @@ const REMOTE_ROUTES = [
1730
1706
  method: "POST",
1731
1707
  path: "copy-context"
1732
1708
  },
1709
+ {
1710
+ method: "POST",
1711
+ path: "share-bundle",
1712
+ slow: true
1713
+ },
1733
1714
  {
1734
1715
  method: "GET",
1735
1716
  path: "language-context",
@@ -2130,6 +2111,7 @@ function createGlobalReviewServer(input) {
2130
2111
  discovery.cliVersion = readReviewPackageVersion(pathToFileURL(cliPath).href);
2131
2112
  if (input.cliRuntimePath && existsSync(input.cliRuntimePath)) discovery.cliRuntimePath = input.cliRuntimePath;
2132
2113
  }
2114
+ const hooks = reviewLifecycleTelemetry(telemetry, (reviewId) => reviewStore.summary(reviewId)?.firstCreatedAt, () => aliasInstallationToAccount(telemetry));
2133
2115
  const core = createWhiteboardCore({
2134
2116
  profile: {
2135
2117
  store: reviewStore,
@@ -2153,7 +2135,13 @@ function createGlobalReviewServer(input) {
2153
2135
  home: devReviewHome()
2154
2136
  };
2155
2137
  },
2156
- hooks: reviewLifecycleTelemetry(telemetry, (reviewId) => reviewStore.summary(reviewId)?.firstCreatedAt, () => aliasInstallationToAccount(telemetry)),
2138
+ hooks: {
2139
+ ...hooks,
2140
+ sharing: {
2141
+ ...hooks.sharing,
2142
+ remoteShare: remoteShare((reviewId) => gateway.isRemote(reviewId), (request) => gateway.fetch(request))
2143
+ }
2144
+ },
2157
2145
  ask: { tools: askTools }
2158
2146
  });
2159
2147
  const { app } = core;
@@ -1,6 +1,6 @@
1
1
  import { a as jsonNumber, n as isJsonObject, s as jsonProperty, u as parseJsonText } from "./src-X9phtB2j.js";
2
- import { n as parseReviewDesktopDiscovery } from "./src-DLWol7GZ.js";
3
- import { a as reviewInstancesDir, o as reviewLegacyDiscoveryPath, r as reviewDevInstanceKey, t as reviewDefaultInstancePath } from "./review-home-paths-LdGS4SpR.js";
2
+ import { n as parseReviewDesktopDiscovery } from "./src-CrrW7lcY.js";
3
+ import { a as reviewInstancesDir, o as reviewLegacyDiscoveryPath, r as reviewDevInstanceKey, t as reviewDefaultInstancePath } from "./review-home-paths-BmZX2qiz.js";
4
4
  import { M as DEV_REVIEW_HOME_ENV, N as devReviewHome, k as processIsAlive } from "./s3-config-CjcLyFV5.js";
5
5
  import { z } from "zod";
6
6
  import { mkdir, readFile, readdir, rm, writeFile } from "node:fs/promises";
@@ -15,6 +15,7 @@ type JsonObject$1 = {
15
15
  };
16
16
  //#endregion
17
17
  //#region ../review-share-protocol/src/index.d.ts
18
+ /** Unknown fields drop, so a reader opens bundles from newer sharers. */
18
19
  declare const shareBundleSchema: z.ZodObject<{
19
20
  format: z.ZodLiteral<"review-share/2">;
20
21
  reviewId: z.ZodString;
@@ -23,7 +24,7 @@ declare const shareBundleSchema: z.ZodObject<{
23
24
  snapshot: z.ZodRecord<z.ZodString, z.ZodUnknown>;
24
25
  images: z.ZodRecord<z.ZodString, z.ZodObject<{
25
26
  png: z.ZodBase64;
26
- }, z.core.$strict>>;
27
+ }, z.core.$strip>>;
27
28
  traces: z.ZodRecord<z.ZodString, z.ZodUnknown>;
28
29
  maps: z.ZodRecord<z.ZodString, z.ZodUnknown>;
29
30
  commits: z.ZodArray<z.ZodUnknown>;
@@ -39,20 +40,53 @@ declare const shareBundleSchema: z.ZodObject<{
39
40
  repositoryId: z.ZodString;
40
41
  head: z.ZodString;
41
42
  base: z.ZodOptional<z.ZodString>;
42
- }, z.core.$strict>>;
43
- }, z.core.$strict>>>;
43
+ }, z.core.$strip>>;
44
+ }, z.core.$strip>>>;
44
45
  sources: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
45
46
  kind: z.ZodLiteral<"excerpt">;
46
47
  file: z.ZodString;
47
48
  commit: z.ZodString;
48
49
  fromLine: z.ZodNumber;
49
50
  lines: z.ZodArray<z.ZodString>;
50
- }, z.core.$strict>], "kind">>;
51
+ }, z.core.$strip>], "kind">>;
52
+ alignments: z.ZodOptional<z.ZodArray<z.ZodObject<{
53
+ file: z.ZodString;
54
+ previousFile: z.ZodOptional<z.ZodString>;
55
+ head: z.ZodString;
56
+ base: z.ZodOptional<z.ZodString>;
57
+ rows: z.ZodArray<z.ZodTuple<[z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodNumber>], null>>;
58
+ }, z.core.$strip>>>;
51
59
  repository: z.ZodOptional<z.ZodObject<{
52
60
  cloneUrl: z.ZodString;
53
- }, z.core.$strict>>;
54
- }, z.core.$strict>;
61
+ }, z.core.$strip>>;
62
+ frozen: z.ZodOptional<z.ZodLiteral<true>>;
63
+ }, z.core.$strip>;
55
64
  type ShareBundle = z.infer<typeof shareBundleSchema>;
65
+ declare const shareRevisionsSchema: z.ZodObject<{
66
+ latest: z.ZodUUID;
67
+ items: z.ZodArray<z.ZodObject<{
68
+ id: z.ZodUUID;
69
+ version: z.ZodNumber;
70
+ createdAt: z.ZodNumber;
71
+ size: z.ZodNumber;
72
+ url: z.ZodURL;
73
+ }, z.core.$strip>>;
74
+ }, z.core.$strip>;
75
+ type ShareRevisions = z.infer<typeof shareRevisionsSchema>;
76
+ declare const sharedMetaSchema: z.ZodObject<{
77
+ sender: z.ZodObject<{
78
+ login: z.ZodString;
79
+ }, z.core.$strict>;
80
+ sharedAt: z.ZodNumber;
81
+ size: z.ZodNumber;
82
+ revision: z.ZodObject<{
83
+ id: z.ZodUUID;
84
+ version: z.ZodNumber;
85
+ createdAt: z.ZodNumber;
86
+ }, z.core.$strip>;
87
+ latest: z.ZodUUID;
88
+ }, z.core.$strip>;
89
+ type SharedMeta = z.infer<typeof sharedMetaSchema>;
56
90
  //#endregion
57
91
  //#region src/sharing/client.d.ts
58
92
  /** Account tokens go only to the configured API origin. */
@@ -76,8 +110,11 @@ declare class ShareClient {
76
110
  url: string;
77
111
  }>;
78
112
  revoke(shareId: string): Promise<JsonValue$1>;
79
- /** The bundle and who shared it, read with the link's capability. */
80
- download(capability: string): Promise<{
113
+ revisions(shareId: string): Promise<ShareRevisions>;
114
+ /** Who shared a link's revision, and which revision is its latest. */
115
+ shared(capability: string, revision?: string): Promise<SharedMeta>;
116
+ /** The bundle of the revision the meta names, and who shared it. */
117
+ download(capability: string, revision?: string): Promise<{
81
118
  bundle: {
82
119
  format: "review-share/2";
83
120
  reviewId: string;
@@ -108,14 +145,28 @@ declare class ShareClient {
108
145
  fromLine: number;
109
146
  lines: string[];
110
147
  }[];
148
+ alignments?: {
149
+ file: string;
150
+ head: string;
151
+ rows: [number | null, number | null][];
152
+ previousFile?: string | undefined;
153
+ base?: string | undefined;
154
+ }[] | undefined;
111
155
  repository?: {
112
156
  cloneUrl: string;
113
157
  } | undefined;
158
+ frozen?: true | undefined;
114
159
  };
115
160
  attribution: {
116
161
  login: string;
117
162
  sharedAt: number;
118
163
  };
164
+ revision: {
165
+ id: string;
166
+ version: number;
167
+ createdAt: number;
168
+ };
169
+ latest: string;
119
170
  }>;
120
171
  }
121
172
  //#endregion
@@ -1058,6 +1109,31 @@ declare const leafSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1058
1109
  head: z.ZodString;
1059
1110
  base: z.ZodOptional<z.ZodString>;
1060
1111
  }, z.core.$strict>>;
1112
+ }, z.core.$strict>, z.ZodObject<{
1113
+ type: z.ZodLiteral<"clip">;
1114
+ id: z.ZodOptional<z.ZodString>;
1115
+ title: z.ZodString;
1116
+ html: z.ZodString;
1117
+ markers: z.ZodArray<z.ZodObject<{
1118
+ key: z.ZodString;
1119
+ title: z.ZodString;
1120
+ caption: z.ZodOptional<z.ZodString>;
1121
+ code: z.ZodOptional<z.ZodArray<z.ZodString>>;
1122
+ }, z.core.$strict>>;
1123
+ scenarios: z.ZodOptional<z.ZodArray<z.ZodObject<{
1124
+ key: z.ZodString;
1125
+ label: z.ZodString;
1126
+ }, z.core.$strict>>>;
1127
+ code: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1128
+ source: z.ZodString;
1129
+ label: z.ZodString;
1130
+ }, z.core.$strict>]>>>;
1131
+ height: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodNumber]>>;
1132
+ pins: z.ZodOptional<z.ZodObject<{
1133
+ repositoryId: z.ZodString;
1134
+ head: z.ZodString;
1135
+ base: z.ZodOptional<z.ZodString>;
1136
+ }, z.core.$strict>>;
1061
1137
  }, z.core.$strict>], "type">;
1062
1138
  type LeafBlock = z.infer<typeof leafSchema>;
1063
1139
  type Block = LeafBlock | SectionBlock | CalloutBlock;
@@ -1382,6 +1458,31 @@ declare const editSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1382
1458
  head: z.ZodString;
1383
1459
  base: z.ZodOptional<z.ZodString>;
1384
1460
  }, z.core.$strict>>;
1461
+ }, z.core.$strict>, z.ZodObject<{
1462
+ type: z.ZodLiteral<"clip">;
1463
+ id: z.ZodOptional<z.ZodString>;
1464
+ title: z.ZodString;
1465
+ html: z.ZodString;
1466
+ markers: z.ZodArray<z.ZodObject<{
1467
+ key: z.ZodString;
1468
+ title: z.ZodString;
1469
+ caption: z.ZodOptional<z.ZodString>;
1470
+ code: z.ZodOptional<z.ZodArray<z.ZodString>>;
1471
+ }, z.core.$strict>>;
1472
+ scenarios: z.ZodOptional<z.ZodArray<z.ZodObject<{
1473
+ key: z.ZodString;
1474
+ label: z.ZodString;
1475
+ }, z.core.$strict>>>;
1476
+ code: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
1477
+ source: z.ZodString;
1478
+ label: z.ZodString;
1479
+ }, z.core.$strict>]>>>;
1480
+ height: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"auto">, z.ZodNumber]>>;
1481
+ pins: z.ZodOptional<z.ZodObject<{
1482
+ repositoryId: z.ZodString;
1483
+ head: z.ZodString;
1484
+ base: z.ZodOptional<z.ZodString>;
1485
+ }, z.core.$strict>>;
1385
1486
  }, z.core.$strict>], "type">, z.ZodObject<{
1386
1487
  type: z.ZodLiteral<"section">;
1387
1488
  id: z.ZodOptional<z.ZodString>;
@@ -2109,6 +2210,11 @@ interface SharedProvenance {
2109
2210
  sharedAt?: number;
2110
2211
  cloneUrl?: string;
2111
2212
  key?: string;
2213
+ revisionId?: string;
2214
+ /** The version import wrote; anything later is the receiver's edit. */
2215
+ importedVersion?: number;
2216
+ /** Opened from a link naming a revision: never refreshed. */
2217
+ pinned?: boolean;
2112
2218
  }
2113
2219
  /** Content a new board starts with, as another board left it. */
2114
2220
  interface Seed {
@@ -2308,8 +2414,12 @@ declare class ReviewStore {
2308
2414
  /** Forgets a checkout no board uses, after every write queued before it,
2309
2415
  * so a board being made with it keeps it. */
2310
2416
  unregisterRepository(id: string): Promise<void>;
2311
- /** The board copied from a share link, until it is deleted. */
2312
- copyOf(key: string): string | undefined;
2417
+ /** The boards copied from a share link, newest first, until each is deleted. */
2418
+ copiesOf(key: string): {
2419
+ reviewId: string;
2420
+ version: number;
2421
+ shared: SharedProvenance;
2422
+ }[];
2313
2423
  /** Checkouts whose remote is cloneUrl, most recently used first. */
2314
2424
  checkoutsOf(cloneUrl: string): string[];
2315
2425
  /** Registered checkouts, oldest registration first. */
@@ -2361,11 +2471,14 @@ declare class ReviewStore {
2361
2471
  history(id: string): HistoryEntry[];
2362
2472
  inspect(id: string, targetId?: string, version?: number): Element | {
2363
2473
  id: string | undefined;
2364
- type: "markdown" | "code" | "divider" | "code_peek" | "sequence" | "call_stack_diff" | "database_lens" | "image" | "trace_quote" | "software_map" | "flow_diagram" | "animation" | "step" | "flow_node" | "flow_edge" | "section" | "callout";
2474
+ type: "markdown" | "code" | "divider" | "code_peek" | "sequence" | "call_stack_diff" | "database_lens" | "image" | "trace_quote" | "software_map" | "flow_diagram" | "animation" | "clip" | "step" | "flow_node" | "flow_edge" | "section" | "callout";
2365
2475
  label: string | undefined;
2366
2476
  }[];
2367
2477
  /** The host can seed a document; transport callers only supply a command. */
2368
2478
  execute(input: unknown, initial?: Seed, author?: Author): Promise<Result>;
2479
+ /** Replaces a share copy's content under the same board id; 409 once it moved past `baseVersion`. */
2480
+ refreshCopy(reviewId: string, baseVersion: number, create: unknown, seed: Seed): Promise<Result>;
2481
+ private track;
2369
2482
  /** Resolve optional network context before entering the write queue. */
2370
2483
  private prepareCommand;
2371
2484
  private applyPreparedCommand;
@@ -2974,9 +3087,17 @@ declare function validateShareBundle(input: ShareBundle): {
2974
3087
  fromLine: number;
2975
3088
  lines: string[];
2976
3089
  }[];
3090
+ alignments?: {
3091
+ file: string;
3092
+ head: string;
3093
+ rows: [number | null, number | null][];
3094
+ previousFile?: string | undefined;
3095
+ base?: string | undefined;
3096
+ }[] | undefined;
2977
3097
  repository?: {
2978
3098
  cloneUrl: string;
2979
3099
  } | undefined;
3100
+ frozen?: true | undefined;
2980
3101
  };
2981
3102
  snapshot: {
2982
3103
  reviewId: string;
@@ -3111,8 +3232,10 @@ interface ShareImport {
3111
3232
  cloneRepository?: typeof cloneSharedRepository;
3112
3233
  onStage?: (stage: "fetching" | "validating") => void;
3113
3234
  }
3114
- /** Imports a share as an ordinary board, once per link: the link's copy
3115
- * comes back while it exists, even from Trash. */
3116
- declare function importShare(input: ShareImport, key: string, received: ShareBundle, attribution?: ShareAttribution): Promise<string>;
3235
+ /** Imports a share as an ordinary board, or into a copy of its link. */
3236
+ declare function importShare(input: ShareImport, key: string, received: ShareBundle, provenance?: ShareAttribution & Pick<SharedProvenance, "revisionId" | "pinned">, into?: {
3237
+ reviewId: string;
3238
+ version: number;
3239
+ }): Promise<string>;
3117
3240
  //#endregion
3118
3241
  export { ShareClient, exportShare, importShare, shareKey, validateShareBundle };
@@ -1,2 +1,2 @@
1
- import { c as ShareClient, i as validateShareBundle, l as exportShare, r as shareKey, t as importShare } from "../import-YAIU6rB0.js";
1
+ import { a as shareKey, g as exportShare, o as validateShareBundle, t as importShare, u as ShareClient } from "../import-CZ1958L4.js";
2
2
  export { ShareClient, exportShare, importShare, shareKey, validateShareBundle };