@dev.fast/whiteboard 0.3.4-preview.20261019.127 → 0.3.4

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 (115) hide show
  1. package/dist/{account-alias-B5-HYi1D.js → account-alias-CprZojXd.js} +8 -13
  2. package/dist/agent-cli-C6SPSII0.js +2 -0
  3. package/dist/{agent-cli-CohHf6Ua.js → agent-cli-CThN7Q59.js} +10 -15
  4. package/dist/{agent-client-Dtc-Kn_w.js → agent-client-BOOi7EUR.js} +3 -13
  5. package/dist/{authoring-tools-B7KU04f7.js → authoring-tools-BNwuMnz6.js} +27 -34
  6. package/dist/{background-server-C03RKxKS.js → background-server-CkvxA-6O.js} +5 -5
  7. package/dist/{background-server-CB9C4uoc.js → background-server-DLSDogkI.js} +1 -1
  8. package/dist/build-info.json +1 -1
  9. package/dist/{cli-CJaEb7zC.js → cli-R4yfa5DT.js} +1 -1
  10. package/dist/{cli-runner-DGDIqh3V.js → cli-runner-Cuc9FSzu.js} +26 -26
  11. package/dist/cli.js +3 -4
  12. package/dist/{client-lKVF_Elo.js → client-BN_FDxFr.js} +47 -253
  13. package/dist/{fuzzy-match-BmVJJm9I.js → fuzzy-match-BO9bK37N.js} +4 -6
  14. package/dist/{headless-host-DRtjf9WA.js → headless-host-CVBOQyRS.js} +1 -1
  15. package/dist/{headless-host-XhL1X4vX.js → headless-host-Cog6SpS9.js} +140 -513
  16. package/dist/{local-data-Cpl4ENbJ.js → local-data-D_9tvdsp.js} +323 -2419
  17. package/dist/{mcp-ovmiUE_x.js → mcp-D1hziANa.js} +9 -5
  18. package/dist/{package-paths-BWxO-UEL.js → package-paths-C--__jEv.js} +1 -1
  19. package/dist/profile-CYPmvBoA.js +2 -0
  20. package/dist/{profile-BadSkCkI.js → profile-DokFw782.js} +8 -20
  21. package/dist/{remote-attach-Dd-YobM6.js → remote-attach-CEJ-kvDY.js} +4 -4
  22. package/dist/{remote-extensions-CNXwqK0D.js → remote-extensions-Blcjr9Ze.js} +3 -3
  23. package/dist/{remote-extensions-VP-kfq0C.js → remote-extensions-GN8Gf_qG.js} +1 -1
  24. package/dist/{remote-language-server-BXk87KCr.js → remote-language-server-BTKBQ7x4.js} +5 -5
  25. package/dist/{remote-uninstall-DuOzsvaD.js → remote-uninstall-DW7Gdryh.js} +6 -6
  26. package/dist/{request-origin-B9qCPiVB.js → request-origin-Zcn_CjX4.js} +12 -45
  27. package/dist/{review-app-launcher-C7el2Uoy.js → review-app-launcher-CkwLclzR.js} +2 -2
  28. package/dist/{review-home-paths-D8AoCdd2.js → review-home-paths-j2BRAaNv.js} +17 -19
  29. package/dist/{review-telemetry-BsoRMC2w.js → review-telemetry-BLNwYnLV.js} +5 -5
  30. package/dist/runtime-CKiWhGrf.js +52 -0
  31. package/dist/runtime.d.ts +1 -1
  32. package/dist/runtime.js +1 -1
  33. package/dist/{s3-CsG2EWED.js → s3-DtJFWC0G.js} +1 -1
  34. package/dist/{s3-config-CjcLyFV5.js → s3-config-BTO12tCC.js} +2 -4
  35. package/dist/{s3-config-zz4GWh2T.js → s3-config-CSy3fx8H.js} +1 -1
  36. package/dist/server/desktop-host.js +76 -29
  37. package/dist/{server-discovery-CKjw3-6h.js → server-discovery-Bey8IqXH.js} +3 -3
  38. package/dist/sharing/index.d.ts +70 -484
  39. package/dist/sharing/index.js +1 -1
  40. package/dist/{src-WPaQn75m.js → src-BMPuxWv4.js} +73 -208
  41. package/dist/{src-BiWNbcF_.js → src-DsM3jO8G.js} +12 -89
  42. package/dist/{stored-document-migration-dFbewRTG.js → stored-document-migration-CChxtFAy.js} +269 -270
  43. package/dist/{thread-state-Do5LX10I.js → thread-state-5pYr6_zM.js} +2 -7
  44. package/dist/{tool-failure-DvI-gys2.js → tool-failure-C9MpbXJJ.js} +3 -10
  45. package/instructions/authoring.md +2 -3
  46. package/instructions/scratchpad.md +23 -0
  47. package/package.json +4 -4
  48. package/src/ask/agents.ts +1 -13
  49. package/src/ask/checkout-files.ts +5 -2
  50. package/src/ask/thread-state.ts +0 -4
  51. package/src/ask/thread.ts +0 -16
  52. package/src/ask/threads.ts +3 -24
  53. package/src/cli-install.ts +2 -13
  54. package/src/cli-runner.ts +1 -4
  55. package/src/cli.ts +1 -4
  56. package/src/diff-selection-migration.ts +34 -48
  57. package/src/lens-selection.ts +2 -38
  58. package/src/review-api/README.md +13 -52
  59. package/src/review-api/activity.ts +4 -1
  60. package/src/review-api/agent-cli.ts +1 -9
  61. package/src/review-api/anchor-quotes.ts +7 -14
  62. package/src/review-api/ask-history.ts +51 -137
  63. package/src/review-api/authoring-tools.ts +30 -45
  64. package/src/review-api/blocks/definition.ts +1 -1
  65. package/src/review-api/blocks/markdown.ts +2 -2
  66. package/src/review-api/document-headings.ts +27 -58
  67. package/src/review-api/document-text.ts +2 -31
  68. package/src/review-api/document.ts +34 -281
  69. package/src/review-api/github-provider.ts +13 -51
  70. package/src/review-api/http.ts +123 -702
  71. package/src/review-api/instructions.ts +19 -0
  72. package/src/review-api/local-data.ts +46 -310
  73. package/src/review-api/mcp.ts +11 -3
  74. package/src/review-api/onboarding.ts +1 -1
  75. package/src/review-api/profile.ts +6 -37
  76. package/src/review-api/public-tools.ts +2 -24
  77. package/src/review-api/pull-request.ts +49 -82
  78. package/src/review-api/request-origin.ts +0 -10
  79. package/src/review-api/review-progress.ts +27 -61
  80. package/src/review-api/store-schema.ts +29 -38
  81. package/src/review-api/store.ts +478 -2142
  82. package/src/review-api/worktree-events.ts +5 -3
  83. package/src/review-api/worktree-source.ts +7 -3
  84. package/src/review-api/worktree-structural.integration.ts +0 -72
  85. package/src/review-preferences.ts +88 -0
  86. package/src/review-stack.ts +23 -15
  87. package/src/runtime.ts +30 -4
  88. package/src/server/desktop-host.ts +1 -6
  89. package/src/server/desktop-server.ts +31 -1
  90. package/src/server/headless-host.ts +2 -0
  91. package/src/server/hono-http.ts +1 -2
  92. package/src/server/legacy-tutorial-cleanup.ts +3 -2
  93. package/src/server/review-gateway-list.ts +5 -3
  94. package/src/server/review-gateway-memory.ts +1 -1
  95. package/src/server/review-lifecycle-telemetry.ts +2 -2
  96. package/src/server/review-server-core.ts +5 -1
  97. package/src/server/structural-comparisons.ts +0 -47
  98. package/src/sharing/export.ts +7 -36
  99. package/src/sharing/host.ts +14 -34
  100. package/src/sharing/import.ts +24 -156
  101. package/src/sharing/repository.ts +20 -128
  102. package/src/startup-trace.ts +3 -3
  103. package/src/stored-document-migration.ts +19 -110
  104. package/src/ui-telemetry-events.ts +11 -33
  105. package/dist/agent-cli-_YyMIMRY.js +0 -2
  106. package/dist/lens-selection-CyJapcsl.js +0 -214
  107. package/dist/profile-DJvkBJNQ.js +0 -2
  108. package/dist/runtime-Bj2tD33R.js +0 -27
  109. package/src/heading-anchors.ts +0 -42
  110. package/src/review-api/board-order.ts +0 -144
  111. package/src/review-api/checkout-groups.ts +0 -560
  112. package/src/review-api/foreign-references.ts +0 -328
  113. package/src/review-api/link-preview.ts +0 -113
  114. package/src/review-api/scratchpad-plan-upgrade.ts +0 -250
  115. package/src/review-api/store-migrations.ts +0 -357
