feat: v2 Phase 1 — foundation, proto schemas, RPC framework, SDK skeleton
New workspace structure with 9 crates. Adds: - proto/qpq/v1/*.proto: 11 protobuf schemas covering all 33 RPC methods - quicproquo-proto: dual codegen (capnp legacy + prost v2) - quicproquo-rpc: QUIC RPC framework (framing, server, client, middleware) - quicproquo-sdk: client SDK (QpqClient, events, conversation store) - quicproquo-server/domain/: protocol-agnostic domain types and services - justfile: build commands Wire format: [method_id:u16][req_id:u32][len:u32][protobuf] per QUIC stream. All 151 existing tests pass. Backward compatible with v1 capnp code.
This commit is contained in:
49
proto/qpq/v1/push.proto
Normal file
49
proto/qpq/v1/push.proto
Normal file
@@ -0,0 +1,49 @@
|
||||
syntax = "proto3";
|
||||
package qpq.v1;
|
||||
|
||||
// Server-push event types (sent on QUIC uni-streams).
|
||||
// Event type IDs: 1000+.
|
||||
|
||||
// Wrapper for a push event.
|
||||
message PushEvent {
|
||||
oneof event {
|
||||
NewMessage new_message = 1;
|
||||
TypingIndicator typing = 2;
|
||||
PresenceUpdate presence = 3;
|
||||
GroupMembershipChange membership = 4;
|
||||
}
|
||||
}
|
||||
|
||||
message NewMessage {
|
||||
bytes channel_id = 1;
|
||||
bytes sender_key = 2;
|
||||
uint64 seq = 3;
|
||||
bytes payload = 4;
|
||||
uint64 timestamp_ms = 5;
|
||||
}
|
||||
|
||||
message TypingIndicator {
|
||||
bytes channel_id = 1;
|
||||
bytes sender_key = 2;
|
||||
bool is_typing = 3;
|
||||
}
|
||||
|
||||
message PresenceUpdate {
|
||||
bytes identity_key = 1;
|
||||
bool online = 2;
|
||||
uint64 last_seen_ms = 3;
|
||||
}
|
||||
|
||||
message GroupMembershipChange {
|
||||
bytes channel_id = 1;
|
||||
bytes actor_key = 2;
|
||||
bytes target_key = 3;
|
||||
MembershipAction action = 4;
|
||||
}
|
||||
|
||||
enum MembershipAction {
|
||||
MEMBERSHIP_ACTION_UNSPECIFIED = 0;
|
||||
MEMBERSHIP_ACTION_ADDED = 1;
|
||||
MEMBERSHIP_ACTION_REMOVED = 2;
|
||||
MEMBERSHIP_ACTION_LEFT = 3;
|
||||
}
|
||||
Reference in New Issue
Block a user