Skip to content

feat: Improve STDIO transport layer for large JSON-RPC inputs #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: server-prompts-feature
Choose a base branch
from

Conversation

cs3b
Copy link
Owner

@cs3b cs3b commented Apr 5, 2025

  • Non-blocking reads with read_nonblock: Avoids stalling the thread when no input is available.
  • Custom buffering: Handles partial reads, which can happen when a long message is sent in chunks.
  • Safer handling of large inputs: Introduces @max_line_size = 1MB to prevent memory abuse (e.g., if a client sends a huge unbroken stream).
  • Error logging and cleanup on oversized or malformed input.

cs3b added 6 commits April 3, 2025 21:50
This commit introduces four new example prompts demonstrating different use cases for code review, including inline prompt, multi-message prompt with context, and two separate ERB templates.  It also includes a `prompt_code_review.rb` file that utilizes ERB templates to construct the assistant and user messages for a code review scenario.
and update changelog with prompt features
* Non-blocking reads with read_nonblock: Avoids stalling the thread when no input is available.
* Custom buffering: Handles partial reads, which can happen when a long message is sent in chunks.
* Safer handling of large inputs: Introduces @max_line_size = 1MB to prevent memory abuse (e.g., if a client sends a huge unbroken stream).
* Error logging and cleanup on oversized or malformed input.
cs3b added a commit that referenced this pull request Apr 13, 2025
- Reverted version in lib/mcp/version.rb from 1.1.1 to 1.0.0
- Updated Gemfile.lock to reflect version change
- Modified CHANGELOG.md to move 1.1.0 and 1.1.1 features to Unreleased section
- Removed gem files for versions 1.1.0 and 1.1.1

Closes task #1-version-revert-to-original
@cs3b cs3b force-pushed the server-prompts-feature branch 3 times, most recently from 46d5948 to f1835b3 Compare April 14, 2025 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant