Skip to content

Skills M4 (9/9): document the finished toolset contract and refresh the lockfile - #35736

Closed
valentinpalkovic wants to merge 1 commit into
valentin/m4-08-hosted-mcp-on-corefrom
valentin/m4-09-docs-and-lockfile
Closed

valentinpalkovic wants to merge 1 commit into
valentin/m4-08-hosted-mcp-on-corefrom
valentin/m4-09-docs-and-lockfile

Conversation

@valentinpalkovic

Copy link
Copy Markdown
Contributor

Closes #35673

Part 9 of 9 of the Skills M4 migration. Stacked on #35735, replaces #35677.

What I did

Last part of the stack, and it is prose and hygiene only. It documents the toolset contract the previous eight PRs built, so that contributors adding a tool have something to read: how a tool declares its telemetry group, what shape a result takes, when a method should throw versus return a failure the agent can act on, which errors are safe to show an agent, and how documentation access is injected rather than looked up.

It also refreshes the lockfile of the MCP test Storybook once, here, instead of per slice. Regenerating it in every slice produces conflicting hashes on every rebase.

No product code changes. With this merged the tree is identical to #35677, which can be closed, and so can the issue.

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

Caution

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

There is no behavior to exercise in this PR, but the lockfile change is worth confirming rather than trusting:

  1. In test-storybooks/mcp, run yarn install and confirm it completes without rewriting the lockfile again.
  2. Run yarn storybook there and confirm the dev server starts and its MCP endpoint answers at http://localhost:6006/mcp.
  3. Read the contributor documentation added here against the tools you just saw listed, and check that nothing it describes is stale.

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Declare whether manual QA will be needed for this PR during the next release, through qa:needed or qa:skip

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>

@valentinpalkovic valentinpalkovic added maintenance User-facing maintenance tasks ci:normal Run our default set of CI jobs (choose this for most PRs). labels Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor
Fails
🚫

PR is not labeled with one of: ["qa:needed","qa:skip","qa:success"]

🚫 PR title must be in the format of "Area: Summary", With both Area and Summary starting with a capital letter Good examples: - "Docs: Describe Canvas Doc Block" - "Svelte: Support Svelte v4" Bad examples: - "add new api docs" - "fix: Svelte 4 support" - "Vue: improve docs"
🚫 This PR needs an approving review from a Storybook Core or Developer Experience team member before it can be merged.
Warnings
⚠️

This PR targets valentin/m4-08-hosted-mcp-on-core. The default branch for contributions is next. Please make sure you are targeting the correct branch.

Generated by 🚫 dangerJS against 31466f8

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The changes update Open services guidance for toolset contracts and document getToolset, toolset naming, consumer-aware references, registration, lookup errors, and adapter resolution.

Changes

Open service toolsets

Layer / File(s) Summary
Toolset contract guidance
AGENTS.md, code/core/src/shared/open-service/README.md
Documents toolset metadata, ToolsetOutcome, structured output, rendering, errors, telemetry, consumer context, UI roots, and portable documentation rules.
Public API and registration guidance
code/core/src/shared/open-service/README.md
Documents getToolset, toolset-names.ts, consumer-aware references, registration requirements, unknown-toolset errors, and adapter resolution.

Possibly related issues

Possibly related PRs


Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

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.

🧹 Nitpick comments (1)
code/core/src/shared/open-service/README.md (1)

142-148: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Clarify registration scope.

registerToolset uses a realm-global registry, and duplicate IDs are rejected. The phrase “registered wherever a consumer resolves it” can imply that each adapter should register the same toolset. State that each realm registers the toolset once from the paired service-registration path, including metadata-only consumers, and that adapters only resolve registered toolsets.

Proposed wording
- A toolset must be registered wherever a consumer resolves it, including consumers that only read its descriptions and schemas: `getToolset(id)` throws on an unregistered id rather than silently dropping a tool.
+ Register each toolset once per realm from the paired service-registration path before any consumer resolves it. This path must also run for consumers that only read descriptions or schemas. Adapters resolve registered toolsets with `getToolset(id)` or `getRegisteredToolsets()`; they do not register them. `getToolset(id)` throws on an unregistered id rather than silently dropping a tool.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@code/core/src/shared/open-service/README.md` around lines 142 - 148, Update
the README section describing registerToolset and getToolset to clarify that
each realm registers a toolset exactly once from its paired service-registration
path, including for metadata-only consumers. State that the registry is
realm-global with duplicate IDs rejected, and that adapters only resolve
already-registered toolsets rather than registering them.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@code/core/src/shared/open-service/README.md`:
- Around line 142-148: Update the README section describing registerToolset and
getToolset to clarify that each realm registers a toolset exactly once from its
paired service-registration path, including for metadata-only consumers. State
that the registry is realm-global with duplicate IDs rejected, and that adapters
only resolve already-registered toolsets rather than registering them.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 74613d6e-2a47-4ed4-87e7-21e800ab804c

📥 Commits

Reviewing files that changed from the base of the PR and between 8079a0d and 31466f8.

⛔ Files ignored due to path filters (1)
  • test-storybooks/mcp/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (2)
  • AGENTS.md
  • code/core/src/shared/open-service/README.md

@storybook-app-bot

Copy link
Copy Markdown
Contributor

Package Benchmarks

Commit: 31466f8, ran on 3 August 2026 at 23:15:23 UTC

The following packages have significant changes to their size or dependencies:

@storybook/addon-a11y

Before After Difference
Dependency count 0 2 🚨 +2 🚨
Self size 0 B 188 KB 🚨 +188 KB 🚨
Dependency size 0 B 3.03 MB 🚨 +3.03 MB 🚨
Bundle Size Analyzer Link Link

@storybook/addon-docs

Before After Difference
Dependency count 0 18 🚨 +18 🚨
Self size 0 B 1.29 MB 🚨 +1.29 MB 🚨
Dependency size 0 B 9.28 MB 🚨 +9.28 MB 🚨
Bundle Size Analyzer Link Link

@storybook/addon-links

Before After Difference
Dependency count 0 1 🚨 +1 🚨
Self size 0 B 14 KB 🚨 +14 KB 🚨
Dependency size 0 B 5 KB 🚨 +5 KB 🚨
Bundle Size Analyzer Link Link

@storybook/addon-mcp

Before After Difference
Dependency count 0 11 🚨 +11 🚨
Self size 0 B 129 KB 🚨 +129 KB 🚨
Dependency size 0 B 2.64 MB 🚨 +2.64 MB 🚨
Bundle Size Analyzer Link Link

@storybook/addon-onboarding

Before After Difference
Dependency count 0 0 0
Self size 0 B 332 KB 🚨 +332 KB 🚨
Dependency size 0 B 670 B 🚨 +670 B 🚨
Bundle Size Analyzer Link Link

storybook-addon-pseudo-states

Before After Difference
Dependency count 0 0 0
Self size 0 B 21 KB 🚨 +21 KB 🚨
Dependency size 0 B 689 B 🚨 +689 B 🚨
Bundle Size Analyzer Link Link

@storybook/addon-themes

Before After Difference
Dependency count 0 1 🚨 +1 🚨
Self size 0 B 18 KB 🚨 +18 KB 🚨
Dependency size 0 B 28 KB 🚨 +28 KB 🚨
Bundle Size Analyzer Link Link

@storybook/addon-vitest

Before After Difference
Dependency count 0 2 🚨 +2 🚨
Self size 0 B 430 KB 🚨 +430 KB 🚨
Dependency size 0 B 350 KB 🚨 +350 KB 🚨
Bundle Size Analyzer Link Link

@storybook/builder-vite

Before After Difference
Dependency count 0 11 🚨 +11 🚨
Self size 0 B 136 KB 🚨 +136 KB 🚨
Dependency size 0 B 1.32 MB 🚨 +1.32 MB 🚨
Bundle Size Analyzer Link Link

@storybook/builder-webpack5

Before After Difference
Dependency count 0 186 🚨 +186 🚨
Self size 0 B 79 KB 🚨 +79 KB 🚨
Dependency size 0 B 35.74 MB 🚨 +35.74 MB 🚨
Bundle Size Analyzer Link Link

storybook

Before After Difference
Dependency count 0 73 🚨 +73 🚨
Self size 0 B 21.71 MB 🚨 +21.71 MB 🚨
Dependency size 0 B 31.21 MB 🚨 +31.21 MB 🚨
Bundle Size Analyzer Link Link

@storybook/angular

Before After Difference
Dependency count 0 185 🚨 +185 🚨
Self size 0 B 160 KB 🚨 +160 KB 🚨
Dependency size 0 B 30.14 MB 🚨 +30.14 MB 🚨
Bundle Size Analyzer Link Link

@storybook/angular-vite

Before After Difference
Dependency count 0 29 🚨 +29 🚨
Self size 0 B 22.82 MB 🚨 +22.82 MB 🚨
Dependency size 0 B 12.68 MB 🚨 +12.68 MB 🚨
Bundle Size Analyzer Link Link

@storybook/ember

