@julong/mono-rele2-utils 1.10.1 → 1.11.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/dist/cli.js CHANGED
@@ -82,19 +82,19 @@ var tools = {
82
82
  cnTool: toolDef({
83
83
  name: "cn",
84
84
  description: "Merges class names, filtering out falsy values",
85
- inputSchema: {
85
+ inputSchema: z3.object({
86
86
  classes: z3.array(z3.string()).describe("List of class names to merge")
87
- },
87
+ }),
88
88
  handler: async ({ classes }) => text(cn(...classes)),
89
89
  examples: [{ args: [`'["btn","active","large"]'`], result: "btn active large" }]
90
90
  }),
91
91
  caseConvertTool: toolDef({
92
92
  name: "case_convert",
93
93
  description: "Converts text to the specified case format",
94
- inputSchema: {
94
+ inputSchema: z3.object({
95
95
  input: z3.string().describe("Text to convert"),
96
96
  to: z3.enum(["upper", "lower", "capitalize", "camel", "snake", "kebab"]).describe("Target case format")
97
- },
97
+ }),
98
98
  handler: async ({ input, to }) => text(convert(input, to)),
99
99
  examples: [
100
100
  { args: [`"hello world"`, "camel"], result: "helloWorld" },
@@ -105,11 +105,11 @@ var tools = {
105
105
  truncateTool: toolDef({
106
106
  name: "truncate",
107
107
  description: "Truncates text to a maximum length and appends a suffix",
108
- inputSchema: {
108
+ inputSchema: z3.object({
109
109
  input: z3.string().describe("Text to truncate"),
110
110
  maxLength: z3.number().int().positive().describe("Maximum character length"),
111
111
  suffix: z3.string().default("...").describe("Suffix to append when truncated")
112
- },
112
+ }),
113
113
  handler: async ({ input, maxLength, suffix }) => {
114
114
  const result = input.length <= maxLength ? input : input.slice(0, maxLength - suffix.length) + suffix;
115
115
  return text(result);
package/dist/index.d.ts CHANGED
@@ -29,58 +29,6 @@ declare function generateReadmeSkills(opts: {
29
29
  tools: SkillTools;
30
30
  }): string;
31
31
 
32
- declare const tools: {
33
- cnTool: {
34
- name: string;
35
- description: string;
36
- inputSchema: {
37
- readonly classes: z.ZodArray<z.ZodString>;
38
- };
39
- handler: (input: {
40
- classes: string[];
41
- }) => Promise<ToolResult>;
42
- examples?: ToolExample[];
43
- guidelines?: string[];
44
- };
45
- caseConvertTool: {
46
- name: string;
47
- description: string;
48
- inputSchema: {
49
- readonly input: z.ZodString;
50
- readonly to: z.ZodEnum<{
51
- upper: "upper";
52
- lower: "lower";
53
- capitalize: "capitalize";
54
- camel: "camel";
55
- snake: "snake";
56
- kebab: "kebab";
57
- }>;
58
- };
59
- handler: (input: {
60
- input: string;
61
- to: "upper" | "lower" | "capitalize" | "camel" | "snake" | "kebab";
62
- }) => Promise<ToolResult>;
63
- examples?: ToolExample[];
64
- guidelines?: string[];
65
- };
66
- truncateTool: {
67
- name: string;
68
- description: string;
69
- inputSchema: {
70
- readonly input: z.ZodString;
71
- readonly maxLength: z.ZodNumber;
72
- readonly suffix: z.ZodDefault<z.ZodString>;
73
- };
74
- handler: (input: {
75
- input: string;
76
- maxLength: number;
77
- suffix: string;
78
- }) => Promise<ToolResult>;
79
- examples?: ToolExample[];
80
- guidelines?: string[];
81
- };
82
- };
83
-
84
32
  declare function createUtilsServer(): _modelcontextprotocol_sdk_server_mcp_js.McpServer;
85
33
 
86
- export { cn, createUtilsServer, generateReadmeSkills, generateSkillMarkdown, tools };
34
+ export { cn, createUtilsServer, generateReadmeSkills, generateSkillMarkdown };
package/dist/index.js CHANGED
@@ -221,19 +221,19 @@ var tools = {
221
221
  cnTool: toolDef({
222
222
  name: "cn",
223
223
  description: "Merges class names, filtering out falsy values",
224
- inputSchema: {
224
+ inputSchema: z3.object({
225
225
  classes: z3.array(z3.string()).describe("List of class names to merge")
226
- },
226
+ }),
227
227
  handler: async ({ classes }) => text(cn(...classes)),
228
228
  examples: [{ args: [`'["btn","active","large"]'`], result: "btn active large" }]
229
229
  }),
230
230
  caseConvertTool: toolDef({
231
231
  name: "case_convert",
232
232
  description: "Converts text to the specified case format",
233
- inputSchema: {
233
+ inputSchema: z3.object({
234
234
  input: z3.string().describe("Text to convert"),
235
235
  to: z3.enum(["upper", "lower", "capitalize", "camel", "snake", "kebab"]).describe("Target case format")
236
- },
236
+ }),
237
237
  handler: async ({ input, to }) => text(convert(input, to)),
238
238
  examples: [
239
239
  { args: [`"hello world"`, "camel"], result: "helloWorld" },
@@ -244,11 +244,11 @@ var tools = {
244
244
  truncateTool: toolDef({
245
245
  name: "truncate",
246
246
  description: "Truncates text to a maximum length and appends a suffix",
247
- inputSchema: {
247
+ inputSchema: z3.object({
248
248
  input: z3.string().describe("Text to truncate"),
249
249
  maxLength: z3.number().int().positive().describe("Maximum character length"),
250
250
  suffix: z3.string().default("...").describe("Suffix to append when truncated")
251
- },
251
+ }),
252
252
  handler: async ({ input, maxLength, suffix }) => {
253
253
  const result = input.length <= maxLength ? input : input.slice(0, maxLength - suffix.length) + suffix;
254
254
  return text(result);
@@ -287,6 +287,5 @@ export {
287
287
  cn,
288
288
  createUtilsServer,
289
289
  generateReadmeSkills,
290
- generateSkillMarkdown,
291
- tools
290
+ generateSkillMarkdown
292
291
  };
package/dist/server.js CHANGED
@@ -50,19 +50,19 @@ var tools = {
50
50
  cnTool: toolDef({
51
51
  name: "cn",
52
52
  description: "Merges class names, filtering out falsy values",
53
- inputSchema: {
53
+ inputSchema: z3.object({
54
54
  classes: z3.array(z3.string()).describe("List of class names to merge")
55
- },
55
+ }),
56
56
  handler: async ({ classes }) => text(cn(...classes)),
57
57
  examples: [{ args: [`'["btn","active","large"]'`], result: "btn active large" }]
58
58
  }),
59
59
  caseConvertTool: toolDef({
60
60
  name: "case_convert",
61
61
  description: "Converts text to the specified case format",
62
- inputSchema: {
62
+ inputSchema: z3.object({
63
63
  input: z3.string().describe("Text to convert"),
64
64
  to: z3.enum(["upper", "lower", "capitalize", "camel", "snake", "kebab"]).describe("Target case format")
65
- },
65
+ }),
66
66
  handler: async ({ input, to }) => text(convert(input, to)),
67
67
  examples: [
68
68
  { args: [`"hello world"`, "camel"], result: "helloWorld" },
@@ -73,11 +73,11 @@ var tools = {
73
73
  truncateTool: toolDef({
74
74
  name: "truncate",
75
75
  description: "Truncates text to a maximum length and appends a suffix",
76
- inputSchema: {
76
+ inputSchema: z3.object({
77
77
  input: z3.string().describe("Text to truncate"),
78
78
  maxLength: z3.number().int().positive().describe("Maximum character length"),
79
79
  suffix: z3.string().default("...").describe("Suffix to append when truncated")
80
- },
80
+ }),
81
81
  handler: async ({ input, maxLength, suffix }) => {
82
82
  const result = input.length <= maxLength ? input : input.slice(0, maxLength - suffix.length) + suffix;
83
83
  return text(result);
@@ -119,6 +119,3 @@ startServer(server).catch((err) => {
119
119
  console.error("[utils] server error:", err);
120
120
  process.exit(1);
121
121
  });
122
- export {
123
- tools
124
- };
@@ -17,7 +17,22 @@ Merges class names, filtering out falsy values
17
17
 
18
18
  | arg | description |
19
19
  |-----|-------------|
20
- | `classes` | List of class names to merge |
20
+ | `toJSONSchema` | |
21
+ | `def` | |
22
+ | `type` | |
23
+ | `parse` | |
24
+ | `safeParse` | |
25
+ | `parseAsync` | |
26
+ | `safeParseAsync` | |
27
+ | `spa` | |
28
+ | `encode` | |
29
+ | `decode` | |
30
+ | `encodeAsync` | |
31
+ | `decodeAsync` | |
32
+ | `safeEncode` | |
33
+ | `safeDecode` | |
34
+ | `safeEncodeAsync` | |
35
+ | `safeDecodeAsync` | |
21
36
 
22
37
  ### caseConvertTool
23
38
 
@@ -25,8 +40,22 @@ Converts text to the specified case format
25
40
 
26
41
  | arg | description |
27
42
  |-----|-------------|
28
- | `input` | Text to convert |
29
- | `to` | Target case format — `upper` \| `lower` \| `capitalize` \| `camel` \| `snake` \| `kebab` |
43
+ | `toJSONSchema` | |
44
+ | `def` | |
45
+ | `type` | |
46
+ | `parse` | |
47
+ | `safeParse` | |
48
+ | `parseAsync` | |
49
+ | `safeParseAsync` | |
50
+ | `spa` | |
51
+ | `encode` | |
52
+ | `decode` | |
53
+ | `encodeAsync` | |
54
+ | `decodeAsync` | |
55
+ | `safeEncode` | |
56
+ | `safeDecode` | |
57
+ | `safeEncodeAsync` | |
58
+ | `safeDecodeAsync` | |
30
59
 
31
60
  ### truncateTool
32
61
 
@@ -34,9 +63,22 @@ Truncates text to a maximum length and appends a suffix
34
63
 
35
64
  | arg | description |
36
65
  |-----|-------------|
37
- | `input` | Text to truncate |
38
- | `maxLength` | Maximum character length |
39
- | `suffix` | Suffix to append when truncated — default: `...` |
66
+ | `toJSONSchema` | |
67
+ | `def` | |
68
+ | `type` | |
69
+ | `parse` | |
70
+ | `safeParse` | |
71
+ | `parseAsync` | |
72
+ | `safeParseAsync` | |
73
+ | `spa` | |
74
+ | `encode` | |
75
+ | `decode` | |
76
+ | `encodeAsync` | |
77
+ | `decodeAsync` | |
78
+ | `safeEncode` | |
79
+ | `safeDecode` | |
80
+ | `safeEncodeAsync` | |
81
+ | `safeDecodeAsync` | |
40
82
 
41
83
  ## Examples
42
84
 
@@ -50,7 +92,4 @@ Truncates text to a maximum length and appends a suffix
50
92
  ## Guidelines
51
93
 
52
94
  - Arguments are positional — pass them in the order listed in each skill's table
53
- - Numeric args are auto-parsed — pass as plain numbers (e.g. `10`)
54
- - Array args must be valid JSON — wrap in single quotes on Unix shells (e.g. `'["a","b"]'`)
55
- - Optional args with defaults may be omitted
56
95
  - Run `mono-rele2-utils` with no args to list all available skills
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@julong/mono-rele2-utils",
3
- "version": "1.10.1",
3
+ "version": "1.11.0",
4
4
  "description": "Use this skill to invoke text utility functions via the mono-rele2-utils CLI. Handles class name merging, case conversion, and text truncation.",
5
5
  "license": "ISC",
6
6
  "type": "module",