@plandesk/api 0.13.2 → 0.14.0

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.
package/dist/server.js CHANGED
@@ -37,10 +37,14 @@ export function createApp(deps) {
37
37
  app.route('/api/v1', createAgentRunsRouter(agentRunService));
38
38
  app.route('/api/v1', createSubmissionsRouter(syncService, projectService));
39
39
  app.route('/api/v1', createEventsRouter(eventBus));
40
- mountStatic(app);
40
+ // Mount the MCP router BEFORE the static/SPA handler. The MCP transport uses
41
+ // GET /mcp/ for its server->client SSE stream; if the SPA catch-all (app.get('*'))
42
+ // is registered first it shadows that GET and the stream never reaches the
43
+ // transport, breaking reconnect. The MCP router must own every method on /mcp/*.
41
44
  if (deps.mcp) {
42
45
  app.route('/mcp', deps.mcp);
43
46
  }
47
+ mountStatic(app);
44
48
  app.notFound((c) => c.json({ error: 'not_found' }, 404));
45
49
  return app;
46
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plandesk/api",
3
- "version": "0.13.2",
3
+ "version": "0.14.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -18,8 +18,8 @@
18
18
  "devDependencies": {
19
19
  "typescript": "^6.0.3",
20
20
  "vitest": "^3.2.6",
21
- "@plandesk/sync-server": "0.13.2",
22
- "@plandesk/db": "0.13.2"
21
+ "@plandesk/db": "0.14.0",
22
+ "@plandesk/sync-server": "0.14.0"
23
23
  },
24
24
  "dependencies": {
25
25
  "@hono/node-server": "^2.0.4",