fix(plugins): preserve live hook registry during gateway runs

This commit is contained in:
Vincent Koc
2026-03-23 01:00:08 -07:00
parent 9105b3723d
commit d22279d2e8
9 changed files with 198 additions and 63 deletions

View File

@@ -1,5 +1,6 @@
import type { OpenClawConfig } from "../config/config.js";
import { loadOpenClawPlugins } from "../plugins/loader.js";
import { getActivePluginRegistryKey } from "../plugins/runtime.js";
import { resolveUserPath } from "../utils.js";
export function ensureRuntimePluginsLoaded(params: {
@@ -7,6 +8,10 @@ export function ensureRuntimePluginsLoaded(params: {
workspaceDir?: string | null;
allowGatewaySubagentBinding?: boolean;
}): void {
if (getActivePluginRegistryKey()) {
return;
}
const workspaceDir =
typeof params.workspaceDir === "string" && params.workspaceDir.trim()
? resolveUserPath(params.workspaceDir)