palladius / palladius/antigravity-ruby-sdk
🔮 P4: Switch stdio handshake to google-protobuf gem for future-proofing
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 0
- Forks
- 0
- Avg merge
- 4m
- Merged PRs (30d)
- 1
Description
Context
The localharness binary uses a stdio handshake with 2 tiny protobuf messages:
InputConfig(5 fields: storage_directory, port, bind_address, client_info, env)OutputConfig(2 fields: port, api_key)
All WebSocket messages are JSON-serialized (not binary protobuf), so no gem needed there.
Current Approach (v0.4.0)
Hand-rolled binary encoding for these 2 messages using Array#pack (~30 lines).
Zero additional dependencies. Functionally identical.
Future-Proof Approach (this issue)
Add google-protobuf gem (~3.6 MB) and use compiled .proto files:
content.proto→content_pb.rblocalharness.proto→localharness_pb.rb
Proto files already compile cleanly with protoc --ruby_out.
Why Later
- Only 2 messages need binary encoding today
- The gem adds 3.6 MB + native C extension
- JSON handles all WebSocket communication
- If upstream proto schema changes significantly, we upgrade then
Proto compilation command (for reference)
protoc --ruby_out=lib/antigravity/proto/ \
--proto_path=/tmp/antigravity-sdk-python/ \
/tmp/antigravity-sdk-python/google/antigravity/proto/content.proto \
/tmp/antigravity-sdk-python/google/antigravity/proto/localharness.proto
Labels
Priority: P4 (nice to have)
Type: Feature Request
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the stdio handshake implementation that currently uses Array#pack, then review content.proto and localharness.proto and the referenced protoc command. Add the generated Ruby protobuf files and dependency, and verify that the two handshake messages use them while WebSocket messages remain JSON-serialized.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100