palladius / palladius/antigravity-ruby-sdk

🔮 P4: Switch stdio handshake to google-protobuf gem for future-proofing

Open
#7 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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.protocontent_pb.rb
  • localharness.protolocalharness_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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.