@storybook/mcp 10.6.0-alpha.9 → 10.6.0-beta.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/dist/index.js +21 -10
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_7hlitxkau98 from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_7hlitxkau98 from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_7hlitxkau98 from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_7hlitxkau98.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_7hlitxkau98.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_7hlitxkau98.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: "10.6.0-
|
|
27
|
+
version: "10.6.0-beta.1",
|
|
28
28
|
description: "MCP server that serves knowledge about your components based on your Storybook stories and documentation",
|
|
29
29
|
keywords: [
|
|
30
30
|
"mcp",
|
|
@@ -99,7 +99,7 @@ function words(str) {
|
|
|
99
99
|
return Array.from(str.match(CASE_SPLIT_PATTERN) ?? []);
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
// ../../core/dist/_browser-chunks/chunk-
|
|
102
|
+
// ../../core/dist/_browser-chunks/chunk-TYQWMAQX.js
|
|
103
103
|
function kebabCase(str) {
|
|
104
104
|
return words(str).map((word) => word.toLowerCase()).join("-");
|
|
105
105
|
}
|
|
@@ -126,10 +126,21 @@ function toMcpToolName(method) {
|
|
|
126
126
|
return `${kebabCase(toolsetId)}-${toCliMethodName(methodName)}`;
|
|
127
127
|
}
|
|
128
128
|
function getToolName(context) {
|
|
129
|
-
return (method) =>
|
|
129
|
+
return (method) => {
|
|
130
|
+
switch (context.transport) {
|
|
131
|
+
case "mcp":
|
|
132
|
+
return toMcpToolName(method);
|
|
133
|
+
case "cli":
|
|
134
|
+
return `npx storybook tools ${toCliPath(method)}`;
|
|
135
|
+
case "sdk":
|
|
136
|
+
return method;
|
|
137
|
+
default:
|
|
138
|
+
return context.transport;
|
|
139
|
+
}
|
|
140
|
+
};
|
|
130
141
|
}
|
|
131
142
|
|
|
132
|
-
// ../../core/dist/_browser-chunks/chunk-
|
|
143
|
+
// ../../core/dist/_browser-chunks/chunk-KJ7GNWII.js
|
|
133
144
|
function getDocsToolsetInstructions(transport) {
|
|
134
145
|
let ref = getToolName({ transport });
|
|
135
146
|
return `## Documentation Workflow
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/mcp",
|
|
3
|
-
"version": "10.6.0-
|
|
3
|
+
"version": "10.6.0-beta.1",
|
|
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": "10.6.0-
|
|
52
|
+
"storybook": "10.6.0-beta.1",
|
|
53
53
|
"tinyexec": "^1.0.2",
|
|
54
54
|
"typescript": "^6.0.3"
|
|
55
55
|
},
|