Skip to content

Commit 0858c98

Browse files
fix: prevent crash when importing in cloudflare workers (#306)
Looks like an export was missed in #290 for the workerd shim, this prevents the crash when importing there. Loing term we should just add an implementation for cloudflare workers (and I suspect the node implementation might just work)
1 parent 191b82a commit 0858c98

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.changeset/free-jokes-walk.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@openai/agents-core': patch
3+
---
4+
5+
fix: prevent crash when importing in cloudflare workers
6+
7+
An export was missed in https://github.com/openai/openai-agents-js/pull/290 for the workerd shim, this prevents the crash when importing there. Long term we should just add an implementation for cloudflare workers (and I suspect the node implementation might just work)

packages/agents-core/src/shims/shims-workerd.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ export function isTracingLoopRunningByDefault(): boolean {
5454
/**
5555
* Right now Cloudflare Workers does not support MCP
5656
*/
57-
export { MCPServerStdio, MCPServerStreamableHttp } from './mcp-server/browser';
57+
export {
58+
MCPServerStdio,
59+
MCPServerStreamableHttp,
60+
MCPServerSSE,
61+
} from './mcp-server/browser';
5862

5963
export { clearTimeout, setTimeout } from 'node:timers';
6064

0 commit comments

Comments
 (0)