@spaceflow/core 0.13.0 → 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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spaceflow/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Spaceflow 核心能力库",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Lydanne",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"zod-to-json-schema": "^3.25.1",
|
|
100
100
|
"commander": "^12.1.0",
|
|
101
101
|
"i18next": "^25.8.4",
|
|
102
|
-
"@spaceflow/shared": "0.
|
|
102
|
+
"@spaceflow/shared": "0.5.0"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
105
|
"@swc/core": "1.15.3",
|
|
@@ -25,9 +25,9 @@ export const mcpExtension = defineExtension({
|
|
|
25
25
|
],
|
|
26
26
|
run: async (_args, options, ctx) => {
|
|
27
27
|
const verbose = (options?.verbose ? 2 : 1) as VerboseLevel;
|
|
28
|
-
const inspector = options?.inspector as boolean | undefined;
|
|
29
28
|
const extensionLoader = ctx.getService<ExtensionLoader>("extensionLoader");
|
|
30
29
|
const mcpService = new McpService(extensionLoader);
|
|
30
|
+
const inspector = options?.inspector as boolean | undefined;
|
|
31
31
|
await mcpService.startServer(verbose, inspector);
|
|
32
32
|
},
|
|
33
33
|
},
|
|
@@ -29,7 +29,6 @@ export class McpService {
|
|
|
29
29
|
console.error(t("mcp:scanning"));
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
// 获取所有扩展(已在 exec() 阶段通过 registerExtension 注册完毕)
|
|
33
32
|
const extensions = this.extensionLoader.getExtensions();
|
|
34
33
|
const mcpServers = this.extensionLoader.getMcpServers();
|
|
35
34
|
|
|
@@ -37,7 +36,6 @@ export class McpService {
|
|
|
37
36
|
console.error(t("mcp:foundExtensions", { count: extensions.length }));
|
|
38
37
|
}
|
|
39
38
|
|
|
40
|
-
// 收集所有扩展的 MCP 工具
|
|
41
39
|
const allTools: Array<{ tool: McpToolMetadata; handler: any; ctx: any }> = [];
|
|
42
40
|
for (const { extensionName, mcp } of mcpServers) {
|
|
43
41
|
if (shouldLog(verbose, 2)) {
|
|
@@ -57,7 +55,7 @@ export class McpService {
|
|
|
57
55
|
methodName: "handler",
|
|
58
56
|
},
|
|
59
57
|
handler: tool.handler,
|
|
60
|
-
ctx: this.extensionLoader["ctx"],
|
|
58
|
+
ctx: this.extensionLoader["ctx"],
|
|
61
59
|
});
|
|
62
60
|
}
|
|
63
61
|
}
|