Merged
Conversation
- Changed default mode from STDIO to SSE for better HTTP/x402 support - Added --mode flag to choose between 'sse' (default) and 'stdio' - Added --port flag for SSE mode (default: 8000) - Updated all tests to explicitly use --mode=stdio - Fixed HTTPGatewayWrapper subprocess to use STDIO mode - Updated package.json scripts: start/dev (SSE), start:stdio/dev:stdio - Updated documentation in CLAUDE.md - Added SSE_DEFAULT_MIGRATION.md with migration guide BREAKING CHANGE: Default mode is now SSE instead of STDIO. Existing STDIO integrations must add --mode=stdio flag.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Introduces a Bun-based build script to package.json for building the project and deletes tsconfig.json, indicating a shift away from TypeScript's tsc configuration in favor of Bun's build tooling.
Modified package.json start scripts to run from the build directory with a specific config file and port. Updated HTTPGatewayWrapper to launch the subprocess using the currently executing script path, ensuring compatibility with both source and build environments.
Added logging of the gateway subprocess command in HTTPGatewayWrapper for better visibility. Updated package.json start scripts to run from source files instead of build output.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR changes the default transport mode from STDIO to SSE, making the gateway HTTP/network-accessible by default with proper x402 payment support.
Changes
Core Changes
--mode=sse|stdioflag to choose transport mode--port=<number>flag for SSE modestart/dev→ SSE mode (default)start:stdio/dev:stdio→ STDIO modeBug Fixes
--mode=stdio(prevented port conflict)Testing & Documentation
--mode=stdioBreaking Changes
bun run src/index.ts --config=config.yamlwithout--modeflag now starts SSE mode instead of STDIO mode.Migration: Add
--mode=stdioto existing STDIO integrations.Benefits
--mode=stdioTesting
All existing tests pass with explicit
--mode=stdioflag. SSE mode tested with:./example-agents/run-gateway-sse.shbun run example-agents/ai16z-price-agent-sse.tsFiles Changed
src/index.ts- Added dual-mode supportsrc/transports/http-wrapper.ts- Fixed subprocess to use--mode=stdiopackage.json- Updated scriptsCLAUDE.md- Updated documentationexample-agents/run-gateway-sse.sh- Simplified to use main entry--mode=stdiotests/test-runner.sh- Added--mode=stdioto test commandsSSE_DEFAULT_MIGRATION.md- Migration guide (new file)