@julong/mono-rele2-core 1.4.0 → 1.6.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 -1
- package/dist/cli.js +9 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +17 -7
- package/dist/server.js +10 -1
- package/dist/skills/{mono-rele2-core → mono-rele2-core-cli}/skill.md +18 -9
- package/package.json +4 -5
package/README.md
CHANGED
|
@@ -87,10 +87,22 @@ mono-rele2-core envTool HOME # /Users/julong
|
|
|
87
87
|
mono-rele2-core envTool NODE_ENV # development
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
+
#### `uuidTool`
|
|
91
|
+
|
|
92
|
+
Generates a random UUID v4.
|
|
93
|
+
|
|
94
|
+
```sh
|
|
95
|
+
mono-rele2-core uuidTool
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
```sh
|
|
99
|
+
mono-rele2-core uuidTool # 550e8400-e29b-41d4-a716-446655440000
|
|
100
|
+
```
|
|
101
|
+
|
|
90
102
|
<!-- SKILLS:END -->
|
|
91
103
|
|
|
92
104
|
## MCP Server
|
|
93
105
|
|
|
94
106
|
```sh
|
|
95
|
-
|
|
107
|
+
npx -y @julong/mono-rele2-core
|
|
96
108
|
```
|
package/dist/cli.js
CHANGED
|
@@ -71,6 +71,7 @@ import { z as z2 } from "zod";
|
|
|
71
71
|
|
|
72
72
|
// src/tools/system.ts
|
|
73
73
|
import { z as z3 } from "zod";
|
|
74
|
+
import { randomUUID } from "crypto";
|
|
74
75
|
var tools = {
|
|
75
76
|
echoTool: toolDef({
|
|
76
77
|
name: "echo",
|
|
@@ -108,11 +109,19 @@ var tools = {
|
|
|
108
109
|
{ args: ["NODE_ENV"], result: "development" }
|
|
109
110
|
],
|
|
110
111
|
guidelines: ["`envTool` returns an empty string when the variable is not set"]
|
|
112
|
+
}),
|
|
113
|
+
uuidTool: toolDef({
|
|
114
|
+
name: "uuid",
|
|
115
|
+
description: "Generates a random UUID v4",
|
|
116
|
+
inputSchema: {},
|
|
117
|
+
handler: async () => text(randomUUID()),
|
|
118
|
+
examples: [{ args: [], result: "550e8400-e29b-41d4-a716-446655440000" }]
|
|
111
119
|
})
|
|
112
120
|
};
|
|
113
121
|
var echoTool = defineTool(tools.echoTool);
|
|
114
122
|
var timestampTool = defineTool(tools.timestampTool);
|
|
115
123
|
var envTool = defineTool(tools.envTool);
|
|
124
|
+
var uuidTool = defineTool(tools.uuidTool);
|
|
116
125
|
|
|
117
126
|
// src/cli.ts
|
|
118
127
|
runCli(tools).catch(handleCliError);
|
package/dist/index.d.ts
CHANGED
|
@@ -67,6 +67,14 @@ declare const tools: {
|
|
|
67
67
|
examples?: ToolExample[];
|
|
68
68
|
guidelines?: string[];
|
|
69
69
|
};
|
|
70
|
+
uuidTool: {
|
|
71
|
+
name: string;
|
|
72
|
+
description: string;
|
|
73
|
+
inputSchema: {};
|
|
74
|
+
handler: (input: Record<string, never>) => Promise<ToolResult>;
|
|
75
|
+
examples?: ToolExample[];
|
|
76
|
+
guidelines?: string[];
|
|
77
|
+
};
|
|
70
78
|
};
|
|
71
79
|
|
|
72
80
|
declare function createCoreServer(): _modelcontextprotocol_sdk_server_mcp_js.McpServer;
|
package/dist/index.js
CHANGED
|
@@ -97,7 +97,7 @@ function renderExamples(binName, tools2) {
|
|
|
97
97
|
if (!tool.examples) continue;
|
|
98
98
|
for (const ex of tool.examples) {
|
|
99
99
|
const cmd = [binName, key, ...ex.args].join(" ");
|
|
100
|
-
lines.push(`- \`${cmd}\`
|
|
100
|
+
lines.push(`- \`${cmd}\` => \`${ex.result}\``);
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
return lines.join("\n");
|
|
@@ -163,17 +163,18 @@ function renderReadmeSkill(binName, key, tool) {
|
|
|
163
163
|
${lines.join("\n")}
|
|
164
164
|
\`\`\``;
|
|
165
165
|
}
|
|
166
|
+
const tableBlock = rows ? `
|
|
167
|
+
|
|
168
|
+
| arg | type | description |
|
|
169
|
+
|-----|------|-------------|
|
|
170
|
+
${rows}` : "";
|
|
166
171
|
return `#### \`${key}\`
|
|
167
172
|
|
|
168
173
|
${tool.description}.
|
|
169
174
|
|
|
170
175
|
\`\`\`sh
|
|
171
176
|
${usage}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
| arg | type | description |
|
|
175
|
-
|-----|------|-------------|
|
|
176
|
-
${rows}${exampleBlock}`;
|
|
177
|
+
\`\`\`${tableBlock}${exampleBlock}`;
|
|
177
178
|
}
|
|
178
179
|
function describeReadmeType(schema) {
|
|
179
180
|
let inner = schema;
|
|
@@ -209,6 +210,7 @@ function describeReadmeDesc(schema) {
|
|
|
209
210
|
|
|
210
211
|
// src/tools/system.ts
|
|
211
212
|
import { z as z3 } from "zod";
|
|
213
|
+
import { randomUUID } from "crypto";
|
|
212
214
|
var tools = {
|
|
213
215
|
echoTool: toolDef({
|
|
214
216
|
name: "echo",
|
|
@@ -246,17 +248,25 @@ var tools = {
|
|
|
246
248
|
{ args: ["NODE_ENV"], result: "development" }
|
|
247
249
|
],
|
|
248
250
|
guidelines: ["`envTool` returns an empty string when the variable is not set"]
|
|
251
|
+
}),
|
|
252
|
+
uuidTool: toolDef({
|
|
253
|
+
name: "uuid",
|
|
254
|
+
description: "Generates a random UUID v4",
|
|
255
|
+
inputSchema: {},
|
|
256
|
+
handler: async () => text(randomUUID()),
|
|
257
|
+
examples: [{ args: [], result: "550e8400-e29b-41d4-a716-446655440000" }]
|
|
249
258
|
})
|
|
250
259
|
};
|
|
251
260
|
var echoTool = defineTool(tools.echoTool);
|
|
252
261
|
var timestampTool = defineTool(tools.timestampTool);
|
|
253
262
|
var envTool = defineTool(tools.envTool);
|
|
263
|
+
var uuidTool = defineTool(tools.uuidTool);
|
|
254
264
|
|
|
255
265
|
// src/index.ts
|
|
256
266
|
function createCoreServer() {
|
|
257
267
|
return createMcpServer(
|
|
258
268
|
{ name: "mono-rele2-core", version: "1.0.0" },
|
|
259
|
-
[echoTool, timestampTool, envTool]
|
|
269
|
+
[echoTool, timestampTool, envTool, uuidTool]
|
|
260
270
|
);
|
|
261
271
|
}
|
|
262
272
|
export {
|
package/dist/server.js
CHANGED
|
@@ -39,6 +39,7 @@ import { z as z2 } from "zod";
|
|
|
39
39
|
|
|
40
40
|
// src/tools/system.ts
|
|
41
41
|
import { z as z3 } from "zod";
|
|
42
|
+
import { randomUUID } from "crypto";
|
|
42
43
|
var tools = {
|
|
43
44
|
echoTool: toolDef({
|
|
44
45
|
name: "echo",
|
|
@@ -76,17 +77,25 @@ var tools = {
|
|
|
76
77
|
{ args: ["NODE_ENV"], result: "development" }
|
|
77
78
|
],
|
|
78
79
|
guidelines: ["`envTool` returns an empty string when the variable is not set"]
|
|
80
|
+
}),
|
|
81
|
+
uuidTool: toolDef({
|
|
82
|
+
name: "uuid",
|
|
83
|
+
description: "Generates a random UUID v4",
|
|
84
|
+
inputSchema: {},
|
|
85
|
+
handler: async () => text(randomUUID()),
|
|
86
|
+
examples: [{ args: [], result: "550e8400-e29b-41d4-a716-446655440000" }]
|
|
79
87
|
})
|
|
80
88
|
};
|
|
81
89
|
var echoTool = defineTool(tools.echoTool);
|
|
82
90
|
var timestampTool = defineTool(tools.timestampTool);
|
|
83
91
|
var envTool = defineTool(tools.envTool);
|
|
92
|
+
var uuidTool = defineTool(tools.uuidTool);
|
|
84
93
|
|
|
85
94
|
// src/index.ts
|
|
86
95
|
function createCoreServer() {
|
|
87
96
|
return createMcpServer(
|
|
88
97
|
{ name: "mono-rele2-core", version: "1.0.0" },
|
|
89
|
-
[echoTool, timestampTool, envTool]
|
|
98
|
+
[echoTool, timestampTool, envTool, uuidTool]
|
|
90
99
|
);
|
|
91
100
|
}
|
|
92
101
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: mono-rele2-core
|
|
2
|
+
name: mono-rele2-core-cli
|
|
3
3
|
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.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# mono-rele2-core
|
|
6
|
+
# mono-rele2-core-cli
|
|
7
7
|
|
|
8
8
|
```sh
|
|
9
|
-
mono-rele2-core <skillName> [...args]
|
|
9
|
+
mono-rele2-core-cli <skillName> [...args]
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
## Skills
|
|
@@ -35,17 +35,26 @@ Returns the value of an environment variable
|
|
|
35
35
|
|-----|-------------|
|
|
36
36
|
| `key` | Environment variable name |
|
|
37
37
|
|
|
38
|
+
### uuidTool
|
|
39
|
+
|
|
40
|
+
Generates a random UUID v4
|
|
41
|
+
|
|
42
|
+
| arg | description |
|
|
43
|
+
|-----|-------------|
|
|
44
|
+
|
|
45
|
+
|
|
38
46
|
## Examples
|
|
39
47
|
|
|
40
|
-
- `mono-rele2-core echoTool "hello world"`
|
|
41
|
-
- `mono-rele2-core timestampTool`
|
|
42
|
-
- `mono-rele2-core timestampTool unix`
|
|
43
|
-
- `mono-rele2-core envTool HOME`
|
|
44
|
-
- `mono-rele2-core envTool NODE_ENV`
|
|
48
|
+
- `mono-rele2-core-cli echoTool "hello world"` => `hello world`
|
|
49
|
+
- `mono-rele2-core-cli timestampTool` => `2026-05-02T00:00:00.000Z`
|
|
50
|
+
- `mono-rele2-core-cli timestampTool unix` => `1746144000000`
|
|
51
|
+
- `mono-rele2-core-cli envTool HOME` => `/Users/julong`
|
|
52
|
+
- `mono-rele2-core-cli envTool NODE_ENV` => `development`
|
|
53
|
+
- `mono-rele2-core-cli uuidTool` => `550e8400-e29b-41d4-a716-446655440000`
|
|
45
54
|
|
|
46
55
|
## Guidelines
|
|
47
56
|
|
|
48
57
|
- Arguments are positional — pass them in the order listed in each skill's table
|
|
49
58
|
- Optional args with defaults may be omitted
|
|
50
59
|
- `envTool` returns an empty string when the variable is not set
|
|
51
|
-
- Run `mono-rele2-core` with no args to list all available skills
|
|
60
|
+
- Run `mono-rele2-core-cli` with no args to list all available skills
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@julong/mono-rele2-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.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",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"bin": {
|
|
14
|
-
"
|
|
15
|
-
"mono-rele2-core": "./dist/cli.js"
|
|
14
|
+
"mono-rele2-core": "./dist/server.js",
|
|
15
|
+
"mono-rele2-core-cli": "./dist/cli.js"
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
18
|
"dist"
|
|
@@ -23,8 +23,7 @@
|
|
|
23
23
|
"scripts": {
|
|
24
24
|
"build": "tsup",
|
|
25
25
|
"typecheck": "tsc --noEmit",
|
|
26
|
-
"clean": "rimraf dist"
|
|
27
|
-
"update-readme": "node ../common/build/update-readme.mjs"
|
|
26
|
+
"clean": "rimraf dist"
|
|
28
27
|
},
|
|
29
28
|
"dependencies": {
|
|
30
29
|
"@modelcontextprotocol/sdk": "^1.29.0",
|