@julong/mono-rele2-utils 1.15.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 CHANGED
@@ -9,19 +9,19 @@ Text utility tools for the mono-rele2 monorepo. Available as an MCP server and a
9
9
  ```sh
10
10
  npm install -g @julong/mono-rele2-utils
11
11
  # or
12
- npx @julong/mono-rele2-utils <skillName> [...args]
12
+ npx @julong/mono-rele2-utils-cli <skillName> [...args]
13
13
  ```
14
14
 
15
15
  ### Usage
16
16
 
17
17
  ```sh
18
- mono-rele2-utils <skillName> [...args]
18
+ mono-rele2-utils-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-utils
24
+ mono-rele2-utils-cli
25
25
  ```
26
26
 
27
27
  ```
@@ -43,7 +43,7 @@ Available skills:
43
43
  Merges class names, filtering out falsy values.
44
44
 
45
45
  ```sh
46
- mono-rele2-utils cnTool <classes>
46
+ mono-rele2-utils-cli cnTool <classes>
47
47
  ```
48
48
 
49
49
  | arg | type | description |
@@ -51,7 +51,7 @@ mono-rele2-utils cnTool <classes>
51
51
  | `classes` | JSON string (array) | List of class names to merge |
52
52
 
53
53
  ```sh
54
- mono-rele2-utils cnTool '["btn","active","large"]' # btn active large
54
+ mono-rele2-utils-cli cnTool '["btn","active","large"]' # btn active large
55
55
  ```
56
56
 
57
57
  #### `caseConvertTool`
@@ -59,7 +59,7 @@ mono-rele2-utils cnTool '["btn","active","large"]' # btn active large
59
59
  Converts text to the specified case format.
60
60
 
61
61
  ```sh
62
- mono-rele2-utils caseConvertTool <input> <to>
62
+ mono-rele2-utils-cli caseConvertTool <input> <to>
63
63
  ```
64
64
 
65
65
  | arg | type | description |
@@ -68,9 +68,9 @@ mono-rele2-utils caseConvertTool <input> <to>
68
68
  | `to` | `upper` \| `lower` \| `capitalize` \| `camel` \| `snake` \| `kebab` | Target case format |
69
69
 
70
70
  ```sh
71
- mono-rele2-utils caseConvertTool "hello world" camel # helloWorld
72
- mono-rele2-utils caseConvertTool "helloWorld" snake # hello_world
73
- mono-rele2-utils caseConvertTool "hello world" kebab # hello-world
71
+ mono-rele2-utils-cli caseConvertTool "hello world" camel # helloWorld
72
+ mono-rele2-utils-cli caseConvertTool "helloWorld" snake # hello_world
73
+ mono-rele2-utils-cli caseConvertTool "hello world" kebab # hello-world
74
74
  ```
75
75
 
76
76
  #### `truncateTool`
@@ -78,7 +78,7 @@ mono-rele2-utils caseConvertTool "hello world" kebab # hello-world
78
78
  Truncates text to a maximum length and appends a suffix.
79
79
 
80
80
  ```sh
81
- mono-rele2-utils truncateTool <input> <maxLength> [suffix]
81
+ mono-rele2-utils-cli truncateTool <input> <maxLength> [suffix]
82
82
  ```
83
83
 
84
84
  | arg | type | description |
@@ -88,8 +88,8 @@ mono-rele2-utils truncateTool <input> <maxLength> [suffix]
88
88
  | `suffix` | string | Suffix to append when truncated (default: `...`) |
89
89
 
90
90
  ```sh
91
- mono-rele2-utils truncateTool "hello world long text" 10 # hello w...
92
- mono-rele2-utils truncateTool "hello world" 8 "…" # hello w…
91
+ mono-rele2-utils-cli truncateTool "hello world long text" 10 # hello w...
92
+ mono-rele2-utils-cli truncateTool "hello world" 8 "…" # hello w…
93
93
  ```
94
94
 
95
95
  <!-- SKILLS:END -->
package/dist/cli.js CHANGED
@@ -32,7 +32,7 @@ ${paramLines}`;
32
32
  return "Available skills:\n\n" + sections.join("\n\n");
