gabriel / muse public
feat BREAKING task/grpc-framing #1 / 1
AI Agent gabriel · 152 days ago · Apr 23, 2026 · Diff

feat: add gRPC framing to MWP push stream

- Add GRPC_CONTENT_TYPE constant and grpc_frame() to mpack.py - Extract _frame_generator() to module level (sync generator, testable) - _push_stream_httpx now wraps each MWP frame in 5-byte gRPC prefix - Content-Type changed from application/x-muse-wire to application/grpc+muse - Add test_grpc_framing.py: 10 tests covering client-side gRPC framing

sha256:2c149caef4edae813ba37d9a627e9875d1421ad0bbc377b919d7046f24f3d5c5 sha
+18 ~3 symbols
sha256:7bf193405657a50857ea2e280216724cc42cf759f8c84aa31e0b5b9e68bda381 snapshot
+18
symbols added
~3
symbols modified
0
dead code introduced
Semantic Changes 21 symbols
~ tests/test_grpc_framing.py .py 15 symbols added
+ _decode_all_grpc_frames function function _decode_all_grpc_frames L38–51
+ _decode_grpc_frame function function _decode_grpc_frame L28–35
+ annotations import import annotations L17–17
+ pytest import import pytest L21–21
+ struct import import struct L19–19
+ test_frame_generator_produces_grpc_wrapped_frames function function test_frame_generator_produces_grpc_wrapped_frames L137–154
+ test_grpc_content_type_constant function function test_grpc_content_type_constant L128–130
+ test_grpc_frame_compression_flag_is_zero function function test_grpc_frame_compression_flag_is_zero L58–61
+ test_grpc_frame_empty_payload function function test_grpc_frame_empty_payload L103–108
+ test_grpc_frame_large_payload function function test_grpc_frame_large_payload L115–121
+ test_grpc_frame_length_field function function test_grpc_frame_length_field L64–69
+ test_grpc_frame_message_body function function test_grpc_frame_message_body L72–76
+ test_grpc_frame_roundtrip function function test_grpc_frame_roundtrip L90–96
+ test_grpc_frame_total_length function function test_grpc_frame_total_length L79–83
+ test_multiple_grpc_frames_decode_in_order function function test_multiple_grpc_frames_decode_in_order L161–166
~ muse/core/mpack.py .py 2 symbols added
+ GRPC_CONTENT_TYPE variable variable GRPC_CONTENT_TYPE L108–108
+ grpc_frame function function grpc_frame L111–118
~ muse/core/transport.py .py 1 symbol added, 3 symbols modified
+ _frame_generator function function _frame_generator L289–391
← Older Oldest on task/grpc-framing
All commits
Newer → Latest on task/grpc-framing

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:2c149caef4edae813ba37d9a627e9875d1421ad0bbc377b919d7046f24f3d5c5 --body "your comment"