@dev.fast/whiteboard 0.3.5-preview.20261020.130 → 0.3.5-preview.20261021.133

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 (69) hide show
  1. package/dist/{account-alias-CMyXCuuq.js → account-alias-BRRpaO9U.js} +4 -4
  2. package/dist/{agent-cli-CahKfDT0.js → agent-cli-CFX3bHJV.js} +8 -8
  3. package/dist/agent-cli-D2P4EoAk.js +2 -0
  4. package/dist/{agent-client-D2RmE9NL.js → agent-client-H53ajvrm.js} +3 -3
  5. package/dist/{authoring-tools-BLhYKrNN.js → authoring-tools-BCquUsB3.js} +4 -4
  6. package/dist/{background-server-CFUU4VtN.js → background-server-BSYXD9au.js} +1 -1
  7. package/dist/{background-server-k4K_Hvh1.js → background-server-Xom8cA_u.js} +4 -4
  8. package/dist/build-info.json +1 -1
  9. package/dist/{cli-BUVSMGud.js → cli-BOnV4cCh.js} +1 -1
  10. package/dist/{cli-runner-C7W6VA94.js → cli-runner-nE62FMPA.js} +66 -30
  11. package/dist/cli.js +2 -2
  12. package/dist/{client-B0f4EJ7v.js → client-UH1bEG7Z.js} +13 -8
  13. package/dist/{fuzzy-match-BbaX-dGh.js → fuzzy-match-SsirV9Ap.js} +3 -3
  14. package/dist/{headless-host-C7xYMe74.js → headless-host-CG1XSd5n.js} +113 -64
  15. package/dist/{headless-host-cYdlRYPB.js → headless-host-DN6rrMrK.js} +1 -1
  16. package/dist/{lens-selection-CAtsGaym.js → lens-selection-BxPk53c8.js} +1 -1
  17. package/dist/{local-data-DrNSaiS5.js → local-data-mbCb1HDH.js} +117 -112
  18. package/dist/{mcp-yXnjUkOV.js → mcp-cBtzXsmN.js} +6 -5
  19. package/dist/{package-paths-BWxO-UEL.js → package-paths-BkeQsdaw.js} +1 -1
  20. package/dist/profile-Dbyidrcr.js +2 -0
  21. package/dist/{profile-BlqZlCPZ.js → profile-duqp5uPa.js} +2 -2
  22. package/dist/{remote-attach-CZTrtWIk.js → remote-attach-BeKuMm_x.js} +4 -4
  23. package/dist/{remote-extensions-VP-kfq0C.js → remote-extensions-CX2fAec1.js} +1 -1
  24. package/dist/{remote-extensions-CNXwqK0D.js → remote-extensions-CYWNTVSf.js} +2 -2
  25. package/dist/{remote-language-server-BiPzol99.js → remote-language-server-DLWluAeR.js} +4 -4
  26. package/dist/{remote-uninstall-CFTkoioA.js → remote-uninstall-Y3S0YmJs.js} +5 -5
  27. package/dist/{request-origin--8lLCclv.js → request-origin-BxaWyOpO.js} +7 -7
  28. package/dist/{review-app-launcher-KA2_mOeo.js → review-app-launcher-DZvG5ZAh.js} +2 -2
  29. package/dist/{review-home-paths-D8AoCdd2.js → review-home-paths-BwH08ihj.js} +1 -1
  30. package/dist/{review-telemetry-B2JniTIs.js → review-telemetry-Vnb2zKyn.js} +5 -5
  31. package/dist/{runtime-Bj2tD33R.js → runtime-CF4JXdb8.js} +1 -1
  32. package/dist/runtime.js +1 -1
  33. package/dist/server/desktop-host.js +118 -51
  34. package/dist/{server-discovery-CRXG48Uz.js → server-discovery-DeVTdcqK.js} +2 -2
  35. package/dist/sharing/index.d.ts +18 -22
  36. package/dist/sharing/index.js +1 -1
  37. package/dist/{src-CyYCvVHx.js → src-DYZLCUP_.js} +9 -2
  38. package/dist/{src-WPaQn75m.js → src-DtfSndqS.js} +89 -182
  39. package/dist/{stored-document-migration-B_BijGHF.js → stored-document-migration-B29lve9-.js} +63 -17
  40. package/dist/{thread-state-D6MlnGv7.js → thread-state-BPpvKFwQ.js} +6 -1
  41. package/dist/{tool-failure-_makh_Sr.js → tool-failure-CQhyLht3.js} +2 -2
  42. package/instructions/authoring.md +5 -3
  43. package/package.json +6 -6
  44. package/src/agent-selection.ts +6 -0
  45. package/src/ask/thread.ts +45 -31
  46. package/src/markdown.ts +42 -0
  47. package/src/posthog-capture-client.ts +1 -1
  48. package/src/review-api/README.md +1 -1
  49. package/src/review-api/ask-history.ts +10 -29
  50. package/src/review-api/authoring-tools.ts +1 -1
  51. package/src/review-api/azure-devops-provider.ts +2 -20
  52. package/src/review-api/azure-remote.ts +21 -0
  53. package/src/review-api/checkout-groups.ts +44 -18
  54. package/src/review-api/document.ts +152 -104
  55. package/src/review-api/http.ts +49 -29
  56. package/src/review-api/mcp.ts +3 -1
  57. package/src/review-api/store-migrations.ts +0 -2
  58. package/src/review-api/store.ts +88 -71
  59. package/src/review-stack.ts +58 -8
  60. package/src/server/desktop-host.ts +14 -1
  61. package/src/server/desktop-server.ts +12 -22
  62. package/src/server/hono-http.ts +31 -5
  63. package/src/server/loopback-server.ts +146 -0
  64. package/src/sharing/host.ts +1 -1
  65. package/src/sharing/repository.ts +16 -5
  66. package/src/ui-telemetry-events.ts +4 -4
  67. package/dist/agent-cli-CvYV2R6c.js +0 -2
  68. package/dist/profile-CGxNfeYQ.js +0 -2
  69. package/src/server/legacy-tutorial-cleanup.ts +0 -37
@@ -1,10 +1,10 @@
1
1
  import { n as isJsonObject } from "./src-X9phtB2j.js";
2
- import { E as ReviewCliInstallStampSchema } from "./src-CyYCvVHx.js";
3
- import { C as disableTraceMachine, E as traceMachineStatus, G as listTraceRepositoryRoots, K as traceRepositoryStatus, Q as removeAgentTraceHook, S as configureTraceMachine, T as traceMachineEnabled, U as disableAllTraceRepositories, W as enableTraceRepository, X as describeTraceHookOwners, Y as AGENT_TRACE_HOOK_AGENTS, Z as installHarnessHooks, at as readStoreAuth, n as reviewDesktopStateDir, nt as traceScope, ut as StoreClient } from "./review-home-paths-D8AoCdd2.js";
2
+ import { E as ReviewCliInstallStampSchema } from "./src-DYZLCUP_.js";
3
+ import { C as disableTraceMachine, E as traceMachineStatus, G as listTraceRepositoryRoots, K as traceRepositoryStatus, Q as removeAgentTraceHook, S as configureTraceMachine, T as traceMachineEnabled, U as disableAllTraceRepositories, W as enableTraceRepository, X as describeTraceHookOwners, Y as AGENT_TRACE_HOOK_AGENTS, Z as installHarnessHooks, at as readStoreAuth, n as reviewDesktopStateDir, nt as traceScope, ut as StoreClient } from "./review-home-paths-BwH08ihj.js";
4
4
  import { I as writeFileAtomicAsync, L as writePrivateJsonAtomic, N as devReviewHome, j as withFileLock } from "./s3-config-CjcLyFV5.js";
5
- import { i as readReviewPackageVersion } from "./package-paths-BWxO-UEL.js";
5
+ import { i as readReviewPackageVersion } from "./package-paths-BkeQsdaw.js";
6
6
  import { n as isFile, t as isDirectory } from "./fs-utils-BMPLt0cr.js";
7
- import { c as findExecutable, s as executableCommand } from "./fuzzy-match-BbaX-dGh.js";
7
+ import { c as findExecutable, s as executableCommand } from "./fuzzy-match-SsirV9Ap.js";
8
8
  import { createHash } from "node:crypto";
9
9
  import { constants } from "node:fs";
10
10
  import { access, chmod, lstat, mkdir, readFile, rm, stat, writeFile } from "node:fs/promises";
@@ -1,12 +1,12 @@
1
1
  import { n as isJsonObject, u as parseJsonText } from "./src-X9phtB2j.js";
2
- import { T as traceMachineEnabled } from "./review-home-paths-D8AoCdd2.js";
3
- import { a as toolResultText, i as connectReviewInstance, s as ReviewApiError } from "./agent-client-D2RmE9NL.js";
2
+ import { T as traceMachineEnabled } from "./review-home-paths-BwH08ihj.js";
3
+ import { a as toolResultText, i as connectReviewInstance, s as ReviewApiError } from "./agent-client-H53ajvrm.js";
4
4
  import { N as devReviewHome } from "./s3-config-CjcLyFV5.js";
5
- import { n as readBuildCommit } from "./package-paths-BWxO-UEL.js";
6
- import { b as selectReviewInstance, u as REVIEW_INSTANCE_ENV } from "./server-discovery-CRXG48Uz.js";
7
- import { n as reviewSessionAgent } from "./review-telemetry-B2JniTIs.js";
8
- import { a as REVIEW_VIA_HEADER, i as REVIEW_THREAD_HEADER, n as REVIEW_AGENT_HEADER, t as ASK_THREAD_ENV } from "./request-origin--8lLCclv.js";
9
- import { i as publicTool, n as RECOVERY, r as callPublicTool, t as toolFailure } from "./tool-failure-_makh_Sr.js";
5
+ import { n as readBuildCommit } from "./package-paths-BkeQsdaw.js";
6
+ import { b as selectReviewInstance, u as REVIEW_INSTANCE_ENV } from "./server-discovery-DeVTdcqK.js";
7
+ import { n as reviewSessionAgent } from "./review-telemetry-Vnb2zKyn.js";
8
+ import { a as REVIEW_VIA_HEADER, i as REVIEW_THREAD_HEADER, n as REVIEW_AGENT_HEADER, t as ASK_THREAD_ENV } from "./request-origin-BxaWyOpO.js";
9
+ import { i as publicTool, n as RECOVERY, r as callPublicTool, t as toolFailure } from "./tool-failure-CQhyLht3.js";
10
10
  import { existsSync } from "node:fs";
11
11
  import path from "node:path";
12
12
  //#region src/review-api/install-update.ts
@@ -43,7 +43,7 @@ async function runReviewAgentCli(input) {
43
43
  [REVIEW_THREAD_HEADER, thread ?? ""]
44
44
  ]);
