Fix MCP server packaging in clean builds
This commit is contained in:
parent
b573af4828
commit
c6ff8b026d
4 changed files with 11 additions and 2 deletions
|
|
@ -47,7 +47,8 @@
|
|||
"build:pi-coding-agent": "npm run build -w @gsd/pi-coding-agent",
|
||||
"build:native-pkg": "npm run build -w @gsd/native",
|
||||
"build:pi": "npm run build:native-pkg && npm run build:pi-tui && npm run build:pi-ai && npm run build:pi-agent-core && npm run build:pi-coding-agent",
|
||||
"build": "npm run build:pi && tsc && npm run copy-resources && npm run copy-themes && npm run copy-export-html && node scripts/build-web-if-stale.cjs",
|
||||
"build:mcp-server": "npm run build -w @gsd-build/mcp-server",
|
||||
"build": "npm run build:pi && npm run build:mcp-server && tsc && npm run copy-resources && npm run copy-themes && npm run copy-export-html && node scripts/build-web-if-stale.cjs",
|
||||
"stage:web-host": "node scripts/stage-web-standalone.cjs",
|
||||
"build:web-host": "npm --prefix web run build && npm run stage:web-host",
|
||||
"copy-resources": "node scripts/copy-resources.cjs",
|
||||
|
|
|
|||
|
|
@ -20,5 +20,5 @@
|
|||
"rootDir": "./src"
|
||||
},
|
||||
"include": ["src/**/*.ts"],
|
||||
"exclude": ["node_modules", "dist", "**/*.d.ts", "src/**/*.d.ts"]
|
||||
"exclude": ["node_modules", "dist", "**/*.d.ts", "src/**/*.d.ts", "src/**/*.test.ts"]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ if (require.main === module) {
|
|||
'pi-ai',
|
||||
'pi-agent-core',
|
||||
'pi-coding-agent',
|
||||
'mcp-server',
|
||||
]
|
||||
|
||||
const stale = detectStalePackages(root, WORKSPACE_PACKAGES)
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ try {
|
|||
const requiredFiles = [
|
||||
'dist/loader.js',
|
||||
'packages/pi-coding-agent/dist/index.js',
|
||||
'packages/mcp-server/dist/cli.js',
|
||||
'scripts/link-workspace-packages.cjs',
|
||||
'dist/web/standalone/server.js',
|
||||
];
|
||||
|
|
@ -133,6 +134,12 @@ try {
|
|||
// --- Run the binary to confirm end-to-end resolution ---
|
||||
console.log('==> Running installed binary (gsd -v)...');
|
||||
const loaderPath = join(installedRoot, 'dist', 'loader.js');
|
||||
const bundledWorkflowMcpCliPath = join(installedRoot, 'packages', 'mcp-server', 'dist', 'cli.js');
|
||||
if (!existsSync(bundledWorkflowMcpCliPath)) {
|
||||
console.log('ERROR: Bundled workflow MCP CLI missing after install.');
|
||||
console.log(` Expected: ${bundledWorkflowMcpCliPath}`);
|
||||
process.exit(1);
|
||||
}
|
||||
try {
|
||||
const versionOutput = execSync(`node "${loaderPath}" -v`, {
|
||||
cwd: installDir,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue