@dev.fast/whiteboard 0.3.4 → 0.3.5-preview.20261021.131
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-CprZojXd.js → account-alias-CisiYUZT.js} +13 -8
- package/dist/agent-cli-BglNRDZN.js +2 -0
- package/dist/{agent-cli-CThN7Q59.js → agent-cli-TJ7_5_B3.js} +15 -10
- package/dist/{agent-client-BOOi7EUR.js → agent-client-H53ajvrm.js} +13 -3
- package/dist/{authoring-tools-BNwuMnz6.js → authoring-tools-BCquUsB3.js} +34 -27
- package/dist/{background-server-DLSDogkI.js → background-server-BSYXD9au.js} +1 -1
- package/dist/{background-server-CkvxA-6O.js → background-server-Xom8cA_u.js} +5 -5
- package/dist/build-info.json +1 -1
- package/dist/{cli-R4yfa5DT.js → cli-BOnV4cCh.js} +1 -1
- package/dist/{cli-runner-Cuc9FSzu.js → cli-runner-cRY5NOno.js} +70 -34
- package/dist/cli.js +4 -3
- package/dist/{client-BN_FDxFr.js → client-UH1bEG7Z.js} +260 -49
- package/dist/{fuzzy-match-BO9bK37N.js → fuzzy-match-D_x3wumC.js} +6 -4
- package/dist/{headless-host-CVBOQyRS.js → headless-host-BEe-aFtB.js} +1 -1
- package/dist/{headless-host-Cog6SpS9.js → headless-host-CEb5d-A0.js} +563 -175
- package/dist/lens-selection-BxPk53c8.js +214 -0
- package/dist/{local-data-D_9tvdsp.js → local-data-mbCb1HDH.js} +2448 -347
- package/dist/{mcp-D1hziANa.js → mcp-cBtzXsmN.js} +9 -12
- package/dist/{package-paths-C--__jEv.js → package-paths-BkeQsdaw.js} +1 -1
- package/dist/profile-Dbyidrcr.js +2 -0
- package/dist/{profile-DokFw782.js → profile-duqp5uPa.js} +20 -8
- package/dist/{remote-attach-CEJ-kvDY.js → remote-attach-BeKuMm_x.js} +4 -4
- package/dist/{remote-extensions-GN8Gf_qG.js → remote-extensions-CX2fAec1.js} +1 -1
- package/dist/{remote-extensions-Blcjr9Ze.js → remote-extensions-CYWNTVSf.js} +3 -3
- package/dist/{remote-language-server-BTKBQ7x4.js → remote-language-server-DLWluAeR.js} +5 -5
- package/dist/{remote-uninstall-DW7Gdryh.js → remote-uninstall-Y3S0YmJs.js} +6 -6
- package/dist/{request-origin-Zcn_CjX4.js → request-origin-icXPv6jh.js} +55 -18
- package/dist/{review-app-launcher-CkwLclzR.js → review-app-launcher-DZvG5ZAh.js} +2 -2
- package/dist/{review-home-paths-j2BRAaNv.js → review-home-paths-BwH08ihj.js} +19 -17
- package/dist/{review-telemetry-BLNwYnLV.js → review-telemetry-AZ0imsmJ.js} +6 -6
- package/dist/runtime-CF4JXdb8.js +27 -0
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +1 -1
- package/dist/{s3-DtJFWC0G.js → s3-CsG2EWED.js} +1 -1
- package/dist/{s3-config-BTO12tCC.js → s3-config-CjcLyFV5.js} +4 -2
- package/dist/{s3-config-CSy3fx8H.js → s3-config-zz4GWh2T.js} +1 -1
- package/dist/server/desktop-host.js +28 -104
- package/dist/{server-discovery-Bey8IqXH.js → server-discovery-DeVTdcqK.js} +3 -3
- package/dist/sharing/index.d.ts +484 -74
- package/dist/sharing/index.js +1 -1
- package/dist/{src-DsM3jO8G.js → src-DYZLCUP_.js} +98 -18
- package/dist/{src-BMPuxWv4.js → src-DtfSndqS.js} +269 -227
- package/dist/{stored-document-migration-CChxtFAy.js → stored-document-migration-B29lve9-.js} +318 -271
- package/dist/{thread-state-5pYr6_zM.js → thread-state-BPpvKFwQ.js} +12 -2
- package/dist/{tool-failure-C9MpbXJJ.js → tool-failure-CQhyLht3.js} +10 -3
- package/instructions/authoring.md +20 -5
- package/package.json +4 -4
- package/src/agent-selection.ts +6 -0
- package/src/ask/agents.ts +13 -1
- package/src/ask/checkout-files.ts +2 -5
- package/src/ask/thread-state.ts +4 -0
- package/src/ask/thread.ts +61 -31
- package/src/ask/threads.ts +24 -3
- package/src/cli-install.ts +13 -2
- package/src/cli-runner.ts +4 -1
- package/src/cli.ts +4 -1
- package/src/diff-selection-migration.ts +48 -34
- package/src/heading-anchors.ts +42 -0
- package/src/lens-selection.ts +38 -2
- package/src/markdown.ts +42 -0
- package/src/posthog-capture-client.ts +1 -1
- package/src/review-api/README.md +52 -13
- package/src/review-api/activity.ts +1 -4
- package/src/review-api/agent-cli.ts +9 -1
- package/src/review-api/anchor-quotes.ts +14 -7
- package/src/review-api/ask-history.ts +118 -51
- package/src/review-api/authoring-tools.ts +45 -30
- package/src/review-api/azure-devops-provider.ts +2 -20
- package/src/review-api/azure-remote.ts +21 -0
- package/src/review-api/blocks/definition.ts +1 -1
- package/src/review-api/blocks/markdown.ts +2 -2
- package/src/review-api/board-order.ts +144 -0
- package/src/review-api/checkout-groups.ts +586 -0
- package/src/review-api/document-headings.ts +58 -27
- package/src/review-api/document-text.ts +31 -2
- package/src/review-api/document.ts +362 -67
- package/src/review-api/foreign-references.ts +328 -0
- package/src/review-api/github-provider.ts +51 -13
- package/src/review-api/http.ts +734 -135
- package/src/review-api/instructions.ts +0 -19
- package/src/review-api/link-preview.ts +113 -0
- package/src/review-api/local-data.ts +310 -46
- package/src/review-api/mcp.ts +7 -13
- package/src/review-api/onboarding.ts +1 -1
- package/src/review-api/profile.ts +37 -6
- package/src/review-api/public-tools.ts +24 -2
- package/src/review-api/pull-request.ts +82 -49
- package/src/review-api/request-origin.ts +10 -0
- package/src/review-api/review-progress.ts +61 -27
- package/src/review-api/scratchpad-plan-upgrade.ts +250 -0
- package/src/review-api/store-migrations.ts +355 -0
- package/src/review-api/store-schema.ts +38 -29
- package/src/review-api/store.ts +2176 -495
- package/src/review-api/worktree-events.ts +3 -5
- package/src/review-api/worktree-source.ts +3 -7
- package/src/review-api/worktree-structural.integration.ts +72 -0
- package/src/review-stack.ts +15 -23
- package/src/runtime.ts +4 -30
- package/src/server/desktop-host.ts +6 -1
- package/src/server/desktop-server.ts +1 -36
- package/src/server/headless-host.ts +0 -2
- package/src/server/hono-http.ts +2 -1
- package/src/server/review-gateway-list.ts +3 -5
- package/src/server/review-gateway-memory.ts +1 -1
- package/src/server/review-lifecycle-telemetry.ts +2 -2
- package/src/server/review-server-core.ts +1 -5
- package/src/server/structural-comparisons.ts +47 -0
- package/src/sharing/export.ts +36 -7
- package/src/sharing/host.ts +34 -14
- package/src/sharing/import.ts +156 -24
- package/src/sharing/repository.ts +143 -24
- package/src/startup-trace.ts +3 -3
- package/src/stored-document-migration.ts +110 -19
- package/src/ui-telemetry-events.ts +44 -18
- package/dist/agent-cli-C6SPSII0.js +0 -2
- package/dist/profile-CYPmvBoA.js +0 -2
- package/dist/runtime-CKiWhGrf.js +0 -52
- package/instructions/scratchpad.md +0 -23
- package/src/review-preferences.ts +0 -88
- package/src/server/legacy-tutorial-cleanup.ts +0 -38
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { S as splitGitPatchFiles, a as diff, o as diffFileSummaries } from "../src-
|
|
2
|
+
import { S as splitGitPatchFiles, a as diff, o as diffFileSummaries } from "../src-DtfSndqS.js";
|
|
3
3
|
import { c as jsonString, i as jsonBoolean, n as isJsonObject, p as isObjectValue, s as jsonProperty, u as parseJsonText } from "../src-X9phtB2j.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { i as reviewInstanceDiscoveryPath, o as reviewLegacyDiscoveryPath } from "../review-home-paths-
|
|
8
|
-
import {
|
|
4
|
+
import { f as StreamLimitError, i as SharedReviewStore, p as readBoundedStream } from "../client-UH1bEG7Z.js";
|
|
5
|
+
import { d as pullRequestProvider } from "../local-data-mbCb1HDH.js";
|
|
6
|
+
import { A as ReviewGatewayHostSchema, D as ReviewConnectRequestSchema, N as reviewDiffrSummarizerInputSchema, d as ReviewBugReportRequestSchema, f as parseReviewBugReportResponse, m as REVIEW_CLIENT_REMOTE, p as REVIEW_CLIENT_HEADER, r as parseReviewDesktopVerbFrame, s as parseZod, t as parseReviewCliInstallApplyRequest, u as ReviewBugReportMetaV2Schema, y as REVIEW_HOST_HEADER } from "../src-DYZLCUP_.js";
|
|
7
|
+
import { i as reviewInstanceDiscoveryPath, o as reviewLegacyDiscoveryPath } from "../review-home-paths-BwH08ihj.js";
|
|
8
|
+
import { A as resourceReferences } from "../stored-document-migration-B29lve9-.js";
|
|
9
9
|
import { t as ReviewInputError } from "../input-error-OLgB_h31.js";
|
|
10
|
-
import { L as writePrivateJsonAtomic, N as devReviewHome } from "../s3-config-
|
|
10
|
+
import { L as writePrivateJsonAtomic, N as devReviewHome } from "../s3-config-CjcLyFV5.js";
|
|
11
11
|
import { t as errorMessage } from "../error-message-OtiDonty.js";
|
|
12
|
-
import { i as readReviewPackageVersion, t as findReviewPackageRoot } from "../package-paths-
|
|
13
|
-
import { _ as reviewInstanceIdentity, u as REVIEW_INSTANCE_ENV } from "../server-discovery-
|
|
14
|
-
import { t as openReviewProfile } from "../profile-
|
|
15
|
-
import { r as reviewTelemetryChannel, t as ReviewTelemetry } from "../review-telemetry-
|
|
16
|
-
import {
|
|
17
|
-
import { c as removeLegacyReviewSkills, d as skipCliInstall, h as detectConnectAgents, i as finishCliInstallUpdate, l as resetCliInstall, m as connectAgent, n as applyCliInstall, o as pathShimPath, r as declineCliInstall, s as removeCliInstall, t as aliasInstallationToAccount, u as resolveCliInstallStatus } from "../account-alias-
|
|
18
|
-
import { C as saveDiffrSummarizer, E as cliAskTools, S as readDiffrConfig, T as testDiffrSummarizer, _ as DEFAULT_MAX_REQUEST_BYTES, a as drainServerCrashReport, b as GlobalReviewDesktopVerbRelay, c as answerErrorsAsJson, d as legacyModeSchema, f as captureSanitizedUiTelemetry, g as readBoundedRequestJson, h as createNodeRequestListener, l as createWhiteboardCore, m as recordClientError, o as installProcessErrorTelemetry, p as clientErrorsForSession, r as takeOverServerHome, s as serverCrashReportPath, u as serverJson, v as HttpJsonError, w as setDiffrConfigValue, x as migrateDiffrConfig, y as ReviewServerError } from "../headless-host-
|
|
19
|
-
import {
|
|
12
|
+
import { i as readReviewPackageVersion, t as findReviewPackageRoot } from "../package-paths-BkeQsdaw.js";
|
|
13
|
+
import { _ as reviewInstanceIdentity, u as REVIEW_INSTANCE_ENV } from "../server-discovery-DeVTdcqK.js";
|
|
14
|
+
import { t as openReviewProfile } from "../profile-duqp5uPa.js";
|
|
15
|
+
import { r as reviewTelemetryChannel, t as ReviewTelemetry } from "../review-telemetry-AZ0imsmJ.js";
|
|
16
|
+
import { l as REVIEW_TELEMETRY_TABS } from "../request-origin-icXPv6jh.js";
|
|
17
|
+
import { c as removeLegacyReviewSkills, d as skipCliInstall, h as detectConnectAgents, i as finishCliInstallUpdate, l as resetCliInstall, m as connectAgent, n as applyCliInstall, o as pathShimPath, r as declineCliInstall, s as removeCliInstall, t as aliasInstallationToAccount, u as resolveCliInstallStatus } from "../account-alias-CisiYUZT.js";
|
|
18
|
+
import { C as saveDiffrSummarizer, E as cliAskTools, S as readDiffrConfig, T as testDiffrSummarizer, _ as DEFAULT_MAX_REQUEST_BYTES, a as drainServerCrashReport, b as GlobalReviewDesktopVerbRelay, c as answerErrorsAsJson, d as legacyModeSchema, f as captureSanitizedUiTelemetry, g as readBoundedRequestJson, h as createNodeRequestListener, l as createWhiteboardCore, m as recordClientError, o as installProcessErrorTelemetry, p as clientErrorsForSession, r as takeOverServerHome, s as serverCrashReportPath, u as serverJson, v as HttpJsonError, w as setDiffrConfigValue, x as migrateDiffrConfig, y as ReviewServerError } from "../headless-host-CEb5d-A0.js";
|
|
19
|
+
import { s as readQuerySchemas } from "../authoring-tools-BCquUsB3.js";
|
|
20
20
|
import crypto, { createHash, randomBytes } from "node:crypto";
|
|
21
21
|
import { z } from "zod";
|
|
22
22
|
import fs, { existsSync, readFileSync } from "node:fs";
|
|
@@ -263,39 +263,6 @@ function listenForDesktopHostShutdown(hostProcess, onShutdown, onTelemetrySettin
|
|
|
263
263
|
return () => hostProcess.off("message", handleMessage);
|
|
264
264
|
}
|
|
265
265
|
//#endregion
|
|
266
|
-
//#region src/review-preferences.ts
|
|
267
|
-
const DEFAULT_REVIEW_PREFERENCES = { scratchpadEnabled: false };
|
|
268
|
-
function reviewPreferencesPath(devHome = devReviewHome()) {
|
|
269
|
-
return path.join(devHome, "preferences.json");
|
|
270
|
-
}
|
|
271
|
-
/** A missing or unreadable file falls back to the defaults; it never throws. */
|
|
272
|
-
async function readReviewPreferences(devHome) {
|
|
273
|
-
try {
|
|
274
|
-
return { scratchpadEnabled: parseScratchpadEnabled(parseJsonText(await readFile(reviewPreferencesPath(devHome), "utf8"))) };
|
|
275
|
-
} catch {
|
|
276
|
-
return { ...DEFAULT_REVIEW_PREFERENCES };
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
async function writeReviewPreferences(preferences, devHome) {
|
|
280
|
-
const next = { scratchpadEnabled: preferences.scratchpadEnabled === true };
|
|
281
|
-
await writePrivateJsonAtomic(reviewPreferencesPath(devHome), next);
|
|
282
|
-
return next;
|
|
283
|
-
}
|
|
284
|
-
/** Reads the scratchpad preference; a missing file means off. */
|
|
285
|
-
async function readScratchpadEnabled(devHome) {
|
|
286
|
-
return (await readReviewPreferences(devHome)).scratchpadEnabled;
|
|
287
|
-
}
|
|
288
|
-
/** Sets the scratchpad preference, keeping the other preferences as they are. */
|
|
289
|
-
async function writeScratchpadEnabled(enabled, devHome) {
|
|
290
|
-
return (await writeReviewPreferences({
|
|
291
|
-
...await readReviewPreferences(devHome),
|
|
292
|
-
scratchpadEnabled: enabled
|
|
293
|
-
}, devHome)).scratchpadEnabled;
|
|
294
|
-
}
|
|
295
|
-
function parseScratchpadEnabled(raw) {
|
|
296
|
-
return isJsonObject(raw) && raw.scratchpadEnabled === true;
|
|
297
|
-
}
|
|
298
|
-
//#endregion
|
|
299
266
|
//#region src/server/crash-report.ts
|
|
300
267
|
const CRASH_REPORT_URL = "https://bug.dev.fast/api/v2/crashes";
|
|
301
268
|
const gzipAsync = promisify(gzip);
|
|
@@ -799,34 +766,6 @@ function createJsonReviewReporting(store, telemetry, options = {}) {
|
|
|
799
766
|
});
|
|
800
767
|
return app;
|
|
801
768
|
}
|
|
802
|
-
//#endregion
|
|
803
|
-
//#region src/server/legacy-tutorial-cleanup.ts
|
|
804
|
-
/**
|
|
805
|
-
* Earlier versions shipped a three-minute tutorial: a managed review over a
|
|
806
|
-
* sample checkout under ~/.dev/tutorial. Whiteboard no longer has one, so
|
|
807
|
-
* remove what an earlier version left behind. Best effort: a failure leaves
|
|
808
|
-
* it for the next start.
|
|
809
|
-
*/
|
|
810
|
-
async function removeLegacyTutorial(input) {
|
|
811
|
-
const tutorialRoot = input.root ?? path.join(devReviewHome(), "tutorial");
|
|
812
|
-
try {
|
|
813
|
-
for (const reviewId of input.store.legacyTutorialIds()) await input.store.execute({ operation: {
|
|
814
|
-
type: "delete",
|
|
815
|
-
reviewId
|
|
816
|
-
} });
|
|
817
|
-
for (const repository of input.store.repositories()) {
|
|
818
|
-
const relative = path.relative(tutorialRoot, repository.path);
|
|
819
|
-
if (relative && !relative.startsWith("..") && !path.isAbsolute(relative)) await input.data.forgetRepository(repository.id);
|
|
820
|
-
}
|
|
821
|
-
await rm(tutorialRoot, {
|
|
822
|
-
recursive: true,
|
|
823
|
-
force: true,
|
|
824
|
-
maxRetries: 10
|
|
825
|
-
});
|
|
826
|
-
} catch (error) {
|
|
827
|
-
console.warn("[Whiteboard] Removing the old tutorial failed:", error);
|
|
828
|
-
}
|
|
829
|
-
}
|
|
830
769
|
const MAX_RETRY_MS = 3e4;
|
|
831
770
|
const FIRST_BYTE_TIMEOUT_MS = 1e4;
|
|
832
771
|
const NO_ANSWER = `it did not answer within ${FIRST_BYTE_TIMEOUT_MS / 1e3} seconds`;
|
|
@@ -1170,9 +1109,9 @@ function decorate(entry, state, hostState) {
|
|
|
1170
1109
|
}).sentence;
|
|
1171
1110
|
return {
|
|
1172
1111
|
...entry,
|
|
1173
|
-
...entry.
|
|
1174
|
-
|
|
1175
|
-
|
|
1112
|
+
...entry.project && { project: {
|
|
1113
|
+
id: `${alias}:${entry.project.id}`,
|
|
1114
|
+
name: entry.project.name
|
|
1176
1115
|
} },
|
|
1177
1116
|
host: alias,
|
|
1178
1117
|
hostState,
|
|
@@ -1225,9 +1164,9 @@ const listEntrySchema = z.looseObject({
|
|
|
1225
1164
|
repositoryName: z.string(),
|
|
1226
1165
|
viewedAt: z.string().nullable(),
|
|
1227
1166
|
trashedAt: z.string().nullable(),
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1167
|
+
project: z.object({
|
|
1168
|
+
id: z.string(),
|
|
1169
|
+
name: z.string()
|
|
1231
1170
|
}).optional()
|
|
1232
1171
|
});
|
|
1233
1172
|
const listEntriesSchema = z.array(z.unknown()).transform((entries) => entries.filter((entry) => listEntrySchema.safeParse(entry).success));
|
|
@@ -1981,12 +1920,11 @@ function reviewLifecycleTelemetry(telemetry, firstCreatedAt, onLoggedIn, now = D
|
|
|
1981
1920
|
const authoring = /* @__PURE__ */ new Map();
|
|
1982
1921
|
const capture = (event, properties, reviewUuid) => void telemetry.captureEvent(event, properties, reviewUuid ? { reviewUuid } : void 0);
|
|
1983
1922
|
return {
|
|
1984
|
-
onReviewCreated: ({ reviewId,
|
|
1923
|
+
onReviewCreated: ({ reviewId, blocks, via, agentKind }) => {
|
|
1985
1924
|
if (reported.has(reviewId)) return;
|
|
1986
1925
|
reported.add(reviewId);
|
|
1987
1926
|
if (via === "api" || via === "mcp") authoring.set(reviewId, agentKind);
|
|
1988
1927
|
const properties = {
|
|
1989
|
-
kind,
|
|
1990
1928
|
blocks,
|
|
1991
1929
|
via
|
|
1992
1930
|
};
|
|
@@ -2071,7 +2009,6 @@ function createGlobalReviewServer(input) {
|
|
|
2071
2009
|
const openWatchdog = new ReviewOpenWatchdog({ onTimeout: (context, elapsedMs) => void telemetry.captureEvent("review_open_timeout", { elapsed_ms: elapsedMs }, context) });
|
|
2072
2010
|
let closing = false;
|
|
2073
2011
|
const cliPath = path.join(input.packageRoot, "dist", "cli.js");
|
|
2074
|
-
let scratchpadEnabled = false;
|
|
2075
2012
|
const discovery = {
|
|
2076
2013
|
version: 3,
|
|
2077
2014
|
instanceId,
|
|
@@ -2096,7 +2033,6 @@ function createGlobalReviewServer(input) {
|
|
|
2096
2033
|
relay,
|
|
2097
2034
|
token,
|
|
2098
2035
|
instanceId,
|
|
2099
|
-
scratchpad: () => scratchpadEnabled,
|
|
2100
2036
|
status: () => {
|
|
2101
2037
|
const { key, channel, checkout, appVersion, cliVersion, instanceId } = discovery;
|
|
2102
2038
|
return {
|
|
@@ -2131,15 +2067,6 @@ function createGlobalReviewServer(input) {
|
|
|
2131
2067
|
app.all("/reviews-api", (context) => gateway.fetch(context.req.raw));
|
|
2132
2068
|
app.all("/reviews-api/*", (context) => gateway.fetch(context.req.raw));
|
|
2133
2069
|
app.get("/remote-hosts", () => serverJson(200, gateway.hosts()));
|
|
2134
|
-
app.get("/preferences/scratchpad", () => serverJson(200, { enabled: scratchpadEnabled }));
|
|
2135
|
-
app.put("/preferences/scratchpad", async (context) => {
|
|
2136
|
-
const request = z.object({ enabled: z.boolean() }).safeParse(await readBoundedRequestJson(context.req.raw));
|
|
2137
|
-
if (!request.success) throw new ReviewServerError("enabled must be a boolean.", 400);
|
|
2138
|
-
scratchpadEnabled = await writeScratchpadEnabled(request.data.enabled);
|
|
2139
|
-
if (scratchpadEnabled) await reviewStore.ensureScratchpad();
|
|
2140
|
-
reviewStore.invalidateCatalog();
|
|
2141
|
-
return serverJson(200, { enabled: scratchpadEnabled });
|
|
2142
|
-
});
|
|
2143
2070
|
app.post("/app/focus", async () => {
|
|
2144
2071
|
const result = await relay.dispatch({
|
|
2145
2072
|
name: "focusWindow",
|
|
@@ -2264,11 +2191,6 @@ function createGlobalReviewServer(input) {
|
|
|
2264
2191
|
},
|
|
2265
2192
|
listen: async () => {
|
|
2266
2193
|
await migrateDiffrConfig();
|
|
2267
|
-
await removeLegacyTutorial({
|
|
2268
|
-
store: reviewStore,
|
|
2269
|
-
data: input.reviewData
|
|
2270
|
-
});
|
|
2271
|
-
scratchpadEnabled = await readScratchpadEnabled();
|
|
2272
2194
|
boundPort = await listen(httpServer, input.port);
|
|
2273
2195
|
discovery.url = urlForBoundPort();
|
|
2274
2196
|
for (const discoveryPath of discoveryPaths) await writePrivateJsonAtomic(discoveryPath, discovery);
|
|
@@ -2306,7 +2228,7 @@ function sessionStartedSource(reviewStore, reviewUuid) {
|
|
|
2306
2228
|
if (!reviewUuid) return {};
|
|
2307
2229
|
try {
|
|
2308
2230
|
const snapshot = reviewStore.read(reviewUuid);
|
|
2309
|
-
const sourceKind = snapshot.
|
|
2231
|
+
const sourceKind = snapshot.target?.kind;
|
|
2310
2232
|
const pullRequestUrl = snapshot.origin?.pullRequestUrl;
|
|
2311
2233
|
const prProvider = pullRequestUrl && prProviderOf(pullRequestUrl);
|
|
2312
2234
|
return {
|
|
@@ -2393,7 +2315,10 @@ async function runDesktopHost(env = process.env) {
|
|
|
2393
2315
|
await mkdir(home, { recursive: true });
|
|
2394
2316
|
const log = (message) => process.stdout.write(`[Whiteboard gateway] ${message}\n`);
|
|
2395
2317
|
const { local, shared, server } = await takeOverServerHome(home, async () => {
|
|
2396
|
-
const local = await openReviewProfile(home, {
|
|
2318
|
+
const local = await openReviewProfile(home, {
|
|
2319
|
+
manageWorkspaces: true,
|
|
2320
|
+
pullRequestStates: true
|
|
2321
|
+
});
|
|
2397
2322
|
const shared = new SharedReviewStore(path.join(home, "shared-reviews"));
|
|
2398
2323
|
shared.connect(local.store, local.data);
|
|
2399
2324
|
await shared.load();
|
|
@@ -2467,8 +2392,7 @@ function requiredPositiveInteger(value, name) {
|
|
|
2467
2392
|
return parsed;
|
|
2468
2393
|
}
|
|
2469
2394
|
if (process.env.DEV_FAST_REVIEW_DESKTOP_HOST_AUTOSTART !== "0") runDesktopHost().catch((error) => {
|
|
2470
|
-
process.stderr.write(`${error instanceof Error ? error.stack ?? error.message : String(error)}\n
|
|
2471
|
-
process.exitCode = 1;
|
|
2395
|
+
process.stderr.write(`${error instanceof Error ? error.stack ?? error.message : String(error)}\n`, () => process.exit(1));
|
|
2472
2396
|
});
|
|
2473
2397
|
//#endregion
|
|
2474
2398
|
export { runDesktopHost };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as jsonNumber, n as isJsonObject, s as jsonProperty, u as parseJsonText } from "./src-X9phtB2j.js";
|
|
2
|
-
import { n as parseReviewDesktopDiscovery } from "./src-
|
|
3
|
-
import { a as reviewInstancesDir, o as reviewLegacyDiscoveryPath, r as reviewDevInstanceKey, t as reviewDefaultInstancePath } from "./review-home-paths-
|
|
4
|
-
import { M as DEV_REVIEW_HOME_ENV, N as devReviewHome, k as processIsAlive } from "./s3-config-
|
|
2
|
+
import { n as parseReviewDesktopDiscovery } from "./src-DYZLCUP_.js";
|
|
3
|
+
import { a as reviewInstancesDir, o as reviewLegacyDiscoveryPath, r as reviewDevInstanceKey, t as reviewDefaultInstancePath } from "./review-home-paths-BwH08ihj.js";
|
|
4
|
+
import { M as DEV_REVIEW_HOME_ENV, N as devReviewHome, k as processIsAlive } from "./s3-config-CjcLyFV5.js";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import { mkdir, readFile, readdir, rm, writeFile } from "node:fs/promises";
|
|
7
7
|
import path from "node:path";
|