Files
openclaw/src/plugins/runtime/metadata-registry-loader.ts
Pavan Kumar Gondhi 31160dc069 fix(agents): enforce subagent envelope inheritance on ACP child sessions [AI-assisted] (#69383)
* fix: address issue

* fix: address review feedback

* fix: finalize issue changes

* fix: address PR review feedback

* address build faiure

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback

* fix: address PR review feedback
2026-04-21 17:25:25 +05:30

32 lines
1.1 KiB
TypeScript

import type { OpenClawConfig } from "../../config/types.openclaw.js";
import { loadOpenClawPlugins } from "../loader.js";
import { hasExplicitPluginIdScope } from "../plugin-scope.js";
import type { PluginRegistry } from "../registry.js";
import type { PluginLogger } from "../types.js";
import { buildPluginRuntimeLoadOptions, resolvePluginRuntimeLoadContext } from "./load-context.js";
export function loadPluginMetadataRegistrySnapshot(options?: {
config?: OpenClawConfig;
activationSourceConfig?: OpenClawConfig;
env?: NodeJS.ProcessEnv;
logger?: PluginLogger;
workspaceDir?: string;
onlyPluginIds?: string[];
loadModules?: boolean;
}): PluginRegistry {
const context = resolvePluginRuntimeLoadContext(options);
return loadOpenClawPlugins(
buildPluginRuntimeLoadOptions(context, {
throwOnLoadError: true,
cache: false,
activate: false,
mode: "validate",
loadModules: options?.loadModules,
...(hasExplicitPluginIdScope(options?.onlyPluginIds)
? { onlyPluginIds: options?.onlyPluginIds }
: {}),
}),
);
}