Files
meshcore-analyzer/proto/websocket.proto
Kpa-clawbot cdcaa476f2 rename: MeshCore Analyzer → CoreScope (Phase 1 — backend + infra)
Rename product branding, binary names, Docker images, container names,
Go modules, proto go_package, CI, manage.sh, and documentation.

Preserved (backward compat):
- meshcore.db database filename
- meshcore-data / meshcore-staging-data directory paths
- MQTT topics (meshcore/#, meshcore/+/+/packets, etc.)
- proto package namespace (meshcore.v1)
- localStorage keys

Changes by category:
- Go modules: github.com/corescope/{server,ingestor}
- Binaries: corescope-server, corescope-ingestor
- Docker images: corescope:latest, corescope-go:latest
- Containers: corescope-prod, corescope-staging, corescope-staging-go
- Supervisord programs: corescope, corescope-server, corescope-ingestor
- Branding: siteName, heroTitle, startup logs, fallback HTML
- Proto go_package: github.com/corescope/proto/v1
- CI: container refs, deploy path
- Docs: 8 markdown files updated

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-28 14:08:15 -07:00

50 lines
1.9 KiB
Protocol Buffer

syntax = "proto3";
package meshcore.v1;
option go_package = "github.com/corescope/proto/v1";
import "decoded.proto";
import "packet.proto";
// ─── WebSocket Messages ────────────────────────────────────────────────────────
// All WS messages use the WSMessage envelope.
// Connection: ws://<host> (or wss://). No authentication.
// Top-level WebSocket message envelope.
message WSMessage {
// Message type discriminator: "packet" or "message".
// "packet" = new packet ingestion broadcast.
// "message" = GRP_TXT channel message broadcast (same data shape as "packet").
string type = 1;
// Payload data (shape depends on type).
WSPacketData data = 2;
}
// WebSocket packet broadcast payload.
// Sent for both "packet" and "message" type WS messages.
message WSPacketData {
// Observation or transmission ID.
int64 id = 1;
// Raw hex-encoded packet bytes (null if unavailable).
optional string raw = 2;
// Structured decoded result (always present with at least header.payloadTypeName).
DecodedResult decoded = 3;
// Signal-to-noise ratio (dB).
optional double snr = 4;
// Received signal strength (dBm).
optional double rssi = 5;
// Content hash.
optional string hash = 6;
// Observer device ID.
optional string observer = 7;
// Observer display name.
optional string observer_name = 8 [json_name = "observer_name"];
// JSON-stringified hops array (redundant with decoded.path.hops).
optional string path_json = 9 [json_name = "path_json"];
// Full packet object (Observation-shaped, includes transmission_id).
optional Observation packet = 10;
// Observation count (present when packet is included).
optional int32 observation_count = 11 [json_name = "observation_count"];
}