feat(codemode): add provider proxy tool#1529
Conversation
|
| } from "./json-schema-types"; | ||
| export { normalizeCode } from "./normalize"; | ||
| export { resolveProvider } from "./resolve"; | ||
|
|
||
| export { | ||
| createProxyTool, | ||
| type CodeProvider, | ||
| type CreateProxyToolOptions, | ||
| type ProxyToolInput, | ||
| type ProxyToolOutput | ||
| } from "./proxy-tool"; | ||
| export { | ||
| mcpProvider, | ||
| openApiProvider, | ||
| toolsetProvider, | ||
| type McpConnectionLike, | ||
| type OpenApiRequestOptions, | ||
| type ProviderOptions, | ||
| type ProviderSnippet, | ||
| type ProviderSnippetRecord | ||
| } from "./providers"; |
There was a problem hiding this comment.
🔴 Missing changeset for new public API exports in packages/codemode
The PR adds multiple new public API exports to packages/codemode/src/index.ts — including runCode, createProxyTool, mcpProvider, openApiProvider, toolsetProvider, and associated types — as well as a new mcp-provider.ts entry module. Per the repository's AGENTS.md: "Changes to packages/ that affect the public API or fix bugs need a changeset." No changeset file was added in .changeset/.
(Refers to lines 1-37)
Prompt for agents
The PR adds new public exports to packages/codemode (runCode, createProxyTool, mcpProvider, openApiProvider, toolsetProvider, and new type exports) without a changeset file. Run `npx changeset` at the repo root and create a changeset for the @cloudflare/codemode package describing the new provider and proxy-tool APIs. This is required by the repo's AGENTS.md before merging.
Was this helpful? React with 👍 or 👎 to provide feedback.
88dce23 to
843d808
Compare
Summary
Add a provider-based proxy tool API to
@cloudflare/codemode.This introduces
createProxyTool({ providers, executor }), a single model-facing tool that can discover provider capabilities and execute code against generated provider SDKs in the sandbox.Providers are async functions, so users can pass them directly without awaiting first:
The proxy tool supports:
What changed
createProxyTool(...)to@cloudflare/codemodemcpProvider(...)openApiProvider(...)toolsetProvider(...)instructionsandsnippetsrunCode(...)helpercodemode-providersexample demonstrating MCP + OpenAPI providers in one sandboxcreateCodeTool(...)behavior intact; this is additiveVerification