RFC: Canonical streaming ABI across tractatus, Bobravoz, and the Go SDK #77
lanycrost
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
tractatus,bobravoz-grpc, andbubu-sdk-godo not currently enforce one canonical streaming packet ABI. The concrete gaps are already visible: structured payloads are object-only in practice, envelope-onlyMessageIDhandling is weaker than metadata-shadow handling, kind-only packets are not consistently constrained, and opaque raw binary can still be dropped when the structured-envelope path is chosen.Why this needs a discussion
This is exactly the type of contract problem that should not be fixed repo-by-repo. The packet ABI spans
tractatus,core,bobravoz-grpc,bubu-sdk-go, and any future SDKs. The existing GitHub discussion#75already covers adjacent typed ABI work, so this RFC should either extend that thread or explicitly narrow the packet-contract slice that it does not settle.Current evidence
tractatusmodels structuredPayloadandInputswithgoogle.protobuf.Struct, so the wire-level structured path is object-shaped JSON in practice.bubu-sdk-go/stream_context.goalso decodesPayloadandInputsthroughmap[string]any, reinforcing the same object-only behavior.bubu-sdk-go/stream.goandtransport_envelope.gocan drop or reinterpret opaqueBinary.Payloadwhen the structured-envelope path is forced.bubu-sdk-go/stream.goand Bobravoz hub logic still treat private metadata-shadow keys as stronger than envelope-onlyMessageID/TimestampMsin some dedupe/replay paths.bubu-sdk-go/stream_message_builder.go,stream.go, andtestkit/validators.gostill leave room for inconsistent kind-only packet handling.openai-chat-engrammirrorsInputsandPayloadto force the structured-envelope path.openai-tts-engrammirrors JSON into bothPayloadandBinary.silero-vad-engramandlivekit-turn-detector-engramread structured content withInputs > Payload > Binaryprecedence.Proposed decisions
PayloadandInputsare JSON objects only. Non-object JSON must travel as opaque binary with an explicit MIME, or wait for a future tractatus extension.Envelope.MessageIDandEnvelope.TimestampMsare authoritative on the structured path. Metadata-shadow keys are cleanup targets, not part of the long-term contract.heartbeat,noop, andhook. Business-data packets must carrypayload,inputs,binary,audio, orvideo.Binary.Payloadwith structured-envelope fields is invalid until tractatus grows a first-class dual-payload ABI. SDK/Bobravoz should fail closed instead of silently mirroring or dropping bytes.tractatusowns transport/envelope ABI versioning.corecarries helpers and protocol checks, but should not define an independent packet contract.Cross-repo scope
tractatus: owns proto/envelope versioning and the canonical packet shape.core: owns protocol-version helpers and startup compatibility checks.bubu-sdk-go: must align encode/decode, validation, dedupe, and builder semantics.bobravoz-grpc: must align hub decode/dedupe/replay behavior to the same ABI.openai-chat-engram,openai-stt-engram,openai-tts-engram,silero-vad-engram, andlivekit-turn-detector-engram.Desired outcome
One canonical streaming ABI plus a pre-release migration/removal plan so Bobravoz, the Go SDK, and future SDKs stop carrying subtly different packet semantics.
Beta Was this translation helpful? Give feedback.
All reactions