@julong/mono-rele2-core 1.30.0 → 1.32.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
@@ -47,6 +47,16 @@ Run without arguments to list all available tools:
47
47
  mono-rele2-core-cli
48
48
  ```
49
49
 
50
+ ## Skill Installation
51
+
52
+ Install the CLI as a reusable skill for your AI agent:
53
+
54
+ ```sh
55
+ npx skills add https://github.com/jl917/mcp-kit/tree/main/packages/core/skills
56
+ ```
57
+
58
+ This registers all tools as callable skills in your agent's environment.
59
+
50
60
  ## Tools API Reference
51
61
 
52
62
  ### `echo(message)`
package/dist/cli.cjs ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";function s(n){return{content:[{type:"text",text:n}]}}var T=require("@modelcontextprotocol/sdk/server/mcp.js"),h=require("@modelcontextprotocol/sdk/server/stdio.js");var c=require("zod");async function u(n){let[,,e,...m]=process.argv;(!e||!(e in n))&&(e&&console.error(`Unknown skill: "${e}"
3
+ `),process.exit(e?1:0));let i=n[e],a=Object.keys(i.inputSchema),p={};for(let t=0;t<a.length;t++){let l=m[t];if(l!==void 0)try{p[a[t]]=JSON.parse(l)}catch{p[a[t]]=l}}let y=c.z.object(i.inputSchema).parse(p),g=await i.handler(y);for(let t of g.content)t.type==="text"&&console.log(t.text)}function d(n){n instanceof c.z.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)}var Z=require("zod");var r=require("zod"),f=require("crypto"),o={echoTool:{name:"echo",description:"Returns the message as-is",inputSchema:{message:r.z.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:r.z.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:r.z.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((0,f.randomUUID)()),examples:[{args:[],result:"550e8400-e29b-41d4-a716-446655440000"}]}},B=o.echoTool,U=o.timestampTool,V=o.envTool,P=o.uuidTool;u(o).catch(d);
package/dist/cli.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
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}"
2
+ function s(n){return{content:[{type:"text",text:n}]}}import{McpServer as S}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
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.cjs ADDED
@@ -0,0 +1,63 @@
1
+ "use strict";var h=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var z=Object.getOwnPropertyNames;var A=Object.prototype.hasOwnProperty;var O=(o,e)=>{for(var n in e)h(o,n,{get:e[n],enumerable:!0})},k=(o,e,n,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of z(e))!A.call(o,r)&&r!==n&&h(o,r,{get:()=>e[r],enumerable:!(t=w(e,r))||t.enumerable});return o};var v=o=>k(h({},"__esModule",{value:!0}),o);var K={};O(K,{generateReadmeSkills:()=>x,generateSkillMarkdown:()=>S,tools:()=>d});module.exports=v(K);function f(o){return{content:[{type:"text",text:o}]}}var R=require("@modelcontextprotocol/sdk/server/mcp.js"),N=require("@modelcontextprotocol/sdk/server/stdio.js");var E=require("zod");var i=require("zod");function S(o){let{binName:e,description:n,tools:t}=o;return`---
2
+ name: ${e}
3
+ description: ${n}
4
+ ---
5
+
6
+ # ${e}
7
+
8
+ \`\`\`sh
9
+ ${e} <toolName> [...args]
10
+ \`\`\`
11
+
12
+ ## Skills
13
+
14
+ ${M(t)}
15
+
16
+ ## Examples
17
+
18
+ ${C(e,t)}
19
+
20
+ ## Guidelines
21
+
22
+ ${U(e,t)}
23
+ `}function M(o){return Object.entries(o).map(([e,n])=>{let t=Object.entries(n.inputSchema).map(([a,s])=>{let l=n.typeLabels?.[a];return`| \`${a}\` | ${B(s,l)} |`}).join(`
24
+ `),r=n.typeDefs?Object.entries(n.typeDefs).map(([a,s])=>`
25
+
26
+ **\`${a}\`** type definition:
27
+ \`\`\`typescript
28
+ ${s}
29
+ \`\`\``).join(""):"";return`### ${e}
30
+
31
+ ${n.description}
32
+
33
+ | arg | description |
34
+ |-----|-------------|
35
+ ${t}${r}`}).join(`
36
+
37
+ `)}function B(o,e){let n=o.description??"",t=o,r,a=!1;for(;t instanceof i.z.ZodOptional||t instanceof i.z.ZodDefault;){if(t instanceof i.z.ZodDefault){let l=t.def.defaultValue;r=typeof l=="function"?l():l}t instanceof i.z.ZodOptional&&(a=!0),t=t.unwrap()}let s=[];if(e&&s.push(`Type: ${e}`),n&&s.push(n),t instanceof i.z.ZodEnum){let l=t.options.map(m=>`\`${m}\``).join(" \\| ");s.push(l)}return r!==void 0?s.push(`default: \`${String(r)}\``):a&&s.push("optional"),s.join(" \u2014 ")}function C(o,e){let n=[];for(let[t,r]of Object.entries(e))if(r.examples)for(let a of r.examples){let s=[o,t,...a.args].join(" ");n.push(`- \`${s}\` => \`${a.result}\``)}return n.join(`
38
+ `)}function U(o,e){let n=[],t=new Set,r=s=>{t.has(s)||(t.add(s),n.push(s))};r("Arguments are positional \u2014 pass them in the order listed in each skill's table");let a=Object.values(e).flatMap(s=>Object.values(s.inputSchema));a.some(s=>Z(s,i.z.ZodNumber))&&r("Numeric args are auto-parsed \u2014 pass as plain numbers (e.g. `10`)"),a.some(s=>Z(s,i.z.ZodArray))&&r('Array args must be valid JSON \u2014 wrap in single quotes on Unix shells (e.g. `\'["a","b"]\'`)'),a.some(s=>s instanceof i.z.ZodOptional||s instanceof i.z.ZodDefault)&&r("Optional args with defaults may be omitted");for(let s of Object.values(e))if(s.guidelines)for(let l of s.guidelines)r(l);return r(`Run \`${o}\` with no args to list all available skills`),n.map(s=>`- ${s}`).join(`
39
+ `)}function Z(o,e){let n=o;for(;n instanceof i.z.ZodOptional||n instanceof i.z.ZodDefault;)n=n.unwrap();return n instanceof e}function x(o){let{binName:e,tools:n}=o;return Object.entries(n).map(([t,r])=>V(e,t,r)).join(`
40
+
41
+ `)}function V(o,e,n){let t=Object.entries(n.inputSchema),r=t.map(([p,c])=>c instanceof i.z.ZodOptional||c instanceof i.z.ZodDefault?`[${p}]`:`<${p}>`).join(" "),a=[o,e,r].filter(Boolean).join(" "),s=t.map(([p,c])=>{let g=n.typeLabels?.[p],u=$(c,g),T=P(c);return`| \`${p}\` | ${u} | ${T} |`}).join(`
42
+ `),l=n.examples??[],m="";if(l.length>0){let p=l.map(u=>[o,e,...u.args].join(" ")),c=Math.max(...p.map(u=>u.length));m=`
43
+
44
+ \`\`\`sh
45
+ ${l.map((u,T)=>`${p[T].padEnd(c)} # ${u.result}`).join(`
46
+ `)}
47
+ \`\`\``}let j=n.typeDefs?Object.entries(n.typeDefs).map(([p,c])=>`
48
+
49
+ **\`${p}\`** type definition:
50
+
51
+ \`\`\`typescript
52
+ ${c}
53
+ \`\`\``).join(""):"",D=s?`
54
+
55
+ | arg | type | description |
56
+ |-----|------|-------------|
57
+ ${s}`:"";return`#### \`${e}\`
58
+
59
+ ${n.description}.
60
+
61
+ \`\`\`sh
62
+ ${a}
63
+ \`\`\`${D}${j}${m}`}function $(o,e){if(e)return e;let n=o;for(;n instanceof i.z.ZodOptional||n instanceof i.z.ZodDefault;)n=n.unwrap();return n instanceof i.z.ZodEnum?n.options.map(t=>`\`${t}\``).join(" \\| "):n instanceof i.z.ZodNumber?"number":n instanceof i.z.ZodString?"string":n instanceof i.z.ZodBoolean?"boolean":n instanceof i.z.ZodArray?"JSON string (array)":n instanceof i.z.ZodUnion?n.options.map(r=>$(r)).join(" \\| "):n instanceof i.z.ZodRecord?"JSON object":"unknown"}function P(o){let e=o.description??"",n=o,t,r=!1;for(;n instanceof i.z.ZodOptional||n instanceof i.z.ZodDefault;){if(n instanceof i.z.ZodDefault){let a=n.def.defaultValue;t=typeof a=="function"?a():a}n instanceof i.z.ZodOptional&&(r=!0),n=n.unwrap()}return t!==void 0?`${e} (default: \`${String(t)}\`)`:r?`${e} (optional)`:e}var y=require("zod"),b=require("crypto"),d={echoTool:{name:"echo",description:"Returns the message as-is",inputSchema:{message:y.z.string().describe("Message to echo")},handler:async({message:o})=>f(o),examples:[{args:['"hello world"'],result:"hello world"}]},timestampTool:{name:"timestamp",description:"Returns the current UTC timestamp",inputSchema:{format:y.z.enum(["iso","unix"]).default("iso").describe("Timestamp format")},handler:async({format:o})=>{let e=o==="unix"?String(Date.now()):new Date().toISOString();return f(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:y.z.string().describe("Environment variable name")},handler:async({key:o})=>f(process.env[o]??""),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((0,b.randomUUID)()),examples:[{args:[],result:"550e8400-e29b-41d4-a716-446655440000"}]}},I=d.echoTool,L=d.timestampTool,J=d.envTool,G=d.uuidTool;0&&(module.exports={generateReadmeSkills,generateSkillMarkdown,tools});
@@ -0,0 +1,111 @@
1
+ import { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
2
+ import { z } from 'zod';
3
+
4
+ type ToolResult = CallToolResult;
5
+ type ToolExample = {
6
+ args: string[];
7
+ result: string;
8
+ };
9
+ type AnyToolDef = {
10
+ name: string;
11
+ description: string;
12
+ inputSchema: z.ZodRawShape;
13
+ handler: (args: any) => Promise<ToolResult>;
14
+ examples?: ToolExample[];
15
+ guidelines?: string[];
16
+ typeLabels?: Record<string, string>;
17
+ typeDefs?: Record<string, string>;
18
+ returnType?: string;
19
+ returnDescription?: string;
20
+ };
21
+
22
+ type SkillTools = Record<string, AnyToolDef>;
23
+ declare function generateSkillMarkdown(opts: {
24
+ binName: string;
25
+ description: string;
26
+ tools: SkillTools;
27
+ }): string;
28
+ declare function generateReadmeSkills(opts: {
29
+ binName: string;
30
+ tools: SkillTools;
31
+ }): string;
32
+
33
+ declare const tools: {
34
+ echoTool: {
35
+ name: string;
36
+ description: string;
37
+ inputSchema: {
38
+ readonly message: z.ZodString;
39
+ };
40
+ handler: (input: {
41
+ message: string;
42
+ }) => Promise<ToolResult>;
43
+ examples?: ToolExample[];
44
+ guidelines?: string[];
45
+ typeLabels?: {
46
+ readonly message?: string | undefined;
47
+ } | undefined;
48
+ typeDefs?: {
49
+ readonly message?: string | undefined;
50
+ } | undefined;
51
+ returnType?: string;
52
+ returnDescription?: string;
53
+ };
54
+ timestampTool: {
55
+ name: string;
56
+ description: string;
57
+ inputSchema: {
58
+ readonly format: z.ZodDefault<z.ZodEnum<{
59
+ iso: "iso";
60
+ unix: "unix";
61
+ }>>;
62
+ };
63
+ handler: (input: {
64
+ format: "iso" | "unix";
65
+ }) => Promise<ToolResult>;
66
+ examples?: ToolExample[];
67
+ guidelines?: string[];
68
+ typeLabels?: {
69
+ readonly format?: string | undefined;
70
+ } | undefined;
71
+ typeDefs?: {
72
+ readonly format?: string | undefined;
73
+ } | undefined;
74
+ returnType?: string;
75
+ returnDescription?: string;
76
+ };
77
+ envTool: {
78
+ name: string;
79
+ description: string;
80
+ inputSchema: {
81
+ readonly key: z.ZodString;
82
+ };
83
+ handler: (input: {
84
+ key: string;
85
+ }) => Promise<ToolResult>;
86
+ examples?: ToolExample[];
87
+ guidelines?: string[];
88
+ typeLabels?: {
89
+ readonly key?: string | undefined;
90
+ } | undefined;
91
+ typeDefs?: {
92
+ readonly key?: string | undefined;
93
+ } | undefined;
94
+ returnType?: string;
95
+ returnDescription?: string;
96
+ };
97
+ uuidTool: {
98
+ name: string;
99
+ description: string;
100
+ inputSchema: {};
101
+ handler: (input: Record<string, never>) => Promise<ToolResult>;
102
+ examples?: ToolExample[];
103
+ guidelines?: string[];
104
+ typeLabels?: {} | undefined;
105
+ typeDefs?: {} | undefined;
106
+ returnType?: string;
107
+ returnDescription?: string;
108
+ };
109
+ };
110
+
111
+ export { generateReadmeSkills, generateSkillMarkdown, tools };
package/dist/index.js CHANGED
@@ -1,63 +1,63 @@
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}
1
+ function f(s){return{content:[{type:"text",text:s}]}}import{McpServer as U}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as P}from"@modelcontextprotocol/sdk/server/stdio.js";import{z as J}from"zod";import{z as r}from"zod";function $(s){let{binName:o,description:n,tools:t}=s;return`---
2
+ name: ${o}
3
3
  description: ${n}
4
4
  ---
5
5
 
6
- # ${t}
6
+ # ${o}
7
7
 
8
8
  \`\`\`sh
9
- ${t} <toolName> [...args]
9
+ ${o} <toolName> [...args]
10
10
  \`\`\`
11
11
 
12
12
  ## Skills
13
13
 
14
- ${b(o)}
14
+ ${b(t)}
15
15
 
16
16
  ## Examples
17
17
 
18
- ${D(t,o)}
18
+ ${D(o,t)}
19
19
 
20
20
  ## Guidelines
21
21
 
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(`
22
+ ${w(o,t)}
23
+ `}function b(s){return Object.entries(s).map(([o,n])=>{let t=Object.entries(n.inputSchema).map(([a,e])=>{let l=n.typeLabels?.[a];return`| \`${a}\` | ${j(e,l)} |`}).join(`
24
24
  `),i=n.typeDefs?Object.entries(n.typeDefs).map(([a,e])=>`
25
25
 
26
26
  **\`${a}\`** type definition:
27
27
  \`\`\`typescript
28
28
  ${e}
29
- \`\`\``).join(""):"";return`### ${t}
29
+ \`\`\``).join(""):"";return`### ${o}
30
30
 
31
31
  ${n.description}
32
32
 
33
33
  | arg | description |
34
34
  |-----|-------------|
35
- ${o}${i}`}).join(`
35
+ ${t}${i}`}).join(`
36
36
 
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(`
37
+ `)}function j(s,o){let n=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 e=[];if(o&&e.push(`Type: ${o}`),n&&e.push(n),t instanceof r.ZodEnum){let l=t.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,o){let n=[];for(let[t,i]of Object.entries(o))if(i.examples)for(let a of i.examples){let e=[s,t,...a.args].join(" ");n.push(`- \`${e}\` => \`${a.result}\``)}return n.join(`
38
+ `)}function w(s,o){let n=[],t=new Set,i=e=>{t.has(e)||(t.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(o).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(o))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,o){let n=s;for(;n instanceof r.ZodOptional||n instanceof r.ZodDefault;)n=n.unwrap();return n instanceof o}function z(s){let{binName:o,tools:n}=s;return Object.entries(n).map(([t,i])=>A(o,t,i)).join(`
40
40
 
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=`
41
+ `)}function A(s,o,n){let t=Object.entries(n.inputSchema),i=t.map(([p,c])=>c instanceof r.ZodOptional||c instanceof r.ZodDefault?`[${p}]`:`<${p}>`).join(" "),a=[s,o,i].filter(Boolean).join(" "),e=t.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,o,...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 $=n.typeDefs?Object.entries(n.typeDefs).map(([p,c])=>`
47
+ \`\`\``}let S=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(""):"",S=e?`
53
+ \`\`\``).join(""):"",x=e?`
54
54
 
55
55
  | arg | type | description |
56
56
  |-----|------|-------------|
57
- ${e}`:"";return`#### \`${t}\`
57
+ ${e}`:"";return`#### \`${o}\`
58
58
 
59
59
  ${n.description}.
60
60
 
61
61
  \`\`\`sh
62
62
  ${a}
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};
63
+ \`\`\`${x}${S}${m}`}function Z(s,o){if(o)return o;let n=s;for(;n instanceof r.ZodOptional||n instanceof r.ZodDefault;)n=n.unwrap();return n instanceof r.ZodEnum?n.options.map(t=>`\`${t}\``).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 o=s.description??"",n=s,t,i=!1;for(;n instanceof r.ZodOptional||n instanceof r.ZodDefault;){if(n instanceof r.ZodDefault){let a=n.def.defaultValue;t=typeof a=="function"?a():a}n instanceof r.ZodOptional&&(i=!0),n=n.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,N=d.envTool,E=d.uuidTool;export{z as generateReadmeSkills,$ as generateSkillMarkdown,d as tools};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ "use strict";function o(e){return{content:[{type:"text",text:e}]}}var u=require("@modelcontextprotocol/sdk/server/mcp.js"),d=require("@modelcontextprotocol/sdk/server/stdio.js");function f(e,n){let c=new u.McpServer(e);for(let s of n)c.registerTool(s.name,{description:s.description,inputSchema:s.inputSchema},s.handler);return c}async function m(e){let n=new d.StdioServerTransport;await e.connect(n)}var g=require("zod");var T=require("zod");var r=require("zod"),y=require("crypto"),t={echoTool:{name:"echo",description:"Returns the message as-is",inputSchema:{message:r.z.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.z.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.z.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((0,y.randomUUID)()),examples:[{args:[],result:"550e8400-e29b-41d4-a716-446655440000"}]}},i=t.echoTool,a=t.timestampTool,l=t.envTool,p=t.uuidTool;var h=f({name:"mono-rele2-core",version:"1.0.0"},[i,a,l,p]);m(h).catch(e=>{console.error("[core] server error:",e),process.exit(1)});
package/dist/server.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
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)});
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 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: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)});
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@julong/mono-rele2-core",
3
- "version": "1.30.0",
3
+ "version": "1.32.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",
7
7
  "exports": {
8
8
  ".": {
9
+ "types": "./dist/index.d.ts",
9
10
  "import": "./dist/index.js",
10
- "types": "./dist/index.d.ts"
11
+ "require": "./dist/index.cjs"
11
12
  }
12
13
  },
