@dev.fast/whiteboard 0.4.1-preview.20261026.138 → 0.4.1-preview.20261026.140

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 (56) hide show
  1. package/dist/{account-alias-BPlPnzQM.js → account-alias-DpQNSiaM.js} +7 -7
  2. package/dist/agent-cli-D4JapSBa.js +2 -0
  3. package/dist/{agent-cli-BbCf9uid.js → agent-cli-z_qF_J8n.js} +11 -11
  4. package/dist/{agent-client-DfpM8F5N.js → agent-client-3980WBdQ.js} +3 -3
  5. package/dist/{authoring-tools-bm39DRoV.js → authoring-tools-CphR87Aa.js} +4 -4
  6. package/dist/{background-server-B--5p72o.js → background-server-Dq8Zf4OM.js} +6 -6
  7. package/dist/{background-server--0EeCCeV.js → background-server-GMGjm8xu.js} +1 -1
  8. package/dist/build-info.json +1 -1
  9. package/dist/{cli-DBTQIroM.js → cli-BPd7DLd-.js} +1 -1
  10. package/dist/{cli-runner-CRFCdb7G.js → cli-runner-iHNaGXZg.js} +25 -25
  11. package/dist/cli.js +3 -3
  12. package/dist/{fuzzy-match-l3mJZ1Ge.js → fuzzy-match-bbbTSBPK.js} +5 -5
  13. package/dist/{headless-host-BkJ9OUQY.js → headless-host-BEdTaS2j.js} +69 -41
  14. package/dist/{headless-host-5ei3nHS8.js → headless-host-CpqwtaaX.js} +1 -1
  15. package/dist/{import-Bwvf9Wos.js → import-DG435Ifj.js} +35 -12
  16. package/dist/{lens-selection-EuZdag4Q.js → lens-selection-fz59ca6x.js} +11 -2
  17. package/dist/{local-data-BCSeTyic.js → local-data-C4TFet-6.js} +46 -21
  18. package/dist/{mcp-_Xg1gQuA.js → mcp-C__btJSK.js} +3 -3
  19. package/dist/{package-paths-Bg731FHS.js → package-paths-LcO6HNp_.js} +2 -2
  20. package/dist/{profile-xzrUFgbT.js → profile-Bpsilnd7.js} +4 -4
  21. package/dist/profile-DPqMPFYS.js +2 -0
  22. package/dist/{remote-attach-DF25Epoa.js → remote-attach-BM9FaV1Q.js} +4 -4
  23. package/dist/{remote-extensions-CeywZL-Z.js → remote-extensions-DMKyDjAs.js} +4 -4
  24. package/dist/{remote-extensions-BJamgsCe.js → remote-extensions-VLpt_4Tn.js} +1 -1
  25. package/dist/{remote-language-server-CH8sG_CU.js → remote-language-server-c4fdgeA8.js} +6 -6
  26. package/dist/{remote-uninstall-Cq-lkBY7.js → remote-uninstall-DvBENfrg.js} +7 -7
  27. package/dist/{request-origin-CargJFvH.js → request-origin-CtTmXRoS.js} +3 -3
  28. package/dist/{review-app-launcher-D8ApNDUV.js → review-app-launcher-CffrNlrU.js} +3 -3
  29. package/dist/{review-home-paths-DcB4xLD-.js → review-home-paths-CjHB5c8m.js} +2 -2
  30. package/dist/{review-telemetry-BW7gJrSo.js → review-telemetry-_54CVkjH.js} +7 -7
  31. package/dist/{runtime-DY6Ctyog.js → runtime-5WG8rRgg.js} +1 -1
  32. package/dist/runtime.js +1 -1
  33. package/dist/{s3-BIWv4h1J.js → s3-CsG2EWED.js} +2 -2
  34. package/dist/{s3-config-Du3RBIvv.js → s3-config-zz4GWh2T.js} +1 -1
  35. package/dist/server/desktop-host.js +28 -18
  36. package/dist/{server-discovery-aHK_1r3U.js → server-discovery-BjelO8cl.js} +5 -5
  37. package/dist/sharing/index.d.ts +9 -2
  38. package/dist/sharing/index.js +1 -1
  39. package/dist/{src-DXnn7RrI.js → src-BTCRHmRM.js} +13 -6
  40. package/dist/{src-DEOc8bvC.js → src-D0h06Qsl.js} +9 -2
  41. package/dist/{src-DjRaCctk.js → src-KTjWplV9.js} +6 -6
  42. package/dist/{stored-document-migration-CwmTwTb8.js → stored-document-migration-B2Wp1ePB.js} +4 -4
  43. package/dist/{thread-state-CbLB0jUA.js → thread-state-Dbs5siMf.js} +1 -1
  44. package/dist/{tool-failure-DZaQzi4f.js → tool-failure-pgc2CD1C.js} +2 -2
  45. package/package.json +5 -4
  46. package/src/review-api/comparison-coverage.ts +8 -1
  47. package/src/review-api/file-lenses.ts +54 -31
  48. package/src/review-api/http.ts +7 -4
  49. package/src/review-api/local-data.ts +59 -13
  50. package/src/review-api/review-progress.ts +8 -21
  51. package/src/server/diffr-config.ts +81 -23
  52. package/src/server/review-gateway-hosts.ts +18 -2
  53. package/src/viewed-coverage.ts +19 -1
  54. package/dist/agent-cli-ipN_JmzG.js +0 -2
  55. package/dist/profile-C8zL4u3L.js +0 -2
  56. package/dist/{s3-config-D7Yt0VhS.js → s3-config-CjcLyFV5.js} +1 -1
@@ -1,15 +1,15 @@
1
1
  import { n as isJsonObject } from "./src-X9phtB2j.js";
