synabun 2026.4.20-beta.1 → 2026.4.20-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@
6
6
  * Mount on any Express app or run standalone.
7
7
  */
8
8
 
9
- import express from 'express';
9
+ import express, { type Router } from 'express';
10
10
  import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
11
11
  import { ensureDatabase } from './services/sqlite.js';
12
12
  import { initCategoryCache } from './services/categories.js';
@@ -39,7 +39,7 @@ export async function ensureInit() {
39
39
  * Auth is handled externally (URL-embedded key in server.js).
40
40
  * Can be mounted on an existing Express app: app.use('/mcp', createMcpRoutes());
41
41
  */
42
- export function createMcpRoutes() {
42
+ export function createMcpRoutes(): Router {
43
43
  const router = express.Router();
44
44
  router.use(express.json());
45
45
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "synabun",
3
- "version": "2026.4.20-beta.01",
3
+ "version": "2026.4.20-beta.2",
4
4
  "description": "Persistent vector memory for AI assistants",
5
5
  "license": "Apache-2.0",
6
6
  "author": "The SynaBun Authors",
package/postinstall.js CHANGED
@@ -95,17 +95,21 @@ function buildMcpServer() {
95
95
  return;
96
96
  }
97
97
 
98
- // dist/ ships pre-built in the npm package — build is a fallback only
99
- warn('MCP server dist/ not found — attempting build (requires TypeScript)');
98
+ info('Building MCP server from source...');
100
99
  try {
101
100
  execSync('npx tsc', {
102
101
  cwd: resolve(__dirname, 'mcp-server'),
103
- stdio: 'pipe',
104
- timeout: 60_000,
102
+ stdio: ['ignore', 'pipe', 'pipe'],
103
+ timeout: 120_000,
105
104
  });
106
105
  ok('MCP server built');
107
106
  } catch (err) {
108
- warn('MCP server build failed (TypeScript not available) — this is OK if dist/ was shipped');
107
+ fail('MCP server build failed:');
108
+ const stdout = err.stdout?.toString().trim();
109
+ const stderr = err.stderr?.toString().trim();
110
+ if (stdout) console.error(stdout);
111
+ if (stderr) console.error(stderr);
112
+ if (!stdout && !stderr) console.error(err.message);
109
113
  }
110
114
  }
111
115
 
package/setup.js CHANGED
@@ -166,16 +166,22 @@ function buildMcpServer() {
166
166
  return;
167
167
  }
168
168
 
169
- warn('MCP server dist/ not found — attempting build (requires TypeScript)');
169
+ info('Building MCP server from source...');
170
170
  try {
171
171
  execSync('npx tsc', {
172
172
  cwd: resolve(PACKAGE_ROOT, 'mcp-server'),
173
- stdio: 'pipe',
174
- timeout: 60_000,
173
+ stdio: ['ignore', 'pipe', 'pipe'],
174
+ timeout: 120_000,
175
175
  });
176
176
  ok('MCP server built');
177
177
  } catch (err) {
178
- warn('MCP server build failed (TypeScript not available) — reinstall with: npm install -g synabun@latest');
178
+ fail('MCP server build failed:');
179
+ const stdout = err.stdout?.toString().trim();
180
+ const stderr = err.stderr?.toString().trim();
181
+ if (stdout) console.error(stdout);
182
+ if (stderr) console.error(stderr);
183
+ if (!stdout && !stderr) console.error(err.message);
184
+ console.error('\n Report this at: https://github.com/danilokhury/Synabun/issues');
179
185
  }
180
186
  }
181
187