feat(FN-3718): add droid runtime to tsup bundle with asset gate
Stages the droid runtime as a bundled plugin in the CLI's tsup configuration, gates the bundle bootstrap on droid asset availability, and adds tests asserting correct staging behavior in bundle output. Fusion-Task-Id: FN-3718
This commit is contained in:
@@ -13,8 +13,14 @@ const RUNTIME_PLUGIN_IDS = [
|
||||
"fusion-plugin-openclaw-runtime",
|
||||
"fusion-plugin-paperclip-runtime",
|
||||
"fusion-plugin-cursor-runtime",
|
||||
"fusion-plugin-droid-runtime",
|
||||
] as const;
|
||||
|
||||
const RUNTIME_PLUGINS_WITH_MCP_SCHEMA_SERVER = new Set([
|
||||
"fusion-plugin-openclaw-runtime",
|
||||
"fusion-plugin-droid-runtime",
|
||||
]);
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const dashboardClientSrc = join(__dirname, "..", "dashboard", "dist", "client");
|
||||
const dashboardClientDest = join(__dirname, "dist", "client");
|
||||
@@ -214,11 +220,11 @@ export default defineConfig({
|
||||
logLevel: "warning",
|
||||
});
|
||||
|
||||
if (pluginId === "fusion-plugin-openclaw-runtime") {
|
||||
if (RUNTIME_PLUGINS_WITH_MCP_SCHEMA_SERVER.has(pluginId)) {
|
||||
const mcpServerAsset = join(pluginSrcDir, "src", "mcp-schema-server.cjs");
|
||||
if (!existsSync(mcpServerAsset)) {
|
||||
throw new Error(
|
||||
`[tsup] Missing required openclaw bridge asset at ${mcpServerAsset}; expected committed source file mcp-schema-server.cjs.`,
|
||||
`[tsup] Missing required bridge asset for ${pluginId} at ${mcpServerAsset}; expected committed source file mcp-schema-server.cjs.`,
|
||||
);
|
||||
}
|
||||
cpSync(mcpServerAsset, join(pluginDestDir, "mcp-schema-server.cjs"));
|
||||
|
||||
Reference in New Issue
Block a user