@julong/mono-rele2-core 1.20.0 → 1.21.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 CHANGED
@@ -2,6 +2,29 @@
2
2
 
3
3
  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
+ ## MCP Server
6
+
7
+ ### Configuration
8
+
9
+ Add to your MCP client config:
10
+
11
+ ```json
12
+ {
13
+ "mcpServers": {
14
+ "@julong/mono-rele2-core": {
15
+ "command": "npx",
16
+ "args": ["-y", "@julong/mono-rele2-core"]
17
+ }
18
+ }
19
+ }
20
+ ```
21
+
22
+ ### Run
23
+
24
+ ```sh
25
+ npx -y @julong/mono-rele2-core
26
+ ```
27
+
5
28
  ## CLI
6
29
 
7
30
  ### Installation
@@ -9,7 +32,7 @@ Use this skill to invoke core system utility functions via the mono-rele2-core C
9
32
  ```sh
10
33
  npm install -g @julong/mono-rele2-core
11
34
  # or
12
- npx @julong/mono-rele2-core-cli <toolName> [...args]
35
+ npx mono-rele2-core-cli <toolName> [...args]
13
36
  ```
14
37
 
15
38
  ### Usage
@@ -24,72 +47,158 @@ Run without arguments to list all available tools:
24
47
  mono-rele2-core-cli
25
48
  ```
26
49
 
27
- ### Tools
50
+ ## Tools API Reference
51
+
52
+ ### `echo(message)`
28
53
 
29
- #### `echoTool`
54
+ **Signature**
55
+
56
+ ```typescript
57
+ function echo(message: string): string
58
+ ```
30
59
 
31
60
  Returns the message as-is.
32
61
 
62
+
63
+ **Parameters**
64
+
65
+ | Name | Type | Description |
66
+ |------|------|-------------|
67
+ | `message` | `string` | Message to echo |
68
+
69
+
70
+ **Returns**
71
+
72
+ `string`
73
+
74
+
75
+ **CLI**
76
+
33
77
  ```sh
34
78
  mono-rele2-core-cli echoTool <message>
35
79
  ```
36
80
 
37
- | arg | type | description |
38
- |-----|------|-------------|
39
- | `message` | string | Message to echo |
81
+
82
+
83
+ **Examples**
40
84
 
41
85
  ```sh
42
- mono-rele2-core-cli echoTool "hello world" # hello world
86
+ mono-rele2-core-cli echoTool "hello world"
87
+ # → hello world
43
88
  ```
44
89
 
45
- #### `timestampTool`
90
+ ### `timestamp(format)`
91
+
92
+ **Signature**
93
+
94
+ ```typescript
95
+ function timestamp(format?: `iso` \| `unix`): string
96
+ ```
46
97
 
47
98
  Returns the current UTC timestamp.
48
99
 
100
+
101
+ **Parameters**
102
+
103
+ | Name | Type | Description |
104
+ |------|------|-------------|
105
+ | `format` | ``iso` \| `unix`` | Timestamp format (default: `iso`) |
106
+
107
+
108
+ **Returns**
109
+
110
+ `string`
111
+
112
+
113
+ **CLI**
114
+
49
115
  ```sh
50
116
  mono-rele2-core-cli timestampTool [format]
51
117
  ```
52
118
 
53
- | arg | type | description |
54
- |-----|------|-------------|
55
- | `format` | `iso` \| `unix` | Timestamp format (default: `iso`) |
119
+
120
+
121
+ **Examples**
56
122
 
57
123
  ```sh