45
45
  if (mode === "mcp") {
46
- const { serveReviewMcp } = await import("./mcp-yXnjUkOV.js");
46
+ const { serveReviewMcp } = await import("./mcp-cBtzXsmN.js");
47
47
  exitOnInstallUpdate(input.stderr);
48
48
  await serveReviewMcp(async (key, agentKind) => {
49
49
  const connected = await connectReviewInstance(key ? {
@@ -0,0 +1,2 @@
1
+ import { n as runReviewAgentCli } from "./agent-cli-CFX3bHJV.js";
2
+ export { runReviewAgentCli };
@@ -1,7 +1,7 @@
1
1
  import { d as isBooleanValue, f as isNumberValue, m as isStringValue, u as parseJsonText } from "./src-X9phtB2j.js";
2
- import "./src-CyYCvVHx.js";
2
+ import "./src-DYZLCUP_.js";
3
3
  import { t as ReviewInputError } from "./input-error-OLgB_h31.js";
4
- import { b as selectReviewInstance, c as reviewServerStateDir, d as ReviewInstanceUnavailableError, i as readReviewServerDiscovery, l as serverNotReady, m as healthyReviewInstance, s as reviewServerIsHealthy, y as reviewInstanceUnavailable } from "./server-discovery-CRXG48Uz.js";
4
+ import { b as selectReviewInstance, c as reviewServerStateDir, d as ReviewInstanceUnavailableError, i as readReviewServerDiscovery, l as serverNotReady, m as healthyReviewInstance, s as reviewServerIsHealthy, y as reviewInstanceUnavailable } from "./server-discovery-DeVTdcqK.js";
5
5
  //#region ../review-protocol/src/review-api-client.ts
6
6
  const defaultRequest = (url, init) => fetch(url, init);
7
7
  /** A non-2xx reply; the status tells a caller whether retrying can help. */
@@ -259,7 +259,7 @@ async function connectReviewInstance(env = process.env, headers = {}, options =
259
259
  const selection = await selectReviewInstance({ env });
260
260
  const discovery = healthyReviewInstance(selection);
261
261
  if (!discovery) {
262
- const { ensureServerWithoutDesktop } = await import("./background-server-CFUU4VtN.js");
262
+ const { ensureServerWithoutDesktop } = await import("./background-server-BSYXD9au.js");
263
263
  const server = await ensureServerWithoutDesktop({
264
264
  selection,
265
265
  env,
@@ -1,8 +1,8 @@
1
1
  import { n as isJsonObject } from "./src-X9phtB2j.js";
2
- import { c as activityBeginSchema, l as activityEndSchema, n as uploadSchema, r as commandSchema, u as activityUpdateSchema } from "./local-data-DrNSaiS5.js";
3
- import { C as pathTargetSchema, D as publishedEditSchema } from "./stored-document-migration-B_BijGHF.js";
2
+ import { c as activityBeginSchema, l as activityEndSchema, n as uploadSchema, r as commandSchema, u as activityUpdateSchema } from "./local-data-mbCb1HDH.js";
3
+ import { C as pathTargetSchema, D as publishedEditSchema } from "./stored-document-migration-B29lve9-.js";
4
4
  import { t as ReviewInputError } from "./input-error-OLgB_h31.js";
5
- import { t as findReviewPackageRoot } from "./package-paths-BWxO-UEL.js";
5
+ import { t as findReviewPackageRoot } from "./package-paths-BkeQsdaw.js";
6
6
  import { z } from "zod";
7
7
  import { readFile } from "node:fs/promises";
8
8
  import path from "node:path";
@@ -162,7 +162,7 @@ function authoringTools(traceEnabled = false) {
162
162
  kind: true
163
163
  });
164
164
  const descriptions = {
165
- create: "Create a whiteboard. target names its repository by the checkout's path, and what it shows: {kind:\"project\"} for a plan in that repository's project with no change; {kind:\"worktree\", base?} for the saved files in the checkout, uncommitted ones included and untracked ones left out (git add -N a new file to include it), against base, by default the repository's default branch, from the merge base of base and HEAD, which follows rebases; {kind:\"commits\", head, base?} for immutable commits (omitted base means source at head with no diff; supply the parent to review introduced changes); {kind:\"pullRequest\", pullRequest} for a GitHub PR by URL or number, fetched into that checkout and pinned at the PR head and GitHub diff base. For a branch stacked on another, pass the branch below it as base. Group plan implementations or a PR stack under one project-target overview with parentId, and order its children with dependsOn; Git bases do not set these relationships. Revisions are resolved on acceptance. With a PR and no title the PR's title is used. When the existing review for that PR is in Trash, creation reports its ID; restore it with review_lifecycle state:\"active\" before continuing. When an active review for that PR exists, it is returned instead, reporting whether its head moved and whether an agent is working on it; update it in place, move its target with review_set_target, or create a separate review with reuseExisting:false. The result carries review, as review_list shows it, with its target and repositoryPath, so no follow-up read is needed before diffing. When Desktop is available the review opens there and the result reports opened, softwareMapEnabled and environmentIssues, as review_open does; set open:false to author in the background without taking over Desktop. parentId and dependsOn set its place among the project's reviews, as review_set_parent and review_set_dependencies do.",
165
+ create: "Create a whiteboard. target names its repository by the checkout's path, and what it shows: {kind:\"project\"} for a plan in that repository's project with no change; {kind:\"worktree\", base?} for the saved files in the checkout, uncommitted ones included and untracked ones left out (git add -N a new file to include it), against base, by default the repository's default branch, from the merge base of base and HEAD, which follows rebases; {kind:\"commits\", head, base?} for immutable commits (omitted base means source at head with no diff; supply the parent to review introduced changes); {kind:\"pullRequest\", pullRequest} for a GitHub PR by URL or number, fetched into that checkout and pinned at the PR head and GitHub diff base. For a branch stacked on another, pass the branch below it as base. Group plan implementations or a PR stack under one project-target overview with parentId, and order its children with dependsOn; Git bases do not set these relationships. Revisions are resolved on acceptance. With a PR and no title the PR's title is used. When the existing review for that PR is in Trash, creation reports its ID; restore it with review_lifecycle state:\"active\" before continuing. When an active review for that PR exists, it is returned instead, reporting whether its head moved and whether an agent is working on it; update it in place, move its target with review_set_target, or create a separate review with reuseExisting:false. The result carries review, as review_list shows it, with its target and repositoryPath, so no follow-up read is needed before diffing. When Desktop is available the review opens there and the result reports opened, softwareMapEnabled and environmentIssues, as review_open does; set open:false to author in the background without taking over Desktop. parentId and dependsOn set its place among the project's reviews, as review_set_parent and review_set_dependencies do; projectId files it in another project, by project.id from review_list.",
166
166
  set_target: "Move the review to a new target (the same targets review_create takes), such as the commits after a rebase or amend, or commits or a PR for a board that had none. The document and component IDs are kept. Revisions are resolved on acceptance. Returns warnings for retained source ranges in files the new commits changed, to verify, and resources that no longer match; fix them with review_edit. Earlier versions keep their source. A PR target names the PR; other targets keep it within the same repository and clear it across repositories.",
167
167
  edit: [
168
168
  "Edit one document component. content is one component, named by its type; each type's fields are in the Components section of session_get_instructions.",
@@ -1,2 +1,2 @@
1
- import { a as headlessServerOwner, c as stopBackgroundServer, i as ensureServerWithoutDesktop, r as ensureBackgroundServer } from "./background-server-k4K_Hvh1.js";
1
+ import { a as headlessServerOwner, c as stopBackgroundServer, i as ensureServerWithoutDesktop, r as ensureBackgroundServer } from "./background-server-Xom8cA_u.js";
2
2
  export { ensureBackgroundServer, ensureServerWithoutDesktop, headlessServerOwner, stopBackgroundServer };
@@ -1,8 +1,8 @@
1
- import "./review-home-paths-D8AoCdd2.js";
1
+ import "./review-home-paths-BwH08ihj.js";
2
2
  import { D as liveLockOwner, k as processIsAlive } from "./s3-config-CjcLyFV5.js";
3
- import { t as findReviewPackageRoot } from "./package-paths-BWxO-UEL.js";
4
- import { a as readReviewServerHealth, c as reviewServerStateDir, i as readReviewServerDiscovery, n as desktopOwnsHome, p as desktopUsesHome, r as headlessServerLockPath } from "./server-discovery-CRXG48Uz.js";
5
- import { t as desktopApplicationInstalled } from "./review-app-launcher-KA2_mOeo.js";
3
+ import { t as findReviewPackageRoot } from "./package-paths-BkeQsdaw.js";
4
+ import { a as readReviewServerHealth, c as reviewServerStateDir, i as readReviewServerDiscovery, n as desktopOwnsHome, p as desktopUsesHome, r as headlessServerLockPath } from "./server-discovery-DeVTdcqK.js";
5
+ import { t as desktopApplicationInstalled } from "./review-app-launcher-DZvG5ZAh.js";
6
6
  import { mkdir, open, readFile, realpath, stat } from "node:fs/promises";
7
7
  import path from "node:path";
8
8
  import { spawn } from "node:child_process";
@@ -1 +1 @@
1
- {"version":"0.3.5-preview.20261020.130","commit":"e4fb75564bd27f464cf214a4b3a9a75ada3d54a3","dirty":true,"builtAt":"2026-10-20T18:45:03.626Z"}
1
+ {"version":"0.3.5-preview.20261021.133","commit":"6c2c2de6384ef9b8d4f9d6a3c63d9cbbcee0ebe8","dirty":true,"builtAt":"2026-10-21T19:05:08.496Z"}
@@ -1,4 +1,4 @@
1
- import { r as connectReviewApi } from "./agent-client-D2RmE9NL.js";
1
+ import { r as connectReviewApi } from "./agent-client-H53ajvrm.js";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { z } from "zod";
4
4
  //#region src/sharing/cli.ts
@@ -1,18 +1,18 @@
1
- import { A as __require, O as setLocalVcsCommandObserver, j as __toESM, k as __commonJSMin } from "./src-WPaQn75m.js";
1
+ import { D as __commonJSMin, E as setLocalVcsCommandObserver, O as __require, k as __toESM } from "./src-DtfSndqS.js";
2
2
  import { c as jsonString, n as isJsonObject, u as parseJsonText } from "./src-X9phtB2j.js";
3
- import { S as REVIEW_REMOTE_ATTACH_END, b as REVIEW_REMOTE_AGENT_IDS, h as REVIEW_CLI_INSTALL_TARGET_LABELS, l as boardTitle, x as REVIEW_REMOTE_ATTACH_BEGIN } from "./src-CyYCvVHx.js";
4
- import { $ as resolveTraceCommand, A as runTraceDeny, E as traceMachineStatus, F as describeSelection, H as resolveTraceRepositoryTarget, J as HOSTED_CAPTURE_SCOPE_DESCRIPTION, K as traceRepositoryStatus, L as loadS3TraceStorage, M as runTraceSessions, N as runTraceStoreDelete, P as runTraceStoreInfo, T as traceMachineEnabled, V as requireTraceConsent, _ as runTraceRepair, at as readStoreAuth, b as runTraceGitHook, c as registerTraceCommands, ct as runStoreWhoami, d as runTraceList$1, dt as withStoreAuthorization, f as runTracePull$1, ft as emitJsonEvent, g as runTraceInstallMachine, h as runTraceEnable, ht as jsonRequestedInArgv, j as runTraceOnboard, k as runTraceAllow, l as resolveTraceReadStorage, lt as StoreApiError, m as runTraceDisable, mt as humanStream, nt as traceScope, ot as runStoreLogin, p as runTraceShow, pt as failWithJsonError, q as readTraceUserConfig, rt as DEFAULT_STORE_ORIGIN, st as runStoreLogout, tt as traceHomeDir, u as runTraceBlame, ut as StoreClient, v as runTraceStatus, w as readLegacyCaptureSettings, x as runTraceHook, y as runTraceSync, z as selectTraceStorage } from "./review-home-paths-D8AoCdd2.js";
5
- import { o as ReviewApiClient, s as ReviewApiError } from "./agent-client-D2RmE9NL.js";
6
- import { t as resolveReviewRoot } from "./runtime-Bj2tD33R.js";
3
+ import { S as REVIEW_REMOTE_ATTACH_END, b as REVIEW_REMOTE_AGENT_IDS, h as REVIEW_CLI_INSTALL_TARGET_LABELS, l as boardTitle, x as REVIEW_REMOTE_ATTACH_BEGIN } from "./src-DYZLCUP_.js";
4
+ import { $ as resolveTraceCommand, A as runTraceDeny, E as traceMachineStatus, F as describeSelection, H as resolveTraceRepositoryTarget, J as HOSTED_CAPTURE_SCOPE_DESCRIPTION, K as traceRepositoryStatus, L as loadS3TraceStorage, M as runTraceSessions, N as runTraceStoreDelete, P as runTraceStoreInfo, T as traceMachineEnabled, V as requireTraceConsent, _ as runTraceRepair, at as readStoreAuth, b as runTraceGitHook, c as registerTraceCommands, ct as runStoreWhoami, d as runTraceList$1, dt as withStoreAuthorization, f as runTracePull$1, ft as emitJsonEvent, g as runTraceInstallMachine, h as runTraceEnable, ht as jsonRequestedInArgv, j as runTraceOnboard, k as runTraceAllow, l as resolveTraceReadStorage, lt as StoreApiError, m as runTraceDisable, mt as humanStream, nt as traceScope, ot as runStoreLogin, p as runTraceShow, pt as failWithJsonError, q as readTraceUserConfig, rt as DEFAULT_STORE_ORIGIN, st as runStoreLogout, tt as traceHomeDir, u as runTraceBlame, ut as StoreClient, v as runTraceStatus, w as readLegacyCaptureSettings, x as runTraceHook, y as runTraceSync, z as selectTraceStorage } from "./review-home-paths-BwH08ihj.js";
5
+ import { o as ReviewApiClient, s as ReviewApiError } from "./agent-client-H53ajvrm.js";
6
+ import { t as resolveReviewRoot } from "./runtime-CF4JXdb8.js";
7
7
  import { C as s3ProfileSchema, E as writeTraceConfigFile, N as devReviewHome, P as normalizeStoreOrigin, S as readTraceConfigFile, T as sameS3Profile, _ as emptyTraceConfig, c as resolveS3Setup, g as currentStore, h as TraceConfigurationError, i as isS3MockMode, n as clearTraceEnvCache, o as readTraceEnvFile, p as traceSettingsPath, w as s3Store } from "./s3-config-CjcLyFV5.js";
8
8
  import { t as errorMessage } from "./error-message-OtiDonty.js";
9
- import { i as readReviewPackageVersion, r as readBuildInfo, t as findReviewPackageRoot } from "./package-paths-BWxO-UEL.js";
10
- import { a as readReviewServerHealth, b as selectReviewInstance, c as reviewServerStateDir, d as ReviewInstanceUnavailableError, f as clearDefaultReviewInstance, g as requireHealthyReviewDesktop, h as readDefaultReviewInstance, i as readReviewServerDiscovery, l as serverNotReady, m as healthyReviewInstance, p as desktopUsesHome, t as DESKTOP_TAKEOVER_SIGNAL, u as REVIEW_INSTANCE_ENV, x as writeDefaultReviewInstance, y as reviewInstanceUnavailable } from "./server-discovery-CRXG48Uz.js";
11
- import { t as ReviewTelemetry } from "./review-telemetry-B2JniTIs.js";
12
- import { t as fuzzyRank } from "./fuzzy-match-BbaX-dGh.js";
13
- import { _ as isInstallTarget, a as isOwnedShim, f as windowsInstallerCommand, g as ALL_INSTALL_TARGETS, h as detectConnectAgents, m as connectAgent, o as pathShimPath, p as scanLegacySkills, t as aliasInstallationToAccount, v as connectPrompts } from "./account-alias-CMyXCuuq.js";
14
- import { n as focusReviewDesktop, r as runReviewAppLaunch } from "./review-app-launcher-KA2_mOeo.js";
15
- import { t as reviewAgentCliHelp } from "./agent-cli-CahKfDT0.js";
9
+ import { i as readReviewPackageVersion, r as readBuildInfo, t as findReviewPackageRoot } from "./package-paths-BkeQsdaw.js";
10
+ import { a as readReviewServerHealth, b as selectReviewInstance, c as reviewServerStateDir, d as ReviewInstanceUnavailableError, f as clearDefaultReviewInstance, g as requireHealthyReviewDesktop, h as readDefaultReviewInstance, i as readReviewServerDiscovery, l as serverNotReady, m as healthyReviewInstance, p as desktopUsesHome, t as DESKTOP_TAKEOVER_SIGNAL, u as REVIEW_INSTANCE_ENV, x as writeDefaultReviewInstance, y as reviewInstanceUnavailable } from "./server-discovery-DeVTdcqK.js";
11
+ import { t as ReviewTelemetry } from "./review-telemetry-Vnb2zKyn.js";
12
+ import { t as fuzzyRank } from "./fuzzy-match-SsirV9Ap.js";
13
+ import { _ as isInstallTarget, a as isOwnedShim, f as windowsInstallerCommand, g as ALL_INSTALL_TARGETS, h as detectConnectAgents, m as connectAgent, o as pathShimPath, p as scanLegacySkills, t as aliasInstallationToAccount, v as connectPrompts } from "./account-alias-BRRpaO9U.js";
14
+ import { n as focusReviewDesktop, r as runReviewAppLaunch } from "./review-app-launcher-DZvG5ZAh.js";
15
+ import { t as reviewAgentCliHelp } from "./agent-cli-CFX3bHJV.js";
16
16
  import { existsSync, mkdirSync, renameSync, writeFileSync } from "node:fs";
17
17
  import { realpath } from "node:fs/promises";
18
18
  import path from "node:path";
@@ -1787,6 +1787,20 @@ var require_delete_log_property = /* @__PURE__ */ __commonJSMin(((exports, modul
1787
1787
  //#endregion
1788
1788
  //#region ../../node_modules/fast-copy/dist/cjs/index.cjs
1789
1789
  var require_cjs = /* @__PURE__ */ __commonJSMin(((exports) => {
1790
+ /**
1791
+ * Error thrown when the copier traverses deeper than the configured `maxDepth`.
1792
+ *
1793
+ * @note
1794
+ * Extends `RangeError` for backwards compatibility, since exceeding the maximum depth
1795
+ * previously surfaced as a native `RangeError` from stack exhaustion.
1796
+ */
1797
+ var MaxDepthExceededError = class extends RangeError {
1798
+ constructor(maxDepth) {
1799
+ super(`Maximum copy depth of ${String(maxDepth)} exceeded; the value copied is nested too deeply.`);
1800
+ this.maxDepth = maxDepth;
1801
+ this.name = "MaxDepthExceededError";
1802
+ }
1803
+ };
1790
1804
  const toStringFunction = Function.prototype.toString;
1791
1805
  const toStringObject = Object.prototype.toString;
1792
1806
  /**
@@ -1951,10 +1965,19 @@ var require_cjs = /* @__PURE__ */ __commonJSMin(((exports) => {
1951
1965
  function copySetStrict(set, state) {
1952
1966
  return copyOwnPropertiesStrict(set, copySetLoose(set, state), state);
1953
1967
  }
1968
+ /**
1969
+ * The maximum depth traversed when none is provided.
1970
+ *
1971
+ * @note
1972
+ * This is deliberately below the depth at which the native call stack is exhausted
1973
+ * (~1875 for strict copies in node), so that untrusted, deeply-nested values fail with a
1974
+ * catchable, descriptive error instead of a raw `RangeError`.
1975
+ */
1976
+ const DEFAULT_MAX_DEPTH = 1e3;
1954
1977
  function createDefaultCache() {
1955
1978
  return /* @__PURE__ */ new WeakMap();
1956
1979
  }
1957
- function getOptions({ createCache: createCacheOverride, methods: methodsOverride, strict }) {
1980
+ function getOptions({ createCache: createCacheOverride, maxDepth, methods: methodsOverride, strict }) {
1958
1981
  const defaultMethods = {
1959
1982
  array: strict ? copyArrayStrict : copyArrayLoose,
1960
1983
  arrayBuffer: copyArrayBuffer,
@@ -1976,6 +1999,7 @@ var require_cjs = /* @__PURE__ */ __commonJSMin(((exports) => {
1976
1999
  return {
1977
2000
  createCache,
1978
2001
  copiers,
2002
+ maxDepth: maxDepth == null ? DEFAULT_MAX_DEPTH : maxDepth,
1979
2003
  methods,
1980
2004
  strict: Boolean(strict)
1981
2005
  };
@@ -2024,25 +2048,32 @@ var require_cjs = /* @__PURE__ */ __commonJSMin(((exports) => {
2024
2048
  * - `strict` mode to copy all properties with their descriptors
2025
2049
  */
2026
2050
  function createCopier(options = {}) {
2027
- const { createCache, copiers } = getOptions(options);
2051
+ const { createCache, copiers, maxDepth } = getOptions(options);
2028
2052
  const { Array: copyArray, Object: copyObject } = copiers;
2029
2053
  function copier(value, state) {
2030
2054
  state.prototype = state.Constructor = void 0;
2031
2055
  if (!value || typeof value !== "object") return value;
2032
2056
  if (state.cache.has(value)) return state.cache.get(value);
2057
+ if (++state.depth > maxDepth) throw new MaxDepthExceededError(maxDepth);
2033
2058
  state.prototype = Object.getPrototypeOf(value);
2034
2059
  state.Constructor = state.prototype && state.prototype.constructor;
2035
- if (!state.Constructor || state.Constructor === Object) return copyObject(value, state);
2036
- if (Array.isArray(value)) return copyArray(value, state);
2037
- const tagSpecificCopier = copiers[getTag(value)];
2038
- if (tagSpecificCopier) return tagSpecificCopier(value, state);
2039
- return typeof value.then === "function" ? value : copyObject(value, state);
2060
+ let clone;
2061
+ if (!state.Constructor || state.Constructor === Object) clone = copyObject(value, state);
2062
+ else if (Array.isArray(value)) clone = copyArray(value, state);
2063
+ else {
2064
+ const tagSpecificCopier = copiers[getTag(value)];
2065
+ if (tagSpecificCopier) clone = tagSpecificCopier(value, state);
2066
+ else clone = typeof value.then === "function" ? value : copyObject(value, state);
2067
+ }
2068
+ --state.depth;
2069
+ return clone;
2040
2070
  }
2041
2071
  return function copy(value) {
2042
2072
  return copier(value, {
2043
2073
  Constructor: void 0,
2044
2074
  cache: createCache(),
2045
2075
  copier,
2076
+ depth: 0,
2046
2077
  prototype: void 0
2047
2078
  });
2048
2079
  };
@@ -2053,7 +2084,12 @@ var require_cjs = /* @__PURE__ */ __commonJSMin(((exports) => {
2053
2084
  * original property descriptors on both objects and arrays.
2054
2085
  */
2055
2086
  const copyStrict = createCopier({ strict: true });
2056
- exports.copy = createCopier();
2087
+ /**
2088
+ * Copy an value deeply as much as possible.
2089
+ */
2090
+ const copy = createCopier();
2091
+ exports.MaxDepthExceededError = MaxDepthExceededError;
2092
+ exports.copy = copy;
2057
2093
  exports.copyStrict = copyStrict;
2058
2094
  exports.createCopier = createCopier;
2059
2095
  }));
@@ -4297,7 +4333,7 @@ async function runReviewCli(input) {
4297
4333
  if (!Number.isInteger(port) || port < 0 || port > 65535) throw new ReviewCliUsageError("--port must be an integer between 0 and 65535.");
4298
4334
  const stateDir = reviewServerStateDir(authoringEnv(options.stateDir));
4299
4335
  if (options.detach) {
4300
- const { ensureBackgroundServer } = await import("./background-server-CFUU4VtN.js");
4336
+ const { ensureBackgroundServer } = await import("./background-server-BSYXD9au.js");
4301
4337
  const { discovery, started } = await ensureBackgroundServer({
4302
4338
  stateDir,
4303
4339
  env,
@@ -4319,7 +4355,7 @@ async function runReviewCli(input) {
4319
4355
  process.once("SIGINT", stop);
4320
4356
  process.once("SIGTERM", stop);
4321
4357
  process.once(DESKTOP_TAKEOVER_SIGNAL, takeover);
4322
- const { HeadlessServerBusyError, runHeadlessServer } = await import("./headless-host-cYdlRYPB.js");
4358
+ const { HeadlessServerBusyError, runHeadlessServer } = await import("./headless-host-DN6rrMrK.js");
4323
4359
  try {
4324
4360
  await runHeadlessServer({
4325
4361
  stateDir,
@@ -4356,7 +4392,7 @@ async function runReviewCli(input) {
4356
4392
  configureJsonOutput(serverCommand.command("stop").description("Stop a background server started by --detach, the CLI, or Desktop").option("--state-dir <path>", "directory selected when starting the server"), "plain").action(async (_options, command) => {
4357
4393
  const options = command.optsWithGlobals();
4358
4394
  const stateDir = reviewServerStateDir(authoringEnv(options.stateDir));
4359
- const { headlessServerOwner, stopBackgroundServer } = await import("./background-server-CFUU4VtN.js");
4395
+ const { headlessServerOwner, stopBackgroundServer } = await import("./background-server-BSYXD9au.js");
4360
4396
  const owner = await headlessServerOwner(stateDir);
4361
4397
  const discovery = await readReviewServerDiscovery(stateDir);
4362
4398
  if (owner === void 0) {
@@ -4384,7 +4420,7 @@ async function runReviewCli(input) {
4384
4420
  if (!existsSync(path.join(stateDir, "review-api.db"))) throw new Error(`No saved reviews in ${stateDir}, so there is no server id to reset. Check --state-dir.`);
4385
4421
  const inUse = `A Whiteboard server is using ${stateDir}. Stop it first, then run whiteboard server reset-id again.`;
4386
4422
  if (await desktopUsesHome(stateDir, env)) return refuse(inUse, options.json);
4387
- const [{ openReviewProfile }, { withHeadlessServerLock }] = await Promise.all([import("./profile-CGxNfeYQ.js"), import("./headless-host-cYdlRYPB.js")]);
4423
+ const [{ openReviewProfile }, { withHeadlessServerLock }] = await Promise.all([import("./profile-Dbyidrcr.js"), import("./headless-host-DN6rrMrK.js")]);
4388
4424
  const reset = await withHeadlessServerLock(await realpath(stateDir), async () => {
4389
4425
  const local = await openReviewProfile(stateDir, { manageWorkspaces: false });
4390
4426
  try {
@@ -4406,7 +4442,7 @@ async function runReviewCli(input) {
4406
4442
  configureJsonOutput(remote.command("attach").description("Start a background server if none is healthy and report how to reach it").option("--state-dir <path>", "directory for saved reviews and server discovery").option("--groups <groups>", "comma-separated optional extension groups the Desktop has enabled, such as go").option("--replace", "stop a running server of another version that the CLI or Desktop started, and start this one"), "plain").action(async (_options, command) => {
4407
4443
  const options = command.optsWithGlobals();
4408
4444
  const stateDir = reviewServerStateDir(authoringEnv(options.stateDir));
4409
- const { remoteAttach } = await import("./remote-attach-CZTrtWIk.js");
4445
+ const { remoteAttach } = await import("./remote-attach-BeKuMm_x.js");
4410
4446
  let attach;
4411
4447
  try {
4412
4448
  attach = await remoteAttach({
@@ -4433,7 +4469,7 @@ async function runReviewCli(input) {
4433
4469
  });
4434
4470
  configureJsonOutput(remote.command("extensions").description("Language extensions for the language server on a remote").command("ensure").description("Download the curated extensions for this machine and list them for the language server").option("--groups <groups>", "comma-separated optional extension groups the Desktop has enabled, such as go"), "plain").action(async (_options, command) => {
4435
4471
  const { json, groups } = command.optsWithGlobals();
4436
- const { ensureRemoteExtensions } = await import("./remote-extensions-VP-kfq0C.js");
4472
+ const { ensureRemoteExtensions } = await import("./remote-extensions-CX2fAec1.js");
4437
4473
  const result = await ensureRemoteExtensions({
4438
4474
  env,
4439
4475
  groups: groups?.split(",").map((group) => group.trim())
@@ -4448,7 +4484,7 @@ async function runReviewCli(input) {
4448
4484
  configureJsonOutput(remote.command("uninstall").description("Remove what Whiteboard Desktop installed on this host, stopping a server it started").addOption(new Option("--keep-reviews", "leave the saved reviews in place").conflicts("deleteReviews")).addOption(new Option("--delete-reviews", "also delete the saved reviews")).option("--state-dir <path>", "directory for saved reviews and server discovery"), "plain").action(async (_options, command) => {
4449
4485
  const options = command.optsWithGlobals();
4450
4486
  const stateDir = reviewServerStateDir(authoringEnv(options.stateDir));
4451
- const { remoteUninstall } = await import("./remote-uninstall-CFTkoioA.js");
4487
+ const { remoteUninstall } = await import("./remote-uninstall-Y3S0YmJs.js");
4452
4488
  let deleteReviews = options.deleteReviews ? true : options.keepReviews ? false : void 0;
4453
4489
  if (deleteReviews === void 0 && !options.json && input.stdin?.isTTY) {
4454
4490
  const prompt = createInterface$1({
@@ -4670,14 +4706,14 @@ async function runReviewCli(input) {
4670
4706
  command.showHelpAfterError(false).error("Markdown review migration is no longer supported. Ask your agent to migrate your old Whiteboard reviews.");
4671
4707
  });
4672
4708
  configureJsonOutput(configureJsonOutput(program.command("share").description("Upload an immutable review snapshot and return its share link"), "plain").option("--review <id>", "review ID").option("--version <number>", "Saved version to share").option("--preview", "Open the share link in Whiteboard Preview by default").option("--request-id <uuid>", "Reuse this ID when retrying the same immutable upload").action(async (options) => {
4673
- const { runShareCli } = await import("./cli-BUVSMGud.js");
4709
+ const { runShareCli } = await import("./cli-BOnV4cCh.js");
4674
4710
  state.exitCode = await runShareCli({
4675
4711
  ...input,
4676
4712
  ...options,
4677
4713
  env: authoringEnv()
4678
4714
  });
4679
4715
  }).command("revoke <share-id>").description("Revoke future downloads of a share"), "plain").action(async (shareId, options) => {
4680
- const { runShareCli } = await import("./cli-BUVSMGud.js");
4716
+ const { runShareCli } = await import("./cli-BOnV4cCh.js");
4681
4717
  state.exitCode = await runShareCli({
4682
4718
  ...input,
4683
4719
  ...options,
@@ -4758,7 +4794,7 @@ async function runReviewCli(input) {
4758
4794
  return commands;
4759
4795
  } });
4760
4796
  for (const [name, description] of [["api", "Call a JSON review authoring tool on the running server"], ["mcp", "Serve the JSON review authoring tools over stdio MCP"]]) configureOutput(program.command(name).description(description).argument("[args...]", "tool name and JSON input").allowUnknownOption().allowExcessArguments().helpOption(false).passThroughOptions().addHelpText("after", `\n${reviewAgentCliHelp}`), "plain").action(async (args) => {
4761
- const { runReviewAgentCli } = await import("./agent-cli-CvYV2R6c.js");
4797
+ const { runReviewAgentCli } = await import("./agent-cli-D2P4EoAk.js");
4762
4798
  state.exitCode = await runReviewAgentCli({
4763
4799
  ...input,
4764
4800
  env: authoringEnv(),
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { a as jsonNumber, c as jsonString, o as jsonObject, u as parseJsonText } from "./src-X9phtB2j.js";
3
- import "./src-CyYCvVHx.js";
3
+ import "./src-DYZLCUP_.js";
4
4
  import { existsSync, readFileSync, readdirSync, realpathSync } from "node:fs";
5
5
  import path from "node:path";
6
6
  import os from "node:os";
@@ -17,7 +17,7 @@ async function runCli(effectivePath) {
17
17
  `);
18
18
  return 1;
19
19
  }
20
- const { runReviewCli } = await import("./cli-runner-C7W6VA94.js");
20
+ const { runReviewCli } = await import("./cli-runner-nE62FMPA.js");
21
21
  return runReviewCli({
22
22
  argv,
23
23
  cliPaths: {
@@ -1,8 +1,8 @@
1
- import { f as gitAt } from "./src-WPaQn75m.js";
1
+ import { f as gitAt } from "./src-DtfSndqS.js";
2
2
  import { n as isJsonObject, u as parseJsonText } from "./src-X9phtB2j.js";
3
- import "./src-CyYCvVHx.js";
4
- import { f as sourceAnchors } from "./lens-selection-CAtsGaym.js";
5
- import { $ as parseMarkdown, A as resourceReferences, E as pinsSchema, G as lensSelections, I as sourceReferences, O as readsAtBoardPins, R as checkReferences, W as lensSchema, Z as markdownNodes, _ as boardRepositoryId, c as normalizedSoftwareRelationshipSchema, f as anchorPins, k as resourceReference, l as traceSchema, n as migrateStoredDocument, r as migrateStoredLenses, s as normalizedSoftwareElementSchema, t as liftFileLenses, u as textIncludesQuote, x as elements, y as documentSchema } from "./stored-document-migration-B_BijGHF.js";
3
+ import "./src-DYZLCUP_.js";
4
+ import { f as sourceAnchors } from "./lens-selection-BxPk53c8.js";
5
+ import { $ as parseMarkdown, A as resourceReferences, E as pinsSchema, G as lensSelections, I as sourceReferences, O as readsAtBoardPins, R as checkReferences, W as lensSchema, Z as markdownNodes, _ as boardRepositoryId, c as normalizedSoftwareRelationshipSchema, f as anchorPins, k as resourceReference, l as traceSchema, n as migrateStoredDocument, r as migrateStoredLenses, s as normalizedSoftwareElementSchema, t as liftFileLenses, u as textIncludesQuote, x as elements, y as documentSchema } from "./stored-document-migration-B29lve9-.js";
6
6
  import { t as ReviewInputError } from "./input-error-OLgB_h31.js";
7
7
  import { createHash, randomUUID } from "node:crypto";
8
8
  import { z } from "zod";
@@ -259,6 +259,7 @@ function sharedGit(cwd, args) {
259
259
  }
260
260
  function fetchError(stderr, publishing) {
261
261
  if (/not our ref|couldn't find remote ref|unadvertised object/i.test(stderr)) return new ReviewInputError(publishing ? "Push the reviewed commits to GitHub before sharing." : "The shared commits are no longer available on GitHub. Ask the sender to restore them, then retry.", 409);
262
+ if (/could not read (?:username|password)|authentication failed|permission denied \(publickey|repository not found|returned error: 40[13]|\bSAML\b/i.test(stderr)) return new ReviewInputError("Git couldn't access this GitHub repository. Your Whiteboard sign-in doesn't grant repository access, so set up Git credentials for it, then retry.", 409);
262
263
  return new ReviewInputError("Could not fetch the GitHub repository. Check your connection and Git credentials for this repository, then retry.", 409);
263
264
  }
264
265
  /** Recipients need complete history; publication only checks that the commits exist.
@@ -448,18 +449,22 @@ async function readShareRepository(root) {
448
449
  }
449
450
  return { cloneUrl };
450
451
  }
451
- async function verifyShareRepository(root, pins, repository, commits = []) {
452
- const { cloneUrl } = repository ?? await readShareRepository(root);
452
+ /** Fetches through origin itself, so its transport and credentials apply. */
453
+ async function verifyShareRepository(root, pins, commits = []) {
454
+ const origin = (await sharedGit(root, [
455
+ "remote",
456
+ "get-url",
457
+ "origin"
458
+ ])).stdout.trim();
453
459
  const temporary = await mkdtemp(path.join(tmpdir(), "review-share-check-"));
454
460
  try {
455
- await fetchPinnedRepository(temporary, cloneUrl, pins, true, commits);
461
+ await fetchPinnedRepository(temporary, origin, pins, true, commits);
456
462
  } finally {
457
463
  await rm(temporary, {
458
464
  recursive: true,
459
465
  force: true
460
466
  });
461
467
  }
462
- return { cloneUrl };
463
468
  }
464
469
  //#endregion
465
470
  //#region src/sharing/import.ts
@@ -1,7 +1,7 @@
1
- import "./review-home-paths-D8AoCdd2.js";
1
+ import "./review-home-paths-BwH08ihj.js";
2
2
  import { N as devReviewHome } from "./s3-config-CjcLyFV5.js";
3
- import { n as askAgentIds } from "./thread-state-D6MlnGv7.js";
4
- import { t as ASK_THREAD_ENV } from "./request-origin--8lLCclv.js";
3
+ import { n as askAgentIds } from "./thread-state-BPpvKFwQ.js";
4
+ import { t as ASK_THREAD_ENV } from "./request-origin-BxaWyOpO.js";
5
5
  import { createRequire } from "node:module";
6
6
  import { constants } from "node:fs";
7
7
  import { access, chmod, mkdir, readFile, rename, stat, writeFile } from "node:fs/promises";