@@ -1,7 +1,7 @@
1
- import { a as toolResultText, s as ReviewApiError } from "./agent-client-Dtc-Kn_w.js";
1
+ import { a as toolResultText, s as ReviewApiError } from "./agent-client-BOOi7EUR.js";
2
2
  import { t as ReviewInputError } from "./input-error-OLgB_h31.js";
3
- import { n as REVIEW_STATUS_TOOL, t as authoringTools } from "./authoring-tools-B7KU04f7.js";
4
- import { i as publicTool, n as RECOVERY, r as callPublicTool, t as toolFailure } from "./tool-failure-DvI-gys2.js";
3
+ import { n as REVIEW_STATUS_TOOL, t as authoringTools } from "./authoring-tools-BNwuMnz6.js";
4
+ import { i as publicTool, n as RECOVERY, r as callPublicTool, t as toolFailure } from "./tool-failure-C9MpbXJJ.js";
5
5
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
6
6
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
7
7
  import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
@@ -31,13 +31,14 @@ const RELOAD_TOOLS = "Whiteboard is running now, but this session listed Whitebo
31
31
  function mcpAuthoringGuidance(context) {
32
32
  return [
33
33
  "Whiteboard explains code in documents the user reads in Whiteboard Desktop. Call session_get_instructions before creating or editing a Whiteboard and follow it. Read session_capabilities before authoring; session_create opens the new review in Desktop when it is available, so call session_open only for an existing review, and generate software maps only when softwareMapEnabled is true. When the user asks for a Whiteboard or to use Whiteboard (for example to review a branch, a change or a pull request, or to explain a system in Whiteboard), author a Whiteboard with the default topic.",
34
+ ...context.scratchpadAvailable ? ["When the user asks in conversation to be shown how code works or wants a diagram, without asking for a Whiteboard, call session_capabilities; if it reports scratchpadEnabled and desktopAvailable, draw on the Whiteboard scratchpad rather than answering only in chat, starting with session_get_instructions({topic:\"scratchpad\"})."] : [],
34
35
  ...context.traceEnabled ? ["For why code exists, what an agent was thinking, or whether an agent solved something before, call session_get_instructions({topic:\"trace-archaeology\"})."] : [],
35
36
  "Never read or write Whiteboard files or SQL."
36
37
  ].join(" ");
37
38
  }