Before After Difference
Dependency count 0 185 🚨 +185 🚨
Self size 0 B 13 KB 🚨 +13 KB 🚨
Dependency size 0 B 31.09 MB 🚨 +31.09 MB 🚨
Bundle Size Analyzer Link Link

@storybook/html-vite

Before After Difference
Dependency count 0 14 🚨 +14 🚨
Self size 0 B 22 KB 🚨 +22 KB 🚨
Dependency size 0 B 1.49 MB 🚨 +1.49 MB 🚨
Bundle Size Analyzer Link Link

@storybook/nextjs

Before After Difference
Dependency count 0 531 🚨 +531 🚨
Self size 0 B 641 KB 🚨 +641 KB 🚨
Dependency size 0 B 62.40 MB 🚨 +62.40 MB 🚨
Bundle Size Analyzer Link Link

@storybook/nextjs-vite

Before After Difference
Dependency count 0 94 🚨 +94 🚨
Self size 0 B 1.42 MB 🚨 +1.42 MB 🚨
Dependency size 0 B 23.90 MB 🚨 +23.90 MB 🚨
Bundle Size Analyzer Link Link

@storybook/preact-vite

Before After Difference
Dependency count 0 14 🚨 +14 🚨
Self size 0 B 12 KB 🚨 +12 KB 🚨
Dependency size 0 B 1.51 MB 🚨 +1.51 MB 🚨
Bundle Size Analyzer Link Link

@storybook/react-native-web-vite

Before After Difference
Dependency count 0 125 🚨 +125 🚨
Self size 0 B 29 KB 🚨 +29 KB 🚨
Dependency size 0 B 25.89 MB 🚨 +25.89 MB 🚨
Bundle Size Analyzer Link Link

@storybook/react-vite

Before After Difference
Dependency count 0 83 🚨 +83 🚨
Self size 0 B 32 KB 🚨 +32 KB 🚨
Dependency size 0 B 21.21 MB 🚨 +21.21 MB 🚨
Bundle Size Analyzer Link Link

@storybook/react-webpack5

Before After Difference
Dependency count 0 272 🚨 +272 🚨
Self size 0 B 23 KB 🚨 +23 KB 🚨
Dependency size 0 B 48.18 MB 🚨 +48.18 MB 🚨
Bundle Size Analyzer Link Link

@storybook/server-webpack5

Before After Difference
Dependency count 0 198 🚨 +198 🚨
Self size 0 B 15 KB 🚨 +15 KB 🚨
Dependency size 0 B 37.01 MB 🚨 +37.01 MB 🚨
Bundle Size Analyzer Link Link

@storybook/svelte-vite

Before After Difference
Dependency count 0 20 🚨 +20 🚨
Self size 0 B 54 KB 🚨 +54 KB 🚨
Dependency size 0 B 26.65 MB 🚨 +26.65 MB 🚨
Bundle Size Analyzer Link Link

@storybook/sveltekit

Before After Difference
Dependency count 0 21 🚨 +21 🚨
Self size 0 B 56 KB 🚨 +56 KB 🚨
Dependency size 0 B 26.71 MB 🚨 +26.71 MB 🚨
Bundle Size Analyzer Link Link

@storybook/tanstack-react

Before After Difference
Dependency count 0 84 🚨 +84 🚨
Self size 0 B 114 KB 🚨 +114 KB 🚨
Dependency size 0 B 21.24 MB 🚨 +21.24 MB 🚨
Bundle Size Analyzer Link Link

@storybook/vue3-vite

Before After Difference
Dependency count 0 103 🚨 +103 🚨
Self size 0 B 34 KB 🚨 +34 KB 🚨
Dependency size 0 B 43.12 MB 🚨 +43.12 MB 🚨
Bundle Size Analyzer Link Link

@storybook/web-components-vite

Before After Difference
Dependency count 0 15 🚨 +15 🚨
Self size 0 B 19 KB 🚨 +19 KB 🚨
Dependency size 0 B 1.55 MB 🚨 +1.55 MB 🚨
Bundle Size Analyzer Link Link

@storybook/cli

Before After Difference
Dependency count 0 205 🚨 +205 🚨
Self size 0 B 829 KB 🚨 +829 KB 🚨
Dependency size 0 B 86.39 MB 🚨 +86.39 MB 🚨
Bundle Size Analyzer Link Link

@storybook/codemod

Before After Difference
Dependency count 0 198 🚨 +198 🚨
Self size 0 B 32 KB 🚨 +32 KB 🚨
Dependency size 0 B 84.87 MB 🚨 +84.87 MB 🚨
Bundle Size Analyzer Link Link

@storybook/core-webpack

