@julong/mono-rele2-core 1.11.1 → 1.12.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 +10 -9
- package/dist/index.d.ts +10 -10
- package/dist/index.js +8 -8
- package/dist/server.js +8 -8
- package/dist/skills/mono-rele2-core/skill.md +5 -64
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -32,7 +32,8 @@ ${paramLines}`;
|
|
|
32
32
|
return "Available skills:\n\n" + sections.join("\n\n");
|
|
33
33
|
}
|
|
34
34
|
async function runCli(tools2) {
|
|
35
|
-
const [, , toolName, ...rawArgs] = process.argv;
|
|
35
|
+
const [, , cliName, toolName, ...rawArgs] = process.argv;
|
|
36
|
+
console.log(process.argv);
|
|
36
37
|
if (!toolName || !(toolName in tools2)) {
|
|
37
38
|
if (toolName) console.error(`Unknown skill: "${toolName}"
|
|
38
39
|
`);
|
|
@@ -69,25 +70,25 @@ function handleCliError(err) {
|
|
|
69
70
|
// ../common/kit/skill.ts
|
|
70
71
|
import { z as z2 } from "zod";
|
|
71
72
|
|
|
72
|
-
// src/tools/
|
|
73
|
+
// src/tools/system.ts
|
|
73
74
|
import { z as z3 } from "zod";
|
|
74
75
|
import { randomUUID } from "crypto";
|
|
75
76
|
var tools = {
|
|
76
77
|
echoTool: toolDef({
|
|
77
78
|
name: "echo",
|
|
78
79
|
description: "Returns the message as-is",
|
|
79
|
-
inputSchema:
|
|
80
|
+
inputSchema: {
|
|
80
81
|
message: z3.string().describe("Message to echo")
|
|
81
|
-
}
|
|
82
|
+
},
|
|
82
83
|
handler: async ({ message }) => text(message),
|
|
83
84
|
examples: [{ args: [`"hello world"`], result: "hello world" }]
|
|
84
85
|
}),
|
|
85
86
|
timestampTool: toolDef({
|
|
86
87
|
name: "timestamp",
|
|
87
88
|
description: "Returns the current UTC timestamp",
|
|
88
|
-
inputSchema:
|
|
89
|
+
inputSchema: {
|
|
89
90
|
format: z3.enum(["iso", "unix"]).default("iso").describe("Timestamp format")
|
|
90
|
-
}
|
|
91
|
+
},
|
|
91
92
|
handler: async ({ format }) => {
|
|
92
93
|
const value = format === "unix" ? String(Date.now()) : (/* @__PURE__ */ new Date()).toISOString();
|
|
93
94
|
return text(value);
|
|
@@ -100,9 +101,9 @@ var tools = {
|
|
|
100
101
|
envTool: toolDef({
|
|
101
102
|
name: "env",
|
|
102
103
|
description: "Returns the value of an environment variable",
|
|
103
|
-
inputSchema:
|
|
104
|
+
inputSchema: {
|
|
104
105
|
key: z3.string().describe("Environment variable name")
|
|
105
|
-
}
|
|
106
|
+
},
|
|
106
107
|
handler: async ({ key }) => text(process.env[key] ?? ""),
|
|
107
108
|
examples: [
|
|
108
109
|
{ args: ["HOME"], result: "/Users/julong" },
|
|
@@ -113,7 +114,7 @@ var tools = {
|
|
|
113
114
|
uuidTool: toolDef({
|
|
114
115
|
name: "uuid",
|
|
115
116
|
description: "Generates a random UUID v4",
|
|
116
|
-
inputSchema:
|
|
117
|
+
inputSchema: {},
|
|
117
118
|
handler: async () => text(randomUUID()),
|
|
118
119
|
examples: [{ args: [], result: "550e8400-e29b-41d4-a716-446655440000" }]
|
|
119
120
|
})
|
package/dist/index.d.ts
CHANGED
|
@@ -31,9 +31,9 @@ declare const tools: {
|
|
|
31
31
|
echoTool: {
|
|
32
32
|
name: string;
|
|
33
33
|
description: string;
|
|
34
|
-
inputSchema:
|
|
35
|
-
message: z.ZodString;
|
|
36
|
-
}
|
|
34
|
+
inputSchema: {
|
|
35
|
+
readonly message: z.ZodString;
|
|
36
|
+
};
|
|
37
37
|
handler: (input: {
|
|
38
38
|
message: string;
|
|
39
39
|
}) => Promise<ToolResult>;
|
|
@@ -43,12 +43,12 @@ declare const tools: {
|
|
|
43
43
|
timestampTool: {
|
|
44
44
|
name: string;
|
|
45
45
|
description: string;
|
|
46
|
-
inputSchema:
|
|
47
|
-
format: z.ZodDefault<z.ZodEnum<{
|
|
46
|
+
inputSchema: {
|
|
47
|
+
readonly format: z.ZodDefault<z.ZodEnum<{
|
|
48
48
|
iso: "iso";
|
|
49
49
|
unix: "unix";
|
|
50
50
|
}>>;
|
|
51
|
-
}
|
|
51
|
+
};
|
|
52
52
|
handler: (input: {
|
|
53
53
|
format: "iso" | "unix";
|
|
54
54
|
}) => Promise<ToolResult>;
|
|
@@ -58,9 +58,9 @@ declare const tools: {
|
|
|
58
58
|
envTool: {
|
|
59
59
|
name: string;
|
|
60
60
|
description: string;
|
|
61
|
-
inputSchema:
|
|
62
|
-
key: z.ZodString;
|
|
63
|
-
}
|
|
61
|
+
inputSchema: {
|
|
62
|
+
readonly key: z.ZodString;
|
|
63
|
+
};
|
|
64
64
|
handler: (input: {
|
|
65
65
|
key: string;
|
|
66
66
|
}) => Promise<ToolResult>;
|
|
@@ -70,7 +70,7 @@ declare const tools: {
|
|
|
70
70
|
uuidTool: {
|
|
71
71
|
name: string;
|
|
72
72
|
description: string;
|
|
73
|
-
inputSchema:
|
|
73
|
+
inputSchema: {};
|
|
74
74
|
handler: (input: Record<string, never>) => Promise<ToolResult>;
|
|
75
75
|
examples?: ToolExample[];
|
|
76
76
|
guidelines?: string[];
|
package/dist/index.js
CHANGED
|
@@ -208,25 +208,25 @@ function describeReadmeDesc(schema) {
|
|
|
208
208
|
return baseDesc;
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
// src/tools/
|
|
211
|
+
// src/tools/system.ts
|
|
212
212
|
import { z as z3 } from "zod";
|
|
213
213
|
import { randomUUID } from "crypto";
|
|
214
214
|
var tools = {
|
|
215
215
|
echoTool: toolDef({
|
|
216
216
|
name: "echo",
|
|
217
217
|
description: "Returns the message as-is",
|
|
218
|
-
inputSchema:
|
|
218
|
+
inputSchema: {
|
|
219
219
|
message: z3.string().describe("Message to echo")
|
|
220
|
-
}
|
|
220
|
+
},
|
|
221
221
|
handler: async ({ message }) => text(message),
|
|
222
222
|
examples: [{ args: [`"hello world"`], result: "hello world" }]
|
|
223
223
|
}),
|
|
224
224
|
timestampTool: toolDef({
|
|
225
225
|
name: "timestamp",
|
|
226
226
|
description: "Returns the current UTC timestamp",
|
|
227
|
-
inputSchema:
|
|
227
|
+
inputSchema: {
|
|
228
228
|
format: z3.enum(["iso", "unix"]).default("iso").describe("Timestamp format")
|
|
229
|
-
}
|
|
229
|
+
},
|
|
230
230
|
handler: async ({ format }) => {
|
|
231
231
|
const value = format === "unix" ? String(Date.now()) : (/* @__PURE__ */ new Date()).toISOString();
|
|
232
232
|
return text(value);
|
|
@@ -239,9 +239,9 @@ var tools = {
|
|
|
239
239
|
envTool: toolDef({
|
|
240
240
|
name: "env",
|
|
241
241
|
description: "Returns the value of an environment variable",
|
|
242
|
-
inputSchema:
|
|
242
|
+
inputSchema: {
|
|
243
243
|
key: z3.string().describe("Environment variable name")
|
|
244
|
-
}
|
|
244
|
+
},
|
|
245
245
|
handler: async ({ key }) => text(process.env[key] ?? ""),
|
|
246
246
|
examples: [
|
|
247
247
|
{ args: ["HOME"], result: "/Users/julong" },
|
|
@@ -252,7 +252,7 @@ var tools = {
|
|
|
252
252
|
uuidTool: toolDef({
|
|
253
253
|
name: "uuid",
|
|
254
254
|
description: "Generates a random UUID v4",
|
|
255
|
-
inputSchema:
|
|
255
|
+
inputSchema: {},
|
|
256
256
|
handler: async () => text(randomUUID()),
|
|
257
257
|
examples: [{ args: [], result: "550e8400-e29b-41d4-a716-446655440000" }]
|
|
258
258
|
})
|
package/dist/server.js
CHANGED
|
@@ -37,25 +37,25 @@ import { z } from "zod";
|
|
|
37
37
|
// ../common/kit/skill.ts
|
|
38
38
|
import { z as z2 } from "zod";
|
|
39
39
|
|
|
40
|
-
// src/tools/
|
|
40
|
+
// src/tools/system.ts
|
|
41
41
|
import { z as z3 } from "zod";
|
|
42
42
|
import { randomUUID } from "crypto";
|
|
43
43
|
var tools = {
|
|
44
44
|
echoTool: toolDef({
|
|
45
45
|
name: "echo",
|
|
46
46
|
description: "Returns the message as-is",
|
|
47
|
-
inputSchema:
|
|
47
|
+
inputSchema: {
|
|
48
48
|
message: z3.string().describe("Message to echo")
|
|
49
|
-
}
|
|
49
|
+
},
|
|
50
50
|
handler: async ({ message }) => text(message),
|
|
51
51
|
examples: [{ args: [`"hello world"`], result: "hello world" }]
|
|
52
52
|
}),
|
|
53
53
|
timestampTool: toolDef({
|
|
54
54
|
name: "timestamp",
|
|
55
55
|
description: "Returns the current UTC timestamp",
|
|
56
|
-
inputSchema:
|
|
56
|
+
inputSchema: {
|
|
57
57
|
format: z3.enum(["iso", "unix"]).default("iso").describe("Timestamp format")
|
|
58
|
-
}
|
|
58
|
+
},
|
|
59
59
|
handler: async ({ format }) => {
|
|
60
60
|
const value = format === "unix" ? String(Date.now()) : (/* @__PURE__ */ new Date()).toISOString();
|
|
61
61
|
return text(value);
|
|
@@ -68,9 +68,9 @@ var tools = {
|
|
|
68
68
|
envTool: toolDef({
|
|
69
69
|
name: "env",
|
|
70
70
|
description: "Returns the value of an environment variable",
|
|
71
|
-
inputSchema:
|
|
71
|
+
inputSchema: {
|
|
72
72
|
key: z3.string().describe("Environment variable name")
|
|
73
|
-
}
|
|
73
|
+
},
|
|
74
74
|
handler: async ({ key }) => text(process.env[key] ?? ""),
|
|
75
75
|
examples: [
|
|
76
76
|
{ args: ["HOME"], result: "/Users/julong" },
|
|
@@ -81,7 +81,7 @@ var tools = {
|
|
|
81
81
|
uuidTool: toolDef({
|
|
82
82
|
name: "uuid",
|
|
83
83
|
description: "Generates a random UUID v4",
|
|
84
|
-
inputSchema:
|
|
84
|
+
inputSchema: {},
|
|
85
85
|
handler: async () => text(randomUUID()),
|
|
86
86
|
examples: [{ args: [], result: "550e8400-e29b-41d4-a716-446655440000" }]
|
|
87
87
|
})
|
|
@@ -17,22 +17,7 @@ Returns the message as-is
|
|
|
17
17
|
|
|
18
18
|
| arg | description |
|
|
19
19
|
|-----|-------------|
|
|
20
|
-
| `
|
|
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` | |
|
|
20
|
+
| `message` | Message to echo |
|
|
36
21
|
|
|
37
22
|
### timestampTool
|
|
38
23
|
|
|
@@ -40,22 +25,7 @@ Returns the current UTC timestamp
|
|
|
40
25
|
|
|
41
26
|
| arg | description |
|
|
42
27
|
|-----|-------------|
|
|
43
|
-
| `
|
|
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` | |
|
|
28
|
+
| `format` | Timestamp format — `iso` \| `unix` — default: `iso` |
|
|
59
29
|
|
|
60
30
|
### envTool
|
|
61
31
|
|
|
@@ -63,22 +33,7 @@ Returns the value of an environment variable
|
|
|
63
33
|
|
|
64
34
|
| arg | description |
|
|
65
35
|
|-----|-------------|
|
|
66
|
-
| `
|
|
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` | |
|
|
36
|
+
| `key` | Environment variable name |
|
|
82
37
|
|
|
83
38
|
### uuidTool
|
|
84
39
|
|
|
@@ -86,22 +41,7 @@ Generates a random UUID v4
|
|
|
86
41
|
|
|
87
42
|
| arg | description |
|
|
88
43
|
|-----|-------------|
|
|
89
|
-
|
|
90
|
-
| `def` | |
|
|
91
|
-
| `type` | |
|
|
92
|
-
| `parse` | |
|
|
93
|
-
| `safeParse` | |
|
|
94
|
-
| `parseAsync` | |
|
|
95
|
-
| `safeParseAsync` | |
|
|
96
|
-
| `spa` | |
|
|
97
|
-
| `encode` | |
|
|
98
|
-
| `decode` | |
|
|
99
|
-
| `encodeAsync` | |
|
|
100
|
-
| `decodeAsync` | |
|
|
101
|
-
| `safeEncode` | |
|
|
102
|
-
| `safeDecode` | |
|
|
103
|
-
| `safeEncodeAsync` | |
|
|
104
|
-
| `safeDecodeAsync` | |
|
|
44
|
+
|
|
105
45
|
|
|
106
46
|
## Examples
|
|
107
47
|
|
|
@@ -115,5 +55,6 @@ Generates a random UUID v4
|
|
|
115
55
|
## Guidelines
|
|
116
56
|
|
|
117
57
|
- Arguments are positional — pass them in the order listed in each skill's table
|
|
58
|
+
- Optional args with defaults may be omitted
|
|
118
59
|
- `envTool` returns an empty string when the variable is not set
|
|
119
60
|
- Run `mono-rele2-core` 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.12.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",
|