@devflow-tools/mcp-server 0.18.72 → 0.19.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/command-registry.json +7 -7
- package/dist/index.js +39 -8
- package/dist/index.js.map +1 -1
- package/package.json +14 -14
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
],
|
|
9
9
|
"blockedNative": [],
|
|
10
10
|
"source": "core",
|
|
11
|
-
"sourceVersion": "0.18.
|
|
11
|
+
"sourceVersion": "0.18.73",
|
|
12
12
|
"requiresContext": false,
|
|
13
13
|
"evidenceMode": "runtime",
|
|
14
14
|
"skillPath": "skills/devflow:doctor/SKILL.md",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"WebFetch"
|
|
36
36
|
],
|
|
37
37
|
"source": "core",
|
|
38
|
-
"sourceVersion": "0.18.
|
|
38
|
+
"sourceVersion": "0.18.73",
|
|
39
39
|
"requiresContext": true,
|
|
40
40
|
"evidenceMode": "mixed",
|
|
41
41
|
"skillPath": "skills/devflow:context/SKILL.md",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"Explore"
|
|
61
61
|
],
|
|
62
62
|
"source": "core",
|
|
63
|
-
"sourceVersion": "0.18.
|
|
63
|
+
"sourceVersion": "0.18.73",
|
|
64
64
|
"requiresContext": true,
|
|
65
65
|
"evidenceMode": "mixed",
|
|
66
66
|
"skillPath": "skills/devflow:graph/SKILL.md",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"WebFetch"
|
|
80
80
|
],
|
|
81
81
|
"source": "core",
|
|
82
|
-
"sourceVersion": "0.18.
|
|
82
|
+
"sourceVersion": "0.18.73",
|
|
83
83
|
"requiresContext": true,
|
|
84
84
|
"evidenceMode": "mixed",
|
|
85
85
|
"skillPath": "skills/devflow:knowledge/SKILL.md",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"Explore"
|
|
104
104
|
],
|
|
105
105
|
"source": "core",
|
|
106
|
-
"sourceVersion": "0.18.
|
|
106
|
+
"sourceVersion": "0.18.73",
|
|
107
107
|
"requiresContext": true,
|
|
108
108
|
"evidenceMode": "mixed",
|
|
109
109
|
"skillPath": "skills/devflow:memory/SKILL.md",
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
],
|
|
120
120
|
"blockedNative": [],
|
|
121
121
|
"source": "core",
|
|
122
|
-
"sourceVersion": "0.18.
|
|
122
|
+
"sourceVersion": "0.18.73",
|
|
123
123
|
"requiresContext": true,
|
|
124
124
|
"evidenceMode": "mixed",
|
|
125
125
|
"skillPath": "skills/devflow:workflow/SKILL.md",
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
],
|
|
155
155
|
"blockedNative": [],
|
|
156
156
|
"source": "core",
|
|
157
|
-
"sourceVersion": "0.18.
|
|
157
|
+
"sourceVersion": "0.18.73",
|
|
158
158
|
"requiresContext": true,
|
|
159
159
|
"evidenceMode": "mixed",
|
|
160
160
|
"skillPath": "skills/devflow:delivery/SKILL.md",
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
2
4
|
import { startServer } from "./server.js";
|
|
3
5
|
import { runHealthcheck } from "./healthcheck.js";
|
|
4
6
|
// MCP stdio reserves stdout exclusively for JSON-RPC frames. Domain engines
|
|
@@ -7,20 +9,49 @@ import { runHealthcheck } from "./healthcheck.js";
|
|
|
7
9
|
console.log = console.error.bind(console);
|
|
8
10
|
console.info = console.error.bind(console);
|
|
9
11
|
console.debug = console.error.bind(console);
|
|
12
|
+
function parseToolList(raw) {
|
|
13
|
+
const trimmed = raw?.trim();
|
|
14
|
+
if (!trimmed)
|
|
15
|
+
return undefined;
|
|
16
|
+
return new Set(trimmed.split(",").map(value => value.trim()).filter(Boolean));
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Tool surface resolution (provider-agnostic, config-driven):
|
|
20
|
+
* 1. CLI `--tools a,b,c` (release replay harness; empty value is an error)
|
|
21
|
+
* 2. env `DEVFLOW_MCP_TOOLS=a,b,c`
|
|
22
|
+
* 3. project `.devflow/config.json` → { "mcp": { "tools": ["a","b"] } }
|
|
23
|
+
* Absent all three: full registered surface (unchanged default behavior).
|
|
24
|
+
*/
|
|
25
|
+
function resolveAllowedToolNames(projectRoot) {
|
|
26
|
+
const toolsIndex = process.argv.indexOf("--tools");
|
|
27
|
+
const cliValue = toolsIndex >= 0 ? process.argv[toolsIndex + 1] : undefined;
|
|
28
|
+
if (toolsIndex >= 0 && !cliValue?.trim())
|
|
29
|
+
throw new Error("MCP_TOOL_SURFACE_EMPTY");
|
|
30
|
+
const fromCli = parseToolList(cliValue);
|
|
31
|
+
if (fromCli)
|
|
32
|
+
return fromCli;
|
|
33
|
+
const fromEnv = parseToolList(process.env.DEVFLOW_MCP_TOOLS);
|
|
34
|
+
if (fromEnv)
|
|
35
|
+
return fromEnv;
|
|
36
|
+
try {
|
|
37
|
+
const config = JSON.parse(readFileSync(join(projectRoot, ".devflow", "config.json"), "utf8"));
|
|
38
|
+
const tools = config.mcp?.tools;
|
|
39
|
+
if (Array.isArray(tools) && tools.length > 0) {
|
|
40
|
+
return new Set(tools.map(value => String(value).trim()).filter(Boolean));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
// No project config or unreadable: fall through to the full surface.
|
|
45
|
+
}
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
10
48
|
async function main() {
|
|
11
49
|
if (process.argv.includes("--healthcheck")) {
|
|
12
50
|
await runHealthcheck();
|
|
13
51
|
return;
|
|
14
52
|
}
|
|
15
53
|
const projectRoot = process.env.DEVFLOW_PROJECT_ROOT || process.cwd();
|
|
16
|
-
|
|
17
|
-
const toolsValue = toolsIndex >= 0 ? process.argv[toolsIndex + 1] : undefined;
|
|
18
|
-
if (toolsIndex >= 0 && !toolsValue?.trim())
|
|
19
|
-
throw new Error("MCP_TOOL_SURFACE_EMPTY");
|
|
20
|
-
const allowedToolNames = toolsValue
|
|
21
|
-
? new Set(toolsValue.split(",").map(value => value.trim()).filter(Boolean))
|
|
22
|
-
: undefined;
|
|
23
|
-
await startServer({ mode: "stdio", projectRoot, allowedToolNames });
|
|
54
|
+
await startServer({ mode: "stdio", projectRoot, allowedToolNames: resolveAllowedToolNames(projectRoot) });
|
|
24
55
|
}
|
|
25
56
|
main().catch((err) => {
|
|
26
57
|
console.error("MCP Server error:", err);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,4EAA4E;AAC5E,4EAA4E;AAC5E,8CAA8C;AAC9C,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC1C,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC3C,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAE5C,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,4EAA4E;AAC5E,4EAA4E;AAC5E,8CAA8C;AAC9C,OAAO,CAAC,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO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.js",
|
|
6
6
|
"exports": {
|
|
@@ -29,18 +29,18 @@
|
|
|
29
29
|
"clean": "rm -rf dist"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@devflow-tools/context-engine": "0.
|
|
33
|
-
"@devflow-tools/database": "0.
|
|
34
|
-
"@devflow-tools/delivery-line": "0.
|
|
35
|
-
"@devflow-tools/knowledge-engine": "0.
|
|
36
|
-
"@devflow-tools/memory-engine": "0.
|
|
37
|
-
"@devflow-tools/provider-runtime": "0.
|
|
38
|
-
"@devflow-tools/retrieval-engine": "0.
|
|
39
|
-
"@devflow-tools/sdk": "0.
|
|
40
|
-
"@devflow-tools/semantic-engine": "0.
|
|
41
|
-
"@devflow-tools/task-runtime": "0.
|
|
42
|
-
"@devflow-tools/telemetry": "0.
|
|
43
|
-
"@devflow-tools/workflow-engine": "0.
|
|
32
|
+
"@devflow-tools/context-engine": "0.19.0",
|
|
33
|
+
"@devflow-tools/database": "0.19.0",
|
|
34
|
+
"@devflow-tools/delivery-line": "0.19.0",
|
|
35
|
+
"@devflow-tools/knowledge-engine": "0.19.0",
|
|
36
|
+
"@devflow-tools/memory-engine": "0.19.0",
|
|
37
|
+
"@devflow-tools/provider-runtime": "0.19.0",
|
|
38
|
+
"@devflow-tools/retrieval-engine": "0.19.0",
|
|
39
|
+
"@devflow-tools/sdk": "0.19.0",
|
|
40
|
+
"@devflow-tools/semantic-engine": "0.19.0",
|
|
41
|
+
"@devflow-tools/task-runtime": "0.19.0",
|
|
42
|
+
"@devflow-tools/telemetry": "0.19.0",
|
|
43
|
+
"@devflow-tools/workflow-engine": "0.19.0",
|
|
44
44
|
"@modelcontextprotocol/sdk": "^1.32.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"dist",
|
|
52
52
|
"bin"
|
|
53
53
|
],
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "d4f681428ac2f83d868e152a10c85ec892afda8b",
|
|
55
55
|
"description": "Model Context Protocol server exposing DevFlow context, memory, knowledge, and workflow tools.",
|
|
56
56
|
"license": "MIT",
|
|
57
57
|
"repository": {
|