Skip to content

feat: unwrap MCP namespace to flat exports + barrel#22693

Merged
kitlangton merged 1 commit into
devfrom
kit/namespace-treeshake-mcp
Apr 16, 2026
Merged

feat: unwrap MCP namespace to flat exports + barrel#22693
kitlangton merged 1 commit into
devfrom
kit/namespace-treeshake-mcp

Conversation

@kitlangton
Copy link
Copy Markdown
Contributor

Summary

Convert export namespace MCP { ... } (930 lines) to flat named exports with export * as MCP barrel.

Why

Third leg of the cli/error.ts import chain. MCP pulled in @modelcontextprotocol/sdk (3 transports) and open (browser launcher) just for MCP.Failed.isInstance() checks.

With Bus, Config, Provider, and now MCP all converted, the entire cli/error.ts import chain is tree-shakeable.

Verification

  • Full typecheck clean
  • 33/33 MCP tests pass
  • index.ts case (no import rewrites needed)

Convert `export namespace MCP { ... }` (930 lines) to flat named exports
with `export * as MCP` barrel. Third leg of the cli/error.ts import chain —
this pulled in @modelcontextprotocol/sdk (3 transports) and open (browser
launcher) just for MCP.Failed.isInstance() checks.

33 tests pass, full typecheck clean.
@kitlangton kitlangton enabled auto-merge (squash) April 16, 2026 01:49
@kitlangton kitlangton merged commit 6625766 into dev Apr 16, 2026
13 checks passed
@kitlangton kitlangton deleted the kit/namespace-treeshake-mcp branch April 16, 2026 01:56
jerome-benoit pushed a commit to jerome-benoit/opencode that referenced this pull request Apr 16, 2026
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
dgokeeffe pushed a commit to dgokeeffe/opencode-databricks that referenced this pull request May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant