mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-06 00:14:54 +00:00
fix(server): include internal plugin assets in built output
This commit is contained in:
@@ -117,6 +117,9 @@ jobs:
|
||||
- name: Build server stack
|
||||
run: npm run build:server
|
||||
|
||||
- name: Verify built internal plugin assets
|
||||
run: node scripts/check-built-internal-plugins.mjs
|
||||
|
||||
- name: Typecheck all packages
|
||||
run: npm run typecheck
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
"clean": "node ../../scripts/clean-package-dist.mjs",
|
||||
"build": "npm run build:lib && npm run build:scripts",
|
||||
"build:clean": "npm run clean && npm run build",
|
||||
"build:lib": "tsc -p tsconfig.server.json --incremental false && node scripts/build-opencode-bridge-plugin.mjs && node -e \"const fs=require('node:fs'); fs.mkdirSync('dist/server/server/speech/providers/local/sherpa/assets',{recursive:true}); fs.copyFileSync('src/server/speech/providers/local/sherpa/assets/silero_vad.onnx','dist/server/server/speech/providers/local/sherpa/assets/silero_vad.onnx'); fs.cpSync('src/terminal/shell-integration','dist/server/terminal/shell-integration',{recursive:true}); fs.cpSync('src/terminal/shell-integration','dist/src/terminal/shell-integration',{recursive:true}); fs.copyFileSync('src/terminal/terminal-ts-loader.mjs','dist/server/terminal/terminal-ts-loader.mjs'); fs.rmSync('dist/server/skills',{recursive:true,force:true}); fs.cpSync('../../skills','dist/server/skills',{recursive:true});\"",
|
||||
"build:lib": "tsc -p tsconfig.server.json --incremental false && node scripts/build-opencode-bridge-plugin.mjs && node -e \"const fs=require('node:fs'); const path=require('node:path'); fs.mkdirSync('dist/server/server/speech/providers/local/sherpa/assets',{recursive:true}); fs.copyFileSync('src/server/speech/providers/local/sherpa/assets/silero_vad.onnx','dist/server/server/speech/providers/local/sherpa/assets/silero_vad.onnx'); fs.cpSync('src/terminal/shell-integration','dist/server/terminal/shell-integration',{recursive:true}); fs.cpSync('src/terminal/shell-integration','dist/src/terminal/shell-integration',{recursive:true}); fs.copyFileSync('src/terminal/terminal-ts-loader.mjs','dist/server/terminal/terminal-ts-loader.mjs'); fs.rmSync('dist/server/skills',{recursive:true,force:true}); fs.cpSync('../../skills','dist/server/skills',{recursive:true}); fs.cpSync('src/plugins','dist/server/plugins',{recursive:true,filter:(source)=>fs.statSync(source).isDirectory()||['paseo-plugin.json','icon.svg'].includes(path.basename(source))});\"",
|
||||
"build:scripts": "tsc -p tsconfig.scripts.json --incremental false && node -e \"const fs=require('node:fs'); fs.mkdirSync('dist/scripts',{recursive:true}); fs.copyFileSync('scripts/mcp-stdio-socket-bridge-cli.mjs','dist/scripts/mcp-stdio-socket-bridge-cli.mjs');\"",
|
||||
"prepack": "npm run build:clean && npm --prefix ../.. run build:daemon-web-ui",
|
||||
"start": "node dist/scripts/supervisor-entrypoint.js",
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
import assert from "node:assert/strict";
|
||||
import { readFile, stat } from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { INTERNAL_PLUGINS } from "../packages/server/dist/server/plugins/index.js";
|
||||
|
||||
const pluginRoot = fileURLToPath(
|
||||
new URL("../packages/server/dist/server/plugins/", import.meta.url),
|
||||
);
|
||||
|
||||
assert.ok(INTERNAL_PLUGINS.length > 0, "The built daemon must list internal plugins");
|
||||
for (const plugin of INTERNAL_PLUGINS) {
|
||||
assert.equal(path.resolve(plugin.directory), path.join(pluginRoot, plugin.id));
|
||||
const manifestPath = path.join(plugin.directory, "paseo-plugin.json");
|
||||
assert.ok((await stat(manifestPath)).isFile(), `${plugin.id} manifest must be a file`);
|
||||
const manifest = JSON.parse(await readFile(manifestPath, "utf8"));
|
||||
assert.equal(manifest.id, plugin.id);
|
||||
|
||||
const icons = [];
|
||||
await plugin.contribute({
|
||||
registerUsageSource(source) {
|
||||
if (source.icon) icons.push(source.icon);
|
||||
},
|
||||
});
|
||||
for (const icon of icons) {
|
||||
assert.ok(
|
||||
(await stat(path.join(plugin.directory, icon))).isFile(),
|
||||
`${plugin.id} icon must be a file`,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
console.log(`Verified built assets for ${INTERNAL_PLUGINS.length} internal plugins`);
|
||||
@@ -53,6 +53,9 @@ const entries = [
|
||||
const additionalInputs = [
|
||||
// Agent orchestration skill catalog loaded through filesystem paths
|
||||
"packages/server/dist/server/skills/**",
|
||||
// Internal plugin manifests and icons are read through filesystem paths.
|
||||
"packages/server/dist/server/plugins/**/paseo-plugin.json",
|
||||
"packages/server/dist/server/plugins/**/icon.svg",
|
||||
// Shell integration scripts loaded by the terminal manager
|
||||
"packages/server/dist/server/terminal/shell-integration/**",
|
||||
// Silero VAD ONNX model (sherpa speech provider)
|
||||
|
||||
Reference in New Issue
Block a user