@dev.fast/whiteboard 0.5.2-preview.20261104.147 → 0.5.2-preview.20261109.149
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.
- package/dist/{account-alias-DXpd0Px8.js → account-alias-Cs5YqXRj.js} +4 -4
- package/dist/agent-cli-DdUAmdca.js +2 -0
- package/dist/{agent-cli-COrZtFks.js → agent-cli-a5J-juuu.js} +8 -8
- package/dist/{agent-client-BFtYm3Ng.js → agent-client-CgnEo6lf.js} +3 -3
- package/dist/{authoring-tools-D1avYp8-.js → authoring-tools-BgZvnbjN.js} +3 -3
- package/dist/{background-server-HOJozY99.js → background-server-D8SaPvuC.js} +1 -1
- package/dist/{background-server-BiRSqjxG.js → background-server-DHEcsFwH.js} +4 -4
- package/dist/build-info.json +1 -1
- package/dist/{cli-CSlwGRvH.js → cli-Bq5zVqlc.js} +1 -1
- package/dist/{cli-runner-CuffXA0Q.js → cli-runner-hL2efcxb.js} +21 -21
- package/dist/cli.js +1 -1
- package/dist/{fuzzy-match-DEo941za.js → fuzzy-match-DNyQDN3P.js} +2 -2
- package/dist/{headless-host-BCkXVVpU.js → headless-host-CGyfb5mS.js} +1 -1
- package/dist/{headless-host-CIuJJjmM.js → headless-host-bb09yVkX.js} +17 -15
- package/dist/{import-CjcW7EIQ.js → import-_XAsWqen.js} +24 -139
- package/dist/{local-data-B5PBZ0Ge.js → local-data-ZQIkF5k1.js} +81 -70
- package/dist/{mcp-Ba3WvhUh.js → mcp-B-J8P5xm.js} +4 -4
- package/dist/{package-paths-Dk7MOXxN.js → package-paths-wobHueCx.js} +1 -1
- package/dist/profile-Bi2SbpSI.js +2 -0
- package/dist/{profile-CNMhLUhf.js → profile-D-SbO3p9.js} +2 -2
- package/dist/{remote-attach-DkZoYBHV.js → remote-attach-DyIESbbf.js} +4 -4
- package/dist/{remote-extensions-BvV29_gk.js → remote-extensions-BHHFPyYW.js} +1 -1
- package/dist/{remote-extensions-L95HNwIH.js → remote-extensions-gTMcRBg-.js} +2 -2
- package/dist/{remote-language-server-l4ConTfj.js → remote-language-server-Pp261dqJ.js} +4 -4
- package/dist/{remote-uninstall-BAQM7cU8.js → remote-uninstall-D_hSuBik.js} +5 -5
- package/dist/{request-origin-DZexKlc4.js → request-origin-ENYd0Ymr.js} +1 -1
- package/dist/{review-app-launcher-B5F10y_4.js → review-app-launcher-DR5vYGEl.js} +1 -1
- package/dist/{review-home-paths-BmZX2qiz.js → review-home-paths-B8909D07.js} +19 -19
- package/dist/{review-telemetry-kQ7esDRE.js → review-telemetry-CxNvwdDS.js} +4 -4
- package/dist/server/desktop-host.js +74 -16
- package/dist/{server-discovery-DYY_xeG9.js → server-discovery-Fme7f3fb.js} +2 -2
- package/dist/sharing/index.d.ts +21 -21
- package/dist/sharing/index.js +1 -1
- package/dist/{src-DirPN_Qh.js → src-BPrngiWX.js} +1769 -1
- package/dist/{stored-document-migration-vg0NAzXG.js → stored-document-migration-BQcUyXO8.js} +4 -73
- package/dist/{tool-failure-BLBwcl3H.js → tool-failure-Cgjidoud.js} +5 -5
- package/package.json +5 -6
- package/src/review-api/comparison-coverage.ts +6 -20
- package/src/review-api/http.ts +20 -16
- package/src/review-api/review-progress.ts +38 -123
- package/src/review-api/store.ts +4 -6
- package/src/server/review-gateway-pushes.ts +5 -1
- package/src/server/review-gateway.ts +15 -1
- package/src/software-map-diff-counts.ts +4 -2
- package/src/viewed-coverage.ts +9 -252
- package/dist/agent-cli-x6-Eh1S-.js +0 -2
- package/dist/profile-BstQkIY0.js +0 -2
- package/src/review-api/file-lenses.ts +0 -125
- package/src/unified-diff.ts +0 -71
- package/dist/{s3-CsG2EWED.js → s3-d8RGPKwt.js} +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as isJsonObject } from "./src-X9phtB2j.js";
|
|
2
|
-
import { D as ReviewCliInstallStampSchema } from "./src-B-91Rd2d.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-BmZX2qiz.js";
|
|
4
2
|
import { I as writeFileAtomicAsync, L as writePrivateJsonAtomic, N as devReviewHome, j as withFileLock } from "./s3-config-CjcLyFV5.js";
|
|
5
|
-
import {
|
|
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-B8909D07.js";
|
|
4
|
+
import { i as readReviewPackageVersion } from "./package-paths-wobHueCx.js";
|
|
5
|
+
import { D as ReviewCliInstallStampSchema } from "./src-B-91Rd2d.js";
|
|
6
6
|
import { f as isDirectory, p as isFile } from "./thread-state-Jxoh1hde.js";
|
|
7
|
-
import { c as findExecutable, s as executableCommand } from "./fuzzy-match-
|
|
7
|
+
import { c as findExecutable, s as executableCommand } from "./fuzzy-match-DNyQDN3P.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-BmZX2qiz.js";
|
|
3
|
-
import { a as toolResultText, i as connectReviewInstance, s as ReviewApiError } from "./agent-client-BFtYm3Ng.js";
|
|
4
2
|
import { N as devReviewHome } from "./s3-config-CjcLyFV5.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
3
|
+
import { T as traceMachineEnabled } from "./review-home-paths-B8909D07.js";
|
|
4
|
+
import { n as readBuildCommit } from "./package-paths-wobHueCx.js";
|
|
5
|
+
import { a as toolResultText, i as connectReviewInstance, s as ReviewApiError } from "./agent-client-CgnEo6lf.js";
|
|
6
|
+
import { b as selectReviewInstance, u as REVIEW_INSTANCE_ENV } from "./server-discovery-Fme7f3fb.js";
|
|
7
|
+
import { n as reviewSessionAgent } from "./review-telemetry-CxNvwdDS.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-ENYd0Ymr.js";
|
|
9
|
+
import { a as renderedImage, i as publicTool, n as RECOVERY, r as callPublicTool, t as toolFailure } from "./tool-failure-Cgjidoud.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-
|
|
46
|
+
const { serveReviewMcp } = await import("./mcp-B-J8P5xm.js");
|
|
47
47
|
exitOnInstallUpdate(input.stderr);
|
|
48
48
|
await serveReviewMcp(async (key, agentKind) => {
|
|
49
49
|
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 {
|
|
2
|
+
import { mt as ReviewInputError } from "./src-BPrngiWX.js";
|
|
3
3
|
import "./src-B-91Rd2d.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-
|
|
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-Fme7f3fb.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-
|
|
262
|
+
const { ensureServerWithoutDesktop } = await import("./background-server-D8SaPvuC.js");
|
|
263
263
|
const server = await ensureServerWithoutDesktop({
|
|
264
264
|
selection,
|
|
265
265
|
env,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as isJsonObject } from "./src-X9phtB2j.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as uploadSchema, r as commandSchema } from "./local-data-
|
|
4
|
-
import { t as findReviewPackageRoot } from "./package-paths-
|
|
2
|
+
import { I as componentReference, R as writableBlockTypes, _t as activityUpdateSchema, gt as activityEndSchema, h as pathTargetSchema, ht as activityBeginSchema, mt as ReviewInputError, y as publishedEdits } from "./src-BPrngiWX.js";
|
|
3
|
+
import { n as uploadSchema, r as commandSchema } from "./local-data-ZQIkF5k1.js";
|
|
4
|
+
import { t as findReviewPackageRoot } from "./package-paths-wobHueCx.js";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import { readFile } from "node:fs/promises";
|
|
7
7
|
import path from "node:path";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as headlessServerOwner, c as stopBackgroundServer, i as ensureServerWithoutDesktop, r as ensureBackgroundServer } from "./background-server-
|
|
1
|
+
import { a as headlessServerOwner, c as stopBackgroundServer, i as ensureServerWithoutDesktop, r as ensureBackgroundServer } from "./background-server-DHEcsFwH.js";
|
|
2
2
|
export { ensureBackgroundServer, ensureServerWithoutDesktop, headlessServerOwner, stopBackgroundServer };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./review-home-paths-BmZX2qiz.js";
|
|
2
1
|
import { D as liveLockOwner, k as processIsAlive } from "./s3-config-CjcLyFV5.js";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import "./review-home-paths-B8909D07.js";
|
|
3
|
+
import { t as findReviewPackageRoot } from "./package-paths-wobHueCx.js";
|
|
4
|
+
import { a as readReviewServerHealth, c as reviewServerStateDir, i as readReviewServerDiscovery, n as desktopOwnsHome, p as desktopUsesHome, r as headlessServerLockPath } from "./server-discovery-Fme7f3fb.js";
|
|
5
|
+
import { t as desktopApplicationInstalled } from "./review-app-launcher-DR5vYGEl.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";
|
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.5.2-preview.
|
|
1
|
+
{"version":"0.5.2-preview.20261109.149","commit":"4c0a0af9c57fe774cc885574b7e4236309456dc1","dirty":true,"builtAt":"2026-11-09T21:16:08.874Z"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { D as __commonJSMin, E as setLocalVcsCommandObserver, O as __require, k as __toESM } from "./src-Y30gweiK.js";
|
|
2
2
|
import { c as jsonString, n as isJsonObject, u as parseJsonText } from "./src-X9phtB2j.js";
|
|
3
|
-
import { C as REVIEW_REMOTE_ATTACH_END, S as REVIEW_REMOTE_ATTACH_BEGIN, h as REVIEW_CLI_INSTALL_TARGET_LABELS, l as boardTitle, x as REVIEW_REMOTE_AGENT_IDS } from "./src-B-91Rd2d.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-BmZX2qiz.js";
|
|
5
|
-
import { o as ReviewApiClient, s as ReviewApiError } from "./agent-client-BFtYm3Ng.js";
|
|
6
3
|
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";
|
|
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-B8909D07.js";
|
|
7
5
|
import { t as errorMessage } from "./error-message-OtiDonty.js";
|
|
8
|
-
import { i as readReviewPackageVersion, r as readBuildInfo, t as findReviewPackageRoot } from "./package-paths-
|
|
6
|
+
import { i as readReviewPackageVersion, r as readBuildInfo, t as findReviewPackageRoot } from "./package-paths-wobHueCx.js";
|
|
7
|
+
import { C as REVIEW_REMOTE_ATTACH_END, S as REVIEW_REMOTE_ATTACH_BEGIN, h as REVIEW_CLI_INSTALL_TARGET_LABELS, l as boardTitle, x as REVIEW_REMOTE_AGENT_IDS } from "./src-B-91Rd2d.js";
|
|
8
|
+
import { o as ReviewApiClient, s as ReviewApiError } from "./agent-client-CgnEo6lf.js";
|
|
9
9
|
import { t as resolveReviewRoot } from "./runtime-Bhk5L_SN.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-
|
|
11
|
-
import { t as ReviewTelemetry } from "./review-telemetry-
|
|
12
|
-
import { t as fuzzyRank } from "./fuzzy-match-
|
|
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-
|
|
14
|
-
import { n as focusReviewDesktop, r as runReviewAppLaunch } from "./review-app-launcher-
|
|
15
|
-
import { t as reviewAgentCliHelp } from "./agent-cli-
|
|
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-Fme7f3fb.js";
|
|
11
|
+
import { t as ReviewTelemetry } from "./review-telemetry-CxNvwdDS.js";
|
|
12
|
+
import { t as fuzzyRank } from "./fuzzy-match-DNyQDN3P.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-Cs5YqXRj.js";
|
|
14
|
+
import { n as focusReviewDesktop, r as runReviewAppLaunch } from "./review-app-launcher-DR5vYGEl.js";
|
|
15
|
+
import { t as reviewAgentCliHelp } from "./agent-cli-a5J-juuu.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";
|
|
@@ -4333,7 +4333,7 @@ async function runReviewCli(input) {
|
|
|
4333
4333
|
if (!Number.isInteger(port) || port < 0 || port > 65535) throw new ReviewCliUsageError("--port must be an integer between 0 and 65535.");
|
|
4334
4334
|
const stateDir = reviewServerStateDir(authoringEnv(options.stateDir));
|
|
4335
4335
|
if (options.detach) {
|
|
4336
|
-
const { ensureBackgroundServer } = await import("./background-server-
|
|
4336
|
+
const { ensureBackgroundServer } = await import("./background-server-D8SaPvuC.js");
|
|
4337
4337
|
const { discovery, started } = await ensureBackgroundServer({
|
|
4338
4338
|
stateDir,
|
|
4339
4339
|
env,
|
|
@@ -4355,7 +4355,7 @@ async function runReviewCli(input) {
|
|
|
4355
4355
|
process.once("SIGINT", stop);
|
|
4356
4356
|
process.once("SIGTERM", stop);
|
|
4357
4357
|
process.once(DESKTOP_TAKEOVER_SIGNAL, takeover);
|
|
4358
|
-
const { HeadlessServerBusyError, runHeadlessServer } = await import("./headless-host-
|
|
4358
|
+
const { HeadlessServerBusyError, runHeadlessServer } = await import("./headless-host-CGyfb5mS.js");
|
|
4359
4359
|
try {
|
|
4360
4360
|
await runHeadlessServer({
|
|
4361
4361
|
stateDir,
|
|
@@ -4392,7 +4392,7 @@ async function runReviewCli(input) {
|
|
|
4392
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) => {
|
|
4393
4393
|
const options = command.optsWithGlobals();
|
|
4394
4394
|
const stateDir = reviewServerStateDir(authoringEnv(options.stateDir));
|
|
4395
|
-
const { headlessServerOwner, stopBackgroundServer } = await import("./background-server-
|
|
4395
|
+
const { headlessServerOwner, stopBackgroundServer } = await import("./background-server-D8SaPvuC.js");
|
|
4396
4396
|
const owner = await headlessServerOwner(stateDir);
|
|
4397
4397
|
const discovery = await readReviewServerDiscovery(stateDir);
|
|
4398
4398
|
if (owner === void 0) {
|
|
@@ -4420,7 +4420,7 @@ async function runReviewCli(input) {
|
|
|
4420
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.`);
|
|
4421
4421
|
const inUse = `A Whiteboard server is using ${stateDir}. Stop it first, then run whiteboard server reset-id again.`;
|
|
4422
4422
|
if (await desktopUsesHome(stateDir, env)) return refuse(inUse, options.json);
|
|
4423
|
-
const [{ openReviewProfile }, { withHeadlessServerLock }] = await Promise.all([import("./profile-
|
|
4423
|
+
const [{ openReviewProfile }, { withHeadlessServerLock }] = await Promise.all([import("./profile-Bi2SbpSI.js"), import("./headless-host-CGyfb5mS.js")]);
|
|
4424
4424
|
const reset = await withHeadlessServerLock(await realpath(stateDir), async () => {
|
|
4425
4425
|
const local = await openReviewProfile(stateDir, { manageWorkspaces: false });
|
|
4426
4426
|
try {
|
|
@@ -4442,7 +4442,7 @@ async function runReviewCli(input) {
|
|
|
4442
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) => {
|
|
4443
4443
|
const options = command.optsWithGlobals();
|
|
4444
4444
|
const stateDir = reviewServerStateDir(authoringEnv(options.stateDir));
|
|
4445
|
-
const { remoteAttach } = await import("./remote-attach-
|
|
4445
|
+
const { remoteAttach } = await import("./remote-attach-DyIESbbf.js");
|
|
4446
4446
|
let attach;
|
|
4447
4447
|
try {
|
|
4448
4448
|
attach = await remoteAttach({
|
|
@@ -4469,7 +4469,7 @@ async function runReviewCli(input) {
|
|
|
4469
4469
|
});
|
|
4470
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) => {
|
|
4471
4471
|
const { json, groups } = command.optsWithGlobals();
|
|
4472
|
-
const { ensureRemoteExtensions } = await import("./remote-extensions-
|
|
4472
|
+
const { ensureRemoteExtensions } = await import("./remote-extensions-BHHFPyYW.js");
|
|
4473
4473
|
const result = await ensureRemoteExtensions({
|
|
4474
4474
|
env,
|
|
4475
4475
|
groups: groups?.split(",").map((group) => group.trim())
|
|
@@ -4484,7 +4484,7 @@ async function runReviewCli(input) {
|
|
|
4484
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) => {
|
|
4485
4485
|
const options = command.optsWithGlobals();
|
|
4486
4486
|
const stateDir = reviewServerStateDir(authoringEnv(options.stateDir));
|
|
4487
|
-
const { remoteUninstall } = await import("./remote-uninstall-
|
|
4487
|
+
const { remoteUninstall } = await import("./remote-uninstall-D_hSuBik.js");
|
|
4488
4488
|
let deleteReviews = options.deleteReviews ? true : options.keepReviews ? false : void 0;
|
|
4489
4489
|
if (deleteReviews === void 0 && !options.json && input.stdin?.isTTY) {
|
|
4490
4490
|
const prompt = createInterface$1({
|
|
@@ -4706,14 +4706,14 @@ async function runReviewCli(input) {
|
|
|
4706
4706
|
command.showHelpAfterError(false).error("Markdown review migration is no longer supported. Ask your agent to migrate your old Whiteboard reviews.");
|
|
4707
4707
|
});
|
|
4708
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) => {
|
|
4709
|
-
const { runShareCli } = await import("./cli-
|
|
4709
|
+
const { runShareCli } = await import("./cli-Bq5zVqlc.js");
|
|
4710
4710
|
state.exitCode = await runShareCli({
|
|
4711
4711
|
...input,
|
|
4712
4712
|
...options,
|
|
4713
4713
|
env: authoringEnv()
|
|
4714
4714
|
});
|
|
4715
4715
|
}).command("revoke <share-id>").description("Revoke future downloads of a share"), "plain").action(async (shareId, options) => {
|
|
4716
|
-
const { runShareCli } = await import("./cli-
|
|
4716
|
+
const { runShareCli } = await import("./cli-Bq5zVqlc.js");
|
|
4717
4717
|
state.exitCode = await runShareCli({
|
|
4718
4718
|
...input,
|
|
4719
4719
|
...options,
|
|
@@ -4722,7 +4722,7 @@ async function runReviewCli(input) {
|
|
|
4722
4722
|
});
|
|
4723
4723
|
});
|
|
4724
4724
|
configureJsonOutput(program.command("export").description("Write a review snapshot as a .whiteboard file"), "plain").option("--review <id>", "review ID").option("--version <number>", "Saved version to export").option("--out <path>", "File to write, or - for stdout; defaults to <title>.whiteboard here").action(async (options) => {
|
|
4725
|
-
const { runExportCli } = await import("./cli-
|
|
4725
|
+
const { runExportCli } = await import("./cli-Bq5zVqlc.js");
|
|
4726
4726
|
state.exitCode = await runExportCli({
|
|
4727
4727
|
...input,
|
|
4728
4728
|
...options,
|
|
@@ -4803,7 +4803,7 @@ async function runReviewCli(input) {
|
|
|
4803
4803
|
return commands;
|
|
4804
4804
|
} });
|
|
4805
4805
|
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) => {
|
|
4806
|
-
const { runReviewAgentCli } = await import("./agent-cli-
|
|
4806
|
+
const { runReviewAgentCli } = await import("./agent-cli-DdUAmdca.js");
|
|
4807
4807
|
state.exitCode = await runReviewAgentCli({
|
|
4808
4808
|
...input,
|
|
4809
4809
|
env: authoringEnv(),
|
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./review-home-paths-BmZX2qiz.js";
|
|
2
1
|
import { N as devReviewHome } from "./s3-config-CjcLyFV5.js";
|
|
2
|
+
import "./review-home-paths-B8909D07.js";
|
|
3
3
|
import { n as askAgentIds } from "./thread-state-Jxoh1hde.js";
|
|
4
|
-
import { t as ASK_THREAD_ENV } from "./request-origin-
|
|
4
|
+
import { t as ASK_THREAD_ENV } from "./request-origin-ENYd0Ymr.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";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as withHeadlessServerLock, n as runHeadlessServer, r as takeOverServerHome, t as HeadlessServerBusyError } from "./headless-host-
|
|
1
|
+
import { i as withHeadlessServerLock, n as runHeadlessServer, r as takeOverServerHome, t as HeadlessServerBusyError } from "./headless-host-bb09yVkX.js";
|
|
2
2
|
export { HeadlessServerBusyError, runHeadlessServer, takeOverServerHome, withHeadlessServerLock };
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { b as resolveRepoContext, d as git, r as defaultBranch, w as runVcs } from "./src-Y30gweiK.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 { C as
|
|
4
|
-
import {
|
|
5
|
-
import { c as invalidateStructuralComparisons, d as readGitHubPullRequests, i as inspectSnapshot, l as diffrExecutable, r as commandSchema, u as diffrMissingError } from "./local-data-
|
|
6
|
-
import {
|
|
7
|
-
import { B as TraceStorageDeniedError, D as listReviewTraceSessions, I as isTraceStorageConfigured, O as loadReviewAgentTrace, R as resolveTraceStorage, T as traceMachineEnabled, at as readStoreAuth, et as shellQuote, it as clearStoreAuth, ot as runStoreLogin, rt as DEFAULT_STORE_ORIGIN, z as selectTraceStorage } from "./review-home-paths-BmZX2qiz.js";
|
|
8
|
-
import { T as scopedCoverage, f as sourceBranchName, l as pullRequestKey, p as pullRequestProvider } from "./stored-document-migration-vg0NAzXG.js";
|
|
3
|
+
import { C as parseShareLink, S as readBoundedStream, T as shareIdSchema, _ as validateShareSources, a as shareKey, b as reviewProgress, c as readShareRepository, d as ShareRequestError, f as parseWhiteboardFile, g as exportShare, h as whiteboardFileText, i as receiveShare, l as ShareAuthError, m as whiteboardFileName, n as needsRepository, p as whiteboardFileKey, r as planShareCopy, s as forgetSharedCommits, t as importShare, u as ShareClient, v as legacyModeSchema, w as shareBundleSchema, x as StreamLimitError, y as progressUpdateSchema } from "./import-_XAsWqen.js";
|
|
4
|
+
import { O as selectionReferences, Y as animationCode, a as anchorPins, at as formatAnchor, l as boardRepositoryId, lt as selectionKey, mt as ReviewInputError, n as uncategorizedReport, p as elements, q as scopedCoverage, t as lensReport, z as stepSources } from "./src-BPrngiWX.js";
|
|
5
|
+
import { c as invalidateStructuralComparisons, d as readGitHubPullRequests, i as inspectSnapshot, l as diffrExecutable, r as commandSchema, u as diffrMissingError } from "./local-data-ZQIkF5k1.js";
|
|
6
|
+
import { f as sourceBranchName, l as pullRequestKey, p as pullRequestProvider } from "./stored-document-migration-BQcUyXO8.js";
|
|
9
7
|
import { A as processStartIdentity, L as writePrivateJsonAtomic, N as devReviewHome, h as TraceConfigurationError, i as isS3MockMode, j as withFileLock } from "./s3-config-CjcLyFV5.js";
|
|
8
|
+
import { B as TraceStorageDeniedError, D as listReviewTraceSessions, I as isTraceStorageConfigured, O as loadReviewAgentTrace, R as resolveTraceStorage, T as traceMachineEnabled, at as readStoreAuth, et as shellQuote, it as clearStoreAuth, ot as runStoreLogin, rt as DEFAULT_STORE_ORIGIN, z as selectTraceStorage } from "./review-home-paths-B8909D07.js";
|
|
10
9
|
import { t as errorMessage } from "./error-message-OtiDonty.js";
|
|
11
|
-
import { i as readReviewPackageVersion, n as readBuildCommit, t as findReviewPackageRoot } from "./package-paths-
|
|
12
|
-
import {
|
|
10
|
+
import { i as readReviewPackageVersion, n as readBuildCommit, t as findReviewPackageRoot } from "./package-paths-wobHueCx.js";
|
|
11
|
+
import { A as ReviewFeedbackSchema, F as reviewDiffrSummarizerInputSchema, L as decodeStructuralDiffEvent, M as ReviewOnboardingRunRequestSchema, P as reviewDiffrLoginsSchema, a as parseReviewVerbRequest, c as boardIconKind, i as parseReviewDesktopVerbResult, k as ReviewFeedbackContactSchema, l as boardTitle, m as REVIEW_CLIENT_REMOTE, p as REVIEW_CLIENT_HEADER, y as REVIEW_HOST_HEADER } from "./src-B-91Rd2d.js";
|
|
12
|
+
import { _ as reviewInstanceIdentity, n as desktopOwnsHome, o as reviewServerDiscoveryPath, p as desktopUsesHome, r as headlessServerLockPath, t as DESKTOP_TAKEOVER_SIGNAL } from "./server-discovery-Fme7f3fb.js";
|
|
13
13
|
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-Jxoh1hde.js";
|
|
14
|
-
import { t as openReviewProfile } from "./profile-
|
|
15
|
-
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-
|
|
16
|
-
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-
|
|
17
|
-
import { a as inspectQuerySchema, i as renderInstructions, o as queryAnchor, r as instructionsQuerySchema, s as readQuerySchemas, t as authoringTools } from "./authoring-tools-
|
|
18
|
-
import { a as headlessServerOwner, c as stopBackgroundServer, o as recordedBackgroundServer } from "./background-server-
|
|
14
|
+
import { t as openReviewProfile } from "./profile-D-SbO3p9.js";
|
|
15
|
+
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-ENYd0Ymr.js";
|
|
16
|
+
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-DNyQDN3P.js";
|
|
17
|
+
import { a as inspectQuerySchema, i as renderInstructions, o as queryAnchor, r as instructionsQuerySchema, s as readQuerySchemas, t as authoringTools } from "./authoring-tools-BgZvnbjN.js";
|
|
18
|
+
import { a as headlessServerOwner, c as stopBackgroundServer, o as recordedBackgroundServer } from "./background-server-DHEcsFwH.js";
|
|
19
19
|
import crypto$1, { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
20
20
|
import { z } from "zod";
|
|
21
21
|
import { existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
@@ -3761,9 +3761,10 @@ function createReviewApi(store, data, open, sharing = false, capabilities = () =
|
|
|
3761
3761
|
app.get("/:id/lenses", async (context) => {
|
|
3762
3762
|
if (!data) throw new ReviewInputError("Source data is unavailable.", 409);
|
|
3763
3763
|
const snapshot = readReview(context.req.param("id"));
|
|
3764
|
+
const progress = await reviewProgress(store, data, snapshot, context.req.raw.signal);
|
|
3764
3765
|
return context.json({
|
|
3765
3766
|
version: snapshot.version,
|
|
3766
|
-
...lensReport(snapshot.lenses ?? [],
|
|
3767
|
+
...lensReport(snapshot.lenses ?? [], progress.lenses, progress.files)
|
|
3767
3768
|
});
|
|
3768
3769
|
});
|
|
3769
3770
|
app.get("/status", async (context) => context.json({
|
|
@@ -4688,7 +4689,8 @@ function createReviewApi(store, data, open, sharing = false, capabilities = () =
|
|
|
4688
4689
|
const lensGaps = async (reviewId, version, request) => {
|
|
4689
4690
|
if (!data) return {};
|
|
4690
4691
|
try {
|
|
4691
|
-
|
|
4692
|
+
const progress = await reviewProgress(store, data, store.read(reviewId, version), request.signal);
|
|
4693
|
+
return { uncategorized: uncategorizedReport(progress.lenses, progress.files) };
|
|
4692
4694
|
} catch (error) {
|
|
4693
4695
|
return { warnings: [`Uncategorized changes are unavailable: ${errorMessage(error)}`] };
|
|
4694
4696
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { f as gitAt } from "./src-Y30gweiK.js";
|
|
2
2
|
import { u as parseJsonText } from "./src-X9phtB2j.js";
|
|
3
|
-
import { $ as
|
|
4
|
-
import { s as
|
|
5
|
-
import { C as emptyCoverage, D as subtractIntervals, E as sourcesForFile, S as coverageSources, T as scopedCoverage, b as textIncludesQuote, c as traceSchema, n as migrateStoredDocument, r as migrateStoredLenses, s as softwareModelDataSchema, t as liftFileLenses, u as pullRequestUrl } from "./stored-document-migration-vg0NAzXG.js";
|
|
3
|
+
import { $ as fileLineRangeSchema, F as checkReferences, K as emptyCoverage, N as parseMarkdown, O as selectionReferences, S as resourceReferences, U as lensSchema, W as lensSelections, a as anchorPins, b as readsAtBoardPins, ct as resolveDiffSelection, d as documentSchema, it as comparisonKey, j as markdownNodes, k as sourceReferences, l as boardRepositoryId, lt as selectionKey, mt as ReviewInputError, p as elements, r as resolveLenses, rt as SelectionUnavailableError, st as patchRows, ut as sourceAnchors, v as pinsSchema, x as resourceReference } from "./src-BPrngiWX.js";
|
|
4
|
+
import { b as textIncludesQuote, c as traceSchema, n as migrateStoredDocument, r as migrateStoredLenses, s as softwareModelDataSchema, t as liftFileLenses, u as pullRequestUrl } from "./stored-document-migration-BQcUyXO8.js";
|
|
6
5
|
import { N as devReviewHome } from "./s3-config-CjcLyFV5.js";
|
|
6
|
+
import { s as safeStorageSegment } from "./review-home-paths-B8909D07.js";
|
|
7
7
|
import { createHash, randomUUID } from "node:crypto";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { Agent } from "undici";
|
|
10
|
-
import { Minimatch } from "minimatch";
|
|
11
10
|
import { existsSync } from "node:fs";
|
|
12
11
|
import { mkdir, realpath, rm } from "node:fs/promises";
|
|
13
12
|
import path from "node:path";
|
|
@@ -152,68 +151,6 @@ async function readBoundedStream(stream, limit) {
|
|
|
152
151
|
}
|
|
153
152
|
}
|
|
154
153
|
//#endregion
|
|
155
|
-
//#region src/review-api/file-lenses.ts
|
|
156
|
-
/** Subtract authored coverage, independently of viewed state. */
|
|
157
|
-
function uncategorizedSources(files, sources) {
|
|
158
|
-
const own = sourcesForFile(sources);
|
|
159
|
-
return files.flatMap((file) => {
|
|
160
|
-
const covered = scopedCoverage(file, own(file));
|
|
161
|
-
return coverageSources(file, {
|
|
162
|
-
base: subtractIntervals(file.changed.base, covered.base),
|
|
163
|
-
head: subtractIntervals(file.changed.head, covered.head)
|
|
164
|
-
});
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
/** Resolve all targets into one union; a whole-file range subsumes narrower ranges. */
|
|
168
|
-
function resolveFileLens(lens, files, fileSources, resolve) {
|
|
169
|
-
const targets = lens.targets;
|
|
170
|
-
const selected = targets.flatMap((target) => {
|
|
171
|
-
if (target.kind === "ranges") return target.sources.flatMap((source) => resolve(anchorSelection(source)));
|
|
172
|
-
const matches = fileLensMatcher(target.patterns);
|
|
173
|
-
return files.filter(matches).flatMap((file) => fileSources.get(file.path) ?? []);
|
|
174
|
-
});
|
|
175
|
-
const groups = /* @__PURE__ */ new Map();
|
|
176
|
-
for (const source of selected) {
|
|
177
|
-
const key = JSON.stringify([source.side, source.file]);
|
|
178
|
-
const group = groups.get(key) ?? [];
|
|
179
|
-
group.push(source);
|
|
180
|
-
groups.set(key, group);
|
|
181
|
-
}
|
|
182
|
-
const sources = [...groups.values()].flatMap((group) => unionIntervals(group.map((source) => [source.fromLine - 1, source.toLine])).map(([start, end]) => ({
|
|
183
|
-
...group[0],
|
|
184
|
-
fromLine: start + 1,
|
|
185
|
-
toLine: end
|
|
186
|
-
})));
|
|
187
|
-
return {
|
|
188
|
-
sources,
|
|
189
|
-
fileCount: new Set(sources.map(changedPath(files))).size,
|
|
190
|
-
wholeFiles: targets.every((target) => target.kind === "files")
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
/** The changed file a source names on its side, or the source's own file. */
|
|
194
|
-
function changedPath(files) {
|
|
195
|
-
const paths = /* @__PURE__ */ new Map();
|
|
196
|
-
for (const file of files) for (const key of [`base:${file.previousPath ?? file.path}`, `head:${file.path}`]) if (!paths.has(key)) paths.set(key, file.path);
|
|
197
|
-
return (source) => paths.get(`${source.side}:${source.file}`) ?? source.file;
|
|
198
|
-
}
|
|
199
|
-
/** Evaluate authored patterns against the changed-file list, never the filesystem. */
|
|
200
|
-
function fileLensMatcher(patterns) {
|
|
201
|
-
const matchers = patterns.map((pattern) => {
|
|
202
|
-
const normalized = pattern.startsWith("./") ? pattern.slice(2) : pattern;
|
|
203
|
-
const glob = new Minimatch(normalized, {
|
|
204
|
-
nocase: process.platform === "darwin" || process.platform === "win32",
|
|
205
|
-
windowsPathsNoEscape: true,
|
|
206
|
-
nonegate: true,
|
|
207
|
-
nocomment: true,
|
|
208
|
-
optimizationLevel: 2,
|
|
209
|
-
platform: "linux",
|
|
210
|
-
nocaseMagicOnly: true
|
|
211
|
-
});
|
|
212
|
-
return (path) => path === normalized || glob.match(path);
|
|
213
|
-
});
|
|
214
|
-
return (file) => matchers.some((matches) => matches(file.path) || file.previousPath !== void 0 && matches(file.previousPath));
|
|
215
|
-
}
|
|
216
|
-
//#endregion
|
|
217
154
|
//#region src/review-api/review-progress.ts
|
|
218
155
|
/** Older clients still send `mode`. */
|
|
219
156
|
const legacyModeSchema = z.unknown().optional();
|
|
@@ -314,27 +251,10 @@ async function reviewProgress(store, data, snapshot, signal = new AbortControlle
|
|
|
314
251
|
return [];
|
|
315
252
|
}
|
|
316
253
|
};
|
|
317
|
-
|
|
318
|
-
const lens = {
|
|
319
|
-
id: authored.id,
|
|
320
|
-
title: authored.title
|
|
321
|
-
};
|
|
254
|
+
await Promise.all((snapshot.lenses ?? []).map(async (authored) => {
|
|
322
255
|
try {
|
|
323
256
|
await Promise.all(lensSelections([authored]).map(({ source }) => resolveAvailable(source)));
|
|
324
|
-
|
|
325
|
-
return {
|
|
326
|
-
...lens,
|
|
327
|
-
...resolved,
|
|
328
|
-
pending: counting,
|
|
329
|
-
unavailable: counting || resolved.fileCount ? void 0 : "No files match these targets"
|
|
330
|
-
};
|
|
331
|
-
} catch {
|
|
332
|
-
return {
|
|
333
|
-
...lens,
|
|
334
|
-
sources: [],
|
|
335
|
-
unavailable: "Source links need updating at these pins"
|
|
336
|
-
};
|
|
337
|
-
}
|
|
257
|
+
} catch {}
|
|
338
258
|
}));
|
|
339
259
|
await Promise.all(selectionReferences(snapshot.document, {
|
|
340
260
|
tolerant: true,
|
|
@@ -344,16 +264,7 @@ async function reviewProgress(store, data, snapshot, signal = new AbortControlle
|
|
|
344
264
|
await resolveAvailable(source);
|
|
345
265
|
} catch {}
|
|
346
266
|
}));
|
|
347
|
-
const
|
|
348
|
-
lenses.push({
|
|
349
|
-
id: UNCATEGORIZED_LENS_ID,
|
|
350
|
-
title: "Uncategorized changes",
|
|
351
|
-
sources: uncategorized,
|
|
352
|
-
wholeFiles: false,
|
|
353
|
-
fileCount: new Set(uncategorized.map(changedPath(files))).size,
|
|
354
|
-
pending: counting,
|
|
355
|
-
unavailable: counting || uncategorized.length ? void 0 : "All changed lines are covered by lenses"
|
|
356
|
-
});
|
|
267
|
+
const lenses = pendingLenses(resolveLenses(snapshot.lenses ?? [], files, fileSources, (source) => unavailableSelections[selectionKey(source)] ? void 0 : resolvedSelections[selectionKey(source)] ?? [], { nocase: process.platform === "darwin" || process.platform === "win32" }), counting);
|
|
357
268
|
const progress = {
|
|
358
269
|
complete: !counting && !pendingSources.size,
|
|
359
270
|
files,
|
|
@@ -366,50 +277,24 @@ async function reviewProgress(store, data, snapshot, signal = new AbortControlle
|
|
|
366
277
|
if (untrackedFiles) progress.untrackedFiles = untrackedFiles;
|
|
367
278
|
return progress;
|
|
368
279
|
}
|
|
369
|
-
/**
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
const pathOf = changedPath(progress.files);
|
|
377
|
-
for (const source of sources) {
|
|
378
|
-
const path = pathOf(source);
|
|
379
|
-
const entry = byPath.get(path) ?? {
|
|
380
|
-
path,
|
|
381
|
-
lines: 0,
|
|
382
|
-
ranges: []
|
|
280
|
+
/** A lens with no fileCount failed to resolve, so it is never pending. */
|
|
281
|
+
function pendingLenses(lenses, counting) {
|
|
282
|
+
return lenses.map((lens) => {
|
|
283
|
+
if (lens.fileCount === void 0) return lens;
|
|
284
|
+
if (!counting) return {
|
|
285
|
+
...lens,
|
|
286
|
+
pending: false
|
|
383
287
|
};
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
lines: files.reduce((total, file) => total + file.lines, 0),
|
|
395
|
-
files: files.slice(0, REPORT_FILES)
|
|
396
|
-
};
|
|
397
|
-
if (files.length > REPORT_FILES) report.moreFiles = files.length - REPORT_FILES;
|
|
398
|
-
return report;
|
|
399
|
-
}
|
|
400
|
-
/** Each lens as authored, with what it resolves to, for a lens author. */
|
|
401
|
-
function lensReport(lenses, progress) {
|
|
402
|
-
return {
|
|
403
|
-
lenses: lenses.map((lens) => {
|
|
404
|
-
const resolved = progress.lenses.find((item) => item.id === lens.id);
|
|
405
|
-
return {
|
|
406
|
-
...lens,
|
|
407
|
-
fileCount: resolved?.fileCount ?? 0,
|
|
408
|
-
...resolved?.unavailable && { unavailable: resolved.unavailable }
|
|
409
|
-
};
|
|
410
|
-
}),
|
|
411
|
-
uncategorized: uncategorizedReport(progress)
|
|
412
|
-
};
|
|
288
|
+
return {
|
|
289
|
+
...lens,
|
|
290
|
+
...lens.id === "automatic-uncategorized" && {
|
|
291
|
+
sources: [],
|
|
292
|
+
fileCount: 0
|
|
293
|
+
},
|
|
294
|
+
unavailable: void 0,
|
|
295
|
+
pending: true
|
|
296
|
+
};
|
|
297
|
+
});
|
|
413
298
|
}
|
|
414
299
|
//#endregion
|
|
415
300
|
//#region src/sharing/export.ts
|
|
@@ -1222,4 +1107,4 @@ async function shareRepository({ store, data, ...git }, cloneUrl, pins, commits,
|
|
|
1222
1107
|
return repositoryId;
|
|
1223
1108
|
}
|
|
1224
1109
|
//#endregion
|
|
1225
|
-
export {
|
|
1110
|
+
export { parseShareLink as C, readBoundedStream as S, shareIdSchema as T, validateShareSources as _, shareKey as a, reviewProgress as b, readShareRepository as c, ShareRequestError as d, parseWhiteboardFile as f, exportShare as g, whiteboardFileText as h, receiveShare as i, ShareAuthError as l, whiteboardFileName as m, needsRepository as n, validateShareBundle as o, whiteboardFileKey as p, planShareCopy as r, forgetSharedCommits as s, importShare as t, ShareClient as u, legacyModeSchema as v, shareBundleSchema as w, StreamLimitError as x, progressUpdateSchema as y };
|