@dev.fast/whiteboard 0.3.3 → 0.3.4-preview.20261019.126
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-xOdmMnDH.js → account-alias-B5-HYi1D.js} +16 -9
- package/dist/{agent-cli-DT7MdaqL.js → agent-cli-CohHf6Ua.js} +15 -10
- package/dist/agent-cli-_YyMIMRY.js +2 -0
- package/dist/{agent-client-BRBzv3AV.js → agent-client-Dtc-Kn_w.js} +13 -3
- package/dist/{authoring-tools-DGSEag8y.js → authoring-tools-B7KU04f7.js} +34 -27
- package/dist/{background-server-WKzI_a98.js → background-server-C03RKxKS.js} +5 -5
- package/dist/{background-server-C_REWFkG.js → background-server-CB9C4uoc.js} +1 -1
- package/dist/build-info.json +1 -1
- package/dist/{cli-BBSDi_dX.js → cli-CJaEb7zC.js} +1 -1
- package/dist/{cli-runner-DshTBske.js → cli-runner-DGDIqh3V.js} +26 -26
- package/dist/cli.js +4 -3
- package/dist/{client-BN_FDxFr.js → client-lKVF_Elo.js} +253 -47
- package/dist/{fuzzy-match-bFX6wm8j.js → fuzzy-match-BmVJJm9I.js} +42 -14
- package/dist/{headless-host-CzvYpKOX.js → headless-host-DRtjf9WA.js} +1 -1
- package/dist/{headless-host-CS4Gv0c5.js → headless-host-XhL1X4vX.js} +523 -146
- package/dist/lens-selection-CyJapcsl.js +214 -0
- package/dist/{local-data-DtQTIzHX.js → local-data-Cpl4ENbJ.js} +2434 -328
- package/dist/{mcp-DpKnnmHH.js → mcp-ovmiUE_x.js} +5 -9
- package/dist/{package-paths-jMg6JxDP.js → package-paths-BWxO-UEL.js} +1 -1
- package/dist/{profile-DaqmODhc.js → profile-BadSkCkI.js} +20 -8
- package/dist/profile-DJvkBJNQ.js +2 -0
- package/dist/{remote-attach-DCngg8cl.js → remote-attach-Dd-YobM6.js} +4 -4
- package/dist/{remote-extensions-BCAbQZTv.js → remote-extensions-CNXwqK0D.js} +3 -3
- package/dist/{remote-extensions-Cf3L-ZGG.js → remote-extensions-VP-kfq0C.js} +1 -1
- package/dist/{remote-language-server-UWQgpoh-.js → remote-language-server-BXk87KCr.js} +5 -5
- package/dist/{remote-uninstall-CcDOcGyi.js → remote-uninstall-DuOzsvaD.js} +6 -6
- package/dist/{request-origin-Zcn_CjX4.js → request-origin-B9qCPiVB.js} +45 -12
- package/dist/{review-app-launcher-tqSQPlbu.js → review-app-launcher-C7el2Uoy.js} +2 -2
- package/dist/{review-home-paths-Lc02WFuX.js → review-home-paths-D8AoCdd2.js} +19 -17
- package/dist/{review-telemetry-BHWJsnoD.js → review-telemetry-BsoRMC2w.js} +5 -5
- package/dist/runtime-Bj2tD33R.js +27 -0
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +1 -1
- package/dist/{s3-77-qkEhs.js → s3-CsG2EWED.js} +1 -1
- package/dist/{s3-config-DDWWMh5x.js → s3-config-CjcLyFV5.js} +5 -3
- package/dist/{s3-config-0xuCh-F_.js → s3-config-zz4GWh2T.js} +1 -1
- package/dist/server/desktop-host.js +29 -76
- package/dist/{server-discovery-BVqrE1_-.js → server-discovery-CKjw3-6h.js} +6 -5
- package/dist/sharing/index.d.ts +486 -70
- package/dist/sharing/index.js +1 -1
- package/dist/{src-DsM3jO8G.js → src-BiWNbcF_.js} +89 -12
- package/dist/{src-BMPuxWv4.js → src-WPaQn75m.js} +208 -73
- package/dist/{stored-document-migration-CChxtFAy.js → stored-document-migration-dFbewRTG.js} +270 -269
- package/dist/{thread-state-5pYr6_zM.js → thread-state-Do5LX10I.js} +7 -2
- package/dist/{tool-failure-BFt2xj9i.js → tool-failure-DvI-gys2.js} +10 -3
- package/instructions/authoring.md +3 -2
- package/package.json +4 -4
- package/src/agent-connect.ts +8 -2
- package/src/ask/agents.ts +51 -9
- package/src/ask/checkout-files.ts +2 -5
- package/src/ask/thread-state.ts +4 -0
- package/src/ask/thread.ts +16 -0
- 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/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 +137 -51
- package/src/review-api/authoring-tools.ts +45 -30
- 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 +560 -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 +281 -34
- package/src/review-api/foreign-references.ts +328 -0
- package/src/review-api/github-provider.ts +51 -13
- package/src/review-api/http.ts +702 -123
- 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 +3 -11
- 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 +357 -0
- package/src/review-api/store-schema.ts +38 -29
- package/src/review-api/store.ts +2144 -480
- package/src/review-api/workspaces.ts +52 -13
- 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 -31
- package/src/server/headless-host.ts +21 -14
- package/src/server/hono-http.ts +2 -1
- package/src/server/legacy-tutorial-cleanup.ts +2 -3
- 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/server-discovery.ts +4 -2
- 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 +128 -20
- package/src/startup-trace.ts +3 -3
- package/src/stored-document-migration.ts +110 -19
- package/src/ui-telemetry-events.ts +33 -11
- package/dist/agent-cli-DeCrUC2s.js +0 -2
- package/dist/profile-Cz7L781D.js +0 -2
- package/dist/runtime-CKiWhGrf.js +0 -52
- package/instructions/scratchpad.md +0 -23
- package/src/review-preferences.ts +0 -88
|
@@ -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 {
|
|
5
|
-
import { i as readReviewPackageVersion } from "./package-paths-
|
|
2
|
+
import { E as ReviewCliInstallStampSchema } from "./src-BiWNbcF_.js";
|
|
3
|
+
import { C as disableTraceMachine, E as traceMachineStatus, G as listTraceRepositoryRoots, K as traceRepositoryStatus, Q as removeAgentTraceHook, S as configureTraceMachine, T as traceMachineEnabled, U as disableAllTraceRepositories, W as enableTraceRepository, X as describeTraceHookOwners, Y as AGENT_TRACE_HOOK_AGENTS, Z as installHarnessHooks, at as readStoreAuth, n as reviewDesktopStateDir, nt as traceScope, ut as StoreClient } from "./review-home-paths-D8AoCdd2.js";
|
|
4
|
+
import { I as writeFileAtomicAsync, L as writePrivateJsonAtomic, N as devReviewHome, j as withFileLock } from "./s3-config-CjcLyFV5.js";
|
|
5
|
+
import { i as readReviewPackageVersion } from "./package-paths-BWxO-UEL.js";
|
|
6
6
|
import { n as isFile, t as isDirectory } from "./fs-utils-BMPLt0cr.js";
|
|
7
|
-
import {
|
|
7
|
+
import { c as findExecutable, s as executableCommand } from "./fuzzy-match-BmVJJm9I.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";
|
|
@@ -296,8 +296,10 @@ const HARNESSES = {
|
|
|
296
296
|
commands: ["copilot"]
|
|
297
297
|
}
|
|
298
298
|
};
|
|
299
|
-
const runProcess = (
|
|
299
|
+
const runProcess = (executable, executableArgs) => new Promise((resolve) => {
|
|
300
|
+
const { file, args, windowsVerbatimArguments } = executableCommand(executable, executableArgs);
|
|
300
301
|
execFile(file, args, {
|
|
302
|
+
windowsVerbatimArguments,
|
|
301
303
|
timeout: STEP_TIMEOUT_MS,
|
|
302
304
|
maxBuffer: 4194304,
|
|
303
305
|
env: {
|
|
@@ -1091,9 +1093,9 @@ async function isOwnedShim(shimPath) {
|
|
|
1091
1093
|
* (ELECTRON_RUN_AS_NODE) — the exact runtime the server uses. System Node is
|
|
1092
1094
|
* the last resort and gets a clear version check instead of a cryptic crash.
|
|
1093
1095
|
*/
|
|
1094
|
-
async function writePathShim(shimPath, cliPath, runtimePath, devHome) {
|
|
1096
|
+
async function writePathShim(shimPath, cliPath, runtimePath, devHome, previewHome = devHome) {
|
|
1095
1097
|
if (process.platform === "win32") {
|
|
1096
|
-
await writeFileAtomicAsync(shimPath, windowsCliShim(cliPath, runtimePath ?? process.execPath, devHome), { replaceSymlink: true });
|
|
1098
|
+
await writeFileAtomicAsync(shimPath, windowsCliShim(cliPath, runtimePath ?? process.execPath, devHome === previewHome ? devHome : void 0), { replaceSymlink: true });
|
|
1097
1099
|
shimPath = shimPath.replace(/\.cmd$/i, "");
|
|
1098
1100
|
}
|
|
1099
1101
|
const source = `#!/bin/sh
|
|
@@ -1101,6 +1103,8 @@ async function writePathShim(shimPath, cliPath, runtimePath, devHome) {
|
|
|
1101
1103
|
FALLBACK_CLI=${shSingleQuote(cliPath)}
|
|
1102
1104
|
FALLBACK_RUNTIME=${shSingleQuote(runtimePath ?? "")}
|
|
1103
1105
|
DEFAULT_HOME=${shSingleQuote(devHome)}
|
|
1106
|
+
channel="\${DEV_FAST_REVIEW_CHANNEL:-\${DEV_REVIEW_INSTANCE:-}}"
|
|
1107
|
+
[ "$channel" = preview ] && DEFAULT_HOME=${shSingleQuote(previewHome)}
|
|
1104
1108
|
export DEV_REVIEW_HOME="\${DEV_REVIEW_HOME:-$DEFAULT_HOME}"
|
|
1105
1109
|
DESKTOP="$DEV_REVIEW_HOME/review-desktop"
|
|
1106
1110
|
|
|
@@ -1201,7 +1205,10 @@ async function installReviewCommand(input) {
|
|
|
1201
1205
|
output: `[skip] kept the existing whiteboard command at ${shimPath}\n`
|
|
1202
1206
|
};
|
|
1203
1207
|
const shadowingCommand = await resolvePathCommand("whiteboard", shimPath, env);
|
|
1204
|
-
await writePathShim(shimPath, input.cliPath, input.cliRuntimePath, devReviewHome(env, homeDir)
|
|
1208
|
+
await writePathShim(shimPath, input.cliPath, input.cliRuntimePath, devReviewHome({ DEV_REVIEW_HOME: env.DEV_REVIEW_HOME }, homeDir), devReviewHome({
|
|
1209
|
+
DEV_REVIEW_HOME: env.DEV_REVIEW_HOME,
|
|
1210
|
+
DEV_REVIEW_INSTANCE: "preview"
|
|
1211
|
+
}, homeDir));
|
|
1205
1212
|
if (await traceMachineEnabled({
|
|
1206
1213
|
homeDir,
|
|
1207
1214
|
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 {
|
|
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-D8AoCdd2.js";
|
|
3
|
+
import { a as toolResultText, i as connectReviewInstance, s as ReviewApiError } from "./agent-client-Dtc-Kn_w.js";
|
|
4
|
+
import { N as devReviewHome } from "./s3-config-CjcLyFV5.js";
|
|
5
|
+
import { n as readBuildCommit } from "./package-paths-BWxO-UEL.js";
|
|
6
|
+
import { b as selectReviewInstance, u as REVIEW_INSTANCE_ENV } from "./server-discovery-CKjw3-6h.js";
|
|
7
|
+
import { n as reviewSessionAgent } from "./review-telemetry-BsoRMC2w.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-B9qCPiVB.js";
|
|
9
|
+
import { i as publicTool, n as RECOVERY, r as callPublicTool, t as toolFailure } from "./tool-failure-DvI-gys2.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,9 +36,14 @@ 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
|
|
39
|
+
const thread = env[ASK_THREAD_ENV]?.trim();
|
|
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
|
+
]);
|
|
40
45
|
if (mode === "mcp") {
|
|
41
|
-
const { serveReviewMcp } = await import("./mcp-
|
|
46
|
+
const { serveReviewMcp } = await import("./mcp-ovmiUE_x.js");
|
|
42
47
|
exitOnInstallUpdate(input.stderr);
|
|
43
48
|
await serveReviewMcp(async (key, agentKind) => {
|
|
44
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 "./src-
|
|
2
|
+
import "./src-BiWNbcF_.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-CKjw3-6h.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,6 +43,16 @@ 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
|
+
}
|
|
46
56
|
async *watch(subscriptions, signal) {
|
|
47
57
|
const reader = (await this.response(`/watch?subscriptions=${encodeURIComponent(JSON.stringify(subscriptions))}`, { signal })).body.pipeThrough(new TextDecoderStream()).getReader();
|
|
48
58
|
const cancel = () => {
|
|
@@ -249,7 +259,7 @@ async function connectReviewInstance(env = process.env, headers = {}, options =
|
|
|
249
259
|
const selection = await selectReviewInstance({ env });
|
|
250
260
|
const discovery = healthyReviewInstance(selection);
|
|
251
261
|
if (!discovery) {
|
|
252
|
-
const { ensureServerWithoutDesktop } = await import("./background-server-
|
|
262
|
+
const { ensureServerWithoutDesktop } = await import("./background-server-CB9C4uoc.js");
|
|
253
263
|
const server = await ensureServerWithoutDesktop({
|
|
254
264
|
selection,
|
|
255
265
|
env,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { n as isJsonObject } from "./src-X9phtB2j.js";
|
|
2
|
+
import { c as activityBeginSchema, l as activityEndSchema, n as uploadSchema, r as commandSchema, u as activityUpdateSchema } from "./local-data-Cpl4ENbJ.js";
|
|
3
|
+
import { C as pathTargetSchema, D as publishedEditSchema } from "./stored-document-migration-dFbewRTG.js";
|
|
3
4
|
import { t as ReviewInputError } from "./input-error-OLgB_h31.js";
|
|
4
|
-
import { t as findReviewPackageRoot } from "./package-paths-
|
|
5
|
+
import { t as findReviewPackageRoot } from "./package-paths-BWxO-UEL.js";
|
|
5
6
|
import { z } from "zod";
|
|
6
7
|
import { readFile } from "node:fs/promises";
|
|
7
8
|
import path from "node:path";
|
|
@@ -102,12 +103,8 @@ const COMPONENT_REFERENCE = [
|
|
|
102
103
|
const instructionsQuerySchema = z.strictObject({ topic: z.enum([
|
|
103
104
|
"authoring",
|
|
104
105
|
"file-lenses",
|
|
105
|
-
"scratchpad",
|
|
106
106
|
"trace-archaeology"
|
|
107
107
|
]).default("authoring") });
|
|
108
|
-
function scratchpadAvailable(context) {
|
|
109
|
-
return context.desktopAvailable && context.scratchpadEnabled;
|
|
110
|
-
}
|
|
111
108
|
const cache = /* @__PURE__ */ new Map();
|
|
112
109
|
function read(root, name) {
|
|
113
110
|
const file = path.join(root, "instructions", `${name}.md`);
|
|
@@ -122,11 +119,9 @@ function read(root, name) {
|
|
|
122
119
|
return content;
|
|
123
120
|
}
|
|
124
121
|
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.";
|
|
126
122
|
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}`;
|
|
128
123
|
if (topic !== "authoring") return read(root, topic);
|
|
129
|
-
const more = [...
|
|
124
|
+
const more = [...context.traceEnabled ? ["- Why code exists / past agent sessions: `session_get_instructions({topic:\"trace-archaeology\"})`"] : []];
|
|
130
125
|
return [
|
|
131
126
|
await read(root, "authoring"),
|
|
132
127
|
COMPONENT_REFERENCE,
|
|
@@ -153,7 +148,7 @@ const REVIEW_STATUS_TOOL = {
|
|
|
153
148
|
/** The host publishes its input schemas, except where agents write less than
|
|
154
149
|
* the host accepts (publishedEditSchema, publishedLensEditSchema) or name a
|
|
155
150
|
* checkout by path (pathTargetSchema); adapters validate nothing. */
|
|
156
|
-
function authoringTools(
|
|
151
|
+
function authoringTools(traceEnabled = false) {
|
|
157
152
|
const id = z.string().min(1);
|
|
158
153
|
const review = { reviewId: id };
|
|
159
154
|
const [image, trace] = uploadSchema.options;
|
|
@@ -161,19 +156,19 @@ function authoringTools(scratchpadAvailable = false, traceEnabled = false) {
|
|
|
161
156
|
...image.shape,
|
|
162
157
|
...trace.shape,
|
|
163
158
|
kind: z.enum(["image", "trace"])
|
|
164
|
-
}).partial().required({
|
|
159
|
+
}).omit({ repositoryId: true }).extend({ repositoryPath: id }).partial().required({
|
|
165
160
|
id: true,
|
|
166
|
-
|
|
161
|
+
repositoryPath: true,
|
|
167
162
|
kind: true
|
|
168
163
|
});
|
|
169
164
|
const descriptions = {
|
|
170
|
-
create: "Create a
|
|
171
|
-
set_target: "Move the review to a new target, such as the commits after a rebase or amend,
|
|
165
|
+
create: "Create a whiteboard. target names its repository by the checkout's path, and what it shows: {kind:\"project\"} for a plan in that repository's project with no change; {kind:\"worktree\", base?} for the saved files in the checkout, uncommitted ones included and untracked ones left out (git add -N a new file to include it), against base, by default the repository's default branch, from the merge base of base and HEAD, which follows rebases; {kind:\"commits\", head, base?} for immutable commits (omitted base means source at head with no diff; supply the parent to review introduced changes); {kind:\"pullRequest\", pullRequest} for a GitHub PR by URL or number, fetched into that checkout and pinned at the PR head and GitHub diff base. For a branch stacked on another, pass the branch below it as base; Desktop links whiteboards into a stack through their bases. Revisions are resolved on acceptance. With a PR and no title the PR's title is used. When the existing review for that PR is in Trash, creation reports its ID; restore it with review_lifecycle state:\"active\" before continuing. When an active review for that PR exists, it is returned instead, reporting whether its head moved and whether an agent is working on it; update it in place, move its target with review_set_target, or create a separate review with reuseExisting:false. The result carries review, as review_list shows it, with its target and repositoryPath, so no follow-up read is needed before diffing. When Desktop is available the review opens there and the result reports opened, softwareMapEnabled and environmentIssues, as review_open does; set open:false to author in the background without taking over Desktop. parentId and dependsOn set its place among the project's reviews, as review_set_parent and review_set_dependencies do.",
|
|
166
|
+
set_target: "Move the review to a new target (the same targets review_create takes), such as the commits after a rebase or amend, or commits or a PR for a board that had none. The document and component IDs are kept. Revisions are resolved on acceptance. Returns warnings for retained source ranges in files the new commits changed, to verify, and resources that no longer match; fix them with review_edit. Earlier versions keep their source. A PR target names the PR; other targets keep it within the same repository and clear it across repositories.",
|
|
172
167
|
edit: [
|
|
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
|
|
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 {
|
|
175
|
-
"insert adds content: parentId nests it, afterId places it, and omitted placement appends
|
|
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.",
|
|
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 of the whiteboard's repository anchors quote: a step, frame, attachment or operation without pins uses its block's, and a block without them the review's.",
|
|
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. An edit to a block the user is editing is refused with an error: edit another block, or retry later.",
|
|
177
172
|
"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."
|
|
178
173
|
].join("\n"),
|
|
179
174
|
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.",
|
|
@@ -181,13 +176,15 @@ function authoringTools(scratchpadAvailable = false, traceEnabled = false) {
|
|
|
181
176
|
restore: "Restore title, source pins, PR identity and content from a saved version.",
|
|
182
177
|
attention: "Mark an active review viewed without changing its content or lifecycle. Restore a review from Trash before marking it viewed.",
|
|
183
178
|
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.",
|
|
184
|
-
delete: "Permanently delete a review and its history. The review must be in Trash. This cannot be undone."
|
|
179
|
+
delete: "Permanently delete a review and its history. The review must be in Trash. This cannot be undone. Its children move up to top level, and dependencies on it are dropped.",
|
|
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."
|
|
185
182
|
};
|
|
186
183
|
const tool = (name, description, schema, method, path, commandType) => ({
|
|
187
184
|
name: `review_${name === "restore" ? "restore_version" : name}`,
|
|
188
185
|
description,
|
|
189
186
|
inputSchema: {
|
|
190
|
-
...z.toJSONSchema(schema, { io: "input" }),
|
|
187
|
+
...withoutRepositoryIds(z.toJSONSchema(schema, { io: "input" })),
|
|
191
188
|
type: "object"
|
|
192
189
|
},
|
|
193
190
|
method,
|
|
@@ -197,18 +194,17 @@ function authoringTools(scratchpadAvailable = false, traceEnabled = false) {
|
|
|
197
194
|
return [
|
|
198
195
|
REVIEW_STATUS_TOOL,
|
|
199
196
|
tool("capabilities", "Discover whether Desktop is available and optional software-map generation is enabled. Read before authoring.", z.strictObject({}), "GET", "/capabilities"),
|
|
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." : "")
|
|
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"),
|
|
201
198
|
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"),
|
|
202
199
|
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"),
|
|
203
200
|
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"),
|
|
204
201
|
...commandSchema.shape.operation.options.map((operation) => {
|
|
205
202
|
const type = operation.shape.type.value;
|
|
206
|
-
const { type: _type, repositoryId: _repositoryId, ...fields } = operation.shape;
|
|
203
|
+
const { type: _type, repositoryId: _repositoryId, pullRequestUrl: _pullRequestUrl, ...fields } = operation.shape;
|
|
207
204
|
return tool(type, descriptions[type], z.strictObject({
|
|
208
205
|
...fields,
|
|
209
206
|
...type === "create" && {
|
|
210
|
-
target: pathTargetSchema
|
|
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."),
|
|
207
|
+
target: pathTargetSchema,
|
|
212
208
|
open: z.boolean().optional()
|
|
213
209
|
},
|
|
214
210
|
...type === "set_target" && { target: pathTargetSchema },
|
|
@@ -228,9 +224,20 @@ function authoringTools(scratchpadAvailable = false, traceEnabled = false) {
|
|
|
228
224
|
retry: z.boolean().optional()
|
|
229
225
|
}), "POST", "/:reviewId/environment"),
|
|
230
226
|
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"),
|
|
232
227
|
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")
|
|
233
228
|
];
|
|
234
229
|
}
|
|
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
|
+
}
|
|
235
242
|
//#endregion
|
|
236
|
-
export {
|
|
243
|
+
export { inspectQuerySchema as a, renderInstructions as i, REVIEW_STATUS_TOOL as n, queryAnchor as o, instructionsQuerySchema as r, readQuerySchemas as s, authoringTools as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./review-home-paths-
|
|
2
|
-
import { D as liveLockOwner,
|
|
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-D8AoCdd2.js";
|
|
2
|
+
import { D as liveLockOwner, k as processIsAlive } from "./s3-config-CjcLyFV5.js";
|
|
3
|
+
import { t as findReviewPackageRoot } from "./package-paths-BWxO-UEL.js";
|
|
4
|
+
import { a as readReviewServerHealth, c as reviewServerStateDir, i as readReviewServerDiscovery, n as desktopOwnsHome, p as desktopUsesHome, r as headlessServerLockPath } from "./server-discovery-CKjw3-6h.js";
|
|
5
|
+
import { t as desktopApplicationInstalled } from "./review-app-launcher-C7el2Uoy.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-C03RKxKS.js";
|
|
2
2
|
export { ensureBackgroundServer, ensureServerWithoutDesktop, headlessServerOwner, stopBackgroundServer };
|
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"0.3.
|
|
1
|
+
{"version":"0.3.4-preview.20261019.126","commit":"dfbb058ea293f9629d5380bcfc27af97484a52f7","dirty":true,"builtAt":"2026-10-19T18:51:08.463Z"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as __require, O as setLocalVcsCommandObserver, j as __toESM, k as __commonJSMin } from "./src-WPaQn75m.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, b as runTraceGitHook, c as registerTraceCommands, ct as
|
|
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,
|
|
3
|
+
import { b as REVIEW_REMOTE_ATTACH_BEGIN, h as REVIEW_CLI_INSTALL_TARGET_LABELS, l as boardTitle, x as REVIEW_REMOTE_ATTACH_END, y as REVIEW_REMOTE_AGENT_IDS } from "./src-BiWNbcF_.js";
|
|
4
|
+
import { $ as resolveTraceCommand, A as runTraceDeny, E as traceMachineStatus, F as describeSelection, H as resolveTraceRepositoryTarget, J as HOSTED_CAPTURE_SCOPE_DESCRIPTION, K as traceRepositoryStatus, L as loadS3TraceStorage, M as runTraceSessions, N as runTraceStoreDelete, P as runTraceStoreInfo, T as traceMachineEnabled, V as requireTraceConsent, _ as runTraceRepair, at as readStoreAuth, b as runTraceGitHook, c as registerTraceCommands, ct as runStoreWhoami, d as runTraceList$1, dt as withStoreAuthorization, f as runTracePull$1, ft as emitJsonEvent, g as runTraceInstallMachine, h as runTraceEnable, ht as jsonRequestedInArgv, j as runTraceOnboard, k as runTraceAllow, l as resolveTraceReadStorage, lt as StoreApiError, m as runTraceDisable, mt as humanStream, nt as traceScope, ot as runStoreLogin, p as runTraceShow, pt as failWithJsonError, q as readTraceUserConfig, rt as DEFAULT_STORE_ORIGIN, st as runStoreLogout, tt as traceHomeDir, u as runTraceBlame, ut as StoreClient, v as runTraceStatus, w as readLegacyCaptureSettings, x as runTraceHook, y as runTraceSync, z as selectTraceStorage } from "./review-home-paths-D8AoCdd2.js";
|
|
5
|
+
import { o as ReviewApiClient, s as ReviewApiError } from "./agent-client-Dtc-Kn_w.js";
|
|
6
|
+
import { t as resolveReviewRoot } from "./runtime-Bj2tD33R.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-CjcLyFV5.js";
|
|
8
8
|
import { t as errorMessage } from "./error-message-OtiDonty.js";
|
|
9
|
-
import { i as readReviewPackageVersion, r as readBuildInfo, t as findReviewPackageRoot } from "./package-paths-
|
|
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-BWxO-UEL.js";
|
|
10
|
+
import { a as readReviewServerHealth, b as selectReviewInstance, c as reviewServerStateDir, d as ReviewInstanceUnavailableError, f as clearDefaultReviewInstance, g as requireHealthyReviewDesktop, h as readDefaultReviewInstance, i as readReviewServerDiscovery, l as serverNotReady, m as healthyReviewInstance, p as desktopUsesHome, t as DESKTOP_TAKEOVER_SIGNAL, u as REVIEW_INSTANCE_ENV, x as writeDefaultReviewInstance, y as reviewInstanceUnavailable } from "./server-discovery-CKjw3-6h.js";
|
|
11
|
+
import { t as ReviewTelemetry } from "./review-telemetry-BsoRMC2w.js";
|
|
12
|
+
import { t as fuzzyRank } from "./fuzzy-match-BmVJJm9I.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-B5-HYi1D.js";
|
|
14
|
+
import { n as focusReviewDesktop, r as runReviewAppLaunch } from "./review-app-launcher-C7el2Uoy.js";
|
|
15
|
+
import { t as reviewAgentCliHelp } from "./agent-cli-CohHf6Ua.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({ tool, args, cwd }) {
|
|
3902
|
+
const handle = startSpan(commandSpanName(tool, args), { detail: commandDetail(tool, 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-CB9C4uoc.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-DRtjf9WA.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-CB9C4uoc.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-DJvkBJNQ.js"), import("./headless-host-DRtjf9WA.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-Dd-YobM6.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-VP-kfq0C.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-DuOzsvaD.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 "${event.title}".\n`);
|
|
4525
|
+
else input.stdout.write(`Whiteboard Desktop is showing "${boardTitle(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-CJaEb7zC.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-CJaEb7zC.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-_YyMIMRY.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-BiWNbcF_.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-DGDIqh3V.js");
|
|
21
21
|
return runReviewCli({
|
|
22
22
|
argv,
|
|
23
23
|
cliPaths: {
|
|
@@ -45,7 +45,8 @@ 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
|
|
48
|
+
const channel = env.DEV_FAST_REVIEW_CHANNEL?.trim() || env.DEV_REVIEW_INSTANCE?.trim();
|
|
49
|
+
const devHome = env.DEV_REVIEW_HOME?.trim() ? path.resolve(env.DEV_REVIEW_HOME.trim()) : path.join(os.homedir(), channel === "preview" ? ".dev-preview" : ".dev");
|
|
49
50
|
let cliPath;
|
|
50
51
|
let runtimePath;
|
|
51
52
|
const discoveryFile = selectedDiscoveryFile(devHome, env);
|