Skip to content

refactor(mcp): simplify generated code via runtime invoker adapters#3926

Merged
jknack merged 1 commit intomainfrom
3924
Apr 25, 2026
Merged

refactor(mcp): simplify generated code via runtime invoker adapters#3926
jknack merged 1 commit intomainfrom
3924

Conversation

@jknack
Copy link
Copy Markdown
Member

@jknack jknack commented Apr 24, 2026

  • Introduced McpOperation to cleanly encapsulate static routing metadata and runtime arguments.
  • Refactored McpInvoker to act as a factory, providing strongly-typed adapters (asToolHandler, asCompletionHandler, etc.) for both stateful and stateless servers.
  • Updated APT generator (McpRouter, McpRoute) to output clean method references instead of complex, boilerplate-heavy lambda chains.

- Introduced `McpOperation` to cleanly encapsulate static routing metadata and runtime arguments.
- Refactored `McpInvoker` to act as a factory, providing strongly-typed adapters (`asToolHandler`, `asCompletionHandler`, etc.) for both stateful and stateless servers.
- Updated APT generator (`McpRouter`, `McpRoute`) to output clean method references instead of complex, boilerplate-heavy lambda chains.
@jknack jknack merged commit 0ea5b8b into main Apr 25, 2026
4 checks passed
@jknack jknack deleted the 3924 branch April 26, 2026 12:55
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