@devflow-tools/mcp-server 0.1.0 → 0.2.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.
Files changed (2) hide show
  1. package/bin/devflow-mcp.cjs +60 -0
  2. package/package.json +10 -9
@@ -0,0 +1,60 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ //
4
+ // DevFlow MCP Server launcher — runs on the user's Node, locates the vendored Node 24
5
+ // runtime from @colbymchenry/codegraph (which bundles node:sqlite), and execs
6
+ // the real MCP server with it. The user's Node is only ever a launcher.
7
+ //
8
+
9
+ var childProcess = require('child_process');
10
+ var path = require('path');
11
+
12
+ var target = process.platform + '-' + process.arch;
13
+ var pkg = '@colbymchenry/codegraph-' + target;
14
+ var isWindows = process.platform === 'win32';
15
+
16
+ main();
17
+
18
+ function main() {
19
+ var nodeExe;
20
+
21
+ if (isWindows) {
22
+ nodeExe = resolveSilent(pkg + '/node.exe');
23
+ if (!nodeExe) fail();
24
+ var args = [resolveEntry()].concat(process.argv.slice(2));
25
+ var res = childProcess.spawnSync(nodeExe, args, { stdio: 'inherit' });
26
+ process.exit(res.status === null ? 1 : res.status);
27
+ } else {
28
+ // Use the vendored Node directly — it has node:sqlite built in
29
+ nodeExe = resolveSilent(pkg + '/node');
30
+ if (nodeExe) {
31
+ var args2 = [resolveEntry()].concat(process.argv.slice(2));
32
+ var res2 = childProcess.spawnSync(nodeExe, args2, { stdio: 'inherit' });
33
+ process.exit(res2.status === null ? 1 : res2.status);
34
+ } else {
35
+ // Fallback: try the bin/codegraph launcher
36
+ var launcher = resolveSilent(pkg + '/bin/codegraph');
37
+ if (launcher) {
38
+ var res3 = childProcess.spawnSync(launcher, [resolveEntry()].concat(process.argv.slice(2)), { stdio: 'inherit' });
39
+ process.exit(res3.status === null ? 1 : res3.status);
40
+ }
41
+ fail();
42
+ }
43
+ }
44
+ }
45
+
46
+ function resolveEntry() {
47
+ return path.resolve(__dirname, '..', 'dist', 'index.js');
48
+ }
49
+
50
+ function resolveSilent(id) {
51
+ try { return require.resolve(id); } catch (e) { return null; }
52
+ }
53
+
54
+ function fail() {
55
+ process.stderr.write(
56
+ 'devflow-mcp: could not find the CodeGraph platform bundle (' + pkg + ').\n' +
57
+ 'Make sure @colbymchenry/codegraph is installed.\n'
58
+ );
59
+ process.exit(1);
60
+ }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@devflow-tools/mcp-server",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "bin": {
7
- "devflow-mcp": "./dist/index.js"
7
+ "devflow-mcp": "./bin/devflow-mcp.cjs"
8
8
  },
9
9
  "scripts": {
10
10
  "build": "tsc -b",
@@ -13,11 +13,11 @@
13
13
  "clean": "rm -rf dist"
14
14
  },
15
15
  "dependencies": {
16
- "@devflow-tools/context-engine": "*",
17
- "@devflow-tools/knowledge-engine": "*",
18
- "@devflow-tools/memory-engine": "*",
19
- "@devflow-tools/sdk": "*",
20
- "@devflow-tools/workflow-engine": "*",
16
+ "@devflow-tools/context-engine": "^0.2.0",
17
+ "@devflow-tools/knowledge-engine": "^0.2.0",
18
+ "@devflow-tools/memory-engine": "^0.2.0",
19
+ "@devflow-tools/sdk": "^0.2.0",
20
+ "@devflow-tools/workflow-engine": "^0.2.0",
21
21
  "@modelcontextprotocol/sdk": "^1.0.0"
22
22
  },
23
23
  "devDependencies": {
@@ -25,7 +25,8 @@
25
25
  "vitest": "^2.0.0"
26
26
  },
27
27
  "files": [
28
- "dist"
28
+ "dist",
29
+ "bin"
29
30
  ],
30
- "gitHead": "4cede97fc7fc673f929427fac169acab100ca8ed"
31
+ "gitHead": "685f11e5515e5c0ba76e9d59ebf96e2c94713dfb"
31
32
  }