@dev.fast/whiteboard 0.3.1 → 0.3.2

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.
@@ -0,0 +1,2 @@
1
+ import { n as runReviewAgentCli } from "./agent-cli-DjLmorAW.js";
2
+ export { runReviewAgentCli };
@@ -2,10 +2,28 @@ import { n as isJsonObject, u as parseJsonText } from "./src-X9phtB2j.js";
2
2
  import { T as traceMachineEnabled } from "./review-home-paths-Lc02WFuX.js";
3
3
  import { a as toolResultText, i as connectReviewInstance, s as ReviewApiError } from "./agent-client-DjXQy6CL.js";
4
4
  import { M as devReviewHome } from "./s3-config-DDWWMh5x.js";
5
+ import { n as readBuildCommit } from "./package-paths-jMg6JxDP.js";
5
6
  import { b as selectReviewInstance, u as REVIEW_INSTANCE_ENV } from "./server-discovery-DVqrcIDT.js";
6
7
  import { n as reviewSessionAgent } from "./review-telemetry-ClhP_5lW.js";
7
8
  import { n as REVIEW_VIA_HEADER, t as REVIEW_AGENT_HEADER } from "./request-origin-BSwTNS8K.js";
8
9
  import { i as publicTool, n as RECOVERY, r as callPublicTool, t as toolFailure } from "./tool-failure-CVJrfi5s.js";
10
+ import { existsSync } from "node:fs";
11
+ import path from "node:path";
12
+ //#region src/review-api/install-update.ts
13
+ /** Exits once an update replaces this install, or the Windows updater marks it. */
14
+ function exitOnInstallUpdate(stderr) {
15
+ const commit = readBuildCommit(import.meta.url);
16
+ if (!commit) return;
17
+ const marker = path.join(path.dirname(process.execPath), "applying_update");
18
+ const staleMarker = existsSync(marker);
19
+ const timer = setInterval(() => {
20
+ if (!staleMarker && existsSync(marker) || readBuildCommit(import.meta.url) !== commit) {
21
+ clearInterval(timer);
22
+ stderr.write("Whiteboard was updated. Restart its MCP server.\n", () => process.exit(75));
23
+ }
24
+ }, 1e3).unref();
25
+ }
26
+ //#endregion
9
27
  //#region src/review-api/agent-cli.ts
10
28
  const reviewAgentCliHelp = "whiteboard api tools (one line per tool)\nwhiteboard api tools <tool-name> (its description and input schema)\nwhiteboard api <tool-name> '<json>'\nwhiteboard api <tool-name> - (read JSON from stdin)\nwhiteboard mcp (stdio MCP adapter; Whiteboard Desktop or whiteboard server start must be running)\nSelect headless state with DEV_REVIEW_SERVER_DIR or whiteboard --state-dir <path> api/mcp.\n";