2
- import { E as ReviewCliInstallStampSchema } from "./src-DEOc8bvC.js";
3
- import { G as removeAgentTraceHook, H as AGENT_TRACE_HOOK_AGENTS, I as disableAllTraceRepositories, L as enableTraceRepository, Q as readStoreAuth, R as listTraceRepositoryRoots, U as describeTraceHookOwners, W as installHarnessHooks, Y as traceScope, g as disableTraceMachine, h as configureTraceMachine, rt as StoreClient, v as traceMachineEnabled, y as traceMachineStatus, z as traceRepositoryStatus } from "./src-DjRaCctk.js";
4
- import { I as writeFileAtomicAsync, L as writePrivateJsonAtomic, N as devReviewHome, j as withFileLock } from "./s3-config-D7Yt0VhS.js";
5
- import { i as readReviewPackageVersion } from "./package-paths-Bg731FHS.js";
6
- import { n as reviewDesktopStateDir } from "./review-home-paths-DcB4xLD-.js";
2
+ import { E as ReviewCliInstallStampSchema } from "./src-D0h06Qsl.js";
3
+ import { G as removeAgentTraceHook, H as AGENT_TRACE_HOOK_AGENTS, I as disableAllTraceRepositories, L as enableTraceRepository, Q as readStoreAuth, R as listTraceRepositoryRoots, U as describeTraceHookOwners, W as installHarnessHooks, Y as traceScope, g as disableTraceMachine, h as configureTraceMachine, rt as StoreClient, v as traceMachineEnabled, y as traceMachineStatus, z as traceRepositoryStatus } from "./src-KTjWplV9.js";
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-LcO6HNp_.js";
6
+ import { n as reviewDesktopStateDir } from "./review-home-paths-CjHB5c8m.js";
7
7
  import { n as isFile, t as isDirectory } from "./fs-utils-BMPLt0cr.js";
8
- import { c as findExecutable, s as executableCommand } from "./fuzzy-match-l3mJZ1Ge.js";
8
+ import { c as findExecutable, s as executableCommand } from "./fuzzy-match-bbbTSBPK.js";
9
9
  import { createHash } from "node:crypto";
10
- import path from "node:path";
11
10
  import { constants } from "node:fs";
12
11
  import { access, chmod, lstat, mkdir, readFile, rm, stat, writeFile } from "node:fs/promises";
12
+ import path from "node:path";
13
13
  import os from "node:os";
14
14
  import { execFile } from "node:child_process";
15
15
  import { promisify } from "node:util";
@@ -0,0 +1,2 @@
1
+ import { n as runReviewAgentCli } from "./agent-cli-z_qF_J8n.js";
2
+ export { runReviewAgentCli };
@@ -1,15 +1,15 @@
1
1
  import { n as isJsonObject, u as parseJsonText } from "./src-X9phtB2j.js";
2
- import { v as traceMachineEnabled } from "./src-DjRaCctk.js";
3
- import { a as toolResultText, i as connectReviewInstance, s as ReviewApiError } from "./agent-client-DfpM8F5N.js";
4
- import { N as devReviewHome } from "./s3-config-D7Yt0VhS.js";
5
- import { n as readBuildCommit } from "./package-paths-Bg731FHS.js";
6
- import "./review-home-paths-DcB4xLD-.js";
7
- import { b as selectReviewInstance, u as REVIEW_INSTANCE_ENV } from "./server-discovery-aHK_1r3U.js";
8
- import { n as reviewSessionAgent } from "./review-telemetry-BW7gJrSo.js";
9
- import { a as REVIEW_VIA_HEADER, i as REVIEW_THREAD_HEADER, n as REVIEW_AGENT_HEADER, t as ASK_THREAD_ENV } from "./request-origin-CargJFvH.js";
10
- import { i as publicTool, n as RECOVERY, r as callPublicTool, t as toolFailure } from "./tool-failure-DZaQzi4f.js";
11
- import path from "node:path";
2
+ import { v as traceMachineEnabled } from "./src-KTjWplV9.js";
3
+ import { a as toolResultText, i as connectReviewInstance, s as ReviewApiError } from "./agent-client-3980WBdQ.js";
4
+ import { N as devReviewHome } from "./s3-config-CjcLyFV5.js";
5
+ import { n as readBuildCommit } from "./package-paths-LcO6HNp_.js";
6
+ import "./review-home-paths-CjHB5c8m.js";
7
+ import { b as selectReviewInstance, u as REVIEW_INSTANCE_ENV } from "./server-discovery-BjelO8cl.js";
8
+ import { n as reviewSessionAgent } from "./review-telemetry-_54CVkjH.js";
9
+ import { a as REVIEW_VIA_HEADER, i as REVIEW_THREAD_HEADER, n as REVIEW_AGENT_HEADER, t as ASK_THREAD_ENV } from "./request-origin-CtTmXRoS.js";
10
+ import { i as publicTool, n as RECOVERY, r as callPublicTool, t as toolFailure } from "./tool-failure-pgc2CD1C.js";
12
11
  import { existsSync } from "node:fs";
12
+ import path from "node:path";
13
13
  //#region src/review-api/install-update.ts
14
14
  /** Exits once an update replaces this install, or the Windows updater marks it. */
15
15
  function exitOnInstallUpdate(stderr) {
@@ -44,7 +44,7 @@ async function runReviewAgentCli(input) {
44
44
  [REVIEW_THREAD_HEADER, thread ?? ""]
45
45
  ]);
