fix(gateway): respect missing runtime outputs in watch

This commit is contained in:
Ruben Cuevas
2026-05-05 10:21:21 -04:00
committed by Peter Steinberger
parent 8a9f142942
commit 31f74259cb
2 changed files with 101 additions and 6 deletions
+7 -5
View File
@@ -32,10 +32,7 @@ import {
runNodeSourceRoots,
runNodeWatchedPaths,
} from "./run-node-watch-paths.mjs";
import {
listCoreRuntimePostBuildOutputs,
runRuntimePostBuild,
} from "./runtime-postbuild.mjs";
import { listCoreRuntimePostBuildOutputs, runRuntimePostBuild } from "./runtime-postbuild.mjs";
export { isBuildRelevantRunNodePath, isRestartRelevantRunNodePath, runNodeWatchedPaths };
@@ -405,6 +402,10 @@ const listRequiredBundledPluginRuntimeOverlayOutputs = (pluginEntries, deps) =>
const listRequiredOpenClawExtensionAliasOutputs = (deps) => {
const distRoot = resolveRuntimePostBuildDistRoot(deps);
const distExtensionsRoot = path.join(distRoot, "extensions");
if (!deps.fs.existsSync(distExtensionsRoot)) {
return [];
}
const pluginSdkDir = path.join(distRoot, "plugin-sdk");
let dirents = [];
try {
@@ -1070,7 +1071,8 @@ const writeBuildStamp = (deps) => {
const shouldSkipWatchRuntimeSync = (deps, requirement) =>
deps.env.OPENCLAW_WATCH_MODE === "1" &&
requirement.reason === "missing_runtime_postbuild_stamp" &&
hasDirtyRuntimePostBuildInputs(deps) !== true;
hasDirtyRuntimePostBuildInputs(deps) !== true &&
!hasMissingRequiredRuntimePostBuildOutput(deps);
const isGatewayClientCommand = (args) =>
args[0] === "gateway" && (args[1] === "call" || args[1] === "status");