@storybook/addon-mcp 11.0.0-rc.1 → 11.0.0-rc.3
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/preset.js
CHANGED
|
@@ -6,7 +6,7 @@ import { HttpTransport } from "@tmcp/transport-http";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@storybook/addon-mcp",
|
|
9
|
-
version: "11.0.0-rc.
|
|
9
|
+
version: "11.0.0-rc.3",
|
|
10
10
|
description: "Help agents automatically write and test stories for your UI components",
|
|
11
11
|
keywords: [
|
|
12
12
|
"ai",
|
|
@@ -537,14 +537,12 @@ var transport, initialize, disableTelemetry, a11yEnabled, initializeMCPServer =
|
|
|
537
537
|
basePath,
|
|
538
538
|
endpoint = DEFAULT_MCP_ENDPOINT,
|
|
539
539
|
sources,
|
|
540
|
+
multiSource = sources?.some((s) => s.url),
|
|
540
541
|
manifestProvider,
|
|
541
542
|
localAccess,
|
|
542
543
|
compositionAuth
|
|
543
544
|
}) => {
|
|
544
|
-
initialize || (initialize = initializeMCPServer(
|
|
545
|
-
options,
|
|
546
|
-
sources?.some((s) => s.url)
|
|
547
|
-
)), await initialize;
|
|
545
|
+
initialize || (initialize = initializeMCPServer(options, multiSource)), await initialize;
|
|
548
546
|
let webRequest = await incomingMessageToWebRequest(req), addonContext = {
|
|
549
547
|
options,
|
|
550
548
|
endpoint,
|
|
@@ -879,7 +877,8 @@ import path from "node:path";
|
|
|
879
877
|
// src/auth/composition-auth.ts
|
|
880
878
|
import {
|
|
881
879
|
ComponentManifestMap,
|
|
882
|
-
DocsManifestMap
|
|
880
|
+
DocsManifestMap,
|
|
881
|
+
REF_MANIFEST_FETCH_TIMEOUT_MS
|
|
883
882
|
} from "storybook/internal/toolsets-docs";
|
|
884
883
|
import { logger as logger4 } from "storybook/internal/node-logger";
|
|
885
884
|
import * as v2 from "valibot";
|
|
@@ -892,84 +891,117 @@ var OAuthResourceMetadata = v2.object({
|
|
|
892
891
|
authorization_endpoint: v2.string(),
|
|
893
892
|
token_endpoint: v2.string(),
|
|
894
893
|
scopes_supported: v2.optional(v2.array(v2.string()))
|
|
895
|
-
}),
|
|
894
|
+
}), RECHECK_BASE_DELAY = 5 * 1e3, RECHECK_MAX_DELAY = 60 * 1e3, RECHECK_WAIT = 3 * 1e3, isTransientStatus = (status) => status === 408 || status === 429 || status >= 500 && status !== 501, fetchRef = (url2, init = {}) => fetch(url2, { ...init, signal: AbortSignal.timeout(REF_MANIFEST_FETCH_TIMEOUT_MS) }), probeRef = async (url2, init) => {
|
|
895
|
+
let response = await fetchRef(url2, init);
|
|
896
|
+
if (isTransientStatus(response.status))
|
|
897
|
+
throw new Error(`${url2} responded with ${response.status}`);
|
|
898
|
+
return response;
|
|
899
|
+
}, MANIFEST_CACHE_TTL = 3600 * 1e3, REVALIDATION_TTL = 60 * 1e3, AuthenticationError = class extends Error {
|
|
896
900
|
constructor(url2) {
|
|
897
901
|
super(`Authentication failed for ${url2}. Your token may be invalid or expired.`), this.name = "AuthenticationError";
|
|
898
902
|
}
|
|
899
|
-
},
|
|
900
|
-
#
|
|
901
|
-
#authRequiredUrls = [];
|
|
902
|
-
#refsWithManifests = [];
|
|
903
|
+
}, CompositionAuth = class {
|
|
904
|
+
#refStates = [];
|
|
903
905
|
#manifestCache = /* @__PURE__ */ new Map();
|
|
904
906
|
#lastToken = null;
|
|
905
907
|
#authErrors = /* @__PURE__ */ new WeakMap();
|
|
906
908
|
/** Initialize by checking which refs require authentication and have manifests. */
|
|
907
909
|
async initialize(refs) {
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
910
|
+
this.#refStates = refs.map((ref) => ({
|
|
911
|
+
ref,
|
|
912
|
+
status: { kind: "unreachable", failures: 0, retryAt: 0 }
|
|
913
|
+
})), await Promise.all(this.#refStates.map((state) => this.#recheckIfDue(state)));
|
|
914
|
+
}
|
|
915
|
+
// Never rejects
|
|
916
|
+
#check(state) {
|
|
917
|
+
return state.check ??= this.#checkRef(state.ref.url).then(
|
|
918
|
+
(result) => this.#applyResult(state, result),
|
|
919
|
+
(error) => this.#applyFailure(state, error)
|
|
920
|
+
).catch((error) => {
|
|
921
|
+
logger4.warn(
|
|
922
|
+
`[addon-mcp] Checking composed ref "${state.ref.title}" failed: ${error instanceof Error ? error.message : String(error)}`
|
|
923
|
+
);
|
|
924
|
+
}).finally(() => {
|
|
925
|
+
state.check = void 0;
|
|
926
|
+
}), state.check;
|
|
927
|
+
}
|
|
928
|
+
/** Re-checks an unreachable ref that is due, waiting at most `RECHECK_WAIT` for it. */
|
|
929
|
+
async #recheckIfDue(state) {
|
|
930
|
+
let { status } = state;
|
|
931
|
+
if (status.kind !== "unreachable" || status.retryAt > Date.now()) return;
|
|
932
|
+
let timer;
|
|
933
|
+
await Promise.race([
|
|
934
|
+
this.#check(state),
|
|
935
|
+
new Promise((resolve) => {
|
|
936
|
+
timer = setTimeout(resolve, RECHECK_WAIT);
|
|
937
|
+
})
|
|
938
|
+
]), clearTimeout(timer);
|
|
939
|
+
}
|
|
940
|
+
#applyFailure(state, error) {
|
|
941
|
+
let { ref, status } = state, failures = status.kind === "unreachable" ? status.failures + 1 : 1, delay = Math.min(RECHECK_BASE_DELAY * 2 ** (failures - 1), RECHECK_MAX_DELAY);
|
|
942
|
+
state.status = { kind: "unreachable", failures, retryAt: Date.now() + delay }, failures === 1 && logger4.warn(
|
|
943
|
+
`[addon-mcp] Composed ref "${ref.title}" (${ref.url}) could not be reached (${error instanceof Error ? error.message : String(error)}). It is checked again when MCP next reads it.`
|
|
944
|
+
);
|
|
945
|
+
}
|
|
946
|
+
#applyResult(state, result) {
|
|
947
|
+
let { ref } = state, previous = state.status;
|
|
948
|
+
if (previous.kind === "unreachable" && previous.failures > 0 && logger4.info(`[addon-mcp] Composed ref "${ref.title}" (${ref.url}) is reachable again.`), result === "manifest-not-found") {
|
|
949
|
+
state.status = { kind: "excluded" }, logger4.warn(
|
|
950
|
+
`[addon-mcp] Skipping composed ref "${ref.title}" (${ref.url}): components manifest not found at ${ref.url}/manifests/components.json. Enable the \`componentsManifest\` feature on that Storybook to compose it into MCP.`
|
|
951
|
+
);
|
|
952
|
+
return;
|
|
953
|
+
}
|
|
954
|
+
if (result === "manifest-invalid") {
|
|
955
|
+
state.status = { kind: "excluded" }, logger4.warn(
|
|
956
|
+
`[addon-mcp] Skipping composed ref "${ref.title}" (${ref.url}): its components manifest failed validation. This usually means a version mismatch between the composed Storybook and this one \u2014 upgrade the older side.`
|
|
957
|
+
);
|
|
958
|
+
return;
|
|
940
959
|
}
|
|
960
|
+
if (result === "public") {
|
|
961
|
+
state.status = { kind: "public" };
|
|
962
|
+
return;
|
|
963
|
+
}
|
|
964
|
+
let previousFirst = this.#authStates()[0];
|
|
965
|
+
state.status = { kind: "auth", requirement: result };
|
|
966
|
+
let [first] = this.#authStates(), other = first.ref === ref ? previousFirst : { ref, requirement: result }, advertised = first.requirement.resourceMetadata.authorization_servers[0], server = other?.requirement.resourceMetadata.authorization_servers[0];
|
|
967
|
+
other && server !== advertised && logger4.warn(
|
|
968
|
+
`[addon-mcp] Composed ref "${other.ref.title}" uses a different OAuth server (${server}) than the first authenticated ref (${advertised}). Only the first OAuth server will be used for authentication.`
|
|
969
|
+
);
|
|
970
|
+
}
|
|
971
|
+
#authStates() {
|
|
972
|
+
return this.#refStates.flatMap(
|
|
973
|
+
({ ref, status }) => status.kind === "auth" ? [{ ref, requirement: status.requirement }] : []
|
|
974
|
+
);
|
|
941
975
|
}
|
|
942
976
|
get requiresAuth() {
|
|
943
|
-
return this
|
|
977
|
+
return this.authUrls.length > 0;
|
|
944
978
|
}
|
|
945
979
|
get authUrls() {
|
|
946
|
-
return this.#
|
|
980
|
+
return this.#authStates().map(({ ref }) => ref.url);
|
|
947
981
|
}
|
|
948
982
|
/** Check if a request encountered an auth error during manifest fetching. */
|
|
949
983
|
hadAuthError(request) {
|
|
950
984
|
return this.#authErrors.has(request);
|
|
951
985
|
}
|
|
952
|
-
/**
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
/** Build .well-known/oauth-protected-resource response for the MCP endpoint at `resource`. */
|
|
986
|
+
/**
|
|
987
|
+
* Build .well-known/oauth-protected-resource response for the MCP endpoint at `resource`. The
|
|
988
|
+
* first private ref in config order decides the OAuth server.
|
|
989
|
+
*/
|
|
957
990
|
buildWellKnown(resource) {
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
} : null;
|
|
991
|
+
let [first] = this.#authStates();
|
|
992
|
+
if (!first) return null;
|
|
993
|
+
let { authorization_servers, scopes_supported } = first.requirement.resourceMetadata;
|
|
994
|
+
return { resource, authorization_servers, scopes_supported };
|
|
963
995
|
}
|
|
964
996
|
/** Build WWW-Authenticate header for 401 responses */
|
|
965
997
|
buildWwwAuthenticate(baseUrl) {
|
|
966
998
|
return `Bearer error="unauthorized", error_description="Authorization needed for composed Storybooks", resource_metadata="${baseUrl}/.well-known/oauth-protected-resource"`;
|
|
967
999
|
}
|
|
968
|
-
/** Build sources configuration: local first, then
|
|
1000
|
+
/** Build sources configuration: local first, then every ref that is not excluded. */
|
|
969
1001
|
buildSources() {
|
|
970
1002
|
return [
|
|
971
1003
|
{ id: "local", title: "Local" },
|
|
972
|
-
...this.#
|
|
1004
|
+
...this.#refStates.filter(({ status }) => status.kind !== "excluded").map(({ ref }) => ({
|
|
973
1005
|
id: ref.id,
|
|
974
1006
|
title: ref.title,
|
|
975
1007
|
url: ref.url
|
|
@@ -985,7 +1017,14 @@ var OAuthResourceMetadata = v2.object({
|
|
|
985
1017
|
*/
|
|
986
1018
|
createManifestProvider(localBaseUrl) {
|
|
987
1019
|
return async (request, path2, source) => {
|
|
988
|
-
let token = extractBearerToken(request?.headers.get("Authorization")), remoteSource = source?.url ? { ...source, url: source.url } : void 0,
|
|
1020
|
+
let token = extractBearerToken(request?.headers.get("Authorization")), remoteSource = source?.url ? { ...source, url: source.url } : void 0, state = remoteSource && this.#refStates.find(({ ref }) => ref.url === remoteSource.url);
|
|
1021
|
+
if (state && await this.#recheckIfDue(state), state?.status.kind === "unreachable")
|
|
1022
|
+
throw new Error(
|
|
1023
|
+
`"${state.ref.title}" is temporarily unreachable. It is checked again when MCP next reads it.`
|
|
1024
|
+
);
|
|
1025
|
+
if (state?.status.kind === "excluded")
|
|
1026
|
+
throw new Error(`"${state.ref.title}" has no usable components manifest.`);
|
|
1027
|
+
let manifestUrl = `${remoteSource?.url ?? localBaseUrl}${path2.replace(/^\.\//, "/")}`, isRemote = !!remoteSource, tokenForRequest = state?.status.kind === "auth" ? token : null;
|
|
989
1028
|
if (token && token !== this.#lastToken && (this.#manifestCache.clear(), this.#lastToken = token), isRemote) {
|
|
990
1029
|
let cached = this.#manifestCache.get(manifestUrl);
|
|
991
1030
|
if (cached)
|
|
@@ -1016,7 +1055,7 @@ var OAuthResourceMetadata = v2.object({
|
|
|
1016
1055
|
async #fetchManifest(url2, token) {
|
|
1017
1056
|
let headers = { Accept: "application/json" };
|
|
1018
1057
|
token && (headers.Authorization = `Bearer ${token}`);
|
|
1019
|
-
let response = await
|
|
1058
|
+
let response = await fetchRef(url2, { headers });
|
|
1020
1059
|
if (response.status === 401)
|
|
1021
1060
|
throw new AuthenticationError(url2);
|
|
1022
1061
|
if (!response.ok)
|
|
@@ -1036,10 +1075,7 @@ var OAuthResourceMetadata = v2.object({
|
|
|
1036
1075
|
* 'manifest-invalid' for real JSON that fails the manifest schema.
|
|
1037
1076
|
*/
|
|
1038
1077
|
async #checkRef(refUrl) {
|
|
1039
|
-
let
|
|
1040
|
-
headers: { Accept: "application/json" },
|
|
1041
|
-
signal: AbortSignal.timeout(REF_PROBE_TIMEOUT_MS)
|
|
1042
|
-
}), authReq = await this.#parseAuthFromResponse(response);
|
|
1078
|
+
let manifestUrl = `${refUrl}/manifests/components.json`, response = await probeRef(manifestUrl, { headers: { Accept: "application/json" } }), authReq = await this.#parseAuthFromResponse(response);
|
|
1043
1079
|
if (authReq) return authReq;
|
|
1044
1080
|
let noManifestReason = "manifest-not-found";
|
|
1045
1081
|
if (response.ok) {
|
|
@@ -1055,22 +1091,20 @@ var OAuthResourceMetadata = v2.object({
|
|
|
1055
1091
|
}
|
|
1056
1092
|
/** Check /mcp endpoint for 401 auth requirement. */
|
|
1057
1093
|
async #checkMcpAuth(refUrl) {
|
|
1058
|
-
let response = await
|
|
1094
|
+
let response = await probeRef(`${refUrl}/mcp`, {
|
|
1059
1095
|
method: "POST",
|
|
1060
1096
|
headers: { "Content-Type": "application/json" },
|
|
1061
|
-
body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/list" })
|
|
1062
|
-
signal: AbortSignal.timeout(REF_PROBE_TIMEOUT_MS)
|
|
1097
|
+
body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/list" })
|
|
1063
1098
|
});
|
|
1064
1099
|
return this.#parseAuthFromResponse(response);
|
|
1065
1100
|
}
|
|
1066
1101
|
/** Quick check: does the remote /mcp return 401? */
|
|
1067
1102
|
async #isMcpUnauthorized(origin) {
|
|
1068
1103
|
try {
|
|
1069
|
-
return (await
|
|
1104
|
+
return (await fetchRef(`${origin}/mcp`, {
|
|
1070
1105
|
method: "POST",
|
|
1071
1106
|
headers: { "Content-Type": "application/json" },
|
|
1072
|
-
body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/list" })
|
|
1073
|
-
signal: AbortSignal.timeout(REF_PROBE_TIMEOUT_MS)
|
|
1107
|
+
body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/list" })
|
|
1074
1108
|
})).status === 401;
|
|
1075
1109
|
} catch {
|
|
1076
1110
|
return !1;
|
|
@@ -1083,9 +1117,7 @@ var OAuthResourceMetadata = v2.object({
|
|
|
1083
1117
|
if (!wwwAuth) return null;
|
|
1084
1118
|
let match = wwwAuth.match(/resource_metadata="([^"]+)"/);
|
|
1085
1119
|
if (!match?.[1]) return null;
|
|
1086
|
-
let resourceMetadataUrl = match[1], resourceResponse = await
|
|
1087
|
-
signal: AbortSignal.timeout(REF_PROBE_TIMEOUT_MS)
|
|
1088
|
-
});
|
|
1120
|
+
let resourceMetadataUrl = match[1], resourceResponse = await probeRef(resourceMetadataUrl);
|
|
1089
1121
|
if (!resourceResponse.ok)
|
|
1090
1122
|
return logger4.warn(
|
|
1091
1123
|
`[addon-mcp] Failed to fetch OAuth resource metadata from ${resourceMetadataUrl}: ${resourceResponse.status}`
|
|
@@ -1095,9 +1127,7 @@ var OAuthResourceMetadata = v2.object({
|
|
|
1095
1127
|
return logger4.warn(
|
|
1096
1128
|
`[addon-mcp] Invalid OAuth resource metadata from ${resourceMetadataUrl}: ${resourceResult.issues.map((i) => i.message).join(", ")}`
|
|
1097
1129
|
), null;
|
|
1098
|
-
let serverMetadataUrl = `${resourceResult.output.authorization_servers[0]}/.well-known/oauth-authorization-server`, serverResponse = await
|
|
1099
|
-
signal: AbortSignal.timeout(REF_PROBE_TIMEOUT_MS)
|
|
1100
|
-
});
|
|
1130
|
+
let serverMetadataUrl = `${resourceResult.output.authorization_servers[0]}/.well-known/oauth-authorization-server`, serverResponse = await probeRef(serverMetadataUrl);
|
|
1101
1131
|
if (!serverResponse.ok)
|
|
1102
1132
|
return logger4.warn(
|
|
1103
1133
|
`[addon-mcp] Failed to fetch OAuth server metadata from ${serverMetadataUrl}: ${serverResponse.status}`
|
|
@@ -1121,15 +1151,10 @@ function extractBearerToken(authHeader) {
|
|
|
1121
1151
|
import { getRefsFromConfig } from "storybook/internal/core-server";
|
|
1122
1152
|
async function resolveCompositionSources(options) {
|
|
1123
1153
|
let refs = await getRefsFromConfig(options), compositionAuth = new CompositionAuth();
|
|
1124
|
-
|
|
1125
|
-
return { refs, compositionAuth, sources: void 0, multiSource: !1 };
|
|
1126
|
-
await compositionAuth.initialize(refs);
|
|
1127
|
-
let sources = compositionAuth.buildSources();
|
|
1128
|
-
return {
|
|
1154
|
+
return refs.length > 0 && await compositionAuth.initialize(refs), {
|
|
1129
1155
|
refs,
|
|
1130
1156
|
compositionAuth,
|
|
1131
|
-
|
|
1132
|
-
multiSource: sources.some((source) => !!source.url)
|
|
1157
|
+
multiSource: compositionAuth.buildSources().some((source) => !!source.url)
|
|
1133
1158
|
};
|
|
1134
1159
|
}
|
|
1135
1160
|
|
|
@@ -1152,7 +1177,7 @@ async function getStoryIndex(options) {
|
|
|
1152
1177
|
|
|
1153
1178
|
// src/preset.ts
|
|
1154
1179
|
var previewAnnotations = async (existingAnnotations = []) => [...existingAnnotations, path.join(import.meta.dirname, "preview.js")];
|
|
1155
|
-
function buildComposition({ refs, compositionAuth,
|
|
1180
|
+
function buildComposition({ refs, compositionAuth, multiSource }, {
|
|
1156
1181
|
options,
|
|
1157
1182
|
baseUrl,
|
|
1158
1183
|
rawAvailability
|
|
@@ -1161,10 +1186,14 @@ function buildComposition({ refs, compositionAuth, sources, multiSource }, {
|
|
|
1161
1186
|
storyIndex: { getIndex: () => getStoryIndex(options) },
|
|
1162
1187
|
getManifests: () => loadManifests(options.presets)
|
|
1163
1188
|
}) : void 0;
|
|
1164
|
-
refs.length > 0 && (logger6.info(`Initialized composition with ${refs.length} remote Storybook(s)`), compositionAuth.requiresAuth && logger6.info(`Auth required for: ${compositionAuth.authUrls.join(", ")}`), logger6.info(
|
|
1189
|
+
refs.length > 0 && (logger6.info(`Initialized composition with ${refs.length} remote Storybook(s)`), compositionAuth.requiresAuth && logger6.info(`Auth required for: ${compositionAuth.authUrls.join(", ")}`), logger6.info(
|
|
1190
|
+
`Sources: ${compositionAuth.buildSources().map((source) => source.id).join(", ")}`
|
|
1191
|
+
));
|
|
1165
1192
|
let manifestProvider = refs.length > 0 ? compositionAuth.createManifestProvider(baseUrl) : void 0;
|
|
1166
1193
|
return {
|
|
1167
|
-
|
|
1194
|
+
// Read per request, since a re-check can drop a ref that has no manifest
|
|
1195
|
+
currentSources: () => refs.length > 0 ? compositionAuth.buildSources() : void 0,
|
|
1196
|
+
multiSource,
|
|
1168
1197
|
compositionAuth,
|
|
1169
1198
|
manifestAccess: { manifestProvider, localAccess },
|
|
1170
1199
|
// Same gates the MCP server uses to register these tools, so the page can't
|
|
@@ -1218,7 +1247,7 @@ var experimental_devServer = async (app, options) => {
|
|
|
1218
1247
|
};
|
|
1219
1248
|
return app.post(endpoint, async (req, res) => {
|
|
1220
1249
|
if (rejectDisallowedOrigin(req, res)) return;
|
|
1221
|
-
let {
|
|
1250
|
+
let { currentSources, compositionAuth, manifestAccess, multiSource } = await composition, sources = currentSources();
|
|
1222
1251
|
if (!requireAuth(req, res, compositionAuth) && !rejectNonJsonBody(req, res))
|
|
1223
1252
|
return mcpServerHandler({
|
|
1224
1253
|
req,
|
|
@@ -1228,13 +1257,15 @@ var experimental_devServer = async (app, options) => {
|
|
|
1228
1257
|
basePath,
|
|
1229
1258
|
endpoint,
|
|
1230
1259
|
sources,
|
|
1260
|
+
multiSource,
|
|
1231
1261
|
...manifestAccess,
|
|
1232
1262
|
compositionAuth
|
|
1233
1263
|
});
|
|
1234
1264
|
}), app.get(endpoint, async (req, res) => {
|
|
1235
1265
|
if (rejectDisallowedOrigin(req, res)) return;
|
|
1236
|
-
let {
|
|
1237
|
-
if (!req.headers.accept?.includes("text/html"))
|
|
1266
|
+
let { currentSources, compositionAuth, manifestAccess, availability, multiSource } = await composition;
|
|
1267
|
+
if (!req.headers.accept?.includes("text/html")) {
|
|
1268
|
+
let sources = currentSources();
|
|
1238
1269
|
return requireAuth(req, res, compositionAuth) ? void 0 : mcpServerHandler({
|
|
1239
1270
|
req,
|
|
1240
1271
|
res,
|
|
@@ -1243,9 +1274,11 @@ var experimental_devServer = async (app, options) => {
|
|
|
1243
1274
|
basePath,
|
|
1244
1275
|
endpoint,
|
|
1245
1276
|
sources,
|
|
1277
|
+
multiSource,
|
|
1246
1278
|
...manifestAccess,
|
|
1247
1279
|
compositionAuth
|
|
1248
1280
|
});
|
|
1281
|
+
}
|
|
1249
1282
|
let {
|
|
1250
1283
|
moduleGraphSupported,
|
|
1251
1284
|
docsEnabled,
|
|
@@ -4,7 +4,7 @@ var MCP_APP_PARAM = "mcp-app", MCP_APP_SIZE_CHANGED_EVENT = "storybook-mcp:size-
|
|
|
4
4
|
// package.json
|
|
5
5
|
var package_default = {
|
|
6
6
|
name: "@storybook/addon-mcp",
|
|
7
|
-
version: "11.0.0-rc.
|
|
7
|
+
version: "11.0.0-rc.3",
|
|
8
8
|
description: "Help agents automatically write and test stories for your UI components",
|
|
9
9
|
keywords: [
|
|
10
10
|
"ai",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/addon-mcp",
|
|
3
|
-
"version": "11.0.0-rc.
|
|
3
|
+
"version": "11.0.0-rc.3",
|
|
4
4
|
"description": "Help agents automatically write and test stories for your UI components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
"valibot": "^1.4.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@storybook/addon-a11y": "11.0.0-rc.
|
|
46
|
-
"@storybook/addon-vitest": "11.0.0-rc.
|
|
47
|
-
"storybook": "11.0.0-rc.
|
|
45
|
+
"@storybook/addon-a11y": "11.0.0-rc.3",
|
|
46
|
+
"@storybook/addon-vitest": "11.0.0-rc.3",
|
|
47
|
+
"storybook": "11.0.0-rc.3",
|
|
48
48
|
"typescript": "^6.0.3"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@storybook/addon-vitest": "^11.0.0-rc.
|
|
52
|
-
"storybook": "^11.0.0-rc.
|
|
51
|
+
"@storybook/addon-vitest": "^11.0.0-rc.3",
|
|
52
|
+
"storybook": "^11.0.0-rc.3"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
55
55
|
"@storybook/addon-vitest": {
|