@rishildi/ldi-process-skills 0.1.0 → 0.1.1
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/build/server.d.ts +4 -0
- package/build/server.d.ts.map +1 -1
- package/build/server.js +45 -20
- package/build/skills/embedded.d.ts +1 -0
- package/build/skills/embedded.d.ts.map +1 -1
- package/build/skills/embedded.js +81 -69
- package/build/skills/registry.d.ts +11 -2
- package/build/skills/registry.d.ts.map +1 -1
- package/build/skills/registry.js +17 -2
- package/package.json +2 -2
- package/README.md +0 -133
package/build/server.d.ts
CHANGED
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
* - A TOOL to fetch specific asset/reference files from a skill
|
|
7
7
|
* - A PROMPT for each skill as a quick-start entry point
|
|
8
8
|
* - A RESOURCE listing all available skills
|
|
9
|
+
*
|
|
10
|
+
* Skills are organised by category (e.g. "fabric", "powerbi").
|
|
11
|
+
* Use list_categories to discover available categories, then
|
|
12
|
+
* list_skills with a category filter to find the right skill.
|
|
9
13
|
*/
|
|
10
14
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
11
15
|
export declare function createServer(): McpServer;
|
package/build/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIpE,wBAAgB,YAAY,IAAI,SAAS,CAiPxC"}
|
package/build/server.js
CHANGED
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
* - A TOOL to fetch specific asset/reference files from a skill
|
|
7
7
|
* - A PROMPT for each skill as a quick-start entry point
|
|
8
8
|
* - A RESOURCE listing all available skills
|
|
9
|
+
*
|
|
10
|
+
* Skills are organised by category (e.g. "fabric", "powerbi").
|
|
11
|
+
* Use list_categories to discover available categories, then
|
|
12
|
+
* list_skills with a category filter to find the right skill.
|
|
9
13
|
*/
|
|
10
14
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
11
15
|
import { z } from "zod";
|
|
@@ -13,23 +17,54 @@ import { registry } from "./skills/registry.js";
|
|
|
13
17
|
export function createServer() {
|
|
14
18
|
const server = new McpServer({
|
|
15
19
|
name: "ldi-process-skills",
|
|
16
|
-
version: "0.1
|
|
20
|
+
version: "0.0.1",
|
|
21
|
+
});
|
|
22
|
+
// ──────────────────────────────────────────────────────────────────
|
|
23
|
+
// TOOL: list_categories
|
|
24
|
+
// Returns the available skill categories with skill counts
|
|
25
|
+
// ──────────────────────────────────────────────────────────────────
|
|
26
|
+
server.registerTool("list_categories", {
|
|
27
|
+
title: "List skill categories",
|
|
28
|
+
description: "Returns the available skill categories (e.g. 'fabric', 'powerbi') with the " +
|
|
29
|
+
"number of skills in each. Call this first to identify which category is relevant " +
|
|
30
|
+
"to the current task, then call list_skills with that category.",
|
|
31
|
+
inputSchema: {},
|
|
32
|
+
annotations: { readOnlyHint: true },
|
|
33
|
+
}, async () => {
|
|
34
|
+
const categories = registry.listCategories();
|
|
35
|
+
return {
|
|
36
|
+
content: [
|
|
37
|
+
{
|
|
38
|
+
type: "text",
|
|
39
|
+
text: JSON.stringify(categories, null, 2),
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
};
|
|
17
43
|
});
|
|
18
44
|
// ──────────────────────────────────────────────────────────────────
|
|
19
45
|
// TOOL: list_skills
|
|
20
|
-
// Returns a catalogue of
|
|
46
|
+
// Returns a catalogue of available skills, optionally filtered by category
|
|
21
47
|
// ──────────────────────────────────────────────────────────────────
|
|
22
48
|
server.registerTool("list_skills", {
|
|
23
49
|
title: "List available skills",
|
|
24
|
-
description: "Returns a list of
|
|
25
|
-
"
|
|
26
|
-
|
|
50
|
+
description: "Returns a list of available LDI process skills with their names, descriptions, " +
|
|
51
|
+
"and categories. Pass a category (e.g. 'fabric') to filter to relevant skills. " +
|
|
52
|
+
"Call list_categories first if you are unsure which category to use.",
|
|
53
|
+
inputSchema: {
|
|
54
|
+
category: z
|
|
55
|
+
.string()
|
|
56
|
+
.optional()
|
|
57
|
+
.describe("Filter skills by category (e.g. 'fabric', 'powerbi'). Omit to list all skills."),
|
|
58
|
+
},
|
|
27
59
|
annotations: { readOnlyHint: true },
|
|
28
|
-
}, async () => {
|
|
29
|
-
const skills =
|
|
60
|
+
}, async ({ category }) => {
|
|
61
|
+
const skills = category
|
|
62
|
+
? registry.getByCategory(category)
|
|
63
|
+
: registry.getAll();
|
|
30
64
|
const catalogue = skills.map((s) => ({
|
|
31
65
|
tool_name: s.name.replace(/-/g, "_"),
|
|
32
66
|
title: s.title,
|
|
67
|
+
category: s.category,
|
|
33
68
|
description: s.description,
|
|
34
69
|
}));
|
|
35
70
|
return {
|
|
@@ -66,7 +101,6 @@ export function createServer() {
|
|
|
66
101
|
},
|
|
67
102
|
];
|
|
68
103
|
if (include_assets) {
|
|
69
|
-
// Include assets and references
|
|
70
104
|
const extras = skill.files.filter((f) => f.relativePath !== "SKILL.md" &&
|
|
71
105
|
(f.relativePath.startsWith("assets/") ||
|
|
72
106
|
f.relativePath.startsWith("references/")));
|
|
@@ -111,14 +145,7 @@ export function createServer() {
|
|
|
111
145
|
isError: true,
|
|
112
146
|
};
|
|
113
147
|
}
|
|
114
|
-
return {
|
|
115
|
-
content: [
|
|
116
|
-
{
|
|
117
|
-
type: "text",
|
|
118
|
-
text: content,
|
|
119
|
-
},
|
|
120
|
-
],
|
|
121
|
-
};
|
|
148
|
+
return { content: [{ type: "text", text: content }] };
|
|
122
149
|
});
|
|
123
150
|
// ──────────────────────────────────────────────────────────────────
|
|
124
151
|
// TOOL: list_skill_files
|
|
@@ -147,12 +174,11 @@ export function createServer() {
|
|
|
147
174
|
isError: true,
|
|
148
175
|
};
|
|
149
176
|
}
|
|
150
|
-
const fileList = skill.files.map((f) => f.relativePath);
|
|
151
177
|
return {
|
|
152
178
|
content: [
|
|
153
179
|
{
|
|
154
180
|
type: "text",
|
|
155
|
-
text: JSON.stringify(
|
|
181
|
+
text: JSON.stringify(skill.files.map((f) => f.relativePath), null, 2),
|
|
156
182
|
},
|
|
157
183
|
],
|
|
158
184
|
};
|
|
@@ -161,8 +187,7 @@ export function createServer() {
|
|
|
161
187
|
// PROMPTS: One per skill as a quick-start entry point
|
|
162
188
|
// ──────────────────────────────────────────────────────────────────
|
|
163
189
|
for (const skill of registry.getAll()) {
|
|
164
|
-
|
|
165
|
-
server.registerPrompt(promptName, {
|
|
190
|
+
server.registerPrompt(skill.name, {
|
|
166
191
|
title: skill.title,
|
|
167
192
|
description: `Quick-start prompt for the ${skill.title} skill`,
|
|
168
193
|
}, () => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embedded.d.ts","sourceRoot":"","sources":["../../src/skills/embedded.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,SAAS;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,SAAS,EAAE,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"embedded.d.ts","sourceRoot":"","sources":["../../src/skills/embedded.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,SAAS;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,SAAS,EAAE,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,EAAE,aAAa,EAqO1C,CAAC"}
|