Files
openclaw/scripts/lib/deprecated-plugin-sdk-usage.mjs
2026-06-04 22:54:18 -04:00

21 lines
750 B
JavaScript

// Builds the list of deprecated public plugin SDK specifiers guarded by scripts.
import deprecatedPublicPluginSdkSubpaths from "./plugin-sdk-deprecated-public-subpaths.json" with { type: "json" };
const DEPRECATED_PLUGIN_SDK_EXTRA_SPECIFIERS = [
"openclaw/plugin-sdk",
"openclaw/plugin-sdk/agent-dir-compat",
"openclaw/plugin-sdk/test-utils",
];
/** Build fully qualified deprecated plugin SDK module specifiers from subpath metadata. */
export function buildDeprecatedPluginSdkModuleSpecifiers(
deprecatedSubpaths = deprecatedPublicPluginSdkSubpaths,
) {
return [
...new Set([
...DEPRECATED_PLUGIN_SDK_EXTRA_SPECIFIERS,
...deprecatedSubpaths.map((subpath) => `openclaw/plugin-sdk/${subpath}`),
]),
].toSorted();
}