38
39
  async function serveReviewMcp(connect, stdin, stdout, stderr = process.stderr, traceEnabled = false, offlineStatus, onToolCall, environmentAgent) {
39
40
  const instructionsTool = {
40
- ...authoringTools(traceEnabled).find((tool) => tool.name === "review_get_instructions"),
41
+ ...authoringTools(false, traceEnabled).find((tool) => tool.name === "review_get_instructions"),
41
42
  name: "session_get_instructions"
42
43
  };
43
44
  const server = new Server({
@@ -75,7 +76,10 @@ async function serveReviewMcp(connect, stdin, stdout, stderr = process.stderr, t
75
76
  const always = [instructionsTool, REVIEW_STATUS_TOOL].map((fallback) => tools.find((tool) => tool.name === fallback.name) ?? fallback);
76
77
  return { tools: [...always, ...tools.filter((tool) => !always.includes(tool))].map(({ name, description, inputSchema }) => ({
77
78
  name,
78
- description: name === instructionsTool.name ? `${mcpAuthoringGuidance({ traceEnabled })}\n\n${description}` : description,
79
+ description: name === instructionsTool.name ? `${mcpAuthoringGuidance({
80
+ scratchpadAvailable: true,
81
+ traceEnabled
82
+ })}\n\n${description}` : description,
79
83
  inputSchema
80
84
  })) };
81
85
  });
@@ -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-D8AoCdd2.js";
2
+ import "./review-home-paths-j2BRAaNv.js";
3
3
  import { readFileSync } from "node:fs";
4
4
  import path from "node:path";
5
5
  import { fileURLToPath } from "node:url";
@@ -0,0 +1,2 @@
1
+ import { t as openReviewProfile } from "./profile-DokFw782.js";
2
+ export { openReviewProfile };
@@ -1,6 +1,6 @@
1
- import { a as projectOfCheckout, g as CheckoutGroups, o as groupCheckoutsAhead, s as initializeReviewStoreSchema, t as openLocalReviewStore } from "./local-data-Cpl4ENbJ.js";
2
- import "./review-home-paths-D8AoCdd2.js";
3
- import { j as withFileLock } from "./s3-config-CjcLyFV5.js";
1
+ import { o as initializeReviewStoreSchema, t as openLocalReviewStore } from "./local-data-D_9tvdsp.js";
2
+ import "./review-home-paths-j2BRAaNv.js";
3
+ import { j as withFileLock } from "./s3-config-BTO12tCC.js";
4
4
  import { access, mkdir } from "node:fs/promises";
5
5
  import path from "node:path";
6
6
  import { DatabaseSync } from "node:sqlite";
@@ -18,11 +18,7 @@ async function openReviewProfile(home, options) {
18
18
  });
19
19
  const outcome = await withFileLock(path.join(home, ".review-profile-startup"), lockOptions, async () => {
20
20
  for (const source of [path.join(home, "review-server", "reviews.db"), path.join(home, "reviews.db")]) await importHeadlessStore(home, source);
21
- const database = path.join(home, "review-api.db");
22
- return openLocalReviewStore(database, {
23
- ...options,
24
- checkoutOwners: await groupCheckoutsAhead(database)
25
- });
21
+ return openLocalReviewStore(path.join(home, "review-api.db"), options);
26
22
  });
27
23
  if (!outcome.acquired) throw new Error("Another Review process is initializing this profile. Retry shortly.");
28
24
  return outcome.result;
@@ -49,27 +45,19 @@ async function importHeadlessStore(home, source) {
49
45
  try {
50
46
  if (database.prepare("SELECT 1 FROM headless.reviews s JOIN reviews t ON s.id=t.id LIMIT 1").get()) throw new Error(`Cannot merge ${source}: the shared store already contains one of its review IDs. Both databases are unchanged.`);
51
47
  database.exec(`
52
- INSERT INTO repositories(id,path,name) SELECT s.id,s.path,s.name FROM headless.repositories s WHERE NOT EXISTS (SELECT 1 FROM repositories t WHERE t.path=s.path);
48
+ INSERT INTO repositories SELECT s.* FROM headless.repositories s WHERE NOT EXISTS (SELECT 1 FROM repositories t WHERE t.path=s.path);
53
49
  CREATE TEMP TABLE repository_ids AS SELECT s.id old_id,t.id new_id FROM headless.repositories s JOIN repositories t ON s.path=t.path;
54
50
  `);
55
51
  if (database.prepare(`SELECT 1 FROM headless.versions s LEFT JOIN repository_ids r ON json_extract(s.snapshot,'$.pins.repositoryId')=r.old_id WHERE r.old_id IS NULL LIMIT 1`).get()) throw new Error(`Cannot merge ${source}: a version refers to an unregistered repository. Both databases are unchanged.`);
56
52
  if (database.prepare(`SELECT 1 FROM headless.resources s JOIN resources t ON s.id=t.id JOIN repository_ids r ON s.repository_id=r.old_id
57
53
  WHERE t.repository_id!=r.new_id OR t.kind!=s.kind OR t.mime_type!=s.mime_type OR t.data IS NOT s.data LIMIT 1`).get()) throw new Error(`Cannot merge ${source}: a resource ID has different content. Both databases are unchanged.`);
58
- if (database.prepare("SELECT 1 FROM pragma_table_info('reviews') WHERE name='project_id'").get()) {
59
- const groups = new CheckoutGroups(database);
60
- for (const { new_id: repositoryId } of database.prepare("SELECT new_id FROM repository_ids").all()) projectOfCheckout(database, String(repositoryId), groups);
61
- database.exec(`INSERT INTO reviews(id,version,next_id,project_id) SELECT s.id,s.version,s.next_id,p.project_id
62
- FROM headless.reviews s JOIN headless.versions v ON v.review_id=s.id AND v.version=s.version
63
- JOIN repository_ids r ON json_extract(v.snapshot,'$.pins.repositoryId')=r.old_id
64
- JOIN repositories p ON p.id=r.new_id;`);
65
- } else database.exec("INSERT INTO reviews(id,version,next_id) SELECT id,version,next_id FROM headless.reviews;");
66
54
  database.exec(`
67
55
  INSERT OR IGNORE INTO resources SELECT s.id,r.new_id,s.kind,s.mime_type,s.data FROM headless.resources s JOIN repository_ids r ON s.repository_id=r.old_id;
68
- INSERT INTO versions(review_id,version,snapshot,thread_id,author_kind) SELECT s.review_id,s.version,
56
+ INSERT INTO reviews SELECT * FROM headless.reviews;
57
+ INSERT INTO versions SELECT s.review_id,s.version,
69
58
  CASE WHEN json_type(s.snapshot,'$.target')='object'
70
59
  THEN json_set(s.snapshot,'$.pins.repositoryId',r.new_id,'$.target.repositoryId',r.new_id)
71
- ELSE json_set(s.snapshot,'$.pins.repositoryId',r.new_id) END,
72
- NULL, NULL
60
+ ELSE json_set(s.snapshot,'$.pins.repositoryId',r.new_id) END
73
61
  FROM headless.versions s JOIN repository_ids r ON json_extract(s.snapshot,'$.pins.repositoryId')=r.old_id;
74
62
  INSERT INTO review_attention SELECT * FROM headless.review_attention;
75
63
  `);
@@ -1,7 +1,7 @@
1
- import { i as readReviewPackageVersion } from "./package-paths-BWxO-UEL.js";
2
- import { a as readReviewServerHealth, l as serverNotReady } from "./server-discovery-CKjw3-6h.js";
3
- import { c as stopBackgroundServer, o as recordedBackgroundServer, r as ensureBackgroundServer } from "./background-server-C03RKxKS.js";
4
- import { t as ensureRemoteLanguageServer } from "./remote-language-server-BXk87KCr.js";
1
+ import { i as readReviewPackageVersion } from "./package-paths-C--__jEv.js";
2
+ import { a as readReviewServerHealth, l as serverNotReady } from "./server-discovery-Bey8IqXH.js";
3
+ import { c as stopBackgroundServer, o as recordedBackgroundServer, r as ensureBackgroundServer } from "./background-server-CkvxA-6O.js";
4
+ import { t as ensureRemoteLanguageServer } from "./remote-language-server-BTKBQ7x4.js";
5
5
  import path from "node:path";
6
6
  import { spawn } from "node:child_process";
7
7
  import { gt, valid } from "semver";
@@ -1,7 +1,7 @@
1
1
  import { u as parseJsonText } from "./src-X9phtB2j.js";
2
- import "./review-home-paths-D8AoCdd2.js";
3
- import { N as devReviewHome } from "./s3-config-CjcLyFV5.js";
4
- import { t as findReviewPackageRoot } from "./package-paths-BWxO-UEL.js";
2
+ import "./review-home-paths-j2BRAaNv.js";
3
+ import { N as devReviewHome } from "./s3-config-BTO12tCC.js";
4
+ import { t as findReviewPackageRoot } from "./package-paths-C--__jEv.js";
5
5
  import { createHash } from "node:crypto";
6
6
  import { z } from "zod";
7
7
  import { createReadStream, createWriteStream } from "node:fs";
@@ -1,2 +1,2 @@
1
- import { t as ensureRemoteExtensions } from "./remote-extensions-CNXwqK0D.js";
1
+ import { t as ensureRemoteExtensions } from "./remote-extensions-Blcjr9Ze.js";
2
2
  export { ensureRemoteExtensions };
@@ -1,8 +1,8 @@
1
- import "./review-home-paths-D8AoCdd2.js";
2
- import { A as processStartIdentity, j as withFileLock } from "./s3-config-CjcLyFV5.js";
3
- import { t as findReviewPackageRoot } from "./package-paths-BWxO-UEL.js";
4
- import { n as cliSpawn, s as spawnDetached } from "./background-server-C03RKxKS.js";
5
- import { r as remoteServerPaths, t as ensureRemoteExtensions } from "./remote-extensions-CNXwqK0D.js";
1
+ import "./review-home-paths-j2BRAaNv.js";
2
+ import { A as processStartIdentity, j as withFileLock } from "./s3-config-BTO12tCC.js";
3
+ import { t as findReviewPackageRoot } from "./package-paths-C--__jEv.js";
4
+ import { n as cliSpawn, s as spawnDetached } from "./background-server-CkvxA-6O.js";
5
+ import { r as remoteServerPaths, t as ensureRemoteExtensions } from "./remote-extensions-Blcjr9Ze.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_WRAPPER_MARK, S as REVIEW_REMOTE_INSTALL_LOCK } from "./src-BiWNbcF_.js";
2
- import "./review-home-paths-D8AoCdd2.js";
3
- import { M as DEV_REVIEW_HOME_ENV } from "./s3-config-CjcLyFV5.js";
4
- import { c as stopBackgroundServer, o as recordedBackgroundServer } from "./background-server-C03RKxKS.js";
5
- import { i as whiteboardRemoteHome } from "./remote-extensions-CNXwqK0D.js";
6
- import { n as remoteLanguageServerGroups, r as stopProcessGroup } from "./remote-language-server-BXk87KCr.js";
1
+ import { b as REVIEW_REMOTE_INSTALL_LOCK, x as REVIEW_REMOTE_WRAPPER_MARK } from "./src-DsM3jO8G.js";
2
+ import "./review-home-paths-j2BRAaNv.js";
3
+ import { M as DEV_REVIEW_HOME_ENV } from "./s3-config-BTO12tCC.js";
4
+ import { c as stopBackgroundServer, o as recordedBackgroundServer } from "./background-server-CkvxA-6O.js";
5
+ import { i as whiteboardRemoteHome } from "./remote-extensions-Blcjr9Ze.js";
6
+ import { n as remoteLanguageServerGroups, r as stopProcessGroup } from "./remote-language-server-BTKBQ7x4.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,6 @@
1
1
  import { a as jsonNumber, c as jsonString, i as jsonBoolean, n as isJsonObject } from "./src-X9phtB2j.js";
2
- import { _ as REVIEW_DIFF_LAYOUT_SCOPES, g as REVIEW_DIFF_LAYOUTS, w as REVIEW_THEME_CHOICES } from "./src-BiWNbcF_.js";
3
- import { t as SELECTION_UNAVAILABLE_REASONS } from "./lens-selection-CyJapcsl.js";
4
- import { n as askAgentIds } from "./thread-state-Do5LX10I.js";
2
+ import { S as REVIEW_THEME_CHOICES, h as REVIEW_DIFF_LAYOUT_SCOPES, m as REVIEW_DIFF_LAYOUTS } from "./src-DsM3jO8G.js";
3
+ import { n as askAgentIds } from "./thread-state-5pYr6_zM.js";
5
4
  import { z } from "zod";
6
5
  //#region src/telemetry-clean-text.ts
7
6
  const USER_DATA_REGEXES = [
@@ -156,12 +155,6 @@ const PEEK_VIA = [
156
155
  "diff_definition"
157
156
  ];
158
157
  const PEEK_ROOT_KIND = ["range"];
159
- /** `unresolved`: progress finished without this selection; `error`: progress failed. */
160
- const PEEK_FAILURE_REASON = [
161
- ...SELECTION_UNAVAILABLE_REASONS,
162
- "error",
163
- "unresolved"
164
- ];
165
158
  const LSP_FEATURE = [
166
159
  "hover",
167
160
  "goto_definition",
@@ -231,6 +224,7 @@ const SETTING_NAME = [
231
224
  "telemetry_enabled",
232
225
  "keymap",
233
226
  "software_map_enabled",
227
+ "scratchpad_enabled",
234
228
  "diffr_config",
235
229
  "theme",
236
230
  "ctrl_tab",
@@ -244,11 +238,11 @@ const REVIEW_OPENED_VIA = [
244
238
  "cli",
245
239
  "other"
246
240
  ];
247
- /** Where a review's source comes from: its target's kind. */
241
+ /** Where a review's source comes from: its target's kind, or the one scratchpad. */
248
242
  const SESSION_SOURCE_KIND = [
249
243
  "worktree",
250
244
  "commits",
251
- "project"
245
+ "scratchpad"
252
246
  ];
253
247
  /**
254
248
  * The authoring agent a review session is attributed to. This is the one
@@ -330,21 +324,12 @@ const INSTALL_LOCATION = [
330
324
  ];
331
325
  const DIFF_OPENED_VIA = [
332
326
  "topbar",
333
- "sidebar",
334
327
  "lens",
335
328
  "locate",
336
329
  "file_picker"
337
330
  ];
338
331
  /** Which diff opened: a commit's, or a file diff drawn plain or structural. */
339
332
  const DIFF_OPENED_KIND = ["commit", "structural"];
340
- const DIFF_FAILED_REASON = [
341
- "missing_binary",
342
- "process_exit",
343
- "stream_ended",
344
- "aborted",
345
- "file_error",
346
- "other"
347
- ];
348
333
  /** GitHub Enterprise is any GitHub host but github.com. */
349
334
  const PR_PROVIDER = [
350
335
  "github",
@@ -371,12 +356,7 @@ const ONBOARDING_STEP = [
371
356
  "run"
372
357
  ];
373
358
  const RUN_MODE = ["draw", "copy"];
374
- const NEW_WHITEBOARD_VIA = [
375
- "button",
376
- "command",
377
- "sidebar"
378
- ];
379
- const NEW_WHITEBOARD_MODE = [...RUN_MODE, "empty"];
359
+ const NEW_WHITEBOARD_VIA = ["button", "command"];
380
360
  const FIND_SURFACE = ["review", "diff"];
381
361
  const DISCORD_VIA = [
382
362
  "topbar",
@@ -697,12 +677,9 @@ const UI_TELEMETRY_EVENTS = {
697
677
  via: DIFF_OPENED_VIA
698
678
  }
699
679
  },
700
- diff_failed: {
701
- event: "review_diff_failed",
702
- properties: {
703
- reason: DIFF_FAILED_REASON,
704
- files: "number"
705
- }
680
+ scratchpad_opened: {
681
+ event: "review_scratchpad_opened",
682
+ properties: {}
706
683
  },
707
684
  discord_clicked: {
708
685
  event: "review_discord_clicked",
@@ -722,10 +699,7 @@ const UI_TELEMETRY_EVENTS = {
722
699
  },
723
700
  peek_resolve_failed: {
724
701
  event: "review_peek_resolve_failed",
725
- properties: {
726
- root_kind: PEEK_ROOT_KIND,
727
- reason: PEEK_FAILURE_REASON
728
- }
702
+ properties: { root_kind: PEEK_ROOT_KIND }
729
703
  },
730
704
  review_deleted: {
731
705
  event: "review_review_deleted",
@@ -770,7 +744,7 @@ const UI_TELEMETRY_EVENTS = {
770
744
  new_whiteboard_started: {
771
745
  event: "review_new_whiteboard_started",
772
746
  properties: {
773
- mode: NEW_WHITEBOARD_MODE,
747
+ mode: RUN_MODE,
774
748
  embedded: "boolean",
775
749
  agent: askAgentIds
776
750
  }
@@ -908,13 +882,6 @@ function isValidReviewAppSessionId(value) {
908
882
  */
909
883
  const REVIEW_VIA_HEADER = "x-review-via";
910
884
  const REVIEW_AGENT_HEADER = "x-review-agent";
911
- /** The Ask thread a request comes from. The CLI reads it from ASK_THREAD_ENV,
912
- * which Desktop sets for the thread's agent. */
913
- const REVIEW_THREAD_HEADER = "x-review-thread";
914
- const ASK_THREAD_ENV = "DEV_REVIEW_ASK_THREAD";
915
- /** Set by Desktop and the canvas on a command a person gave, such as a new
916
- * board from the sidebar; its version is credited to them. */
917
- const REVIEW_PERSON_HEADER = "x-review-person";
918
885
  const viaSchema = z.enum([
919
886
  "api",
920
887
  "mcp",
@@ -930,4 +897,4 @@ function reviewRequestOrigin(headers) {
930
897
  } : { via };
931
898
  }
932
899
  //#endregion
933
- export { REVIEW_VIA_HEADER as a, REVIEW_APP_SESSION_ID_HEADER as c, sanitizeUiTelemetryEvent as d, cleanTelemetryText as f, REVIEW_THREAD_HEADER as i, REVIEW_TELEMETRY_TABS as l, REVIEW_AGENT_HEADER as n, reviewRequestOrigin as o, REVIEW_PERSON_HEADER as r, BUNDLE_FRAME_PATTERN as s, ASK_THREAD_ENV as t, isReportableCleanedMessage as u };
900
+ export { REVIEW_APP_SESSION_ID_HEADER as a, sanitizeUiTelemetryEvent as c, BUNDLE_FRAME_PATTERN as i, cleanTelemetryText as l, REVIEW_VIA_HEADER as n, REVIEW_TELEMETRY_TABS as o, reviewRequestOrigin as r, isReportableCleanedMessage as s, REVIEW_AGENT_HEADER as t };
@@ -1,5 +1,5 @@
1
- import { o as parseReviewVerbResponse } from "./src-BiWNbcF_.js";
2
- import { b as selectReviewInstance, m as healthyReviewInstance, v as reviewInstanceStartHint, y as reviewInstanceUnavailable } from "./server-discovery-CKjw3-6h.js";
1
+ import { o as parseReviewVerbResponse } from "./src-DsM3jO8G.js";
2
+ import { b as selectReviewInstance, m as healthyReviewInstance, v as reviewInstanceStartHint, y as reviewInstanceUnavailable } from "./server-discovery-Bey8IqXH.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";
@@ -1,7 +1,7 @@
1
- import { E as runVcs, d as git, f as gitAt, x as resolveRepoContext } from "./src-WPaQn75m.js";
1
+ import { d as git, f as gitAt, y as resolveRepoContext } from "./src-BMPuxWv4.js";
2
2
  import { a as jsonNumber, c as jsonString, i as jsonBoolean, m as isStringValue, n as isJsonObject, o as jsonObject, r as jsonArray, t as isJsonArray, u as parseJsonText } from "./src-X9phtB2j.js";
3
3
  import { a as TRACE_STORE_CLIENT_ID, b as commitShaSchema, c as deleteStoreResponseSchema, d as listUploadsResponseSchema, f as storeErrorCodeSchema, g as uploadManifestMismatch, h as traceObjectNameSchema, i as storeRoutes, l as listSessionsResponseSchema, m as storeResponseSchema, n as DEVICE_TOKEN_PATH, o as beginUploadResponseSchema, p as storeErrorEnvelopeSchema, r as SESSION_PATH, s as completeUploadResponseSchema, t as DEVICE_CODE_PATH, u as listUploadsQuerySchema, x as sessionIdSchema } from "./src-CGP5ytbV.js";
4
- import { E as writeTraceConfigFile, F as writeFileAtomic, I as writeFileAtomicAsync, L as writePrivateJsonAtomic, N as devReviewHome, P as normalizeStoreOrigin, S as readTraceConfigFile, _ as emptyTraceConfig, b as hostedCaptureEnabled, c as resolveS3Setup, d as traceEnvPath, f as traceEnvValue$1, g as currentStore, h as TraceConfigurationError, i as isS3MockMode, l as s3CacheIdentity, m as DEFAULT_HOSTED_ORIGIN, n as clearTraceEnvCache$1, p as traceSettingsPath, u as s3MockRoot, v as enabledOriginsOf, w as s3Store, x as hostedOrigin, y as hasHostedStore } from "./s3-config-CjcLyFV5.js";
4
+ import { E as writeTraceConfigFile, F as writeFileAtomic, I as writeFileAtomicAsync, L as writePrivateJsonAtomic, N as devReviewHome, P as normalizeStoreOrigin, S as readTraceConfigFile, _ as emptyTraceConfig, b as hostedCaptureEnabled, c as resolveS3Setup, d as traceEnvPath, f as traceEnvValue$1, g as currentStore, h as TraceConfigurationError, i as isS3MockMode, l as s3CacheIdentity, m as DEFAULT_HOSTED_ORIGIN, n as clearTraceEnvCache$1, p as traceSettingsPath, u as s3MockRoot, v as enabledOriginsOf, w as s3Store, x as hostedOrigin, y as hasHostedStore } from "./s3-config-BTO12tCC.js";
5
5
  import { t as errorMessage } from "./error-message-OtiDonty.js";
6
6
  import crypto, { createHash, randomBytes } from "node:crypto";
7
7
  import { z } from "zod";
@@ -9,7 +9,8 @@ import { accessSync, closeSync, constants, createReadStream, createWriteStream,
9
9
  import { chmod, mkdir, mkdtemp, readFile, readdir, rename, rm, stat, writeFile } from "node:fs/promises";
10
10
  import path from "node:path";
11
11
  import os, { homedir, tmpdir } from "node:os";
12
- import { spawn } from "node:child_process";
12
+ import { execFile, spawn } from "node:child_process";
13
+ import { promisify } from "node:util";
13
14
  import { Readable, Transform } from "node:stream";
14
15
  import { AsyncLocalStorage } from "node:async_hooks";
15
16
  import { pipeline } from "node:stream/promises";
@@ -400,18 +401,14 @@ async function runStoreLogin(input) {
400
401
  } catch (error) {
401
402
  return failWithJsonError(output, "login", error instanceof StoreApiError ? error.message : "Could not start the login.");
402
403
  }
403
- const pending = {
404
- url: device.verification_uri_complete,
405
- userCode: device.user_code
406
- };
407
404
  humanStream(output).write(`Open ${device.verification_uri_complete}\n`);
408
405
  humanStream(output).write(`Code: ${device.user_code}\n`);
409
406
  emitJsonEvent(output, {
410
407
  event: "login",
411
408
  status: "pending",
412
- ...pending
409
+ url: device.verification_uri_complete,
410
+ userCode: device.user_code
413
411
  });
414
- input.onDeviceCode?.(pending);
415
412
  if (!input.noBrowser) await openUrl(device.verification_uri_complete);
416
413
  let intervalMs = Math.max(1, device.interval) * 1e3;
417
414
  const expiresAt = Date.now() + device.expires_in * 1e3;
@@ -2540,7 +2537,7 @@ function isTraceStorageConfigured(scope = {}) {
2540
2537
  }
2541
2538
  /** Loads the direct-store implementation on demand, without opening a store. */
2542
2539
  async function loadS3TraceStorage() {
2543
- return (await import("./s3-CsG2EWED.js")).S3TraceStorage;
2540
+ return (await import("./s3-DtJFWC0G.js")).S3TraceStorage;
2544
2541
  }
2545
2542
  //#endregion
2546
2543
  //#region ../trace-core/src/trace-upload-status.ts
@@ -5266,7 +5263,7 @@ async function configureTraceMachine(input) {
5266
5263
  if (input.verify !== false) {
5267
5264
  if (env.TRACE_R2_MODE === "mock") verifiedAt = (/* @__PURE__ */ new Date()).toISOString();
5268
5265
  else {
5269
- const { S3TraceStorage } = await import("./s3-CsG2EWED.js");
5266
+ const { S3TraceStorage } = await import("./s3-DtJFWC0G.js");
5270
5267
  const readiness = await S3TraceStorage.fromCredentials({
5271
5268
  endpoint: credentials.endpoint,
5272
5269
  bucket: credentials.bucket,
@@ -5400,6 +5397,7 @@ async function writeSettings(filePath, settings) {
5400
5397
  }
5401
5398
  //#endregion
5402
5399
  //#region ../trace-core/src/trace-hook-runner.ts
5400
+ const execFileAsync = promisify(execFile);
5403
5401
  const SESSION_ID_REGEX = /^[A-Za-z0-9][A-Za-z0-9._-]{7,127}$/;
5404
5402
  /**
5405
5403
  * Starts `whiteboard trace sync` detached for one session. The attempt names
@@ -5481,7 +5479,7 @@ async function runTraceHook(input) {
5481
5479
  ], { allowFailure: true });
5482
5480
  let sessionFilePath = null;
5483
5481
  if (gitPathResult.ok && gitPathResult.stdout.trim()) sessionFilePath = gitPathResult.stdout.trim();
5484
- const jjRootResult = await runVcs("jj", ["root"], { cwd: input.cwd }).catch(() => null);
5482
+ const jjRootResult = await execFileAsync("jj", ["root"], { cwd: input.cwd }).catch(() => null);
5485
5483
  if (!sessionFilePath && jjRootResult?.stdout.trim()) sessionFilePath = path.join(jjRootResult.stdout.trim(), ".jj", "agent-session");
5486
5484
  let remainingSessions = [];
5487
5485
  if (sessionFilePath) {
@@ -5500,24 +5498,24 @@ async function runTraceHook(input) {
5500
5498
  if (jjRootResult?.stdout.trim()) {
5501
5499
  if ((isStart || isHeartbeat) && remainingSessions.length > 0) {
5502
5500
  const templateVal = jjCommitTrailersConfigValue(remainingSessions);
5503
- await runVcs("jj", [
5501
+ await execFileAsync("jj", [
5504
5502
  "config",
5505
5503
  "set",
5506
5504
  "--repo",
5507
5505
  "templates.commit_trailers",
5508
- { value: templateVal }
5506
+ templateVal
5509
5507
  ], { cwd: input.cwd }).catch(() => void 0);
5510
5508
  } else if (isEnd) {
5511
5509
  if (remainingSessions.length > 0) {
5512
5510
  const templateVal = jjCommitTrailersConfigValue(remainingSessions);
5513
- await runVcs("jj", [
5511
+ await execFileAsync("jj", [
5514
5512
  "config",
5515
5513
  "set",
5516
5514
  "--repo",
5517
5515
  "templates.commit_trailers",
5518
- { value: templateVal }
5516
+ templateVal
5519
5517
  ], { cwd: input.cwd }).catch(() => void 0);
5520
- } else await runVcs("jj", [
5518
+ } else await execFileAsync("jj", [
5521
5519
  "config",
5522
5520
  "unset",
5523
5521
  "--repo",
@@ -5736,7 +5734,7 @@ async function runTraceStatus(input) {
5736
5734
  input.stderr.write("Upload status filters require hosted storage.\n");
5737
5735
  return 1;
5738
5736
  }
5739
- const [{ S3TraceStorage }, { describeS3Setup, noTraceConfigurationMessage }] = await Promise.all([import("./s3-CsG2EWED.js"), import("./s3-config-zz4GWh2T.js")]);
5737
+ const [{ S3TraceStorage }, { describeS3Setup, noTraceConfigurationMessage }] = await Promise.all([import("./s3-DtJFWC0G.js"), import("./s3-config-CSy3fx8H.js")]);
5740
5738
  const setup = describeS3Setup(input.scope.env);
5741
5739
  input.stdout.write(`Checking trace configuration (${setup.envPath})…\n`);
5742
5740
  for (const failure of await listTraceSyncFailures(input.scope.devHome)) input.stdout.write(describeTraceSyncFailure(failure));
@@ -6403,4 +6401,4 @@ function reviewDesktopStateDir(env = process.env) {
6403
6401
  return path.join(reviewDesktopRoot(env), "state");
6404
6402
  }
6405
6403
  //#endregion
6406
- export { resolveTraceCommand as $, runTraceDeny as A, TraceStorageDeniedError as B, disableTraceMachine as C, listReviewTraceSessions as D, traceMachineStatus as E, describeSelection as F, listTraceRepositoryRoots as G, resolveTraceRepositoryTarget as H, isTraceStorageConfigured as I, HOSTED_CAPTURE_SCOPE_DESCRIPTION as J, traceRepositoryStatus as K, loadS3TraceStorage as L, runTraceSessions as M, runTraceStoreDelete as N, loadReviewAgentTrace as O, runTraceStoreInfo as P, removeAgentTraceHook as Q, resolveTraceStorage as R, configureTraceMachine as S, traceMachineEnabled as T, disableAllTraceRepositories as U, requireTraceConsent as V, enableTraceRepository as W, describeTraceHookOwners as X, AGENT_TRACE_HOOK_AGENTS as Y, installHarnessHooks as Z, runTraceRepair as _, reviewInstancesDir as a, readStoreAuth as at, runTraceGitHook as b, registerTraceCommands as c, runStoreWhoami as ct, runTraceList as d, withStoreAuthorization as dt, shellQuote as et, runTracePull as f, emitJsonEvent as ft, runTraceInstallMachine as g, runTraceEnable as h, jsonRequestedInArgv as ht, reviewInstanceDiscoveryPath as i, clearStoreAuth as it, runTraceOnboard as j, runTraceAllow as k, resolveTraceReadStorage as l, StoreApiError as lt, runTraceDisable as m, humanStream as mt, reviewDesktopStateDir as n, traceScope as nt, reviewLegacyDiscoveryPath as o, runStoreLogin as ot, runTraceShow as p, failWithJsonError as pt, readTraceUserConfig as q, reviewDevInstanceKey as r, DEFAULT_STORE_ORIGIN as rt, safeStorageSegment as s, runStoreLogout as st, reviewDefaultInstancePath as t, traceHomeDir as tt, runTraceBlame as u, StoreClient as ut, runTraceStatus as v, readLegacyCaptureSettings as w, runTraceHook as x, runTraceSync as y, selectTraceStorage as z };
6404
+ export { resolveTraceCommand as $, runTraceDeny as A, TraceStorageDeniedError as B, disableTraceMachine as C, listReviewTraceSessions as D, traceMachineStatus as E, describeSelection as F, listTraceRepositoryRoots as G, resolveTraceRepositoryTarget as H, isTraceStorageConfigured as I, HOSTED_CAPTURE_SCOPE_DESCRIPTION as J, traceRepositoryStatus as K, loadS3TraceStorage as L, runTraceSessions as M, runTraceStoreDelete as N, loadReviewAgentTrace as O, runTraceStoreInfo as P, removeAgentTraceHook as Q, resolveTraceStorage as R, configureTraceMachine as S, traceMachineEnabled as T, disableAllTraceRepositories as U, requireTraceConsent as V, enableTraceRepository as W, describeTraceHookOwners as X, AGENT_TRACE_HOOK_AGENTS as Y, installHarnessHooks as Z, runTraceRepair as _, reviewInstancesDir as a, openUrlInBrowser as at, runTraceGitHook as b, registerTraceCommands as c, runStoreLogout as ct, runTraceList as d, StoreClient as dt, shellQuote as et, runTracePull as f, withStoreAuthorization as ft, runTraceInstallMachine as g, jsonRequestedInArgv as gt, runTraceEnable as h, humanStream as ht, reviewInstanceDiscoveryPath as i, clearStoreAuth as it, runTraceOnboard as j, runTraceAllow as k, resolveTraceReadStorage as l, runStoreWhoami as lt, runTraceDisable as m, failWithJsonError as mt, reviewDesktopStateDir as n, traceScope as nt, reviewLegacyDiscoveryPath as o, readStoreAuth as ot, runTraceShow as p, emitJsonEvent as pt, readTraceUserConfig as q, reviewDevInstanceKey as r, DEFAULT_STORE_ORIGIN as rt, safeStorageSegment as s, runStoreLogin as st, reviewDefaultInstancePath as t, traceHomeDir as tt, runTraceBlame as u, StoreApiError as ut, runTraceStatus as v, readLegacyCaptureSettings as w, runTraceHook as x, runTraceSync as y, selectTraceStorage as z };
@@ -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-BiWNbcF_.js";
3
- import "./review-home-paths-D8AoCdd2.js";
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-BWxO-UEL.js";
6
- import "./request-origin-B9qCPiVB.js";
2
+ import "./src-DsM3jO8G.js";
3
+ import "./review-home-paths-j2BRAaNv.js";
4
+ import { F as writeFileAtomic, N as devReviewHome, j as withFileLock, k as processIsAlive } from "./s3-config-BTO12tCC.js";
5
+ import { i as readReviewPackageVersion, t as findReviewPackageRoot } from "./package-paths-C--__jEv.js";
6
+ import "./request-origin-Zcn_CjX4.js";
7
7
  import { createHmac, randomUUID } from "node:crypto";
8
8
  import { z } from "zod";
9
9
  import { existsSync, readFileSync, rmSync } from "node:fs";
@@ -0,0 +1,52 @@
1
+ import path from "node:path";
2
+ import { spawn } from "node:child_process";
3
+ //#region src/runtime.ts
4
+ async function resolveReviewRoot(cwd, execFile = execFilePromise) {
5
+ const initialCwd = path.resolve(cwd);
6
+ try {
7
+ const { stdout } = await execFile("jj", ["root"], { cwd: initialCwd });
8
+ const root = stdout.trim();
9
+ if (root) return path.resolve(root);
10
+ } catch {}
11
+ try {
12
+ const { stdout } = await execFile("git", [
13
+ "-C",
14
+ initialCwd,
15
+ "rev-parse",
16
+ "--show-toplevel"
17
+ ]);
18
+ const root = stdout.trim();
19
+ if (root) return path.resolve(root);
20
+ } catch {}
21
+ return initialCwd;
22
+ }
23
+ function execFilePromise(file, args, options = {}) {
24
+ return execFileUntraced(file, args, options);
25
+ }
26
+ function execFileUntraced(file, args, options = {}) {
27
+ return new Promise((resolve, reject) => {
28
+ const child = spawn(file, args, {
29
+ cwd: options.cwd,
30
+ stdio: [
31
+ "ignore",
32
+ "pipe",
33
+ "pipe"
34
+ ]
35
+ });
36
+ let stdout = "";
37
+ let stderr = "";
38
+ child.stdout?.on("data", (chunk) => {
39
+ stdout += String(chunk);
40
+ });
41
+ child.stderr?.on("data", (chunk) => {
42
+ stderr += String(chunk);
43
+ });
44
+ child.on("error", reject);
45
+ child.on("exit", (code) => {
46
+ if (code === 0) resolve({ stdout });
47
+ else reject(new Error(stderr.trim() || `${file} exited with ${code}`));
48
+ });
49
+ });
50
+ }
51
+ //#endregion
52
+ export { resolveReviewRoot as t };
package/dist/runtime.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  //#region src/runtime.d.ts
2
2
  declare function resolveReviewRoot(cwd: string, execFile?: typeof execFilePromise): Promise<string>;
3
- declare function execFilePromise(file: "git" | "jj", args: string[], options?: {
3
+ declare function execFilePromise(file: string, args: string[], options?: {
4
4
  cwd?: string;
5
5
  }): Promise<{
6
6
  stdout: string;
package/dist/runtime.js CHANGED
@@ -1,2 +1,2 @@
1
- import { t as resolveReviewRoot } from "./runtime-Bj2tD33R.js";
1
+ import { t as resolveReviewRoot } from "./runtime-CKiWhGrf.js";
2
2
  export { resolveReviewRoot };
@@ -1,6 +1,6 @@
1
1
  import { a as jsonNumber, c as jsonString, o as jsonObject, r as jsonArray, u as parseJsonText } from "./src-X9phtB2j.js";
2
2
  import { S as sessionMetaSchema, b as commitShaSchema, y as byCommitSchema } from "./src-CGP5ytbV.js";
3
- import { i as isS3MockMode, l as s3CacheIdentity, s as resolveS3Credentials, u as s3MockRoot } from "./s3-config-CjcLyFV5.js";
3
+ import { i as isS3MockMode, l as s3CacheIdentity, s as resolveS3Credentials, u as s3MockRoot } from "./s3-config-BTO12tCC.js";
4
4
  import { t as errorMessage } from "./error-message-OtiDonty.js";
5
5
  import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
6
6
  import path from "node:path";
@@ -169,13 +169,11 @@ const DEV_REVIEW_HOME_ENV = "DEV_REVIEW_HOME";
169
169
  * The one resolver for the Review home directory. Every reader of
170
170
  * DEV_REVIEW_HOME calls this, so an untrimmed or empty value cannot make two
171
171
  * modules disagree about the directory. An empty value means "use the
172
- * default", which is ~/.dev-preview for preview.
172
+ * default".
173
173
  */
174
174
  function devReviewHome(env = process.env, homeDir = os.homedir()) {
175
175
  const override = env[DEV_REVIEW_HOME_ENV]?.trim();
176
- if (override) return path.resolve(override);
177
- const channel = env.DEV_FAST_REVIEW_CHANNEL?.trim() || env.DEV_REVIEW_INSTANCE?.trim();
178
- return path.join(homeDir, channel === "preview" ? ".dev-preview" : ".dev");
176
+ return override ? path.resolve(override) : path.join(homeDir, ".dev");
179
177
  }
180
178
  //#endregion
181
179
  //#region ../trace-core/src/with-file-lock.ts
@@ -1,2 +1,2 @@
1
- import { a as noTraceConfigurationMessage, c as resolveS3Setup, d as traceEnvPath, f as traceEnvValue, i as isS3MockMode, l as s3CacheIdentity, n as clearTraceEnvCache, o as readTraceEnvFile, p as traceSettingsPath, r as describeS3Setup, s as resolveS3Credentials, t as S3_DEFAULT_REGION, u as s3MockRoot } from "./s3-config-CjcLyFV5.js";
1
+ import { a as noTraceConfigurationMessage, c as resolveS3Setup, d as traceEnvPath, f as traceEnvValue, i as isS3MockMode, l as s3CacheIdentity, n as clearTraceEnvCache, o as readTraceEnvFile, p as traceSettingsPath, r as describeS3Setup, s as resolveS3Credentials, t as S3_DEFAULT_REGION, u as s3MockRoot } from "./s3-config-BTO12tCC.js";
2
2
  export { S3_DEFAULT_REGION, clearTraceEnvCache, describeS3Setup, isS3MockMode, noTraceConfigurationMessage, readTraceEnvFile, resolveS3Credentials, resolveS3Setup, s3CacheIdentity, s3MockRoot, traceEnvPath, traceEnvValue, traceSettingsPath };