@rishildi/ldi-process-skills-test 0.0.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.
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * LDI Process Skills MCP Server — TEST Entry Point
4
+ *
5
+ * Starts the MCP server over stdio transport.
6
+ * This is the TEST channel binary — mirrors the development branch.
7
+ *
8
+ * Usage:
9
+ * npx @rishildi/ldi-process-skills-test
10
+ * node build/index.js
11
+ */
12
+ export {};
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;GASG"}
package/build/index.js ADDED
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * LDI Process Skills MCP Server — TEST Entry Point
4
+ *
5
+ * Starts the MCP server over stdio transport.
6
+ * This is the TEST channel binary — mirrors the development branch.
7
+ *
8
+ * Usage:
9
+ * npx @rishildi/ldi-process-skills-test
10
+ * node build/index.js
11
+ */
12
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
13
+ import { createServer } from "./server.js";
14
+ async function main() {
15
+ const server = createServer();
16
+ const transport = new StdioServerTransport();
17
+ await server.connect(transport);
18
+ // Log to stderr (stdout is reserved for MCP JSON-RPC messages)
19
+ console.error("LDI Process Skills MCP Server [TEST] running on stdio");
20
+ }
21
+ main().catch((err) => {
22
+ console.error("Fatal error:", err);
23
+ process.exit(1);
24
+ });
@@ -0,0 +1,16 @@
1
+ /**
2
+ * LDI Process Skills MCP Server
3
+ *
4
+ * Exposes each embedded skill as:
5
+ * - A TOOL that returns the full SKILL.md instructions for the LLM to follow
6
+ * - A TOOL to fetch specific asset/reference files from a skill
7
+ * - A PROMPT for each skill as a quick-start entry point
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.
13
+ */
14
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
15
+ export declare function createServer(): McpServer;
16
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,208 @@
1
+ /**
2
+ * LDI Process Skills MCP Server
3
+ *
4
+ * Exposes each embedded skill as:
5
+ * - A TOOL that returns the full SKILL.md instructions for the LLM to follow
6
+ * - A TOOL to fetch specific asset/reference files from a skill
7
+ * - A PROMPT for each skill as a quick-start entry point
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.
13
+ */
14
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
15
+ import { z } from "zod";
16
+ import { registry } from "./skills/registry.js";
17
+ export function createServer() {
18
+ const server = new McpServer({
19
+ name: "ldi-process-skills-test",
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
+ };
43
+ });
44
+ // ──────────────────────────────────────────────────────────────────
45
+ // TOOL: list_skills
46
+ // Returns a catalogue of available skills, optionally filtered by category
47
+ // ──────────────────────────────────────────────────────────────────
48
+ server.registerTool("list_skills", {
49
+ title: "List available skills",
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
+ },
59
+ annotations: { readOnlyHint: true },
60
+ }, async ({ category }) => {
61
+ const skills = category
62
+ ? registry.getByCategory(category)
63
+ : registry.getAll();
64
+ const catalogue = skills.map((s) => ({
65
+ tool_name: s.name.replace(/-/g, "_"),
66
+ title: s.title,
67
+ category: s.category,
68
+ description: s.description,
69
+ }));
70
+ return {
71
+ content: [
72
+ {
73
+ type: "text",
74
+ text: JSON.stringify(catalogue, null, 2),
75
+ },
76
+ ],
77
+ };
78
+ });
79
+ // ──────────────────────────────────────────────────────────────────
80
+ // TOOL: Per-skill tools (one per embedded skill)
81
+ // Each returns the full SKILL.md for the LLM to follow
82
+ // ──────────────────────────────────────────────────────────────────
83
+ for (const skill of registry.getAll()) {
84
+ const toolName = skill.name.replace(/-/g, "_");
85
+ server.registerTool(toolName, {
86
+ title: skill.title,
87
+ description: skill.description,
88
+ inputSchema: {
89
+ include_assets: z
90
+ .boolean()
91
+ .optional()
92
+ .default(false)
93
+ .describe("If true, also returns the contents of all asset and reference files."),
94
+ },
95
+ annotations: { readOnlyHint: true },
96
+ }, async ({ include_assets }) => {
97
+ const content = [
98
+ {
99
+ type: "text",
100
+ text: skill.skillMd,
101
+ },
102
+ ];
103
+ if (include_assets) {
104
+ const extras = skill.files.filter((f) => f.relativePath !== "SKILL.md" &&
105
+ (f.relativePath.startsWith("assets/") ||
106
+ f.relativePath.startsWith("references/")));
107
+ for (const file of extras) {
108
+ content.push({
109
+ type: "text",
110
+ text: `\n--- FILE: ${file.relativePath} ---\n${file.content}`,
111
+ });
112
+ }
113
+ }
114
+ return { content };
115
+ });
116
+ }
117
+ // ──────────────────────────────────────────────────────────────────
118
+ // TOOL: get_skill_file
119
+ // Fetches a specific file from a skill (asset, reference, template)
120
+ // ──────────────────────────────────────────────────────────────────
121
+ server.registerTool("get_skill_file", {
122
+ title: "Get a file from a skill package",
123
+ description: "Returns the content of a specific file from a skill package. " +
124
+ "Use this to fetch templates, reference docs, or asset files " +
125
+ "referenced in the SKILL.md instructions.",
126
+ inputSchema: {
127
+ skill_name: z
128
+ .string()
129
+ .describe('The skill tool name (e.g. "create_fabric_lakehouse")'),
130
+ file_path: z
131
+ .string()
132
+ .describe('Relative path within the skill (e.g. "assets/notebook-template.py")'),
133
+ },
134
+ annotations: { readOnlyHint: true },
135
+ }, async ({ skill_name, file_path }) => {
136
+ const content = registry.getFile(skill_name, file_path);
137
+ if (!content) {
138
+ return {
139
+ content: [
140
+ {
141
+ type: "text",
142
+ text: `File not found: ${file_path} in skill ${skill_name}`,
143
+ },
144
+ ],
145
+ isError: true,
146
+ };
147
+ }
148
+ return { content: [{ type: "text", text: content }] };
149
+ });
150
+ // ──────────────────────────────────────────────────────────────────
151
+ // TOOL: list_skill_files
152
+ // Lists all files available in a given skill package
153
+ // ──────────────────────────────────────────────────────────────────
154
+ server.registerTool("list_skill_files", {
155
+ title: "List files in a skill package",
156
+ description: "Returns a list of all files (assets, references, templates) " +
157
+ "available in a specific skill package.",
158
+ inputSchema: {
159
+ skill_name: z
160
+ .string()
161
+ .describe('The skill tool name (e.g. "create_fabric_lakehouse")'),
162
+ },
163
+ annotations: { readOnlyHint: true },
164
+ }, async ({ skill_name }) => {
165
+ const skill = registry.get(skill_name);
166
+ if (!skill) {
167
+ return {
168
+ content: [
169
+ {
170
+ type: "text",
171
+ text: `Skill not found: ${skill_name}`,
172
+ },
173
+ ],
174
+ isError: true,
175
+ };
176
+ }
177
+ return {
178
+ content: [
179
+ {
180
+ type: "text",
181
+ text: JSON.stringify(skill.files.map((f) => f.relativePath), null, 2),
182
+ },
183
+ ],
184
+ };
185
+ });
186
+ // ──────────────────────────────────────────────────────────────────
187
+ // PROMPTS: One per skill as a quick-start entry point
188
+ // ──────────────────────────────────────────────────────────────────
189
+ for (const skill of registry.getAll()) {
190
+ server.registerPrompt(skill.name, {
191
+ title: skill.title,
192
+ description: `Quick-start prompt for the ${skill.title} skill`,
193
+ }, () => ({
194
+ messages: [
195
+ {
196
+ role: "user",
197
+ content: {
198
+ type: "text",
199
+ text: `I want to use the "${skill.title}" skill. ` +
200
+ `Please call the ${skill.name.replace(/-/g, "_")} tool to load the skill instructions, ` +
201
+ `then follow them step by step to help me.`,
202
+ },
203
+ },
204
+ ],
205
+ }));
206
+ }
207
+ return server;
208
+ }
@@ -0,0 +1,11 @@
1
+ export interface SkillFile {
2
+ relativePath: string;
3
+ content: string;
4
+ }
5
+ export interface EmbeddedSkill {
6
+ name: string;
7
+ category: string;
8
+ files: SkillFile[];
9
+ }
10
+ export declare const EMBEDDED_SKILLS: EmbeddedSkill[];
11
+ //# sourceMappingURL=embedded.d.ts.map
@@ -0,0 +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,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,SAAS,EAAE,CAAC;CACpB;AAED,eAAO,MAAM,eAAe,EAAE,aAAa,EAqQ1C,CAAC"}