@julong/mono-rele2-utils 1.1.3 → 1.1.5
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/index.js +3 -23
- package/dist/server.js +5 -26
- package/package.json +4 -7
package/dist/index.js
CHANGED
|
@@ -1,28 +1,8 @@
|
|
|
1
|
-
//
|
|
2
|
-
|
|
3
|
-
return tool;
|
|
4
|
-
}
|
|
5
|
-
function text(content) {
|
|
6
|
-
return { content: [{ type: "text", text: content }] };
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
// ../common/mcp/server.ts
|
|
10
|
-
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
11
|
-
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
12
|
-
function createMcpServer(config, tools) {
|
|
13
|
-
const server = new McpServer(config);
|
|
14
|
-
for (const tool of tools) {
|
|
15
|
-
server.registerTool(
|
|
16
|
-
tool.name,
|
|
17
|
-
{ description: tool.description, inputSchema: tool.inputSchema },
|
|
18
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
19
|
-
tool.handler
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
return server;
|
|
23
|
-
}
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import { createMcpServer } from "@julong/mono-rele2-common";
|
|
24
3
|
|
|
25
4
|
// src/tools/text.ts
|
|
5
|
+
import { defineTool, text } from "@julong/mono-rele2-common";
|
|
26
6
|
import { z } from "zod";
|
|
27
7
|
|
|
28
8
|
// src/cn.ts
|
package/dist/server.js
CHANGED
|
@@ -1,34 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
return tool;
|
|
6
|
-
}
|
|
7
|
-
function text(content) {
|
|
8
|
-
return { content: [{ type: "text", text: content }] };
|
|
9
|
-
}
|
|
3
|
+
// src/server.ts
|
|
4
|
+
import { startServer } from "@julong/mono-rele2-common";
|
|
10
5
|
|
|
11
|
-
//
|
|
12
|
-
import {
|
|
13
|
-
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
14
|
-
function createMcpServer(config, tools) {
|
|
15
|
-
const server2 = new McpServer(config);
|
|
16
|
-
for (const tool of tools) {
|
|
17
|
-
server2.registerTool(
|
|
18
|
-
tool.name,
|
|
19
|
-
{ description: tool.description, inputSchema: tool.inputSchema },
|
|
20
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
21
|
-
tool.handler
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
return server2;
|
|
25
|
-
}
|
|
26
|
-
async function startServer(server2) {
|
|
27
|
-
const transport = new StdioServerTransport();
|
|
28
|
-
await server2.connect(transport);
|
|
29
|
-
}
|
|
6
|
+
// src/index.ts
|
|
7
|
+
import { createMcpServer } from "@julong/mono-rele2-common";
|
|
30
8
|
|
|
31
9
|
// src/tools/text.ts
|
|
10
|
+
import { defineTool, text } from "@julong/mono-rele2-common";
|
|
32
11
|
import { z } from "zod";
|
|
33
12
|
|
|
34
13
|
// src/cn.ts
|
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@julong/mono-rele2-utils",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"@julong/mono-rele2-common": "1.2.0"
|
|
8
|
+
},
|
|
6
9
|
"exports": {
|
|
7
10
|
".": {
|
|
8
11
|
"import": "./dist/index.js",
|
|
@@ -22,11 +25,5 @@
|
|
|
22
25
|
"build": "tsup",
|
|
23
26
|
"typecheck": "tsc --noEmit",
|
|
24
27
|
"clean": "rimraf dist"
|
|
25
|
-
},
|
|
26
|
-
"devDependencies": {
|
|
27
|
-
"@julong/mono-rele2-common": "1.1.2",
|
|
28
|
-
"rimraf": "^6.0.1",
|
|
29
|
-
"tsup": "^8.5.1",
|
|
30
|
-
"typescript": "^5.6.3"
|
|
31
28
|
}
|
|
32
29
|
}
|