58
- mono-rele2-core-cli timestampTool # 2026-05-02T00:00:00.000Z
59
- mono-rele2-core-cli timestampTool unix # 1746144000000
124
+ mono-rele2-core-cli timestampTool
125
+ # → 2026-05-02T00:00:00.000Z
60
126
  ```
127
+ ```sh
128
+ mono-rele2-core-cli timestampTool unix
129
+ # → 1746144000000
130
+ ```
131
+
132
+ ### `env(key)`
61
133
 
62
- #### `envTool`
134
+ **Signature**
135
+
136
+ ```typescript
137
+ function env(key: string): string
138
+ ```
63
139
 
64
140
  Returns the value of an environment variable.
65
141
 
142
+
143
+ **Parameters**
144
+
145
+ | Name | Type | Description |
146
+ |------|------|-------------|
147
+ | `key` | `string` | Environment variable name |
148
+
149
+
150
+ **Returns**
151
+
152
+ `string`
153
+
154
+
155
+ **CLI**
156
+
66
157
  ```sh
67
158
  mono-rele2-core-cli envTool <key>
68
159
  ```
69
160
 
70
- | arg | type | description |
71
- |-----|------|-------------|
72
- | `key` | string | Environment variable name |
161
+
162
+
163
+ **Examples**
73
164
 
74
165
  ```sh
75
- mono-rele2-core-cli envTool HOME # /Users/julong
76
- mono-rele2-core-cli envTool NODE_ENV # development
166
+ mono-rele2-core-cli envTool HOME
167
+ # /Users/julong
77
168
  ```
169
+ ```sh
170
+ mono-rele2-core-cli envTool NODE_ENV
171
+ # → development
172
+ ```
173
+
174
+ ### `uuid()`
78
175
 
79
- #### `uuidTool`
176
+ **Signature**
177
+
178
+ ```typescript
179
+ function uuid(): string
180
+ ```
80
181
 
81
182
  Generates a random UUID v4.
82
183
 
184
+
185
+
186
+ **Returns**
187
+
188
+ `string`
189
+
190
+
191
+ **CLI**
192
+
83
193
  ```sh
84
194
  mono-rele2-core-cli uuidTool
85
195
  ```
86
196
 
87
- ```sh
88
- mono-rele2-core-cli uuidTool # 550e8400-e29b-41d4-a716-446655440000
89
- ```
90
197
 
91
- ## MCP Server
198
+
199
+ **Examples**
92
200
 
93
201
  ```sh
