@feimacode/open-design-agent-kit-mcp 0.1.4 → 0.1.5

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.
Files changed (2) hide show
  1. package/out/index.js +29 -1
  2. package/package.json +2 -2
package/out/index.js CHANGED
@@ -4709,6 +4709,19 @@ async function listSkills(ctx, input) {
4709
4709
  exampleArtifactPath: s.exampleArtifactPath
4710
4710
  }));
4711
4711
  }
4712
+ async function listRemixablePrompts(ctx) {
4713
+ const skills = await ctx.contentIndex.listSkills(void 0, void 0, "example", true);
4714
+ return skills.map((s) => ({
4715
+ name: s.id.replace(/:/g, "-"),
4716
+ publicId: s.id,
4717
+ displayName: s.name,
4718
+ examplePrompt: s.examplePrompt
4719
+ }));
4720
+ }
4721
+ function buildRemixPromptMessage(prompt) {
4722
+ const brief = prompt.examplePrompt ? ` ${prompt.examplePrompt}` : "";
4723
+ return `Use the OpenDesign skill "${prompt.publicId}" (${prompt.displayName}).${brief}`;
4724
+ }
4712
4725
  async function listDesignSystems(ctx, input) {
4713
4726
  const designSystems = await ctx.contentIndex.listDesignSystems(input.query, input.category);
4714
4727
  const activeId = await ctx.store.get();
@@ -5047,7 +5060,7 @@ function buildContext() {
5047
5060
  }
5048
5061
  async function main() {
5049
5062
  const ctx = buildContext();
5050
- const server = new import_server.Server({ name: "open-design", version: "0.1.0" }, { capabilities: { tools: {} } });
5063
+ const server = new import_server.Server({ name: "open-design", version: "0.1.0" }, { capabilities: { tools: {}, prompts: {} } });
5051
5064
  server.setRequestHandler(import_types.ListToolsRequestSchema, async () => ({ tools: TOOL_DEFS.map((d) => d.tool) }));
5052
5065
  server.setRequestHandler(import_types.CallToolRequestSchema, async (request) => {
5053
5066
  const def = TOOL_DEFS.find((d) => d.tool.name === request.params.name);
@@ -5062,6 +5075,21 @@ async function main() {
5062
5075
  return { content: [{ type: "text", text: `Tool "${request.params.name}" failed: ${message}` }], isError: true };
5063
5076
  }
5064
5077
  });
5078
+ server.setRequestHandler(import_types.ListPromptsRequestSchema, async () => {
5079
+ const prompts = await listRemixablePrompts(ctx);
5080
+ return { prompts: prompts.map((p) => ({ name: p.name, description: `${p.displayName} (OpenDesign remixable example)` })) };
5081
+ });
5082
+ server.setRequestHandler(import_types.GetPromptRequestSchema, async (request) => {
5083
+ const prompts = await listRemixablePrompts(ctx);
5084
+ const prompt = prompts.find((p) => p.name === request.params.name);
5085
+ if (!prompt) {
5086
+ throw new Error(`Unknown prompt: ${request.params.name}`);
5087
+ }
5088
+ return {
5089
+ description: `${prompt.displayName} (OpenDesign remixable example)`,
5090
+ messages: [{ role: "user", content: { type: "text", text: buildRemixPromptMessage(prompt) } }]
5091
+ };
5092
+ });
5065
5093
  const transport = new import_stdio.StdioServerTransport();
5066
5094
  await server.connect(transport);
5067
5095
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feimacode/open-design-agent-kit-mcp",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "OpenDesign as an MCP server — the same skill/design-system/artifact tools the VS Code extension exposes, usable from any MCP-capable coding agent (Claude Code, Codex, and others).",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -42,7 +42,7 @@
42
42
  "start": "node ./out/index.js"
43
43
  },
44
44
  "dependencies": {
45
- "@feimacode/open-design-agent-kit-content": "^0.1.4",
45
+ "@feimacode/open-design-agent-kit-content": "^0.1.5",
46
46
  "@modelcontextprotocol/sdk": "^1.30.0"
47
47
  },
48
48
  "devDependencies": {