Plugins: add root-alias shim and cache/docs updates
This commit is contained in:
@@ -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).`,
|
||||
|
||||
Reference in New Issue
Block a user