@dypai-ai/mcp 1.5.28 → 1.5.29
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/package.json +1 -1
- package/src/lib/cloudBackendCompiler.js +24 -12
- package/src/toolProfiles.js +1 -0
package/package.json
CHANGED
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Cloud backend compiler client — calls
|
|
2
|
+
* Cloud backend compiler client — calls MCP Cloud tool backend_compile_snapshot.
|
|
3
|
+
* MCP local never talks to Core API or the compiler MS directly for Flow compile.
|
|
3
4
|
*/
|
|
4
5
|
|
|
5
|
-
import {
|
|
6
|
+
import { proxyToolCall } from "../tools/proxy.js"
|
|
6
7
|
import { collectBackendSnapshotFromDypaiDir } from "./backendSnapshot.js"
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
const COMMAND_MAP = {
|
|
10
|
+
validate: "validate",
|
|
11
|
+
list: "list",
|
|
12
|
+
resolve: "resolve",
|
|
13
|
+
"push-payload": "push-payload",
|
|
14
|
+
"push-payloads": "push-payloads",
|
|
15
|
+
"generate-types": "generate-types",
|
|
10
16
|
}
|
|
11
17
|
|
|
12
|
-
async function
|
|
13
|
-
|
|
18
|
+
async function compileSnapshot(projectId, command, files, endpoint = undefined) {
|
|
19
|
+
const args = {
|
|
20
|
+
project_id: projectId,
|
|
21
|
+
command: COMMAND_MAP[command] || command,
|
|
22
|
+
files,
|
|
23
|
+
}
|
|
24
|
+
if (endpoint) args.endpoint = endpoint
|
|
25
|
+
return proxyToolCall("backend_compile_snapshot", args)
|
|
14
26
|
}
|
|
15
27
|
|
|
16
28
|
export async function buildSnapshotPayload(dypaiRootDir, projectRoot = null) {
|
|
@@ -18,27 +30,27 @@ export async function buildSnapshotPayload(dypaiRootDir, projectRoot = null) {
|
|
|
18
30
|
}
|
|
19
31
|
|
|
20
32
|
export async function cloudValidateSnapshot(projectId, files) {
|
|
21
|
-
return
|
|
33
|
+
return compileSnapshot(projectId, "validate", files)
|
|
22
34
|
}
|
|
23
35
|
|
|
24
36
|
export async function cloudListEffectiveEntries(projectId, files) {
|
|
25
|
-
return
|
|
37
|
+
return compileSnapshot(projectId, "list", files)
|
|
26
38
|
}
|
|
27
39
|
|
|
28
40
|
export async function cloudResolveEffectiveEndpoint(projectId, files, endpoint) {
|
|
29
|
-
return
|
|
41
|
+
return compileSnapshot(projectId, "resolve", files, endpoint)
|
|
30
42
|
}
|
|
31
43
|
|
|
32
44
|
export async function cloudBuildPushPayload(projectId, files, endpoint) {
|
|
33
|
-
return
|
|
45
|
+
return compileSnapshot(projectId, "push-payload", files, endpoint)
|
|
34
46
|
}
|
|
35
47
|
|
|
36
48
|
export async function cloudBuildEffectivePushPayloads(projectId, files) {
|
|
37
|
-
return
|
|
49
|
+
return compileSnapshot(projectId, "push-payloads", files)
|
|
38
50
|
}
|
|
39
51
|
|
|
40
52
|
export async function cloudGenerateTypes(projectId, files) {
|
|
41
|
-
return
|
|
53
|
+
return compileSnapshot(projectId, "generate-types", files)
|
|
42
54
|
}
|
|
43
55
|
|
|
44
56
|
export async function compileFromDypaiDir(projectId, dypaiRootDir, projectRoot = null) {
|
package/src/toolProfiles.js
CHANGED
|
@@ -42,6 +42,7 @@ export const MCP_TOOLS_REMOVED = new Set([
|
|
|
42
42
|
"search_design_patterns",
|
|
43
43
|
"search_project_templates",
|
|
44
44
|
"search_workflow_templates",
|
|
45
|
+
"backend_compile_snapshot",
|
|
45
46
|
]);
|
|
46
47
|
|
|
47
48
|
/** Local-only ship/deploy tools — excluded from Studio allowlists, not from local. */
|