-
Notifications
You must be signed in to change notification settings - Fork 97
Description
Is your feature request related to a problem? Please describe.
PR #71 made Express optional, but the SDK still can't run on edge runtimes
(Cloudflare Workers, Deno, Bun) because:
DefaultExecutionEventBususes Node.jsEventEmitter- Extension utilities (
HTTP_EXTENSION_HEADER,getRequestedExtensions) aren't exported
This forces anyone wanting Hono/Fastify support to maintain a full fork.
Describe the solution you'd like
1. Replace EventEmitter with EventTarget
- Web-standard API available in all modern runtimes
- Node.js 15+ has native EventTarget support
- Maintains same public API
2. Export extension utilities
// In src/server/index.ts
export { HTTP_EXTENSION_HEADER } from '../constants.js';
export { getRequestedExtensions } from './utils.js';
Benefits
- ✅ Native Cloudflare Workers support (no
nodejs_compat) - ✅ Native Deno/Bun support
- ✅ Browser compatibility
- ✅ Enables community framework adapters
- ✅ Smaller bundle for edge deployments
Describe alternatives you've considered
I've implemented this in my fork: https://github.com/drew-foxall/a2a-js-sdk
Additional context
I've also used my fork to create working implementations using hono to create alternate versions of the a2a-examples https://github.com/drew-foxall/a2a-js-sdk-examples
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
No labels