@julong/mono-rele2-core 1.16.0 → 1.17.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/README.md +13 -13
- package/dist/index.d.ts +1 -4
- package/dist/index.js +1 -27
- package/dist/server.js +12 -17
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -9,19 +9,19 @@ Core system utility tools for the mono-rele2 monorepo. Available as an MCP serve
|
|
|
9
9
|
```sh
|
|
10
10
|
npm install -g @julong/mono-rele2-core
|
|
11
11
|
# or
|
|
12
|
-
npx @julong/mono-rele2-core <skillName> [...args]
|
|
12
|
+
npx @julong/mono-rele2-core-cli <skillName> [...args]
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
### Usage
|
|
16
16
|
|
|
17
17
|
```sh
|
|
18
|
-
mono-rele2-core <skillName> [...args]
|
|
18
|
+
mono-rele2-core-cli <skillName> [...args]
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
Run without arguments to list all available skills:
|
|
22
22
|
|
|
23
23
|
```sh
|
|
24
|
-
mono-rele2-core
|
|
24
|
+
mono-rele2-core-cli
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
```
|
|
@@ -42,7 +42,7 @@ Available skills:
|
|
|
42
42
|
Returns the message as-is.
|
|
43
43
|
|
|
44
44
|
```sh
|
|
45
|
-
mono-rele2-core echoTool <message>
|
|
45
|
+
mono-rele2-core-cli echoTool <message>
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
| arg | type | description |
|
|
@@ -50,7 +50,7 @@ mono-rele2-core echoTool <message>
|
|
|
50
50
|
| `message` | string | Message to echo |
|
|
51
51
|
|
|
52
52
|
```sh
|
|
53
|
-
mono-rele2-core echoTool "hello world" # hello world
|
|
53
|
+
mono-rele2-core-cli echoTool "hello world" # hello world
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
#### `timestampTool`
|
|
@@ -58,7 +58,7 @@ mono-rele2-core echoTool "hello world" # hello world
|
|
|
58
58
|
Returns the current UTC timestamp.
|
|
59
59
|
|
|
60
60
|
```sh
|
|
61
|
-
mono-rele2-core timestampTool [format]
|
|
61
|
+
mono-rele2-core-cli timestampTool [format]
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
| arg | type | description |
|
|
@@ -66,8 +66,8 @@ mono-rele2-core timestampTool [format]
|
|
|
66
66
|
| `format` | `iso` \| `unix` | Timestamp format (default: `iso`) |
|
|
67
67
|
|
|
68
68
|
```sh
|
|
69
|
-
mono-rele2-core timestampTool # 2026-05-02T00:00:00.000Z
|
|
70
|
-
mono-rele2-core timestampTool unix # 1746144000000
|
|
69
|
+
mono-rele2-core-cli timestampTool # 2026-05-02T00:00:00.000Z
|
|
70
|
+
mono-rele2-core-cli timestampTool unix # 1746144000000
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
#### `envTool`
|
|
@@ -75,7 +75,7 @@ mono-rele2-core timestampTool unix # 1746144000000
|
|
|
75
75
|
Returns the value of an environment variable.
|
|
76
76
|
|
|
77
77
|
```sh
|
|
78
|
-
mono-rele2-core envTool <key>
|
|
78
|
+
mono-rele2-core-cli envTool <key>
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
| arg | type | description |
|
|
@@ -83,8 +83,8 @@ mono-rele2-core envTool <key>
|
|
|
83
83
|
| `key` | string | Environment variable name |
|
|
84
84
|
|
|
85
85
|
```sh
|
|
86
|
-
mono-rele2-core envTool HOME # /Users/julong
|
|
87
|
-
mono-rele2-core envTool NODE_ENV # development
|
|
86
|
+
mono-rele2-core-cli envTool HOME # /Users/julong
|
|
87
|
+
mono-rele2-core-cli envTool NODE_ENV # development
|
|
88
88
|
```
|
|
89
89
|
|
|
90
90
|
#### `uuidTool`
|
|
@@ -92,11 +92,11 @@ mono-rele2-core envTool NODE_ENV # development
|
|
|
92
92
|
Generates a random UUID v4.
|
|
93
93
|
|
|
94
94
|
```sh
|
|
95
|
-
mono-rele2-core uuidTool
|
|
95
|
+
mono-rele2-core-cli uuidTool
|
|
96
96
|
```
|
|
97
97
|
|
|
98
98
|
```sh
|
|
99
|
-
mono-rele2-core uuidTool # 550e8400-e29b-41d4-a716-446655440000
|
|
99
|
+
mono-rele2-core-cli uuidTool # 550e8400-e29b-41d4-a716-446655440000
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
<!-- SKILLS:END -->
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as _modelcontextprotocol_sdk_server_mcp_js from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
1
|
import { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
3
2
|
import { z } from 'zod';
|
|
4
3
|
|
|
@@ -77,6 +76,4 @@ declare const tools: {
|
|
|
77
76
|
};
|
|
78
77
|
};
|
|
79
78
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
export { createCoreServer, generateReadmeSkills, generateSkillMarkdown, tools };
|
|
79
|
+
export { generateReadmeSkills, generateSkillMarkdown, tools };
|
package/dist/index.js
CHANGED
|
@@ -12,22 +12,6 @@ function text(content) {
|
|
|
12
12
|
// ../common/kit/server.ts
|
|
13
13
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
14
14
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
15
|
-
function createMcpServer(config, tools2) {
|
|
16
|
-
const server2 = new McpServer(config);
|
|
17
|
-
for (const tool of tools2) {
|
|
18
|
-
server2.registerTool(
|
|
19
|
-
tool.name,
|
|
20
|
-
{ description: tool.description, inputSchema: tool.inputSchema },
|
|
21
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
|
-
tool.handler
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
return server2;
|
|
26
|
-
}
|
|
27
|
-
async function startServer(server2) {
|
|
28
|
-
const transport = new StdioServerTransport();
|
|
29
|
-
await server2.connect(transport);
|
|
30
|
-
}
|
|
31
15
|
|
|
32
16
|
// ../common/kit/cli.ts
|
|
33
17
|
import { z } from "zod";
|
|
@@ -140,6 +124,7 @@ function containsType(schema, ctor) {
|
|
|
140
124
|
return inner instanceof ctor;
|
|
141
125
|
}
|
|
142
126
|
function generateReadmeSkills(opts) {
|
|
127
|
+
console.log(opts.binName);
|
|
143
128
|
const { binName, tools: tools2 } = opts;
|
|
144
129
|
return Object.entries(tools2).map(([key, tool]) => renderReadmeSkill(binName, key, tool)).join("\n\n");
|
|
145
130
|
}
|
|
@@ -265,18 +250,7 @@ var echoTool = defineTool(tools.echoTool);
|
|
|
265
250
|
var timestampTool = defineTool(tools.timestampTool);
|
|
266
251
|
var envTool = defineTool(tools.envTool);
|
|
267
252
|
var uuidTool = defineTool(tools.uuidTool);
|
|
268
|
-
|
|
269
|
-
// src/index.ts
|
|
270
|
-
function createCoreServer() {
|
|
271
|
-
return createMcpServer({ name: "mono-rele2-core", version: "1.0.0" }, [echoTool, timestampTool, envTool, uuidTool]);
|
|
272
|
-
}
|
|
273
|
-
var server = createCoreServer();
|
|
274
|
-
startServer(server).catch((err) => {
|
|
275
|
-
console.error("[core] server error:", err);
|
|
276
|
-
process.exit(1);
|
|
277
|
-
});
|
|
278
253
|
export {
|
|
279
|
-
createCoreServer,
|
|
280
254
|
generateReadmeSkills,
|
|
281
255
|
generateSkillMarkdown,
|
|
282
256
|
tools
|
package/dist/server.js
CHANGED
|
@@ -15,20 +15,20 @@ function text(content) {
|
|
|
15
15
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
16
16
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
17
17
|
function createMcpServer(config, tools2) {
|
|
18
|
-
const
|
|
18
|
+
const server2 = new McpServer(config);
|
|
19
19
|
for (const tool of tools2) {
|
|
20
|
-
|
|
20
|
+
server2.registerTool(
|
|
21
21
|
tool.name,
|
|
22
22
|
{ description: tool.description, inputSchema: tool.inputSchema },
|
|
23
23
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
24
24
|
tool.handler
|
|
25
25
|
);
|
|
26
26
|
}
|
|
27
|
-
return
|
|
27
|
+
return server2;
|
|
28
28
|
}
|
|
29
|
-
async function startServer(
|
|
29
|
+
async function startServer(server2) {
|
|
30
30
|
const transport = new StdioServerTransport();
|
|
31
|
-
await
|
|
31
|
+
await server2.connect(transport);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
// ../common/kit/cli.ts
|
|
@@ -91,19 +91,14 @@ var timestampTool = defineTool(tools.timestampTool);
|
|
|
91
91
|
var envTool = defineTool(tools.envTool);
|
|
92
92
|
var uuidTool = defineTool(tools.uuidTool);
|
|
93
93
|
|
|
94
|
-
// src/index.ts
|
|
95
|
-
function createCoreServer() {
|
|
96
|
-
return createMcpServer({ name: "mono-rele2-core", version: "1.0.0" }, [echoTool, timestampTool, envTool, uuidTool]);
|
|
97
|
-
}
|
|
98
|
-
var server = createCoreServer();
|
|
99
|
-
startServer(server).catch((err) => {
|
|
100
|
-
console.error("[core] server error:", err);
|
|
101
|
-
process.exit(1);
|
|
102
|
-
});
|
|
103
|
-
|
|
104
94
|
// src/server.ts
|
|
105
|
-
var
|
|
106
|
-
|
|
95
|
+
var server = createMcpServer({ name: "mono-rele2-core", version: "1.0.0" }, [
|
|
96
|
+
echoTool,
|
|
97
|
+
timestampTool,
|
|
98
|
+
envTool,
|
|
99
|
+
uuidTool
|
|
100
|
+
]);
|
|
101
|
+
startServer(server).catch((err) => {
|
|
107
102
|
console.error("[core] server error:", err);
|
|
108
103
|
process.exit(1);
|
|
109
104
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@julong/mono-rele2-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.0",
|
|
4
4
|
"description": "Use this skill to invoke core system utility functions via the mono-rele2-core CLI. Handles message echo, UTC timestamp generation, and environment variable lookup.",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"type": "module",
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"scripts": {
|
|
24
24
|
"build": "tsup",
|
|
25
25
|
"typecheck": "tsc --noEmit",
|
|
26
|
-
"clean": "rimraf dist"
|
|
26
|
+
"clean": "rimraf dist",
|
|
27
|
+
"readme": "node ../common/build/update-readme.mjs"
|
|
27
28
|
},
|
|
28
29
|
"dependencies": {
|
|
29
30
|
"@modelcontextprotocol/sdk": "^1.29.0",
|