46
46
  if (mode === "mcp") {
47
- const { serveReviewMcp } = await import("./mcp-_Xg1gQuA.js");
47
+ const { serveReviewMcp } = await import("./mcp-C__btJSK.js");
48
48
  exitOnInstallUpdate(input.stderr);
49
49
  await serveReviewMcp(async (key, agentKind) => {
50
50
  const connected = await connectReviewInstance(key ? {
@@ -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-DEOc8bvC.js";
2
+ import "./src-D0h06Qsl.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-aHK_1r3U.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-BjelO8cl.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--0EeCCeV.js");
262
+ const { ensureServerWithoutDesktop } = await import("./background-server-GMGjm8xu.js");
263
263
  const server = await ensureServerWithoutDesktop({
264
264
  selection,
265
265
  env,
@@ -1,11 +1,11 @@
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-BCSeTyic.js";
3
- import { F as pathTargetSchema, z as publishedEdits } from "./stored-document-migration-CwmTwTb8.js";
2
+ import { c as activityBeginSchema, l as activityEndSchema, n as uploadSchema, r as commandSchema, u as activityUpdateSchema } from "./local-data-C4TFet-6.js";
3
+ import { F as pathTargetSchema, z as publishedEdits } from "./stored-document-migration-B2Wp1ePB.js";
4
4
  import { t as ReviewInputError } from "./input-error-OLgB_h31.js";
5
- import { t as findReviewPackageRoot } from "./package-paths-Bg731FHS.js";
5
+ import { t as findReviewPackageRoot } from "./package-paths-LcO6HNp_.js";
6
6
  import { z } from "zod";
7
- import path from "node:path";
8
7
  import { readFile } from "node:fs/promises";
8
+ import path from "node:path";
9
9
  //#region src/review-api/read-schemas.ts
10
10
  const version = z.union([z.literal("").transform(() => void 0), z.coerce.number().int().nonnegative()]).optional();
11
11
  const commit = z.string().min(1).optional();
@@ -1,10 +1,10 @@
1
- import "./src-DjRaCctk.js";
2
- import { D as liveLockOwner, k as processIsAlive } from "./s3-config-D7Yt0VhS.js";
3
- import { t as findReviewPackageRoot } from "./package-paths-Bg731FHS.js";
4
- import { a as readReviewServerHealth, c as reviewServerStateDir, i as readReviewServerDiscovery, n as desktopOwnsHome, p as desktopUsesHome, r as headlessServerLockPath } from "./server-discovery-aHK_1r3U.js";
5
- import { t as desktopApplicationInstalled } from "./review-app-launcher-D8ApNDUV.js";
6
- import path from "node:path";
1
+ import "./src-KTjWplV9.js";
2
+ import { D as liveLockOwner, k as processIsAlive } from "./s3-config-CjcLyFV5.js";
3
+ import { t as findReviewPackageRoot } from "./package-paths-LcO6HNp_.js";
4
+ import { a as readReviewServerHealth, c as reviewServerStateDir, i as readReviewServerDiscovery, n as desktopOwnsHome, p as desktopUsesHome, r as headlessServerLockPath } from "./server-discovery-BjelO8cl.js";
5
+ import { t as desktopApplicationInstalled } from "./review-app-launcher-CffrNlrU.js";
7
6
  import { mkdir, open, readFile, realpath, stat } from "node:fs/promises";
7
+ import path from "node:path";
8
8
  import { spawn } from "node:child_process";
9
9
  import { setTimeout } from "node:timers/promises";
10
10
  //#region src/server/background-server.ts
@@ -1,2 +1,2 @@
1
- import { a as headlessServerOwner, c as stopBackgroundServer, i as ensureServerWithoutDesktop, r as ensureBackgroundServer } from "./background-server-B--5p72o.js";
1
+ import { a as headlessServerOwner, c as stopBackgroundServer, i as ensureServerWithoutDesktop, r as ensureBackgroundServer } from "./background-server-Dq8Zf4OM.js";
2
2
  export { ensureBackgroundServer, ensureServerWithoutDesktop, headlessServerOwner, stopBackgroundServer };
@@ -1 +1 @@
1
- {"version":"0.4.1-preview.20261026.138","commit":"50bc2452b6dc5496460b10e223e4348b0802452f","dirty":true,"builtAt":"2026-10-26T20:42:51.182Z"}
1
+ {"version":"0.4.1-preview.20261026.140","commit":"8f78d327ad257ae3b6ca94ee1c00b56cef50a063","dirty":true,"builtAt":"2026-10-26T22:50:38.752Z"}
@@ -1,4 +1,4 @@
1
- import { r as connectReviewApi } from "./agent-client-DfpM8F5N.js";
1
+ import { r as connectReviewApi } from "./agent-client-3980WBdQ.js";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { z } from "zod";
4
4
  //#region src/sharing/cli.ts
@@ -1,22 +1,22 @@
1
- import { D as __commonJSMin, E as setLocalVcsCommandObserver, O as __require, k as __toESM } from "./src-DXnn7RrI.js";
1
+ import { D as __commonJSMin, E as setLocalVcsCommandObserver, O as __require, k as __toESM } from "./src-BTCRHmRM.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-DEOc8bvC.js";
4
- import { $ as runStoreLogin, A as loadS3TraceStorage, B as readTraceUserConfig, C as runTraceDeny, D as runTraceStoreInfo, E as runTraceStoreDelete, F as resolveTraceRepositoryTarget, J as traceHomeDir, K as resolveTraceCommand, M as selectTraceStorage, O as describeSelection, P as requireTraceConsent, Q as readStoreAuth, S as runTraceAllow, T as runTraceSessions, V as HOSTED_CAPTURE_SCOPE_DESCRIPTION, X as DEFAULT_STORE_ORIGIN, Y as traceScope, _ as readLegacyCaptureSettings, a as runTracePull$1, at as emitJsonEvent, c as runTraceEnable, ct as jsonRequestedInArgv, d as runTraceStatus, et as runStoreLogout, f as runTraceSync, i as runTraceList$1, it as withStoreAuthorization, l as runTraceInstallMachine, m as runTraceHook, n as resolveTraceReadStorage, nt as StoreApiError, o as runTraceShow, ot as failWithJsonError, p as runTraceGitHook, r as runTraceBlame, rt as StoreClient, s as runTraceDisable, st as humanStream, t as registerTraceCommands, tt as runStoreWhoami, u as runTraceRepair, v as traceMachineEnabled, w as runTraceOnboard, y as traceMachineStatus, z as traceRepositoryStatus } from "./src-DjRaCctk.js";
5
- import { o as ReviewApiClient, s as ReviewApiError } from "./agent-client-DfpM8F5N.js";
6
- 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-D7Yt0VhS.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-D0h06Qsl.js";
4
+ import { $ as runStoreLogin, A as loadS3TraceStorage, B as readTraceUserConfig, C as runTraceDeny, D as runTraceStoreInfo, E as runTraceStoreDelete, F as resolveTraceRepositoryTarget, J as traceHomeDir, K as resolveTraceCommand, M as selectTraceStorage, O as describeSelection, P as requireTraceConsent, Q as readStoreAuth, S as runTraceAllow, T as runTraceSessions, V as HOSTED_CAPTURE_SCOPE_DESCRIPTION, X as DEFAULT_STORE_ORIGIN, Y as traceScope, _ as readLegacyCaptureSettings, a as runTracePull$1, at as emitJsonEvent, c as runTraceEnable, ct as jsonRequestedInArgv, d as runTraceStatus, et as runStoreLogout, f as runTraceSync, i as runTraceList$1, it as withStoreAuthorization, l as runTraceInstallMachine, m as runTraceHook, n as resolveTraceReadStorage, nt as StoreApiError, o as runTraceShow, ot as failWithJsonError, p as runTraceGitHook, r as runTraceBlame, rt as StoreClient, s as runTraceDisable, st as humanStream, t as registerTraceCommands, tt as runStoreWhoami, u as runTraceRepair, v as traceMachineEnabled, w as runTraceOnboard, y as traceMachineStatus, z as traceRepositoryStatus } from "./src-KTjWplV9.js";
5
+ import { o as ReviewApiClient, s as ReviewApiError } from "./agent-client-3980WBdQ.js";
6
+ 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";
7
7
  import { t as errorMessage } from "./error-message-OtiDonty.js";
8
- import { i as readReviewPackageVersion, r as readBuildInfo, t as findReviewPackageRoot } from "./package-paths-Bg731FHS.js";
9
- import { t as resolveReviewRoot } from "./runtime-DY6Ctyog.js";
10
- import "./review-home-paths-DcB4xLD-.js";
11
- 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-aHK_1r3U.js";
12
- import { t as ReviewTelemetry } from "./review-telemetry-BW7gJrSo.js";
13
- import { t as fuzzyRank } from "./fuzzy-match-l3mJZ1Ge.js";
14
- 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-BPlPnzQM.js";
15
- import { n as focusReviewDesktop, r as runReviewAppLaunch } from "./review-app-launcher-D8ApNDUV.js";
16
- import { t as reviewAgentCliHelp } from "./agent-cli-BbCf9uid.js";
17
- import path from "node:path";
8
+ import { i as readReviewPackageVersion, r as readBuildInfo, t as findReviewPackageRoot } from "./package-paths-LcO6HNp_.js";
9
+ import { t as resolveReviewRoot } from "./runtime-5WG8rRgg.js";
10
+ import "./review-home-paths-CjHB5c8m.js";
11
+ 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-BjelO8cl.js";
12
+ import { t as ReviewTelemetry } from "./review-telemetry-_54CVkjH.js";
13
+ import { t as fuzzyRank } from "./fuzzy-match-bbbTSBPK.js";
14
+ 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-DpQNSiaM.js";
15
+ import { n as focusReviewDesktop, r as runReviewAppLaunch } from "./review-app-launcher-CffrNlrU.js";
16
+ import { t as reviewAgentCliHelp } from "./agent-cli-z_qF_J8n.js";
18
17
  import { existsSync, mkdirSync, renameSync, writeFileSync } from "node:fs";
19
18
  import { realpath } from "node:fs/promises";
19
+ import path from "node:path";
20
20
  import { Writable } from "node:stream";
21
21
  import { AsyncLocalStorage } from "node:async_hooks";
22
22
  import os from "node:os";
@@ -4334,7 +4334,7 @@ async function runReviewCli(input) {
4334
4334
  if (!Number.isInteger(port) || port < 0 || port > 65535) throw new ReviewCliUsageError("--port must be an integer between 0 and 65535.");
4335
4335
  const stateDir = reviewServerStateDir(authoringEnv(options.stateDir));
4336
4336
  if (options.detach) {
4337
- const { ensureBackgroundServer } = await import("./background-server--0EeCCeV.js");
4337
+ const { ensureBackgroundServer } = await import("./background-server-GMGjm8xu.js");
4338
4338
  const { discovery, started } = await ensureBackgroundServer({
4339
4339
  stateDir,
4340
4340
  env,
@@ -4356,7 +4356,7 @@ async function runReviewCli(input) {
4356
4356
  process.once("SIGINT", stop);
4357
4357
  process.once("SIGTERM", stop);
4358
4358
  process.once(DESKTOP_TAKEOVER_SIGNAL, takeover);
4359
- const { HeadlessServerBusyError, runHeadlessServer } = await import("./headless-host-5ei3nHS8.js");
4359
+ const { HeadlessServerBusyError, runHeadlessServer } = await import("./headless-host-CpqwtaaX.js");
4360
4360
  try {
4361
4361
  await runHeadlessServer({
4362
4362
  stateDir,
@@ -4393,7 +4393,7 @@ async function runReviewCli(input) {
4393
4393
  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) => {
4394
4394
  const options = command.optsWithGlobals();
4395
4395
  const stateDir = reviewServerStateDir(authoringEnv(options.stateDir));
4396
- const { headlessServerOwner, stopBackgroundServer } = await import("./background-server--0EeCCeV.js");
4396
+ const { headlessServerOwner, stopBackgroundServer } = await import("./background-server-GMGjm8xu.js");
4397
4397
  const owner = await headlessServerOwner(stateDir);
4398
4398
  const discovery = await readReviewServerDiscovery(stateDir);
4399
4399
  if (owner === void 0) {
@@ -4421,7 +4421,7 @@ async function runReviewCli(input) {
4421
4421
  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.`);
4422
4422
  const inUse = `A Whiteboard server is using ${stateDir}. Stop it first, then run whiteboard server reset-id again.`;
4423
4423
  if (await desktopUsesHome(stateDir, env)) return refuse(inUse, options.json);
4424
- const [{ openReviewProfile }, { withHeadlessServerLock }] = await Promise.all([import("./profile-C8zL4u3L.js"), import("./headless-host-5ei3nHS8.js")]);
4424
+ const [{ openReviewProfile }, { withHeadlessServerLock }] = await Promise.all([import("./profile-DPqMPFYS.js"), import("./headless-host-CpqwtaaX.js")]);
4425
4425
  const reset = await withHeadlessServerLock(await realpath(stateDir), async () => {
4426
4426
  const local = await openReviewProfile(stateDir, { manageWorkspaces: false });
4427
4427
  try {
@@ -4443,7 +4443,7 @@ async function runReviewCli(input) {
4443
4443
  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) => {
4444
4444
  const options = command.optsWithGlobals();
4445
4445
  const stateDir = reviewServerStateDir(authoringEnv(options.stateDir));
4446
- const { remoteAttach } = await import("./remote-attach-DF25Epoa.js");
4446
+ const { remoteAttach } = await import("./remote-attach-BM9FaV1Q.js");
4447
4447
  let attach;
4448
4448
  try {
4449
4449
  attach = await remoteAttach({
@@ -4470,7 +4470,7 @@ async function runReviewCli(input) {
4470
4470
  });
4471
4471
  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) => {
4472
4472
  const { json, groups } = command.optsWithGlobals();
4473
- const { ensureRemoteExtensions } = await import("./remote-extensions-BJamgsCe.js");
4473
+ const { ensureRemoteExtensions } = await import("./remote-extensions-VLpt_4Tn.js");
4474
4474
  const result = await ensureRemoteExtensions({
4475
4475
  env,
4476
4476
  groups: groups?.split(",").map((group) => group.trim())
@@ -4485,7 +4485,7 @@ async function runReviewCli(input) {
4485
4485
  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) => {
4486
4486
  const options = command.optsWithGlobals();
4487
4487
  const stateDir = reviewServerStateDir(authoringEnv(options.stateDir));
4488
- const { remoteUninstall } = await import("./remote-uninstall-Cq-lkBY7.js");
4488
+ const { remoteUninstall } = await import("./remote-uninstall-DvBENfrg.js");
4489
4489
  let deleteReviews = options.deleteReviews ? true : options.keepReviews ? false : void 0;
4490
4490
  if (deleteReviews === void 0 && !options.json && input.stdin?.isTTY) {
4491
4491
  const prompt = createInterface$1({
@@ -4707,14 +4707,14 @@ async function runReviewCli(input) {
4707
4707
  command.showHelpAfterError(false).error("Markdown review migration is no longer supported. Ask your agent to migrate your old Whiteboard reviews.");
4708
4708
  });
4709
4709
  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) => {
4710
- const { runShareCli } = await import("./cli-DBTQIroM.js");
4710
+ const { runShareCli } = await import("./cli-BPd7DLd-.js");
4711
4711
  state.exitCode = await runShareCli({
4712
4712
  ...input,
4713
4713
  ...options,
4714
4714
  env: authoringEnv()
4715
4715
  });
4716
4716
  }).command("revoke <share-id>").description("Revoke future downloads of a share"), "plain").action(async (shareId, options) => {
4717
- const { runShareCli } = await import("./cli-DBTQIroM.js");
4717
+ const { runShareCli } = await import("./cli-BPd7DLd-.js");
4718
4718
  state.exitCode = await runShareCli({
4719
4719
  ...input,
4720
4720
  ...options,
@@ -4795,7 +4795,7 @@ async function runReviewCli(input) {
4795
4795
  return commands;
4796
4796
  } });
4797
4797
  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) => {
4798
- const { runReviewAgentCli } = await import("./agent-cli-ipN_JmzG.js");
4798
+ const { runReviewAgentCli } = await import("./agent-cli-D4JapSBa.js");
4799
4799
  state.exitCode = await runReviewAgentCli({
4800
4800
  ...input,
4801
4801
  env: authoringEnv(),
package/dist/cli.js CHANGED
@@ -1,8 +1,8 @@
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-DEOc8bvC.js";
4
- import path from "node:path";
3
+ import "./src-D0h06Qsl.js";
5
4
  import { existsSync, readFileSync, readdirSync, realpathSync } from "node:fs";
5
+ import path from "node:path";
6
6
  import os from "node:os";
7
7
  import { spawnSync } from "node:child_process";
8
8
  import { fileURLToPath } from "node:url";
@@ -17,7 +17,7 @@ async function runCli(effectivePath) {
17
17
  `);
18
18
  return 1;
19
19
  }
20
- const { runReviewCli } = await import("./cli-runner-CRFCdb7G.js");
20
+ const { runReviewCli } = await import("./cli-runner-iHNaGXZg.js");
21
21
  return runReviewCli({
22
22
  argv,
23
23
  cliPaths: {
@@ -1,11 +1,11 @@
1
- import "./src-DjRaCctk.js";
2
- import { N as devReviewHome } from "./s3-config-D7Yt0VhS.js";
3
- import { n as askAgentIds } from "./thread-state-CbLB0jUA.js";
4
- import { t as ASK_THREAD_ENV } from "./request-origin-CargJFvH.js";
1
+ import "./src-KTjWplV9.js";
2
+ import { N as devReviewHome } from "./s3-config-CjcLyFV5.js";
3
+ import { n as askAgentIds } from "./thread-state-Dbs5siMf.js";
4
+ import { t as ASK_THREAD_ENV } from "./request-origin-CtTmXRoS.js";
5
5
  import { createRequire } from "node:module";
6
- import path from "node:path";
7
6
  import { constants } from "node:fs";
8
7
  import { access, chmod, mkdir, readFile, rename, stat, writeFile } from "node:fs/promises";
8
+ import path from "node:path";
9
9
  import { Readable, Writable } from "node:stream";
10
10
  import { homedir } from "node:os";
11
11
  import { execFile, spawn } from "node:child_process";
@@ -1,28 +1,28 @@
1
- import { b as resolveRepoContext, d as git, r as defaultBranch, w as runVcs } from "./src-DXnn7RrI.js";
1
+ import { b as resolveRepoContext, d as git, r as defaultBranch, w as runVcs } from "./src-BTCRHmRM.js";
2
2
  import { c as jsonString, m as isStringValue, n as isJsonObject, p as isObjectValue, u as parseJsonText } from "./src-X9phtB2j.js";
3
- import { _ as readBoundedStream, a as verifyShareRepository, c as exportShare, d as legacyModeSchema, f as lensReport, g as StreamLimitError, h as uncategorizedReport, i as readShareRepository, l as referenceCommits, m as reviewProgress, n as sharedReviewId, o as ShareAuthError, p as progressUpdateSchema, s as ShareClient, u as validateShareSources, v as parseShareLink, y as shareIdSchema } from "./import-Bwvf9Wos.js";
4
- import { d as invalidateStructuralComparisons, f as diffrExecutable, i as inspectSnapshot, m as readGitHubPullRequests, p as diffrMissingError, r as commandSchema } from "./local-data-BCSeTyic.js";
5
- import { F as decodeStructuralDiffEvent, N as reviewDiffrSummarizerInputSchema, O as ReviewFeedbackContactSchema, a as parseReviewVerbRequest, c as boardIconKind, i as parseReviewDesktopVerbResult, j as ReviewOnboardingRunRequestSchema, k as ReviewFeedbackSchema, l as boardTitle, m as REVIEW_CLIENT_REMOTE, p as REVIEW_CLIENT_HEADER, y as REVIEW_HOST_HEADER } from "./src-DEOc8bvC.js";
6
- import { $ as runStoreLogin, M as selectTraceStorage, N as TraceStorageDeniedError, Q as readStoreAuth, X as DEFAULT_STORE_ORIGIN, Z as clearStoreAuth, b as listReviewTraceSessions, j as resolveTraceStorage, k as isTraceStorageConfigured, q as shellQuote, v as traceMachineEnabled, x as loadReviewAgentTrace } from "./src-DjRaCctk.js";
7
- import { _ as scopedCoverage, s as formatAnchor, u as selectionKey } from "./lens-selection-EuZdag4Q.js";
8
- import { N as elements, O as boardLinks, Q as stepSources, f as sourceBranchName, k as boardRepositoryId, l as pullRequestKey, p as pullRequestProvider, q as selectionReferences, w as anchorPins } from "./stored-document-migration-CwmTwTb8.js";
3
+ import { _ as readBoundedStream, a as verifyShareRepository, c as exportShare, d as legacyModeSchema, f as lensReport, g as StreamLimitError, h as uncategorizedReport, i as readShareRepository, l as referenceCommits, m as reviewProgress, n as sharedReviewId, o as ShareAuthError, p as progressUpdateSchema, s as ShareClient, u as validateShareSources, v as parseShareLink, y as shareIdSchema } from "./import-DG435Ifj.js";
4
+ import { d as invalidateStructuralComparisons, f as diffrExecutable, i as inspectSnapshot, m as readGitHubPullRequests, p as diffrMissingError, r as commandSchema } from "./local-data-C4TFet-6.js";
5
+ import { I as decodeStructuralDiffEvent, N as reviewDiffrLoginsSchema, O as ReviewFeedbackContactSchema, P as reviewDiffrSummarizerInputSchema, a as parseReviewVerbRequest, c as boardIconKind, i as parseReviewDesktopVerbResult, j as ReviewOnboardingRunRequestSchema, k as ReviewFeedbackSchema, l as boardTitle, m as REVIEW_CLIENT_REMOTE, p as REVIEW_CLIENT_HEADER, y as REVIEW_HOST_HEADER } from "./src-D0h06Qsl.js";
6
+ import { $ as runStoreLogin, M as selectTraceStorage, N as TraceStorageDeniedError, Q as readStoreAuth, X as DEFAULT_STORE_ORIGIN, Z as clearStoreAuth, b as listReviewTraceSessions, j as resolveTraceStorage, k as isTraceStorageConfigured, q as shellQuote, v as traceMachineEnabled, x as loadReviewAgentTrace } from "./src-KTjWplV9.js";
7
+ import { _ as scopedCoverage, s as formatAnchor, u as selectionKey } from "./lens-selection-fz59ca6x.js";
8
+ import { N as elements, O as boardLinks, Q as stepSources, f as sourceBranchName, k as boardRepositoryId, l as pullRequestKey, p as pullRequestProvider, q as selectionReferences, w as anchorPins } from "./stored-document-migration-B2Wp1ePB.js";
9
9
  import { t as ReviewInputError } from "./input-error-OLgB_h31.js";
10
- import { A as processStartIdentity, L as writePrivateJsonAtomic, N as devReviewHome, h as TraceConfigurationError, i as isS3MockMode, j as withFileLock } from "./s3-config-D7Yt0VhS.js";
10
+ import { A as processStartIdentity, L as writePrivateJsonAtomic, N as devReviewHome, h as TraceConfigurationError, i as isS3MockMode, j as withFileLock } from "./s3-config-CjcLyFV5.js";
11
11
  import { t as errorMessage } from "./error-message-OtiDonty.js";
12
- import { i as readReviewPackageVersion, n as readBuildCommit, t as findReviewPackageRoot } from "./package-paths-Bg731FHS.js";
13
- import "./review-home-paths-DcB4xLD-.js";
14
- import { _ as reviewInstanceIdentity, n as desktopOwnsHome, o as reviewServerDiscoveryPath, p as desktopUsesHome, r as headlessServerLockPath, t as DESKTOP_TAKEOVER_SIGNAL } from "./server-discovery-aHK_1r3U.js";
15
- import { c as askPicksSchema, d as selectionMarkdown, l as askQuestionSchema, n as askAgentIds, r as askChoiceKinds, s as askPermissionsSchema, t as applyAskChange, u as AgentSelectionSchema } from "./thread-state-CbLB0jUA.js";
16
- import { t as openReviewProfile } from "./profile-xzrUFgbT.js";
17
- import { c as REVIEW_APP_SESSION_ID_HEADER, d as sanitizeUiTelemetryEvent, f as cleanTelemetryText, o as reviewRequestOrigin, r as REVIEW_PERSON_HEADER, s as BUNDLE_FRAME_PATTERN, t as ASK_THREAD_ENV, u as isReportableCleanedMessage } from "./request-origin-CargJFvH.js";
18
- import { a as defaultAskPermissions, i as askAgents, l as launchAskAgent, n as askAgentSettings, o as detectAskAgents, r as askAgentTakesMcp, t as fuzzyRank } from "./fuzzy-match-l3mJZ1Ge.js";
19
- import { a as inspectQuerySchema, i as renderInstructions, o as queryAnchor, r as instructionsQuerySchema, s as readQuerySchemas, t as authoringTools } from "./authoring-tools-bm39DRoV.js";
20
- import { a as headlessServerOwner, c as stopBackgroundServer, o as recordedBackgroundServer } from "./background-server-B--5p72o.js";
12
+ import { i as readReviewPackageVersion, n as readBuildCommit, t as findReviewPackageRoot } from "./package-paths-LcO6HNp_.js";
13
+ import "./review-home-paths-CjHB5c8m.js";
14
+ import { _ as reviewInstanceIdentity, n as desktopOwnsHome, o as reviewServerDiscoveryPath, p as desktopUsesHome, r as headlessServerLockPath, t as DESKTOP_TAKEOVER_SIGNAL } from "./server-discovery-BjelO8cl.js";
15
+ import { c as askPicksSchema, d as selectionMarkdown, l as askQuestionSchema, n as askAgentIds, r as askChoiceKinds, s as askPermissionsSchema, t as applyAskChange, u as AgentSelectionSchema } from "./thread-state-Dbs5siMf.js";
16
+ import { t as openReviewProfile } from "./profile-Bpsilnd7.js";
17
+ import { c as REVIEW_APP_SESSION_ID_HEADER, d as sanitizeUiTelemetryEvent, f as cleanTelemetryText, o as reviewRequestOrigin, r as REVIEW_PERSON_HEADER, s as BUNDLE_FRAME_PATTERN, t as ASK_THREAD_ENV, u as isReportableCleanedMessage } from "./request-origin-CtTmXRoS.js";
18
+ import { a as defaultAskPermissions, i as askAgents, l as launchAskAgent, n as askAgentSettings, o as detectAskAgents, r as askAgentTakesMcp, t as fuzzyRank } from "./fuzzy-match-bbbTSBPK.js";
19
+ import { a as inspectQuerySchema, i as renderInstructions, o as queryAnchor, r as instructionsQuerySchema, s as readQuerySchemas, t as authoringTools } from "./authoring-tools-CphR87Aa.js";
20
+ import { a as headlessServerOwner, c as stopBackgroundServer, o as recordedBackgroundServer } from "./background-server-Dq8Zf4OM.js";
21
21
  import crypto$1, { createHash, randomBytes, randomUUID } from "node:crypto";
22
22
  import { z } from "zod";
23
- import path, { join } from "node:path";
24
23
  import { existsSync, mkdirSync, writeFileSync } from "node:fs";
25
24
  import { mkdir, mkdtemp, readFile, realpath, rm, stat, writeFile } from "node:fs/promises";
25
+ import path, { join } from "node:path";
26
26
  import { Writable } from "node:stream";
27
27
  import os, { tmpdir } from "node:os";
28
28
  import { execFile, spawn } from "node:child_process";
@@ -1418,6 +1418,7 @@ function serialized(operation) {
1418
1418
  function diffrArgv(args) {
1419
1419
  switch (args.command) {
1420
1420
  case "schema": return ["config", "schema"];
1421
+ case "logins": return ["config", "logins"];
1421
1422
  case "show": return [
1422
1423
  "config",
1423
1424
  "show",
@@ -1505,24 +1506,40 @@ function movesKey(config, draft) {
1505
1506
  function environmentKey(providers, id) {
1506
1507
  return providers.find((provider) => provider.id === id)?.keyVariables.map((name) => process.env[name]).find((key) => !!key);
1507
1508
  }
1509
+ function signedIn(providers, logins, id) {
1510
+ const login = providers.find((provider) => provider.id === id)?.login;
1511
+ return !!login && !!logins[login]?.ready;
1512
+ }
1513
+ /** Older diffr builds have no sign-ins. */
1514
+ async function readLogins(rootPath, signal) {
1515
+ try {
1516
+ const result = reviewDiffrLoginsSchema.safeParse(json(await diffr({ command: "logins" }, rootPath, { signal })));
1517
+ return result.success ? result.data : {};
1518
+ } catch {
1519
+ return {};
1520
+ }
1521
+ }
1508
1522
  function keyOptional(providers, id, endpoint) {
1509
1523
  return endpoint !== "" && !!providers.find((provider) => provider.id === id)?.keylessCustomEndpoint;
1510
1524
  }
1511
1525
  function strings(value) {
1512
1526
  return Array.isArray(value) ? value.filter(isStringValue) : [];
1513
1527
  }
1528
+ const summarizeSchema = "properties.plugins.properties.shape.properties.bundled.properties.summarize.properties";
1529
+ async function readSchema(rootPath) {
1530
+ try {
1531
+ return json(await diffr({ command: "schema" }, rootPath));
1532
+ } catch {
1533
+ return;
1534
+ }
1535
+ }
1514
1536
  /**
1515
1537
  * Defaults supplied by diffr's schema for tag hiding and summary controls.
1516
1538
  * If the schema cannot be read, resolved settings still work.
1517
1539
  */
1518
- async function configDefaults(rootPath) {
1519
- let schema;
1520
- try {
1521
- schema = json(await diffr({ command: "schema" }, rootPath));
1522
- } catch {
1523
- return {};
1524
- }
1525
- const options = valueAt(schema, "properties.plugins.properties.shape.properties.bundled.properties.summarize.properties");
1540
+ function configDefaults(schema) {
1541
+ if (!schema) return {};
1542
+ const options = valueAt(schema, summarizeSchema);
1526
1543
  const defaultHiddenTags = strings(valueAt(schema, "properties.plugins.properties.classify.properties.bundled.properties.hide.default"));
1527
1544
  if (!isJsonObject(options)) return { defaultHiddenTags };
1528
1545
  const option = (name) => isJsonObject(options[name]) ? options[name] : {};
@@ -1534,13 +1551,15 @@ async function configDefaults(rootPath) {
1534
1551
  const detail = isJsonObject(details) ? details[id] : void 0;
1535
1552
  const model = isJsonObject(models) ? models[id] : void 0;
1536
1553
  const endpoint = isJsonObject(detail) ? detail.endpoint : void 0;
1554
+ const login = isJsonObject(detail) ? detail.login : void 0;
1537
1555
  return {
1538
1556
  id,
1539
1557
  title: titles[index] ?? id,
1540
1558
  model: isStringValue(model) ? model : "",
1541
1559
  endpoint: isStringValue(endpoint) ? endpoint : "",
1542
1560
  keyVariables: isJsonObject(detail) ? strings(detail.key_variables) : [],
1543
- keylessCustomEndpoint: isJsonObject(detail) && detail.keyless_custom_endpoint === true
1561
+ keylessCustomEndpoint: isJsonObject(detail) && detail.keyless_custom_endpoint === true,
1562
+ ...isStringValue(login) && { login }
1544
1563
  };
1545
1564
  });
1546
1565
  const prompt = option("system_prompt");
@@ -1552,9 +1571,11 @@ async function configDefaults(rootPath) {
1552
1571
  }
1553
1572
  async function read(rootPath) {
1554
1573
  const config = await values(rootPath);
1555
- const defaults = await configDefaults(rootPath);
1574
+ const defaults = configDefaults(await readSchema(rootPath));
1575
+ const logins = await readLogins(rootPath);
1576
+ const providers = defaults.providers ?? [];
1556
1577
  const saved = valueAt(config, `${prefix}.api_key`);
1557
- const credentialSource = isStringValue(saved) && saved.length > 0 ? "config" : environmentKey(defaults.providers ?? [], savedProvider(config)) ? "environment" : "missing";
1578
+ const credentialSource = isStringValue(saved) && saved.length > 0 ? "config" : environmentKey(providers, savedProvider(config)) ? "environment" : signedIn(providers, logins, savedProvider(config)) ? "login" : "missing";
1558
1579
  const plugins = valueAt(config, "plugins.shape");
1559
1580
  if (isJsonObject(plugins)) {
1560
1581
  const entries = isJsonObject(plugins.bundled) ? [...Object.values(plugins), ...Object.values(plugins.bundled)] : Object.values(plugins);
@@ -1563,6 +1584,7 @@ async function read(rootPath) {
1563
1584
  return {
1564
1585
  values: config,
1565
1586
  credentialSource,
1587
+ logins,
1566
1588
  ...defaults
1567
1589
  };
1568
1590
  }
@@ -1608,11 +1630,14 @@ function saveDiffrSummarizer(input, rootPath) {
1608
1630
  const providers = current.providers ?? [];
1609
1631
  const moving = movesKey(current.values, draft);
1610
1632
  const savedKey = current.credentialSource === "config";
1611
- if (draft.enabled && !draft.apiKey && !(savedKey && !moving) && !environmentKey(providers, draft.provider) && !keyOptional(providers, draft.provider, draft.endpoint)) return {
1612
- ...current,
1613
- changed: false,
1614
- error: "Add an API key before enabling summaries."
1615
- };
1633
+ if (draft.enabled && !draft.apiKey && !(savedKey && !moving) && !environmentKey(providers, draft.provider) && !signedIn(providers, current.logins ?? {}, draft.provider) && !keyOptional(providers, draft.provider, draft.endpoint)) {
1634
+ const login = providers.find((provider) => provider.id === draft.provider)?.login;
1635
+ return {
1636
+ ...current,
1637
+ changed: false,
1638
+ error: login && current.logins?.[login]?.message || "Add an API key before enabling summaries."
1639
+ };
1640
+ }
1616
1641
  const summarize = {
1617
1642
  enabled: draft.enabled,
1618
1643
  provider: draft.provider,
@@ -1639,10 +1664,11 @@ async function testDiffrSummarizer(input, rootPath, signal) {
1639
1664
  const saved = valueAt(config, prefix);
1640
1665
  if (!isJsonObject(saved)) throw new Error("The summarizer is not available in this configuration.");
1641
1666
  const { provider, endpoint, model, systemPrompt } = parsed.data;
1642
- const providers = (await configDefaults(rootPath)).providers ?? [];
1667
+ const schema = await readSchema(rootPath);
1668
+ const providers = configDefaults(schema).providers ?? [];
1643
1669
  const variables = providers.find((known) => known.id === provider)?.keyVariables ?? [];
1644
1670
  const apiKey = parsed.data.apiKey || (!movesKey(config, parsed.data) && isStringValue(saved.api_key) ? saved.api_key : "") || environmentKey(providers, provider);
1645
- if (!apiKey && !keyOptional(providers, provider, endpoint)) throw new Error("Add an API key to test summaries.");
1671
+ if (!apiKey && !keyOptional(providers, provider, endpoint) && !signedIn(providers, await readLogins(rootPath, deadline), provider)) throw new Error("Add an API key to test summaries.");
1646
1672
  directory = await mkdtemp(join(tmpdir(), "review-summary-"));
1647
1673
  const options = {
1648
1674
  ...saved,
@@ -1651,6 +1677,7 @@ async function testDiffrSummarizer(input, rootPath, signal) {
1651
1677
  model,
1652
1678
  ...systemPrompt.trim() && { system_prompt: systemPrompt },
1653
1679
  min_lines: 1,
1680
+ ...schema && isJsonObject(valueAt(schema, `${summarizeSchema}.max_length_ratio`)) && { max_length_ratio: 1e3 },
1654
1681
  retries: 0,
1655
1682
  request_timeout_ms: 45e3
1656
1683
  };
@@ -1689,7 +1716,7 @@ async function testDiffrSummarizer(input, rootPath, signal) {
1689
1716
  const summary = events.flatMap((event) => event.type === "file" && event.diff?.type === "text" ? [event.diff.rhs, event.diff.lhs].flatMap((source) => source ? labels(source.root) : []) : []).find((label) => label.trim());
1690
1717
  if (complete?.type === "complete" && complete.failed === 0 && !complete.aborted && !events.some((event) => event.type === "file" && event.error) && summary) return apiKey ? summary.split(apiKey).join("[redacted]") : summary;
1691
1718
  } catch {}
1692
- throw new Error("No summary was produced. Check the API key, model, and network connection.");
1719
+ throw new Error("No summary was produced. Check the API key or sign-in, the model, and the network connection.");
1693
1720
  } finally {
1694
1721
  testing = false;
1695
1722
  if (directory) await rm(directory, {
@@ -3678,7 +3705,7 @@ function createReviewApi(store, data, open, shared, capabilities = () => ({
3678
3705
  value: {
3679
3706
  ...readReview(reviewId),
3680
3707
  activity: store.activity.read(reviewId),
3681
- coverageRevision: data?.coverageRevision ?? 0,
3708
+ coverageRevision: data?.coverageRevision(reviewId) ?? 0,
3682
3709
  linksRevision: linksRevision.get(reviewId) ?? 0,
3683
3710
  placeRevision: placeKeys.get(reviewId)
3684
3711
  }
@@ -3730,9 +3757,10 @@ function createReviewApi(store, data, open, shared, capabilities = () => ({
3730
3757
  return watch(lines, (notify) => {
3731
3758
  const stops = [
3732
3759
  store.watchWorktrees(),
3733
- data?.subscribeCoverage(() => {
3734
- reviewIds.forEach((id) => dirtyReviews.add(id));
3735
- notify();
3760
+ data?.subscribeCoverage((changed) => {
3761
+ let marked = false;
3762
+ for (const id of changed) marked = markReview(id) || marked;
3763
+ if (marked) notify();
3736
3764
  }) ?? (() => {}),
3737
3765
  store.subscribe((result) => {
3738
3766
  let marked = markReview(result.reviewId);
@@ -1,2 +1,2 @@
1
- import { i as withHeadlessServerLock, n as runHeadlessServer, r as takeOverServerHome, t as HeadlessServerBusyError } from "./headless-host-BkJ9OUQY.js";
1
+ import { i as withHeadlessServerLock, n as runHeadlessServer, r as takeOverServerHome, t as HeadlessServerBusyError } from "./headless-host-BEdTaS2j.js";
2
2
  export { HeadlessServerBusyError, runHeadlessServer, takeOverServerHome, withHeadlessServerLock };