Plugins: add root-alias shim and cache/docs updates

This commit is contained in:
Gustavo Madeira Santana
2026-03-04 01:19:17 -05:00
parent 646817dd80
commit 802b9f6b19
21 changed files with 576 additions and 21 deletions

View File

@@ -43,6 +43,7 @@ const exportSet = new Set(exportedNames);
const requiredSubpathEntries = [
"core",
"compat",
"telegram",
"discord",
"slack",
@@ -53,6 +54,8 @@ const requiredSubpathEntries = [
"account-id",
];
const requiredRuntimeShimEntries = ["root-alias.cjs"];
// Critical functions that channel extension plugins import from openclaw/plugin-sdk.
// If any of these are missing, plugins will fail at runtime with:
// TypeError: (0 , _pluginSdk.<name>) is not a function
@@ -101,6 +104,14 @@ for (const entry of requiredSubpathEntries) {
}
}
for (const entry of requiredRuntimeShimEntries) {
const shimPath = resolve(__dirname, "..", "dist", "plugin-sdk", entry);
if (!existsSync(shimPath)) {
console.error(`MISSING RUNTIME SHIM: dist/plugin-sdk/${entry}`);
missing += 1;
}
}
if (missing > 0) {
console.error(
`\nERROR: ${missing} required plugin-sdk artifact(s) missing (named exports or subpath files).`,