Before After Difference
Dependency count 0 1 🚨 +1 🚨
Self size 0 B 11 KB 🚨 +11 KB 🚨
Dependency size 0 B 28 KB 🚨 +28 KB 🚨
Bundle Size Analyzer Link Link

create-storybook

Before After Difference
Dependency count 0 74 🚨 +74 🚨
Self size 0 B 1.09 MB 🚨 +1.09 MB 🚨
Dependency size 0 B 52.92 MB 🚨 +52.92 MB 🚨
Bundle Size Analyzer node node

@storybook/csf-plugin

Before After Difference
Dependency count 0 9 🚨 +9 🚨
Self size 0 B 7 KB 🚨 +7 KB 🚨
Dependency size 0 B 1.28 MB 🚨 +1.28 MB 🚨
Bundle Size Analyzer Link Link

eslint-plugin-storybook

Before After Difference
Dependency count 0 20 🚨 +20 🚨
Self size 0 B 137 KB 🚨 +137 KB 🚨
Dependency size 0 B 3.04 MB 🚨 +3.04 MB 🚨
Bundle Size Analyzer Link Link

@storybook/mcp

Before After Difference
Dependency count 0 11 🚨 +11 🚨
Self size 0 B 144 KB 🚨 +144 KB 🚨
Dependency size 0 B 2.64 MB 🚨 +2.64 MB 🚨
Bundle Size Analyzer Link Link

@storybook/react-dom-shim

Before After Difference
Dependency count 0 0 0
Self size 0 B 19 KB 🚨 +19 KB 🚨
Dependency size 0 B 1 KB 🚨 +1 KB 🚨
Bundle Size Analyzer Link Link

@storybook/preset-create-react-app

Before After Difference
Dependency count 0 68 🚨 +68 🚨
Self size 0 B 32 KB 🚨 +32 KB 🚨
Dependency size 0 B 6.04 MB 🚨 +6.04 MB 🚨
Bundle Size Analyzer Link Link

@storybook/preset-react-webpack

Before After Difference
Dependency count 0 161 🚨 +161 🚨
Self size 0 B 19 KB 🚨 +19 KB 🚨
Dependency size 0 B 32.71 MB 🚨 +32.71 MB 🚨
Bundle Size Analyzer Link Link

@storybook/preset-server-webpack

Before After Difference
Dependency count 0 10 🚨 +10 🚨
Self size 0 B 7 KB 🚨 +7 KB 🚨
Dependency size 0 B 1.20 MB 🚨 +1.20 MB 🚨
Bundle Size Analyzer Link Link

@storybook/html

Before After Difference
Dependency count 0 2 🚨 +2 🚨
Self size 0 B 29 KB 🚨 +29 KB 🚨
Dependency size 0 B 33 KB 🚨 +33 KB 🚨
Bundle Size Analyzer Link Link

@storybook/preact

Before After Difference
Dependency count 0 2 🚨 +2 🚨
Self size 0 B 47 KB 🚨 +47 KB 🚨
Dependency size 0 B 33 KB 🚨 +33 KB 🚨
Bundle Size Analyzer Link Link

@storybook/react

Before After Difference
Dependency count 0 59 🚨 +59 🚨
Self size 0 B 1.46 MB 🚨 +1.46 MB 🚨
Dependency size 0 B 12.30 MB 🚨 +12.30 MB 🚨
Bundle Size Analyzer Link Link

@storybook/server

Before After Difference
Dependency count 0 3 🚨 +3 🚨
Self size 0 B 9 KB 🚨 +9 KB 🚨
Dependency size 0 B 719 KB 🚨 +719 KB 🚨
Bundle Size Analyzer Link Link

@storybook/svelte

Before After Difference
Dependency count 0 3 🚨 +3 🚨
Self size 0 B 49 KB 🚨 +49 KB 🚨
Dependency size 0 B 601 KB 🚨 +601 KB 🚨
Bundle Size Analyzer Link Link

@storybook/vue3

Before After Difference
Dependency count 0 4 🚨 +4 🚨
Self size 0 B 68 KB 🚨 +68 KB 🚨
Dependency size 0 B 584 KB 🚨 +584 KB 🚨
Bundle Size Analyzer Link Link

@storybook/web-components

Before After Difference
Dependency count 0 3 🚨 +3 🚨
Self size 0 B 80 KB 🚨 +80 KB 🚨
Dependency size 0 B 48 KB 🚨 +48 KB 🚨
Bundle Size Analyzer Link Link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:normal Run our default set of CI jobs (choose this for most PRs). maintenance User-facing maintenance tasks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skills M4: addon-mcp and @storybook/mcp run on the shared core toolsets

1 participant