@dev.fast/whiteboard 0.3.4-preview.20261019.127 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{account-alias-B5-HYi1D.js → account-alias-CprZojXd.js} +8 -13
- package/dist/agent-cli-C6SPSII0.js +2 -0
- package/dist/{agent-cli-CohHf6Ua.js → agent-cli-CThN7Q59.js} +10 -15
- package/dist/{agent-client-Dtc-Kn_w.js → agent-client-BOOi7EUR.js} +3 -13
- package/dist/{authoring-tools-B7KU04f7.js → authoring-tools-BNwuMnz6.js} +27 -34
- package/dist/{background-server-C03RKxKS.js → background-server-CkvxA-6O.js} +5 -5
- package/dist/{background-server-CB9C4uoc.js → background-server-DLSDogkI.js} +1 -1
- package/dist/build-info.json +1 -1
- package/dist/{cli-CJaEb7zC.js → cli-R4yfa5DT.js} +1 -1
- package/dist/{cli-runner-DGDIqh3V.js → cli-runner-Cuc9FSzu.js} +26 -26
- package/dist/cli.js +3 -4
- package/dist/{client-lKVF_Elo.js → client-BN_FDxFr.js} +47 -253
- package/dist/{fuzzy-match-BmVJJm9I.js → fuzzy-match-BO9bK37N.js} +4 -6
- package/dist/{headless-host-DRtjf9WA.js → headless-host-CVBOQyRS.js} +1 -1
- package/dist/{headless-host-XhL1X4vX.js → headless-host-Cog6SpS9.js} +140 -513
- package/dist/{local-data-Cpl4ENbJ.js → local-data-D_9tvdsp.js} +323 -2419
- package/dist/{mcp-ovmiUE_x.js → mcp-D1hziANa.js} +9 -5
- package/dist/{package-paths-BWxO-UEL.js → package-paths-C--__jEv.js} +1 -1
- package/dist/profile-CYPmvBoA.js +2 -0
- package/dist/{profile-BadSkCkI.js → profile-DokFw782.js} +8 -20
- package/dist/{remote-attach-Dd-YobM6.js → remote-attach-CEJ-kvDY.js} +4 -4
- package/dist/{remote-extensions-CNXwqK0D.js → remote-extensions-Blcjr9Ze.js} +3 -3
- package/dist/{remote-extensions-VP-kfq0C.js → remote-extensions-GN8Gf_qG.js} +1 -1
- package/dist/{remote-language-server-BXk87KCr.js → remote-language-server-BTKBQ7x4.js} +5 -5
- package/dist/{remote-uninstall-DuOzsvaD.js → remote-uninstall-DW7Gdryh.js} +6 -6
- package/dist/{request-origin-B9qCPiVB.js → request-origin-Zcn_CjX4.js} +12 -45
- package/dist/{review-app-launcher-C7el2Uoy.js → review-app-launcher-CkwLclzR.js} +2 -2
- package/dist/{review-home-paths-D8AoCdd2.js → review-home-paths-j2BRAaNv.js} +17 -19
- package/dist/{review-telemetry-BsoRMC2w.js → review-telemetry-BLNwYnLV.js} +5 -5
- package/dist/runtime-CKiWhGrf.js +52 -0
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +1 -1
- package/dist/{s3-CsG2EWED.js → s3-DtJFWC0G.js} +1 -1
- package/dist/{s3-config-CjcLyFV5.js → s3-config-BTO12tCC.js} +2 -4
- package/dist/{s3-config-zz4GWh2T.js → s3-config-CSy3fx8H.js} +1 -1
- package/dist/server/desktop-host.js +76 -29
- package/dist/{server-discovery-CKjw3-6h.js → server-discovery-Bey8IqXH.js} +3 -3
- package/dist/sharing/index.d.ts +70 -484
- package/dist/sharing/index.js +1 -1
- package/dist/{src-WPaQn75m.js → src-BMPuxWv4.js} +73 -208
- package/dist/{src-BiWNbcF_.js → src-DsM3jO8G.js} +12 -89
- package/dist/{stored-document-migration-dFbewRTG.js → stored-document-migration-CChxtFAy.js} +269 -270
- package/dist/{thread-state-Do5LX10I.js → thread-state-5pYr6_zM.js} +2 -7
- package/dist/{tool-failure-DvI-gys2.js → tool-failure-C9MpbXJJ.js} +3 -10
- package/instructions/authoring.md +2 -3
- package/instructions/scratchpad.md +23 -0
- package/package.json +4 -4
- package/src/ask/agents.ts +1 -13
- package/src/ask/checkout-files.ts +5 -2
- package/src/ask/thread-state.ts +0 -4
- package/src/ask/thread.ts +0 -16
- package/src/ask/threads.ts +3 -24
- package/src/cli-install.ts +2 -13
- package/src/cli-runner.ts +1 -4
- package/src/cli.ts +1 -4
- package/src/diff-selection-migration.ts +34 -48
- package/src/lens-selection.ts +2 -38
- package/src/review-api/README.md +13 -52
- package/src/review-api/activity.ts +4 -1
- package/src/review-api/agent-cli.ts +1 -9
- package/src/review-api/anchor-quotes.ts +7 -14
- package/src/review-api/ask-history.ts +51 -137
- package/src/review-api/authoring-tools.ts +30 -45
- package/src/review-api/blocks/definition.ts +1 -1
- package/src/review-api/blocks/markdown.ts +2 -2
- package/src/review-api/document-headings.ts +27 -58
- package/src/review-api/document-text.ts +2 -31
- package/src/review-api/document.ts +34 -281
- package/src/review-api/github-provider.ts +13 -51
- package/src/review-api/http.ts +123 -702
- package/src/review-api/instructions.ts +19 -0
- package/src/review-api/local-data.ts +46 -310
- package/src/review-api/mcp.ts +11 -3
- package/src/review-api/onboarding.ts +1 -1
- package/src/review-api/profile.ts +6 -37
- package/src/review-api/public-tools.ts +2 -24
- package/src/review-api/pull-request.ts +49 -82
- package/src/review-api/request-origin.ts +0 -10
- package/src/review-api/review-progress.ts +27 -61
- package/src/review-api/store-schema.ts +29 -38
- package/src/review-api/store.ts +478 -2142
- package/src/review-api/worktree-events.ts +5 -3
- package/src/review-api/worktree-source.ts +7 -3
- package/src/review-api/worktree-structural.integration.ts +0 -72
- package/src/review-preferences.ts +88 -0
- package/src/review-stack.ts +23 -15
- package/src/runtime.ts +30 -4
- package/src/server/desktop-host.ts +1 -6
- package/src/server/desktop-server.ts +31 -1
- package/src/server/headless-host.ts +2 -0
- package/src/server/hono-http.ts +1 -2
- package/src/server/legacy-tutorial-cleanup.ts +3 -2
- package/src/server/review-gateway-list.ts +5 -3
- 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 +5 -1
- package/src/server/structural-comparisons.ts +0 -47
- package/src/sharing/export.ts +7 -36
- package/src/sharing/host.ts +14 -34
- package/src/sharing/import.ts +24 -156
- package/src/sharing/repository.ts +20 -128
- package/src/startup-trace.ts +3 -3
- package/src/stored-document-migration.ts +19 -110
- package/src/ui-telemetry-events.ts +11 -33
- package/dist/agent-cli-_YyMIMRY.js +0 -2
- package/dist/lens-selection-CyJapcsl.js +0 -214
- package/dist/profile-DJvkBJNQ.js +0 -2
- package/dist/runtime-Bj2tD33R.js +0 -27
- package/src/heading-anchors.ts +0 -42
- package/src/review-api/board-order.ts +0 -144
- package/src/review-api/checkout-groups.ts +0 -560
- package/src/review-api/foreign-references.ts +0 -328
- package/src/review-api/link-preview.ts +0 -113
- package/src/review-api/scratchpad-plan-upgrade.ts +0 -250
- package/src/review-api/store-migrations.ts +0 -357
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as isJsonObject } from "./src-X9phtB2j.js";
|
|
2
|
-
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,
|
|
4
|
-
import { I as writeFileAtomicAsync, L as writePrivateJsonAtomic, N as devReviewHome, j as withFileLock } from "./s3-config-
|
|
5
|
-
import { i as readReviewPackageVersion } from "./package-paths-
|
|
2
|
+
import { w as ReviewCliInstallStampSchema } from "./src-DsM3jO8G.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, dt as StoreClient, n as reviewDesktopStateDir, nt as traceScope, ot as readStoreAuth } from "./review-home-paths-j2BRAaNv.js";
|
|
4
|
+
import { I as writeFileAtomicAsync, L as writePrivateJsonAtomic, N as devReviewHome, j as withFileLock } from "./s3-config-BTO12tCC.js";
|
|
5
|
+
import { i as readReviewPackageVersion } from "./package-paths-C--__jEv.js";
|
|
6
6
|
import { n as isFile, t as isDirectory } from "./fs-utils-BMPLt0cr.js";
|
|
7
|
-
import { c as findExecutable, s as executableCommand } from "./fuzzy-match-
|
|
7
|
+
import { c as findExecutable, s as executableCommand } from "./fuzzy-match-BO9bK37N.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";
|
|
@@ -1093,9 +1093,9 @@ async function isOwnedShim(shimPath) {
|
|
|
1093
1093
|
* (ELECTRON_RUN_AS_NODE) — the exact runtime the server uses. System Node is
|
|
1094
1094
|
* the last resort and gets a clear version check instead of a cryptic crash.
|
|
1095
1095
|
*/
|
|
1096
|
-
async function writePathShim(shimPath, cliPath, runtimePath, devHome
|
|
1096
|
+
async function writePathShim(shimPath, cliPath, runtimePath, devHome) {
|
|
1097
1097
|
if (process.platform === "win32") {
|
|
1098
|
-
await writeFileAtomicAsync(shimPath, windowsCliShim(cliPath, runtimePath ?? process.execPath, devHome
|
|
1098
|
+
await writeFileAtomicAsync(shimPath, windowsCliShim(cliPath, runtimePath ?? process.execPath, devHome), { replaceSymlink: true });
|
|
1099
1099
|
shimPath = shimPath.replace(/\.cmd$/i, "");
|
|
1100
1100
|
}
|
|
1101
1101
|
const source = `#!/bin/sh
|
|
@@ -1103,8 +1103,6 @@ async function writePathShim(shimPath, cliPath, runtimePath, devHome, previewHom
|
|
|
1103
1103
|
FALLBACK_CLI=${shSingleQuote(cliPath)}
|
|
1104
1104
|
FALLBACK_RUNTIME=${shSingleQuote(runtimePath ?? "")}
|
|
1105
1105
|
DEFAULT_HOME=${shSingleQuote(devHome)}
|
|
1106
|
-
channel="\${DEV_FAST_REVIEW_CHANNEL:-\${DEV_REVIEW_INSTANCE:-}}"
|
|
1107
|
-
[ "$channel" = preview ] && DEFAULT_HOME=${shSingleQuote(previewHome)}
|
|
1108
1106
|
export DEV_REVIEW_HOME="\${DEV_REVIEW_HOME:-$DEFAULT_HOME}"
|
|
1109
1107
|
DESKTOP="$DEV_REVIEW_HOME/review-desktop"
|
|
1110
1108
|
|
|
@@ -1205,10 +1203,7 @@ async function installReviewCommand(input) {
|
|
|
1205
1203
|
output: `[skip] kept the existing whiteboard command at ${shimPath}\n`
|
|
1206
1204
|
};
|
|
1207
1205
|
const shadowingCommand = await resolvePathCommand("whiteboard", shimPath, env);
|
|
1208
|
-
await writePathShim(shimPath, input.cliPath, input.cliRuntimePath, devReviewHome(
|
|
1209
|
-
DEV_REVIEW_HOME: env.DEV_REVIEW_HOME,
|
|
1210
|
-
DEV_REVIEW_INSTANCE: "preview"
|
|
1211
|
-
}, homeDir));
|
|
1206
|
+
await writePathShim(shimPath, input.cliPath, input.cliRuntimePath, devReviewHome(env, homeDir));
|
|
1212
1207
|
if (await traceMachineEnabled({
|
|
1213
1208
|
homeDir,
|
|
1214
1209
|
env
|
|
@@ -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-
|
|
3
|
-
import { a as toolResultText, i as connectReviewInstance, s as ReviewApiError } from "./agent-client-
|
|
4
|
-
import { N as devReviewHome } from "./s3-config-
|
|
5
|
-
import { n as readBuildCommit } from "./package-paths-
|
|
6
|
-
import { b as selectReviewInstance, u as REVIEW_INSTANCE_ENV } from "./server-discovery-
|
|
7
|
-
import { n as reviewSessionAgent } from "./review-telemetry-
|
|
8
|
-
import {
|
|
9
|
-
import { i as publicTool, n as RECOVERY, r as callPublicTool, t as toolFailure } from "./tool-failure-
|
|
2
|
+
import { T as traceMachineEnabled } from "./review-home-paths-j2BRAaNv.js";
|
|
3
|
+
import { a as toolResultText, i as connectReviewInstance, s as ReviewApiError } from "./agent-client-BOOi7EUR.js";
|
|
4
|
+
import { N as devReviewHome } from "./s3-config-BTO12tCC.js";
|
|
5
|
+
import { n as readBuildCommit } from "./package-paths-C--__jEv.js";
|
|
6
|
+
import { b as selectReviewInstance, u as REVIEW_INSTANCE_ENV } from "./server-discovery-Bey8IqXH.js";
|
|
7
|
+
import { n as reviewSessionAgent } from "./review-telemetry-BLNwYnLV.js";
|
|
8
|
+
import { n as REVIEW_VIA_HEADER, t as REVIEW_AGENT_HEADER } from "./request-origin-Zcn_CjX4.js";
|
|
9
|
+
import { i as publicTool, n as RECOVERY, r as callPublicTool, t as toolFailure } from "./tool-failure-C9MpbXJJ.js";
|
|
10
10
|
import { existsSync } from "node:fs";
|
|
11
11
|
import path from "node:path";
|
|
12
12
|
//#region src/review-api/install-update.ts
|
|
@@ -36,14 +36,9 @@ async function runReviewAgentCli(input) {
|
|
|
36
36
|
return 0;
|
|
37
37
|
}
|
|
38
38
|
if (extra.length || mode === "mcp" && name) throw new Error("Unexpected arguments. Use whiteboard api --help.");
|
|
39
|
-
const
|
|
40
|
-
const headers = Object.fromEntries([
|
|
41
|
-
[REVIEW_VIA_HEADER, mode === "mcp" ? "mcp" : "api"],
|
|
42
|
-
[REVIEW_AGENT_HEADER, reviewSessionAgent(env)],
|
|
43
|
-
[REVIEW_THREAD_HEADER, thread ?? ""]
|
|
44
|
-
]);
|
|
39
|
+
const headers = Object.fromEntries([[REVIEW_VIA_HEADER, mode === "mcp" ? "mcp" : "api"], [REVIEW_AGENT_HEADER, reviewSessionAgent(env)]]);
|
|
45
40
|
if (mode === "mcp") {
|
|
46
|
-
const { serveReviewMcp } = await import("./mcp-
|
|
41
|
+
const { serveReviewMcp } = await import("./mcp-D1hziANa.js");
|
|
47
42
|
exitOnInstallUpdate(input.stderr);
|
|
48
43
|
await serveReviewMcp(async (key, agentKind) => {
|
|
49
44
|
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-
|
|
2
|
+
import "./src-DsM3jO8G.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-
|
|
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-Bey8IqXH.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. */
|
|
@@ -43,16 +43,6 @@ var ReviewApiClient = class {
|
|
|
43
43
|
signal
|
|
44
44
|
})).json();
|
|
45
45
|
}
|
|
46
|
-
/** A command the person gave from the app, not an agent: its version is
|
|
47
|
-
* credited to them, and a block they hold never stops it. The header is
|
|
48
|
-
* the one request-origin.ts names. */
|
|
49
|
-
async personCommand(operation) {
|
|
50
|
-
return (await this.response("/commands", {
|
|
51
|
-
method: "POST",
|
|
52
|
-
headers: { "x-review-person": "1" },
|
|
53
|
-
body: JSON.stringify({ operation })
|
|
54
|
-
})).json();
|
|
55
|
-
}
|
|
56
46
|
async *watch(subscriptions, signal) {
|
|
57
47
|
const reader = (await this.response(`/watch?subscriptions=${encodeURIComponent(JSON.stringify(subscriptions))}`, { signal })).body.pipeThrough(new TextDecoderStream()).getReader();
|
|
58
48
|
const cancel = () => {
|
|
@@ -259,7 +249,7 @@ async function connectReviewInstance(env = process.env, headers = {}, options =
|
|
|
259
249
|
const selection = await selectReviewInstance({ env });
|
|
260
250
|
const discovery = healthyReviewInstance(selection);
|
|
261
251
|
if (!discovery) {
|
|
262
|
-
const { ensureServerWithoutDesktop } = await import("./background-server-
|
|
252
|
+
const { ensureServerWithoutDesktop } = await import("./background-server-DLSDogkI.js");
|
|
263
253
|
const server = await ensureServerWithoutDesktop({
|
|
264
254
|
selection,
|
|
265
255
|
env,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import {
|
|
3
|
-
import { C as pathTargetSchema, D as publishedEditSchema } from "./stored-document-migration-dFbewRTG.js";
|
|
1
|
+
import { c as activityEndSchema, i as commandSchema, l as activityUpdateSchema, n as uploadSchema, s as activityBeginSchema } from "./local-data-D_9tvdsp.js";
|
|
2
|
+
import { S as publishedEditSchema, y as pathTargetSchema } from "./stored-document-migration-CChxtFAy.js";
|
|
4
3
|
import { t as ReviewInputError } from "./input-error-OLgB_h31.js";
|
|
5
|
-
import { t as findReviewPackageRoot } from "./package-paths-
|
|
4
|
+
import { t as findReviewPackageRoot } from "./package-paths-C--__jEv.js";
|
|
6
5
|
import { z } from "zod";
|
|
7
6
|
import { readFile } from "node:fs/promises";
|
|
8
7
|
import path from "node:path";
|
|
@@ -103,8 +102,12 @@ const COMPONENT_REFERENCE = [
|
|
|
103
102
|
const instructionsQuerySchema = z.strictObject({ topic: z.enum([
|
|
104
103
|
"authoring",
|
|
105
104
|
"file-lenses",
|
|
105
|
+
"scratchpad",
|
|
106
106
|
"trace-archaeology"
|
|
107
107
|
]).default("authoring") });
|
|
108
|
+
function scratchpadAvailable(context) {
|
|
109
|
+
return context.desktopAvailable && context.scratchpadEnabled;
|
|
110
|
+
}
|
|
108
111
|
const cache = /* @__PURE__ */ new Map();
|
|
109
112
|
function read(root, name) {
|
|
110
113
|
const file = path.join(root, "instructions", `${name}.md`);
|
|
@@ -119,9 +122,11 @@ function read(root, name) {
|
|
|
119
122
|
return content;
|
|
120
123
|
}
|
|
121
124
|
async function renderInstructions(topic, context, root = findReviewPackageRoot(import.meta.url)) {
|
|
125
|
+
if (topic === "scratchpad" && !scratchpadAvailable(context)) return "The Whiteboard scratchpad is turned off or Whiteboard Desktop is not running. Answer in chat; the scratchpad can be turned on in Whiteboard Desktop Settings.";
|
|
122
126
|
if (topic === "trace-archaeology" && !context.traceEnabled) return "Trace capture is off on this machine, so no agent traces are available. It can be turned on in Whiteboard Desktop Settings under Experimental Features.";
|
|
127
|
+
if (topic === "scratchpad") return `${await read(root, topic)}\n\n${COMPONENT_REFERENCE}`;
|
|
123
128
|
if (topic !== "authoring") return read(root, topic);
|
|
124
|
-
const more = [...context.traceEnabled ? ["- Why code exists / past agent sessions: `session_get_instructions({topic:\"trace-archaeology\"})`"] : []];
|
|
129
|
+
const more = [...scratchpadAvailable(context) ? ["- Explaining code visually outside a review: `session_get_instructions({topic:\"scratchpad\"})`"] : [], ...context.traceEnabled ? ["- Why code exists / past agent sessions: `session_get_instructions({topic:\"trace-archaeology\"})`"] : []];
|
|
125
130
|
return [
|
|
126
131
|
await read(root, "authoring"),
|
|
127
132
|
COMPONENT_REFERENCE,
|
|
@@ -148,7 +153,7 @@ const REVIEW_STATUS_TOOL = {
|
|
|
148
153
|
/** The host publishes its input schemas, except where agents write less than
|
|
149
154
|
* the host accepts (publishedEditSchema, publishedLensEditSchema) or name a
|
|
150
155
|
* checkout by path (pathTargetSchema); adapters validate nothing. */
|
|
151
|
-
function authoringTools(traceEnabled = false) {
|
|
156
|
+
function authoringTools(scratchpadAvailable = false, traceEnabled = false) {
|
|
152
157
|
const id = z.string().min(1);
|
|
153
158
|
const review = { reviewId: id };
|
|
154
159
|
const [image, trace] = uploadSchema.options;
|
|
@@ -156,19 +161,19 @@ function authoringTools(traceEnabled = false) {
|
|
|
156
161
|
...image.shape,
|
|
157
162
|
...trace.shape,
|
|
158
163
|
kind: z.enum(["image", "trace"])
|
|
159
|
-
}).
|
|
164
|
+
}).partial().required({
|
|
160
165
|
id: true,
|
|
161
|
-
|
|
166
|
+
repositoryId: true,
|
|
162
167
|
kind: true
|
|
163
168
|
});
|
|
164
169
|
const descriptions = {
|
|
165
|
-
create: "Create a
|
|
166
|
-
set_target: "Move the review to a new target
|
|
170
|
+
create: "Create a review of saved working files, immutable commits or a GitHub PR. Revisions are resolved on acceptance. A worktree target reviews the saved files in its checkout, uncommitted ones included and untracked ones left out (git add -N a new file to include it), against base: the branch to compare against, by default the default branch of the repository. The diff starts at the merge base of base and HEAD, which follows rebases. Omitted commits base means source at head with no diff; supply the parent to review introduced changes. For a branch stacked on another, pass the branch below it as base; Desktop links reviews into a stack through their bases. For a GitHub PR, pullRequestUrl alone is enough: target and title become optional, and the host fetches the PR into a registered checkout of its repository and pins the current PR head and GitHub diff base, titled from the PR. When the existing review for that PR is in Trash, creation reports its ID; restore it with review_lifecycle state:\"active\" before continuing. When an active review for that PR exists, it is returned instead, reporting whether its head moved and whether an agent is working on it; update it in place, move its target with review_set_target, or create a separate review with reuseExisting. kind:\"scratchpad\" names the one scratchpad, which the host creates itself. The result carries review, the review as review_list shows it: its target with resolved commits, origin (its PR), repositoryName and repositoryPath, so no follow-up read is needed before diffing. When Desktop is available the review opens there and the result reports opened, softwareMapEnabled and environmentIssues, as review_open does; set open:false to author in the background without taking over Desktop.",
|
|
171
|
+
set_target: "Move the review to a new target, such as the commits after a rebase or amend, preserving the document and component IDs. Revisions are resolved on acceptance. Returns warnings for retained source ranges in files the new commits changed, to verify, and resources that no longer match; fix them with review_edit. Earlier versions keep their source. Omitted pullRequestUrl keeps the PR within the same repository; changing repositories clears it. Supply a URL to replace it or null to detach.",
|
|
167
172
|
edit: [
|
|
168
|
-
"Edit one document component. content is one component, named by its type; each type's fields are in the Components section of session_get_instructions.",
|
|
169
|
-
"Anchors are head/path#L10-L20 or base/path#L7, or diff/path#L84-R90 for a range across sides, with repository-relative paths and 1-based inclusive lines. pins {head, base?} say which commits
|
|
170
|
-
"insert adds content: parentId nests it, afterId places it, and omitted placement appends. update patches a component's own fields; null removes an optional one. A section's children and a diagram's units change through their own IDs; a call stack's frames change by replacing the call stack. move and remove take a targetId; removing a flow_node removes its edges.",
|
|
171
|
-
"The host assigns short durable IDs. The result names the edited component and, for an insert or replace, its first-level children, and quotes the first and last line of each anchor the edit added or changed (the first 20; unquotedAnchors counts the rest): check they are the lines you meant. Accepted edits save at once.
|
|
173
|
+
"Edit one document component. content is one component, named by its type; each type's fields are in the Components section of session_get_instructions (authoring or scratchpad).",
|
|
174
|
+
"Anchors are head/path#L10-L20 or base/path#L7, or diff/path#L84-R90 for a range across sides, with repository-relative paths and 1-based inclusive lines. pins {repositoryId, head, base?} say which commits anchors quote: a step, frame, attachment or operation without pins uses its block's, and a block without them the review's.",
|
|
175
|
+
"insert adds content: parentId nests it, afterId places it, and omitted placement appends (on the scratchpad, it lands at the top). update patches a component's own fields; null removes an optional one. A section's children and a diagram's units change through their own IDs; a call stack's frames change by replacing the call stack. move and remove take a targetId; removing a flow_node removes its edges.",
|
|
176
|
+
"The host assigns short durable IDs. The result names the edited component and, for an insert or replace, its first-level children, and quotes the first and last line of each anchor the edit added or changed (the first 20; unquotedAnchors counts the rest): check they are the lines you meant. Accepted edits save at once.",
|
|
172
177
|
"While a reader may be watching, write small and often: one paragraph per edit. Insert a new diagram whole. Change one already drawn a unit at a time (a flow_node, flow_edge or step, with parentId naming the diagram), and link each added flow_node to a node already drawn."
|
|
173
178
|
].join("\n"),
|
|
174
179
|
lens_edit: "Edit one Diff-view lens. Lenses partition the review's change for the Diff view; they sit beside the document (never in it) and version with it. The host assigns durable lens IDs; updates replace only the fields supplied. Write one lens per call while a reader may be watching; each draws in on the Diffs page. Pass your activityId so your courier draws each lens. The result identifies the lens and reports uncategorized: changed lines no lens selects yet, grouped by file. Keep adding lenses until it is empty or what remains is deliberate. review_lens_get reads the current lenses and gaps.",
|
|
@@ -176,15 +181,13 @@ function authoringTools(traceEnabled = false) {
|
|
|
176
181
|
restore: "Restore title, source pins, PR identity and content from a saved version.",
|
|
177
182
|
attention: "Mark an active review viewed without changing its content or lifecycle. Restore a review from Trash before marking it viewed.",
|
|
178
183
|
lifecycle: "Move a review between active and trash. Trash retains the review for 30 days before automatic deletion. Moving it back to active restores it; moving it to trash again does not restart that period.",
|
|
179
|
-
delete: "Permanently delete a review and its history. The review must be in Trash. This cannot be undone.
|
|
180
|
-
set_parent: "Nest the review under another review of the same project, or make it top-level with parentId:null. Nesting is one level deep: the parent must be top-level, and a review with children can't become a child. The sidebar shows children under their parent. Saves no review version. Returns the review's relations: parentId, children in sibling order, and dependsOn.",
|
|
181
|
-
set_dependencies: "Replace the list of reviews this one builds on: any reviews of the same project. Siblings list after what they depend on, directly or through other reviews; a PR stack is a chain. A list that would close a cycle is refused, naming the cycle. Saves no review version. Returns the review's relations."
|
|
184
|
+
delete: "Permanently delete a review and its history. The review must be in Trash. This cannot be undone."
|
|
182
185
|
};
|
|
183
186
|
const tool = (name, description, schema, method, path, commandType) => ({
|
|
184
187
|
name: `review_${name === "restore" ? "restore_version" : name}`,
|
|
185
188
|
description,
|
|
186
189
|
inputSchema: {
|
|
187
|
-
...
|
|
190
|
+
...z.toJSONSchema(schema, { io: "input" }),
|
|
188
191
|
type: "object"
|
|
189
192
|
},
|
|
190
193
|
method,
|
|
@@ -194,17 +197,18 @@ function authoringTools(traceEnabled = false) {
|
|
|
194
197
|
return [
|
|
195
198
|
REVIEW_STATUS_TOOL,
|
|
196
199
|
tool("capabilities", "Discover whether Desktop is available and optional software-map generation is enabled. Read before authoring.", z.strictObject({}), "GET", "/capabilities"),
|
|
197
|
-
tool("get_instructions", "Read Whiteboard's guidance before creating or editing a review. The default topic gives the authoring workflow; \"file-lenses\" covers Diff-view file lenses." + (traceEnabled ? " Call review_get_instructions({topic:\"trace-archaeology\"}) for why code exists, what an agent was thinking, or whether an agent solved this before." : ""), instructionsQuerySchema.partial(), "GET", "/instructions"),
|
|
200
|
+
tool("get_instructions", "Read Whiteboard's guidance before creating or editing a review. The default topic gives the authoring workflow; \"file-lenses\" covers Diff-view file lenses." + (traceEnabled ? " Call review_get_instructions({topic:\"trace-archaeology\"}) for why code exists, what an agent was thinking, or whether an agent solved this before." : "") + (scratchpadAvailable ? " When the user asks in conversation to be shown how code works or wants a diagram, without asking for a review, draw it on the scratchpad rather than answering only in chat: call review_get_instructions({topic:\"scratchpad\"}) first. A request for a review or to use Whiteboard means authoring a review with the default topic." : ""), instructionsQuerySchema.partial(), "GET", "/instructions"),
|
|
198
201
|
tool("activity_begin", "Show that you are working on a review: the reader sees your focus and your courier drawing your edits, and the review reads as finished only once every agent has ended. Returns an activityId: pass it to session_edit and session_lens_edit so your courier draws them, and to review_activity_update and review_activity_end. Nothing is locked; other agents can work on the review too. The activity expires after 3 minutes without an edit or update.", activityBeginSchema.extend(review), "POST", "/:reviewId/activity/begin"),
|
|
199
202
|
tool("activity_update", "Change your focus, or keep your activity alive during long reads or pauses; an edit carrying your activityId already keeps it alive. Omitted focus preserves it and null clears it. Fails once the activity has expired: begin a new one.", activityUpdateSchema.extend(review), "POST", "/:reviewId/activity/update"),
|
|
200
203
|
tool("activity_end", "End your activity when your part is finished: readers treat a review with content and no live activity as ready. Ending it creates no document version. Ending twice, or an expired activity, changes nothing.", activityEndSchema.extend(review), "POST", "/:reviewId/activity/end"),
|
|
201
204
|
...commandSchema.shape.operation.options.map((operation) => {
|
|
202
205
|
const type = operation.shape.type.value;
|
|
203
|
-
const { type: _type, repositoryId: _repositoryId,
|
|
206
|
+
const { type: _type, repositoryId: _repositoryId, ...fields } = operation.shape;
|
|
204
207
|
return tool(type, descriptions[type], z.strictObject({
|
|
205
208
|
...fields,
|
|
206
209
|
...type === "create" && {
|
|
207
|
-
target: pathTargetSchema,
|
|
210
|
+
target: pathTargetSchema.optional(),
|
|
211
|
+
repositoryPath: id.optional().describe("Only with pullRequestUrl and no target: the local checkout to fetch the PR into. Default: the existing review's, else the first registered checkout with a remote for the PR's repository."),
|
|
208
212
|
open: z.boolean().optional()
|
|
209
213
|
},
|
|
210
214
|
...type === "set_target" && { target: pathTargetSchema },
|
|
@@ -224,20 +228,9 @@ function authoringTools(traceEnabled = false) {
|
|
|
224
228
|
retry: z.boolean().optional()
|
|
225
229
|
}), "POST", "/:reviewId/environment"),
|
|
226
230
|
tool("workspace_cleanup", "Inspect failed cleanup of retired review-owned checkouts. Supply workspaceId to retry removal of that checkout. This does not remove active review checkouts.", z.strictObject({ workspaceId: id.optional() }), "POST", "/workspace-cleanup"),
|
|
231
|
+
tool("register_repository", "Register a local Git or jj repository and return its id, for pins on scratchpad blocks. session_create and session_set_target take the checkout's path instead.", z.strictObject({ path: id }), "POST", "/repositories"),
|
|
227
232
|
tool("upload", "Retain an image or trace for use in a review. kind:\"image\" takes base64; kind:\"trace\" takes trace. Reusing an upload ID requires identical content; rejected uploads are not saved.", uploadInput, "POST", "/resources")
|
|
228
233
|
];
|
|
229
234
|
}
|
|
230
|
-
/** Drops repositoryId from pins: the host fills in the board's own. */
|
|
231
|
-
function withoutRepositoryIds(schema) {
|
|
232
|
-
return JSON.parse(JSON.stringify(schema), (_key, value) => {
|
|
233
|
-
if (!isJsonObject(value) || !isJsonObject(value.properties) || !("repositoryId" in value.properties) || !("head" in value.properties)) return value;
|
|
234
|
-
const { repositoryId: _repositoryId, ...properties } = value.properties;
|
|
235
|
-
return {
|
|
236
|
-
...value,
|
|
237
|
-
properties,
|
|
238
|
-
...Array.isArray(value.required) && { required: value.required.filter((name) => name !== "repositoryId") }
|
|
239
|
-
};
|
|
240
|
-
});
|
|
241
|
-
}
|
|
242
235
|
//#endregion
|
|
243
|
-
export {
|
|
236
|
+
export { scratchpadAvailable as a, readQuerySchemas as c, renderInstructions as i, REVIEW_STATUS_TOOL as n, inspectQuerySchema as o, instructionsQuerySchema as r, queryAnchor as s, authoringTools as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./review-home-paths-
|
|
2
|
-
import { D as liveLockOwner, k as processIsAlive } from "./s3-config-
|
|
3
|
-
import { t as findReviewPackageRoot } from "./package-paths-
|
|
4
|
-
import { a as readReviewServerHealth, c as reviewServerStateDir, i as readReviewServerDiscovery, n as desktopOwnsHome, p as desktopUsesHome, r as headlessServerLockPath } from "./server-discovery-
|
|
5
|
-
import { t as desktopApplicationInstalled } from "./review-app-launcher-
|
|
1
|
+
import "./review-home-paths-j2BRAaNv.js";
|
|
2
|
+
import { D as liveLockOwner, k as processIsAlive } from "./s3-config-BTO12tCC.js";
|
|
3
|
+
import { t as findReviewPackageRoot } from "./package-paths-C--__jEv.js";
|
|
4
|
+
import { a as readReviewServerHealth, c as reviewServerStateDir, i as readReviewServerDiscovery, n as desktopOwnsHome, p as desktopUsesHome, r as headlessServerLockPath } from "./server-discovery-Bey8IqXH.js";
|
|
5
|
+
import { t as desktopApplicationInstalled } from "./review-app-launcher-CkwLclzR.js";
|
|
6
6
|
import { mkdir, open, readFile, realpath, stat } from "node:fs/promises";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { spawn } from "node:child_process";
|
|
@@ -1,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-CkvxA-6O.js";
|
|
2
2
|
export { ensureBackgroundServer, ensureServerWithoutDesktop, headlessServerOwner, stopBackgroundServer };
|
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.3.4
|
|
1
|
+
{"version":"0.3.4","commit":"f33bd6620742fe65ccc1d5fef416fbe8254dcf79","dirty":true,"builtAt":"2026-10-20T15:23:18.478Z"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as setLocalVcsCommandObserver, E as __toESM, T as __require, w as __commonJSMin } from "./src-BMPuxWv4.js";
|
|
2
2
|
import { c as jsonString, n as isJsonObject, u as parseJsonText } from "./src-X9phtB2j.js";
|
|
3
|
-
import {
|
|
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,
|
|
5
|
-
import { o as ReviewApiClient, s as ReviewApiError } from "./agent-client-
|
|
6
|
-
import { t as resolveReviewRoot } from "./runtime-
|
|
7
|
-
import { C as s3ProfileSchema, E as writeTraceConfigFile, N as devReviewHome, P as normalizeStoreOrigin, S as readTraceConfigFile, T as sameS3Profile, _ as emptyTraceConfig, c as resolveS3Setup, g as currentStore, h as TraceConfigurationError, i as isS3MockMode, n as clearTraceEnvCache, o as readTraceEnvFile, p as traceSettingsPath, w as s3Store } from "./s3-config-
|
|
3
|
+
import { _ as REVIEW_REMOTE_AGENT_IDS, p as REVIEW_CLI_INSTALL_TARGET_LABELS, v as REVIEW_REMOTE_ATTACH_BEGIN, y as REVIEW_REMOTE_ATTACH_END } from "./src-DsM3jO8G.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, b as runTraceGitHook, c as registerTraceCommands, ct as runStoreLogout, d as runTraceList$1, dt as StoreClient, f as runTracePull$1, ft as withStoreAuthorization, g as runTraceInstallMachine, gt as jsonRequestedInArgv, h as runTraceEnable, ht as humanStream, j as runTraceOnboard, k as runTraceAllow, l as resolveTraceReadStorage, lt as runStoreWhoami, m as runTraceDisable, mt as failWithJsonError, nt as traceScope, ot as readStoreAuth, p as runTraceShow, pt as emitJsonEvent, q as readTraceUserConfig, rt as DEFAULT_STORE_ORIGIN, st as runStoreLogin, tt as traceHomeDir, u as runTraceBlame, ut as StoreApiError, v as runTraceStatus, w as readLegacyCaptureSettings, x as runTraceHook, y as runTraceSync, z as selectTraceStorage } from "./review-home-paths-j2BRAaNv.js";
|
|
5
|
+
import { o as ReviewApiClient, s as ReviewApiError } from "./agent-client-BOOi7EUR.js";
|
|
6
|
+
import { t as resolveReviewRoot } from "./runtime-CKiWhGrf.js";
|
|
7
|
+
import { C as s3ProfileSchema, E as writeTraceConfigFile, N as devReviewHome, P as normalizeStoreOrigin, S as readTraceConfigFile, T as sameS3Profile, _ as emptyTraceConfig, c as resolveS3Setup, g as currentStore, h as TraceConfigurationError, i as isS3MockMode, n as clearTraceEnvCache, o as readTraceEnvFile, p as traceSettingsPath, w as s3Store } from "./s3-config-BTO12tCC.js";
|
|
8
8
|
import { t as errorMessage } from "./error-message-OtiDonty.js";
|
|
9
|
-
import { i as readReviewPackageVersion, r as readBuildInfo, t as findReviewPackageRoot } from "./package-paths-
|
|
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-
|
|
9
|
+
import { i as readReviewPackageVersion, r as readBuildInfo, t as findReviewPackageRoot } from "./package-paths-C--__jEv.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-Bey8IqXH.js";
|
|
11
|
+
import { t as ReviewTelemetry } from "./review-telemetry-BLNwYnLV.js";
|
|
12
|
+
import { t as fuzzyRank } from "./fuzzy-match-BO9bK37N.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-CprZojXd.js";
|
|
14
|
+
import { n as focusReviewDesktop, r as runReviewAppLaunch } from "./review-app-launcher-CkwLclzR.js";
|
|
15
|
+
import { t as reviewAgentCliHelp } from "./agent-cli-CThN7Q59.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";
|
|
@@ -3898,8 +3898,8 @@ function resolveTraceFile(env) {
|
|
|
3898
3898
|
}
|
|
3899
3899
|
if (traceEnabled) {
|
|
3900
3900
|
process.on("exit", flushTrace);
|
|
3901
|
-
setLocalVcsCommandObserver({ start({
|
|
3902
|
-
const handle = startSpan(commandSpanName(
|
|
3901
|
+
setLocalVcsCommandObserver({ start({ file, args, cwd }) {
|
|
3902
|
+
const handle = startSpan(commandSpanName(file, args), { detail: commandDetail(file, args, cwd) });
|
|
3903
3903
|
return ({ ok }) => ok ? handle.end() : handle.fail();
|
|
3904
3904
|
} });
|
|
3905
3905
|
}
|
|
@@ -4297,7 +4297,7 @@ async function runReviewCli(input) {
|
|
|
4297
4297
|
if (!Number.isInteger(port) || port < 0 || port > 65535) throw new ReviewCliUsageError("--port must be an integer between 0 and 65535.");
|
|
4298
4298
|
const stateDir = reviewServerStateDir(authoringEnv(options.stateDir));
|
|
4299
4299
|
if (options.detach) {
|
|
4300
|
-
const { ensureBackgroundServer } = await import("./background-server-
|
|
4300
|
+
const { ensureBackgroundServer } = await import("./background-server-DLSDogkI.js");
|
|
4301
4301
|
const { discovery, started } = await ensureBackgroundServer({
|
|
4302
4302
|
stateDir,
|
|
4303
4303
|
env,
|
|
@@ -4319,7 +4319,7 @@ async function runReviewCli(input) {
|
|
|
4319
4319
|
process.once("SIGINT", stop);
|
|
4320
4320
|
process.once("SIGTERM", stop);
|
|
4321
4321
|
process.once(DESKTOP_TAKEOVER_SIGNAL, takeover);
|
|
4322
|
-
const { HeadlessServerBusyError, runHeadlessServer } = await import("./headless-host-
|
|
4322
|
+
const { HeadlessServerBusyError, runHeadlessServer } = await import("./headless-host-CVBOQyRS.js");
|
|
4323
4323
|
try {
|
|
4324
4324
|
await runHeadlessServer({
|
|
4325
4325
|
stateDir,
|
|
@@ -4356,7 +4356,7 @@ async function runReviewCli(input) {
|
|
|
4356
4356
|
configureJsonOutput(serverCommand.command("stop").description("Stop a background server started by --detach, the CLI, or Desktop").option("--state-dir <path>", "directory selected when starting the server"), "plain").action(async (_options, command) => {
|
|
4357
4357
|
const options = command.optsWithGlobals();
|
|
4358
4358
|
const stateDir = reviewServerStateDir(authoringEnv(options.stateDir));
|
|
4359
|
-
const { headlessServerOwner, stopBackgroundServer } = await import("./background-server-
|
|
4359
|
+
const { headlessServerOwner, stopBackgroundServer } = await import("./background-server-DLSDogkI.js");
|
|
4360
4360
|
const owner = await headlessServerOwner(stateDir);
|
|
4361
4361
|
const discovery = await readReviewServerDiscovery(stateDir);
|
|
4362
4362
|
if (owner === void 0) {
|
|
@@ -4384,7 +4384,7 @@ async function runReviewCli(input) {
|
|
|
4384
4384
|
if (!existsSync(path.join(stateDir, "review-api.db"))) throw new Error(`No saved reviews in ${stateDir}, so there is no server id to reset. Check --state-dir.`);
|
|
4385
4385
|
const inUse = `A Whiteboard server is using ${stateDir}. Stop it first, then run whiteboard server reset-id again.`;
|
|
4386
4386
|
if (await desktopUsesHome(stateDir, env)) return refuse(inUse, options.json);
|
|
4387
|
-
const [{ openReviewProfile }, { withHeadlessServerLock }] = await Promise.all([import("./profile-
|
|
4387
|
+
const [{ openReviewProfile }, { withHeadlessServerLock }] = await Promise.all([import("./profile-CYPmvBoA.js"), import("./headless-host-CVBOQyRS.js")]);
|
|
4388
4388
|
const reset = await withHeadlessServerLock(await realpath(stateDir), async () => {
|
|
4389
4389
|
const local = await openReviewProfile(stateDir, { manageWorkspaces: false });
|
|
4390
4390
|
try {
|
|
@@ -4406,7 +4406,7 @@ async function runReviewCli(input) {
|
|
|
4406
4406
|
configureJsonOutput(remote.command("attach").description("Start a background server if none is healthy and report how to reach it").option("--state-dir <path>", "directory for saved reviews and server discovery").option("--groups <groups>", "comma-separated optional extension groups the Desktop has enabled, such as go").option("--replace", "stop a running server of another version that the CLI or Desktop started, and start this one"), "plain").action(async (_options, command) => {
|
|
4407
4407
|
const options = command.optsWithGlobals();
|
|
4408
4408
|
const stateDir = reviewServerStateDir(authoringEnv(options.stateDir));
|
|
4409
|
-
const { remoteAttach } = await import("./remote-attach-
|
|
4409
|
+
const { remoteAttach } = await import("./remote-attach-CEJ-kvDY.js");
|
|
4410
4410
|
let attach;
|
|
4411
4411
|
try {
|
|
4412
4412
|
attach = await remoteAttach({
|
|
@@ -4433,7 +4433,7 @@ async function runReviewCli(input) {
|
|
|
4433
4433
|
});
|
|
4434
4434
|
configureJsonOutput(remote.command("extensions").description("Language extensions for the language server on a remote").command("ensure").description("Download the curated extensions for this machine and list them for the language server").option("--groups <groups>", "comma-separated optional extension groups the Desktop has enabled, such as go"), "plain").action(async (_options, command) => {
|
|
4435
4435
|
const { json, groups } = command.optsWithGlobals();
|
|
4436
|
-
const { ensureRemoteExtensions } = await import("./remote-extensions-
|
|
4436
|
+
const { ensureRemoteExtensions } = await import("./remote-extensions-GN8Gf_qG.js");
|
|
4437
4437
|
const result = await ensureRemoteExtensions({
|
|
4438
4438
|
env,
|
|
4439
4439
|
groups: groups?.split(",").map((group) => group.trim())
|
|
@@ -4448,7 +4448,7 @@ async function runReviewCli(input) {
|
|
|
4448
4448
|
configureJsonOutput(remote.command("uninstall").description("Remove what Whiteboard Desktop installed on this host, stopping a server it started").addOption(new Option("--keep-reviews", "leave the saved reviews in place").conflicts("deleteReviews")).addOption(new Option("--delete-reviews", "also delete the saved reviews")).option("--state-dir <path>", "directory for saved reviews and server discovery"), "plain").action(async (_options, command) => {
|
|
4449
4449
|
const options = command.optsWithGlobals();
|
|
4450
4450
|
const stateDir = reviewServerStateDir(authoringEnv(options.stateDir));
|
|
4451
|
-
const { remoteUninstall } = await import("./remote-uninstall-
|
|
4451
|
+
const { remoteUninstall } = await import("./remote-uninstall-DW7Gdryh.js");
|
|
4452
4452
|
let deleteReviews = options.deleteReviews ? true : options.keepReviews ? false : void 0;
|
|
4453
4453
|
if (deleteReviews === void 0 && !options.json && input.stdin?.isTTY) {
|
|
4454
4454
|
const prompt = createInterface$1({
|
|
@@ -4522,7 +4522,7 @@ async function runReviewCli(input) {
|
|
|
4522
4522
|
const writeAppEvent = (event, options) => {
|
|
4523
4523
|
if (options.json) input.stdout.write(`${JSON.stringify(event)}\n`);
|
|
4524
4524
|
else if (event.action === "launch") input.stdout.write(event.state === "running" ? "Whiteboard Desktop is already running.\n" : options.focus ? "Whiteboard Desktop is ready.\n" : "Whiteboard Desktop is ready in the background. Pass --focus to bring it forward.\n");
|
|
4525
|
-
else input.stdout.write(`Whiteboard Desktop is showing "${
|
|
4525
|
+
else input.stdout.write(`Whiteboard Desktop is showing "${event.title}".\n`);
|
|
4526
4526
|
};
|
|
4527
4527
|
const pickReview = async (options) => {
|
|
4528
4528
|
const event = await runtime.runReviewAppPick({
|
|
@@ -4670,14 +4670,14 @@ async function runReviewCli(input) {
|
|
|
4670
4670
|
command.showHelpAfterError(false).error("Markdown review migration is no longer supported. Ask your agent to migrate your old Whiteboard reviews.");
|
|
4671
4671
|
});
|
|
4672
4672
|
configureJsonOutput(configureJsonOutput(program.command("share").description("Upload an immutable review snapshot and return its share link"), "plain").option("--review <id>", "review ID").option("--version <number>", "Saved version to share").option("--preview", "Open the share link in Whiteboard Preview by default").option("--request-id <uuid>", "Reuse this ID when retrying the same immutable upload").action(async (options) => {
|
|
4673
|
-
const { runShareCli } = await import("./cli-
|
|
4673
|
+
const { runShareCli } = await import("./cli-R4yfa5DT.js");
|
|
4674
4674
|
state.exitCode = await runShareCli({
|
|
4675
4675
|
...input,
|
|
4676
4676
|
...options,
|
|
4677
4677
|
env: authoringEnv()
|
|
4678
4678
|
});
|
|
4679
4679
|
}).command("revoke <share-id>").description("Revoke future downloads of a share"), "plain").action(async (shareId, options) => {
|
|
4680
|
-
const { runShareCli } = await import("./cli-
|
|
4680
|
+
const { runShareCli } = await import("./cli-R4yfa5DT.js");
|
|
4681
4681
|
state.exitCode = await runShareCli({
|
|
4682
4682
|
...input,
|
|
4683
4683
|
...options,
|
|
@@ -4758,7 +4758,7 @@ async function runReviewCli(input) {
|
|
|
4758
4758
|
return commands;
|
|
4759
4759
|
} });
|
|
4760
4760
|
for (const [name, description] of [["api", "Call a JSON review authoring tool on the running server"], ["mcp", "Serve the JSON review authoring tools over stdio MCP"]]) configureOutput(program.command(name).description(description).argument("[args...]", "tool name and JSON input").allowUnknownOption().allowExcessArguments().helpOption(false).passThroughOptions().addHelpText("after", `\n${reviewAgentCliHelp}`), "plain").action(async (args) => {
|
|
4761
|
-
const { runReviewAgentCli } = await import("./agent-cli-
|
|
4761
|
+
const { runReviewAgentCli } = await import("./agent-cli-C6SPSII0.js");
|
|
4762
4762
|
state.exitCode = await runReviewAgentCli({
|
|
4763
4763
|
...input,
|
|
4764
4764
|
env: authoringEnv(),
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { a as jsonNumber, c as jsonString, o as jsonObject, u as parseJsonText } from "./src-X9phtB2j.js";
|
|
3
|
-
import "./src-
|
|
3
|
+
import "./src-DsM3jO8G.js";
|
|
4
4
|
import { existsSync, readFileSync, readdirSync, realpathSync } from "node:fs";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import os from "node:os";
|
|
@@ -17,7 +17,7 @@ async function runCli(effectivePath) {
|
|
|
17
17
|
`);
|
|
18
18
|
return 1;
|
|
19
19
|
}
|
|
20
|
-
const { runReviewCli } = await import("./cli-runner-
|
|
20
|
+
const { runReviewCli } = await import("./cli-runner-Cuc9FSzu.js");
|
|
21
21
|
return runReviewCli({
|
|
22
22
|
argv,
|
|
23
23
|
cliPaths: {
|
|
@@ -45,8 +45,7 @@ async function maybeDelegateToDesktopCli(argv) {
|
|
|
45
45
|
].includes(argument) || /^--state-dir(?:=|$)/.test(argument)) || env.DEV_REVIEW_SERVER_DIR?.trim()) return null;
|
|
46
46
|
const ownPath = fileURLToPath(import.meta.url);
|
|
47
47
|
if (!/[\\/]dist[\\/]cli\.js$/.test(ownPath)) return null;
|
|
48
|
-
const
|
|
49
|
-
const devHome = env.DEV_REVIEW_HOME?.trim() ? path.resolve(env.DEV_REVIEW_HOME.trim()) : path.join(os.homedir(), channel === "preview" ? ".dev-preview" : ".dev");
|
|
48
|
+
const devHome = env.DEV_REVIEW_HOME?.trim() ? path.resolve(env.DEV_REVIEW_HOME.trim()) : path.join(os.homedir(), ".dev");
|
|
50
49
|
let cliPath;
|
|
51
50
|
let runtimePath;
|
|
52
51
|
const discoveryFile = selectedDiscoveryFile(devHome, env);
|