Repository navigation
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Thank you for following the naming conventions! 🙏 |
commit: |
HugoRCD
force-pushed
the
v1-08-toolkit-types
branch
from
November 25, 2026 11:38
4b4ed9c to
987571d
Compare
This was referenced Nov 25, 2026
The public API now exports engine types only under Mcp-prefixed names (McpAuthOptions, McpEra, McpExtensionPlugin, McpRequestContext, ...), and McpHandlerOptions lists its options instead of extending h3-mcp's HandlerOptions. MCP spec types keep their names. Amp-Thread-ID: https://ampcode.com/threads/T-01a21265-50f0-764e-97c3-f8296e9c8df5 Co-authored-by: Amp <amp@ampcode.com>
HugoRCD
force-pushed
the
v1-08-toolkit-types
branch
from
November 25, 2026 13:43
987571d to
fdbe7bb
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The beta's public API re-exported h3-mcp's own types (
AuthOptions,Era,ExtensionPlugin,OriginOptions,PluginOptions, …) andMcpHandlerOptionsextended h3-mcp's wholeHandlerOptions, so every engine option and callback was public API of bothnitro-mcp-toolkitand@nuxtjs/mcp-toolkit(which re-exports it). Swapping or upgrading the engine after 1.0 would then be a breaking change for users. This PR exports engine concepts only under toolkit-ownedMcp-prefixed names and lists the handler options the toolkit actually maps. MCP spec types such asCallToolResultandIconkeep their names, and runtime behaviour does not change.To try it, install the PR build and typecheck code that uses the new names:
AuthOptions,AuthCredentials,AuthSchemeMcpAuthOptions,McpAuthCredentials,McpAuthSchemeCacheHintsMcpCacheHintsEraMcpEraExtensionPluginMcpExtensionPluginOriginOptionsMcpOriginOptionsPluginOptionsMcpHandlerSetupevent.context.mcptyped as h3-mcp'sRequestContextMcpRequestContext(new), plusMcpSessionOptions,McpLimitsOptionsBefore and after
The same consumer file, typechecked with the package's
tsc --noEmitagainst #415 (v1-07-auth-dx) and against this branch:Before:
After:
Dropping the pass-through removes the h3-mcp options nothing in the repo used:
onListen,onStream,onCancelled,onProgress,onLogLevelSet,onSubscribe,onUnsubscribe,cache,extensions,subscriptionsandechoServerInfo.handler.notifystill pushes list-changed and resource-updated events; the README used to point toonListenand no longer does. A type test now pins the option set, so adding one is a deliberate change. The changeset ismajorfor both packages, like the other beta changesets.Two leaks remain and are documented in AGENTS.md. h3-mcp declares
H3EventContext.mcpglobally, so editors still show the engine's full context onMcpEvent.context.mcp(a probe seesRequestContext & Pick<…>); that goes only with the engine.McpExtensionPluginis h3-mcp's plugin contract under a toolkit name, so plugins stay engine-specific by nature.Beyond CI: the Nuxt module's tests need
pnpm build:modulefirst (two fixtures load itsdist); after that they passed locally. I also builtnitro-mcp-toolkitand checked thatdist/runtime/index.d.mtsexports none of the removed names. Nobody has tried the renames in a real app yet.ELI5
The toolkit is built on top of another library, and it was handing that library's own type names straight to users. Now it gives them its own names, so if the library underneath changes one day, users' code doesn't have to.