Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions packages/design-system-mcp/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@

## Unreleased

### Bug Fixes

- Remove implicit dependency on `storybook` in TypeScript types ([#79132](https://github.com/WordPress/gutenberg/pull/79132)).

## 0.5.0 (2026-06-10)

## 0.4.0 (2026-05-27)

### Enhancements

- `get_component_details` now optionally accepts an array of component names so multiple components can be fetched in a single call. ([#78185](https://github.com/WordPress/gutenberg/pull/78185))
- The server now provides instructions on how AI agents should be expected to use it, improving discoverability and tool call efficiency. ([#78186](https://github.com/WordPress/gutenberg/pull/78186))
- `get_component_details` now optionally accepts an array of component names so multiple components can be fetched in a single call ([#78185](https://github.com/WordPress/gutenberg/pull/78185)).
- The server now provides instructions on how AI agents should be expected to use it, improving discoverability and tool call efficiency ([#78186](https://github.com/WordPress/gutenberg/pull/78186)).

## 0.3.0 (2026-05-14)

Expand Down
3 changes: 1 addition & 2 deletions packages/design-system-mcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@
"zod": "^4.3.6"
},
"devDependencies": {
"@types/jest": "^29.5.14",
"storybook": "^10.2.8"
"@types/jest": "^29.5.14"
},
"publishConfig": {
"access": "public"
Expand Down
1 change: 0 additions & 1 deletion packages/design-system-mcp/src/test/parse-components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ function createComponents(
value.path ??
`../packages/ui/src/${ key }/stories/index.story.tsx`,
stories: [],
jsDocTags: {},
...value,
};
}
Expand Down
13 changes: 10 additions & 3 deletions packages/design-system-mcp/src/types.ts

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that our types can now go out of sync with Storybook's first-party types, do have a way to know if/when we should update our types? In other words, should we strengthen runtime checks to validate the object structure received from Storybook APIs?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the type gets used in the config etc. it should be caught if there is a major upstream change.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we do lose some assurances here, since the other usage of Storybook internal types doesn't exercise the ComponentManifest type that we rely on so heavily in the MCP package. But also, a lot of what we depend on comes through the reactDocgen types that aren't part of those internal types anyways.

We still have the CI check for ensuring that the manifest is parseable. This should be enough to catch an issue if a Storybook upgrade would regress the ability to retrieve component information.

Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import type { ComponentManifest } from 'storybook/internal/types';

export interface ManifestComponent extends ComponentManifest {
export interface ManifestComponent {
id: string;
name: string;
path: string;
description?: string;
stories?: Array< {
name: string;
snippet?: string;
description?: string;
} >;
reactDocgen?: {
description?: string;
displayName?: string;
Expand Down
Loading