13
14
  "bin": {
@@ -22,8 +23,12 @@
22
23
  },
23
24
  "scripts": {
24
25
  "build": "tsup",
26
+ "dev": "tsup --watch",
25
27
  "typecheck": "tsc --noEmit",
26
28
  "clean": "rimraf dist",
29
+ "lint": "rslint --config ../../rslint.config.ts .",
30
+ "format": "prettier --write src/ --write '*.{ts,json,js}'",
31
+ "format:check": "prettier --check src/ --check '*.{ts,json,js}'",
27
32
  "readme": "bun ../common/build/update-readme.mjs"
28
33
  },
29
34
  "dependencies": {
@@ -1,60 +0,0 @@
1
- ---
2
- name: mono-rele2-core-cli
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
- ---
5
-
6
- # mono-rele2-core-cli
7
-
8
- ```sh
9
- mono-rele2-core-cli <toolName> [...args]
10
- ```
11
-
12
- ## Skills
13
-
14
- ### echoTool
15
-
16
- Returns the message as-is
17
-
18
- | arg | description |
19
- |-----|-------------|
20
- | `message` | Message to echo |
21
-
22
- ### timestampTool
23
-
24
- Returns the current UTC timestamp
25
-
26
- | arg | description |
27
- |-----|-------------|
28
- | `format` | Timestamp format — `iso` \| `unix` — default: `iso` |
29
-
30
- ### envTool
31
-
32
- Returns the value of an environment variable
33
-
34
- | arg | description |
35
- |-----|-------------|
36
- | `key` | Environment variable name |
37
-
38
- ### uuidTool
39
-
40
- Generates a random UUID v4
41
-
42
- | arg | description |
43
- |-----|-------------|
44
-
45
-
46
- ## Examples
47
-
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`
54
-
55
- ## Guidelines
56
-
57
- - Arguments are positional — pass them in the order listed in each skill's table
58
- - Optional args with defaults may be omitted
59
- - `envTool` returns an empty string when the variable is not set
60
- - Run `mono-rele2-core-cli` with no args to list all available skills