33
33
  }
34
34
  async function runCli(tools2) {
35
- const [, , cliName, toolName, ...rawArgs] = process.argv;
35
+ const [, , toolName, ...rawArgs] = process.argv;
36
36
  console.log(process.argv);
37
37
  if (!toolName || !(toolName in tools2)) {
38
38
  if (toolName) console.error(`Unknown skill: "${toolName}"
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
 
@@ -81,6 +80,4 @@ declare const tools: {
81
80
  };
82
81
  };
83
82
 
84
- declare function createUtilsServer(): _modelcontextprotocol_sdk_server_mcp_js.McpServer;
85
-
86
- export { cn, createUtilsServer, generateReadmeSkills, generateSkillMarkdown, tools };
83
+ export { cn, generateReadmeSkills, generateSkillMarkdown, tools };
package/dist/index.js CHANGED
@@ -1,3 +1,8 @@
1
+ // src/cn.ts
2
+ function cn(...classes) {
3
+ return classes.filter(Boolean).join(" ");
4
+ }
5
+
1
6
  // ../common/kit/tool.ts
2
7
  function toolDef(def) {
3
8
  return def;
@@ -12,18 +17,6 @@ function text(content) {
12
17
  // ../common/kit/server.ts
13
18
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
14
19
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
15
- function createMcpServer(config, tools2) {
16
- const server = new McpServer(config);
17
- for (const tool of tools2) {
18
- server.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 server;
26
- }
27
20
 
28
21
  // ../common/kit/cli.ts
29
22
  import { z } from "zod";
@@ -136,6 +129,7 @@ function containsType(schema, ctor) {
136
129
  return inner instanceof ctor;
137
130
  }
138
131
  function generateReadmeSkills(opts) {
132
+ console.log(opts.binName);
139
133
  const { binName, tools: tools2 } = opts;
140
134
  return Object.entries(tools2).map(([key, tool]) => renderReadmeSkill(binName, key, tool)).join("\n\n");
141
135
  }
@@ -210,13 +204,6 @@ function describeReadmeDesc(schema) {
210
204
 
211
205
  // src/tools/text.ts
212
206
  import { z as z3 } from "zod";
213
-
214
- // src/cn.ts
215
- function cn(...classes) {
216
- return classes.filter(Boolean).join(" ");
217
- }
218
-
219
- // src/tools/text.ts
220
207
  var tools = {
221
208
  cnTool: toolDef({
222
209
  name: "cn",
@@ -278,14 +265,8 @@ function convert(input, to) {
278
265
  return input.replace(/([A-Z])/g, "-$1").replace(/[_\s]+/g, "-").toLowerCase().replace(/^-/, "");
279
266
  }
280
267
  }
281
-
282
- // src/index.ts
283
- function createUtilsServer() {
284
- return createMcpServer({ name: "mono-rele2-utils", version: "1.0.0" }, [cnTool, caseConvertTool, truncateTool]);
285
- }
286
268
  export {
287
269
  cn,
288
- createUtilsServer,
289
270
  generateReadmeSkills,
290
271
  generateSkillMarkdown,
291
272
  tools
package/dist/server.js CHANGED
@@ -108,13 +108,8 @@ function convert(input, to) {
108
108
  }
109
109
  }
110
110
 
111
- // src/index.ts
112
- function createUtilsServer() {
113
- return createMcpServer({ name: "mono-rele2-utils", version: "1.0.0" }, [cnTool, caseConvertTool, truncateTool]);
114
- }
115
-
116
111
  // src/server.ts
117
- var server = createUtilsServer();
112
+ var server = createMcpServer({ name: "mono-rele2-utils", version: "1.0.0" }, [cnTool, caseConvertTool, truncateTool]);
118
113
  startServer(server).catch((err) => {
119
114
  console.error("[utils] server error:", err);
120
115
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@julong/mono-rele2-utils",
3
- "version": "1.15.0",
3
+ "version": "1.17.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",
@@ -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",