mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-20 06:20:55 +00:00
Merged via squash.
Prepared head SHA: 44742652c9
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
25 lines
709 B
TypeScript
25 lines
709 B
TypeScript
import type { OpenClawConfig } from "../config/config.js";
|
|
import { loadOpenClawPlugins } from "../plugins/loader.js";
|
|
import { resolveUserPath } from "../utils.js";
|
|
|
|
export function ensureRuntimePluginsLoaded(params: {
|
|
config?: OpenClawConfig;
|
|
workspaceDir?: string | null;
|
|
allowGatewaySubagentBinding?: boolean;
|
|
}): void {
|
|
const workspaceDir =
|
|
typeof params.workspaceDir === "string" && params.workspaceDir.trim()
|
|
? resolveUserPath(params.workspaceDir)
|
|
: undefined;
|
|
|
|
loadOpenClawPlugins({
|
|
config: params.config,
|
|
workspaceDir,
|
|
runtimeOptions: params.allowGatewaySubagentBinding
|
|
? {
|
|
allowGatewaySubagentBinding: true,
|
|
}
|
|
: undefined,
|
|
});
|
|
}
|