@storybook/mcp 11.0.0-alpha.3 → 11.0.0-alpha.4

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/dist/index.js +20 -10
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_ve4nsqf8lo9 from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_ve4nsqf8lo9 from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_ve4nsqf8lo9 from "node:module";
1
+ import CJS_COMPAT_NODE_URL_2k0ec9wyd2d from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_2k0ec9wyd2d from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_2k0ec9wyd2d from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_ve4nsqf8lo9.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_ve4nsqf8lo9.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_ve4nsqf8lo9.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_2k0ec9wyd2d.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_2k0ec9wyd2d.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_2k0ec9wyd2d.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
@@ -24,7 +24,7 @@ import { HttpTransport } from "@tmcp/transport-http";
24
24
  // package.json
25
25
  var package_default = {
26
26
  name: "@storybook/mcp",
27
- version: "11.0.0-alpha.3",
27
+ version: "11.0.0-alpha.4",
28
28
  description: "MCP server that serves knowledge about your components based on your Storybook stories and documentation",
29
29
  keywords: [
30
30
  "mcp",
@@ -129,7 +129,17 @@ function getToolName(context) {
129
129
  };
130
130
  }
131
131
 
132
- // ../../core/dist/_browser-chunks/chunk-PMPHKUPK.js
132
+ // ../../core/dist/_browser-chunks/chunk-7OC3MZ62.js
133
+ function defineToolset(definition) {
134
+ for (let [methodName, method] of Object.entries(definition.methods)) {
135
+ let input = method.input;
136
+ if (input["~standard"].vendor === "valibot" && input.type !== "strict_object")
137
+ throw new Error(
138
+ `Toolset method "${definition.id}.${methodName}" must declare its input with v.strictObject, got a valibot "${String(input.type)}" schema. Undeclared arguments would otherwise be silently dropped or passed through instead of rejected.`
139
+ );
140
+ }
141
+ return definition;
142
+ }
133
143
  function resolveToolsetDescription(description3, context) {
134
144
  return typeof description3 == "function" ? description3(context) : description3;
135
145
  }
@@ -1713,7 +1723,7 @@ function createDocsToolset(options) {
1713
1723
  )
1714
1724
  )
1715
1725
  }, showStorySchema = multiSource ? strictObject({ ...showStoryFields, ...storybookIdField }) : strictObject(showStoryFields), access = (storybookId, ctx2) => multiSource ? selectSource(sources, storybookId, ctx2) : { access: docsAccess };
1716
- return {
1726
+ return defineToolset({
1717
1727
  id: DOCS_TOOLSET_ID,
1718
1728
  description: "Storybook component and docs documentation.",
1719
1729
  methods: {
@@ -1782,7 +1792,7 @@ function createDocsToolset(options) {
1782
1792
  }
1783
1793
  }
1784
1794
  }
1785
- };
1795
+ });
1786
1796
  }
1787
1797
 
1788
1798
  // src/utils/error-to-mcp-content.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/mcp",
3
- "version": "11.0.0-alpha.3",
3
+ "version": "11.0.0-alpha.4",
4
4
  "description": "MCP server that serves knowledge about your components based on your Storybook stories and documentation",
5
5
  "keywords": [
6
6
  "mcp",
@@ -49,7 +49,7 @@
49
49
  "react-docgen": "^8.0.2",
50
50
  "react-docgen-typescript": "^2.4.0",
51
51
  "srvx": "^0.8.16",
52
- "storybook": "11.0.0-alpha.3",
52
+ "storybook": "11.0.0-alpha.4",
53
53
  "tinyexec": "^1.0.2",
54
54
  "typescript": "^6.0.3"
55
55
  },