mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-23 05:28:11 +00:00
fix(agents): bootstrap runtime plugins before context-engine resolution
This commit is contained in:
18
src/agents/runtime-plugins.ts
Normal file
18
src/agents/runtime-plugins.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
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;
|
||||
}): void {
|
||||
const workspaceDir =
|
||||
typeof params.workspaceDir === "string" && params.workspaceDir.trim()
|
||||
? resolveUserPath(params.workspaceDir)
|
||||
: undefined;
|
||||
|
||||
loadOpenClawPlugins({
|
||||
config: params.config,
|
||||
workspaceDir,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user