94
- npx -y @julong/mono-rele2-core
202
+ mono-rele2-core-cli uuidTool
203
+ # → 550e8400-e29b-41d4-a716-446655440000
95
204
  ```
package/dist/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- function s(e){return{content:[{type:"text",text:e}]}}import{McpServer as S}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as $}from"@modelcontextprotocol/sdk/server/stdio.js";import{z as c}from"zod";async function u(e){let[,,n,...f]=process.argv;(!n||!(n in e))&&(n&&console.error(`Unknown skill: "${n}"
3
- `),process.exit(n?1:0));let r=e[n],i=Object.keys(r.inputSchema),a={};for(let o=0;o<i.length;o++){let l=f[o];if(l!==void 0)try{a[i[o]]=JSON.parse(l)}catch{a[i[o]]=l}}let m=c.object(r.inputSchema).parse(a),y=await r.handler(m);for(let o of y.content)o.type==="text"&&console.log(o.text)}function d(e){e instanceof c.ZodError?console.error("Validation error:",e.issues.map(n=>`${n.path.join(".")}: ${n.message}`).join(", ")):console.error("Error:",e instanceof Error?e.message:String(e)),process.exit(1)}import{z as A}from"zod";import{z as p}from"zod";import{randomUUID as g}from"crypto";var t={echoTool:{name:"echo",description:"Returns the message as-is",inputSchema:{message:p.string().describe("Message to echo")},handler:async({message:e})=>s(e),examples:[{args:['"hello world"'],result:"hello world"}]},timestampTool:{name:"timestamp",description:"Returns the current UTC timestamp",inputSchema:{format:p.enum(["iso","unix"]).default("iso").describe("Timestamp format")},handler:async({format:e})=>{let n=e==="unix"?String(Date.now()):new Date().toISOString();return s(n)},examples:[{args:[],result:"2026-05-02T00:00:00.000Z"},{args:["unix"],result:"1746144000000"}]},envTool:{name:"env",description:"Returns the value of an environment variable",inputSchema:{key:p.string().describe("Environment variable name")},handler:async({key:e})=>s(process.env[e]??""),examples:[{args:["HOME"],result:"/Users/julong"},{args:["NODE_ENV"],result:"development"}],guidelines:["`envTool` returns an empty string when the variable is not set"]},uuidTool:{name:"uuid",description:"Generates a random UUID v4",inputSchema:{},handler:async()=>s(g()),examples:[{args:[],result:"550e8400-e29b-41d4-a716-446655440000"}]}},L=t.echoTool,G=t.timestampTool,K=t.envTool,q=t.uuidTool;u(t).catch(d);
2
+ function s(n){return{content:[{type:"text",text:n}]}}import{McpServer as $}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as x}from"@modelcontextprotocol/sdk/server/stdio.js";import{z as c}from"zod";async function u(n){let[,,e,...f]=process.argv;(!e||!(e in n))&&(e&&console.error(`Unknown skill: "${e}"
3
+ `),process.exit(e?1:0));let r=n[e],i=Object.keys(r.inputSchema),a={};for(let t=0;t<i.length;t++){let p=f[t];if(p!==void 0)try{a[i[t]]=JSON.parse(p)}catch{a[i[t]]=p}}let m=c.object(r.inputSchema).parse(a),y=await r.handler(m);for(let t of y.content)t.type==="text"&&console.log(t.text)}function d(n){n instanceof c.ZodError?console.error("Validation error:",n.issues.map(e=>`${e.path.join(".")}: ${e.message}`).join(", ")):console.error("Error:",n instanceof Error?n.message:String(n)),process.exit(1)}import{z}from"zod";import{z as l}from"zod";import{randomUUID as g}from"crypto";var o={echoTool:{name:"echo",description:"Returns the message as-is",inputSchema:{message:l.string().describe("Message to echo")},handler:async({message:n})=>s(n),examples:[{args:['"hello world"'],result:"hello world"}]},timestampTool:{name:"timestamp",description:"Returns the current UTC timestamp",inputSchema:{format:l.enum(["iso","unix"]).default("iso").describe("Timestamp format")},handler:async({format:n})=>{let e=n==="unix"?String(Date.now()):new Date().toISOString();return s(e)},examples:[{args:[],result:"2026-05-02T00:00:00.000Z"},{args:["unix"],result:"1746144000000"}]},envTool:{name:"env",description:"Returns the value of an environment variable",inputSchema:{key:l.string().describe("Environment variable name")},handler:async({key:n})=>s(process.env[n]??""),examples:[{args:["HOME"],result:"/Users/julong"},{args:["NODE_ENV"],result:"development"}],guidelines:["`envTool` returns an empty string when the variable is not set"]},uuidTool:{name:"uuid",description:"Generates a random UUID v4",inputSchema:{},handler:async()=>s(g()),examples:[{args:[],result:"550e8400-e29b-41d4-a716-446655440000"}]}},J=o.echoTool,G=o.timestampTool,K=o.envTool,q=o.uuidTool;u(o).catch(d);
package/dist/index.d.ts CHANGED
@@ -15,6 +15,8 @@ type AnyToolDef = {
15
15
  guidelines?: string[];
16
16
  typeLabels?: Record<string, string>;
17
17
  typeDefs?: Record<string, string>;
18
+ returnType?: string;
19
+ returnDescription?: string;
18
20
  };
19
21
 
20
22
  type SkillTools = Record<string, AnyToolDef>;
@@ -46,6 +48,8 @@ declare const tools: {
46
48
  typeDefs?: {
47
49
  readonly message?: string | undefined;
48
50
  } | undefined;
51
+ returnType?: string;
52
+ returnDescription?: string;
49
53
  };
50
54
  timestampTool: {
51
55
  name: string;
@@ -67,6 +71,8 @@ declare const tools: {
67
71
  typeDefs?: {
68
72
  readonly format?: string | undefined;
69
73
  } | undefined;
74
+ returnType?: string;
75
+ returnDescription?: string;
70
76
  };
71
77
  envTool: {
72
78
  name: string;
@@ -85,6 +91,8 @@ declare const tools: {
85
91
  typeDefs?: {
86
92
  readonly key?: string | undefined;
87
93
  } | undefined;
94
+ returnType?: string;
95
+ returnDescription?: string;
88
96
  };
89
97
  uuidTool: {
90
98
  name: string;
@@ -95,6 +103,8 @@ declare const tools: {
95
103
  guidelines?: string[];
96
104
  typeLabels?: {} | undefined;
97
105
  typeDefs?: {} | undefined;
106
+ returnType?: string;
107
+ returnDescription?: string;
98
108
  };
99
109
  };
100
110
 
package/dist/index.js CHANGED
@@ -1,63 +1,63 @@
1
- function f(s){return{content:[{type:"text",text:s}]}}import{McpServer as V}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as P}from"@modelcontextprotocol/sdk/server/stdio.js";import{z as L}from"zod";import{z as r}from"zod";function $(s){let{binName:o,description:e,tools:t}=s;return`---
2
- name: ${o}
3
- description: ${e}
1
+ function f(s){return{content:[{type:"text",text:s}]}}import{McpServer as U}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as L}from"@modelcontextprotocol/sdk/server/stdio.js";import{z as J}from"zod";import{z as r}from"zod";function x(s){let{binName:t,description:n,tools:o}=s;return`---
2
+ name: ${t}
3
+ description: ${n}
4
4
  ---
5
5
 
6
- # ${o}
6
+ # ${t}
7
7
 
8
8
  \`\`\`sh
9
- ${o} <toolName> [...args]
9
+ ${t} <toolName> [...args]
10
10
  \`\`\`
11
11
 
12
12
  ## Skills
13
13
 
14
- ${b(t)}
14
+ ${b(o)}
15
15
 
16
16
  ## Examples
17
17
 
18
- ${z(o,t)}
18
+ ${D(t,o)}
19
19
 
20
20
  ## Guidelines
21
21
 
22
- ${j(o,t)}
23
- `}function b(s){return Object.entries(s).map(([o,e])=>{let t=Object.entries(e.inputSchema).map(([a,n])=>{let l=e.typeLabels?.[a];return`| \`${a}\` | ${w(n,l)} |`}).join(`
24
- `),i=e.typeDefs?Object.entries(e.typeDefs).map(([a,n])=>`
22
+ ${w(t,o)}
23
+ `}function b(s){return Object.entries(s).map(([t,n])=>{let o=Object.entries(n.inputSchema).map(([a,e])=>{let l=n.typeLabels?.[a];return`| \`${a}\` | ${j(e,l)} |`}).join(`
24
+ `),i=n.typeDefs?Object.entries(n.typeDefs).map(([a,e])=>`
25
25
 
26
26
  **\`${a}\`** type definition:
27
27
  \`\`\`typescript
28
- ${n}
29
- \`\`\``).join(""):"";return`### ${o}
28
+ ${e}
29
+ \`\`\``).join(""):"";return`### ${t}
30
30
 
31
- ${e.description}
31
+ ${n.description}
32
32
 
33
33
  | arg | description |
34
34
  |-----|-------------|
35
- ${t}${i}`}).join(`
35
+ ${o}${i}`}).join(`
36
36
 
37
- `)}function w(s,o){let e=s.description??"",t=s,i,a=!1;for(;t instanceof r.ZodOptional||t instanceof r.ZodDefault;){if(t instanceof r.ZodDefault){let l=t.def.defaultValue;i=typeof l=="function"?l():l}t instanceof r.ZodOptional&&(a=!0),t=t.unwrap()}let n=[];if(o&&n.push(`Type: ${o}`),e&&n.push(e),t instanceof r.ZodEnum){let l=t.options.map(m=>`\`${m}\``).join(" \\| ");n.push(l)}return i!==void 0?n.push(`default: \`${String(i)}\``):a&&n.push("optional"),n.join(" \u2014 ")}function z(s,o){let e=[];for(let[t,i]of Object.entries(o))if(i.examples)for(let a of i.examples){let n=[s,t,...a.args].join(" ");e.push(`- \`${n}\` => \`${a.result}\``)}return e.join(`
38
- `)}function j(s,o){let e=[],t=new Set,i=n=>{t.has(n)||(t.add(n),e.push(n))};i("Arguments are positional \u2014 pass them in the order listed in each skill's table");let a=Object.values(o).flatMap(n=>Object.values(n.inputSchema));a.some(n=>h(n,r.ZodNumber))&&i("Numeric args are auto-parsed \u2014 pass as plain numbers (e.g. `10`)"),a.some(n=>h(n,r.ZodArray))&&i('Array args must be valid JSON \u2014 wrap in single quotes on Unix shells (e.g. `\'["a","b"]\'`)'),a.some(n=>n instanceof r.ZodOptional||n instanceof r.ZodDefault)&&i("Optional args with defaults may be omitted");for(let n of Object.values(o))if(n.guidelines)for(let l of n.guidelines)i(l);return i(`Run \`${s}\` with no args to list all available skills`),e.map(n=>`- ${n}`).join(`
39
- `)}function h(s,o){let e=s;for(;e instanceof r.ZodOptional||e instanceof r.ZodDefault;)e=e.unwrap();return e instanceof o}function A(s){let{binName:o,tools:e}=s;return Object.entries(e).map(([t,i])=>D(o,t,i)).join(`
37
+ `)}function j(s,t){let n=s.description??"",o=s,i,a=!1;for(;o instanceof r.ZodOptional||o instanceof r.ZodDefault;){if(o instanceof r.ZodDefault){let l=o.def.defaultValue;i=typeof l=="function"?l():l}o instanceof r.ZodOptional&&(a=!0),o=o.unwrap()}let e=[];if(t&&e.push(`Type: ${t}`),n&&e.push(n),o instanceof r.ZodEnum){let l=o.options.map(m=>`\`${m}\``).join(" \\| ");e.push(l)}return i!==void 0?e.push(`default: \`${String(i)}\``):a&&e.push("optional"),e.join(" \u2014 ")}function D(s,t){let n=[];for(let[o,i]of Object.entries(t))if(i.examples)for(let a of i.examples){let e=[s,o,...a.args].join(" ");n.push(`- \`${e}\` => \`${a.result}\``)}return n.join(`
38
+ `)}function w(s,t){let n=[],o=new Set,i=e=>{o.has(e)||(o.add(e),n.push(e))};i("Arguments are positional \u2014 pass them in the order listed in each skill's table");let a=Object.values(t).flatMap(e=>Object.values(e.inputSchema));a.some(e=>h(e,r.ZodNumber))&&i("Numeric args are auto-parsed \u2014 pass as plain numbers (e.g. `10`)"),a.some(e=>h(e,r.ZodArray))&&i('Array args must be valid JSON \u2014 wrap in single quotes on Unix shells (e.g. `\'["a","b"]\'`)'),a.some(e=>e instanceof r.ZodOptional||e instanceof r.ZodDefault)&&i("Optional args with defaults may be omitted");for(let e of Object.values(t))if(e.guidelines)for(let l of e.guidelines)i(l);return i(`Run \`${s}\` with no args to list all available skills`),n.map(e=>`- ${e}`).join(`
39
+ `)}function h(s,t){let n=s;for(;n instanceof r.ZodOptional||n instanceof r.ZodDefault;)n=n.unwrap();return n instanceof t}function z(s){let{binName:t,tools:n}=s;return Object.entries(n).map(([o,i])=>A(t,o,i)).join(`
40
40
 
41
- `)}function D(s,o,e){let t=Object.entries(e.inputSchema),i=t.map(([p,c])=>c instanceof r.ZodOptional||c instanceof r.ZodDefault?`[${p}]`:`<${p}>`).join(" "),a=[s,o,i].filter(Boolean).join(" "),n=t.map(([p,c])=>{let y=e.typeLabels?.[p],u=S(c,y),g=O(c);return`| \`${p}\` | ${u} | ${g} |`}).join(`
42
- `),l=e.examples??[],m="";if(l.length>0){let p=l.map(u=>[s,o,...u.args].join(" ")),c=Math.max(...p.map(u=>u.length));m=`
41
+ `)}function A(s,t,n){let o=Object.entries(n.inputSchema),i=o.map(([p,c])=>c instanceof r.ZodOptional||c instanceof r.ZodDefault?`[${p}]`:`<${p}>`).join(" "),a=[s,t,i].filter(Boolean).join(" "),e=o.map(([p,c])=>{let y=n.typeLabels?.[p],u=Z(c,y),g=O(c);return`| \`${p}\` | ${u} | ${g} |`}).join(`
42
+ `),l=n.examples??[],m="";if(l.length>0){let p=l.map(u=>[s,t,...u.args].join(" ")),c=Math.max(...p.map(u=>u.length));m=`
43
43
 
44
44
  \`\`\`sh
45
45
  ${l.map((u,g)=>`${p[g].padEnd(c)} # ${u.result}`).join(`
46
46
  `)}
47
- \`\`\``}let Z=e.typeDefs?Object.entries(e.typeDefs).map(([p,c])=>`
47
+ \`\`\``}let $=n.typeDefs?Object.entries(n.typeDefs).map(([p,c])=>`
48
48
 
49
49
  **\`${p}\`** type definition:
50
50
 
51
51
  \`\`\`typescript
52
52
  ${c}
53
- \`\`\``).join(""):"",x=n?`
53
+ \`\`\``).join(""):"",S=e?`
54
54
 
55
55
  | arg | type | description |
56
56
  |-----|------|-------------|
57
- ${n}`:"";return`#### \`${o}\`
57
+ ${e}`:"";return`#### \`${t}\`
58
58
 
59
- ${e.description}.
59
+ ${n.description}.
60
60
 
61
61
  \`\`\`sh
62
62
  ${a}
63
- \`\`\`${x}${Z}${m}`}function S(s,o){if(o)return o;let e=s;for(;e instanceof r.ZodOptional||e instanceof r.ZodDefault;)e=e.unwrap();return e instanceof r.ZodEnum?e.options.map(t=>`\`${t}\``).join(" \\| "):e instanceof r.ZodNumber?"number":e instanceof r.ZodString?"string":e instanceof r.ZodBoolean?"boolean":e instanceof r.ZodArray?"JSON string (array)":e instanceof r.ZodUnion?e.options.map(i=>S(i)).join(" \\| "):e instanceof r.ZodRecord?"JSON object":"unknown"}function O(s){let o=s.description??"",e=s,t,i=!1;for(;e instanceof r.ZodOptional||e instanceof r.ZodDefault;){if(e instanceof r.ZodDefault){let a=e.def.defaultValue;t=typeof a=="function"?a():a}e instanceof r.ZodOptional&&(i=!0),e=e.unwrap()}return t!==void 0?`${o} (default: \`${String(t)}\`)`:i?`${o} (optional)`:o}import{z as T}from"zod";import{randomUUID as k}from"crypto";var d={echoTool:{name:"echo",description:"Returns the message as-is",inputSchema:{message:T.string().describe("Message to echo")},handler:async({message:s})=>f(s),examples:[{args:['"hello world"'],result:"hello world"}]},timestampTool:{name:"timestamp",description:"Returns the current UTC timestamp",inputSchema:{format:T.enum(["iso","unix"]).default("iso").describe("Timestamp format")},handler:async({format:s})=>{let o=s==="unix"?String(Date.now()):new Date().toISOString();return f(o)},examples:[{args:[],result:"2026-05-02T00:00:00.000Z"},{args:["unix"],result:"1746144000000"}]},envTool:{name:"env",description:"Returns the value of an environment variable",inputSchema:{key:T.string().describe("Environment variable name")},handler:async({key:s})=>f(process.env[s]??""),examples:[{args:["HOME"],result:"/Users/julong"},{args:["NODE_ENV"],result:"development"}],guidelines:["`envTool` returns an empty string when the variable is not set"]},uuidTool:{name:"uuid",description:"Generates a random UUID v4",inputSchema:{},handler:async()=>f(k()),examples:[{args:[],result:"550e8400-e29b-41d4-a716-446655440000"}]}},v=d.echoTool,R=d.timestampTool,E=d.envTool,N=d.uuidTool;export{A as generateReadmeSkills,$ as generateSkillMarkdown,d as tools};
63
+ \`\`\`${S}${$}${m}`}function Z(s,t){if(t)return t;let n=s;for(;n instanceof r.ZodOptional||n instanceof r.ZodDefault;)n=n.unwrap();return n instanceof r.ZodEnum?n.options.map(o=>`\`${o}\``).join(" \\| "):n instanceof r.ZodNumber?"number":n instanceof r.ZodString?"string":n instanceof r.ZodBoolean?"boolean":n instanceof r.ZodArray?"JSON string (array)":n instanceof r.ZodUnion?n.options.map(i=>Z(i)).join(" \\| "):n instanceof r.ZodRecord?"JSON object":"unknown"}function O(s){let t=s.description??"",n=s,o,i=!1;for(;n instanceof r.ZodOptional||n instanceof r.ZodDefault;){if(n instanceof r.ZodDefault){let a=n.def.defaultValue;o=typeof a=="function"?a():a}n instanceof r.ZodOptional&&(i=!0),n=n.unwrap()}return o!==void 0?`${t} (default: \`${String(o)}\`)`:i?`${t} (optional)`:t}import{z as T}from"zod";import{randomUUID as k}from"crypto";var d={echoTool:{name:"echo",description:"Returns the message as-is",inputSchema:{message:T.string().describe("Message to echo")},handler:async({message:s})=>f(s),examples:[{args:['"hello world"'],result:"hello world"}]},timestampTool:{name:"timestamp",description:"Returns the current UTC timestamp",inputSchema:{format:T.enum(["iso","unix"]).default("iso").describe("Timestamp format")},handler:async({format:s})=>{let t=s==="unix"?String(Date.now()):new Date().toISOString();return f(t)},examples:[{args:[],result:"2026-05-02T00:00:00.000Z"},{args:["unix"],result:"1746144000000"}]},envTool:{name:"env",description:"Returns the value of an environment variable",inputSchema:{key:T.string().describe("Environment variable name")},handler:async({key:s})=>f(process.env[s]??""),examples:[{args:["HOME"],result:"/Users/julong"},{args:["NODE_ENV"],result:"development"}],guidelines:["`envTool` returns an empty string when the variable is not set"]},uuidTool:{name:"uuid",description:"Generates a random UUID v4",inputSchema:{},handler:async()=>f(k()),examples:[{args:[],result:"550e8400-e29b-41d4-a716-446655440000"}]}},v=d.echoTool,R=d.timestampTool,E=d.envTool,N=d.uuidTool;export{z as generateReadmeSkills,x as generateSkillMarkdown,d as tools};
package/dist/server.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- function o(e){return{content:[{type:"text",text:e}]}}import{McpServer as f}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as m}from"@modelcontextprotocol/sdk/server/stdio.js";function u(e,n){let c=new f(e);for(let s of n)c.registerTool(s.name,{description:s.description,inputSchema:s.inputSchema},s.handler);return c}async function d(e){let n=new m;await e.connect(n)}import{z as b}from"zod";import{z as v}from"zod";import{z as r}from"zod";import{randomUUID as y}from"crypto";var t={echoTool:{name:"echo",description:"Returns the message as-is",inputSchema:{message:r.string().describe("Message to echo")},handler:async({message:e})=>o(e),examples:[{args:['"hello world"'],result:"hello world"}]},timestampTool:{name:"timestamp",description:"Returns the current UTC timestamp",inputSchema:{format:r.enum(["iso","unix"]).default("iso").describe("Timestamp format")},handler:async({format:e})=>{let n=e==="unix"?String(Date.now()):new Date().toISOString();return o(n)},examples:[{args:[],result:"2026-05-02T00:00:00.000Z"},{args:["unix"],result:"1746144000000"}]},envTool:{name:"env",description:"Returns the value of an environment variable",inputSchema:{key:r.string().describe("Environment variable name")},handler:async({key:e})=>o(process.env[e]??""),examples:[{args:["HOME"],result:"/Users/julong"},{args:["NODE_ENV"],result:"development"}],guidelines:["`envTool` returns an empty string when the variable is not set"]},uuidTool:{name:"uuid",description:"Generates a random UUID v4",inputSchema:{},handler:async()=>o(y()),examples:[{args:[],result:"550e8400-e29b-41d4-a716-446655440000"}]}},i=t.echoTool,a=t.timestampTool,l=t.envTool,p=t.uuidTool;var g=u({name:"mono-rele2-core",version:"1.0.0"},[i,a,l,p]);d(g).catch(e=>{console.error("[core] server error:",e),process.exit(1)});
2
+ function o(n){return{content:[{type:"text",text:n}]}}import{McpServer as f}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as m}from"@modelcontextprotocol/sdk/server/stdio.js";function u(n,e){let c=new f(n);for(let s of e)c.registerTool(s.name,{description:s.description,inputSchema:s.inputSchema},s.handler);return c}async function d(n){let e=new m;await n.connect(e)}import{z as b}from"zod";import{z as w}from"zod";import{z as r}from"zod";import{randomUUID as y}from"crypto";var t={echoTool:{name:"echo",description:"Returns the message as-is",inputSchema:{message:r.string().describe("Message to echo")},handler:async({message:n})=>o(n),examples:[{args:['"hello world"'],result:"hello world"}]},timestampTool:{name:"timestamp",description:"Returns the current UTC timestamp",inputSchema:{format:r.enum(["iso","unix"]).default("iso").describe("Timestamp format")},handler:async({format:n})=>{let e=n==="unix"?String(Date.now()):new Date().toISOString();return o(e)},examples:[{args:[],result:"2026-05-02T00:00:00.000Z"},{args:["unix"],result:"1746144000000"}]},envTool:{name:"env",description:"Returns the value of an environment variable",inputSchema:{key:r.string().describe("Environment variable name")},handler:async({key:n})=>o(process.env[n]??""),examples:[{args:["HOME"],result:"/Users/julong"},{args:["NODE_ENV"],result:"development"}],guidelines:["`envTool` returns an empty string when the variable is not set"]},uuidTool:{name:"uuid",description:"Generates a random UUID v4",inputSchema:{},handler:async()=>o(y()),examples:[{args:[],result:"550e8400-e29b-41d4-a716-446655440000"}]}},i=t.echoTool,a=t.timestampTool,p=t.envTool,l=t.uuidTool;var g=u({name:"mono-rele2-core",version:"1.0.0"},[i,a,p,l]);d(g).catch(n=>{console.error("[core] server error:",n),process.exit(1)});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@julong/mono-rele2-core",
3
- "version": "1.20.0",
3
+ "version": "1.21.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",