11
29
  async function runReviewAgentCli(input) {
@@ -21,6 +39,7 @@ async function runReviewAgentCli(input) {
21
39
  const headers = Object.fromEntries([[REVIEW_VIA_HEADER, mode === "mcp" ? "mcp" : "api"], [REVIEW_AGENT_HEADER, reviewSessionAgent(env)]]);
22
40
  if (mode === "mcp") {
23
41
  const { serveReviewMcp } = await import("./mcp-D-7jkRTU.js");
42
+ exitOnInstallUpdate(input.stderr);
24
43
  await serveReviewMcp(async (key, agentKind) => {
25
44
  const connected = await connectReviewInstance(key ? {
26
45
  ...env,
@@ -1 +1 @@
1
- {"version":"0.3.1","commit":"674dfbb9b0de56eb16c9ac015f2f0b2b3fa01980","dirty":true,"builtAt":"2026-10-16T20:29:45.789Z"}
1
+ {"version":"0.3.2","commit":"38a6dad3049993f987d9b82ca3c5fee424b28f6b","dirty":true,"builtAt":"2026-10-16T21:59:03.536Z"}
@@ -12,7 +12,7 @@ import { t as ReviewTelemetry } from "./review-telemetry-ClhP_5lW.js";
12
12
  import { t as fuzzyRank } from "./fuzzy-match-C9olHRCK.js";
13
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-D_mqo_Jk.js";
14
14
  import { n as focusReviewDesktop, r as runReviewAppLaunch } from "./review-app-launcher-i1hmxOZA.js";
15
- import { t as reviewAgentCliHelp } from "./agent-cli-Cp7ufSvb.js";
15
+ import { t as reviewAgentCliHelp } from "./agent-cli-DjLmorAW.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";
@@ -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-2D4icmBR.js");
4761
+ const { runReviewAgentCli } = await import("./agent-cli-CoHvydp7.js");
4762
4762
  state.exitCode = await runReviewAgentCli({
4763
4763
  ...input,
4764
4764
  env: authoringEnv(),
package/dist/cli.js CHANGED
@@ -17,7 +17,7 @@ async function runCli(effectivePath) {
17
17
  `);
18
18
  return 1;
19
19
  }
20
- const { runReviewCli } = await import("./cli-runner-2sJKjaRX.js");
20
+ const { runReviewCli } = await import("./cli-runner-DEKbykD8.js");
21
21
  return runReviewCli({
22
22
  argv,
23
23
  cliPaths: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev.fast/whiteboard",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -74,11 +74,11 @@
74
74
  "tsx": "4.21.0",
75
75
  "typescript": "6.0.3",
76
76
  "vitest": "4.1.11",
77
+ "@dev.fast/json": "0.0.0",
78
+ "@dev.fast/review-protocol": "0.0.0",
77
79
  "@dev.fast/trace-core": "0.0.0",
78
80
  "@dev.fast/review-share-protocol": "0.1.2",
79
- "@dev.fast/review-protocol": "0.0.0",
80
- "@dev.fast/trace-protocol": "0.5.0",
81
- "@dev.fast/json": "0.0.0"
81
+ "@dev.fast/trace-protocol": "0.5.0"
82
82
  },
83
83
  "engines": {
84
84
  "node": ">=24 <25"
@@ -88,7 +88,7 @@
88
88
  "repo": "devdotfast/review",
89
89
  "docs": "packages/review/instructions/authoring.md"
90
90
  },
91
- "gitHead": "674dfbb9b0de56eb16c9ac015f2f0b2b3fa01980",
91
+ "gitHead": "38a6dad3049993f987d9b82ca3c5fee424b28f6b",
92
92
  "scripts": {
93
93
  "prebuild": "pnpm run build:workspace-deps",
94
94
  "build": "node --max-old-space-size=8192 node_modules/tsdown/dist/run.mjs",
@@ -17,6 +17,7 @@ import {
17
17
  toolResultText,
18
18
  } from "./agent-client.js";
19
19
  import { type ReviewApiClient, ReviewApiError } from "./client.js";
20
+ import { exitOnInstallUpdate } from "./install-update.js";
20
21
  import { callPublicTool, publicTool } from "./public-tools.js";
21
22
  import { RECOVERY } from "./recovery.js";
22
23
  import { REVIEW_AGENT_HEADER, REVIEW_VIA_HEADER } from "./request-origin.js";
@@ -70,6 +71,7 @@ export async function runReviewAgentCli(input: AgentCliInput): Promise<number> {
70
71
 
71
72
  if (mode === "mcp") {
72
73
  const { serveReviewMcp } = await import("./mcp.js");
74
+ exitOnInstallUpdate(input.stderr);
73
75
  await serveReviewMcp(
74
76
  async (key, agentKind) => {
75
77
  const connected = await connectReviewInstance(
@@ -0,0 +1,27 @@
1
+ import { existsSync } from "node:fs";
2
+ import path from "node:path";
3
+ import type { Writable } from "node:stream";
4
+
5
+ import { readBuildCommit } from "@review/package-paths.js";
6
+
7
+ /** Exits once an update replaces this install, or the Windows updater marks it. */
8
+ export function exitOnInstallUpdate(stderr: Writable): void {
9
+ const commit = readBuildCommit(import.meta.url);
10
+
11
+ if (!commit) return;
12
+
13
+ const marker = path.join(path.dirname(process.execPath), "applying_update");
14
+ const staleMarker = existsSync(marker);
15
+
16
+ const timer = setInterval(() => {
17
+ if (
18
+ (!staleMarker && existsSync(marker)) ||
19
+ readBuildCommit(import.meta.url) !== commit
20
+ ) {
21
+ clearInterval(timer);
22
+ stderr.write("Whiteboard was updated. Restart its MCP server.\n", () =>
23
+ process.exit(75),
24
+ );
25
+ }
26
+ }, 1000).unref();
27
+ }
@@ -1,2 +0,0 @@
1
- import { n as runReviewAgentCli } from "./agent-cli-Cp7ufSvb.js";
2
- export { runReviewAgentCli };